# index.html.md

# .NET Programming Interface


# api.html.md

# Application programming interface, reference

Function prototypes, definitions etc. of the API can be found in `CEcWrapperDotNet.cs` and `CEcWrapperDotNetTypes.cs`

## CEcSimulatorDotNet

### *class* EcWrapperDotNet.CEcSimulatorDotNet :

EcSimulator for .NET. 

### Public Functions

### DoOpen  (*oParms*)

Initialize EcSimulator. 

* **Param oParms:**
  Parameter definitions
* **Return:**
  EC_E_NOERROR or error code

### Close ()

Deinitialize EcSimulator. 

* **Return:**
  EC_E_NOERROR or error code

### Public Static Functions

### Open  (*oParms*)

Initialize EcSimulator and return instance. 

* **Param oParms:**
  Parameter definitions
* **Return:**
  Instance on success, otherwise null.


# api_error-codes.html.md

# Error Codes

### *enum* EcWrapperDotNet.ECError

summary> Specifies EtherCAT errors codes. 

*Values:*

### EC_NOERROR

0x00000000: No Error 

### EC_ERROR

0x98110000: Unspecific Error 

### EMRAS_ERROR

0x98110180: Unspecific RAS Error 

### EC_NOTSUPPORTED

0x98110001: APP: Feature not supported (e.g. function or property not available) 

### EC_INVALIDINDEX

0x98110002: APP: Invalid index (e.g. CoE: invalid SDO index) 

### EC_INVALIDOFFSET

0x98110003: ISW: Invalid offset (e.g. invalid offset while accessing Process Data Image) 

### EC_CANCEL

0x98110004: APP: Cancel (e.g. EtherCAT stack should abort current mailbox transfer) 

### EC_INVALIDSIZE

0x98110005: APP: Invalid size 

### EC_INVALIDDATA

0x98110006: ISW: Invalid data (multiple error sources) 

### EC_NOTREADY

0x98110007: ISW: Not ready (multiple error sources) 

### EC_BUSY

0x98110008: APP: Busy (e.g. EtherCAT stack is currently busy and not available to process the API request. The function may be called again later) 

### EC_ACYC_FRM_FREEQ_EMPTY

0x98110009: ISW: Cannot queue acyclic EtherCAT command (Acyclic command queue is full. Possible solution: Increase of configuration value dwMaxQueuedEthFrames) 

### EC_NOMEMORY

0x9811000A: CFG: No memory left (e.g. memory full / fragmented)) 

### EC_INVALIDPARM

0x9811000B: APP: Invalid parameter (e.g. API function called with erroneous parameter set) 

### EC_NOTFOUND

0x9811000C: APP: Not found (e.g. Network Information File ENI not found or API called with invalid slave ID) 

### EC_DUPLICATE

0x9811000D: ISW: Duplicated fixed address detected (handled internally) 

### EC_INVALIDSTATE

0x9811000E: ISW: Invalid state (EtherCAT stack not initialized or not configured) 

### EC_TIMER_LIST_FULL

0x9811000F: ISW: Cannot add slave to timer list (slave timer list full) 

### EC_TIMEOUT

0x98110010: Timeout 

### EC_OPENFAILED

0x98110011: ISW: Open failed 

### EC_SENDFAILED

0x98110012: LLA: Frame send failed 

### EC_INSERTMAILBOX

0x98110013: CFG: Insert Mailbox error (internal limit MAX_QUEUED_COE_CMDS: 20) 

### EC_INVALIDCMD

0x98110014: ISW: Invalid Command (Unknown mailbox command code) 

### EC_UNKNOWN_MBX_PROTOCOL

0x98110015: ISW: Unknown Mailbox Protocol Command (Unknown Mailbox protocol or mailbox command with unknown protocol association) 

### EC_ACCESSDENIED

0x98110016: ISW: Access Denied (e.g. master internal software error) 

### EC_IDENTIFICATIONFAILED

0x98110017: ENI: Identification failed (e.g. identification command failed) 

### EC_LOCK_CREATE_FAILED

0x98110018: SYS: Create lock failed (e.g. OsCreateLockTyped failed) 

### EC_VERSION_MISMATCH

0x98110019: APP: Version mismatch for loaded library 

### EC_PRODKEY_INVALID

0x9811001A: CFG: Product Key Invalid (e.g. application using protected version of the stack, which stops operation after the evaluation time limit reached if a license is not provided) 

### EC_WRONG_FORMAT

0x9811001B: ENI: Wrong configuration format (e.g. Network information file empty or malformed), SLV: Malformed EEPROM content 

### EC_FEATURE_DISABLED

0x9811001C: APP: Feature disabled (e.g. Application tried to perform a missing or disabled API function) 

### EC_SHADOW_MEMORY

0x9811001D: Shadow memory requested in wrong mode 

### EC_BUSCONFIG_MISMATCH

0x9811001E: ENI: Bus configuration mismatch (e.g. Network information file and currently connected bus topology does not match) 

### EC_CONFIGDATAREAD

0x9811001F: ENI: Error reading configuration file (e.g. Network information file could not be read) 

### EC_ENI_NO_SAFEOP_OP_SUPPORT

0x98110020: Configuration doesn’t support SAFEOP and OP requested state 

### EC_XML_CYCCMDS_MISSING

0x98110021: ENI: Cyclic commands are missing (e.g. Network information file does not contain cyclic commands) 

### EC_XML_ALSTATUS_READ_MISSING

0x98110022: ENI: AL_STATUS register read missing in XML file for at least one state (e.g. Read of AL Status register is missing in cyclic part of given network information file) 

### EC_MCSM_FATAL_ERROR

0x98110023: ISW: Fatal internal McSm (master control state machine is in an undefined state) 

### EC_SLAVE_ERROR

0x98110024: SLV: Slave error (e.g. A slave error was detected. See also EC_NOTIFY_STATUS_SLAVE_ERROR and EC_NOTIFY_SLAVE_ERROR_STATUS_INFO) 

### EC_FRAME_LOST

0x98110025: SLV: Frame lost, IDX mismatch (EtherCAT frame(s) lost on bus, means the response was not received. In case this error shows frequently a problem with the wiring could be the cause) 

### EC_CMD_MISSING

0x98110026: SLV: At least one EtherCAT command is missing in the received frame (e.g. received EtherCAT frame incomplete) 

### EC_CYCCMD_WKC_ERROR

0x98110027: Cyclic command WKC error 

### EC_INVALID_DCL_MODE

0x98110028: APP: IOCTL EC_IOCTL_DC_LATCH_REQ_LTIMVALS invalid in DCL auto read mode (this function cannot be used if DC Latching is running in mode “Auto Read”) 

### EC_AI_ADDRESS

0x98110029: SLV: Auto increment address increment mismatch (e.g. Network information file and bus topology doesn’t match any more. Error shows only, if an already recognized slave isn’t present any more) 

### EC_INVALID_SLAVE_STATE

0x9811002A: APP: Slave in invalid state, e.g. not in OP (API not callable in this state) (mailbox commands are not allowed in current slave state) 

### EC_SLAVE_NOT_ADDRESSABLE

0x9811002B: SLV: Station address lost (or slave missing) - FPRD to AL_STATUS failed (e.g. Slave had a power cycle) 

### EC_CYC_CMDS_OVERFLOW

0x9811002C: ENI: Too many cyclic commands in XML configuration file (e.g. EC_T_INIT_MASTER_PARMS.dwMaxAcycFramesQueued too small) 

### EC_LINK_DISCONNECTED

0x9811002D: SLV: Ethernet link cable disconnected (e.g. EtherCAT bus segment not connected to network interface) 

### EC_MASTERCORE_INACCESSIBLE

0x9811002E: RAS: Simulator core not accessible (e.g. Connection to remote server was terminated or simulator instance has been stopped on remote side) 

### EC_COE_MBXSND_WKC_ERROR

0x9811002F: SLV: CoE mailbox send: working counter (e.g. CoE mailbox couldn’t be read on slave, slave didn’t read out mailbox since last write) 

### EC_COE_MBXRCV_WKC_ERROR

0x98110030: SLV: CoE mailbox receive: working counter (e.g. CoE mailbox couldn’t be read from slave) 

### EC_NO_MBX_SUPPORT

0x98110031: APP: No mailbox support (e.g. Slave does not support mailbox access) 

### EC_NO_COE_SUPPORT

0x98110032: ENI: CoE protocol not supported (e.g. Configuration error or slave information file doesn’t match slave firmware) 

### EC_NO_EOE_SUPPORT

0x98110033: ENI: EoE protocol not supported (e.g. Configuration error or slave information file doesn’t match slave firmware) 

### EC_NO_FOE_SUPPORT

0x98110034: ENI: FoE protocol not supported (e.g. Configuration error or slave information file doesn’t match slave firmware) 

### EC_NO_SOE_SUPPORT

0x98110035: ENI: SoE protocol not supported (e.g. Configuration error or slave information file doesn’t match slave firmware) 

### EC_NO_VOE_SUPPORT

0x98110036: ENI: VoE protocol not supported (e.g. Configuration error or slave information file doesn’t match slave firmware) 

### EC_EVAL_VIOLATION

0x98110037: ENI: Configuration violates Evaluation limits (obsolete) 

### EC_EVAL_EXPIRED

0x98110038: CFG: Evaluation Time limit reached (e.g. License not provided and evaluation period (1 hour) of protected version exceeded) 

### EC_LICENSE_MISSING

0x98110039: License key invalid or missing 

### EC_SDO_ABORTCODE_FIRST

EC_SDO_ABORTCODE_FIRST. 

### EC_SDO_ABORTCODE_TOGGLE

0x98110040: SLV: SDO: Toggle bit not alternated (CoE abort code 0x05030000 of slave) 

### EC_SDO_ABORTCODE_TIMEOUT

0x98110041: SLV: SDO: Protocol timed out (CoE abort code 0x05040000 of slave) 

### EC_SDO_ABORTCODE_CCS_SCS

0x98110042: SLV: SDO: Client/server command specifier not valid or unknown (CoE abort code 0x05040001 of slave) 

### EC_SDO_ABORTCODE_BLK_SIZE

0x98110043: SLV: SDO: Invalid block size (block mode only) (CoE abort code 0x05040002 of slave) 

### EC_SDO_ABORTCODE_SEQNO

0x98110044: SLV: SDO: Invalid sequence number (block mode only) (CoE abort code 0x05040003 of slave) 

### EC_SDO_ABORTCODE_CRC

0x98110045: SLV: SDO: CRC error (block mode only) (CoE abort code 0x05040004 of slave) 

### EC_SDO_ABORTCODE_MEMORY

0x98110046: SLV: SDO: Out of memory (CoE abort code 0x05040005 of slave) 

### EC_SDO_ABORTCODE_ACCESS

0x98110047: SLV: SDO: Unsupported access to an object (CoE abort code 0x06010000 of slave) 

### EC_SDO_ABORTCODE_WRITEONLY

0x98110048: SLV: SDO: Attempt to read a write only object (CoE abort code 0x06010001 of slave) 

### EC_SDO_ABORTCODE_READONLY

0x98110049: SLV: SDO: Attempt to write a read only object (CoE abort code 0x06010002 of slave) 

### EC_SDO_ABORTCODE_INDEX

0x9811004A: SLV: SDO: Object does not exist in the object dictionary (CoE abort code 0x06020000 of slave) 

### EC_SDO_ABORTCODE_PDO_MAP

0x9811004B: SLV: SDO: Object cannot be mapped to the PDO (CoE abort code 0x06040041 of slave) 

### EC_SDO_ABORTCODE_PDO_LEN

0x9811004C: SLV: SDO: The number and length of the objects to be mapped would exceed PDO length (CoE abort code 0x06040042 of slave) 

### EC_SDO_ABORTCODE_P_INCOMP

0x9811004D: SLV: SDO: General parameter incompatibility reason (CoE abort code 0x06040043 of slave) 

### EC_SDO_ABORTCODE_I_INCOMP

0x9811004E: SLV: SDO: General internal incompatibility in the device (CoE abort code 0x06040047 of slave) 

### EC_SDO_ABORTCODE_HARDWARE

0x9811004F: SLV: SDO: Access failed due to a hardware error (CoE abort code 0x06060000 of slave) 

### EC_SDO_ABORTCODE_DATA_LENGTH_NOT_MATCH

0x98110050: SLV: SDO: Data type does not match, length of service parameter does not match (CoE abort code 0x06070010 of slave) 

### EC_SDO_ABORTCODE_DATA_LENGTH_TOO_HIGH

0x98110051: SLV: SDO: Data type does not match, length of service parameter too high (CoE abort code 0x06070012 of slave) 

### EC_SDO_ABORTCODE_DATA_LENGTH_TOO_LOW

0x98110052: SLV: SDO: Data type does not match, length of service parameter too low (CoE abort code 0x06070013 of slave) 

### EC_SDO_ABORTCODE_OFFSET

0x98110053: SLV: SDO: Sub-index does not exist (CoE abort code 0x06090011 of slave) 

### EC_SDO_ABORTCODE_VALUE_RANGE

0x98110054: SLV: SDO: Value range of parameter exceeded (only for write access) (CoE abort code 0x06090030 of slave) 

### EC_SDO_ABORTCODE_VALUE_TOO_HIGH

0x98110055: SLV: SDO: Value of parameter written too high (CoE abort code 0x06090031 of slave) 

### EC_SDO_ABORTCODE_VALUE_TOO_LOW

0x98110056: SLV: SDO: Value of parameter written too low (CoE abort code 0x06090032 of slave) 

### EC_SDO_ABORTCODE_MINMAX

0x98110057: SLV: SDO: Maximum value is less than minimum value (CoE abort code 0x06090036 of slave) 

### EC_SDO_ABORTCODE_GENERAL

0x98110058: SLV: SDO: General error (CoE abort code 0x08000000 of slave) 

### EC_SDO_ABORTCODE_TRANSFER

0x98110059: SLV: SDO: Data cannot be transferred or stored to the application (CoE abort code 0x08000020 of slave) 

### EC_SDO_ABORTCODE_TRANSFER_LOCAL_CONTROL

0x9811005A: SLV: SDO: Data cannot be transferred or stored to the application because of local control (CoE abort code 0x08000021 of slave) 

### EC_SDO_ABORTCODE_TRANSFER_DEVICE_STATE

0x9811005B: SLV: SDO: Data cannot be transferred or stored to the application because of the present device state (CoE abort code 0x08000022 of slave) 

### EC_SDO_ABORTCODE_DICTIONARY

0x9811005C: SLV: SDO: Object dictionary dynamic generation fails or no object dictionary is present (e.g. object dictionary is generated from file and generation fails because of an file error) (CoE abort code 0x08000023 of slave) 

### EC_SDO_ABORTCODE_UNKNOWN

0x9811005D: SLV: SDO: Unknown code (Unknown CoE abort code of slave) 

### EC_SDO_ABORTCODE_MODULE_ID_LIST_NOT_MATCH

0x9811005E: Detected Module Ident List (0xF030) and Configured Module Ident list (0xF050) does not match 

### EC_SDO_ABORTCODE_LAST

EC_SDO_ABORTCODE_LAST. 

### EC_FOE_ERRCODE_NOTDEFINED

0x98110060: SLV: ERROR FoE: not defined (FoE Error Code 0 (0x8000) of slave) 

### EC_FOE_ERRCODE_NOTFOUND

0x98110061: SLV: ERROR FoE: not found (FoE Error Code 1 (0x8001) of slave) 

### EC_FOE_ERRCODE_ACCESS

0x98110062: SLV: ERROR FoE: access denied (FoE Error Code 2 (0x8002) of slave) 

### EC_FOE_ERRCODE_DISKFULL

0x98110063: SLV: ERROR FoE: disk full (FoE Error Code 3 (0x8003) of slave) 

### EC_FOE_ERRCODE_ILLEGAL

0x98110064: SLV: ERROR FoE: illegal (FoE Error Code 4 (0x8004) of slave) 

### EC_FOE_ERRCODE_PACKENO

0x98110065: SLV: ERROR FoE: packet number wrong (FoE Error Code 5 (0x8005) of slave) 

### EC_FOE_ERRCODE_EXISTS

0x98110066: SLV: ERROR FoE: already exists (FoE Error Code 6 (0x8006) of slave) 

### EC_FOE_ERRCODE_NOUSER

0x98110067: SLV: ERROR FoE: no user (FoE Error Code 7 (0x8007) of slave) 

### EC_FOE_ERRCODE_BOOTSTRAPONLY

0x98110068: SLV: ERROR FoE: bootstrap only (FoE Error Code 8 (0x8008) of slave) 

### EC_FOE_ERRCODE_NOTINBOOTSTRAP

0x98110069: SLV: ERROR FoE: Downloaded file name is not valid in Bootstrap state (FoE Error Code 9 (0x8009) of slave) 

### EC_FOE_ERRCODE_INVALIDPASSWORD

0x9811006A: SLV: ERROR FoE: no rights (FoE Error Code 10 (0x800A) of slave) 

### EC_FOE_ERRCODE_PROGERROR

0x9811006B: SLV: ERROR FoE: program error (FoE Error Code 11 (0x800B) of slave) 

### EC_FOE_ERRCODE_INVALID_CHECKSUM

0x9811006C: FoE: Wrong checksum 

### EC_FOE_ERRCODE_INVALID_FIRMWARE

0x9811006D: SLV: ERROR FoE: Firmware does not fit for Hardware (FoE Error Code 13 (0x800D) of slave) 

### EC_FOE_ERRCODE_NO_FILE

0x9811006F: SLV: ERROR FoE: No file to read (FoE Error Code 15 (0x800F) of slave) 

### EC_CFGFILENOTFOUND

0x98110070: CFG: Network configuration file not found (e.g. path to configuration file (XML) was wrong or the file is not available) 

### EC_EEPROMREADERROR

0x98110071: SLV: Command error while EEPROM upload (read slave EEPROM) 

### EC_EEPROMWRITEERROR

0x98110072: SLV: Command error while EEPROM download (write slave EEPROM) 

### EC_XML_CYCCMDS_SIZEMISMATCH

0x98110073: ENI: Cyclic command wrong size (too long) (size in network configuration file (XML) does not match size of process data) 

### EC_XML_INVALID_INP_OFF

0x98110074: ENI: Invalid input offset in cyclic command, please check InputOffs 

### EC_XML_INVALID_OUT_OFF

0x98110075: ENI: Invalid output offset in cyclic command, please check OutputOffs 

### EC_PORTCLOSE

0x98110076: Port close failed 

### EC_PORTOPEN

0x98110077: Port open failed 

### EC_SOE_ERRORCODE_INVALID_ACCESS

0x98110078: ERROR SoE: Invalid access to element 0 

### EC_SOE_ERRORCODE_NOT_EXIST

0x98110079: ERROR SoE: Does not exist 

### EC_SOE_ERRORCODE_INVL_ACC_ELEM1

0x9811007A: ERROR SoE: Invalid access to element 1 

### EC_SOE_ERRORCODE_NAME_NOT_EXIST

0x9811007B: ERROR SoE: Name does not exist 

### EC_SOE_ERRORCODE_NAME_UNDERSIZE

0x9811007C: ERROR SoE: Name undersize in transmission 

### EC_SOE_ERRORCODE_NAME_OVERSIZE

0x9811007D: ERROR SoE: Name oversize in transmission 

### EC_SOE_ERRORCODE_NAME_UNCHANGE

0x9811007E: ERROR SoE: Name unchangeable 

### EC_SOE_ERRORCODE_NAME_WR_PROT

0x9811007F: ERROR SoE: Name currently write-protected 

### EC_SOE_ERRORCODE_UNDERS_TRANS

0x98110080: ERROR SoE: Attribute undersize in transmission 

### EC_SOE_ERRORCODE_OVERS_TRANS

0x98110081: ERROR SoE: Attribute oversize in transmission 

### EC_SOE_ERRORCODE_ATTR_UNCHANGE

0x98110082: ERROR SoE: Attribute unchangeable 

### EC_SOE_ERRORCODE_ATTR_WR_PROT

0x98110083: ERROR SoE: Attribute currently write-protected 

### EC_SOE_ERRORCODE_UNIT_NOT_EXIST

0x98110084: ERROR SoE: Unit does not exist 

### EC_SOE_ERRORCODE_UNIT_UNDERSIZE

0x98110085: ERROR SoE: Unit undersize in transmission 

### EC_SOE_ERRORCODE_UNIT_OVERSIZE

0x98110086: ERROR SoE: Unit oversize in transmission 

### EC_SOE_ERRORCODE_UNIT_UNCHANGE

0x98110087: ERROR SoE: Unit unchangeable 

### EC_SOE_ERRORCODE_UNIT_WR_PROT

0x98110088: ERROR SoE: Unit currently write-protected 

### EC_SOE_ERRORCODE_MIN_NOT_EXIST

0x98110089: ERROR SoE: Minimum input value does not exist 

### EC_SOE_ERRORCODE_MIN_UNDERSIZE

0x9811008A: ERROR SoE: Minimum input value undersize in transmission 

### EC_SOE_ERRORCODE_MIN_OVERSIZE

0x9811008B: ERROR SoE: Minimum input value oversize in transmission 

### EC_SOE_ERRORCODE_MIN_UNCHANGE

0x9811008C: ERROR SoE: Minimum input value unchangeable 

### EC_SOE_ERRORCODE_MIN_WR_PROT

0x9811008D: ERROR SoE: Minimum input value currently write-protected 

### EC_SOE_ERRORCODE_MAX_NOT_EXIST

0x9811008E: ERROR SoE: Maximum input value does not exist 

### EC_SOE_ERRORCODE_MAX_UNDERSIZE

0x9811008F: ERROR SoE: Maximum input value undersize in transmission 

### EC_SOE_ERRORCODE_MAX_OVERSIZE

0x98110090: ERROR SoE: Maximum input value oversize in transmission 

### EC_SOE_ERRORCODE_MAX_UNCHANGE

0x98110091: ERROR SoE: Maximum input value unchangeable 

### EC_SOE_ERRORCODE_MAX_WR_PROT

0x98110092: ERROR SoE: Maximum input value currently write-protected 

### EC_SOE_ERRORCODE_DATA_NOT_EXIST

0x98110093: ERROR SoE: Data item does not exist 

### EC_SOE_ERRORCODE_DATA_UNDERSIZE

0x98110094: ERROR SoE: Data item undersize in transmission 

### EC_SOE_ERRORCODE_DATA_OVERSIZE

0x98110095: ERROR SoE: Data item oversize in transmission 

### EC_SOE_ERRORCODE_DATA_UNCHANGE

0x98110096: ERROR SoE: Data item unchangeable 

### EC_SOE_ERRORCODE_DATA_WR_PROT

0x98110097: ERROR SoE: Data item currently write-protected 

### EC_SOE_ERRORCODE_DATA_MIN_LIMIT

0x98110098: ERROR SoE: Data item less than minimum input value limit 

### EC_SOE_ERRORCODE_DATA_MAX_LIMIT

0x98110099: ERROR SoE: Data item exceeds maximum input value limit 

### EC_SOE_ERRORCODE_DATA_INCOR

0x9811009A: ERROR SoE: Data item incorrect 

### EC_SOE_ERRORCODE_PASWD_PROT

0x9811009B: ERROR SoE: Data item protected by password 

### EC_SOE_ERRORCODE_TEMP_UNCHANGE

0x9811009C: ERROR SoE: Data item temporary unchangeable (in AT or MDT) 

### EC_SOE_ERRORCODE_INVL_INDIRECT

0x9811009D: ERROR SoE: Invalid indirect 

### EC_SOE_ERRORCODE_TEMP_UNCHANGE1

0x9811009E: ERROR SoE: Data item temporary unchangeable (parameter or opmode) 

### EC_SOE_ERRORCODE_ALREADY_ACTIVE

0x9811009F: ERROR SoE: Command already active 

### EC_SOE_ERRORCODE_NOT_INTERRUPT

0x98110100: ERROR SoE: Command not interruptible 

### EC_SOE_ERRORCODE_CMD_NOT_AVAIL

0x98110101: ERROR SoE: Command not available (in this phase) 

### EC_SOE_ERRORCODE_CMD_NOT_AVAIL1

0x98110102: ERROR SoE: Command not available (invalid parameter) 

### EC_SOE_ERRORCODE_DRIVE_NO

0x98110103: ERROR SoE: Response drive number not identical with requested drive number 

### EC_SOE_ERRORCODE_IDN

0x98110104: ERROR SoE: Response IDN not identical with requested IDN 

### EC_SOE_ERRORCODE_FRAGMENT_LOST

0x98110105: ERROR SoE: At least one fragment lost 

### EC_SOE_ERRORCODE_BUFFER_FULL

0x98110106: ERROR SoE: RX buffer full (EtherCAT call with to small data-buffer) 

### EC_SOE_ERRORCODE_NO_DATA

0x98110107: ERROR SoE: No data state 

### EC_SOE_ERRORCODE_NO_DEFAULT_VALUE

0x98110108: ERROR SoE: No default value 

### EC_SOE_ERRORCODE_DEFAULT_LONG

0x98110109: ERROR SoE: Default value transmission too long 

### EC_SOE_ERRORCODE_DEFAULT_WP

0x9811010A: ERROR SoE: Default value cannot be changed, read only 

### EC_SOE_ERRORCODE_INVL_DRIVE_NO

0x9811010B: ERROR SoE: Invalid drive number 

### EC_SOE_ERRORCODE_GENERAL_ERROR

0x9811010C: ERROR SoE: General error 

### EC_SOE_ERRCODE_NO_ELEM_ADR

0x9811010D: ERROR SoE: No element addressed 

### EC_SLAVE_NOT_PRESENT

0x9811010E: APP / SLV: command not executed (slave not present on bus) (e.g. slave disappeared or was never present) 

### EC_NO_FOE_SUPPORT_BS

0x9811010F: APP: ERROR FoE: Protocol not supported in boot strap (e.g. Application requested FoE in Bootstrap although slave does not support this) 

### EC_EEPROMRELOADERROR

0x98110110: Command error while EEPROM reload 

### EC_SLAVECTRLRESETERROR

0x98110111: Command error while Reset Slave Controller 

### EC_SYSDRIVERMISSING

0x98110112: SYS: Cannot open system driver (e.g. system driver was not loaded) 

### EC_BUSCONFIG_TOPOCHANGE

0x9811011E: Bus configuration not detected, Topology changed (e.g. Topology changed while scanning bus) 

### EC_EOE_MBX_WKC_ERROR

0x9811011F: EoE: Mailbox receive: working counter 

### EC_FOE_MBX_WKC_ERROR

0x98110120: FoE: Mailbox receive: working counter 

### EC_SOE_MBX_WKC_ERROR

0x98110121: SoE: mailbox receive: working counter 

### EC_AOE_MBX_WKC_ERROR

0x98110122: AoE: Mailbox receive: working counter 

### EC_VOE_MBX_WKC_ERROR

0x98110123: SLV: VoE mailbox send: working counter (VoE mailbox couldn’t be written) 

### EC_EEPROMASSIGNERROR

0x98110124: SLV: EEPROM assignment failed 

### EC_MBX_ERROR_TYPE

0x98110125: SLV: Unknown mailbox error code received in mailbox 

### EC_REDLINEBREAK

0x98110126: SLV: Redundancy line break (e.g. cable break between slaves or between EtherCAT network adapter and first slave) 

### EC_XML_INVALID_CMD_WITH_RED

0x98110127: ENI: Invalid EtherCAT command in cyclic frame with redundancy (e.g. BRW commands are not allowed with redundancy) 

### EC_XML_PREV_PORT_MISSING

0x98110128: ENI: <PreviousPort>-tag is missing (e.g. if the auto increment address is not the first slave on the bus we check if a previous port tag OR a hot connect tag is available) 

### EC_XML_DC_CYCCMDS_MISSING

0x98110129: DC enabled and DC cyclic commands missing (e.g. access to 0x0900) 

### EC_DLSTATUS_IRQ_TOPOCHANGED

0x98110130: SLV: Data link (DL) status interrupt because of changed topology (automatically handled by master) 

### EC_PTS_IS_NOT_RUNNING

0x98110131: PTS: Pass Through Server is not running (Pass-Through-Server was tried to be enabled/disabled or stopped without being started) 

### EC_PTS_IS_RUNNING

0x98110132: PTS: Pass Through Server is running (obsolete, replaced by EC_E_ADS_IS_RUNNING) 

### EC_ADS_IS_RUNNING

0x98110132: PTS: ADS adapter (Pass Through Server) is running (API call conflicts with ADS state (running)) 

### EC_PTS_THREAD_CREATE_FAILED

0x98110133: PTS: Could not start the Pass Through Server 

### EC_PTS_SOCK_BIND_FAILED

0x98110134: PTS: The Pass Through Server could not bind the IP address with a socket (e.g. Possibly because the IPaddress (and Port) is already in use or the IP-address does not exist) 

### EC_PTS_NOT_ENABLED

0x98110135: PTS: The Pass Through Server is running but not enabled 

### EC_PTS_LL_MODE_NOT_SUPPORTED

0x98110136: PTS: The Link Layer mode is not supported by the Pass Through Server (e.g. The Master is running in interrupt mode but the Pass-Through-Server only supports polling mode) 

### EC_VOE_NO_MBX_RECEIVED

0x98110137: SLV: No VoE mailbox received yet from specific slave 

### EC_DC_REF_CLOCK_SYNC_OUT_UNIT_DISABLED

0x98110138: DC (time loop control) unit of reference clock disabled 

### EC_DC_REF_CLOCK_NOT_FOUND

0x98110139: SLV: Reference clock not found! May happen if reference clock is removed from network. 

### EC_MBX_CMD_WKC_ERROR

0x9811013B: SLV: Mailbox command working counter error (e.g. Mailbox init command Retry Count exceeded) 

### EC_NO_AOE_SUPPORT

0x9811013C: APP / SLV: AoE: Protocol not supported (e.g. Application calls AoE-API although not implemented at slave) 

### EC_AOE_INV_RESPONSE_SIZE

0x9811013D: AoE: Invalid AoE response received 

### EC_AOE_ERROR

0x9811013E: AoE: Common AoE device error 

### EC_AOE_SRVNOTSUPP

0x9811013F: AoE: Service not supported by server 

### EC_AOE_INVALIDGRP

0x98110140: AoE: Invalid index group 

### EC_AOE_INVALIDOFFSET

0x98110141: AoE: Invalid index offset 

### EC_AOE_INVALIDACCESS

0x98110142: AoE: Reading/writing not permitted 

### EC_AOE_INVALIDSIZE

0x98110143: AoE: Parameter size not correct 

### EC_AOE_INVALIDDATA

0x98110144: AoE: Invalid parameter value(s) 

### EC_AOE_NOTREADY

0x98110145: AoE: Device not in a ready state 

### EC_AOE_BUSY

0x98110146: AoE: Device busy 

### EC_AOE_INVALIDCONTEXT

0x98110147: AoE: Invalid context 

### EC_AOE_NOMEMORY

0x98110148: AoE: Out of memory 

### EC_AOE_INVALIDPARM

0x98110149: AoE: Invalid parameter value(s) 

### EC_AOE_NOTFOUND

0x9811014A: AoE: Not found 

### EC_AOE_SYNTAX

0x9811014B: AoE: Syntax error in command or file 

### EC_AOE_INCOMPATIBLE

0x9811014C: AoE: Objects do not match 

### EC_AOE_EXISTS

0x9811014D: AoE: Object already exists 

### EC_AOE_SYMBOLNOTFOUND

0x9811014E: AoE: Symbol not found 

### EC_AOE_SYMBOLVERSIONINVALID

0x9811014F: AoE: Symbol version invalid 

### EC_AOE_INVALIDSTATE

0x98110150: AoE: Server in invalid state 

### EC_AOE_TRANSMODENOTSUPP

0x98110151: AoE: AdsTransMode not supported 

### EC_AOE_NOTIFYHNDINVALID

0x98110152: AoE: Notification handle invalid 

### EC_AOE_CLIENTUNKNOWN

0x98110153: AoE: Notification client not registered 

### EC_AOE_NOMOREHDLS

0x98110154: AoE: No more notification handles 

### EC_AOE_INVALIDWATCHSIZE

0x98110155: AoE: Size for watch to big 

### EC_AOE_NOTINIT

0x98110156: AoE: Device not initialized 

### EC_AOE_TIMEOUT

0x98110157: AoE: Device has a timeout 

### EC_AOE_NOINTERFACE

0x98110158: AoE: Query interface failed 

### EC_AOE_INVALIDINTERFACE

0x98110159: AoE: Wrong interface required 

### EC_AOE_INVALIDCLSID

0x9811015A: AoE: Class ID invalid 

### EC_AOE_INVALIDOBJID

0x9811015B: AoE: Object ID invalid 

### EC_AOE_PENDING

0x9811015C: AoE: Request pending 

### EC_AOE_ABORTED

0x9811015D: AoE: Request aborted 

### EC_AOE_WARNING

0x9811015E: AoE: Signal warning 

### EC_AOE_INVALIDARRAYIDX

0x9811015F: AoE: Invalid array index 

### EC_AOE_SYMBOLNOTACTIVE

0x98110160: AoE: Symbol not active -> release handle and try again 

### EC_AOE_ACCESSDENIED

0x98110161: AoE: Access denied 

### EC_AOE_INTERNAL

0x98110162: AoE: Internal error 

### EC_AOE_TARGET_PORT_NOT_FOUND

0x98110163: AoE: Target port not found 

### EC_AOE_TARGET_MACHINE_NOT_FOUND

0x98110164: AoE: Target machine not found 

### EC_AOE_UNKNOWN_CMD_ID

0x98110165: AoE: Unknown command ID 

### EC_AOE_PORT_NOT_CONNECTED

0x98110166: AoE: Port not connected 

### EC_AOE_INVALID_AMS_LENGTH

0x98110167: AoE: Invalid AMS length 

### EC_AOE_INVALID_AMS_ID

0x98110168: AoE: invalid AMS Net ID 

### EC_AOE_PORT_DISABLED

0x98110169: AoE: Port disabled 

### EC_AOE_PORT_CONNECTED

0x9811016A: AoE: Port already connected 

### EC_AOE_INVALID_AMS_PORT

0x9811016B: AoE: Invalid AMS port 

### EC_AOE_NO_MEMORY

0x9811016C: AoE: No memory 

### EC_AOE_VENDOR_SPECIFIC

0x9811016D: AoE: Vendor specific AoE device error 

### EC_XML_AOE_NETID_INVALID

0x9811016E: ENI: AoE: Invalid NetID (e.g. Error from Configuration Tool) 

### EC_MAX_BUS_SLAVES_EXCEEDED

0x9811016F: CFG: Error: Maximum number of bus slave has been exceeded (The maximum number of preallocated bus slave objects is too small. The maximum number can be adjusted by the master initialization parameter EC_T_INITMASTERPARMS.dwMaxBusSlaves) 

### EC_MBXERR_SYNTAX

0x98110170: SLV: Mailbox error: Syntax of 6 octet Mailbox header is wrong (Slave error mailbox return value: 0x01) 

### EC_MBXERR_UNSUPPORTEDPROTOCOL

0x98110171: SLV: Mailbox error: The Mailbox protocol is not supported (Slave error mailbox return value: 0x02) 

### EC_MBXERR_INVALIDCHANNEL

0x98110172: SLV: Mailbox error: Field contains wrong value (Slave error mailbox return value: 0x03) 

### EC_MBXERR_SERVICENOTSUPPORTED

0x98110173: SLV: Mailbox error: The addressed service in the mailbox protocol is not supported (Slave error mailbox return value: 0x04) 

### EC_MBXERR_INVALIDHEADER

0x98110174: SLV: Mailbox error: The mailbox protocol header of the mailbox protocol is wrong (Slave error mailbox return value: 0x05) 

### EC_MBXERR_SIZETOOSHORT

0x98110175: SLV: Mailbox error: Length of received mailbox data is too short (Slave error mailbox return value: 0x06) 

### EC_MBXERR_NOMOREMEMORY

0x98110176: SLV: Mailbox error: Mailbox protocol can not be processed because of limited resources (Slave error mailbox return value: 0x07) 

### EC_MBXERR_INVALIDSIZE

0x98110177: SLV: Mailbox error: The length of data is inconsistent (Slave error mailbox return value: 0x08) 

### EC_DC_SLAVES_BEFORE_REF_CLOCK

0x98110178: ENI: Slaves with DC configured present on bus before reference clock (e.g. The first DC Slave was not configured as potential reference clock) 

### EC_DATA_TYPE_CONVERSION_FAILED

0x98110179: Data type conversion failed 

### EC_FOE_ERRCODE_MAX_FILE_SIZE

0x9811017A: APP: ERROR FoE: File is bigger than max file size (e.g. Slave returned more data than the buffer provided by application can store.) 

### EC_LINE_CROSSED

0x9811017B: Line crossed (cabling wrong) 

### EC_LINE_CROSSED_SLAVE_INFO

0x9811017C: Line crossed at slave (obsolete) 

### EC_SOCKET_DISCONNECTED

0x9811017D: RAS: Socket disconnected (e.g. IP connection terminated or lost) 

### EC_ADO_NOT_SUPPORTED

0x9811017E: SLV: ADO for slave identification not supported (e.g. Request ID mechanism (ADO 0x134) not supported by slave) 

### EC_FRAMELOSS_AFTER_SLAVE

0x9811017F: Frameloss after Slave (opening port destroys communication) 

### EC_ERROR_LAST

EC_ERROR_LAST. 

### EC_ERROR2

EC_ERROR2. 

### EC_FOE_ERRCODE_FILE_HEAD_MISSING

0x98130001: SLV: ERROR FoE: File header does not exist (FoE Error Code 16 (0x8010) of slave) 

### EC_FOE_ERRCODE_FLASH_PROBLEM

0x98130002: SLV: ERROR FoE: Flash problem (FoE Error Code 17 (0x8011) of slave) 

### EC_FOE_ERRCODE_FILE_INCOMPATIBLE

0x98130003: SLV: ERROR FoE: File incompatible (FoE Error Code 18 (0x8012) of slave) 

### EC_SDO_ABORTCODE_SI_NOT_WRITTEN

0x98130004: SLV: SDO: Sub Index cannot be written, SI0 must be 0 for write access (CoE abort code 0x06010003 of slave) 

### EC_SDO_ABORTCODE_CA_TYPE_MISM

0x98130005: SLV: SDO: Complete access not supported for objects of variable length such as ENUM object types (CoE abort code 0x06010004 of slave) 

### EC_SDO_ABORTCODE_OBJ_TOO_BIG

0x98130006: SLV: SDO: Object length exceeds mailbox size (CoE abort code 0x06010005 of slave) 

### EC_SDO_ABORTCODE_PDO_MAPPED

0x98130007: SLV: SDO: Object mapped to RxPDO, SDO Download blocked (CoE abort code 0x06010006 of slave) 

### EC_OEM_SIGNATURE_MISMATCH

0x98130008: ENI, OEM: Manufacturer signature mismatch 

### EC_ENI_ENCRYPTION_WRONG_VERSION

0x98130009: ENI, OEM: ENI encryption algorithm version not supported 

### EC_ENI_ENCRYPTED

0x9813000A: OEM: Loading encrypted ENI needs OEM key 

### EC_OEM_KEY_MISMATCH

0x9813000B: RAS, APP: OEM key mismatch 

### EC_OEM_KEY_MISSING

0x9813000C: APP: OEM key access needs OEM key set (e.g. Application must call esSetOemKey (HiL) or set EC_T_LINK_PARMS_SIMULATOR::qwOemKey (SiL)) 

### EC_AOE_NO_RTIME

0x9813000D: AoE: No Rtime 

### EC_AOE_LOCKED_MEMORY

0x9813000E: AoE: Allocation locked memory 

### EC_AOE_MAILBOX

0x9813000F: AoE: Insert mailbox error 

### EC_AOE_WRONG_HMSG

0x98130010: AoE: Wrong receive HMSG 

### EC_AOE_BAD_TASK_ID

0x98130011: AoE: Bad task ID 

### EC_AOE_NO_IO

0x98130012: AoE: No IO 

### EC_AOE_UNKNOWN_AMS_COMMAND

0x98130013: AoE: Unknown ADS command 

### EC_AOE_WIN32

0x98130014: AoE: Win 32 error 

### EC_AOE_LOW_INSTALL_LEVEL

0x98130015: AoE: Low installation level 

### EC_AOE_NO_DEBUG

0x98130016: AoE: No debug available 

### EC_AOE_AMS_SYNC_WIN32

0x98130017: AoE: Sync Win 32 error 

### EC_AOE_AMS_SYNC_TIMEOUT

0x98130018: AoE: Sync Timeout 

### EC_AOE_AMS_SYNC_AMS

0x98130019: AoE: Sync AMS error 

### EC_AOE_AMS_SYNC_NO_INDEX_MAP

0x9813001A: AoE: Sync no index map 

### EC_AOE_TCP_SEND

0x9813001B: AoE: TCP send error 

### EC_AOE_HOST_UNREACHABLE

0x9813001C: AoE: Host unreachable 

### EC_AOE_INVALIDAMSFRAGMENT

0x9813001D: AoE: Invalid AMS fragment 

### EC_AOE_NO_LOCKED_MEMORY

0x9813001E: AoE: No allocation locked memory 

### EC_AOE_MAILBOX_FULL

0x9813001F: AoE: Mailbox full 

### EC_S2SMBX_NOT_CONFIGURED

0x98130020: S2S: Not Configured 

### EC_S2SMBX_NO_MEMORY

0x98130021: S2S: No Memory 

### EC_S2SMBX_NO_DESCRIPTOR

0x98130022: S2S: No Descriptor 

### EC_S2SMBX_DEST_SLAVE_NOT_FOUND

0x98130023: S2S: Destination Slave not found 

### EC_MASTER_RED_STATE_INACTIVE

0x98130024: APP: Master Redundancy State is INACTIVE (e.g. API not allowed in current Master Redundancy State) 

### EC_MASTER_RED_STATE_ACTIVE

0x98130025: APP: Master Redundancy State is ACTIVE (e.g. API not allowed in current Master Redundancy State) 

### EC_JUNCTION_RED_LINE_BREAK

0x98130026: Junction redundancy line break 

### EC_VALIDATION_ERROR

0x98130027: Validation error (validation data mismatch) 

### EC_TIMEOUT_WAITING_FOR_DC

0x98130028: Timeout waiting for DC 

### EC_TIMEOUT_WAITING_FOR_DCM

0x98130029: Timeout waiting for DCM 

### EC_SIGNATURE_MISMATCH

0x98130030: Signature mismatch 

### EC_PDIWATCHDOG

0x98130031: PDI watchdog expired 

### EC_BAD_CONNECTION

0x98130032: Bad connection 

### EC_XML_INCONSISTENT

0x98130033: ENI: Inconsistent content 

### EC_ERROR_LAST2

EC_ERROR_LAST2. 

### EMRAS_INVALIDCOOKIE

0x98110181: RAS: Invalid Cookie (e.g.obsolete) 

### EMRAS_MULSRVDISMULCON

0x98110183: RAS: Connect 2nd server denied because Multi Server support is disabled (obsolete) 

### EMRAS_LOGONCANCELLED

0x98110184: RAS: Logon canceled (Server-side connection reject while opening a client connection.) 

### EMRAS_INVALIDVERSION

0x98110186: RAS: Invalid Version (Connection reject because of using mismatching protocol versions on client and server side) 

### EMRAS_INVALIDACCESSCONFIG

0x98110187: RAS: Access configuration is invalid (e.g. SPoC access configuration invalid) 

### EMRAS_ACCESSLESS

0x98110188: RAS: No access to this call at this access level (e.g. a higher SPoC access level is needed to use the called Remote API function) 

### EMRAS_INVALIDDATARECEIVED

0x98110189: RAS: Invalid data received (communication corrupted) 

### EMRAS_SERVERSTOPPED

0x98110191: RAS: Server stopped (e.g. connection dropped because of Remote API Server stop) 

### EMRAS_WDEXPIRED

0x98110192: RAS: Watchdog expired (e.g. connection dropped because of missing keep-alive messages) 

### EMRAS_RECONEXPIRED

0x98110193: RAS: Reconnect expired (obsolete) 

### EMRAS_CLIENTLOGON

0x98110194: RAS Server: Client logged on 

### EMRAS_RECONNECT

0x98110195: RAS: obsolete 

### EMRAS_SOCKCHANGE

0x98110196: RAS: Socket exchanged after reconnect (obsolete) 

### EMRAS_CLNTDISC

0x98110197: RAS: Client disconnect 

### EMRAS_ACCESS_NOT_FOUND

0x98110198: RAS: Access not configured for this call (e.g. SPoC access configuration missing) 

### EMRAS_TOKEN_MISSING

0x98110199: RAS: Token missing 

### EMRAS_TOKEN_INVALID

0x9811019A: RAS: Token invalid 

### EMRAS_TOKEN_DENIED

0x9811019B: RAS: Token denied 

### EMRAS_TLS_CERTIFICATE_ERROR

0x9811019C: RAS: TLS certificate error 

### EMRAS_TLS_PRIVATEKEY_ERROR

0x9811019D: RAS: TLS private key error 

### EMRAS_TLS_HANDSHAKE_FAILED

0x9811019E: RAS: TLS handshake failed 

### EMRAS_ERROR_LAST

EMRAS_ERROR_LAST.


# api_types.html.md

# Types

### *class* EcWrapperDotNet.DN_EC_T_INIT_PARMS

Abstract initalization parameters. 

Subclassed by EcWrapperDotNet.DN_EC_T_INIT_PARMS_DAQ, EcWrapperDotNet.DN_EC_T_INIT_PARMS_DAQ_READER, EcWrapperDotNet.DN_EC_T_INIT_PARMS_MASTER, EcWrapperDotNet.DN_EC_T_INIT_PARMS_MASTER_RAS_SERVER, EcWrapperDotNet.DN_EC_T_INIT_PARMS_MBXGATEWAY_CLIENT, EcWrapperDotNet.DN_EC_T_INIT_PARMS_MBXGATEWAY_SERVER, [EcWrapperDotNet.DN_EC_T_INIT_PARMS_MONITOR](api_types.html.md#d0/d2f/class_ec_wrapper_dot_net_1_1_d_n___e_c___t___i_n_i_t___p_a_r_m_s___m_o_n_i_t_o_r), EcWrapperDotNet.DN_EC_T_INIT_PARMS_MONITOR_RAS_SERVER, EcWrapperDotNet.DN_EC_T_INIT_PARMS_RAS_CLIENT, [EcWrapperDotNet.DN_EC_T_INIT_PARMS_SIMULATOR](api_types.html.md#db/d61/class_ec_wrapper_dot_net_1_1_d_n___e_c___t___i_n_i_t___p_a_r_m_s___s_i_m_u_l_a_t_o_r), EcWrapperDotNet.DN_EC_T_INIT_PARMS_SIMULATOR_RAS_SERVER

### *class* EcWrapperDotNet.DN_EC_T_INIT_PARMS_SIMULATOR :

EcSimulator initalization parameters. 

### Public Functions

### DN_EC_T_INIT_PARMS_SIMULATOR ()

Constructor. 

### Public Members

### dwSimulatorInstanceId

[in] Simulator instance ID 

### oSimulator

[in] Simulator parameters 

### bStartTimingTask

[in] Start timing task 

### *class* EcWrapperDotNet.DN_EC_T_SIMULATOR_INIT_PARMS

DN_EC_T_SIMULATOR_INIT_PARMS. 

### Public Members

### dwLogLevel

dwLogLevel 

### dwSimulatorAddress

[in] Reserved 

### [] aoLinkParms

aoLinkParms 

### dwBusCycleTimeNsec

[in] Bus cycle time in nanoseconds [ns] 

### bDisableProcessDataImage

[in] Disable Process Data Image (Process Data Variables not supported) 

### oDeviceConnection

oDeviceConnection 

### bConnectHcGroups

[in] Connect hot connect groups in topology (floating group heads to free ports) 

### PerfMeasInternalParms

[in] Internal performance measurement parameters 

### bApiLockByApp

[in] Lock pending API against esDeinitSimulator(). EC_FALSE (default): locked internally. EC_TRUE: application is responsible for locking. 

### *class* EcWrapperDotNet.DN_EC_T_LINK_PARMS

### *class* EcWrapperDotNet.DN_EC_T_PERF_MEAS_INTERNAL_PARMS

DN_EC_T_PERF_MEAS_INTERNAL_PARMS. 

### Public Members

### bEnabled

[in] Enable/disable internal performance counters 

### CounterParms

[in] Timer function settings. When not provided OsMeasGetCounterTicks is used. 

### HistogramParms

[in] Histogram settings. When not provided the histogram is disabled. 

### *class* EcWrapperDotNet.DN_EC_T_PERF_MEAS_COUNTER_PARMS

DN_EC_T_PERF_MEAS_COUNTER_PARMS. 

### Public Members

### qwFrequency

[in] Frequency in Hz used by the timer in GetCounterTicks 

### *class* EcWrapperDotNet.DN_EC_T_PERF_MEAS_HISTOGRAM_PARMS

DN_EC_T_PERF_MEAS_HISTOGRAM_PARMS. 

### Public Members

### dwBinCount

[in] Amount of bins to use for the histogram 

### qwMinTicks

[in] Results below qwMinTicks are stored in the first bin 

### qwMaxTicks

[in] Results above qwMaxTicks are stored in the last bin 

### *class* EcWrapperDotNet.DN_EC_T_LOG_PARMS

DN_EC_T_LOG_PARMS. 

### Public Members

### dwLogLevel

[in] Log level. See EC_LOG_LEVEL… 

### *enum* EcWrapperDotNet.DN_EC_LOG_LEVEL

DN_EC_LOG_LEVEL. 

*Values:*

### SILENT

SILENT. 

### ANY

ANY. 

### CRITICAL

CRITICAL. 

### ERROR

ERROR. 

### WARNING

WARNING. 

### INFO

INFO. 

### INFO_API

INFO_API. 

### VERBOSE

VERBOSE. 

### VERBOSE_CYC

VERBOSE_CYC. 

### UNDEFINED

UNDEFINED. 

### *class* EcWrapperDotNet.DN_EC_T_AOE_NETID

AoE NetID. 

### Public Members

### [] aby

AoE net id. 

### *class* EcWrapperDotNet.DN_EC_T_BUS_SLAVE_INFO

DN_EC_T_BUS_SLAVE_INFO. 

### Public Members

### dwSlaveId

[out] The slave’s ID to bind bus slave and config slave information 

### [] adwPortSlaveIds

[out] The slave’s ID of the slaves connected to ports. See Port slave ID’s. 

### wPortState

wPortState 

### wAutoIncAddress

[out] The slave’s auto increment address 

### bDcSupport

[out] Slave supports DC (Bus Topology Scan) 

### bDc64Support

[out] Slave supports 64 Bit DC (Bus Topology Scan) 

### dwVendorId

[out] Vendor Identification stored in the EEPROM at offset 0x0008 

### dwProductCode

[out] Product Code stored in the EEPROM at offset 0x000A 

### dwRevisionNumber

[out] Revision number stored in the EEPROM at offset 0x000C 

### dwSerialNumber

[out] Serial number stored in the EEPROM at offset 0x000E 

### byESCType

[out] Type of ESC (Value of slave ESC register 0x0000) 

### byESCRevision

[out] Revision number of ESC (Value of slave ESC register 0x0001) 

### wESCBuild

[out] Build number of ESC (Value of slave ESC register 0x0002) 

### byPortDescriptor

[out] Port descriptor (Value of slave ESC register 0x0007) 

### wFeaturesSupported

[out] Features supported (Value of slave ESC register 0x0008) 

### wStationAddress

[out] The slave’s station address (Value of slave ESC register 0x0010) 

### wAliasAddress

[out] The slave’s alias address (Value of slave ESC register 0x0012) 

### wAlStatus

[out] AL status (Value of slave ESC register 0x0130) 

### wAlStatusCode

[out] AL status code. (Value of slave ESC register 0x0134 during last error acknowledge). This value is reset after a slave state change. 

### dwSystemTimeDifference

[out] System time difference. (Value of slave ESC register 0x092C) 

### wMbxSupportedProtocols

[out] Supported Mailbox Protocols stored in the EEPROM at offset 0x001C 

### wDlStatus

[out] DL status (Value of slave ESC register 0x0110) 

### wPrevPort

[out] Connected port of the previous slave 

### wIdentifyData

[out] Last read identification value see EC_T_CFG_SLAVE_INFO.wIdentifyAdo 

### bLineCrossed

[out] Line crossed was detected at this slave 

### dwSlaveDelay

[out] Delay behind slave [ns]. 

### dwPropagDelay

[out] Propagation delay [ns]. ESC register 0x0928. 

### bIsRefClock

[out] Slave is reference clock 

### bIsDeviceEmulation

[out] Slave without Firmware. ESC register 0x0141, enabled by EEPROM offset 0x0000.8. 

### wLineCrossedFlags

[out] Combination of Line crossed flags 

### dwCyclicWkcErrorCnt

[out] Counter for Cyclic WC Error 

### dwSlaveAbsentCnt

[out] Counter for Absent/Not Present Slaves 

### dwUnexpectedStateCnt

[out] Counter for Abnormal State Change 

### *class* EcWrapperDotNet.DN_EC_T_CFG_SLAVE_INFO

ecatGetCfgSlaveInfo 

### Public Members

### dwSlaveId

[out] Slave’s ID to bind bus slave and config slave information 

### abyDeviceName

[out] Slave’s configured name (80 Byte) (from ENI file) 

### dwHCGroupIdx

[out] Index of Hot Connect group, 0 for mandatory 

### bIsPresent

[out] Slave present on bus 

### bIsHCGroupPresent

[out] Slave’s Hot Connect group present on bus 

### dwVendorId

[out] Vendor identification (from ENI file) 

### dwProductCode

[out] Product code (from ENI file) 

### dwRevisionNumber

[out] Revision number (from ENI file) 

### dwSerialNumber

[out] Serial number (from ENI file) 

### wStationAddress

[out] Slave’s configured station address (from ENI file) 

### wAutoIncAddress

[out] Slave’s auto increment address (may differ from ENI file) 

### dwPdOffsIn

[out] Process input data bit offset (from ENI file) 

### dwPdSizeIn

[out] Process input data bit size (from ENI file) 

### dwPdOffsOut

[out] Process output data bit offset (from ENI file) 

### dwPdSizeOut

[out] Process output data bit size (from ENI file) 

### dwPdOffsIn2

[out] 2nd sync unit process input data bit offset (from ENI file) 

### dwPdSizeIn2

[out] 2nd sync unit process input data bit size (from ENI file) 

### dwPdOffsOut2

[out] 2nd sync unit process output data bit offset (from ENI file) 

### dwPdSizeOut2

[out] 2nd sync unit process output data bit size (from ENI file) 

### dwPdOffsIn3

[out] 3rd sync unit process input data bit offset (from ENI file) 

### dwPdSizeIn3

[out] 3rd sync unit process input data bit size (from ENI file) 

### dwPdOffsOut3

[out] 3rd sync unit process output data bit offset (from ENI file) 

### dwPdSizeOut3

[out] 3rd sync unit process output data bit size (from ENI file) 

### dwPdOffsIn4

[out] 4th sync unit process input data bit offset (from ENI file) 

### dwPdSizeIn4

[out] 4th sync unit process input data bit size (from ENI file) 

### dwPdOffsOut4

[out] 4th sync unit process output data bit offset (from ENI file) 

### dwPdSizeOut4

[out] 4th sync unit process output data bit size (from ENI file) 

### dwMbxSupportedProtocols

[out] Mailbox protocols supported by the slave (from ENI file). Combination of Supported mailbox protocols flags. 

### dwMbxOutSize

[out] Mailbox output byte size (from ENI file) 

### dwMbxInSize

[out] Mailbox input byte size (from ENI file) 

### dwMbxOutSize2

[out] Bootstrap mailbox output byte size (from ENI file) 

### dwMbxInSize2

[out] Bootstrap mailbox input byte size (from ENI file) 

### bDcSupport

[out] Slave supports DC (from ENI file) 

### wNumProcessVarsInp

[out] Number of input process data variables (from ENI file) 

### wNumProcessVarsOutp

[out] Number of output process data variables (from ENI file) 

### wPrevStationAddress

[out] Station address of the previous slave (from ENI file) 

### wPrevPort

[out] Connected port of the previous slave (from ENI file) 

### wIdentifyAdo

[out] ADO used for identification command (from ENI file) 

### wIdentifyData

[out] Identification value to be validated (from ENI file) 

### byPortDescriptor

[out] Port descriptor (ESC register 0x0007) (from ENI file) 

### [] wWkcStateDiagOffsIn

[out] Offset of WkcState bit in diagnosis image (ENI: ProcessData/Recv[1..4]/BitStart): 0xFFFFFFFF = offset not available. WkcState bit values: 0 = Data valid, 1 = Data invalid. 

### [] wWkcStateDiagOffsOut

[out] Offset of WkcState bit in diagnosis image (ENI: ProcessData/Send[1..4]/BitStart): 0xFFFFFFFF = offset not available. WkcState bit values: 0 = Data valid, 1 = Data invalid. 

### [] awMasterSyncUnitIn

[out] Sync Unit (ENI: ProcessData/TxPdo[1..4]@Su) 

### [] awMasterSyncUnitOut

[out] Sync Unit (ENI: ProcessData/RxPdo[1..4]@Su) 

### bDisabled

[out] Slave disabled by API SetSlaveDisabled / SetSlavesDisabled. 

### bDisconnected

[out] Slave disconnected by API SetSlaveDisconnected / SetSlavesDisconnected. 

### bExtended

[out] Slave generated by API ConfigExtend 

### bDcReferenceClock

[out] Slave is reference clock (from ENI file) 

### bDcPotentialRefClock

[out] Slave can be used as a reference clock (from ENI file) 

### dwDcCycleTime0

[out] Cycle time of Sync0 event [ns] (from ENI file) 

### dwDcCycleTime1

[out] Calculated value dwDcCycleTime1 [ns] = Cycle time of Sync1 event - Cycle time of Sync1 event + Shift time of Sync0 event (from ENI file) 

### nDcShiftTime

[out] Shift time of Sync0 event [ns] (from ENI file) 

### szProductRevision

[out] Slave’s ProductRevision (ENI:Slave/Info/ProductRevision), e.g. “EK1100-0000-0018”. Empty string if not present in ENI. 

### *class* EcWrapperDotNet.DN_EC_T_CFG_SLAVE_SM_INFO

DN_EC_T_CFG_SLAVE_SM_INFO. 

### Public Members

### dwSlaveId

[out] Slave ID 

### dwSmInfoNumOf

[out] Number of available sync managers 

### [] aoSmInfos

[out] Sync managers info 

### *class* EcWrapperDotNet.DN_EC_T_CFG_SLAVE_SM_ENTRY

ecatGetCfgSlaveSmInfo 

### Public Members

### wPhysAddr

[out] ESC (0x800 + y \* 8) 

### wLength

[out] ESC (0x802 + y \* 8) 

### byOpMode

[out] Bits 0..1 ESC (0x804 + y \* 8) 

### byDirection

[out] Bits 2..3 ESC (0x804 + y \* 8) 

### dwPdBitOffs

[out] Process input data bit offset (from ENI file) 

### dwPdBitSize

[out] Process input data bit size (from ENI file) 

### wWkcStateDiagBitOffs

[out] Offset of WkcState bit in diagnosis image 

### wMasterSyncUnit

[out] Sync Unit (ENI: ProcessData/TxPdo[1..4]@Su) 

### *class* EcWrapperDotNet.DN_EC_T_CFG_SLAVE_EOE_INFO

ecatGetCfgSlaveEoeInfo, ENI: Mailbox/EoE/InitCmds/InitCmd/Data 

### Public Members

### dwSlaveId

[out] Slave ID 

### bMacAddr

[out] Indicates whether the MAC address could be read and is valid 

### [] abyMacAddr

[out] MAC address 

### bIpAddr

[out] Indicates whether the IP address could be read and is valid 

### oIpAddr

[out] IP address 

### bSubnetMask

[out] Indicates whether the subnet mask could be read and is valid 

### oSubnetMask

[out] Subnet mask 

### bDefaultGateway

[out] Indicates whether the default gateway could be read and is valid 

### oDefaultGateway

[out] Default gateway 

### bDnsServer

[out] Indicates whether the DNS server could be read and is valid 

### oDnsServer

[out] DNS server 

### bDnsName

[out] Indicates whether the DNS name could be read and is valid 

### szDnsName

[out] DNS name 

### bDisableEoe

[out] Indicates whether the EoE is Disabled or not 

### [] dwRes

dwRes 

### *class* EcWrapperDotNet.DN_EC_T_IPADDR

DN_EC_T_IPADDR. 

### Public Members

### sAddr

sAddr 

### *class* EcWrapperDotNet.DN_EC_T_INNER_IPADDR

DN_EC_T_INNER_IPADDR. 

### Public Members

### [] by

IPv4 address (endianness independent) 

### *enum* EcWrapperDotNet.DN_EC_T_CNF_TYPE

DN_EC_T_CNF_TYPE. 

*Values:*

### Unknown

Unknown. 

### Filename

pbyCnfData: ENI filename to read 

### Data

pbyCnfData: ENI data 

### Datadiag

pbyCnfData: ENI data for diagnosis 

### GenPreopENI

Generate ENI based on bus-scan result to get into PREOP state. 

### GenPreopENIWithCRC

Same as eCnfType_GenPreopENI with CRC protection. 

### GenOpENI

Generate ENI based on bus-scan result to get into OP state. The default PDO mapping read from the slaves is activated. See ETG2010 “SII Specification”, Table 14 “Structure Category TXPDO and RXPDO for each PDO”. 

### None

Reset configuration. 

### ConfigData

pbyCnfData: Binary structured configuration 

### GenOpENINoStrings

Generate ENI based on bus-scan result to get into OP state, does not read strings from EEPROM. 

### FileByApp

File access provided by user application, See EC_T_CNF_FILEBYAPP_DESC. 

### GenEBI

Generate EBI based on bus-scan result. 

### BCppDummy

BCppDummy. 

### *class* EcWrapperDotNet.DN_EC_T_COE_ENTRYDESC

### Public Members

### wObIndex

object index 

### byObSubIndex

object sub-index 

### byValueInfo

value information, determines which of the following elements are valid 

### wDataType

data type 

### wBitLen

bit length of the object 

### byObAccess

object access 

### bRxPdoMapping

EC_TRUE if it is PDO mappable 

### bTxPdoMapping

EC_TRUE if PDO mappable object can be changed 

### bObCanBeUsedForBackup

Parameter may be back upped 

### bObCanBeUsedForSettings

Parameter may be used for Settings 

### dwUnitType

length of the data 

### szObName

length of the data 

### *class* EcWrapperDotNet.DN_EC_T_COE_OBDESC

### Public Members

### wObIndex

object index 

### wDataType

see DEFTYPE_…, refer to “Extended Data Type Area” in ETG.1000.6 

### byObjCode

see ECAT_COE_INFO_OBJCODE_…, defined in CiA DS 301, “Object code usage” 

### byObjCategory

category: 0=optional, 1=mandatory 

### byMaxNumSubIndex

maximum number of sub-indexes 

### pchObName

object name (not a NULL terminated string!) 

### *enum* EcWrapperDotNet.DN_EC_T_COE_ODLIST_TYPE

EtherCAT CoE OD list type values. 

*Values:*

### Lengths

Lengths of each list type. 

### ALL

List contains all objects. 

### RxPdoMap

List with PDO mappable objects. 

### TxPdoMap

List with objects that can be changed. 

### StoredFRepl

Only stored for a device replacement objects. 

### StartupParm

Only startup parameter objects. 

### BCppDummy

BCppDummy. 

### *class* EcWrapperDotNet.DN_EC_T_CYC_CONFIG_DESC

Descriptor for EC_IOCTL_GET_CYCLIC_CONFIG_INFO. 

### Public Members

### dwTaskId

[out] Task ID of selected cyclic entry (ENI: Cyclic/TaskId) 

### dwPriority

[out] Priority of selected cyclic entry 

### dwCycleTime

[out] Cycle time of selected cyclic entry 

### *enum* EcWrapperDotNet.DN_EC_T_DEFTYPE

DN_EC_T_DEFTYPE. 

*Values:*

### NULL

NULL. 

### BOOLEAN

BOOLEAN. 

### INTEGER8

INTEGER8. 

### INTEGER16

INTEGER16. 

### INTEGER32

INTEGER32. 

### UNSIGNED8

UNSIGNED8. 

### UNSIGNED16

UNSIGNED16. 

### UNSIGNED32

UNSIGNED32. 

### REAL32

REAL32. 

### VISIBLESTRING

VISIBLESTRING. 

### OCTETSTRING

OCTETSTRING. 

### UNICODESTRING

UNICODESTRING. 

### TIMEOFDAY

TIMEOFDAY. 

### TIMEDIFFERENCE

TIMEDIFFERENCE. 

### DOMAIN

DOMAIN. 

### INTEGER24

INTEGER24. 

### REAL64

REAL64. 

### INTEGER40

INTEGER40. 

### INTEGER48

INTEGER48. 

### INTEGER56

INTEGER56. 

### INTEGER64

INTEGER64. 

### UNSIGNED24

UNSIGNED24. 

### UNSIGNED40

UNSIGNED40. 

### UNSIGNED48

UNSIGNED48. 

### UNSIGNED56

UNSIGNED56. 

### UNSIGNED64

UNSIGNED64. 

### GUID

GUID. 

### BYTE

BYTE. 

### WORD

WORD. 

### DWORD

DWORD. 

### PDOMAPPING

PDOMAPPING. 

### IDENTITY

IDENTITY. 

### COMMAND

COMMAND. 

### PDOCOMPAR

PDOCOMPAR. 

### ENUM

ENUM. 

### SMPAR

SMPAR. 

### RECORD

RECORD. 

### BACKUP_PARAMETER

BACKUP_PARAMETER. 

### MODULAR_DEVICE_PROFILE

MODULAR_DEVICE_PROFILE. 

### BITARR8

BITARR8. 

### BITARR16

BITARR16. 

### BITARR32

BITARR32. 

### BIT1

BIT1. 

### BIT2

BIT2. 

### BIT3

BIT3. 

### BIT4

BIT4. 

### BIT5

BIT5. 

### BIT6

BIT6. 

### BIT7

BIT7. 

### BIT8

BIT8. 

### BIT9

BIT9. 

### BIT10

BIT10. 

### BIT11

BIT11. 

### BIT12

BIT12. 

### BIT13

BIT13. 

### BIT14

BIT14. 

### BIT15

BIT15. 

### BIT16

BIT16. 

### ARRAY_OF_BYTE

ARRAY_OF_BYTE. 

### ARRAY_OF_UINT

ARRAY_OF_UINT. 

### ARRAY_OF_INT

ARRAY_OF_INT. 

### ARRAY_OF_SINT

ARRAY_OF_SINT. 

### ARRAY_OF_DINT

ARRAY_OF_DINT. 

### ARRAY_OF_UDINT

ARRAY_OF_UDINT. 

### ERROR_SETTING

ERROR_SETTING. 

### HISTORY

HISTORY. 

### DIAGNOSIS_OBJECT

DIAGNOSIS_OBJECT. 

### EXTERNAL_SYNC_STATUS

EXTERNAL_SYNC_STATUS. 

### EXTERNAL_SYNC_SETTINGS

EXTERNAL_SYNC_SETTINGS. 

### FSOEFRAME

FSOEFRAME. 

### FSOECOMMPAR

FSOECOMMPAR. 

### *class* EcWrapperDotNet.DN_EC_T_GET_SLAVE_INFO

ecatGetSlaveInfo 

### Public Members

### dwScanBusStatus

Status during last Bus Scan. 

### dwVendorId

Vendor Identification. 

### dwProductCode

Product Code. 

### dwRevisionNumber

Revision Number. 

### dwSerialNumber

Serial Number. 

### wPortState

[out] port link state (SB Instance) 

### bDcSupport

[out] Slave does support DC 

### bDc64Support

[out] Slave does support 64Bit DC 

### wAliasAddress

[out] Slave alias address 

### wPhysAddress

[out] Slave station address 

### dwPdOffsIn

[out] Process data offset of Input Data (in bits) 

### dwPdSizeIn

[out] Process data size of Input Data (in bits) 

### dwPdOffsOut

[out] Process data offset of Output Data (in bits) 

### dwPdSizeOut

[out] Process data size of Output Data 

### dwPdOffsIn2

[out] Process data offset of Input data (in bits) 

### dwPdSizeIn2

[out] Process data size of Input Data (in bits) 

### dwPdOffsOut2

[out] Process data offset of Output Data (in bits) 

### dwPdSizeOut2

[out] Process data size of Output Data 

### dwPdOffsIn3

[out] Process data offset of Input Data (in bits) 

### dwPdSizeIn3

[out] Process data size of Input Data (in bits) 

### dwPdOffsOut3

[out] Process data offset of Output Data (in bits) 

### dwPdSizeOut3

[out] Process data size of Output Data 

### dwPdOffsIn4

[out] Process data offset of Input Data (in bits) 

### dwPdSizeIn4

[out] Process data size of Input Data (in bits) 

### dwPdOffsOut4

[out] Process data offset of Output Data (in bits) 

### dwPdSizeOut4

[out] Process data size of Output Data 

### wCfgPhyAddress

[out] Slave configured station address 

### abyDeviceName

abyDeviceName 

### bIsMailboxSlave

[out] Whether slave support mailboxes 

### dwMbxOutSize

[out] Mailbox 1 output size 

### dwMbxInSize

[out] Mailbox 1 input size 

### dwMbxOutSize2

[out] Mailbox 2 output size 

### dwMbxInSize2

[out] Mailbox 2 input size 

### dwErrorCode

[out] Last return code 

### dwSBErrorCode

[out] Last return value from SB 

### byPortDescriptor

[out] Port Descriptor (ESC register 0x0007) 

### byESCType

[out] ESC Node Type 

### wSupportedMbxProtocols

[out] Supported mailbox protocols: AoE, EoE, CoE, FoE, SoE 

### wAlStatusValue

[out] AL Status Register Value (ESC register 0x0130) 

### wAlStatusCode

[out] AL Status Code (ESC register 0x0134) 

### bIsOptional

[out] Slave is in an optional hot connect group 

### bIsPresent

[out] Slave is currently present on bus 

### wNumProcessVarsInp

[out] Number of output process data variables 

### wNumProcessVarsOutp

[out] Number of input process data variables 

### dwSlaveId

[out] Slave ID 

### bIsHCGroupPresent

[out] The hot connect group of the slave is present 

### [] aPortSlaveIds

[out] slave IDs connected to ports 

### dwSystemTimeDifference

dwSystemTimeDifference 

### *class* EcWrapperDotNet.DN_EC_T_PERF_MEAS_APP_PARMS

### *class* EcWrapperDotNet.DN_EC_T_PERF_MEAS_HISTOGRAM

DN_EC_T_PERF_MEAS_HISTOGRAM. 

### Public Members

### [] aBinsObj

aBinsObj 

### dwBinCount

Length of aBins. 

### qwMinTicks

Results below qwMinTicks are stored in the first bin. 

### qwMaxTicks

Results above qwMaxTicks are stored in the last bin. 

### *class* EcWrapperDotNet.DN_EC_T_PERF_MEAS_INFO

DN_EC_T_PERF_MEAS_INFO. 

### Public Members

### szName

Name of the benchmark. 

### qwFrequency

Frequency in Hz used by the timer. 

### eUserJob

UserJob associated with the benchmark. 

### dwBinCountHistogram

Length of Histogram Bins. 

### dwFlags

Flags associated with the benchmark (See EC_T_PERF_MEAS_FLAG…) 

### *class* EcWrapperDotNet.DN_EC_T_PERF_MEAS_VAL

DN_EC_T_PERF_MEAS_VAL. 

### Public Members

### qwCurrTicks

[ticks] 

### qwMinTicks

[ticks] 

### qwMaxTicks

[ticks] 

### qwAvgTicks

[ticks] 

### *class* EcWrapperDotNet.DN_EC_T_PROCESS_VAR_INFO

emGetSlaveInpVarInfo / emGetSlaveOutpVarInfo 

### Public Members

### szName

[out] Name of the found process variable 

### wDataType

[out] Data type of the found process variable (according to ETG.1000, section 5). See also EcType.h, DEFTYPE_BOOLEAN. 

### wFixedAddr

[out] Station address of the slave that is owner of this variable 

### nBitSize

[out] Size in bits of the found process variable 

### nBitOffs

[out] Bit offset in the process data image 

### bIsInputData

[out] Determines whether the found process variable is an input variable or an output variable 

### *class* EcWrapperDotNet.DN_EC_T_PROCESS_VAR_INFO_EX

DN_EC_T_PROCESS_VAR_INFO_EX. 

### Public Members

### szName

[out] Name of the found process variable 

### wDataType

[out] Data type of the found process variable (according to ETG.1000, section 5). See also EcType.h, DEFTYPE_BOOLEAN. 

### wFixedAddr

[out] Station address of the slave that is owner of this variable 

### nBitSize

[out] Size in bits of the found process variable 

### nBitOffs

[out] Bit offset in the process data image 

### bIsInputData

[out] Determines whether the found process variable is an input variable or an output variable 

### wIndex

[out] Object index 

### wSubIndex

[out] Object sub index 

### wPdoIndex

[out] Index of PDO (process data object) 

### wWkcStateDiagOffs

[out] Bit offset in the diagnostic image (API GetDiagnosisImagePtr) 

### wMasterSyncUnit

[out] Master Sync Unit ID (ENI: Slave/ProcessData/RxPdo[1..4]@Su, Slave/ProcessData/TxPdo[1..4]@Su, comment at Cyclic/Frame/Cmd) 

### wRes1

wRes1 

### dwTaskId

[out] ID of task where process variable is located 

### CopyInfo

[out] Copy Info if applied to the variable 

### *class* EcWrapperDotNet.DN_EC_T_CYC_COPY_INFO

The master has to copy valid input data of this command from the source offset (bit offs in the complete process image) to a destination offset. 

### Public Members

### dwSrcBitOffs

dwSrcBitOffs 

### dwDstBitOffs

dwDstBitOffs 

### wBitSize

wBitSize 

### wTaskId

wTaskId 

### wFlags

wFlags 

### wRes

wRes 

### [] dwRes

dwRes 

### *class* EcWrapperDotNet.DN_EC_T_RAS_CONNECTION_INFO

DN_EC_T_RAS_CONNECTION_INFO. 

### Public Members

### dwAccessControlActive

dwAccessControlActive 

### dwAccessLevel

dwAccessLevel 

### *class* EcWrapperDotNet.DN_EC_T_REGISTERRESULTS

Client register result. 

### Public Members

### dwClntId

[out] Client ID 

### pbyPDIn

[out] Pointer to process data input memory 

### dwPDInSize

[out] Size of process data input memory (in bytes) 

### pbyPDOut

[out] Pointer to process data output memory 

### dwPDOutSize

[out] Size of process data output memory (in bytes) 

### *class* EcWrapperDotNet.DN_EC_T_SB_SLAVEINFO_DESC

DN_EC_T_SB_SLAVEINFO_DESC. 

### Public Members

### dwScanBusStatus

[out] Scan bus status (determined in the latest scan bus) emNotify EC_NOTIFY_SB_STATUS 

### dwVendorId

[out] Vendor Identification stored in the EEPROM at offset 0x0008 

### dwProductCode

[out] Product Code stored in the EEPROM at offset 0x000A 

### dwRevisionNumber

[out] Revision number stored in the EEPROM at offset 0x000C (Not read by default!) 

### dwSerialNumber

[out] Serial number stored in the EEPROM at offset 0x000E (Not read by default!) 

### *class* EcWrapperDotNet.DN_EC_T_SB_SLAVEINFO_REQ_DESC

DN_EC_T_SB_SLAVEINFO_REQ_DESC. 

### Public Members

### eInfoEntry

[in] Info Entry to read 

### wAutoIncAddress

[in] Auto-Increment address of the slave 

### *enum* EcWrapperDotNet.DN_EC_T_eINFOENTRY

DN_EC_T_eINFOENTRY. 

*Values:*

### unknown

unknown 

### pdoffs_in

pdoffs_in 

### pdsize_in

pdsize_in 

### pdoffs_out

pdoffs_out 

### pdsize_out

pdsize_out 

### phys_address

phys_address 

### portstate

portstate 

### dcsupport

dcsupport 

### dc64support

dc64support 

### alias_address

alias_address 

### cfgphy_address

cfgphy_address 

### device_name

device_name 

### ismailbox_slave

ismailbox_slave 

### pdoffs_in2

pdoffs_in2 

### pdsize_in2

pdsize_in2 

### pdoffs_out2

pdoffs_out2 

### pdsize_out2

pdsize_out2 

### pdoffs_in3

pdoffs_in3 

### pdsize_in3

pdsize_in3 

### pdoffs_out3

pdoffs_out3 

### pdsize_out3

pdsize_out3 

### pdoffs_in4

pdoffs_in4 

### pdsize_in4

pdsize_in4 

### pdoffs_out4

pdoffs_out4 

### pdsize_out4

pdsize_out4 

### mbx_outsize

mbx_outsize 

### mbx_insize

mbx_insize 

### mbx_outsize2

mbx_outsize2 

### mbx_insize2

mbx_insize2 

### isoptional

isoptional 

### ispresent

ispresent 

### esctype

esctype 

### BCppDummy

BCppDummy. 

### *class* EcWrapperDotNet.DN_EC_T_SB_SLAVEINFO_RES_DESC

DN_EC_T_SB_SLAVEINFO_RES_DESC. 

### Public Members

### eInfoEntry

[out] Info entry read 

### dwInfoLength

[in, out] Length of Info Field (buffer, actually read length) 

### pbyInfo

[out] Pointer to Info (-1 if no info found in XML file) 

### *class* EcWrapperDotNet.DN_EC_T_SB_STATUS_NTFY_DESC

DN_EC_T_SB_STATUS_NTFY_DESC. 

### Public Members

### dwResultCode

[in] #EC_E_NOERROR: success, #EC_E_NOTREADY: no bus scan executed, #EC_E_BUSCONFIG_MISMATCH: bus configuration mismatch result of scanbus 

### dwSlaveCount

[in] Number of slaves connected to the bus 

### *class* EcWrapperDotNet.DN_EC_T_SIM_SLAVE_INFO

DN_EC_T_SIM_SLAVE_INFO. 

### Public Members

### oCfg

[out] Config Info (ENI/EXI) 

### oStatus

[out] Status Info 

### *class* EcWrapperDotNet.DN_EC_T_SIM_SLAVE_CFG_INFO

DN_EC_T_SIM_SLAVE_CFG_INFO. 

### Public Members

### wFixedAddress

[out] Slave’s station address (ENI/EXI: /EtherCATConfig/Config/Slave/Info/PhysAddr) 

### bPowerOff

[out] Slave powered off on startup (EXI: /EtherCATConfig/ExtendedConfig/Slaves/Slave@PowerOff) 

### bSimulated

[out] Slave is simulated (EXI: /EtherCATConfig/ExtendedConfig/Slaves/Slave/Simulated) 

### bIgnoreCoeDownloadError

[out] Slave ignores CoE download errors (EXI: /EtherCATConfig/ExtendedConfig/Slaves/Slave/Mailbox/CoE@IgnoreDownloadError) 

### [] aPortConnection

[out] Explicit port connection (optional) (EXI: /EtherCATConfig/ExtendedConfig/Slaves/Slave/PortConnection) 

### szApplicationName

[out] Configured slave application name (EXI: /EtherCATConfig/ExtendedConfig/Slaves/Slave/Application/Name) 

### szApplicationParms

[out] Configured slave application parameters (EXI: /EtherCATConfig/ExtendedConfig/Slaves/Slave/Application/Parameter) 

### *class* EcWrapperDotNet.DN_EC_T_SIM_SLAVE_STATUS_INFO

DN_EC_T_SIM_SLAVE_STATUS_INFO. 

### Public Members

### bIsPowerOn

[out] Slave is powered on. See esPowerSlave(). 

### bIsPresent

[out] Slave is present in topology segment and connected to the network. See esConnectPorts(), Hot Connect. 

### wAlStatusReq

[out] AL Status (0x0130) requested from Simulator application. See esSetSimSlaveState(). 

### wAlStatusCodeReq

[out] AL Status (0x0134) requested from Simulator application. See esSetSimSlaveState(). 

### [] aPortConnection

[out] See esConnectPorts() 

### *class* EcWrapperDotNet.DN_EC_T_SIMULATOR_DEVICE_CONNECTION_DESC

DN_EC_T_SIMULATOR_DEVICE_CONNECTION_DESC. 

### Public Members

### dwType

EC_SIMULATOR_DEVICE_CONNECTION_TYPE… 

### dwInstanceID

EC-Simulator Instance ID. 

### wCfgFixedAddress

EC-Simulator Configuration (ENI/EXI) 

### byPort

0…3: Port A-D 

### *class* EcWrapperDotNet.DN_EC_T_SLAVE_PROP

EtherCAT slave properties. 

### Public Members

### wStationAddress

Configured station address or INVALID_FIXED_ADDR. 

### wAutoIncAddr

Configured auto increment address or INVALID_AUTO_INC_ADDR. 

### achName

Configured name of the slave device (NULL terminated string) 

### *class* EcWrapperDotNet.DN_EC_T_SLVSTATISTICS_DESC

DN_EC_T_SLVSTATISTICS_DESC. 

### Public Members

### [] abyInvalidFrameCnt

[out] Invalid Frame Counters per Slave Port 

### [] abyRxErrorCnt

[out] RX Error Counters per Slave Port 

### [] abyFwdRxErrorCnt

[out] Forwarded RX Error Counters per Slave Port 

### byProcessingUnitErrorCnt

[out] Processing Unit Error Counter 

### byPdiErrorCnt

[out] PDI Error Counter 

### wAlStatusCode

[out] AL Status Code 

### [] abyLostLinkCnt

[out] Lost Link Counters per Slave Port 

### qwReadTime

[out] Timestamp of the last read [ns] 

### qwChangeTime

[out] Timestamp of the last counter change [ns] 

### *enum* EcWrapperDotNet.DN_EC_T_STATE

EtherCAT state. 

*Values:*

### UNKNOWN

Unknown state. 

### INIT

EtherCAT state INIT. 

### PREOP

EtherCAT state PREOP (pre-operational) 

### SAFEOP

EtherCAT state SAFEOP (safe operational) 

### OP

EtherCAT state OP (operational) 

### BOOTSTRAP

EtherCAT state BOOTSTRAP. 

### BCppDummy

BCppDummy. 

### *enum* EcWrapperDotNet.DN_EC_T_CMD

EtherCAT commands. 

*Values:*

### NOP

No operation. 

### APRD

Auto increment physical read. 

### APWR

Auto increment physical write. 

### APRW

Auto increment physical read write. 

### FPRD

Configured address physical read. 

### FPWR

Configured address physical write. 

### FPRW

Configured address physical read write. 

### BRD

Broadcast read. 

### BWR

Broadcast write. 

### BRW

Broadcast read write. 

### LRD

Logical memory read. 

### LWR

Logical memory write. 

### LRW

Logical memory read write. 

### ARMW

Auto increment physical read multiple write. 

### FRMW

Configured address physical read multiple write. 

### EXT

EXT. 

### BCppDummy

BCppDummy. 

### *enum* EcWrapperDotNet.DN_EC_T_USER_JOB

EtherCAT user controlled execution job. 

*Values:*

### Undefined

Undefined. 

### ProcessAllRxFrames

Receive frames and process all received data. Polling mode only. 

### SendAllCycFrames

Send all cyclic frames. 

### MasterTimer

Run internal master and slave state machines for generic management. 

### SendAcycFrames

Send acyclic frames. 

### SendCycFramesByTaskId

Send cyclic frames related to a specific task id (ENI: Cyclic/TaskId) 

### MasterTimerMinimal

Run minimal master timer routine: no state change possible. 

### ProcessRxFramesByTaskId

Receive frames and process received data related to a specific task id (ENI: Cyclic/TaskId) 

### ProcessAcycRxFrames

Receive frames and process received data related to acyclic frames. 

### SwitchEoeFrames

Switch queued EoE frames (see EC_IOCTL_SET_EOE_DEFFERED_SWITCHING_ENABLED) 

### StartTask

Start new task. 

### StopTask

Stop currently running task. 

### StampSendAllCycFrames

Obsolete. 

### StampSendCycFramesByTaskId

Obsolete. 

### SimulatorTimer

Run EC-Simulator timer routine (generic management) 

### MonitorTimer

Run EC-Monitor timer routine (generic management) 

### BCppDummy

BCppDummy. 

### *enum* EcWrapperDotNet.DN_EC_T_VAR_DIRECTION

DN_EC_T_VAR_DIRECTION. 

*Values:*

### Undefined

Undefined Direction. 

### INPUT

INPUTs. 

### OUTPUT

OUTPUTs. 

### All

INPUTs and OUTPUTs. 

### BCppDummy

BCppDummy. 

### *enum* EcWrapperDotNet.DN_EC_T_VAR_SOURCE

DN_EC_T_VAR_SOURCE. 

*Values:*

### Undefined

Undefined Source. 

### All

Slaves and Master/Monitor/Simulator. 

### AllSlaves

All Slaves. 

### Slave

Slave. 

### Master

Master. 

### Monitor

Monitor. 

### Simulator

Simulator. 

### BCppDummy

BCppDummy. 

### *enum* EcWrapperDotNet.DN_ESC_SII_REG

DN_ESC_SII_REG. 

*Values:*

### PDICONTROL

PDICONTROL. 

### PDICONFIG

PDICONFIG. 

### SYNCIMPULSELENGTH

SYNCIMPULSELENGTH. 

### EXTENDEDPDICONFIG

EXTENDEDPDICONFIG. 

### ALIASADDRESS

ALIASADDRESS. 

### CHECKSUM

CHECKSUM. 

### VENDORID

VENDORID. 

### PRODUCTCODE

PRODUCTCODE. 

### REVISIONNUMBER

REVISIONNUMBER. 

### REVISIONNUMBER_LO

REVISIONNUMBER_LO. 

### REVISIONNUMBER_HI

REVISIONNUMBER_HI. 

### SERIALNUMBER

SERIALNUMBER. 

### BOOT_RECV_MBX

BOOT_RECV_MBX. 

### BOOT_RECV_MBX_OFFSET

BOOT_RECV_MBX_OFFSET. 

### BOOT_RECV_MBX_SIZE

BOOT_RECV_MBX_SIZE. 

### BOOT_SEND_MBX

BOOT_SEND_MBX. 

### BOOT_SEND_MBX_OFFSET

BOOT_SEND_MBX_OFFSET. 

### BOOT_SEND_MBX_SIZE

BOOT_SEND_MBX_SIZE. 

### STD_RECV_MBX

STD_RECV_MBX. 

### STD_RECV_MBX_OFFSET

STD_RECV_MBX_OFFSET. 

### STD_RECV_MBX_SIZE

STD_RECV_MBX_SIZE. 

### STD_SEND_MBX

STD_SEND_MBX. 

### STD_SEND_MBX_OFFSET

STD_SEND_MBX_OFFSET. 

### STD_SEND_MBX_SIZE

STD_SEND_MBX_SIZE. 

### MBX_PROTOCOL

MBX_PROTOCOL. 

### FIRSTCATEGORYHDR

FIRSTCATEGORYHDR. 

### *class* EcWrapperDotNet.DN_ETHERNET_ADDRESS

DN_ETHERNET_ADDRESS. 

### Public Members

### [] b

MAC address. 

### *enum* EcWrapperDotNet.DN_NotifyCode

Specifies EtherCAT errors codes. 

*Values:*

### UNDEFINED

### STATECHANGED

### ETH_LINK_CONNECTED

### SB_STATUS

### DC_STATUS

### DC_SLV_SYNC

### DCL_STATUS

### DCM_SYNC

### DCX_SYNC

### SLAVE_STATECHANGED

### SLAVES_STATECHANGED

### RAWCMD_DONE

### COE_TX_PDO

### SLAVE_PRESENCE

### SLAVES_PRESENCE

### REFCLOCK_PRESENCE

### MASTER_RED_STATECHANGED

### MASTER_RED_FOREIGN_SRC_MAC

### SLAVE_REGISTER_TRANSFER

### PORT_OPERATION

### SLAVE_IDENTIFICATION

### RELEASE_FORCED_PROCESSDATA

### SB_EEPROM_ACCESS_DENIED

### SB_SLAVE_IDENT_TIMEOUT

### CONFIG_LOAD

### FSOE_CONNECTION_STATECHANGED

### CYCCMD_WKC_ERROR

### MASTER_INITCMD_WKC_ERROR

### SLAVE_INITCMD_WKC_ERROR

### EOE_MBXSND_WKC_ERROR

### COE_MBXSND_WKC_ERROR

### FOE_MBXSND_WKC_ERROR

### FRAME_RESPONSE_ERROR

### SLAVE_INITCMD_RESPONSE_ERROR

### MASTER_INITCMD_RESPONSE_ERROR

### MBSLAVE_INITCMD_TIMEOUT

### NOT_ALL_DEVICES_OPERATIONAL

### ETH_LINK_NOT_CONNECTED

### RED_LINEBRK

### STATUS_SLAVE_ERROR

### SLAVE_ERROR_STATUS_INFO

### SLAVE_NOT_ADDRESSABLE

### SOE_MBXSND_WKC_ERROR

### SOE_WRITE_ERROR

### MBSLAVE_COE_SDO_ABORT

### CLIENTREGISTRATION_DROPPED

### RED_LINEFIXED

### FOE_MBSLAVE_ERROR

### MBXRCV_INVALID_DATA

### PDIWATCHDOG

### SLAVE_NOTSUPPORTED

### SLAVE_UNEXPECTED_STATE

### ALL_DEVICES_OPERATIONAL

### VOE_MBXSND_WKC_ERROR

### AOE_MBXSND_WKC_ERROR

### EEPROM_CHECKSUM_ERROR

### JUNCTION_RED_CHANGE

### SLAVES_UNEXPECTED_STATE

### LINE_CROSSED

### SLAVES_ERROR_STATUS

### FRAMELOSS_AFTER_SLAVE

### S2SMBX_ERROR

### BAD_CONNECTION

### COMMUNICATION_TIMEOUT

### TAP_LINK_STATUS

### MBOXRCV

### SB_MISMATCH

### SB_DUPLICATE_HC_NODE

### HC_DETECTADDGROUPS

### HC_PROBEALLGROUPS

### HC_TOPOCHGDONE


# api_wrapper.html.md

# CEcWrapperDotNet

### *class* EcWrapperDotNet.CEcWrapperDotNet : [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/System.IDisposable)

Subclassed by EcWrapperDotNet.CEcMasterMbxGatewayClientDotNet, EcWrapperDotNet.CEcMasterMbxGatewayServerDotNet, EcWrapperDotNet.CEcMasterRasServerDotNet, [EcWrapperDotNet.CEcMonitorDotNet](api.html.md#d6/d0e/class_ec_wrapper_dot_net_1_1_c_ec_monitor_dot_net), EcWrapperDotNet.CEcMonitorRasServerDotNet, EcWrapperDotNet.CEcRasClientDotNet, [EcWrapperDotNet.CEcSimulatorDotNet](api.html.md#d1/d1b/class_ec_wrapper_dot_net_1_1_c_ec_simulator_dot_net), EcWrapperDotNet.CEcSimulatorRasServerDotNet, EcWrapperDotNet.CEcWrapperDotNetEx

### Public Functions

### Dispose ()

summary> Throws the EtherCAT-Notifications. The Type of the event depends on the notification code. 

### SetCycFrameRxCallback  (*pfnCallback*)

Set cyclic frame RX callback function. 

This function will be called after the cyclic frame is received, if there is more than one cyclic frame after the last frame. The application has to assure that these functions will not block.

* **Param pfnCallback:**
  Callback function
* **Return:**
  EC_E_NOERROR or error code

### GetRunMode ()

Return run mode. 

* **Return:**
  Run mode

### RegisterClient (*out*  *pRegRes*)

Register a client with the EtherCAT Master. 

* **Param pRegRes:**
  out Registration results, a pointer to a structure of type REGISTERRESULTS
* **Return:**
  Error Code

### UnregisterClient ()

Unregister a client from the EtherCAT master. 

* **Return:**
  Error code

### RasGetConnectionInfo (*out*  *pConInfo*)

Get actual connection information /summary> 
* **param pConInfo:**
  connection information

* **return:**
  EC_E_NOERROR on success, otherwise an error code.

### MbxGatewayCoeSdoDownload  (*wAddress*,  *wObIndex*,  *byObSubIndex*, [] *pbyData*,  *dwDataLen*,  *dwTimeout*,  *dwFlags*)

Initiate CoE SDO download transfer to mailbox gateway server. 

* **Param wAddress:**
  slave address to download the SDO
* **Param wObIndex:**
  object index
* **Param byObSubIndex:**
  object sub-index
* **Param pbyData:**
* **Param dwDataLen:**
* **Param dwTimeout:**
  Timeout in milliseconds
* **Param dwFlags:**
  mailbox transfer flags
* **Return:**
  Depends on the implementation of the function OsSetLastError(), normally returns EC_E_NOERROR if it succeeds or error code if it fails 

### MbxGatewayCoeSdoUpload  (*wAddress*,  *wObIndex*,  *byObSubIndex*, [] *pbyData*,  *dwDataLen*, *out*  *pdwOutDataLen*,  *dwTimeout*,  *dwFlags*)

Initiate CoE SDO upload transfer from mailbox gateway server. 

* **Param wAddress:**
  slave address to upload the SDO
* **Param wObIndex:**
  object index
* **Param byObSubIndex:**
  object sub-index
* **Param pbyData:**
* **Param dwDataLen:**
* **Param pdwOutDataLen:**
* **Param dwTimeout:**
  Timeout in milliseconds
* **Param dwFlags:**
  mailbox transfer flags, see EC_MAILBOX_FLAG
* **Return:**
  Depends on the implementation of the function OsSetLastError(), normally returns EC_E_NOERROR if it succeeds or error code if it fails 

### EnablePerformanceMeasuring  (*bEnable*)

Enables performance monitoring. For every master function, the notification “PerfNotification” will be called. 

* **Param bEnable:**
  True = Enables performance monitoring

### EnableTranslation  (*bEnable*)

Enables translation. For every master string, the notification “TranslateNotification” will be called. 

* **Param bEnable:**
  True = Enables translation

### OptimizeProcessPerformance ()

Optimize process performance. 

* **Return:**
  EC_E_NOERROR on success, otherwise an error code.

### GetErrorText  (*eErrorCode*)

Return text tokens by Error code from master stack. 

* **Param eErrorCode:**
  Error code
* **Return:**
  Error text for supplied error code

### ConfigureNetwork  (*oConfigFile*)

Configure the Master 
* **param oConfigFile:**
  File with configuration parameters

* **Return:**
  Error code

### ConfigureNetwork  (*tConfigType*,  *oConfigData*)

Configure the Master 
* **param tConfigType:**
  Enum type of configuration data provided
* **param oConfigData:**
  Configuration data (stream)

* **Return:**
  Error code

### ExecJob  (*eUserJob*)

Execute or initiate the requested master job. 

* **Param eUserJob:**
  Requested job.
* **Return:**
  Error code

### ExecJobProcessAllRxFrames (*out*  *bPrevCycProcessed*)

calls the process all rx frame job 

* **Param bPrevCycProcessed:**
  true: previous send frame was received and processed, false: otherwise
* **Return:**
  EC_NOERROR or error code

### ExecJobProcessAllRxFrames ()

calls the process all rx frame job 

* **Return:**
  EC_NOERROR or error code

### ExecJobSendCycFramesByTaskId  (*dwTaskId*)

sends a cycle frame by its task id 

* **Param dwTaskId:**
  task id of the cyclic frame
* **Return:**
  EC_NOERROR or error code

### ConvertMasterStringFromBytes ([] *abyData*,  *dwOffset*,  *dwLen*)

Converts a master string into UTF8 format. 

* **Param abyData:**
  Byte array to convert
* **Param dwOffset:**
  Offset
* **Param dwLen:**
  Length
* **Return:**
  Converted string

### ConvertMasterString  (*val*)

Converts a master string into UTF8 format. 

* **Param val:**
  String to convert.
* **Return:**
  Converted string.

### WaitForTimingTaskEvent ()

Waits for timing task event. 

* **Return:**
  Wait event was triggered

### EoeInstallEndpoint  (*bCreateTxEvent*,  *strInterfaceName*,  *strInterfaceGuid*)

Install EoE endpoint. 

* **Param bCreateTxEvent:**
  Create TX Event
* **Param strInterfaceName:**
  Interface name (optional)
* **Param strInterfaceGuid:**
  Interface guid (optional)
* **Return:**
  Error code

### EoeUninstallEndpoint ()

Uninstall EoE endpoint. 

* **Return:**
  Error code

### EoeTriggerTxEvent ()

Trigger TX Event, which must be called from JobTask after ExecJobProcessAllRxFrames() 

* **Return:**
  Error code

### ESCTypeText  (*byEscType*,  *bLong*)

Gets the text of corresponding ESC type. 

* **Param byEscType:**
  ESC type
* **Param bLong:**
  true: long text version, false: short text version
* **Return:**
  Text of corresponding ESC type

### SlaveVendorText  (*dwVendorId*)

Gets the text of slave vendor. 

* **Param dwVendorId:**
  Vendor ID
* **Return:**
  Text of slave vendor

### SlaveProdCodeText  (*dwVendorId*,  *dwProductCode*)

Gets the text of slave product code. 

* **Param dwVendorId:**
  Vendor ID
* **Param dwProductCode:**
  Product code
* **Return:**
  Text of slave product code

### SetBusCnfReadProp  (*eEscSiiReg*,  *dwTimeout*)

Sets read property for bus configuration. 

* **Param eEscSiiReg:**
  SII register
* **Param dwTimeout:**
  Time out of bus scan
* **Return:**
  Error code

### RestartScanBus  (*dwTimeout*,  *bReadRevisionNo*,  *bReadSerialNo*)

Trigger Bus Scan. 

* **Param dwTimeout:**
  Time out of bus scan
* **Param bReadRevisionNo:**
  Read revision number
* **Param bReadSerialNo:**
  Read serial number
* **Return:**
  Error code

### GetBusScanSlaveInfoDesc  (*wAutoIncAddr*, *out*  *oSlaveInfoDesc*)

This call will return the basic slave info determined in the last bus scan. 

* **Param wAutoIncAddr:**
  Auto increment address of the slave
* **Param oSlaveInfoDesc:**
  Out parameter that contains different slave information after the call
* **Return:**
  Error code

### GetScanBusStatus (*out*  *oSbStatus*)

Gets the status of the last bus scan. 

* **Param oSbStatus:**
  The last bus scan status
* **Return:**
  Error code

### CoeGetODList  (*dwSlaveId*,  *eListType*, *out* [] *pList*,  *dwLen*, *out*  *pdwOutLen*,  *dwTimeout*)

Gets a list of object Ids that are available in a slave. 

* **Param dwSlaveId:**
  slave ID
* **Param eListType:**
  Object list type. eODListType_ALL: Get all objects eODListType_RxPdoMap: Get PDO mappable objects eODListType_TxPdoMap: Get objects that can be changed eODListType_StoredFRepl: Get objects that are stored for a device replacement eODListType_StartupParm: Get objects that can be used as startup parameter
* **Param pList:**
  out Filled OD list
* **Param dwLen:**
  Length of list
* **Param pdwOutLen:**
  out Length of output list
* **Param dwTimeout:**
  Timeout
* **Return:**
  Error code

### CoeGetObjectDesc  (*dwSlaveId*,  *wIndex*, *out*  *oObjDesc*,  *dwTimeout*)

Determines the description of a specific object. 

* **Param dwSlaveId:**
  slave ID
* **Param wIndex:**
  Object index 
* **Param oObjDesc:**
  out Description of a specific object
* **Param dwTimeout:**
  Timeout
* **Return:**
  Error code

### CoeGetEntryDesc  (*dwSlaveId*,  *wIndex*,  *bySubIndex*,  *byValueInfoType*, *out*  *oEntryDesc*,  *dwTimeout*)

Determines the description of a specific object entry. 

* **Param dwSlaveId:**
  slave ID
* **Param wIndex:**
  Object index 
* **Param bySubIndex:**
  Object subindex 
* **Param byValueInfoType:**
  Bit mask to define which information to determine. The bit values are defined as follows: EC_COE_ENTRY_ObjAccess - Object access rights EC_COE_ENTRY_ObjCategory - Object category EC_COE_ENTRY_PdoMapping - Information if the object is PDO mappable EC_COE_ENTRY_UnitType - Unit EC_COE_ENTRY_DefaultValue - Default value EC_COE_ENTRY_MinValue - Minimum value EC_COE_ENTRY_MaxValue - Maximum value
* **Param oEntryDesc:**
  out Description of a specific object entry
* **Param dwTimeout:**
  Timeout
* **Return:**
  Error code

### MbxTferCreate  (*dwTferId*,  *dwBufferSize*, *out*  *pMbxTfer*)

Creates a mailbox transfer object. 

* **Param dwTferId:**
  transfer ID (optional, can be 0)
* **Param dwBufferSize:**
  buffer size
* **Param pMbxTfer:**
  out mailbox transfer object
* **Return:**
  Error code

### MbxTferReset  (*pMbxTfer*)

Creates a mailbox transfer object. 

* **Param pMbxTfer:**
  mailbox transfer object
* **Return:**
  Error code

### MbxTferDelete  (*pMbxTfer*)

Deletes a mailbox transfer object. 

A transfer object may only be deleted if it is in the Idle state.

* **Param pMbxTfer:**
  Mailbox transfer object created with emMbxTferCreate

### MbxTferWait  (*pMbxTfer*)

Waits until mailbox transfer is finished. 

* **Param pMbxTfer:**
  mailbox transfer object
* **Return:**
  Error code

### MbxTferCopyTo  (*pMbxTfer*, [] *abyData*,  *dwDataLen*)

Copies data to the mailbox transfer buffer. 

* **Param pMbxTfer:**
  pMbxTfer
* **Param abyData:**
  abyData
* **Param dwDataLen:**
  dwDataLen
* **Return:**
  Error code

### MbxTferCopyFrom  (*pMbxTfer*, [] *abyData*,  *dwDataLen*, *out*  *pdwOutDataLen*)

Copies data from the mailbox transfer buffer. 

* **Param pMbxTfer:**
  pMbxTfer
* **Param abyData:**
  abyData
* **Param dwDataLen:**
  dwDataLen
* **Param pdwOutDataLen:**
  pdwOutDataLen
* **Return:**
  Error code

### InitMotion ()

Initialize the motion. 

* **Return:**
  Error code

### DeinitMotion ()

Deinitialize the motion. 

* **Return:**
  Error code

### ControlMotion  (*dwCmd*, [] *pInData*,  *wDataLen*, *out* [] *pOutData*,  *wOutLen*)

Controls the motion. 

* **Param dwCmd:**
  Command
* **Param pObj:**
  Object
* **Param pInData:**
  Input data
* **Param wDataLen:**
  Length of in data
* **Param pOutData:**
  Output data
* **Param wOutLen:**
  Length of output data field
* **Return:**
  Error code

### ReadIdentifyObj  (*wFixedAddr*)

Reads the identify object of a slave. 

* **Param wFixedAddr:**
  Fixed station address

### AddDbgMsg  (*strDbgMsg*)

Adds a debug message to the print message queue. 

* **Param strDbgMsg:**
  debug message

### GetSlaveInfoEx  (*oReq*, *out*  *oRes*)

Gets the extended slave info determined in the last bus scan. 

* **Param oReq:**
  Request parameter
* **Param oRes:**
  The extended slave information structure
* **Return:**
  Error code

### ForceSlvStatCollection ()

Sends datagrams to collect slave statistics counters. 

* **Return:**
  Error code

### GetSlvStatistics  (*dwSlaveId*, *out*  *oStatistics*)

Returns slave statistics counters. 

* **Param dwSlaveId:**
  Slave ID
* **Param oStatistics:**
  out Statistics counters
* **Return:**
  Error code

### GetCyclicConfigInfo (*out* [] *oCyclicConfigInfo*)

Returns an array of cyclic tasks. 

* **Param oCyclicConfigInfo:**
  out Array of cyclic tasks
* **Return:**
  Error code

### SetAllSlavesMustReachState  (*bAllSlavesMustReachState*)

Sets flag that all slaves must reach the requested master state. 

* **Param bAllSlavesMustReachState:**
  EC_TRUE: All slaves must reach the requested master state
* **Return:**
  Error code

### SetAdditionalVariablesForSpecificDataTypesEnabled  (*bAdditionalVariablesForSpecificDataTypes*)

Sets flag to enable additional variables for specific data types. 

* **Param bAdditionalVariablesForSpecificDataTypes:**
  EC_TRUE: Enable additional variables for specific data types
* **Return:**
  Error code

### EnableNotification  (*dwClientId*,  *tNotifyCode*,  *bEnable*)

Enables notification. 

* **Param dwClientId:**
  Client Id
* **Param tNotifyCode:**
  Code of notification, which should be enabled
* **Param bEnable:**
  EC_TRUE: Enables notification
* **Return:**
  Error code

### ThrottleNotification  (*tNotifyCode*,  *dwTimeout*)

Throttles notification. 

* **Param tNotifyCode:**
  Code of notification, which should be throttled
* **Param dwTimeout:**
  0 = Not throttled, > 0 = Throttle timeout in ms
* **Return:**
  Error code

### SdoUploadMasterOd  (*wObIndex*,  *dwTimeout*, *out*  *pobjMasterOd*)

SdoUpload from Master Object Dictionary. 

* **Param wObIndex:**
  Object index
* **Param dwTimeout:**
  Timeout in milliseconds
* **Param pobjMasterOd:**
  Read object (e.g. DN_EC_T_OBJ3XXX, EC_T_OBJ8XXX, EC_T_OBJ9XXX …)
* **Return:**
  Error code

### ReadSlaveEEPRom  (*bFixedAddressing*,  *wSlaveAddress*,  *wEEPRomStartOffset*, [] *pwReadData*,  *dwReadLen*, *out*  *pdwNumOutData*,  *dwTimeout*)

Read EEPRom data from slave. 

* **Param bFixedAddressing:**
  EC_TRUE: use station addressing, EC_FALSE: use auto increment addressing
* **Param wSlaveAddress:**
  Slave Address, station or auto increment address depending on bFixedAddressing
* **Param wEEPRomStartOffset:**
  Address to start EEPRom Read from
* **Param pwReadData:**
  Pointer to ushort array to carry the read data
* **Param dwReadLen:**
  Size of the ushort array provided at pwReadData (in ushorts)
* **Param pdwNumOutData:**
  out Pointer to uint carrying actually read data (in ushorts) after completion
* **Param dwTimeout:**
  Timeout in milliseconds. The function will block at most for this time. The timeout value must not be set to EC_NOWAIT
* **Return:**
  Error code

### ReadSlaveEEPRomWithReq  (*dwClientId*,  *dwTferId*,  *bFixedAddressing*,  *wSlaveAddress*,  *wEEPRomStartOffset*, [] *pwReadData*,  *dwReadLen*, *out*  *pdwNumOutData*,  *dwTimeout*)

Read EEPRom data from slave (REQ) 

* **Param dwClientId:**
  Client ID returned by RegisterClient (0 if all registered clients shall be notified)
* **Param dwTferId:**
  Transfer ID. The application can set this ID to identify the transfer. It will be passed back to the application within EC_T_EEPROM_OPERATION_NTFY_DESC.
* **Param bFixedAddressing:**
  EC_TRUE: use station addressing, EC_FALSE: use auto increment addressing
* **Param wSlaveAddress:**
  Slave Address, station or auto increment address depending on bFixedAddressing
* **Param wEEPRomStartOffset:**
  Address to start EEPRom Read from
* **Param pwReadData:**
  Pointer to ushort array to carry the read data
* **Param dwReadLen:**
  Size of the ushort array provided at pwReadData (in ushorts)
* **Param pdwNumOutData:**
  out Pointer to uint carrying actually read data (in ushorts) after completion
* **Param dwTimeout:**
  Timeout in milliseconds. The function will block at most for this time. The timeout value must not be set to EC_NOWAIT
* **Return:**
  Error code

### WriteSlaveEEPRom  (*bFixedAddressing*,  *wSlaveAddress*,  *wEEPRomStartOffset*, [] *pwWriteData*,  *dwWriteLen*,  *dwTimeout*)

Write EEPRom data from slave. 

* **Param bFixedAddressing:**
  EC_TRUE: use station addressing, EC_FALSE: use auto increment addressing
* **Param wSlaveAddress:**
  Slave Address, station or auto increment address depending on bFixedAddressing
* **Param wEEPRomStartOffset:**
  Address to start EEPRom Write from
* **Param pwWriteData:**
  Pointer to WORD array carrying the write data.
* **Param dwWriteLen:**
  Sizeof Write Data WORD array (in WORDS)
* **Param dwTimeout:**
  Timeout in milliseconds. The function will block at most for this time. The timeout value must not be set to EC_NOWAIT
* **Return:**
  Error code

### WriteSlaveEEPRomWithReq  (*dwClientId*,  *dwTferId*,  *bFixedAddressing*,  *wSlaveAddress*,  *wEEPRomStartOffset*, [] *pwWriteData*,  *dwWriteLen*,  *dwTimeout*)

Write EEPRom data from slave (REQ) 

* **Param dwClientId:**
  Client ID returned by RegisterClient (0 if all registered clients shall be notified)
* **Param dwTferId:**
  Transfer ID. The application can set this ID to identify the transfer. It will be passed back to the application within EC_T_EEPROM_OPERATION_NTFY_DESC.
* **Param bFixedAddressing:**
  EC_TRUE: use station addressing, EC_FALSE: use auto increment addressing
* **Param wSlaveAddress:**
  Slave Address, station or auto increment address depending on bFixedAddressing
* **Param wEEPRomStartOffset:**
  Address to start EEPRom Write from
* **Param pwWriteData:**
  Pointer to WORD array carrying the write data.
* **Param dwWriteLen:**
  Sizeof Write Data WORD array (in WORDS)
* **Param dwTimeout:**
  Timeout in milliseconds. The function will block at most for this time. The timeout value must not be set to EC_NOWAIT
* **Return:**
  Error code

### InitInstance  (*oParms*)

Initializes EtherCAT wrapper. 

* **Param oParms:**
  Parameters
* **Return:**
  Error code

### DeinitInstance ()

Deinitialize EtherCAT wrapper. 

* **Return:**
  Error code

### ConnectPorts  (*wCfgFixedAddress1*,  *byPort1*,  *wCfgFixedAddress2*,  *byPort2*)

Connect a slave ESC port to another slave ESC port or to a network adapter. 

* **Param wCfgFixedAddress1:**
* **Param byPort1:**
* **Param wCfgFixedAddress2:**
* **Param byPort2:**
* **Return:**
  EC_E_NOERROR or error code. 

### PerfMeasAppCreate  (*pPerfMeasAppParms*, *out*  *ppvPerfMeas*)

Create PerfMeas object and bind it to the master instance. 

This API can be called multiple times to create PerfMeas objects. The perfomance counters in each of the objects can be accessed in the following two ways:
* by passing the PerfMeas object and the index of the performance measurement. The index ranges from [0-pPerfMeasAppParms->dwNumAppMeas]
* by passing EC_NULL instead of a PerfMeas object and an index. In this case the index works across all PerfMeas objects bound to the master instance.

* **Param pPerfMeasAppParms:**
  Pointer to parameter definitions
* **Param ppvPerfMeas:**
  Created PerfMeas object.
* **Return:**
  EC_E_NOERROR or an error code 

### PerfMeasAppDelete  (*pvPerfMeas*)

Delete application performance measurement and unbind it from the master instance. 

Objects which are not deleted using PerfMeasAppDelete are automatically deleted when calling DeinitMaster.

#### NOTE
This invalidates the global index used when passing EC_NULL into the other PerfMeasApp functions

* **Param pvPerfMeas:**
  PerfMeas object to delete
* **Return:**
  EC_E_NOERROR or an error code 

### PerfMeasAppStart  (*pvPerfMeas*,  *dwIndex*)

Start application performance measurement. 

* **Param pvPerfMeas:**
  PerfMeas object or EC_NULL to use continuous index
* **Param dwIndex:**
  Index of the performance measurement
* **Return:**
  EC_E_NOERROR or an error code 

### PerfMeasAppEnd  (*pvPerfMeas*,  *dwIndex*)

Stop application performance measurement. 

* **Param pvPerfMeas:**
  PerfMeas object or EC_NULL to use continuous index
* **Param dwIndex:**
  Index of the performance measurement
* **Return:**
  EC_E_NOERROR or an error code 

### PerfMeasAppReset  (*pvPerfMeas*,  *dwIndex*)

Reset application performance measurement. 

* **Param pvPerfMeas:**
  PerfMeas object or EC_NULL to use continuous index
* **Param dwIndex:**
  Index of the performance measurement, use 0xFFFFFFFF to reset all
* **Return:**
  EC_E_NOERROR or an error code 

### PerfMeasAppGetRaw  (*pvPerfMeas*,  *dwIndex*, [] *pPerfMeasVal*, [] *pPerfMeasHistogram*,  *dwPerfMeasNumOf*)

Get raw data of one/all application performance measurement. 

* **Param pvPerfMeas:**
  PerfMeas object or EC_NULL to use continuous index
* **Param dwIndex:**
  Index of the performance measurement, use 0xFFFFFFFF to get all
* **Param pPerfMeasVal:**
  Pointer to a buffer receiving one/all performance measurement values or EC_NULL
* **Param pPerfMeasHistogram:**
  Pointer to a buffer receiving one/all performance measurement histograms or EC_NULL
* **Param dwPerfMeasNumOf:**
  Number of elements allocated in pPerfMeasVal and pPerfMeasHistogram
* **Return:**
  EC_E_NOERROR or an error code 

### PerfMeasAppGetInfo  (*pvPerfMeas*,  *dwIndex*, *out* [] *pPerfMeasInfo*,  *dwPerfMeasNumOf*)

Get general info about one/all application performance measurement. 

* **Param pvPerfMeas:**
  PerfMeas object or EC_NULL to use continous index
* **Param dwIndex:**
  Index of the performance measurement information, use 0xFFFFFFFF to get all
* **Param pPerfMeasInfo:**
  Pointer to a buffer receiving one/all performance measurement information
* **Param dwPerfMeasNumOf:**
  Number of elements allocated in pPerfMeasInfo
* **Return:**
  EC_E_NOERROR or an error code 

### PerfMeasAppGetNumOf  (*pvPerfMeas*, *out*  *pdwNumOf*)

Reset number of application performance measurement. 

* **Param pvPerfMeas:**
  PerfMeas object or EC_NULL to get the number of performance measurements in all PerfMeas objects
* **Param pdwNumOf:**
  Number of performance measurements
* **Return:**
  EC_E_NOERROR or an error code 

### PerfMeasResetByTaskId  (*dwTaskId*,  *dwIndex*)

Reset internal performance measurement. 

* **Param dwTaskId:**
  Task Job ID
* **Param dwIndex:**
  Index of the performance measurement, use 0xFFFFFFFF to reset all
* **Return:**
  EC_E_NOERROR or an error code 

### PerfMeasGetRawByTaskId  (*dwTaskId*,  *dwIndex*, [] *pPerfMeasVal*, [] *pPerfMeasHistogram*,  *dwPerfMeasNumOf*)

Get raw data of one/all application performance measurement. 

* **Param dwTaskId:**
  Task Job ID
* **Param dwIndex:**
  Index of the performance measurement, use 0xFFFFFFFF to get all
* **Param pPerfMeasVal:**
  Pointer to a buffer receiving one/all performance measurement values or EC_NULL
* **Param pPerfMeasHistogram:**
  Pointer to a buffer receiving one/all performance measurement histograms or EC_NULL
* **Param dwPerfMeasNumOf:**
  Number of elements allocated in pPerfMeasVal and pPerfMeasHistogram
* **Return:**
  EC_E_NOERROR or an error code 

### PerfMeasGetInfoByTaskId  (*dwTaskId*,  *dwIndex*, *out* [] *pPerfMeasInfo*,  *dwPerfMeasNumOf*)

Get general info about one/all internal performance measurement. 

* **Param dwTaskId:**
  Task Job ID
* **Param dwIndex:**
  Index of the performance measurement, use 0xFFFFFFFF to get all
* **Param pPerfMeasInfo:**
  Pointer to a buffer receiving one/all performance measurement infos
* **Param dwPerfMeasNumOf:**
  Number of elements allocated in pPerfMeasInfo
* **Return:**
  EC_E_NOERROR or an error code 

### PerfMeasGetNumOfByTaskId  (*dwTaskId*, *out*  *pdwNumOf*)

Reset number of internal performance measurement. 

* **Param dwTaskId:**
  Task Job ID
* **Param pdwNumOf:**
  Number of performance measurements
* **Return:**
  EC_E_NOERROR or an error code 

### SetLogParms  (*pLogParms*)

Sets log parameters. Used to change the parameters provided by emInitMaster(). 

EC_MONITOR Sets log parameters. Used to change the parameters provided by emonInitMonitor().

EC_SIMULATOR Sets log parameters. Used to change the parameters provided by esInitSimulator().

* **Param pLogParms:**
  New Log parameters
* **Return:**

### IoCtl  (*dwCode*, [] *pbyInBuf*,  *dwInBufSize*, [] *pbyOutBuf*,  *dwOutBufSize*, *out*  *pdwNumOutData*)

A generic control interface between the application, the EtherCAT stack and its Link Layers. 

* **Param dwCode:**
  IOCTL code (EC_IOCTL…)
* **Param pbyInBuf:**
  IOCTL input parameters
* **Param dwInBufSize:**
  Size of IOCTL input parameters in bytes
* **Param pbyOutBuf:**
  Buffer for IOCTL output
* **Param dwOutBufSize:**
  Size of buffer at pbyOutBuf in bytes
* **Param pdwNumOutData:**
  Amount of bytes written to pbyOutBuf by IOCTL. EC_NULL: amount not set by IOCTL.
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer
  * EC_E_NOMEMORY if memory cannot be allocated
  * EC_E_ADS_IS_RUNNING if the ADS server is running 

### ScanBus  (*dwTimeout*)

Scans all connected slaves. 

Scans all connected slaves connected to EC-Master. If a configuration has been loaded, a validation between the configuration and the connected slaves is done. This function should not be called from within the JobTask’s context.

* **Param dwTimeout:**
  Timeout [ms]
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range
  * EC_E_LINK_DISCONNECTED if link is disconnected
  * EC_E_TIMEOUT if dwTimeout elapsed during the API call
  * EC_E_BUSCONFIG_MISMATCH if the slaves found do not match the configured ones
  * EC_E_LINE_CROSSED if a line crossed (cabling wrong) condition has been detected
  * EC_E_REDLINEBREAK if cable redundancy is configured and a line break condition has been detected
  * EC_E_JUNCTION_RED_LINE_BREAK if junction redundancy is configured and a line break condition has been detected
  * EC_E_MAX_BUS_SLAVES_EXCEEDED if the amount of slaves found exceeds EC_T_INIT_MASTER_PARMS.dwMaxBusSlaves
  * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive
  * EC_E_ADS_IS_RUNNING if the ADS server is running 

### ConfigureNetwork  (*eCnfType*, [] *pbyCnfData*,  *dwCnfDataLen*)

Configure the Network. 

This function must be called after the initialization. Among others the EtherCAT topology defined in the given XML configuration file will be stored internally.

A client must not be registered prior to calling this function. Existing client registrations will be dropped.

* **Param eCnfType:**
  Type of configuration data provided
* **Param pbyCnfData:**
  Filename / configuration data, or EC_NULL if eCnfType is
* **Param dwCnfDataLen:**
  Length of configuration data in byte, or zero if eCnfType is
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized or eCnfType is eCnfType_GenPreopENI or eCnfType_GenOpENI and link is disconnected
  * EC_E_INVALIDPARM if dwInstanceID is out of range or pParms is EC_NULL contains some values out of range
  * EC_E_LINK_DISCONNECTED if link is disconnected
  * EC_E_FEATURE_DISABLED if a configured feature is not included in the license key
  * EC_E_NOTSUPPORTED if a configured feature is not supported (e.g not compiled in the library)
  * EC_E_CFGFILENOTFOUND if the ENI file cannot be found
  * EC_E_WRONG_FORMAT if format errors have been detected in the ENI or EEPROM in case of eCnfType_GenPreopENI or eCnfType_GenOpENI
  * EC_E_OEM_SIGNATURE_MISMATCH if the OEM signature in the ENI file doesn’t match the used OEM key
  * EC_E_ENI_ENCRYPTION_WRONG_VERSION if the ENI encryption version is not supported (e.g. the library is too old)
  * EC_E_ENI_ENCRYPTED if the ENI is encrypted and no OEM key has been set
  * EC_E_XML_CYCCMDS_MISSING if the ENI doesn’t contain cyclic commands
  * EC_E_XML_ALSTATUS_READ_MISSING if the ENI doesn’t contain any read AL status command
  * EC_E_XML_CYCCMDS_SIZEMISMATCH if the size of the cyclic commands in the ENI mismatch
  * EC_E_XML_INVALID_INP_OFF if some input offsets in the ENI are invalid
  * EC_E_XML_INVALID_OUT_OFF if some output offsets in the ENI are invalid
  * EC_E_XML_INVALID_CMD_WITH_RED if the ENI contains LRW commands and cable redundancy is configured
  * EC_E_XML_PREV_PORT_MISSING if some previous port information are missing in the ENI
  * EC_E_XML_DC_CYCCMDS_MISSING if the DC related cyclic commands are missing in the ENI
  * EC_E_XML_AOE_NETID_INVALID if the ENI contains some invalid NetID 

### IsConfigured (*out*  *pbIsConfigured*)

Returns if configuration has been applied. 

* **Param pbIsConfigured:**
  EC_TRUE if configuration has been applied
* **Return:**
  EC_E_NOERROR or error code 

### GetMasterState ()

Get the EtherCAT master current state. 

* **Return:**
  EtherCAT master state 

### GetMasterStateEx (*out*  *pwCurrState*, *out*  *pwReqState*)

Get the EtherCAT master current and requested state. Possible return values for current and requested state: 

* #DEVICE_STATE_UNKNOWN
* #DEVICE_STATE_INIT
* #DEVICE_STATE_PREOP
* #DEVICE_STATE_SAFEOP
* #DEVICE_STATE_OP

* **Param pwCurrState:**
  Current master state
* **Param pwReqState:**
  Requested master state
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range or the output pointers are EC_NULL 

### GetSlaveId  (*wStationAddress*)

Determines the slave ID using the slave station address. 

* **Param wStationAddress:**
  Station address of the slave
* **Return:**
  Slave ID or INVALID_SLAVE_ID if the slave could not be found or the stack is not initialized 

### GetSlaveFixedAddr  (*dwSlaveId*, *out*  *pwFixedAddr*)

Determine slave station address according to its slave ID. 

* **Param dwSlaveId:**
  Slave ID
* **Param pwFixedAddr:**
  Corresponding fixed address
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range or the output pointer is EC_NULL
  * EC_E_NOTFOUND if no slave matching dwSlaveId can be found 

### GetSlaveIdAtPosition  (*wAutoIncAddress*)

Determines the slave ID using the slave auto increment address. 

* **Param wAutoIncAddress:**
  Auto increment address of the slave
* **Return:**
  Slave ID or INVALID_SLAVE_ID if no slave matching wAutoIncAddress can be found 

### GetSlaveProp  (*dwSlaveId*, *out*  *pSlaveProp*)

Determines the properties of the slave device. 

* **Param dwSlaveId:**
  Slave ID
* **Param pSlaveProp:**
  Slave properties
* **Return:**
  EC_TRUE if the slave exists, EC_FALSE if no slave matching dwSlaveId can be found 

### GetSlaveState  (*dwSlaveId*, *out*  *pwCurrDevState*, *out*  *pwReqDevState*)

Get the slave state. 

The slave state is always read automatically from the AL_STATUS register whenever necessary. It is not forced by calling this function. This function may be called from within the JobTask’s context.

* **Param dwSlaveId:**
  Slave ID
* **Param pwCurrDevState:**
  Current slave state
* **Param pwReqDevState:**
  Requested slave state
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range or the output pointers are EC_NULL
  * EC_E_SLAVE_NOT_PRESENT if the slave is not present
  * EC_E_NOTFOUND if no slave matching dwSlaveId can be found 

### SetSlaveState  (*dwSlaveId*,  *wDeviceState*,  *dwTimeout*)

Set a specified slave into the requested EtherCAT state. 

The requested state shall not be higher than the overall operational state. DEVICE_STATE_BOOTSTRAP can only be requested if the slave’s state is INIT. This function may not be called from within the JobTask’s context.

If the function is called with EC_NOWAIT, the client may wait for reaching the requested state using the notification callback (EC_NOTIFY_SLAVE_STATECHANGED).

* **Param dwSlaveId:**
  Slave ID
* **Param wDeviceState:**
  Requested device state. See DEVICE_STATES
* **Param dwTimeout:**
  Timeout [ms]. This function will block until the requested state is reached or the timeout elapsed. If the timeout value is set to EC_NOWAIT the function will return immediately.
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized or denies the requested state, see comments below
  * EC_E_INVALIDPARM if dwInstanceID is out of range or BOOTSTRAP was requested for a slave that does not support it
  * EC_E_NOTFOUND if no slave matching dwSlaveId can be found
  * EC_E_TIMEOUT if dwTimeout elapsed during the API call
  * EC_E_BUSY if the EtherCAT stack cannot execute the request at this time, the function has to be called at a later time
  * EC_E_NOTREADY if the working counter was not set when requesting the slave’s state (slave may not be connected or did not respond)
  * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive 

### GetProcessVarInfoNumOf  (*eVarDirection*,  *eVarSource*,  *bFixedAddress*,  *wSlaveAddress*, *out*  *pdwProcessVarInfoNumOf*)

Get process variables information. 

* **Param eVarDirection:**
  INPUTs, OUTPUTs, … . See EC_T_VAR_DIRECTION .
* **Param eVarSource:**
  Slave, Master, … . See EC_T_VAR_SOURCE .
* **Param bFixedAddress:**
  Use station address if EC_TRUE. Otherwise use AutoInc address.
* **Param wSlaveAddress:**
  Slave address according to bFixedAddress
* **Param pdwProcessVarInfoNumOf:**
  Process variables count
* **Return:**
  EC_E_NOERROR or error code 

### GetProcessVarInfoEx  (*eVarDirection*,  *eVarSource*,  *bFixedAddress*,  *wSlaveAddress*, *out* [] *aoVarInfo*,  *dwMaxProcessVarInfoNumOf*, *out*  *pdwProcessVarInfoNumOf*)

Get process variables information. 

* **Param eVarDirection:**
  INPUTs, OUTPUTs, … . See EC_T_VAR_DIRECTION .
* **Param eVarSource:**
  Slave, Master, … . See EC_T_VAR_SOURCE .
* **Param bFixedAddress:**
  Use station address if EC_TRUE. Otherwise use AutoInc address.
* **Param wSlaveAddress:**
  Slave address according to bFixedAddress
* **Param aoVarInfo:**
  The read process variable extended information entries
* **Param dwMaxProcessVarInfoNumOf:**
* **Param pdwProcessVarInfoNumOf:**
* **Return:**
  EC_E_NOERROR or error code 

### TferSingleRawCmd  (*eCmd*,  *dwMemoryAddress*, [] *pbyData*,  *wLen*,  *dwTimeout*)

Transfers a single raw EtherCAT command to one or multiple slaves and waits for the result. 

Using this function it is possible to exchange arbitrary data between the master and the slaves. When the master receives the response to the queued frame it raises EC_NOTIFY_RAWCMD_DONE to all clients. This function blocks until the command is completely processed. In case of read commands the slave data will be written back into the given memory area. If a timeout occurs (e.g. due to a bad line quality) the corresponding frame will be sent again. The timeout value and retry counter can be set using the master configuration parameters dwEcatCmdTimeout and dwEcatCmdMaxRetries. The call will return in any case (without waiting for the number of retries specified in dwEcatCmdMaxRetries) if the time determined with the dwTimeout parameter elapsed. Caveat: Using auto increment addressing (APRD, APWR, APRW) may lead to unexpected results in case the selected slave does not increment the working counter. In such cases the EtherCAT command would be handled by the slave directly behind the selected one. This function may not be called from within the JobTask’s context.

* **Param eCmd:**
  EtherCAT command type. See EC_T_CMD
* **Param dwMemoryAddress:**
  Slave memory address, depending on the command to be sent this is either a physical or a logical address
* **Param pbyData:**
  [in, out] Buffer containing or receiving transferred data
* **Param wLen:**
  Number of bytes to transfer
* **Param dwTimeout:**
  Timeout [ms]
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range or the command is not supported or the timeout value is set to EC_NOWAIT
  * EC_E_TIMEOUT if dwTimeout elapsed during the API call
  * EC_E_BUSY if another transfer request is already pending or the master or the corresponding slave is currently changing its operational state
  * EC_E_NOTREADY if the working counter was not set when sending the command (slave may not be connected or did not respond)
  * EC_E_INVALIDSIZE if the size of the complete command does not fit into a single Ethernet frame. The maximum amount of data to transfer must not exceed 1486 bytes.
  * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive 

### ReadSlaveRegister  (*bFixedAddressing*,  *wSlaveAddress*,  *wRegisterOffset*, [] *pbyData*,  *wLen*,  *dwTimeout*)

Reads data from the ESC memory that have so far been transferred to a slave and received by the EC-Monitor. 

!(EC_MONITOR) Reads data from the ESC memory of a specified slave.

This function may not be called from within the JobTask’s context.

* **Param bFixedAddressing:**
  EC_TRUE: use station address, EC_FALSE: use AutoInc address
* **Param wSlaveAddress:**
  Slave address according bFixedAddressing
* **Param wRegisterOffset:**
  Register offset. I.e. use 0x0130 to read the AL Status register.
* **Param pbyData:**
  Buffer receiving transfered data
* **Param wLen:**
  Number of bytes to receive
* **Param dwTimeout:**
  Timeout [ms]
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range or the command is not supported or the timeout value is set to EC_NOWAIT
  * EC_E_SLAVE_NOT_PRESENT if the slave is not present
  * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found
  * EC_E_TIMEOUT if dwTimeout elapsed during the API call
  * EC_E_BUSY if another transfer request is already pending or the master or the corresponding slave is currently changing its operational state
  * EC_E_NOTREADY if the working counter was not set when sending the command (slave may not be connected or did not respond)
  * EC_E_INVALIDSIZE if the size of the complete command does not fit into a single Ethernet frame. The maximum amount of data to transfer must not exceed 1486 bytes. 

### WriteSlaveRegister  (*bFixedAddressing*,  *wSlaveAddress*,  *wRegisterOffset*, [] *pbyData*,  *wLen*,  *dwTimeout*)

Writes data into the ESC memory of a specified slave. 

This function may not be called from within the JobTask’s context

Changing contents of ESC registers may lead to unpredictable behavior of the slaves and/or the master.

* **Param bFixedAddressing:**
  EC_TRUE: use station address, EC_FALSE: use AutoInc address
* **Param wSlaveAddress:**
  Slave address according bFixedAddressing
* **Param wRegisterOffset:**
  Register offset. E.g. use 0x0120 to write to the AL Control register.
* **Param pbyData:**
  Buffer containing transfered data
* **Param wLen:**
  Number of bytes to send
* **Param dwTimeout:**
  Timeout [ms]
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range or the command is not supported or the timeout value is set to EC_NOWAIT
  * EC_E_SLAVE_NOT_PRESENT if slave not present
  * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found
  * EC_E_TIMEOUT if dwTimeout elapsed during the API call
  * EC_E_BUSY if another transfer request is already pending or the master or the corresponding slave is currently changing its operational state
  * EC_E_NOTREADY if the working counter was not set when sending the command (slave may not be connected or did not respond)
  * EC_E_INVALIDSIZE if the size of the complete command does not fit into a single Ethernet frame. The maximum amount of data to transfer must not exceed 1486 bytes. 

### GetNumConfiguredSlaves ()

Returns the number of slaves which are configured in the ENI. 

* **Return:**
  Number of slaves 

### CoeSdoDownloadReq  (*pMbxTfer*,  *dwSlaveId*,  *wObIndex*,  *byObSubIndex*,  *dwTimeout*,  *dwFlags*)

Initiates a CoE SDO download to an EtherCAT slave device and returns immediately. 

The length of the data to be downloaded must be set in EC_T_MBXTFER.dwDataLen. A unique transfer ID must be written into EC_T_MBXTFER.dwTferId. EC_NOTIFY_MBOXRCV is given on completion.

* **Param pMbxTfer:**
  Mailbox transfer object
* **Param dwSlaveId:**
  Slave ID
* **Param wObIndex:**
  Object index
* **Param byObSubIndex:**
  Object sub index. If Complete Access only 0 or 1 allowed.
* **Param dwTimeout:**
  Timeout [ms]
* **Param dwFlags:**
  Mailbox Flags. Bit 0: set if Complete Access (EC_MAILBOX_FLAG_SDO_COMPLETE).
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT
  * EC_E_NOMEMORY if the mailbox protocol queue of the slave is full
  * EC_E_SLAVE_NOT_PRESENT if the slave is not present
  * EC_E_NOTFOUND if no slave matching dwSlaveId can be found
  * EC_E_NO_MBX_SUPPORT if the slave has no mailbox support
  * EC_E_INVALID_SLAVE_STATE if the slave is in an invalid state for mailbox transfer
  * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive
  * EC_E_ADS_IS_RUNNING if the ADS server is running
  * EC_ERROR_CODES_COE “CoE SDO error code” 

### CoeSdoDownload  (*dwSlaveId*,  *wObIndex*,  *byObSubIndex*, [] *pbyData*,  *dwDataLen*,  *dwTimeout*,  *dwFlags*)

Initiates a CoE SDO download to an EtherCAT slave device and returns immediately. 

The length of the data to be downloaded must be set in EC_T_MBXTFER.dwDataLen. A unique transfer ID must be written into EC_T_MBXTFER.dwTferId. EC_NOTIFY_MBOXRCV is given on completion.

* **Param dwSlaveId:**
  Slave ID
* **Param wObIndex:**
  Object index
* **Param byObSubIndex:**
  Object sub index. If Complete Access only 0 or 1 allowed.
* **Param pbyData:**
* **Param dwDataLen:**
* **Param dwTimeout:**
  Timeout [ms]
* **Param dwFlags:**
  Mailbox Flags. Bit 0: set if Complete Access (EC_MAILBOX_FLAG_SDO_COMPLETE).
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT
  * EC_E_NOMEMORY if the mailbox protocol queue of the slave is full
  * EC_E_SLAVE_NOT_PRESENT if the slave is not present
  * EC_E_NOTFOUND if no slave matching dwSlaveId can be found
  * EC_E_NO_MBX_SUPPORT if the slave has no mailbox support
  * EC_E_INVALID_SLAVE_STATE if the slave is in an invalid state for mailbox transfer
  * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive
  * EC_E_ADS_IS_RUNNING if the ADS server is running
  * EC_ERROR_CODES_COE “CoE SDO error code” 

### CoeSdoUploadReq  (*pMbxTfer*,  *dwSlaveId*,  *wObIndex*,  *byObSubIndex*,  *dwTimeout*,  *dwFlags*)

Initiates a CoE SDO upload from an EtherCAT slave device to the master and returns immediately. 

A unique transfer ID must be written into EC_T_MBXTFER.dwTferId. EC_NOTIFY_MBOXRCV is given on completion.

* **Param pMbxTfer:**
  Mailbox transfer object created with emMbxTferCreate
* **Param dwSlaveId:**
  Slave ID
* **Param wObIndex:**
  Object index
* **Param byObSubIndex:**
  Object sub index. If Complete Access only 0 or 1 allowed.
* **Param dwTimeout:**
  Timeout [ms]
* **Param dwFlags:**
  Mailbox Flags. Bit 0: set if Complete Access (EC_MAILBOX_FLAG_SDO_COMPLETE).
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT
  * EC_E_NOMEMORY if the mailbox protocol queue of the slave is full
  * EC_E_SLAVE_NOT_PRESENT if slave not present
  * EC_E_NOTFOUND if no slave matching dwSlaveId can be found
  * EC_E_NO_MBX_SUPPORT if slave has no mailbox support
  * EC_E_INVALID_SLAVE_STATE if slave is in an invalid state for mailbox transfer
  * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive
  * EC_E_ADS_IS_RUNNING if the ADS server is running
  * EC_ERROR_CODES_COE “CoE SDO error code” 

### CoeSdoUpload  (*dwSlaveId*,  *wObIndex*,  *byObSubIndex*, [] *pbyData*,  *dwDataLen*, *out*  *pdwOutDataLen*,  *dwTimeout*,  *dwFlags*)

Initiates a CoE SDO upload from an EtherCAT slave device to the master and returns immediately. 

A unique transfer ID must be written into EC_T_MBXTFER.dwTferId. EC_NOTIFY_MBOXRCV is given on completion.

* **Param dwSlaveId:**
  Slave ID
* **Param wObIndex:**
  Object index
* **Param byObSubIndex:**
  Object sub index. If Complete Access only 0 or 1 allowed.
* **Param pbyData:**
* **Param dwDataLen:**
* **Param pdwOutDataLen:**
* **Param dwTimeout:**
  Timeout [ms]
* **Param dwFlags:**
  Mailbox Flags. Bit 0: set if Complete Access (EC_MAILBOX_FLAG_SDO_COMPLETE).
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT
  * EC_E_NOMEMORY if the mailbox protocol queue of the slave is full
  * EC_E_SLAVE_NOT_PRESENT if slave not present
  * EC_E_NOTFOUND if no slave matching dwSlaveId can be found
  * EC_E_NO_MBX_SUPPORT if slave has no mailbox support
  * EC_E_INVALID_SLAVE_STATE if slave is in an invalid state for mailbox transfer
  * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive
  * EC_E_ADS_IS_RUNNING if the ADS server is running
  * EC_ERROR_CODES_COE “CoE SDO error code” 

### CoeGetODListReq  (*pMbxTfer*,  *dwSlaveId*,  *eListType*,  *dwTimeout*)

Initiates retrieval of a list of object IDs that have so far been transferred to a slave and received by the EC-Monitor and returns immediately. 

!(EC_MONITOR) Initiates retrieval of a list of object IDs that are available in a slave and returns immediately.

A unique transfer ID must be written into EC_T_MBXTFER.dwTferId. EC_NOTIFY_MBOXRCV is given on completion.

The mailbox transfer object will receive the slave response containing the list type followed by the list itself. Therefore the buffer must be 2 bytes bigger than the expected list size.

* **Param pMbxTfer:**
  Mailbox transfer
* **Param dwSlaveId:**
  Slave ID
* **Param eListType:**
  Which object types shall be transferred
* **Param dwTimeout:**
  Timeout [ms]
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT
  * EC_E_NOMEMORY if the mailbox protocol queue of the slave is full
  * EC_E_SLAVE_NOT_PRESENT if slave not present
  * EC_E_NOTFOUND if no slave matching dwSlaveId can be found
  * EC_E_NO_MBX_SUPPORT if slave has no mailbox support
  * EC_E_INVALID_SLAVE_STATE if slave is in an invalid state for mailbox transfer
  * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive
  * EC_E_ADS_IS_RUNNING if ADS server is running
  * EC_ERROR_CODES_COE “CoE SDO error code” 

### CoeGetObjectDescReq  (*pMbxTfer*,  *dwSlaveId*,  *wObIndex*,  *dwTimeout*)

Initiates retrieval of the description of a specific object and returns immediately. 

A unique transfer ID must be written into EC_T_MBXTFER.dwTferId. EC_NOTIFY_MBOXRCV is given on completion.

* **Param pMbxTfer:**
  Mailbox transfer object
* **Param dwSlaveId:**
  Slave ID
* **Param wObIndex:**
  Object index
* **Param dwTimeout:**
  Timeout [ms]
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT
  * EC_E_NOMEMORY if the mailbox protocol queue of the slave is full
  * EC_E_SLAVE_NOT_PRESENT if slave not present
  * EC_E_NOTFOUND if no slave matching dwSlaveId can be found
  * EC_E_NO_MBX_SUPPORT if slave has no mailbox support
  * EC_E_INVALID_SLAVE_STATE if slave is in an invalid state for mailbox transfer
  * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive
  * EC_E_ADS_IS_RUNNING if ADS server is running
  * EC_ERROR_CODES_COE “CoE SDO error code” 

### CoeGetEntryDescReq  (*pMbxTfer*,  *dwSlaveId*,  *wObIndex*,  *byObSubIndex*,  *byValueInfo*,  *dwTimeout*)

Initiates retrieval of the description of a specific object entry and returns immediately. 

A unique transfer ID must be written into EC_T_MBXTFER.dwTferId. EC_NOTIFY_MBOXRCV is given on completion.

* **Param pMbxTfer:**
  Mailbox transfer object
* **Param dwSlaveId:**
  Slave ID
* **Param wObIndex:**
  Object index
* **Param byObSubIndex:**
  Object sub-index
* **Param byValueInfo:**
  The value info bit mask includes which elements shall be in the response. See EC_COE_ENTRY_VALUEINFO “Value info flags” for available values.
* **Param dwTimeout:**
  Timeout [ms]
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT
  * EC_E_NOMEMORY if the mailbox protocol queue of the slave is full
  * EC_E_SLAVE_NOT_PRESENT if slave not present
  * EC_E_NOTFOUND if no slave matching dwSlaveId can be found
  * EC_E_NO_MBX_SUPPORT if slave has no mailbox support
  * EC_E_INVALID_SLAVE_STATE if slave is in an invalid state for mailbox transfer
  * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive
  * EC_E_ADS_IS_RUNNING if ADS server is running
  * EC_ERROR_CODES_COE “CoE SDO error code” 

### CoeRxPdoTfer  (*pMbxTfer*,  *dwSlaveId*,  *dwNumber*,  *dwTimeout*)

Initiate CoE RxPDO transfer. 

* **Param pMbxTfer:**
  Mailbox transfer object
* **Param dwSlaveId:**
  Slave ID
* **Param dwNumber:**
  PDO number
* **Param dwTimeout:**
  Timeout [ms]
* **Return:**
  EC_E_NOERROR or error code 

### AoeGetSlaveNetId  (*dwSlaveId*, *out*  *poAoeNetId*)

Retrieve the NetID of a specific EtherCAT device. 

* **Param dwSlaveId:**
  Slave ID
* **Param poAoeNetId:**
  AoE NetID of the corresponding slave
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range, the input pointer is EC_NULL or contains EC_NULL pointer, or dwTimeout is EC_NOWAIT
  * EC_E_SLAVE_NOT_PRESENT if slave not present
  * EC_E_NOTFOUND if no slave matching dwSlaveId can be found
  * EC_E_NO_MBX_SUPPORT if slave has no mailbox support
  * EC_E_ADS_IS_RUNNING if ADS server is running 

### AoeRead  (*dwSlaveId*,  *poTargetNetId*,  *wTargetPort*,  *dwIndexGroup*,  *dwIndexOffset*,  *dwDataLen*, [] *pbyData*, *out*  *pdwDataOutLen*, *out*  *pdwErrorCode*, *out*  *pdwCmdResult*,  *dwTimeout*)

Execute an AoE mailbox read request to an EtherCAT slave device. 

This function may not be called from within the JobTask’s context.

* **Param dwSlaveId:**
  Slave ID
* **Param poTargetNetId:**
  Target NetID
* **Param wTargetPort:**
  Target port
* **Param dwIndexGroup:**
  AoE read command index group
* **Param dwIndexOffset:**
  AoE read command index offset
* **Param dwDataLen:**
  Buffer length [bytes]
* **Param pbyData:**
  Buffer receiving transferred data
* **Param pdwDataOutLen:**
  Number of bytes read from the target device
* **Param pdwErrorCode:**
  AoE response error code
* **Param pdwCmdResult:**
  AoE read command result code
* **Param dwTimeout:**
  Timeout [ms]. The function will block at most for this time.
* **Return:**
  * EC_E_NOERROR on success
  * EC_E_AOE_VENDOR_SPECIFIC if the AoE device has responded with a user defined error code
  * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive 

### AoeWrite  (*dwSlaveId*,  *poTargetNetId*,  *wTargetPort*,  *dwIndexGroup*,  *dwIndexOffset*,  *dwDataLen*, [] *pbyData*, *out*  *pdwErrorCode*, *out*  *pdwCmdResult*,  *dwTimeout*)

Execute an AoE mailbox write request to an EtherCAT slave device. 

This function may not be called from within the JobTask’s context.

* **Param dwSlaveId:**
  Slave ID
* **Param poTargetNetId:**
  Target NetID
* **Param wTargetPort:**
  Target port
* **Param dwIndexGroup:**
  AoE write command index group
* **Param dwIndexOffset:**
  AoE write command index offset
* **Param dwDataLen:**
  Buffer length [bytes]
* **Param pbyData:**
  Buffer containing transfered data
* **Param pdwErrorCode:**
  Pointer to AoE response error code
* **Param pdwCmdResult:**
  Pointer to AoE write command result code
* **Param dwTimeout:**
  Timeout [ms]. The function will block at most for this time.
* **Return:**
  * EC_E_NOERROR on success
  * EC_E_AOE_VENDOR_SPECIFIC if the AoE device has responded with a user defined error code
  * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive 

### AoeReadWrite  (*dwSlaveId*,  *poTargetNetId*,  *wTargetPort*,  *dwIndexGroup*,  *dwIndexOffset*,  *dwReadDataLen*,  *dwWriteDataLen*, [] *pbyData*, *out*  *pdwDataOutLen*, *out*  *pdwErrorCode*, *out*  *pdwCmdResult*,  *dwTimeout*)

Execute an AoE mailbox read/write request to an EtherCAT slave device. 

* **Param dwSlaveId:**
  Slave ID
* **Param poTargetNetId:**
  Target NetID
* **Param wTargetPort:**
  Target port
* **Param dwIndexGroup:**
  AoE read/write command index group
* **Param dwIndexOffset:**
  AoE read/write command index offset
* **Param dwReadDataLen:**
  Number of bytes to read from the target device
* **Param dwWriteDataLen:**
  Number of bytes to write to the target device
* **Param pbyData:**
  [in, out] Buffer containing and receiving transfered data
* **Param pdwDataOutLen:**
  Number of bytes read from the target device
* **Param pdwErrorCode:**
  Pointer to AoE response error code
* **Param pdwCmdResult:**
  Pointer to AoE write command result code
* **Param dwTimeout:**
  Timeout [ms]. The function will block at most for this time. EC_NOWAIT is not valid.
* **Return:**
  * EC_E_NOERROR on success
  * EC_E_AOE_VENDOR_SPECIFIC if the AoE device has responded with a user defined error code
  * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive 

### GetProcessData  (*bOutputData*,  *dwOffset*, [] *pbyData*,  *dwLength*,  *dwTimeout*)

Blocking function to retrieve consistent process data from outside the JobTask context. 

This function requests a copy of the process data (stored in RAM). The actual memcpy operation is executed by the JobTask to ensure data consistency. While waiting for the copy to complete, the calling context blocks and repeatedly calls sleep with an interval of at least the cycle time or one millisecond, whichever is greater. The function returns either with the requested process data once the copy is finished, or when the specified timeout has expired.

The function is blocking and should be used carefully in time-sensitive contexts and may not be called from within the JobTask context.

This function may not be called from within the JobTask’s context.

* **Param bOutputData:**
  EC_TRUE: read output data, EC_FALSE: read input data
* **Param dwOffset:**
  Byte offset in Process data to read from
* **Param pbyData:**
  Buffer receiving transferred data
* **Param dwLength:**
* **Param dwTimeout:**
  Timeout [ms]
* **Return:**
  EC_E_NOERROR or error code 

### SetProcessData  (*bOutputData*,  *dwOffset*, [] *pbyData*,  *dwLength*,  *dwTimeout*)

Write Process data synchronized. 

This function may not be called from within the JobTask’s context.

* **Param bOutputData:**
  EC_TRUE: write output data, EC_FALSE: write input data
* **Param dwOffset:**
  Byte offset in Process data to write to
* **Param pbyData:**
  Buffer containing transferred data
* **Param dwLength:**
* **Param dwTimeout:**
  Timeout [ms]
* **Return:**
  EC_E_NOERROR or error code 

### SetProcessDataBits  (*bOutputData*,  *dwBitOffsetPd*, [] *pbyDataSrc*,  *dwBitLengthSrc*,  *dwTimeout*)

Writes a specific number of bits from a given buffer to the process image with a bit offset (synchronized). 

This function may not be called from within the JobTask’s context.

* **Param bOutputData:**
  EC_TRUE: write output data, EC_FALSE: write input data
* **Param dwBitOffsetPd:**
  Bit offset in Process data image
* **Param pbyDataSrc:**
* **Param dwBitLengthSrc:**
* **Param dwTimeout:**
  Timeout [ms]. The timeout value must not be set to EC_NOWAIT.
* **Return:**
  EC_E_NOERROR or error code 

### GetProcessDataBits  (*bOutputData*,  *dwBitOffsetPd*, [] *pbyDataDst*,  *dwBitLengthDst*,  *dwTimeout*)

Reads a specific number of bits from the process image to the given buffer with a bit offset (synchronized). 

This function may not be called from within the JobTask’s context.

* **Param bOutputData:**
  EC_TRUE: read output data, EC_FALSE: write input data
* **Param dwBitOffsetPd:**
  Bit offset in Process data image
* **Param pbyDataDst:**
* **Param dwBitLengthDst:**
* **Param dwTimeout:**
  Timeout [ms]. The timeout value must not be set to EC_NOWAIT.
* **Return:**
  EC_E_NOERROR or error code 

### ForceProcessDataBits  (*dwClientId*,  *bOutputData*,  *dwBitOffsetPd*,  *wBitLength*, [] *pbyData*,  *dwTimeout*)

Force a specific number of bits from a given buffer to the process image with a bit offset. 

All output data set by this API are overwriting the values set by the application. All input data set by this API are overwriting the values read from the slaves. Forcing will be terminated by calling the corresponding functions. This function may not be called from within the JobTask’s context.

* **Param dwClientId:**
  Client ID returned by RegisterClient (0 if all registered clients shall be notified)
* **Param bOutputData:**
  EC_TRUE: write output data, EC_FALSE: write input data
* **Param dwBitOffsetPd:**
  Bit offset in Process data image
* **Param wBitLength:**
* **Param pbyData:**
  Buffer containing transfered data
* **Param dwTimeout:**
  Timeout [ms]. The timeout value must not be set to EC_NOWAIT.
* **Return:**
  EC_E_NOERROR or error code 

### ReleaseProcessDataBits  (*dwClientId*,  *bOutputData*,  *dwBitOffsetPd*,  *wBitLength*,  *dwTimeout*)

Release previously forced process data. 

* Forced output: Value set by application become valid again. Because forced process data bits are written directly into the process output image, the application has to update the process image with the required value, otherwise the forced value is still valid.
* Forced input: Value read from the slaves become valid again.

This function may not be called from within the JobTask’s context.

* **Param dwClientId:**
  Client ID returned by RegisterClient (0 if all registered clients shall be notified)
* **Param bOutputData:**
  EC_TRUE: write output data, EC_FALSE: write input data
* **Param dwBitOffsetPd:**
  Bit offset in Process data image
* **Param wBitLength:**
  Number of bits that shall be written to the process image.
* **Param dwTimeout:**
  Timeout [ms]. The timeout value must not be set to EC_NOWAIT.
* **Return:**
  EC_E_NOERROR or error code 

### ReleaseAllProcessDataBits  (*dwClientId*,  *dwTimeout*)

Release all previously forced process data for a dedicated client. 

* Forced output: Value set by application become valid again. Because forced process data bits are written directly into the process output image, the application has to update the process image with the required value, otherwise the forced value is still valid.
* Forced input: Value read from the slaves become valid again.

This function may not be called from within the JobTask’s context.

* **Param dwClientId:**
  Client ID returned by RegisterClient (0 if all registered clients shall be notified)
* **Param dwTimeout:**
  Timeout [ms]. The timeout value must not be set to EC_NOWAIT.
* **Return:**
  EC_E_NOERROR or error code 

### GetNumConnectedSlaves ()

Get number of currently connected slaves. 

* **Return:**
  Number of connected slaves 

### GetNumConnectedSlavesMain ()

Get the number of currently connected Slaves to main interface. 

* **Return:**
  Number of connected slaves at main interface 

### GetNumConnectedSlavesRed ()

Get the number of currently connected Slaves to redundancy interface. 

* **Return:**
  Number of connected slaves at redundancy interface 

### DcEnable ()

Enable DC Support. 

* **Return:**
  EC_E_NOERROR or error code 

### DcDisable ()

Disable DC Support. 

* **Return:**
  EC_E_NOERROR or error code 

### GetSlaveInfo  (*bFixedAddressing*,  *wSlaveAddress*, *out*  *pGetSlaveInfo*)

Get Slave Info. 

Use emGetCfgSlaveInfo or emGetBusSlaveInfo instead

* **Param bFixedAddressing:**
  EC_TRUE: use station address, EC_FALSE: use AutoInc address
* **Param wSlaveAddress:**
  Slave address according bFixedAddressing
* **Param pGetSlaveInfo:**
  Slave information
* **Return:**
  EC_E_NOERROR or error code 

### GetCfgSlaveInfo  (*bStationAddress*,  *wSlaveAddress*, *out*  *pSlaveInfo*)

Return information about a configured slave from the ENI file. 

* **Param bStationAddress:**
* **Param wSlaveAddress:**
  Slave address according bFixedAddressing
* **Param pSlaveInfo:**
  Information about the slave
* **Return:**
  EC_E_NOERROR or error code 

### GetCfgSlaveEoeInfo  (*bStationAddress*,  *wSlaveAddress*, *out*  *pSlaveEoeInfo*)

Return EoE information about a configured slave from the ENI file. 

* **Param bStationAddress:**
* **Param wSlaveAddress:**
  Slave address according bFixedAddressing
* **Param pSlaveEoeInfo:**
  Information about the slave
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range
  * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found
  * EC_E_NO_MBX_SUPPORT if the slave does not support mailbox communication
  * EC_E_NO_EOE_SUPPORT if the slave supports mailbox communication, but not EoE 

### GetBusSlaveInfo  (*bStationAddress*,  *wSlaveAddress*, *out*  *pSlaveInfo*)

Return information about a slave connected to the EtherCAT bus. 

* **Param bStationAddress:**
* **Param wSlaveAddress:**
  Slave address according bFixedAddressing
* **Param pSlaveInfo:**
  Information from the slave
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range
  * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found 

### GetSlaveInpVarInfoNumOf  (*bFixedAddressing*,  *wSlaveAddress*, *out*  *pwSlaveInpVarInfoNumOf*)

Gets the number of input variables of a specific slave. 

* **Param bFixedAddressing:**
  EC_TRUE: use station address, EC_FALSE: use AutoInc address
* **Param wSlaveAddress:**
  Slave address according bFixedAddressing
* **Param pwSlaveInpVarInfoNumOf:**
  Number of found process variable entries
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range or the output pointer is EC_NULL
  * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found 

### GetSlaveOutpVarInfoNumOf  (*bFixedAddressing*,  *wSlaveAddress*, *out*  *pwSlaveOutpVarInfoNumOf*)

Gets the number of output variables of a specific slave. 

* **Param bFixedAddressing:**
  EC_TRUE: use station address, EC_FALSE: use AutoInc address
* **Param wSlaveAddress:**
  Slave address according bFixedAddressing
* **Param pwSlaveOutpVarInfoNumOf:**
  Number of found process variables
* **Return:**
  EC_E_NOERROR or error code 

### GetSlaveInpVarInfo  (*bFixedAddressing*,  *wSlaveAddress*,  *wNumOfVarsToRead*, *out* [] *pSlaveProcVarInfoEntries*, *out*  *pwReadEntries*)

Gets the number of input variables of a specific slave. 

* **Param bFixedAddressing:**
  EC_TRUE: use station address, EC_FALSE: use AutoInc address
* **Param wSlaveAddress:**
  Slave address according bFixedAddressing
* **Param wNumOfVarsToRead:**
* **Param pSlaveProcVarInfoEntries:**
* **Param pwReadEntries:**
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range or the output pointer is EC_NULL
  * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found 

### GetSlaveInpVarInfoEx  (*bFixedAddressing*,  *wSlaveAddress*,  *wNumOfVarsToRead*, *out* [] *pSlaveProcVarInfoEntries*, *out*  *pwReadEntries*)

Gets the input process variable extended information entries of a specific slave. 

* **Param bFixedAddressing:**
  EC_TRUE: use station address, EC_FALSE: use AutoInc address
* **Param wSlaveAddress:**
  Slave address according bFixedAddressing
* **Param wNumOfVarsToRead:**
  Number process variable entries that have been stored in pSlaveProcVarInfoEntries
* **Param pSlaveProcVarInfoEntries:**
  Number process variable entries that have been stored in pSlaveProcVarInfoEntries
* **Param pwReadEntries:**
  The number of read process variable information entries
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range or the output pointer is EC_NULL
  * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found 

### GetSlaveOutpVarInfo  (*bFixedAddressing*,  *wSlaveAddress*,  *wNumOfVarsToRead*, *out* [] *pSlaveProcVarInfoEntries*, *out*  *pwReadEntries*)

Gets the number of output variables of a specific slave. 

* **Param bFixedAddressing:**
  EC_TRUE: use station address, EC_FALSE: use AutoInc address
* **Param wSlaveAddress:**
  Slave address according bFixedAddressing
* **Param wNumOfVarsToRead:**
* **Param pSlaveProcVarInfoEntries:**
* **Param pwReadEntries:**
* **Return:**
  EC_E_NOERROR or error code 

### GetSlaveOutpVarInfoEx  (*bFixedAddressing*,  *wSlaveAddress*,  *wNumOfVarsToRead*, *out* [] *pSlaveProcVarInfoEntries*, *out*  *pwReadEntries*)

Gets the output process variable extended information entries of a specific slave. 

* **Param bFixedAddressing:**
  EC_TRUE: use station address, EC_FALSE: use AutoInc address
* **Param wSlaveAddress:**
  Slave address according bFixedAddressing
* **Param wNumOfVarsToRead:**
  Number of process variable information entries
* **Param pSlaveProcVarInfoEntries:**
  The read process extended variable entries
* **Param pwReadEntries:**
  The number of read process variable information entries
* **Return:**
  EC_E_NOERROR or error code 

### GetSlaveOutpVarByObjectEx  (*bFixedAddressing*,  *wSlaveAddress*,  *wIndex*,  *wSubIndex*, *out*  *pProcessVarInfoEntry*)

Gets the input process variable extended information entry by object index, subindex of a specific slave. 

* **Param bFixedAddressing:**
  EC_TRUE: use station address, EC_FALSE: use AutoInc address
* **Param wSlaveAddress:**
  Slave address according bFixedAddressing
* **Param wIndex:**
  Object index
* **Param wSubIndex:**
  Object sub index
* **Param pProcessVarInfoEntry:**
  Process variable extended information entry
* **Return:**
  EC_E_NOERROR or error code 

### GetSlaveInpVarByObjectEx  (*bFixedAddressing*,  *wSlaveAddress*,  *wIndex*,  *wSubIndex*, *out*  *pProcessVarInfoEntry*)

Gets the input process variable extended information entry by object index, subindex of a specific slave. 

* **Param bFixedAddressing:**
  EC_TRUE: use station address, EC_FALSE: use AutoInc address
* **Param wSlaveAddress:**
  Slave address according bFixedAddressing
* **Param wIndex:**
  Object index
* **Param wSubIndex:**
  Object sub index
* **Param pProcessVarInfoEntry:**
  Process variable extended information entry
* **Return:**
  EC_E_NOERROR or error code 

### FindOutpVarByName  (*szVariableName*, *out*  *pSlaveOutpVarInfo*)

Finds an output process variable information entry by the variable name. 

* **Param szVariableName:**
  Variable name
* **Param pSlaveOutpVarInfo:**
* **Return:**
  EC_E_NOERROR or error code 

### FindOutpVarByNameEx  (*szVariableName*, *out*  *pProcessVarInfoEntry*)

Finds an output process variable extended information entry by the variable name. 

* **Param szVariableName:**
  Variable name
* **Param pProcessVarInfoEntry:**
  Process variable extended information entry
* **Return:**
  EC_E_NOERROR or error code 

### FindInpVarByName  (*szVariableName*, *out*  *pProcessVarInfoEntry*)

Finds an input process variable information entry by the variable name. 

* **Param szVariableName:**
  Variable name
* **Param pProcessVarInfoEntry:**
  Process variable information entry
* **Return:**
  EC_E_NOERROR or error code 

### FindInpVarByNameEx  (*szVariableName*, *out*  *pProcessVarInfoEntry*)

Finds an input process variable extended information entry by the variable name. 

* **Param szVariableName:**
  Variable name
* **Param pProcessVarInfoEntry:**
  Process variable extended information entry
* **Return:**
  EC_E_NOERROR or error code 

### IsSlavePresent  (*dwSlaveId*, *out*  *pbPresence*)

Returns whether a specific slave is currently connected to the Bus. 

This function may be called from within the JobTask.

* **Param dwSlaveId:**
  Slave ID
* **Param pbPresence:**
  EC_TRUE if the slave is currently connected to the bus, EC_FALSE if not
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range
  * EC_E_NOTFOUND if no slave matching dwSlaveId can be found 

### GetSrcMacAddress (*out*  *pMacSrc*)

Gets the source MAC address. 

* **Param pMacSrc:**
  6-byte buffer to write source MAC address to
* **Return:**
  EC_E_NOERROR or error code 

### GetLicenseFingerprint  (*byMethod*,  *szLicenseFingerprint*)

Gets the fingerprint needed for license key generation. 

* **Param byMethod:**
  Method used to generate the fingerprint
* **Param szLicenseFingerprint:**
  Buffer for fingerprint string. Size must be at least EC_LICENSE_FINGERPRINT_STRSIZE.
* **Return:**
  EC_E_NOERROR or error code 

### SetLicenseKey  (*szLicenseKey*)

Sets the license key for the protected version of EC-Master. 

Must be called after initialization and before configuration. This function may not be called if a non protected version is used.

* **Param szLicenseKey:**
  License key as zero terminated string with 26, 53 or 56 characters
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range
  * EC_E_INVALIDSIZE if the format of the license key is wrong. The correct length is 26, 53 or 56 characters.
  * EC_E_LICENSE_MISSING if the license key doesn’t match the MAC Address 

### GetVersion (*out*  *pdwVersion*, *out*  *pdwVersionType*)

Gets the version information. 

* **Param pdwVersion:**
  Pointer to EC_T_DWORD to carry out version number as a 32-bit value
* **Param pdwVersionType:**
  Pointer to EC_T_DWORD to carry out version type. See EC_VERSION_TYPES “EC_VERSION_TYPE”.
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range or the output pointer is EC_NULL 

### FastModeInit ()

* **Return:**

### FastSendAllCycFrames ()

* **Return:**

### FastProcessAllRxFrames (*out*  *pbAreAllCycFramesProcessed*)

* **Param pbAreAllCycFramesProcessed:**
* **Return:**

### ReadSlaveIdentification  (*bFixedAddressing*,  *wSlaveAddress*,  *wAdo*, *out*  *pwValue*,  *dwTimeout*)

Read identification value from a slave. 

This function may not be called from within the JobTask’s context.

* **Param bFixedAddressing:**
  EC_TRUE: use station address, EC_FALSE: use AutoInc address
* **Param wSlaveAddress:**
  Slave address according bFixedAddressing
* **Param wAdo:**
  ADO used for identification command
* **Param pwValue:**
  Pointer to Word value containing the Identification value
* **Param dwTimeout:**
  Timeout [ms]
* **Return:**
  * EC_E_NOERROR if successful
  * EC_E_INVALIDSTATE if EtherCAT stack isn’t initialized
  * EC_E_INVALIDPARM if dwInstanceID is out of range or the command is not supported or the timeout value is set to EC_NOWAIT
  * EC_E_SLAVE_NOT_PRESENT if slave not present
  * EC_E_NOTFOUND if no slave matching bFixedAddressing / wSlaveAddress can be found
  * EC_E_TIMEOUT if dwTimeout elapsed during the API call
  * EC_E_BUSY if another transfer request is already pending or the master or the corresponding slave is currently changing its operational state
  * EC_E_NOTREADY if the working counter was not set when sending the command (slave may not be connected or did not respond)
  * EC_E_ADO_NOT_SUPPORTED if the slave does not support requesting ID mechanism
  * EC_E_MASTER_RED_STATE_INACTIVE if Master Redundancy is configured and master is inactive 

### GetMemoryUsage (*out*  *pdwCurrentUsage*, *out*  *pdwMaxUsage*)

Returns information about memory usage. 

All calls to malloc/free and new/delete are monitored.

* **Param pdwCurrentUsage:**
  Current memory usage in Bytes at the time where this function is called
* **Param pdwMaxUsage:**
  Maximum memory usage in Bytes since initialization at the time where this function is called
* **Return:**
  EC_E_NOERROR or error code 

### GetSlaveStatistics  (*dwSlaveId*, *out*  *pSlaveStatisticsDesc*)

Get Slave’s statistics counter. 

* **Param dwSlaveId:**
  Slave id
* **Param pSlaveStatisticsDesc:**
  Pointer to structure EC_T_SLVSTATISTICS_DESC
* **Return:**
  EC_E_NOERROR or error code 

### ClearSlaveStatistics  (*dwSlaveId*)

Clears all error registers of a slave. 

* **Param dwSlaveId:**
  Slave Id, INVALID_SLAVE_ID clears all slaves
* **Return:**
  EC_E_NOERROR or error code 

### DisconnectPort  (*wCfgFixedAddress*,  *byPort*)

Disconnect a slave ESC port or a network adapter. 

* **Param wCfgFixedAddress:**
  Slave’s station address. 0: network adapter.
* **Param byPort:**
  ESC port. 0, 1, 2, 3: port A, port B, port C, port D.
* **Return:**
  \_ #EC_E_NOERROR or error code 

### PowerSlave  (*wCfgFixedAddress*,  *bOn*)

Power on or power off a slave. 

* **Param wCfgFixedAddress:**
  Slave’s station address
* **Param bOn:**
  EC_FALSE: switch off, EC_TRUE: switch on
* **Return:**
  \_ #EC_E_NOERROR or error code 

### DeleteSlaveCoeObject  (*wCfgFixedAddress*,  *wIndex*)

Delete object from slave’s CoE object dictionary. 

* **Param wCfgFixedAddress:**
  Slave’s station address
* **Param wIndex:**
* **Return:**
  \_ #EC_E_NOERROR or error code 

### ClearSlaveCoeObjectDictionary  (*wCfgFixedAddress*)

Delete all objects from slave’s CoE object dictionary. 

* **Param wCfgFixedAddress:**
  Slave’s station address
* **Return:**
  \_ #EC_E_NOERROR or error code 

### ResetSlaveCoeObjectDictionary  (*wCfgFixedAddress*)

Reset all objects from slave’s CoE object dictionary to default. 

* **Param wCfgFixedAddress:**
  Slave’s station address
* **Return:**
  \_ #EC_E_NOERROR or error code 

### SendSlaveCoeEmergency  (*wCfgFixedAddress*,  *wCode*, [] *pbyData*,  *dwDataLen*)

Send CoE emergency (queued) 

* **Param wCfgFixedAddress:**
  Slave’s station address
* **Param wCode:**
  Emergency code
* **Param pbyData:**
  Emergency data
* **Param dwDataLen:**
  Length of emergency data in byte
* **Return:**
  \_ #EC_E_NOERROR or error code 

### EoeSendFrame  (*wCfgFixedAddress*, [] *pbyFrame*,  *dwFrameLen*)

Send EoE frame (queued) 

* **Param wCfgFixedAddress:**
* **Param pbyFrame:**
* **Param dwFrameLen:**
* **Return:**
  \_ #EC_E_NOERROR or error code 

### SetErrorAtSlavePort  (*wCfgFixedAddress*,  *byPort*,  *bOutgoing*)

Trigger loss of sent or received EtherCAT frames at slave port (“single shot”). 

See ESC registers RX Error Counter (0x0300:0x0307), Forwarded RX Error Counter (0x0308:0x030B), ECAT Processing Unit Error Counter (0x030C)

* **Param wCfgFixedAddress:**
  Slave’s station address. 0: all slaves.
* **Param byPort:**
  ESC port. 0, 1, 2, 3: port A, port B, port C, port D.
* **Param bOutgoing:**
  Direction. EC_FALSE: Receive Frame, EC_TRUE: Send Frame.
* **Return:**
  \_ #EC_E_NOERROR or error code 

### SetErrorGenerationAtSlavePort  (*wCfgFixedAddress*,  *byPort*,  *bOutgoing*,  *dwLikelihoodPpm*,  *dwFixedGoodFramesCnt*,  *dwFixedErroneousFramesCnt*)

Simulate the loss of sent EtherCAT frames at the port of a simulated slave at either random, periodic or random periodic intervalls. 

* Random frame loss simulation: For each frame the dwLikelihoodPpm parameter determines whether the frame will be discarded.
* Periodic frame loss simulation: After dwFixedErroneousFramesCnt discarded frames, dwFixedGoodFramesCnt frames will be processed.
* Random periodic frame loss simulation: The dwLikelihoodPpm parameter determines whether a periodic frame loss sequence is triggered.

See ESC registers RX Error Counter (0x0300:0x0307), Forwarded RX Error Counter (0x0308:0x030B), ECAT Processing Unit Error Counter (0x030C)

* **Param wCfgFixedAddress:**
  Slave station address. 0: All slaves
* **Param byPort:**
  ESC port. 0, 1, 2, 3: port A, port B, port C, port D.
* **Param bOutgoing:**
  Direction. EC_FALSE: Receive Frame, EC_TRUE: Send Frame.
* **Param dwLikelihoodPpm:**
  Likelihood (ppm) according to frame loss simulation mode (Random / Random Periodic). Set to 0 in case of Periodic frame loss simulation.
* **Param dwFixedGoodFramesCnt:**
  Number of processed frames according to frame loss simulation mode (Periodic / Random Periodic). Set to 0 in case of Random frame loss simulation.
* **Param dwFixedErroneousFramesCnt:**
  Number of discarded frames according to frame loss simulation mode (Periodic / Random Periodic). Set to 0 in case of Random frame loss simulation.
* **Return:**
  \_ #EC_E_NOERROR or error code 

### ResetErrorGenerationAtSlavePorts  (*wCfgFixedAddress*)

Reset physical layer error generation destroying frames at slave port. 

* **Param wCfgFixedAddress:**
  Slave’s station address. 0: all slaves.
* **Return:**
  \_ #EC_E_NOERROR or error code 

### SetLinkDownAtSlavePort  (*wCfgFixedAddress*,  *byPort*,  *bDown*,  *dwLinkDownTimeMs*)

Trigger link lost event. 

* **Param wCfgFixedAddress:**
  Slave’s station address. 0: all slaves.
* **Param byPort:**
  ESC port. 0, 1, 2, 3: port A, port B, port C, port D.
* **Param bDown:**
  Connect or disconnect cable. EC_TRUE: disconnect.
* **Param dwLinkDownTimeMs:**
  Link down duration [ms] or EC_WAITINFINITE
* **Return:**
  \_ #EC_E_NOERROR or error code 

### SetLinkDownGenerationAtSlavePort  (*wCfgFixedAddress*,  *byPort*,  *dwLikelihoodPpm*,  *dwFixedLinkDownTimeMs*,  *dwFixedLinkUpTimeMs*)

Generate link lost events randomly or at fixed intervals. 

* **Param wCfgFixedAddress:**
  Slave’s station address. 0: all slaves.
* **Param byPort:**
  ESC port. 0, 1, 2, 3: port A, port B, port C, port D.
* **Param dwLikelihoodPpm:**
  Random simulation: link down likelihood (ppm) within OnTimer
* **Param dwFixedLinkDownTimeMs:**
  On link down simulation: fixed link down duration [ms] (at least)
* **Param dwFixedLinkUpTimeMs:**
  After link down was simulated: fixed link up duration [ms] (at least)
* **Return:**
  \_ #EC_E_NOERROR or error code 

### ResetLinkDownGenerationAtSlavePorts  (*wCfgFixedAddress*)

Reset link lost event generation. 

* **Param wCfgFixedAddress:**
  Slave’s station address. 0: all slaves
* **Return:**
  \_ #EC_E_NOERROR or error code 

### VoeSend  (*wCfgFixedAddress*,  *wDstFixedAddress*, [] *pbyData*,  *dwDataLen*)

Fill “Mailbox In” (SM1) with VoE data to be polled by Master. The slave must have VoE enabled, see ESI: /EtherCATInfo/Descriptions/Devices/Device/Mailbox/VoE, ENI/EXI: /EtherCATConfig/Config/Slave/Mailbox/Protocol/VoE. 

* **Param wCfgFixedAddress:**
  Slave’s station address
* **Param wDstFixedAddress:**
  Destination address
* **Param pbyData:**
  Data
* **Param dwDataLen:**
  Data length
* **Return:**
  \_ #EC_E_NOERROR or error code 

### GetSimSlaveInfo  (*wCfgFixedAddress*, *out*  *pSimSlaveInfo*)

Get extended configuration and status information for slave from simulator. 

* **Param wCfgFixedAddress:**
  Slave’s station address
* **Param pSimSlaveInfo:**
  Extended configuration and status information for slave from simulator
* **Return:**
  \_ #EC_E_NOERROR or error code 

### SetSimSlaveState  (*wCfgFixedAddress*,  *wDeviceState*,  *wDeviceStatusCode*)

Simulate AL Status Error for slave without device emulation or acknowledge delayed EtherCAT state change. 

* **Param wCfgFixedAddress:**
  Slave’s station address
* **Param wDeviceState:**
  Device state (DEVICE_STATE…)
* **Param wDeviceStatusCode:**
  Device status code (DEVICE_STATUSCODE…)
* **Return:**
  EC_E_NOERROR or error code 

### Properties

### s_EC_VERSION { *get; set;* }

EC_VERSION. 

summary>ATECAT_SIGNATURE 

### s_ATECAT_SIGNATURE { *get; set;* }

summary>INVALID_SLAVE_ID 

### s_INVALID_SLAVE_ID { *get; set;* }

summary>MASTER_SLAVE_ID 

### s_MASTER_SLAVE_ID { *get; set;* }

summary>MAX_NUMOF_MASTER_INSTANCES 

### s_MAX_NUMOF_MASTER_INSTANCES { *get; set;* }

summary>MASTER_RED_SLAVE_ID 

### s_MASTER_RED_SLAVE_ID { *get; set;* }

summary>EL9010_SLAVE_ID 

### s_EL9010_SLAVE_ID { *get; set;* }

summary>FRAMELOSS_SLAVE_ID 

### s_FRAMELOSS_SLAVE_ID { *get; set;* }

summary>JUNCTION_RED_FLAG 

### Events

### *event*  OnEcNotification

summary> Occurs when a application notification is raised. 

### *event*  OnAppNotification

summary> Occurs when a RAS notification is raised. 

### *event*  OnRasNotification

summary> Occurs when a translate notification is raised. 

### *event*  OnTranslateNotification

summary> Occurs when a performance monitoring notification is raised. 

### *event*  OnPerfNotification

summary> Occurs when a debug message notification is raised. 

### Public Static Functions

### IsRemoteServerUp ([] *abyIpAddr*,  *wPort*)

Checks if remote server is up by sending a “ping”. 

* **Param abyIpAddr:**
  IPAddress
* **Param wPort:**
  Port
* **Return:**
  true, if server is up, else false if server is down

### CopyStream  (*source*,  *target*)

Copy a stream. 

* **Param source:**
  Source.
* **Param target:**
  Target.

### CreateObjectFromBytes ([] *bytes*, *ref*  *obj*)

Creates object from byte array. 

* **Param bytes:**
  Object data as byte array
* **Param obj:**
  Object which should be filled
* **Return:**
  Error code

### GetSizeOfObject  (*obj*, *out*  *size*)

Get byte size of object (as required from CoeSdoUpload) 

* **Param obj:**
  Object
* **Param size:**
  Byte size of object
* **Return:**
  Error code

### GetBitLenOfDataType  (*type*)

Get bit length of data type. 

* **Param type:**
  Data type
* **Return:**
  Bit length

### RunUnitTest  (*cmd*,  *data*)

Run unit test (for internal use) 

* **Param cmd:**
  Command
* **Param data:**
  Input data
* **Return:**
  Output data

### ConvValueToBytes  (*type*,  *value*, *out* [] *bytes*)

Converts value to bytes. 

* **Param type:**
  Data type
* **Param value:**
  Value
* **Param bytes:**
  Bytes
* **Return:**
  Error code

### ConvValueFromBytes ([] *bytes*,  *type*, *out*  *value*)

Converts value from bytes. 

* **Param bytes:**
  Bytes
* **Param type:**
  Data type
* **Param value:**
  Value
* **Return:**
  Error code

### ReadValueFromBytes ([] *bytes*,  *bitOffset*,  *bitLength*,  *type*, *out*  *value*)

Read value from bytes. 

* **Param bytes:**
  Bytes
* **Param bitOffset:**
  Bit offset
* **Param bitLength:**
  Bit length
* **Param type:**
  Data type
* **Param value:**
  Value
* **Return:**
  Error code

### ReadValueFromAddress  (*address*,  *bitOffset*,  *bitLength*,  *type*, *out*  *value*)

Read value from address. 

* **Param address:**
  Address
* **Param bitOffset:**
  Bit offset
* **Param bitLength:**
  Bit length
* **Param type:**
  Data type
* **Param value:**
  Value
* **Return:**
  Error code

### WriteValueToBytes ([] *bytes*,  *bitOffset*,  *bitLength*,  *type*,  *value*)

Write value to bytes. 

* **Param bytes:**
  Bytes
* **Param bitOffset:**
  Bit offset
* **Param bitLength:**
  Bit length
* **Param type:**
  Data type
* **Param value:**
  Value
* **Return:**
  Error code

### WriteValueToAddress  (*address*,  *bitOffset*,  *bitLength*,  *type*,  *value*)

Write value to address. 

* **Param address:**
  Address
* **Param bitOffset:**
  Bit offset
* **Param bitLength:**
  Bit length
* **Param type:**
  Data type
* **Param value:**
  Value
* **Return:**
  Error code

### ConvValueFromString  (*type*,  *value*)

Converts value from string. 

* **Param type:**
  Type
* **Param value:**
  Value
* **Return:**
  Value as object

### ConvValueToString  (*type*,  *value*)

Converts value to string. 

* **Param type:**
  Type
* **Param value:**
  Value
* **Return:**
  Value as string

### ConvStringFromByteArray ([] *data*)

Converts byte array to string (e.g. 01 02) 

* **Param data:**
  Data
* **Return:**
  Data as string

### [] ConvStringToByteArray  (*data*)

Converts byte array from string (e.g. 01 02) 

* **Param data:**
  Data
* **Return:**
  Data as byte array

### ReadPdBitsFromAddress  (*address*,  *bitOffset*,  *bitLength*, *out* [] *pdBits*)

Reads process data bits from address. 

* **Param address:**
  Address
* **Param bitOffset:**
  Bit offset
* **Param bitLength:**
  Bit length
* **Param pdBits:**
  [out] Process data bits

### WritePdBitsToAddress  (*address*,  *bitOffset*,  *bitLength*, [] *pdBits*)

Writes process data bits to address. 

* **Param address:**
  Address
* **Param bitOffset:**
  Bit offset
* **Param bitLength:**
  Bit length
* **Param pdBits:**
  Process data bits

### ReadPdBitsFromBytes ([] *bytes*,  *bitOffset*,  *bitLength*, *out* [] *pdBits*)

Reads process data bits from bytes. 

* **Param bytes:**
  Bytes
* **Param bitOffset:**
  Bit offset
* **Param bitLength:**
  Bit length
* **Param pdBits:**
  [out] Process data bits

### WritePdBitsToBytes ([] *bytes*,  *bitOffset*,  *bitLength*, [] *pdBits*)

Writes process data bits to bytes. 

* **Param bytes:**
  Bytes
* **Param bitOffset:**
  Bit offset
* **Param bitLength:**
  Bit length
* **Param pdBits:**
  Process data bits

### ReadPdBytesFromAddress  (*address*,  *offset*,  *length*, *out* [] *pdBytes*)

Reads process data bytes from address. 

* **Param address:**
  Address
* **Param offset:**
  Offset
* **Param length:**
  Length
* **Param pdBytes:**
  [out] Process data bytes

### WritePdBytesToAddress  (*address*,  *offset*, [] *pdBytes*)

Writes process data bytes to address. 

* **Param address:**
  Address
* **Param offset:**
  Offset
* **Param pdBytes:**
  Process data bytes

### ReadPdBytesFromBytes ([] *bytes*,  *offset*,  *length*, *out* [] *pdBytes*)

Reads process data bytes from bytes. 

* **Param bytes:**
  Bytes
* **Param offset:**
  Offset
* **Param length:**
  Length
* **Param pdBytes:**
  [out] Process data bytes

### WritePdBytesToBytes ([] *bytes*,  *offset*, [] *pdBytes*)

Writes process data bytes to bytes. 

* **Param bytes:**
  Bytes
* **Param offset:**
  Offset
* **Param pdBytes:**
  Process data bytes

### Public Static Attributes

### EnableExceptionHandling = false

Enables exception handling (functions will throw an exception instead of returning an error code)


# examples.html.md

# Examples

## CoeSdoUpload

```csharp
public void CoeSdoUploadExample()
{
  ushort wSlaveAddress = 1012; // slave with station address 1012
  ushort wObIndex = 0x1018; // object index 0x1018
  byte byObSubIndex = 1; // subindex 1 (Vendor ID, which is from type UDINT with 4 bytes)
  uint dwDataLen = 4; // 4 bytes
  byte[] pbyData = new byte[dwDataLen];
  uint dwOutDataLen = 0;
  uint dwTimeout = 5000; // timeout 5s
  uint dwFlags = (uint)EMailBoxFlags.NONE; // no complete access

  uint dwSlaveId = m_oEcWrapper.GetSlaveId(wSlaveAddress);
  ECError eRes = m_oEcWrapper.CoeSdoUpload(dwSlaveId, wObIndex, byObSubIndex, pbyData, dwDataLen, out dwOutDataLen, dwTimeout, dwFlags);
  if (eRes != ECError.EC_NOERROR)
  {
    LogMasterError("CoeSdoUpload failed: ", eRes);
    return;
  }

  string szValue = CEcWrapperDotNet.ConvValueToString(DN_EC_T_DEFTYPE.ARRAY_OF_BYTE, pbyData);
  LogInfo("CoeSdoUpload success: " + szValue); // 02 00 00 00
}
```

## CoeSdoDownload

```csharp
public void CoeSdoDownloadExample()
{
  ushort wSlaveAddress = 1012; // slave with station address 1012
  ushort wObIndex = 0x40A2; // object index 0x40A2
  byte byObSubIndex = 2; // subindex 2
  uint dwValue = 123; // value 123
  uint dwTimeout = 5000; // timeout 5s
  uint dwFlags = (uint)EMailBoxFlags.NONE; // no complete access

  // convert UNSIGNED32 value to 4 bytes
  byte[] pbyData = null;
  ECError eRes = CEcWrapperDotNet.ConvValueToBytes(DN_EC_T_DEFTYPE.UNSIGNED32, dwValue, out pbyData);
  if (eRes != ECError.EC_NOERROR)
  {
    LogMasterError("ConvValueToBytes failed: ", eRes);
    return ;
  }

  uint dwSlaveId = m_oEcWrapper.GetSlaveId(wSlaveAddress);
  eRes = m_oEcWrapper.CoeSdoDownload(dwSlaveId, wObIndex, byObSubIndex, pbyData, (uint)pbyData.Length, dwTimeout, dwFlags);
  if (eRes != ECError.EC_NOERROR)
  {
    LogMasterError("CoeSdoDownload failed: ", eRes);
    return;
  }

  LogInfo("CoeSdoDownload success");
}
```

## ReadSlaveEEPRom

```csharp
public void ReadSlaveEEPRomExample()
{
  bool bFixedAddressing = true; // enable fixed addressing
  ushort wSlaveAddress = 1006; // slave with station address 1006
  ushort wEEPRomStartOffset = 0x0; // offset 0
  uint dwReadLen = 10; // 10 bytes
  byte[] pwReadData = new byte[dwReadLen];
  uint dwNumOutData = 0;
  uint dwTimeout = 2000; // timeout 2s

  ECError eRes = m_oEcWrapper.ReadSlaveEEPRom(bFixedAddressing, wSlaveAddress, wEEPRomStartOffset, pwReadData, dwReadLen, out dwNumOutData, dwTimeout);
  if (eRes != ECError.EC_NOERROR)
  {
    LogMasterError("ReadSlaveEEPRom failed: ", eRes);
    return;
  }

  string szValue = CEcWrapperDotNet.ConvValueToString(DN_EC_T_DEFTYPE.ARRAY_OF_BYTE, pwReadData);
  LogInfo("ReadSlaveEEPRom success: " + szValue);
}
```

## FoeFileDownload

```csharp
public void FoeFileDownloadExample()
{
  ushort wSlaveAddress = 1012; // slave with station address 1012
  string szFileName = "foe.txt"; // filename of file in slave
  byte[] pbyData = new byte[] { 1, 2, 3, 4 }; // 4 bytes
  uint dwPassword = 0;  // password is 0
  uint dwTimeout = 2000; // timeout 2s

  uint dwSlaveId = m_oEcWrapper.GetSlaveId(wSlaveAddress);
  ECError eRes = m_oEcWrapper.FoeFileDownload(dwSlaveId, szFileName, (uint)szFileName.Length, pbyData, (uint)pbyData.Length, dwPassword, dwTimeout);
  if (eRes != ECError.EC_NOERROR)
  {
    LogMasterError("FoeFileDownload failed: ", eRes);
    return;
  }

  LogInfo("FoeFileDownload success");
}
```


# faq.html.md

# FAQ

I installed .NET and the demo crashes with strange errors. What can I do?

> This might be a problem of mixing x86 with x64 binaries. Verify that if you have installed the runtime for x64 bit, please install also EC-Simulator for x64 bit.


# introduction.html.md

# Introduction

The .NET Wrapper provides a .NET interface to use EC-Master, EC-Monitor, EC-Simulator and RAS Client/Server.

## Requirements

Microsoft .NET Framework
: - Windows (x86/x64)
    : - Microsoft Windows 10 and above
      - Microsoft .NET Framework 4 Client Profile
      - Microsoft Visual C++ 2015 Runtime
  - Linux (x86/x64)
    : - Mono 3.2 and above (install mono-cmplete)

Microsoft .NET Core
: - Windows (x86/x64)
    : - Microsoft Windows 10 and above
      - Microsoft Visual C++ 2015 Runtime
  - Linux (x64/ARM)
    : - Ubuntu 18.04 and above
  - .NET Core 3.1 Runtime
    : - [https://dotnet.microsoft.com/en-us/download/dotnet](https://dotnet.microsoft.com/en-us/download/dotnet)

## Architecture

![.NET programming interface layer model](Media/architecture.svg)

The architecture contains 4 basic layers:

Customer .NET application or our examples (EcMasterDemoDotNet, …)
: - Demo application, written in C#

Programming Interface (EcWrapperDotNet)
: - Provides an object oriented API written in .NET

Wrapper Library (EcWrapper)
: - Native wrapper library, which provides API for object oriented access

Native Libraries
: - EC-Master Library
  - EC-Monitor LIbrary
  - EC-Simulator Library
  - RAS Client Library


# programmers-guide.html.md

# Programmers Guide

## Sample Application

There is currently 1 script available:

`EcMasterDemoDotNet.bat`
: Starts the console demo application

## Sample Code

The .NET demo application contains of 1 class:

`EcDemoApp.cs`:
: Console demo application

## Wrapper

### Modules

The .NET Wrapper contains of 5 modules:

`CEcWrapperDotNet.cs`
: ### *class* CEcWrapperDotNet
  <br/>
  EC-Wrapper base class
  <br/>
  ### *class* CEcMasterDotNet
  <br/>
  EC-Master
  <br/>
  ### *class* CEcMasterRasServerDotNet
  <br/>
  RAS Server for EC-Master
  <br/>
  ### *class* CEcMasterMbxGatewayClientDotNet
  <br/>
  Mailbox Gateway Client for EC-Master
  <br/>
  ### *class* CEcMasterMbxGatewayServerDotNet
  <br/>
  Mailbox Gateway Server for EC-Master
  <br/>
  ### *class* CEcSimulatorDotNet
  <br/>
  EC-Simulator
  <br/>
  ### *class* CEcSimulatorRasServerDotNet
  <br/>
  RAS Server for EC-Simulator
  <br/>
  ### *class* CEcRasClientDotNet
  <br/>
  RAS Client for EC-Master / EC-Simulator

`CEcMotionDotNet.cs`
: ### *class* CEcMotionDotNet
  <br/>
  EC-Motion interface

`CEcWrapperDotNetTypes.cs`
: .NET types

`CEcWrapper.cs`
: .NET C based interface (internal)

`CEcWrapperTypes.cs`
: .NET C based types (internal)

### Return code vs. exception handling

The most of all API functions returns a return code for error handling. This behaviour can be changed to throw an exception in error case by simply setting:

```csharp
CEcWrapperDotNet.EnableExceptionHandling = true; // default is false
```


