|
SOES v1.0.0
|
CAN over EtherCAT (CoE) module. More...
#include <string.h>#include "utypes.h"#include "esc.h"#include "esc_coe.h"#include "objectlist.h"Defines | |
| #define | BITS2BYTES(b) ((b + 7) >> 3) |
| #define | ODLISTSIZE ((MBX1_sml - MBXHSIZE - sizeof(_COEh) - sizeof(_INFOh) - 2) & 0xfffe) |
Functions | |
| int32 | SDO_findobject (uint16 index) |
| uint16 | sizeTXPDO (void) |
| uint16 | sizeRXPDO (void) |
| int16 | SDO_findsubindex (int16 nidx, uint8 subindex) |
| void | copy2mbx (void *source, void *dest, uint16 size) |
| void | SDO_abort (uint16 index, uint8 subindex, uint32 abortcode) |
| void | SDO_upload (void) |
| void | SDO_uploadsegment (void) |
| int | ESC_pre_objecthandler (uint16 index, uint8 subindex) |
| void | SDO_download (void) |
| void | SDO_infoerror (uint32 abortcode) |
| void | SDO_getodlist (void) |
| void | SDO_getodlistcont (void) |
| void | SDO_getod (void) |
| void | SDO_geted (void) |
| void | ESC_coeprocess (void) |
Variables | |
| uint8 | txpdoitems |
| uint8 | rxpdoitems |
CAN over EtherCAT (CoE) module.
SDO read / write and SDO service functions
| #define BITS2BYTES | ( | b | ) | ((b + 7) >> 3) |
| void copy2mbx | ( | void * | source, |
| void * | dest, | ||
| uint16 | size | ||
| ) |
Copy to mailbox.
| [in] | source | = pointer to source |
| [in] | dest | = pointer to destination |
| [in] | size | = Size to copy |
| void ESC_coeprocess | ( | void | ) |
Main CoE function checking the status on current mailbox buffers carrying data, distributing the mailboxes to appropriate CoE functions. On Error an MBX_error or SDO Abort will be sent depending on error cause.
| int ESC_pre_objecthandler | ( | uint16 | index, |
| uint8 | subindex | ||
| ) |
Function to pre-qualify the incoming SDO download.
| [in] | index | = index of SDO download request to check |
| [in] | sub-index | = sub-index of SDO download request to check |
| void SDO_abort | ( | uint16 | index, |
| uint8 | subindex, | ||
| uint32 | abortcode | ||
| ) |
Function for sending an SDO Abort reply.
| [in] | index | = index of object causing abort reply |
| [in] | sub-index | = sub-index of object causing abort reply |
| [in] | abortcode | = abort code to send in reply |
| void SDO_download | ( | void | ) |
Function for handling incoming requested SDO Download, validating the request and sending an response. On error an SDO Abort will be sent.
| int32 SDO_findobject | ( | uint16 | index | ) |
Search for an object index matching the wanted value in the Object List.
| [in] | index | = value on index of object we want to locate |
| int16 SDO_findsubindex | ( | int16 | nidx, |
| uint8 | subindex | ||
| ) |
Search for an object sub-index.
| [in] | nidx | = local array index of object we want to find sub-index to |
| [in] | subindex | = value on sub-index of object we want to locate |
| void SDO_geted | ( | void | ) |
Function for handling incoming requested SDO Get Entry Description, validating the request and sending an response. On error an SDO Info Error will be sent.
| void SDO_getod | ( | void | ) |
Function for handling incoming requested SDO Get Object Description, validating the request and sending an response. On error an SDO Info Error will be sent.
| void SDO_getodlist | ( | void | ) |
Function for handling incoming requested SDO Get OD List, validating the request and sending an response. On error an SDO Info Error will be sent.
| void SDO_getodlistcont | ( | void | ) |
Function for continuing sending left overs from previous requested SDO Get OD List, validating the request and sending an response.
| void SDO_infoerror | ( | uint32 | abortcode | ) |
Function for sending an SDO Info Error reply.
| [in] | abortcode | = = abort code to send in reply |
| void SDO_upload | ( | void | ) |
Function for responding on requested SDO Upload, sending the content requested in a free Mailbox buffer. Depending of size of data expedited, normal or segmented transfer is used. On error an SDO Abort will be sent.
| void SDO_uploadsegment | ( | void | ) |
Function for handling the following SDO Upload if previous SDOUpload response was flagged it needed to be segmented.
| uint16 sizeRXPDO | ( | void | ) |
Calculate the size in Bytes of RxPDOs by adding the objects in SyncManager SDO 1C12.
| uint16 sizeTXPDO | ( | void | ) |
Calculate the size in Bytes of TxPDOs by adding the objects in SyncManager SDO 1C13.
| uint8 rxpdoitems |
| uint8 txpdoitems |
1.7.4