ethercatmain.h
Go to the documentation of this file.
1 /*
2  * Licensed under the GNU General Public License version 2 with exceptions. See
3  * LICENSE file in the project root for full license information
4  */
5 
11 #ifndef _ethercatmain_
12 #define _ethercatmain_
13 
14 
15 #ifdef __cplusplus
16 extern "C"
17 {
18 #endif
19 
21 #define EC_MAXELIST 64
22 
23 #define EC_MAXNAME 40
24 
25 #define EC_MAXSLAVE 200
26 
27 #define EC_MAXGROUP 2
28 
29 #define EC_MAXIOSEGMENTS 64
30 
31 #define EC_MAXMBX 1486
32 
33 #define EC_MAXEEPDO 0x200
34 
35 #define EC_MAXSM 8
36 
37 #define EC_MAXFMMU 4
38 
39 #define EC_MAXLEN_ADAPTERNAME 128
40 
41 #define EC_MAX_MAPT 1
42 
43 typedef struct ec_adapter ec_adaptert;
44 struct ec_adapter
45 {
49 };
50 
53 typedef struct PACKED ec_fmmu
54 {
65 } ec_fmmut;
67 
70 typedef struct PACKED ec_sm
71 {
75 } ec_smt;
77 
79 typedef struct PACKED ec_state_status
80 {
86 
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
93 
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
100 
101 #define EC_SMENABLEMASK 0xfffeffff
102 
103 typedef struct ecx_context ecx_contextt;
104 
106 typedef struct ec_slave
107 {
169  boolean hasdc;
229  boolean islost;
233  int (*PO2SOconfigx)(ecx_contextt * context, uint16 slave);
235  char name[EC_MAXNAME + 1];
236 } ec_slavet;
237 
239 typedef struct ec_group
240 {
252  boolean hasdc;
270  boolean docheckstate;
273 } ec_groupt;
274 
276 typedef struct ec_eepromFMMU
277 {
285 
287 typedef struct ec_eepromSM
288 {
294  uint8 Sreg; /* don't care */
296  uint8 PDIctrl; /* don't care */
297 } ec_eepromSMt;
298 
300 typedef struct ec_eepromPDO
301 {
309 } ec_eepromPDOt;
310 
313 
316 typedef struct PACKED ec_mbxheader
317 {
322 } ec_mbxheadert;
324 
327 typedef struct PACKED ec_alstatus
328 {
332 } ec_alstatust;
334 
336 typedef struct ec_idxstack
337 {
341  void *data[EC_MAXBUF];
343 } ec_idxstackT;
344 
346 typedef struct ec_ering
347 {
351 } ec_eringt;
352 
355 typedef struct PACKED ec_SMcommtype
356 {
359  uint8 SMtype[EC_MAXSM];
362 
365 typedef struct PACKED ec_PDOassign
366 {
369  uint16 index[256];
370 } ec_PDOassignt;
372 
375 typedef struct PACKED ec_PDOdesc
376 {
379  uint32 PDO[256];
380 } ec_PDOdesct;
382 
385 {
393  int maxslave;
397  int maxgroup;
409  boolean *ecaterror;
427  int (*FOEhook)(uint16 slave, int packetnumber, int datasize);
429  int (*EOEhook)(ecx_contextt * context, uint16 slave, void * eoembx);
432 };
433 
434 #ifdef EC_VER1
435 
440 extern int ec_slavecount;
443 extern boolean EcatError;
444 extern int64 ec_DCtime;
445 
446 void ec_pusherror(const ec_errort *Ec);
447 boolean ec_poperror(ec_errort *Ec);
448 boolean ec_iserror(void);
449 void ec_packeterror(uint16 Slave, uint16 Index, uint8 SubIdx, uint16 ErrorCode);
450 int ec_init(const char * ifname);
451 int ec_init_redundant(const char *ifname, char *if2name);
452 void ec_close(void);
455 void ec_siistring(char *str, uint16 slave, uint16 Sn);
460 int ec_readstate(void);
462 uint16 ec_statecheck(uint16 slave, uint16 reqstate, int timeout);
463 int ec_mbxempty(uint16 slave, int timeout);
464 int ec_mbxsend(uint16 slave,ec_mbxbuft *mbx, int timeout);
465 int ec_mbxreceive(uint16 slave, ec_mbxbuft *mbx, int timeout);
467 uint32 ec_readeeprom(uint16 slave, uint16 eeproma, int timeout);
468 int ec_writeeeprom(uint16 slave, uint16 eeproma, uint16 data, int timeout);
471 uint64 ec_readeepromAP(uint16 aiadr, uint16 eeproma, int timeout);
472 int ec_writeeepromAP(uint16 aiadr, uint16 eeproma, uint16 data, int timeout);
473 uint64 ec_readeepromFP(uint16 configadr, uint16 eeproma, int timeout);
474 int ec_writeeepromFP(uint16 configadr, uint16 eeproma, uint16 data, int timeout);
475 void ec_readeeprom1(uint16 slave, uint16 eeproma);
476 uint32 ec_readeeprom2(uint16 slave, int timeout);
479 int ec_receive_processdata_group(uint8 group, int timeout);
480 int ec_send_processdata(void);
482 int ec_receive_processdata(int timeout);
483 #endif
484 
486 void ec_free_adapters(ec_adaptert * adapter);
488 void ec_clearmbx(ec_mbxbuft *Mbx);
489 void ecx_pusherror(ecx_contextt *context, const ec_errort *Ec);
490 boolean ecx_poperror(ecx_contextt *context, ec_errort *Ec);
491 boolean ecx_iserror(ecx_contextt *context);
492 void ecx_packeterror(ecx_contextt *context, uint16 Slave, uint16 Index, uint8 SubIdx, uint16 ErrorCode);
493 int ecx_init(ecx_contextt *context, const char * ifname);
494 int ecx_init_redundant(ecx_contextt *context, ecx_redportt *redport, const char *ifname, char *if2name);
495 void ecx_close(ecx_contextt *context);
496 uint8 ecx_siigetbyte(ecx_contextt *context, uint16 slave, uint16 address);
498 void ecx_siistring(ecx_contextt *context, char *str, uint16 slave, uint16 Sn);
502 int ecx_siiPDO(ecx_contextt *context, uint16 slave, ec_eepromPDOt* PDO, uint8 t);
503 int ecx_readstate(ecx_contextt *context);
504 int ecx_writestate(ecx_contextt *context, uint16 slave);
505 uint16 ecx_statecheck(ecx_contextt *context, uint16 slave, uint16 reqstate, int timeout);
506 int ecx_mbxempty(ecx_contextt *context, uint16 slave, int timeout);
507 int ecx_mbxsend(ecx_contextt *context, uint16 slave,ec_mbxbuft *mbx, int timeout);
508 int ecx_mbxreceive(ecx_contextt *context, uint16 slave, ec_mbxbuft *mbx, int timeout);
509 void ecx_esidump(ecx_contextt *context, uint16 slave, uint8 *esibuf);
510 uint32 ecx_readeeprom(ecx_contextt *context, uint16 slave, uint16 eeproma, int timeout);
511 int ecx_writeeeprom(ecx_contextt *context, uint16 slave, uint16 eeproma, uint16 data, int timeout);
513 int ecx_eeprom2pdi(ecx_contextt *context, uint16 slave);
514 uint64 ecx_readeepromAP(ecx_contextt *context, uint16 aiadr, uint16 eeproma, int timeout);
515 int ecx_writeeepromAP(ecx_contextt *context, uint16 aiadr, uint16 eeproma, uint16 data, int timeout);
516 uint64 ecx_readeepromFP(ecx_contextt *context, uint16 configadr, uint16 eeproma, int timeout);
517 int ecx_writeeepromFP(ecx_contextt *context, uint16 configadr, uint16 eeproma, uint16 data, int timeout);
518 void ecx_readeeprom1(ecx_contextt *context, uint16 slave, uint16 eeproma);
519 uint32 ecx_readeeprom2(ecx_contextt *context, uint16 slave, int timeout);
521 int ecx_receive_processdata_group(ecx_contextt *context, uint8 group, int timeout);
522 int ecx_send_processdata(ecx_contextt *context);
524 int ecx_receive_processdata(ecx_contextt *context, int timeout);
525 int ecx_send_processdata_group(ecx_contextt *context, uint8 group);
526 
527 #ifdef __cplusplus
528 }
529 #endif
530 
531 #endif
ec_slave::eep_8byte
uint8 eep_8byte
Definition: ethercatmain.h:209
ec_group::blockLRW
uint8 blockLRW
Definition: ethercatmain.h:258
ec_fmmu::LogLength
uint16 LogLength
Definition: ethercatmain.h:56
ec_ering::Error
ec_errort Error[EC_MAXELIST+1]
Definition: ethercatmain.h:350
ec_group::Ioffset
uint16 Ioffset
Definition: ethercatmain.h:264
slave
int slave
Definition: aliastool.c:44
ecx_siiFMMU
uint16 ecx_siiFMMU(ecx_contextt *context, uint16 slave, ec_eepromFMMUt *FMMU)
Definition: ethercatmain.c:503
ec_SMcommtype::n
uint8 n
Definition: ethercatmain.h:357
ec_fmmut
PACKED_BEGIN struct PACKED ec_fmmu ec_fmmut
ec_SMcommtype
Definition: ethercatmain.h:355
ec_slave::mbx_ro
uint16 mbx_ro
Definition: ethercatmain.h:163
ec_slave::mbx_cnt
uint8 mbx_cnt
Definition: ethercatmain.h:167
ec_slave::ALstatuscode
uint16 ALstatuscode
Definition: ethercatmain.h:111
EC_MAXLEN_ADAPTERNAME
#define EC_MAXLEN_ADAPTERNAME
Definition: ethercatmain.h:39
ec_mbxreceive
int ec_mbxreceive(uint16 slave, ec_mbxbuft *mbx, int timeout)
Definition: ethercatmain.c:2198
ec_send_overlap_processdata_group
int ec_send_overlap_processdata_group(uint8 group)
Definition: ethercatmain.c:2364
ec_eepromFMMU::FMMU1
uint8 FMMU1
Definition: ethercatmain.h:281
ec_idxstack::pulled
uint8 pulled
Definition: ethercatmain.h:339
ec_slave::PO2SOconfig
int(* PO2SOconfig)(uint16 slave)
Definition: ethercatmain.h:231
ecx_mbxempty
int ecx_mbxempty(ecx_contextt *context, uint16 slave, int timeout)
Definition: ethercatmain.c:932
ec_slave::islost
boolean islost
Definition: ethercatmain.h:229
ecx_writestate
int ecx_writestate(ecx_contextt *context, uint16 slave)
Definition: ethercatmain.c:832
ec_readstate
int ec_readstate(void)
Definition: ethercatmain.c:2138
ec_mbxheader::address
uint16 address
Definition: ethercatmain.h:319
ecx_send_overlap_processdata
int ecx_send_overlap_processdata(ecx_contextt *context)
Definition: ethercatmain.c:1993
ec_smt
PACKED_END PACKED_BEGIN struct PACKED ec_sm ec_smt
ec_slave::consumedports
uint8 consumedports
Definition: ethercatmain.h:177
ecx_context::EOEhook
int(* EOEhook)(ecx_contextt *context, uint16 slave, void *eoembx)
Definition: ethercatmain.h:429
ec_readeepromFP
uint64 ec_readeepromFP(uint16 configadr, uint16 eeproma, int timeout)
Definition: ethercatmain.c:2294
ecx_context::ecaterror
boolean * ecaterror
Definition: ethercatmain.h:409
ec_close
void ec_close(void)
Definition: ethercatmain.c:2048
EC_MAXSM
#define EC_MAXSM
Definition: ethercatmain.h:35
ecx_readeepromAP
uint64 ecx_readeepromAP(ecx_contextt *context, uint16 aiadr, uint16 eeproma, int timeout)
Definition: ethercatmain.c:1275
ec_init_redundant
int ec_init_redundant(const char *ifname, char *if2name)
Definition: ethercatmain.c:2040
ecx_context::DCl
uint16 DCl
Definition: ethercatmain.h:413
ecx_writeeepromAP
int ecx_writeeepromAP(ecx_contextt *context, uint16 aiadr, uint16 eeproma, uint16 data, int timeout)
Definition: ethercatmain.c:1355
ec_eeprom2master
int ec_eeprom2master(uint16 slave)
Definition: ethercatmain.c:2243
ec_slave::inputs
uint8 * inputs
Definition: ethercatmain.h:139
ec_mbxbuft
uint8 ec_mbxbuft[EC_MAXMBX+1]
Definition: ethercatmain.h:312
ec_slave::outputs
uint8 * outputs
Definition: ethercatmain.h:131
ec_siiSMnext
uint16 ec_siiSMnext(uint16 slave, ec_eepromSMt *SM, uint16 n)
Definition: ethercatmain.c:2117
ecx_siistring
void ecx_siistring(ecx_contextt *context, char *str, uint16 slave, uint16 Sn)
Definition: ethercatmain.c:445
ec_fmmu::unused2
uint16 unused2
Definition: ethercatmain.h:64
ec_send_processdata
int ec_send_processdata(void)
Definition: ethercatmain.c:2383
ec_group::outputs
uint8 * outputs
Definition: ethercatmain.h:246
ec_slave::topology
uint8 topology
Definition: ethercatmain.h:173
ec_adapter
Definition: ethercatmain.h:44
ecx_readeeprom2
uint32 ecx_readeeprom2(ecx_contextt *context, uint16 slave, int timeout)
Definition: ethercatmain.c:1618
ec_slave::Ebuscurrent
int16 Ebuscurrent
Definition: ethercatmain.h:221
ecx_context::DCtO
uint16 DCtO
Definition: ethercatmain.h:411
ec_eepromSM::Activate
uint8 Activate
Definition: ethercatmain.h:295
data
uint32 data
Definition: linux/firm_update/firm_update.c:27
EC_MAXBUF
#define EC_MAXBUF
Definition: ethercattype.h:62
ec_slave::Dtype
uint16 Dtype
Definition: ethercatmain.h:125
ec_group::DCnext
uint16 DCnext
Definition: ethercatmain.h:254
ec_eepromSMt
struct ec_eepromSM ec_eepromSMt
ecx_readeepromFP
uint64 ecx_readeepromFP(ecx_contextt *context, uint16 configadr, uint16 eeproma, int timeout)
Definition: ethercatmain.c:1444
uint32
uint32_t uint32
Definition: osal.h:30
ec_slave::DCrtA
int32 DCrtA
Definition: ethercatmain.h:185
ec_init
int ec_init(const char *ifname)
Definition: ethercatmain.c:2029
ec_slave::ptype
uint8 ptype
Definition: ethercatmain.h:171
ec_group::nsegments
uint16 nsegments
Definition: ethercatmain.h:260
EC_MAXEEPDO
#define EC_MAXEEPDO
Definition: ethercatmain.h:33
ec_state_status::ALstatuscode
uint16 ALstatuscode
Definition: ethercatmain.h:83
ec_readeeprom
uint32 ec_readeeprom(uint16 slave, uint16 eeproma, int timeout)
Definition: ethercatmain.c:2220
ecx_readstate
int ecx_readstate(ecx_contextt *context)
Definition: ethercatmain.c:723
ec_clearmbx
void ec_clearmbx(ec_mbxbuft *Mbx)
Definition: ethercatmain.c:921
ec_ering::tail
int16 tail
Definition: ethercatmain.h:349
ec_group
Definition: ethercatmain.h:239
ecx_context::port
ecx_portt * port
Definition: ethercatmain.h:387
ec_slave::Istartbit
uint8 Istartbit
Definition: ethercatmain.h:141
ecx_context::PDOdesc
ec_PDOdesct * PDOdesc
Definition: ethercatmain.h:421
int16
int16_t int16
Definition: osal.h:26
ec_mbxsend
int ec_mbxsend(uint16 slave, ec_mbxbuft *mbx, int timeout)
Definition: ethercatmain.c:2185
EC_MAXGROUP
#define EC_MAXGROUP
Definition: ethercatmain.h:27
ecx_close
void ecx_close(ecx_contextt *context)
Definition: ethercatmain.c:321
int64
int64_t int64
Definition: osal.h:31
ec_slave::Ostartbit
uint8 Ostartbit
Definition: ethercatmain.h:133
EC_MAXFMMU
#define EC_MAXFMMU
Definition: ethercatmain.h:37
ec_slave::CoEdetails
uint8 CoEdetails
Definition: ethercatmain.h:213
ec_eepromPDO::Startpos
uint16 Startpos
Definition: ethercatmain.h:302
ec_slave::Ibytes
uint32 Ibytes
Definition: ethercatmain.h:137
ec_slave::group
uint8 group
Definition: ethercatmain.h:225
ec_adapter::next
ec_adaptert * next
Definition: ethercatmain.h:48
ec_fmmu
Definition: ethercatmain.h:53
ec_group::outputsWKC
uint16 outputsWKC
Definition: ethercatmain.h:266
ec_packeterror
void ec_packeterror(uint16 Slave, uint16 Index, uint8 SubIdx, uint16 ErrorCode)
Definition: ethercatmain.c:2019
ec_iserror
boolean ec_iserror(void)
Definition: ethercatmain.c:2014
ec_fmmu::LogEndbit
uint8 LogEndbit
Definition: ethercatmain.h:58
ec_fmmu::unused1
uint8 unused1
Definition: ethercatmain.h:63
ec_alstatus
Definition: ethercatmain.h:327
ec_mbxempty
int ec_mbxempty(uint16 slave, int timeout)
Definition: ethercatmain.c:2173
ec_slave::parentport
uint8 parentport
Definition: ethercatmain.h:181
ec_adapter::desc
char desc[EC_MAXLEN_ADAPTERNAME]
Definition: ethercatmain.h:47
ec_fmmu::FMMUtype
uint8 FMMUtype
Definition: ethercatmain.h:61
ec_slave::SIIindex
uint16 SIIindex
Definition: ethercatmain.h:207
ec_idxstack::pushed
uint8 pushed
Definition: ethercatmain.h:338
ec_eepromSM::Creg
uint8 Creg
Definition: ethercatmain.h:293
ec_mbxheader::mbxtype
uint8 mbxtype
Definition: ethercatmain.h:321
ec_PDOassign::n
uint8 n
Definition: ethercatmain.h:367
ec_mbxheadert
PACKED_BEGIN struct PACKED ec_mbxheader ec_mbxheadert
ec_fmmu::PhysStartBit
uint8 PhysStartBit
Definition: ethercatmain.h:60
ecx_eeprom2pdi
int ecx_eeprom2pdi(ecx_contextt *context, uint16 slave)
Definition: ethercatmain.c:1222
ec_slave::DCrtC
int32 DCrtC
Definition: ethercatmain.h:189
ec_fmmu::FMMUactive
uint8 FMMUactive
Definition: ethercatmain.h:62
ec_group::Ebuscurrent
int16 Ebuscurrent
Definition: ethercatmain.h:256
ec_slave::DCshift
int32 DCshift
Definition: ethercatmain.h:201
ecx_context::esibuf
uint8 * esibuf
Definition: ethercatmain.h:399
ecx_context::DCtime
int64 * DCtime
Definition: ethercatmain.h:415
int32
int32_t int32
Definition: osal.h:27
ec_mbxheader
Definition: ethercatmain.h:316
ecx_context::eepSM
ec_eepromSMt * eepSM
Definition: ethercatmain.h:423
ec_slave::FMMU2func
uint8 FMMU2func
Definition: ethercatmain.h:153
ec_sm::SMlength
uint16 SMlength
Definition: ethercatmain.h:73
ec_DCtime
int64 ec_DCtime
Definition: ethercatmain.c:95
uint8
uint8_t uint8
Definition: osal.h:28
ecx_receive_processdata_group
int ecx_receive_processdata_group(ecx_contextt *context, uint8 group, int timeout)
Definition: ethercatmain.c:1910
uint64
uint64_t uint64
Definition: osal.h:32
ecx_init
int ecx_init(ecx_contextt *context, const char *ifname)
Definition: ethercatmain.c:288
ecx_siigetbyte
uint8 ecx_siigetbyte(ecx_contextt *context, uint16 slave, uint16 address)
Definition: ethercatmain.c:334
ec_slave::eep_rev
uint32 eep_rev
Definition: ethercatmain.h:121
ec_slave::DCcycle
int32 DCcycle
Definition: ethercatmain.h:199
PACKED_END
#define PACKED_END
Definition: erika/osal_defs.h:30
ec_siifind
int16 ec_siifind(uint16 slave, uint16 cat)
Definition: ethercatmain.c:2072
ec_PDOdesc::n
uint8 n
Definition: ethercatmain.h:377
ec_slave::mbx_wo
uint16 mbx_wo
Definition: ethercatmain.h:159
ec_slave::eep_pdi
uint8 eep_pdi
Definition: ethercatmain.h:211
ecx_context::manualstatechange
int manualstatechange
Definition: ethercatmain.h:431
EC_MAXNAME
#define EC_MAXNAME
Definition: ethercatmain.h:23
ec_slave::parent
uint16 parent
Definition: ethercatmain.h:179
PACKED_BEGIN
#define PACKED_BEGIN
Definition: erika/osal_defs.h:28
ecx_statecheck
uint16 ecx_statecheck(ecx_contextt *context, uint16 slave, uint16 reqstate, int timeout)
Definition: ethercatmain.c:862
ec_slave::state
uint16 state
Definition: ethercatmain.h:109
ec_group::IOsegment
uint32 IOsegment[EC_MAXIOSEGMENTS]
Definition: ethercatmain.h:272
ec_PDOdesc::nu1
uint8 nu1
Definition: ethercatmain.h:378
ecx_eeprom2master
int ecx_eeprom2master(ecx_contextt *context, uint16 slave)
Definition: ethercatmain.c:1189
ec_siigetbyte
uint8 ec_siigetbyte(uint16 slave, uint16 address)
Definition: ethercatmain.c:2061
ecx_context::esimap
uint32 * esimap
Definition: ethercatmain.h:401
ec_slave::aliasadr
uint16 aliasadr
Definition: ethercatmain.h:115
ec_slave::Obits
uint16 Obits
Definition: ethercatmain.h:127
EC_MAXMBX
#define EC_MAXMBX
Definition: ethercatmain.h:31
ec_SMcommtypet
PACKED_BEGIN struct PACKED ec_SMcommtype ec_SMcommtypet
ecx_init_redundant
int ecx_init_redundant(ecx_contextt *context, ecx_redportt *redport, const char *ifname, char *if2name)
Definition: ethercatmain.c:300
ec_siiFMMU
uint16 ec_siiFMMU(uint16 slave, ec_eepromFMMUt *FMMU)
Definition: ethercatmain.c:2094
PACKED::index
uint8 index
Definition: ethercattype.h:114
PACKED
Definition: ethercatcoe.c:24
ec_slave::PO2SOconfigx
int(* PO2SOconfigx)(ecx_contextt *context, uint16 slave)
Definition: ethercatmain.h:233
ec_PDOdesc
Definition: ethercatmain.h:375
ec_slave::eep_id
uint32 eep_id
Definition: ethercatmain.h:119
ec_PDOdesct
PACKED_END PACKED_BEGIN struct PACKED ec_PDOdesc ec_PDOdesct
ec_group::logstartaddr
uint32 logstartaddr
Definition: ethercatmain.h:242
ecx_writeeepromFP
int ecx_writeeepromFP(ecx_contextt *context, uint16 configadr, uint16 eeproma, uint16 data, int timeout)
Definition: ethercatmain.c:1524
ec_eepromSM
Definition: ethercatmain.h:287
ecx_iserror
boolean ecx_iserror(ecx_contextt *context)
Definition: ethercatmain.c:206
ec_slave::FoEdetails
uint8 FoEdetails
Definition: ethercatmain.h:215
ec_group::docheckstate
boolean docheckstate
Definition: ethercatmain.h:270
ec_fmmu::PhysStart
uint16 PhysStart
Definition: ethercatmain.h:59
ec_esidump
void ec_esidump(uint16 slave, uint8 *esibuf)
Definition: ethercatmain.c:2208
ec_slave::Itype
uint16 Itype
Definition: ethercatmain.h:123
ecx_readeeprom
uint32 ecx_readeeprom(ecx_contextt *context, uint16 slave, uint16 eeproma, int timeout)
Definition: ethercatmain.c:1157
ec_nextmbxcnt
uint8 ec_nextmbxcnt(uint8 cnt)
Definition: ethercatmain.c:907
ec_group::inputsWKC
uint16 inputsWKC
Definition: ethercatmain.h:268
ec_find_adapters
ec_adaptert * ec_find_adapters(void)
Definition: ethercatmain.c:131
ec_eepromPDO::nPDO
uint16 nPDO
Definition: ethercatmain.h:304
ec_eepromSM::Sreg
uint8 Sreg
Definition: ethercatmain.h:294
ec_state_status
Definition: ethercatmain.h:79
ec_slave::configadr
uint16 configadr
Definition: ethercatmain.h:113
ec_siiPDO
int ec_siiPDO(uint16 slave, ec_eepromPDOt *PDO, uint8 t)
Definition: ethercatmain.c:2129
ec_slave::mbx_proto
uint16 mbx_proto
Definition: ethercatmain.h:165
ec_mbxheader::length
uint16 length
Definition: ethercatmain.h:318
ecx_send_processdata_group
int ecx_send_processdata_group(ecx_contextt *context, uint8 group)
Definition: ethercatmain.c:1896
ec_groupt
struct ec_group ec_groupt
ec_slave::blockLRW
uint8 blockLRW
Definition: ethercatmain.h:223
ec_fmmu::LogStart
uint32 LogStart
Definition: ethercatmain.h:55
ec_mbxheader::priority
uint8 priority
Definition: ethercatmain.h:320
ec_eepromFMMU::Startpos
uint16 Startpos
Definition: ethercatmain.h:278
ec_eepromPDO::SyncM
uint16 SyncM[EC_MAXEEPDO]
Definition: ethercatmain.h:306
ec_PDOassign::nu1
uint8 nu1
Definition: ethercatmain.h:368
ec_errort
Definition: ethercattype.h:478
ec_eepromSM::Startpos
uint16 Startpos
Definition: ethercatmain.h:289
ec_slave::configindex
uint16 configindex
Definition: ethercatmain.h:205
ecx_siiSMnext
uint16 ecx_siiSMnext(ecx_contextt *context, uint16 slave, ec_eepromSMt *SM, uint16 n)
Definition: ethercatmain.c:580
uint16
uint16_t uint16
Definition: osal.h:29
ec_group::Ibytes
uint32 Ibytes
Definition: ethercatmain.h:248
ec_eepromSM::Plength
uint16 Plength
Definition: ethercatmain.h:292
ec_siiSM
uint16 ec_siiSM(uint16 slave, ec_eepromSMt *SM)
Definition: ethercatmain.c:2105
ec_idxstack::data
void * data[EC_MAXBUF]
Definition: ethercatmain.h:341
ec_sm::SMflags
uint32 SMflags
Definition: ethercatmain.h:74
ec_eepromSM::PDIctrl
uint8 PDIctrl
Definition: ethercatmain.h:296
ecx_readeeprom1
void ecx_readeeprom1(ecx_contextt *context, uint16 slave, uint16 eeproma)
Definition: ethercatmain.c:1585
ec_writeeeprom
int ec_writeeeprom(uint16 slave, uint16 eeproma, uint16 data, int timeout)
Definition: ethercatmain.c:2233
ec_slave::SoEdetails
uint8 SoEdetails
Definition: ethercatmain.h:219
ec_eepromFMMU
Definition: ethercatmain.h:276
ec_slave::FMMU
ec_fmmut FMMU[EC_MAXFMMU]
Definition: ethercatmain.h:147
ec_slave::name
char name[EC_MAXNAME+1]
Definition: ethercatmain.h:235
ec_ering
Definition: ethercatmain.h:346
ec_send_processdata_group
int ec_send_processdata_group(uint8 group)
Definition: ethercatmain.c:2347
ec_group::inputs
uint8 * inputs
Definition: ethercatmain.h:250
EC_MAXIOSEGMENTS
#define EC_MAXIOSEGMENTS
Definition: ethercatmain.h:29
ecx_context::grouplist
ec_groupt * grouplist
Definition: ethercatmain.h:395
EC_MAXELIST
#define EC_MAXELIST
Definition: ethercatmain.h:21
ec_slavet
struct ec_slave ec_slavet
ec_slave::Ibits
uint16 Ibits
Definition: ethercatmain.h:135
ec_readeeprom2
uint32 ec_readeeprom2(uint16 slave, int timeout)
Definition: ethercatmain.c:2330
ec_ering::head
int16 head
Definition: ethercatmain.h:348
ec_pusherror
void ec_pusherror(const ec_errort *Ec)
Definition: ethercatmain.c:2004
ecx_context::elist
ec_eringt * elist
Definition: ethercatmain.h:405
ec_eepromFMMU::FMMU3
uint8 FMMU3
Definition: ethercatmain.h:283
ecx_context::SMcommtype
ec_SMcommtypet * SMcommtype
Definition: ethercatmain.h:417
ecx_context::eepFMMU
ec_eepromFMMUt * eepFMMU
Definition: ethercatmain.h:425
ec_readeepromAP
uint64 ec_readeepromAP(uint16 aiadr, uint16 eeproma, int timeout)
Definition: ethercatmain.c:2264
ec_slave::DCrtB
int32 DCrtB
Definition: ethercatmain.h:187
ec_send_overlap_processdata
int ec_send_overlap_processdata(void)
Definition: ethercatmain.c:2388
ecx_context::slavelist
ec_slavet * slavelist
Definition: ethercatmain.h:389
ec_SMcommtype::nu1
uint8 nu1
Definition: ethercatmain.h:358
ec_alstatust
PACKED_END PACKED_BEGIN struct PACKED ec_alstatus ec_alstatust
ecx_context
ecx_contextt ecx_context
Definition: ethercatmain.c:100
ecx_esidump
void ecx_esidump(ecx_contextt *context, uint16 slave, uint8 *esibuf)
Definition: ethercatmain.c:1114
ec_slave::SMtype
uint8 SMtype[EC_MAXSM]
Definition: ethercatmain.h:145
ecx_writeeeprom
int ecx_writeeeprom(ecx_contextt *context, uint16 slave, uint16 eeproma, uint16 data, int timeout)
Definition: ethercatmain.c:1175
ec_slave::EoEdetails
uint8 EoEdetails
Definition: ethercatmain.h:217
ec_writestate
int ec_writestate(uint16 slave)
Definition: ethercatmain.c:2149
ec_eeprom2pdi
int ec_eeprom2pdi(uint16 slave)
Definition: ethercatmain.c:2248
ec_fmmu::LogStartbit
uint8 LogStartbit
Definition: ethercatmain.h:57
ec_slave::FMMU1func
uint8 FMMU1func
Definition: ethercatmain.h:151
ec_receive_processdata_group
int ec_receive_processdata_group(uint8 group, int timeout)
Definition: ethercatmain.c:2378
ecx_portt
Definition: erika/nicdrv.h:53
ecx_mbxsend
int ecx_mbxsend(ecx_contextt *context, uint16 slave, ec_mbxbuft *mbx, int timeout)
Definition: ethercatmain.c:968
ec_eepromFMMUt
struct ec_eepromFMMU ec_eepromFMMUt
ec_slave
Definition: ethercatmain.h:106
ecx_context::esislave
uint16 esislave
Definition: ethercatmain.h:403
ec_slave::hasdc
boolean hasdc
Definition: ethercatmain.h:169
ec_siistring
void ec_siistring(char *str, uint16 slave, uint16 Sn)
Definition: ethercatmain.c:2083
ec_eepromPDO::BitSize
uint16 BitSize[EC_MAXEEPDO]
Definition: ethercatmain.h:307
ecx_context
Definition: ethercatmain.h:384
ecx_send_overlap_processdata_group
int ecx_send_overlap_processdata_group(ecx_contextt *context, uint8 group)
Definition: ethercatmain.c:1879
ec_writeeepromFP
int ec_writeeepromFP(uint16 configadr, uint16 eeproma, uint16 data, int timeout)
Definition: ethercatmain.c:2307
ec_idxstack
Definition: ethercatmain.h:336
ec_writeeepromAP
int ec_writeeepromAP(uint16 aiadr, uint16 eeproma, uint16 data, int timeout)
Definition: ethercatmain.c:2277
ec_idxstackT
PACKED_END struct ec_idxstack ec_idxstackT
ec_slave::entryport
uint8 entryport
Definition: ethercatmain.h:183
ec_slave::DCprevious
uint16 DCprevious
Definition: ethercatmain.h:197
ec_poperror
boolean ec_poperror(ec_errort *Ec)
Definition: ethercatmain.c:2009
ec_eepromFMMU::FMMU2
uint8 FMMU2
Definition: ethercatmain.h:282
ec_readeeprom1
void ec_readeeprom1(uint16 slave, uint16 eeproma)
Definition: ethercatmain.c:2318
ecx_poperror
boolean ecx_poperror(ecx_contextt *context, ec_errort *Ec)
Definition: ethercatmain.c:180
ec_free_adapters
void ec_free_adapters(ec_adaptert *adapter)
Definition: ethercatmain.c:144
esibuf
static uint8 esibuf[EC_MAXEEPBUF]
Definition: ec_master.c:60
ecx_context::FOEhook
int(* FOEhook)(uint16 slave, int packetnumber, int datasize)
Definition: ethercatmain.h:427
ec_slavecount
int ec_slavecount
Definition: ethercatmain.c:69
ec_eepromPDO::SMbitsize
uint16 SMbitsize[EC_MAXSM]
Definition: ethercatmain.h:308
ecx_context::slavecount
int * slavecount
Definition: ethercatmain.h:391
ecx_siifind
int16 ecx_siifind(ecx_contextt *context, uint16 slave, uint16 cat)
Definition: ethercatmain.c:405
ec_idxstack::length
uint16 length[EC_MAXBUF]
Definition: ethercatmain.h:342
ec_state_status::State
uint16 State
Definition: ethercatmain.h:81
ec_slave::eep_man
uint32 eep_man
Definition: ethercatmain.h:117
ec_slave::FMMU0func
uint8 FMMU0func
Definition: ethercatmain.h:149
ec_group::Obytes
uint32 Obytes
Definition: ethercatmain.h:244
ecx_context::PDOassign
ec_PDOassignt * PDOassign
Definition: ethercatmain.h:419
ec_alstatus::alstatus
uint16 alstatus
Definition: ethercatmain.h:329
ec_eringt
struct ec_ering ec_eringt
ecx_context::maxslave
int maxslave
Definition: ethercatmain.h:393
ec_slave::FMMU3func
uint8 FMMU3func
Definition: ethercatmain.h:155
ec_slave::DCnext
uint16 DCnext
Definition: ethercatmain.h:195
ec_slave::DCactive
uint8 DCactive
Definition: ethercatmain.h:203
ecx_pusherror
void ecx_pusherror(ecx_contextt *context, const ec_errort *Ec)
Definition: ethercatmain.c:154
ecx_receive_processdata
int ecx_receive_processdata(ecx_contextt *context, int timeout)
Definition: ethercatmain.c:1998
ec_statecheck
uint16 ec_statecheck(uint16 slave, uint16 reqstate, int timeout)
Definition: ethercatmain.c:2162
ec_slave::pdelay
int32 pdelay
Definition: ethercatmain.h:193
ec_slave::activeports
uint8 activeports
Definition: ethercatmain.h:175
ec_slave::DCrtD
int32 DCrtD
Definition: ethercatmain.h:191
ec_receive_processdata
int ec_receive_processdata(int timeout)
Definition: ethercatmain.c:2393
ec_state_status::Unused
uint16 Unused
Definition: ethercatmain.h:82
ec_group::hasdc
boolean hasdc
Definition: ethercatmain.h:252
ec_eepromPDO::Index
uint16 Index[EC_MAXEEPDO]
Definition: ethercatmain.h:305
ec_eepromFMMU::nFMMU
uint8 nFMMU
Definition: ethercatmain.h:279
ec_PDOassign
Definition: ethercatmain.h:365
ec_sm::StartAddr
uint16 StartAddr
Definition: ethercatmain.h:72
ec_adapter::name
char name[EC_MAXLEN_ADAPTERNAME]
Definition: ethercatmain.h:46
ecx_send_processdata
int ecx_send_processdata(ecx_contextt *context)
Definition: ethercatmain.c:1988
ecx_packeterror
void ecx_packeterror(ecx_contextt *context, uint16 Slave, uint16 Index, uint8 SubIdx, uint16 ErrorCode)
Definition: ethercatmain.c:219
ec_sm
Definition: ethercatmain.h:70
ec_idxstack::idx
uint8 idx[EC_MAXBUF]
Definition: ethercatmain.h:340
ecx_context::idxstack
ec_idxstackT * idxstack
Definition: ethercatmain.h:407
ec_slave::mbx_l
uint16 mbx_l
Definition: ethercatmain.h:157
ec_slave::Obytes
uint32 Obytes
Definition: ethercatmain.h:129
ec_PDOassignt
PACKED_END PACKED_BEGIN struct PACKED ec_PDOassign ec_PDOassignt
ec_eepromSM::nSM
uint8 nSM
Definition: ethercatmain.h:290
ec_slave::mbx_rl
uint16 mbx_rl
Definition: ethercatmain.h:161
ec_state_status
PACKED_END PACKED_BEGIN struct PACKED ec_state_status ec_state_status
ec_eepromPDOt
struct ec_eepromPDO ec_eepromPDOt
ecx_siiPDO
int ecx_siiPDO(ecx_contextt *context, uint16 slave, ec_eepromPDOt *PDO, uint8 t)
Definition: ethercatmain.c:614
EcatError
boolean EcatError
Definition: ethercatmain.c:93
EC_MAXSLAVE
#define EC_MAXSLAVE
Definition: ethercatmain.h:25
ecx_context::maxgroup
int maxgroup
Definition: ethercatmain.h:397
ecx_mbxreceive
int ecx_mbxreceive(ecx_contextt *context, uint16 slave, ec_mbxbuft *mbx, int timeout)
Definition: ethercatmain.c:1001
ec_eepromSM::PhStart
uint16 PhStart
Definition: ethercatmain.h:291
ec_slave::SM
ec_smt SM[EC_MAXSM]
Definition: ethercatmain.h:143
ec_alstatus::alstatuscode
uint16 alstatuscode
Definition: ethercatmain.h:331
ec_group::Isegment
uint16 Isegment
Definition: ethercatmain.h:262
ec_alstatus::unused
uint16 unused
Definition: ethercatmain.h:330
ecx_redportt
Definition: erika/nicdrv.h:38
ec_eepromFMMU::FMMU0
uint8 FMMU0
Definition: ethercatmain.h:280
ec_eepromPDO::Length
uint16 Length
Definition: ethercatmain.h:303
ec_eepromPDO
Definition: ethercatmain.h:300
ecx_siiSM
uint16 ecx_siiSM(ecx_contextt *context, uint16 slave, ec_eepromSMt *SM)
Definition: ethercatmain.c:543
ec_slave::FMMUunused
uint8 FMMUunused
Definition: ethercatmain.h:227


soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Wed Mar 2 2022 01:01:49