21#define CHECK_COMMAND_LIST_RETURN_IF_ERROR(commandListIndex)\
23 if (indexCommandList >= ECMC_MAX_COMMANDS_LISTS ||\
24 indexCommandList < 0) {\
25 LOGERR("ERROR: Command list index out of range.\n");\
26 return ERROR_COMMAND_LIST_INDEX_OUT_OF_RANGE;\
28 if (commandLists[indexCommandList] == NULL) {\
29 LOGERR("ERROR: Command list object NULL.\n");\
30 return ERROR_COMMAND_LIST_NULL;\
34#define CHECK_EVENT_RETURN_IF_ERROR(indexEvent)\
36 if (indexEvent >= ECMC_MAX_EVENT_OBJECTS || indexEvent < 0) {\
37 LOGERR("ERROR: Event index out of range.\n");\
38 return ERROR_MAIN_EVENT_INDEX_OUT_OF_RANGE;\
40 if (events[indexEvent] == NULL) {\
41 LOGERR("ERROR: Event object NULL.\n");\
42 return ERROR_MAIN_EVENT_NULL;\
46#define CHECK_STORAGE_RETURN_IF_ERROR(indexStorage)\
48 if (indexStorage >= ECMC_MAX_DATA_STORAGE_OBJECTS ||\
50 LOGERR("ERROR: Data storage index out of range.\n");\
51 return ERROR_MAIN_DATA_STORAGE_INDEX_OUT_OF_RANGE;\
53 if (dataStorages[indexStorage] == NULL) {\
54 LOGERR("ERROR: Data storage object NULL.\n");\
55 return ERROR_MAIN_DATA_STORAGE_NULL;\
59#define CHECK_RECORDER_RETURN_IF_ERROR(indexRecorder)\
61 if (indexRecorder >= ECMC_MAX_DATA_RECORDERS_OBJECTS ||\
63 LOGERR("ERROR: Data recorder index out of range.\n");\
64 return ERROR_MAIN_DATA_RECORDER_INDEX_OUT_OF_RANGE;\
66 if (dataRecorders[indexRecorder] == NULL) {\
67 LOGERR("ERROR: Data recorder object NULL.\n");\
68 return ERROR_MAIN_DATA_RECORDER_NULL;\
133 int slaveBusPosition,
479 int recorderEntryIndex,
480 int slaveBusPosition,
int setRecorderEnablePrintouts(int indexRecorder, int enable)
Enable diagnostic printouts from recorder object. .
int readStorageBuffer(int indexStorage, double **data, int *size)
Reads contents of storage buffer. .
int getStorageDataIndex(int indexStorage, int *index)
Get current index of data in storage buffer. .
int createCommandList(int indexCommandList)
Create a command list object.
int setCommandListEnable(int indexCommandList, int enable)
Enable command list. .
int writeStorageBuffer(int indexStorage, double *data, int size)
Writes data to storage buffer. .
int createRecorder(int indexRecorder)
Create recorder object.
int linkRecorderToEvent(int indexRecorder, int indexEvent, int consumerIndex)
Link recorder object to event object. .
int linkStorageToRecorder(int indexStorage, int indexRecorder)
Link storage object to recorder object.
int triggerCommandList(int indexCommandList)
Force trigger command list. .
int triggerEvent(int indexEvent)
Force trigger event. .
int linkCommandListToEvent(int indexCommandList, int indexEvent, int consumerIndex)
Link command list object to event object. .
int getEventEnabled(int indexEvent, int *enabled)
Get event enabled. .
int clearStorage(int indexStorage)
Clear data storage buffer.
int createDataStorage(int index, int elements, int bufferType)
Create a data storage object.
int setEventTriggerEdge(int indexEvent, int triggerEdge)
Set event trigger edge. .
int setRecorderEnable(int indexRecorder, int enable)
Enable recorder. .
int setCommandListEnablePrintouts(int indexCommandList, int enable)
Enable diagnostic printouts from command list object. .
int armEvent(int indexEvent)
Arm event. .
int linkAxisDataToRecorder(int indexRecorder, int axisIndex, int dataToStore)
Links an axis data source to a recorder object. .
int setEventEnableArmSequence(int indexEvent, int enable)
Enable arm sequence. .
int appendStorageBuffer(int indexStorage, double *data, int size)
Appends data to the end of storage buffer. .
int getRecorderEnabled(int indexRecorder, int *enabled)
Get recorder enabled. .
int setEventEnable(int indexEvent, int enable)
Enable event. .
int setEventType(int indexEvent, int type)
Set event type. .
int linkEcEntryToRecorder(int indexRecorder, int recorderEntryIndex, int slaveBusPosition, char *entryIDString, int bitIndex)
Links an EtherCAT entry to a recorder object. .
int setEventSampleTime(int indexEvent, int sampleTime)
Set event sampling time (cycle counts). .
int createEvent(int index)
Create an event object.
int printStorageBuffer(int indexStorage)
Print contents of buffer. .
int addCommandListCommand(int indexCommandList, char *expr)
Add command to command list. .
int triggerRecorder(int indexRecorder)
Force trigger recorder. .
int setStorageEnablePrintouts(int indexStorage, int enable)
Enable diagnostic printouts from data storage object. .
int linkEcEntryToEvent(int indexEvent, int eventEntryIndex, int slaveBusPosition, char *entryIDString, int bitIndex)
Links an EtherCAT entry to an event object. .
int createShm()
Create SHM Object. .
int setEventEnablePrintouts(int indexEvent, int enable)
Enable diagnostic printouts from event object. .
int setDataStorageCurrentDataIndex(int indexStorage, int position)
Set current data index of storage buffer. .