CANopenDemo
CANopenNode demo, tutorial and testing
Loading...
Searching...
No Matches
objectAccessOD.h
Go to the documentation of this file.
1
25#ifndef objectAccessOD_H
26#define objectAccessOD_H
27
28#include "301/CO_ODinterface.h"
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
47
48
59 OD_entry_t *OD_demoRecord,
60 uint32_t *errInfo);
61
62
80 float64_t average = 0;
81 OD_size_t countRd;
82
83 ODR_t odRet = thisObj->io_average.read(&thisObj->io_average.stream,
84 &average, sizeof(average),
85 &countRd);
86
87 (void) odRet; (void)countRd; /* unused */
88
89 return average;
90}
91
92#ifdef __cplusplus
93}
94#endif /* __cplusplus */
95
96#endif /* objectAccessOD_H */
ODR_t
uint32_t OD_size_t
unsigned long int uint32_t
float float32_t
signed long long int int64_t
double float64_t
unsigned long long int uint64_t
CO_ReturnError_t
CO_ReturnError_t objectAccessOD_init(objectAccessOD_t *thisObj, OD_entry_t *OD_demoRecord, uint32_t *errInfo)
Initialize objectAccessOD object.
Definition objectAccessOD.c:123
static float64_t objectAccessOD_readAverage(objectAccessOD_t *thisObj)
Read "average" variable from Object Dictionary.
Definition objectAccessOD.h:79
OD_stream_t stream
ODR_t(* read)(OD_stream_t *stream, void *buf, OD_size_t count, OD_size_t *countRead)
Object declaration for objectAccessOD.
Definition objectAccessOD.h:37
float32_t * r32
Pointer to variable in object dictionary.
Definition objectAccessOD.h:42
OD_extension_t OD_demoRecord_extension
Extension for OD object.
Definition objectAccessOD.h:38
int64_t * i64
Pointer to variable in object dictionary.
Definition objectAccessOD.h:40
uint64_t * u64
Pointer to variable in object dictionary.
Definition objectAccessOD.h:41
float64_t * r64
Pointer to variable in object dictionary.
Definition objectAccessOD.h:43
OD_IO_t io_average
object for read access to sub-OD variable average
Definition objectAccessOD.h:39
uint32_t internalParameter
Variable initialised from OD sub-entry 'Parameter with default value'.
Definition objectAccessOD.h:45