Interface definition for Dynamixel packet reader.
More...
Interface definition for Dynamixel packet reader.
- Author
- Loïc Dauphin loic..nosp@m.daup.nosp@m.hin@i.nosp@m.nria.nosp@m..fr
Definition in file dynamixel_reader.h.
#include <stdlib.h>
#include <stdbool.h>
#include "dynamixel_protocol.h"
Go to the source code of this file.
◆ dynamixel_reader_get_crc()
Get the packet's crc.
- Parameters
-
[in] | reader | the packet reader |
- Returns
- the packet's length field
Definition at line 114 of file dynamixel_reader.h.
◆ dynamixel_reader_get_id()
Get the packet's device id.
- Parameters
-
[in] | reader | the packet reader |
- Returns
- the packet's device id
Definition at line 76 of file dynamixel_reader.h.
◆ dynamixel_reader_get_instr()
Get the packet's instruction code.
- Parameters
-
[in] | reader | the packet reader |
- Returns
- the packet's instruction code
Definition at line 88 of file dynamixel_reader.h.
◆ dynamixel_reader_get_length()
Get the packet's length field.
- Parameters
-
[in] | reader | the packet reader |
- Returns
- the packet's length field
Definition at line 100 of file dynamixel_reader.h.
◆ dynamixel_reader_init()
static void dynamixel_reader_init |
( |
dynamixel_reader_t * |
reader, |
|
|
const uint8_t * |
buffer, |
|
|
size_t |
size |
|
) |
| |
|
inlinestatic |
Initialize the Dynamixel packet reader.
- Parameters
-
[out] | reader | the packet reader |
[in] | buffer | the buffer used to store data |
[in] | size | the size of the buffer |
Definition at line 52 of file dynamixel_reader.h.
◆ dynamixel_reader_is_valid()
Check if the packet is valid.
- Parameters
-
[in] | reader | the packet reader |
- Returns
- true if the packet is valid
-
false otherwise
◆ dynamixel_reader_status_get_payload()
static const uint8_t* dynamixel_reader_status_get_payload |
( |
const dynamixel_reader_t * |
reader | ) |
|
|
inlinestatic |
Get the packet's payload (response)
- Parameters
-
[in] | reader | the packet reader |
- Returns
- the address of the beginning of the payload
Definition at line 128 of file dynamixel_reader.h.
◆ dynamixel_reader_status_get_payload_size()
static size_t dynamixel_reader_status_get_payload_size |
( |
const dynamixel_reader_t * |
reader | ) |
|
|
inlinestatic |
Get the packet's payload size (response)
- Parameters
-
[in] | reader | the packet reader |
- Returns
- the size of the payload
Definition at line 140 of file dynamixel_reader.h.