CANopenNode
CANopen protocol stack
Loading...
Searching...
No Matches
Getters and setters
+ Collaboration diagram for Getters and setters:

Functions

ODR_t OD_get_value (const OD_entry_t *entry, uint8_t subIndex, void *val, OD_size_t len, bool_t odOrig)
 Get variable from Object Dictionary.
 
static ODR_t OD_get_i8 (const OD_entry_t *entry, uint8_t subIndex, int8_t *val, bool_t odOrig)
 Get int8_t variable from Object Dictionary, see OD_get_value.
 
static ODR_t OD_get_i16 (const OD_entry_t *entry, uint8_t subIndex, int16_t *val, bool_t odOrig)
 Get int16_t variable from Object Dictionary, see OD_get_value.
 
static ODR_t OD_get_i32 (const OD_entry_t *entry, uint8_t subIndex, int32_t *val, bool_t odOrig)
 Get int32_t variable from Object Dictionary, see OD_get_value.
 
static ODR_t OD_get_i64 (const OD_entry_t *entry, uint8_t subIndex, int64_t *val, bool_t odOrig)
 Get int64_t variable from Object Dictionary, see OD_get_value.
 
static ODR_t OD_get_u8 (const OD_entry_t *entry, uint8_t subIndex, uint8_t *val, bool_t odOrig)
 Get uint8_t variable from Object Dictionary, see OD_get_value.
 
static ODR_t OD_get_u16 (const OD_entry_t *entry, uint8_t subIndex, uint16_t *val, bool_t odOrig)
 Get uint16_t variable from Object Dictionary, see OD_get_value.
 
static ODR_t OD_get_u32 (const OD_entry_t *entry, uint8_t subIndex, uint32_t *val, bool_t odOrig)
 Get uint32_t variable from Object Dictionary, see OD_get_value.
 
static ODR_t OD_get_u64 (const OD_entry_t *entry, uint8_t subIndex, uint64_t *val, bool_t odOrig)
 Get uint64_t variable from Object Dictionary, see OD_get_value.
 
static ODR_t OD_get_f32 (const OD_entry_t *entry, uint8_t subIndex, float32_t *val, bool_t odOrig)
 Get float32_t variable from Object Dictionary, see OD_get_value.
 
static ODR_t OD_get_f64 (const OD_entry_t *entry, uint8_t subIndex, float64_t *val, bool_t odOrig)
 Get float64_t variable from Object Dictionary, see OD_get_value.
 
ODR_t OD_set_value (const OD_entry_t *entry, uint8_t subIndex, void *val, OD_size_t len, bool_t odOrig)
 Set variable in Object Dictionary.
 
static ODR_t OD_set_i8 (const OD_entry_t *entry, uint8_t subIndex, int8_t val, bool_t odOrig)
 Set int8_t variable in Object Dictionary, see OD_set_value.
 
static ODR_t OD_set_i16 (const OD_entry_t *entry, uint8_t subIndex, int16_t val, bool_t odOrig)
 Set int16_t variable in Object Dictionary, see OD_set_value.
 
static ODR_t OD_set_i32 (const OD_entry_t *entry, uint8_t subIndex, int32_t val, bool_t odOrig)
 Set int32_t variable in Object Dictionary, see OD_set_value.
 
static ODR_t OD_set_i64 (const OD_entry_t *entry, uint8_t subIndex, int64_t val, bool_t odOrig)
 Set int32_t variable in Object Dictionary, see OD_set_value.
 
static ODR_t OD_set_u8 (const OD_entry_t *entry, uint8_t subIndex, uint8_t val, bool_t odOrig)
 Set uint8_t variable in Object Dictionary, see OD_set_value.
 
static ODR_t OD_set_u16 (const OD_entry_t *entry, uint8_t subIndex, uint16_t val, bool_t odOrig)
 Set uint16_t variable in Object Dictionary, see OD_set_value.
 
static ODR_t OD_set_u32 (const OD_entry_t *entry, uint8_t subIndex, uint32_t val, bool_t odOrig)
 Set uint32_t variable in Object Dictionary, see OD_set_value.
 
static ODR_t OD_set_u64 (const OD_entry_t *entry, uint8_t subIndex, uint64_t val, bool_t odOrig)
 Set uint64_t variable in Object Dictionary, see OD_set_value.
 
static ODR_t OD_set_f32 (const OD_entry_t *entry, uint8_t subIndex, float32_t val, bool_t odOrig)
 Set float32_t variable in Object Dictionary, see OD_set_value.
 
static ODR_t OD_set_f64 (const OD_entry_t *entry, uint8_t subIndex, float64_t val, bool_t odOrig)
 Set float64_t variable in Object Dictionary, see OD_set_value.
 
void * OD_getPtr (const OD_entry_t *entry, uint8_t subIndex, OD_size_t len, ODR_t *err)
 Get pointer to memory which holds data variable from Object Dictionary.
 

Detailed Description

Getter and setter helper functions for accessing different types of Object Dictionary variables.

Function Documentation

◆ OD_get_value()

ODR_t OD_get_value ( const OD_entry_t * entry,
uint8_t subIndex,
void * val,
OD_size_t len,
bool_t odOrig )

Get variable from Object Dictionary.

Parameters
entryObject Dictionary entry.
subIndexSub-index of the variable from the OD object.
[out]valValue will be written here.
lenSize of value to retrieve from OD.
odOrigIf true, then potential IO extension on entry will be ignored and data in the original OD location will be returned.
Returns
Value from ODR_t, "ODR_OK" in case of success. Error, if variable does not exist in object dictionary or it does not have the correct length or other reason.

◆ OD_set_value()

ODR_t OD_set_value ( const OD_entry_t * entry,
uint8_t subIndex,
void * val,
OD_size_t len,
bool_t odOrig )

Set variable in Object Dictionary.

Parameters
entryObject Dictionary entry.
subIndexSub-index of the variable from the OD object.
valPointer to value to write.
lenSize of value to write.
odOrigIf true, then potential IO extension on entry will be ignored and data in the original OD location will be written.
Returns
Value from ODR_t, "ODR_OK" in case of success. Error, if variable does not exist in object dictionary or it does not have the correct length or other reason.

◆ OD_getPtr()

void * OD_getPtr ( const OD_entry_t * entry,
uint8_t subIndex,
OD_size_t len,
ODR_t * err )

Get pointer to memory which holds data variable from Object Dictionary.

Function always returns "dataOrig" pointer, which points to data in the original OD location. Take care, if IO extension is enabled on OD entry. Take also care that "dataOrig" could be not aligned to data type.

Parameters
entryObject Dictionary entry.
subIndexSub-index of the variable from the OD object.
lenRequired length of the variable. If len is different than zero, then actual length of the variable must match len or error is returned.
[out]errError reason is written here in case of error (allow NULL).
Returns
Pointer to variable in Object Dictionary or NULL in case of error.