|
Data Structures | |
| struct | struct_CO_Data |
| This structure contains all necessary informations to define a CANOpen node. More... | |
Defines | |
| #define | getODentry(OD, wIndex, bSubindex, pDestData, pExpectedSize, pDataType,checkAccess) |
| getODentry() to read from object and endianize | |
| #define | readLocalDict(OD, wIndex, bSubindex, pDestData, pExpectedSize, pDataType,checkAccess) |
| readLocalDict() reads an entry from the object dictionary, but in contrast to getODentry(), readLocalDict() doesn't endianize entry and reads entry in machine native endianness. | |
| #define | setODentry(d, wIndex, bSubindex, pSourceData, pExpectedSize, checkAccess) |
| setODentry converts SourceData from network byte order to machine native format, and writes that to OD. | |
| #define | writeLocalDict(d, wIndex, bSubindex, pSourceData, pExpectedSize, checkAccess) _setODentry( d, wIndex, bSubindex, pSourceData, pExpectedSize, checkAccess, 0) |
| Writes machine native SourceData to OD. | |
| #define getODentry | ( | OD, | |||
| wIndex, | |||||
| bSubindex, | |||||
| pDestData, | |||||
| pExpectedSize, | |||||
| pDataType, | |||||
| checkAccess | ) |
Value:
_getODentry( OD, wIndex, bSubindex, pDestData, pExpectedSize, \
pDataType, checkAccess, 1)
| OD | Pointer to a CAN object data structure | |
| wIndex | The index in the object dictionary where you want to read an entry | |
| bSubindex | The subindex of the Index. e.g. mostly subindex 0 is used to tell you how many valid entries you can find in this index. Look at the canopen standard for further information | |
| *pDestData | Pointer to the pointer which points to the variable where the value of this object dictionary entry should be copied | |
| pExpectedSize | This function writes the size of the copied value (in Byte) into this variable. | |
| *pDataType | Pointer to the type of the data. See objdictdef.h | |
| checkAccess | Flag that indicate if a check rights must be perfomed (0 : no , other than 0 : yes) | |
| endianize | Set to 1 : endianized into network byte order |
Definition at line 139 of file objacces.h.
Referenced by buildPDO(), and objdictToSDOline().
| #define readLocalDict | ( | OD, | |||
| wIndex, | |||||
| bSubindex, | |||||
| pDestData, | |||||
| pExpectedSize, | |||||
| pDataType, | |||||
| checkAccess | ) |
Value:
_getODentry( OD, wIndex, bSubindex, pDestData, pExpectedSize, \
pDataType, checkAccess, 0)
| OD | Pointer to a CAN object data structure | |
| wIndex | The index in the object dictionary where you want to read an entry | |
| bSubindex | The subindex of the Index. e.g. mostly subindex 0 is used to tell you how many valid entries you can find in this index. Look at the canopen standard for further information | |
| *pDestData | Pointer to the pointer which points to the variable where the value of this object dictionary entry should be copied | |
| pExpectedSize | This function writes the size of the copied value (in Byte) into this variable. | |
| *pDataType | Pointer to the type of the data. See objdictdef.h | |
| checkAccess | if other than 0, do not read if the data is Write Only [Not used today. Put always 0]. | |
| endianize | Set to 0, data is not endianized and copied in machine native endianness |
Definition at line 169 of file objacces.h.
| #define setODentry | ( | d, | |||
| wIndex, | |||||
| bSubindex, | |||||
| pSourceData, | |||||
| pExpectedSize, | |||||
| checkAccess | ) |
Value:
_setODentry( d, wIndex, bSubindex, pSourceData, pExpectedSize, \
checkAccess, 1)
// Example usage: UNS8 B; B = 0xFF; // set transmission type retcode = setODentry( (UNS16)0x1800, (UNS8)2, &B, sizeof(UNS8), 1 );
| d | Pointer to a CAN object data structure | |
| wIndex | The index in the object dictionary where you want to write an entry | |
| bSubindex | The subindex of the Index. e.g. mostly subindex 0 is used to tell you how many valid entries you can find in this index. Look at the canopen standard for further information | |
| *pSourceData | Pointer to the variable that holds the value that should be copied into the object dictionary | |
| *pExpectedSize | The size of the value (in Byte). | |
| checkAccess | Flag that indicate if a check rights must be perfomed (0 : no , other than 0 : yes) | |
| endianize | Set to 1 : endianized into network byte order |
Definition at line 228 of file objacces.h.
Referenced by proceedPDO(), and SDOlineToObjdict().
| #define writeLocalDict | ( | d, | |||
| wIndex, | |||||
| bSubindex, | |||||
| pSourceData, | |||||
| pExpectedSize, | |||||
| checkAccess | ) | _setODentry( d, wIndex, bSubindex, pSourceData, pExpectedSize, checkAccess, 0) |
Writes machine native SourceData to OD.
// Example usage: UNS8 B; B = 0xFF; // set transmission type retcode = writeLocalDict( (UNS16)0x1800, (UNS8)2, &B, sizeof(UNS8), 1 );
| d | Pointer to a CAN object data structure | |
| wIndex | The index in the object dictionary where you want to write an entry | |
| bSubindex | The subindex of the Index. e.g. mostly subindex 0 is used to tell you how many valid entries you can find in this index. Look at the canopen standard for further information | |
| *pSourceData | Pointer to the variable that holds the value that should be copied into the object dictionary | |
| *pExpectedSize | The size of the value (in Byte). | |
| checkAccess | Flag that indicate if a check rights must be perfomed (0 : no , other than 0 : yes) | |
| endianize | Data is not endianized and copied in machine native endianness |
Definition at line 258 of file objacces.h.
1.5.6