6#define BAMOCAR_VDC_HIGH 0x11
7#define BAMOCAR_VDC_LOW 0x01
8#define RES_READY_TRUE 0x01
9#define RADIO_QUALITY_0 0x00
10#define RADIO_QUALITY_100 0x64
26 std::array<uint8_t, 5>
msg;
28 TEST_ASSERT_EQUAL_HEX8(0x00,
msg[1]);
29 TEST_ASSERT_EQUAL_HEX8(0x00,
msg[2]);
30 TEST_ASSERT_EQUAL_HEX8(0x00,
msg[3]);
31 TEST_ASSERT_EQUAL_HEX8(0x00,
msg[4]);
40 std::array<uint8_t, 5>
msg;
42 TEST_ASSERT_EQUAL_HEX8(0x74,
msg[1]);
43 TEST_ASSERT_EQUAL_HEX8(0x87,
msg[2]);
44 TEST_ASSERT_EQUAL_HEX8(0x01,
msg[3]);
45 TEST_ASSERT_EQUAL_HEX8(0x00,
msg[4]);
54 std::array<uint8_t, 5>
msg;
56 TEST_ASSERT_EQUAL_HEX8(0x00,
msg[1]);
57 TEST_ASSERT_EQUAL_HEX8(0x00,
msg[2]);
58 TEST_ASSERT_EQUAL_HEX8(0x00,
msg[3]);
59 TEST_ASSERT_EQUAL_HEX8(0x00,
msg[4]);
68 std::array<uint8_t, 5>
msg;
70 TEST_ASSERT_EQUAL_HEX8(0x20,
msg[1]);
71 TEST_ASSERT_EQUAL_HEX8(0x00,
msg[2]);
72 TEST_ASSERT_EQUAL_HEX8(0x00,
msg[3]);
73 TEST_ASSERT_EQUAL_HEX8(0x00,
msg[4]);
155 while (!time.check()) {
Class that contains definitions of typical messages to send via CAN It serves only as an example of t...
static void parse_message(const CAN_message_t &msg)
Parses the message received from the CAN bus.
Our own implementation of Metro class.
constexpr auto RIGHT_WHEEL_CODE
constexpr auto HYDRAULIC_LINE
constexpr unsigned long READY_TIMEOUT_MS
Communicator communicator
int _hydraulic_line_pressure
The whole model of the system: holds all the data necessary.
FailureDetection failure_detection_
void wss_message_negative_rpm(void)
Test if the message wheel rpm message is created correctly for a negative rpm value.
void test_bamocar(void)
Tests if the messages from Bamocar are correctly parsed and the Tractive System State is matching rec...
#define RADIO_QUALITY_100
void wss_message_small_rpm(void)
Test if the message wheel rpm message is created correctly for a small rpm value.
void test_c1(void)
Tests if the messages from C1 are correctly parsed for Hydraulic Brake Pressure and Right Wheel Rpm's...
void wss_message_high_rpm(void)
Test if the message wheel rpm message is created correctly for a large rpm value.
void test_res_state(void)
Tests if the messages from RES are correctly parsed for R2D and Emergency activations,...
void wss_message_zero_rpm(void)
Test if the message wheel rpm message is created correctly for a 0.0 rpm value.
void create_left_wheel_msg(std::array< uint8_t, 5 > &msg, double value)
Function to create left wheel msg.