CANopenNode
CANopen protocol stack
|
CANopen Object Dictionary interface. More...
#include "301/CO_driver.h"
Go to the source code of this file.
Data Structures | |
struct | OD_stream_t |
IO stream structure, used for read/write access to OD variable, part of OD_IO_t. More... | |
struct | OD_IO_t |
Structure for input / output on the OD variable. More... | |
struct | OD_extension_t |
Extension of OD object, which can optionally be specified by application in initialization phase with OD_extension_init() function. More... | |
struct | OD_entry_t |
Object Dictionary entry for one OD object. More... | |
struct | OD_t |
Object Dictionary. More... | |
struct | OD_obj_var_t |
Object for single OD variable, used for "VAR" type OD objects. More... | |
struct | OD_obj_array_t |
Object for OD array of variables, used for "ARRAY" type OD objects. More... | |
struct | OD_obj_record_t |
Object for OD sub-elements, used in "RECORD" type OD objects. More... | |
Macros | |
#define | OD_FLAGS_PDO_SIZE 4U |
Size of of flagsPDO variable inside OD_extension_t, from 0 to 32. | |
#define | CO_PROGMEM const |
Modifier for OD objects. | |
Typedefs | |
typedef uint32_t | OD_size_t |
Variable of type OD_size_t contains data length in bytes of OD variable. | |
typedef uint8_t | OD_attr_t |
Type (and size) of Object Dictionary attribute. | |
Functions | |
ODR_t | OD_readOriginal (OD_stream_t *stream, void *buf, OD_size_t count, OD_size_t *countRead) |
Read value from original OD location. | |
ODR_t | OD_writeOriginal (OD_stream_t *stream, const void *buf, OD_size_t count, OD_size_t *countWritten) |
Write value to original OD location. | |
OD_entry_t * | OD_find (OD_t *od, uint16_t index) |
Find OD entry in Object Dictionary. | |
ODR_t | OD_getSub (const OD_entry_t *entry, uint8_t subIndex, OD_IO_t *io, bool_t odOrig) |
Find sub-object with specified sub-index on OD entry returned by OD_find. | |
static uint16_t | OD_getIndex (const OD_entry_t *entry) |
Return index from OD entry. | |
static bool_t | OD_mappable (OD_stream_t *stream) |
Check, if OD variable is mappable to PDO or SRDO. | |
static void | OD_rwRestart (OD_stream_t *stream) |
Restart read or write operation on OD variable. | |
static void | OD_requestTPDO (OD_entry_t *entry, uint8_t subIndex) |
Request TPDO, to which OD variable is mapped. | |
static bool_t | OD_TPDOtransmitted (OD_entry_t *entry, uint8_t subIndex) |
Check if requested TPDO was transmitted. | |
uint32_t | OD_getSDOabCode (ODR_t returnCode) |
Get SDO abort code from returnCode. | |
static ODR_t | OD_extension_init (OD_entry_t *entry, OD_extension_t *extension) |
Extend OD object with own read/write functions and/or flagsPDO. | |
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. | |
CANopen Object Dictionary interface.
This file is part of https://github.com/CANopenNode/CANopenNode, a CANopen Stack.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.