@@ -39,33 +39,38 @@ using GroupSyncWrite = dynamixel::GroupSyncWrite;
39
39
class Communicator {
40
40
public:
41
41
explicit Communicator (const std::string device_name);
42
- ~Communicator ();
43
- bool is_connected ();
44
- bool connect (const int baudrate = 3000000 );
45
- void disconnect ();
46
- void make_sync_read_group (const group_name_t & group_name, const dxl_address_t & start_address,
47
- const dxl_data_length_t & data_length);
48
- void make_sync_write_group (const group_name_t & group_name, const dxl_address_t & start_address,
49
- const dxl_data_length_t & data_length);
50
- bool append_id_to_sync_read_group (const group_name_t & group_name, const dxl_id_t & id);
51
- bool append_id_to_sync_write_group (const group_name_t & group_name, const dxl_id_t & id,
42
+ virtual ~Communicator ();
43
+ virtual bool is_connected ();
44
+ virtual bool connect (const int baudrate = 3000000 );
45
+ virtual void disconnect ();
46
+ virtual void make_sync_read_group (
47
+ const group_name_t & group_name, const dxl_address_t & start_address,
48
+ const dxl_data_length_t & data_length);
49
+ virtual void make_sync_write_group (
50
+ const group_name_t & group_name, const dxl_address_t & start_address,
51
+ const dxl_data_length_t & data_length);
52
+ virtual bool append_id_to_sync_read_group (const group_name_t & group_name, const dxl_id_t & id);
53
+ virtual bool append_id_to_sync_write_group (const group_name_t & group_name, const dxl_id_t & id,
52
54
std::vector<dxl_byte_t > & init_data);
53
- bool send_sync_read_packet (const group_name_t & group_name);
54
- bool send_sync_write_packet (const group_name_t & group_name);
55
- bool get_sync_read_data (const group_name_t & group_name, const dxl_id_t id,
55
+ virtual bool send_sync_read_packet (const group_name_t & group_name);
56
+ virtual bool send_sync_write_packet (const group_name_t & group_name);
57
+ virtual bool get_sync_read_data (const group_name_t & group_name, const dxl_id_t id,
56
58
const dxl_address_t & address, const dxl_data_length_t & length,
57
59
dxl_double_word_t & read_data);
58
- bool set_sync_write_data (const group_name_t & group_name, const dxl_id_t id,
60
+ virtual bool set_sync_write_data (const group_name_t & group_name, const dxl_id_t id,
59
61
std::vector<dxl_byte_t > & write_data);
60
- bool write_byte_data (const dxl_id_t & id, const dxl_address_t & address,
62
+ virtual bool write_byte_data (const dxl_id_t & id, const dxl_address_t & address,
61
63
const dxl_byte_t & write_data);
62
- bool write_word_data (const dxl_id_t & id, const dxl_address_t & address,
64
+ virtual bool write_word_data (const dxl_id_t & id, const dxl_address_t & address,
63
65
const dxl_word_t & write_data);
64
- bool write_double_word_data (const dxl_id_t & id, const dxl_address_t & address,
65
- const dxl_double_word_t & write_data);
66
- bool read_byte_data (const dxl_id_t & id, const dxl_address_t & address, dxl_byte_t & read_data);
67
- bool read_word_data (const dxl_id_t & id, const dxl_address_t & address, dxl_word_t & read_data);
68
- bool read_double_word_data (const dxl_id_t & id, const dxl_address_t & address,
66
+ virtual bool write_double_word_data (
67
+ const dxl_id_t & id, const dxl_address_t & address,
68
+ const dxl_double_word_t & write_data);
69
+ virtual bool read_byte_data (
70
+ const dxl_id_t & id, const dxl_address_t & address, dxl_byte_t & read_data);
71
+ virtual bool read_word_data (
72
+ const dxl_id_t & id, const dxl_address_t & address, dxl_word_t & read_data);
73
+ virtual bool read_double_word_data (const dxl_id_t & id, const dxl_address_t & address,
69
74
dxl_double_word_t & read_data);
70
75
71
76
private:
0 commit comments