11 #ifndef _ethercatmain_ 12 #define _ethercatmain_ 21 #define EC_MAXELIST 64 25 #define EC_MAXSLAVE 200 29 #define EC_MAXIOSEGMENTS 64 31 #define EC_MAXMBX 1486 33 #define EC_MAXEEPDO 0x200 39 #define EC_MAXLEN_ADAPTERNAME 128 87 #define ECT_MBXPROT_AOE 0x0001 88 #define ECT_MBXPROT_EOE 0x0002 89 #define ECT_MBXPROT_COE 0x0004 90 #define ECT_MBXPROT_FOE 0x0008 91 #define ECT_MBXPROT_SOE 0x0010 92 #define ECT_MBXPROT_VOE 0x0020 94 #define ECT_COEDET_SDO 0x01 95 #define ECT_COEDET_SDOINFO 0x02 96 #define ECT_COEDET_PDOASSIGN 0x04 97 #define ECT_COEDET_PDOCONFIG 0x08 98 #define ECT_COEDET_UPLOAD 0x10 99 #define ECT_COEDET_SDOCA 0x20 101 #define EC_SMENABLEMASK 0xfffeffff 450 int ec_init(
const char * ifname);
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)
PACKED_END PACKED_BEGIN struct PACKED ec_state_status ec_state_status
int ecx_receive_processdata(ecx_contextt *context, int timeout)
char name[EC_MAXLEN_ADAPTERNAME]
uint16 ecx_siiSMnext(ecx_contextt *context, uint16 slave, ec_eepromSMt *SM, uint16 n)
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)
PACKED_BEGIN struct PACKED ec_SMcommtype ec_SMcommtypet
void ec_clearmbx(ec_mbxbuft *Mbx)
int ecx_writeeepromAP(ecx_contextt *context, uint16 aiadr, uint16 eeproma, uint16 data, int timeout)
int ec_init(const char *ifname)
int ecx_init_redundant(ecx_contextt *context, ecx_redportt *redport, const char *ifname, char *if2name)
void ecx_packeterror(ecx_contextt *context, uint16 Slave, uint16 Index, uint8 SubIdx, uint16 ErrorCode)
struct ec_slave ec_slavet
boolean ecx_iserror(ecx_contextt *context)
int ecx_receive_processdata_group(ecx_contextt *context, uint8 group, int timeout)
struct ec_ering ec_eringt
int ecx_eeprom2pdi(ecx_contextt *context, uint16 slave)
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)
int ecx_send_overlap_processdata_group(ecx_contextt *context, uint8 group)
uint64 ecx_readeepromAP(ecx_contextt *context, uint16 aiadr, uint16 eeproma, int timeout)
PACKED_END struct ec_idxstack ec_idxstackT
int ec_init_redundant(const char *ifname, char *if2name)
char desc[EC_MAXLEN_ADAPTERNAME]
uint16 ecx_statecheck(ecx_contextt *context, uint16 slave, uint16 reqstate, int timeout)
int ec_eeprom2pdi(uint16 slave)
PACKED_END PACKED_BEGIN struct PACKED ec_sm ec_smt
int16 ecx_siifind(ecx_contextt *context, uint16 slave, uint16 cat)
uint64 ecx_readeepromFP(ecx_contextt *context, uint16 configadr, uint16 eeproma, int timeout)
int ec_send_overlap_processdata_group(uint8 group)
int ecx_mbxempty(ecx_contextt *context, uint16 slave, int timeout)
int ecx_writeeepromFP(ecx_contextt *context, uint16 configadr, uint16 eeproma, uint16 data, int timeout)
int ecx_writestate(ecx_contextt *context, uint16 slave)
uint32 ecx_readeeprom(ecx_contextt *context, uint16 slave, uint16 eeproma, int timeout)
void ec_pusherror(const ec_errort *Ec)
PACKED_END PACKED_BEGIN struct PACKED ec_PDOassign ec_PDOassignt
int ec_eeprom2master(uint16 slave)
int ec_send_overlap_processdata(void)
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)
PACKED_END PACKED_BEGIN struct PACKED ec_alstatus ec_alstatust
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)
ec_PDOassignt * PDOassign
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)
ec_SMcommtypet * SMcommtype
int ec_mbxempty(uint16 slave, int timeout)
struct ec_group ec_groupt
int ec_send_processdata_group(uint8 group)
int ecx_mbxsend(ecx_contextt *context, uint16 slave, ec_mbxbuft *mbx, int timeout)
PACKED_END PACKED_BEGIN struct PACKED ec_PDOdesc ec_PDOdesct
int ecx_init(ecx_contextt *context, const char *ifname)
int ec_writestate(uint16 slave)
struct ec_eepromSM ec_eepromSMt
PACKED_BEGIN struct PACKED ec_fmmu ec_fmmut
int ec_writeeeprom(uint16 slave, uint16 eeproma, uint16 data, int timeout)
struct ec_eepromFMMU ec_eepromFMMUt
int ecx_eeprom2master(ecx_contextt *context, uint16 slave)
PACKED_BEGIN struct PACKED ec_mbxheader ec_mbxheadert
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)
int ec_writeeepromFP(uint16 configadr, uint16 eeproma, uint16 data, int timeout)
int ecx_send_processdata(ecx_contextt *context)
uint32 ecx_readeeprom2(ecx_contextt *context, uint16 slave, int timeout)
static uint8 esibuf[EC_MAXEEPBUF]
uint16 ec_statecheck(uint16 slave, uint16 reqstate, int timeout)
boolean ecx_poperror(ecx_contextt *context, ec_errort *Ec)
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)
uint8 ecx_siigetbyte(ecx_contextt *context, uint16 slave, uint16 address)
int ecx_send_overlap_processdata(ecx_contextt *context)
uint8 ec_mbxbuft[EC_MAXMBX+1]
struct ec_eepromPDO ec_eepromPDOt