MCPcopy Create free account
hub / github.com/ROBOTIS-GIT/turtlebot3 / read_data_set

Method read_data_set

turtlebot3_node/src/dynamixel_sdk_wrapper.cpp:53–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53void DynamixelSDKWrapper::read_data_set()
54{
55 const char * log = NULL;
56 bool ret = this->read_register(
57 device_.id,
58 read_memory_.start_addr,
59 read_memory_.length,
60 &read_data_buffer_[0],
61 &log);
62
63 if (ret == false) {
64 LOG_ERROR("DynamixelSDKWrapper", "Failed to read[%s]", log);
65 } else {
66 std::lock_guard<std::mutex> lock(read_data_mutex_);
67 std::copy(read_data_buffer_, read_data_buffer_ + READ_DATA_SIZE, read_data_);
68 LOG_DEBUG("DynamixelSDKWrapper", "Succeeded to read");
69 }
70}
71
72bool DynamixelSDKWrapper::set_data_to_device(
73 const uint16_t & addr,

Callers 2

add_sensorsMethod · 0.80
publish_timerMethod · 0.80

Calls 1

read_registerMethod · 0.95

Tested by

no test coverage detected