# 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 ### 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 ### 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 ### 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 ### ConfigLoad  (*eCnfType*, [] *pbyCnfData*,  *dwCnfDataLen*) Load the network configuration. In combination with emConfigApply, this function replaces emConfigureNetwork and 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:** Configuration data * **Param dwCnfDataLen:** Length of configuration data in byte * **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 some memory cannot be allocated * EC_E_ADS_IS_RUNNING if the ADS server is running ### ConfigExcludeSlave  (*wStationAddress*) Exclude a slave from the network configuration. It has to be called after emConfigLoad and prior to calling emConfigApply. * **Param wStationAddress:** Station address of the slave to be excluded. A value of 0 excludes all slaves. * **Return:** EC_E_NOERROR or error code ### ConfigIncludeSlave  (*wStationAddress*) Include a slave in the network configuration. Slaves that were previously excluded with emConfigSlaveExclude can be added again. It has to be called after emConfigLoad and prior to calling emConfigApply. * **Param wStationAddress:** Station address of the slave to be included. A value of 0 includes all slaves. * **Return:** EC_E_NOERROR or error code ### ConfigSetPreviousPort  (*wStationAddress*,  *wStationAddressPrev*,  *wPortPrev*) Set previous port information of a slave. It has to be called after emConfigLoad and prior to calling emConfigApply. * **Param wStationAddress:** Station address of the slave * **Param wStationAddressPrev:** Previous slave station address * **Param wPortPrev:** Previous port * **Return:** EC_E_NOERROR or error code ### ConfigApply () Apply the network configuration. It has to be called after emConfigLoad. * **Return:** EC_E_NOERROR or error code ### 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 ### 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. ### 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 ### 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 ### 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 ### HCGetNumGroupMembers  (*dwGroupIndex*) Get number of slaves belonging to a specific Hot-Connect group. * **Param dwGroupIndex:** Index of Hot-Connect group, 0 is the mandatory group * **Return:** Number of slaves ### HCGetSlaveIdsOfGroup  (*dwGroupIndex*, *out*  *adwSlaveId*,  *dwMaxNumSlaveIds*) Get a list of Slave ID’s belonging to a specific Hot-Connect group. * **Param dwGroupIndex:** Index of Hot-Connect group, 0 is the mandatory group * **Param adwSlaveId:** Preallocated Slave ID list buffer * **Param dwMaxNumSlaveIds:** Size of Slave ID list buffer * **Return:** EC_E_NOERROR or error code ### GetHcGroupNumOf () Get number of Hot-Connect groups. * **Return:** number of HC groups ### GetHcGroupInfo  (*dwHcGroupIdx*,  *pHcGroupInfo*) Get informations of a specific Hot-Connect group. * **Param dwHcGroupIdx:** * **Param pHcGroupInfo:** Hot connect group info * **Return:** EC_E_NOERROR or error code ### 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 ### 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 ### GetDiagnosisImageSize () Gets the diagnosis image size. * **Return:** Diagnosis image size ### 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:** ### 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 ### GetMasterSyncUnitInfoNumOf () Get number of Master Sync Units info entries. * **Return:** Number of Master Sync Units info entries ### GetMasterSyncUnitInfo  (*wMsuId*, *out*  *pMsuInfo*) Get number of Master Sync Units info entries. * **Param wMsuId:** * **Param pMsuInfo:** * **Return:** Number of Master Sync Units info entries ### BadConnectionsDetect  (*bRefreshSlaveStatistics*,  *dwTimeout*) Detects bad connections. Analyzes the slave ESC error counters: * Invalid Frame Counter (0x0300), * RX Error Counter (0x0301), * Lost Link Counter (0x0310), whether there is a problem in the area PHY - connector - cable - connector - PHY. If one of the above error counters shows a value not equal to zero, an EC_NOTIFY_BAD_CONNECTION is generated, which contains the exact position of the faulty connection. * **Param bRefreshSlaveStatistics:** * **Param dwTimeout:** Timeout [ms]. not be EC_NOWAIT! * **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 ### GetMonitorStatus (*out*  *pStatus*) Get current Monitor status. Information about the current status of the EtherCAT frame / cycle processing * **Param pStatus:** Monitor status descriptor * **Return:** * EC_E_NOERROR on success * EC_E_INVALIDSTATE if Monitor isn’t initialized * EC_E_INVALIDPARM if pStatus invalid ### OpenPacketCapture  (*pParms*) Open packet capture file (PCAP). Opens a PCAP trace for further processing within the JobTask. No LinkLayer must have been loaded. * **Param pParms:** Packet capture parameter * **Return:** * EC_E_NOERROR on success * EC_E_INVALIDSTATE if Monitor isn’t initialized or link layer loaded * EC_E_INVALIDPARM if parameter file name invalid * EC_E_OPENFAILED if file could not be opened * EC_E_NOMEMORY if not enough memory available ### ClosePacketCapture () Close packet capture file (PCAP). * **Return:** * EC_E_NOERROR on success * EC_E_INVALIDSTATE if Monitor isn’t initialized or link layer loaded ### GetPacketCaptureInfo (*out*  *pInfo*) Get packet capture file processing status information. * **Param pInfo:** Packet capture info descriptor * **Return:** * EC_E_NOERROR on success * EC_E_INVALIDSTATE if Monitor isn’t initialized or link layer loaded ### StartLivePacketCapture  (*pParms*) Start live packet capture (PCAP). Starts a live recording of the EtherCAT frames in a specified PCAP file. Only the PCAP file format is currently supported. * **Param pParms:** Packet capture parameter * **Return:** * EC_E_NOERROR on success * EC_E_INVALIDPARM if parameter file name invalid * EC_E_OPENFAILED if file could not be opened * EC_E_NOMEMORY if not enough memory available ### StopLivePacketCapture () Stop live packet capture (PCAP). Stops a previously started live recording of the EtherCAT frames. * **Return:** * EC_E_NOERROR on success * EC_E_INVALIDSTATE if Monitor isn’t initialized or no recording is in progress ### BacktracePacketCapture  (*pParms*) Dump packet capture (PCAP) from backtrace buffer. Writes a backtrace of the received frames in a specified PCAP file. The number of frames in the backtrace buffer is parameterized via EC_T_MONITOR_INIT_PARMS::dwBacktraceFrames. Only the PCAP file format is currently supported. * **Param pParms:** Packet capture parameter * **Return:** * EC_E_NOERROR on success * EC_E_BUSY if another dump is in progress * EC_E_INVALIDSTATE if backtrace buffer is not initialized * EC_E_INVALIDPARM if parameter file name invalid * EC_E_OPENFAILED if file could not be opened * EC_E_NOMEMORY if not enough memory available ### ExportEniBuilderConfig  (*szFileName*) Export an EniBuilder file describing the observed network topology. * **Param szFileName:** null-terminated export file path * **Return:** * EC_E_NOERROR on success * EC_E_INVALIDPARM if parameter file name invalid * EC_E_OPENFAILED if file could not be opened * EC_E_NOMEMORY if not enough memory available ### 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)