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

Function OD_get_value

301/CO_ODinterface.c:305–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303}
304
305ODR_t
306OD_get_value(const OD_entry_t* entry, uint8_t subIndex, void* val, OD_size_t len, bool_t odOrig) {
307 if (val == NULL) {
308 return ODR_DEV_INCOMPAT;
309 }
310
311 OD_IO_t io = {NULL};
312 OD_stream_t* stream = &io.stream;
313 OD_size_t countRd = 0;
314
315 ODR_t ret = OD_getSub(entry, subIndex, &io, odOrig);
316
317 if (ret != ODR_OK) {
318 return ret;
319 }
320 if (stream->dataLength != len) {
321 return ODR_TYPE_MISMATCH;
322 }
323
324 return io.read(stream, val, len, &countRd);
325}
326
327ODR_t
328OD_set_value(const OD_entry_t* entry, uint8_t subIndex, void* val, OD_size_t len, bool_t odOrig) {

Callers 10

OD_get_i8Function · 0.85
OD_get_i16Function · 0.85
OD_get_i32Function · 0.85
OD_get_i64Function · 0.85
OD_get_u8Function · 0.85
OD_get_u16Function · 0.85
OD_get_u32Function · 0.85
OD_get_u64Function · 0.85
OD_get_f32Function · 0.85
OD_get_f64Function · 0.85

Calls 1

OD_getSubFunction · 0.85

Tested by

no test coverage detected