46 #ifndef _ethercatmain_ 47 #define _ethercatmain_ 56 #define EC_MAXELIST 64 60 #define EC_MAXSLAVE 200 64 #define EC_MAXIOSEGMENTS 64 66 #define EC_MAXMBX 0x3ff 68 #define EC_MAXEEPDO 0x200 74 #define EC_MAXLEN_ADAPTERNAME 128 120 #define ECT_MBXPROT_AOE 0x0001 121 #define ECT_MBXPROT_EOE 0x0002 122 #define ECT_MBXPROT_COE 0x0004 123 #define ECT_MBXPROT_FOE 0x0008 124 #define ECT_MBXPROT_SOE 0x0010 125 #define ECT_MBXPROT_VOE 0x0020 127 #define ECT_COEDET_SDO 0x01 128 #define ECT_COEDET_SDOINFO 0x02 129 #define ECT_COEDET_PDOASSIGN 0x04 130 #define ECT_COEDET_PDOCONFIG 0x08 131 #define ECT_COEDET_UPLOAD 0x10 132 #define ECT_COEDET_SDOCA 0x20 134 #define EC_SMENABLEMASK 0xfffeffff
ec_groupt ec_group[EC_MAXGROUP]
void ecx_siistring(ecx_contextt *context, char *str, uint16 slave, uint16 Sn)
int ec_writeeepromAP(uint16 aiadr, uint16 eeproma, uint16 data, int timeout)
#define EC_MAXLEN_ADAPTERNAME
uint64 ec_readeepromFP(uint16 configadr, uint16 eeproma, int timeout)
uint8 ec_siigetbyte(uint16 slave, uint16 address)
int ec_send_processdata(void)
boolean ec_poperror(ec_errort *Ec)
void ecx_close(ecx_contextt *context)
int ecx_receive_processdata(ecx_contextt *context, int timeout)
PACKED_END ec_slavet ec_slave[EC_MAXSLAVE]
char name[EC_MAXLEN_ADAPTERNAME]
uint16 ecx_siiSMnext(ecx_contextt *context, uint16 slave, ec_eepromSMt *SM, uint16 n)
int ec_init_redundant(char *ifname, char *if2name)
int ecx_send_processdata_group(ecx_contextt *context, uint8 group)
void ecx_pusherror(ecx_contextt *context, const ec_errort *Ec)
int ec_receive_processdata(int timeout)
void ec_clearmbx(ec_mbxbuft *Mbx)
int ecx_writeeepromAP(ecx_contextt *context, uint16 aiadr, uint16 eeproma, uint16 data, int timeout)
void ecx_packeterror(ecx_contextt *context, uint16 Slave, uint16 Index, uint8 SubIdx, uint16 ErrorCode)
int ecx_init(ecx_contextt *context, char *ifname)
boolean ecx_iserror(ecx_contextt *context)
int ecx_receive_processdata_group(ecx_contextt *context, uint8 group, int timeout)
int ecx_eeprom2pdi(ecx_contextt *context, uint16 slave)
PACKED_END PACKED_BEGIN struct PACKED ec_state_status
uint32 ec_readeeprom(uint16 slave, uint16 eeproma, int timeout)
void ec_siistring(char *str, uint16 slave, uint16 Sn)
uint16 ec_siiFMMU(uint16 slave, ec_eepromFMMUt *FMMU)
uint64 ecx_readeepromAP(ecx_contextt *context, uint16 aiadr, uint16 eeproma, int timeout)
char desc[EC_MAXLEN_ADAPTERNAME]
uint16 ecx_statecheck(ecx_contextt *context, uint16 slave, uint16 reqstate, int timeout)
int ec_eeprom2pdi(uint16 slave)
int16 ecx_siifind(ecx_contextt *context, uint16 slave, uint16 cat)
PACKED_END PACKED_BEGIN struct PACKED ec_PDOassignt
uint64 ecx_readeepromFP(ecx_contextt *context, uint16 configadr, uint16 eeproma, int timeout)
int ecx_mbxempty(ecx_contextt *context, uint16 slave, int timeout)
PACKED_BEGIN struct PACKED ec_mbxheadert
int ecx_writeeepromFP(ecx_contextt *context, uint16 configadr, uint16 eeproma, uint16 data, int timeout)
int ecx_writestate(ecx_contextt *context, uint16 slave)
static uint8 esibuf[EC_MAXEEPBUF]
int ec_init(char *ifname)
uint32 ecx_readeeprom(ecx_contextt *context, uint16 slave, uint16 eeproma, int timeout)
void ec_pusherror(const ec_errort *Ec)
int ec_eeprom2master(uint16 slave)
void ec_free_adapters(ec_adaptert *adapter)
int ec_siiPDO(uint16 slave, ec_eepromPDOt *PDO, uint8 t)
void ec_packeterror(uint16 Slave, uint16 Index, uint8 SubIdx, uint16 ErrorCode)
void ec_readeeprom1(uint16 slave, uint16 eeproma)
int ecx_writeeeprom(ecx_contextt *context, uint16 slave, uint16 eeproma, uint16 data, int timeout)
uint16 ec_siiSM(uint16 slave, ec_eepromSMt *SM)
int ec_mbxsend(uint16 slave, ec_mbxbuft *mbx, int timeout)
uint32 ec_readeeprom2(uint16 slave, int timeout)
int ecx_readstate(ecx_contextt *context)
ec_adaptert * ec_find_adapters(void)
uint8 ec_nextmbxcnt(uint8 cnt)
int ecx_siiPDO(ecx_contextt *context, uint16 slave, ec_eepromPDOt *PDO, uint8 t)
int16 ec_siifind(uint16 slave, uint16 cat)
void ecx_readeeprom1(ecx_contextt *context, uint16 slave, uint16 eeproma)
PACKED_END PACKED_BEGIN struct PACKED ec_PDOdesct
int ec_mbxempty(uint16 slave, int timeout)
int ec_send_processdata_group(uint8 group)
int ecx_mbxsend(ecx_contextt *context, uint16 slave, ec_mbxbuft *mbx, int timeout)
ec_PDOassignt * PDOassign
int ec_writestate(uint16 slave)
int ec_writeeeprom(uint16 slave, uint16 eeproma, uint16 data, int timeout)
int ecx_eeprom2master(ecx_contextt *context, uint16 slave)
uint64 ec_readeepromAP(uint16 aiadr, uint16 eeproma, int timeout)
uint16 ecx_siiSM(ecx_contextt *context, uint16 slave, ec_eepromSMt *SM)
void ecx_esidump(ecx_contextt *context, uint16 slave, uint8 *esibuf)
int ec_receive_processdata_group(uint8 group, int timeout)
uint16 ec_siiSMnext(uint16 slave, ec_eepromSMt *SM, uint16 n)
void ec_esidump(uint16 slave, uint8 *esibuf)
ec_SMcommtypet * SMcommtype
int ec_writeeepromFP(uint16 configadr, uint16 eeproma, uint16 data, int timeout)
int ecx_send_processdata(ecx_contextt *context)
int ecx_init_redundant(ecx_contextt *context, ecx_redportt *redport, char *ifname, char *if2name)
uint32 ecx_readeeprom2(ecx_contextt *context, uint16 slave, int timeout)
uint16 ec_statecheck(uint16 slave, uint16 reqstate, int timeout)
PACKED_BEGIN struct PACKED ec_fmmut
boolean ecx_poperror(ecx_contextt *context, ec_errort *Ec)
PACKED_END PACKED_BEGIN struct PACKED ec_alstatust
int ec_mbxreceive(uint16 slave, ec_mbxbuft *mbx, int timeout)
uint16 ecx_siiFMMU(ecx_contextt *context, uint16 slave, ec_eepromFMMUt *FMMU)
int ecx_mbxreceive(ecx_contextt *context, uint16 slave, ec_mbxbuft *mbx, int timeout)
PACKED_END PACKED_BEGIN struct PACKED ec_smt
uint8 ecx_siigetbyte(ecx_contextt *context, uint16 slave, uint16 address)
PACKED_BEGIN struct PACKED ec_SMcommtypet
uint8 ec_mbxbuft[EC_MAXMBX+1]