tool/MasterDevice.h
changeset 1826 ec6223c3b7ec
parent 1804 742607c464c4
child 1831 1875b9fea0ba
equal deleted inserted replaced
1825:65781b048a47 1826:ec6223c3b7ec
    77 /****************************************************************************/
    77 /****************************************************************************/
    78 
    78 
    79 class MasterDevice
    79 class MasterDevice
    80 {
    80 {
    81     public:
    81     public:
    82         MasterDevice();
    82         MasterDevice(unsigned int = 0U);
    83         ~MasterDevice();
    83         ~MasterDevice();
    84 
    84 
    85         void setIndex(unsigned int);
    85         void setIndex(unsigned int);
    86         unsigned int getIndex() const;
    86         unsigned int getIndex() const;
    87 
    87 
    88         enum Permissions {Read, ReadWrite};
    88         enum Permissions {Read, ReadWrite};
    89         void open(Permissions);
    89         void open(Permissions);
    90         void close();
    90         void close();
       
    91 
       
    92         void getModule(ec_ioctl_module_t *);
    91 
    93 
    92         void getMaster(ec_ioctl_master_t *);
    94         void getMaster(ec_ioctl_master_t *);
    93         void getConfig(ec_ioctl_config_t *, unsigned int);
    95         void getConfig(ec_ioctl_config_t *, unsigned int);
    94         void getConfigPdo(ec_ioctl_config_pdo_t *, unsigned int, uint8_t,
    96         void getConfigPdo(ec_ioctl_config_pdo_t *, unsigned int, uint8_t,
    95                 uint16_t);
    97                 uint16_t);
   119         void writeFoe(ec_ioctl_slave_foe_t *);
   121         void writeFoe(ec_ioctl_slave_foe_t *);
   120 #ifdef EC_EOE
   122 #ifdef EC_EOE
   121         void getEoeHandler(ec_ioctl_eoe_handler_t *, uint16_t);
   123         void getEoeHandler(ec_ioctl_eoe_handler_t *, uint16_t);
   122 #endif
   124 #endif
   123 
   125 
       
   126         unsigned int getMasterCount() const {return masterCount;}
       
   127 
   124     private:
   128     private:
   125         unsigned int index;
   129         unsigned int index;
       
   130         unsigned int masterCount;
   126         int fd;
   131         int fd;
   127 };
   132 };
   128 
   133 
   129 /****************************************************************************/
   134 /****************************************************************************/
   130 
   135