tools/Master.h
changeset 1099 eb8d16507d88
parent 1079 ef1266652c4d
child 1101 f8d13814af03
equal deleted inserted replaced
1098:ff5b1722581c 1099:eb8d16507d88
    40         Master();
    40         Master();
    41         ~Master();
    41         ~Master();
    42 
    42 
    43         void setIndex(unsigned int);
    43         void setIndex(unsigned int);
    44 
    44 
       
    45         enum Verbosity {
       
    46             Quiet,
       
    47             Normal,
       
    48             Verbose
       
    49         };
       
    50         void setVerbosity(Verbosity);
       
    51 
    45         void writeAlias(int, bool, const vector<string> &);
    52         void writeAlias(int, bool, const vector<string> &);
    46         void showConfigs(bool);
    53         void showConfigs();
    47         void outputData(int);
    54         void outputData(int);
    48         void setDebug(const vector<string> &);
    55         void setDebug(const vector<string> &);
    49         void showDomains(int);
    56         void showDomains(int);
    50         void showMaster();
    57         void showMaster();
    51         void listPdos(int, bool = false);
    58         void listPdos(int);
    52         void listSdos(int, bool = false);
    59         void listSdos(int);
    53         void sdoDownload(int, const string &, const vector<string> &);
    60         void sdoDownload(int, const string &, const vector<string> &);
    54         void sdoUpload(int, const string &, const vector<string> &);
    61         void sdoUpload(int, const string &, const vector<string> &);
    55         void showSlaves(int, bool);
    62         void showSlaves(int);
    56         void siiRead(int);
    63         void siiRead(int);
    57         void siiWrite(int, bool, const vector<string> &);
    64         void siiWrite(int, bool, const vector<string> &);
    58         void requestStates(int, const vector<string> &);
    65         void requestStates(int, const vector<string> &);
    59         void generateXml(int);
    66         void generateXml(int);
    60 
    67 
    62         enum Permissions {Read, ReadWrite};
    69         enum Permissions {Read, ReadWrite};
    63         void open(Permissions);
    70         void open(Permissions);
    64         void close();
    71         void close();
    65 
    72 
    66         void writeSlaveAlias(uint16_t, uint16_t);
    73         void writeSlaveAlias(uint16_t, uint16_t);
    67         void showConfigs();
    74         void showDetailedConfigs();
    68         void listConfigs();
    75         void listConfigs();
    69         void outputDomainData(unsigned int);
    76         void outputDomainData(unsigned int);
    70         void showDomain(unsigned int);
    77         void showDomain(unsigned int);
    71         void listSlavePdos(uint16_t, bool = false, bool = false);
    78         void listSlavePdos(uint16_t, bool = false);
    72         void listSlaveSdos(uint16_t, bool = false, bool = false);
    79         void listSlaveSdos(uint16_t, bool = false);
    73         void listSlaves(int);
    80         void listSlaves(int);
    74         void showSlave(uint16_t);
    81         void showSlave(uint16_t);
    75         void generateSlaveXml(uint16_t);
    82         void generateSlaveXml(uint16_t);
    76         unsigned int slaveCount();
    83         unsigned int slaveCount();
    77         void getMaster(ec_ioctl_master_t *);
    84         void getMaster(ec_ioctl_master_t *);
   100         
   107         
   101     private:
   108     private:
   102         enum {DefaultBufferSize = 1024};
   109         enum {DefaultBufferSize = 1024};
   103 
   110 
   104         unsigned int index;
   111         unsigned int index;
       
   112         Verbosity verbosity;
   105         int fd;
   113         int fd;
   106 };
   114 };
   107 
   115 
   108 /****************************************************************************/
   116 /****************************************************************************/
   109 
   117