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

Function OD_write_13FF

304/CO_SRDO.c:331–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331static ODR_t
332OD_write_13FF(OD_stream_t* stream, const void* buf, OD_size_t count, OD_size_t* countWritten) {
333 if ((stream == NULL) || (stream->subIndex == 0U) || (buf == NULL) || (countWritten == NULL)) {
334 return ODR_DEV_INCOMPAT;
335 }
336
337 CO_SRDOGuard_t* SRDOGuard = stream->object;
338
339 if (SRDOGuard->NMTisOperational) {
340 /* Data cannot be transferred or stored to the application because of the present device state. */
341 return ODR_DATA_DEV_STATE;
342 }
343
344#ifdef CO_CONFORMANCE_TEST_TOOL_ADAPTATION
345 if (OD_not_write_same_value(stream, buf, count)) {
346 return ODR_OK;
347 }
348#endif
349
350 /* set OD object 13FE:00 to CO_SRDO_INVALID */
351 configurationValidUnset(SRDOGuard);
352
353 /* write value to the original location in the Object Dictionary */
354 return OD_writeOriginal(stream, buf, count, countWritten);
355}
356
357#if ((CO_CONFIG_SRDO)&CO_CONFIG_FLAG_CALLBACK_PRE) != 0
358void

Callers

nothing calls this directly

Calls 3

OD_not_write_same_valueFunction · 0.85
configurationValidUnsetFunction · 0.85
OD_writeOriginalFunction · 0.85

Tested by

no test coverage detected