MCPcopy Create free account
hub / github.com/CANopenNode/CANopenNode / OD_getSDOabCode

Function OD_getSDOabCode

301/CO_ODinterface.c:271–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271uint32_t
272OD_getSDOabCode(ODR_t returnCode) {
273 static const uint32_t abortCodes[(uint8_t)ODR_COUNT] = {
274 0x00000000UL, /* No abort */
275 0x05040005UL, /* Out of memory */
276 0x06010000UL, /* Unsupported access to an object */
277 0x06010001UL, /* Attempt to read a write only object */
278 0x06010002UL, /* Attempt to write a read only object */
279 0x06020000UL, /* Object does not exist in the object dictionary */
280 0x06040041UL, /* Object cannot be mapped to the PDO */
281 0x06040042UL, /* Num and len of object to be mapped exceeds PDO len */
282 0x06040043UL, /* General parameter incompatibility reasons */
283 0x06040047UL, /* General internal incompatibility in device */
284 0x06060000UL, /* Access failed due to hardware error */
285 0x06070010UL, /* Data type does not match, length does not match */
286 0x06070012UL, /* Data type does not match, length too high */
287 0x06070013UL, /* Data type does not match, length too short */
288 0x06090011UL, /* Sub index does not exist */
289 0x06090030UL, /* Invalid value for parameter (download only). */
290 0x06090031UL, /* Value range of parameter written too high */
291 0x06090032UL, /* Value range of parameter written too low */
292 0x06090036UL, /* Maximum value is less than minimum value. */
293 0x060A0023UL, /* Resource not available: SDO connection */
294 0x08000000UL, /* General error */
295 0x08000020UL, /* Data cannot be transferred or stored to application */
296 0x08000021UL, /* Data cannot be transferred because of local control */
297 0x08000022UL, /* Data cannot be tran. because of present device state */
298 0x08000023UL, /* Object dict. not present or dynamic generation fails */
299 0x08000024UL /* No data available */
300 };
301
302 return ((returnCode < ODR_OK) || (returnCode >= ODR_COUNT)) ? abortCodes[ODR_DEV_INCOMPAT] : abortCodes[returnCode];
303}
304
305ODR_t
306OD_get_value(const OD_entry_t* entry, uint8_t subIndex, void* val, OD_size_t len, bool_t odOrig) {

Callers 5

validateAndWriteToODFunction · 0.85
readFromOdFunction · 0.85
CO_SDOserver_processFunction · 0.85
CO_SDOserver.cFile · 0.85
ifFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected