4 * @brief functions to manage the fields of the FRESCAN Identifier
15 * This file contains the functions needed to manage the fields of a
16 * FRESCAN identifier. That is, how the 29 CAN ID bits of each frame are
17 * allocated in the FRESCAN protocol. If this configuration was to
18 * be changed (for example, the bits per field or the position of the
19 * fields inside the ID), then only these functions need to be modified
23 * See MaRTE OS license
27 #ifndef _MARTE_FRESCAN_ID_H_
28 #define _MARTE_FRESCAN_ID_H_
30 #include <stdint.h> // uint32_t
34 * +----------------------------------------------------------------+
35 * | prio | dest | src | chan | frag_id | frag_flag |
36 * +----------------------------------------------------------------+
40 #define FRESCAN_FIELD_PRIO 0
41 #define FRESCAN_FIELD_DEST 1
42 #define FRESCAN_FIELD_SRC 2
43 #define FRESCAN_FIELD_CHAN 3
44 #define FRESCAN_FIELD_FRAG_ID 4
45 #define FRESCAN_FIELD_FRAG_FLAG 5
47 extern void frescan_id_set_field(uint32_t *id, uint32_t field, uint32_t value);
49 extern uint32_t frescan_id_get_field(uint32_t id, uint32_t field);
51 #endif // _MARTE_FRESCAN_ID_H_