converter: Improve the continental bit calcul
[apps/agl-service-can-low-level.git] / low-can-binding / can / message / message.hpp
index 9a074e3..2c27f1f 100644 (file)
 /**
  * FLAGS
  */
-
-#define INVALID_FLAG 0x0001
-#define CAN_PROTOCOL 0x0002
-#define J1939_PROTOCOL 0x0004
-#define J1939_ADDR_CLAIM_PROTOCOL 0x0008
-#define ISOTP_PROTOCOL 0x0010
-#define ISOTP_SEND 0x0020
-#define ISOTP_RECEIVE 0x0040
-#define CAN_PROTOCOL_WITH_FD_FRAME 0x0080
-#define FRAME_LAYOUT_IS_LE 0x0100
+#define CAN_PROTOCOL              0x0001
+#define CAN_PROTOCOL_WITH_FD_FRAME 0x0002
+#define J1939_ADDR_CLAIM_PROTOCOL  0x0004
+#define J1939_PROTOCOL            0x0008
+#define ISOTP_PROTOCOL            0x0010
+#define ISOTP_SEND                0x0020
+#define ISOTP_RECEIVE             0x0040
+#define FRAME_LAYOUT_IS_BIGENDIAN  0x0080
+#define BIT_POSITION_REVERSED     0x0100
+#define CONTINENTAL_BIT_POSITION   0x0200
+#define INVALID_FLAG              0x8000
 
 /// @class message_t
 ///
@@ -84,4 +85,5 @@ public:
        uint32_t get_maxdlen();
        void set_maxdlen(uint32_t maxdlen);
        void set_length(uint32_t length);
+       void frame_swap();
 };