31 #include <gtest/gtest.h> 36 TEST(rtde_control_package_pause, generate_serialized_pause_request)
39 size_t expected_size = 3;
42 EXPECT_EQ(expected_size, actual_size);
44 uint8_t expected[] = { 0x00, 0x03, 0x50 };
45 for (
unsigned int i = 0; i < actual_size; ++i)
47 EXPECT_EQ(expected[i], buffer[i]);
51 TEST(rtde_control_package_pause, parse_accepted_pause_request)
55 uint8_t pause_answer[] = { 0x01 };
60 uint8_t expected_answer = 1;
61 uint8_t actual_answer = pause_package.
accepted_;
63 EXPECT_EQ(expected_answer, actual_answer);
66 int main(
int argc,
char* argv[])
68 ::testing::InitGoogleTest(&argc, argv);
70 return RUN_ALL_TESTS();
TEST(rtde_control_package_pause, generate_serialized_pause_request)
virtual bool parseWith(comm::BinParser &bp)
Sets the attributes of the package by parsing a serialized representation of the package.
The BinParser class handles a byte buffer and functionality to iteratively parse the content...
static size_t generateSerializedRequest(uint8_t *buffer)
Generates a serialized package.
This class handles the robot's response to a requested stop in RTDE data package communication.
int main(int argc, char *argv[])