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

Function OD_set_value

301/CO_ODinterface.c:327–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325}
326
327ODR_t
328OD_set_value(const OD_entry_t* entry, uint8_t subIndex, void* val, OD_size_t len, bool_t odOrig) {
329 if (val == NULL) {
330 return ODR_DEV_INCOMPAT;
331 }
332
333 OD_IO_t io = {NULL};
334 OD_stream_t* stream = &io.stream;
335 OD_size_t countWritten = 0;
336
337 ODR_t ret = OD_getSub(entry, subIndex, &io, odOrig);
338
339 if (ret != ODR_OK) {
340 return ret;
341 }
342 if (stream->dataLength != len) {
343 return ODR_TYPE_MISMATCH;
344 }
345
346 return io.write(stream, val, len, &countWritten);
347}
348
349void*
350OD_getPtr(const OD_entry_t* entry, uint8_t subIndex, OD_size_t len, ODR_t* err) {

Callers 10

OD_set_i8Function · 0.85
OD_set_i16Function · 0.85
OD_set_i32Function · 0.85
OD_set_i64Function · 0.85
OD_set_u8Function · 0.85
OD_set_u16Function · 0.85
OD_set_u32Function · 0.85
OD_set_u64Function · 0.85
OD_set_f32Function · 0.85
OD_set_f64Function · 0.85

Calls 1

OD_getSubFunction · 0.85

Tested by

no test coverage detected