Main MRPT website > C++ reference for MRPT 1.9.9
Classes | Macros | Functions | Variables
rplidar_cmd.h File Reference
#include "rplidar_protocol.h"
Include dependency graph for rplidar_cmd.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _rplidar_payload_express_scan_t
 
struct  _rplidar_payload_motor_pwm_t
 
struct  _rplidar_payload_acc_board_flag_t
 
struct  _rplidar_response_acc_board_flag_t
 
struct  _rplidar_response_sample_rate_t
 
struct  _rplidar_response_measurement_node_t
 
struct  _rplidar_response_cabin_nodes_t
 
struct  _rplidar_response_capsule_measurement_nodes_t
 
struct  _rplidar_response_device_info_t
 
struct  _rplidar_response_device_health_t
 

Macros

#define RPLIDAR_CMD_STOP   0x25
 
#define RPLIDAR_CMD_SCAN   0x20
 
#define RPLIDAR_CMD_FORCE_SCAN   0x21
 
#define RPLIDAR_CMD_RESET   0x40
 
#define RPLIDAR_CMD_GET_DEVICE_INFO   0x50
 
#define RPLIDAR_CMD_GET_DEVICE_HEALTH   0x52
 
#define RPLIDAR_CMD_GET_SAMPLERATE   0x59
 
#define RPLIDAR_CMD_EXPRESS_SCAN   0x82
 
#define RPLIDAR_CMD_SET_MOTOR_PWM   0xF0
 
#define RPLIDAR_CMD_GET_ACC_BOARD_FLAG   0xFF
 
#define RPLIDAR_EXPRESS_SCAN_MODE_NORMAL   0
 
#define RPLIDAR_EXPRESS_SCAN_MODE_FIXANGLE   1
 
#define MAX_MOTOR_PWM   1023
 
#define DEFAULT_MOTOR_PWM   660
 
#define RPLIDAR_ANS_TYPE_DEVINFO   0x4
 
#define RPLIDAR_ANS_TYPE_DEVHEALTH   0x6
 
#define RPLIDAR_ANS_TYPE_MEASUREMENT   0x81
 
#define RPLIDAR_ANS_TYPE_MEASUREMENT_CAPSULED   0x82
 
#define RPLIDAR_ANS_TYPE_SAMPLE_RATE   0x15
 
#define RPLIDAR_ANS_TYPE_ACC_BOARD_FLAG   0xFF
 
#define RPLIDAR_RESP_ACC_BOARD_FLAG_MOTOR_CTRL_SUPPORT_MASK   (0x1)
 
#define RPLIDAR_STATUS_OK   0x0
 
#define RPLIDAR_STATUS_WARNING   0x1
 
#define RPLIDAR_STATUS_ERROR   0x2
 
#define RPLIDAR_RESP_MEASUREMENT_SYNCBIT   (0x1 << 0)
 
#define RPLIDAR_RESP_MEASUREMENT_QUALITY_SHIFT   2
 
#define RPLIDAR_RESP_MEASUREMENT_CHECKBIT   (0x1 << 0)
 
#define RPLIDAR_RESP_MEASUREMENT_ANGLE_SHIFT   1
 
#define RPLIDAR_RESP_MEASUREMENT_EXP_ANGLE_MASK   (0x3)
 
#define RPLIDAR_RESP_MEASUREMENT_EXP_DISTANCE_MASK   (0xFC)
 
#define RPLIDAR_RESP_MEASUREMENT_EXP_SYNC_1   0xA
 
#define RPLIDAR_RESP_MEASUREMENT_EXP_SYNC_2   0x5
 
#define RPLIDAR_RESP_MEASUREMENT_EXP_SYNCBIT   (0x1 << 15)
 

Functions

struct _rplidar_payload_express_scan_t __attribute__ ((packed)) rplidar_payload_express_scan_t
 

Variables

_u8 working_mode
 
_u32 reserved
 
_u16 pwm_value
 
_u32 support_flag
 
_u16 std_sample_duration_us
 
_u16 express_sample_duration_us
 
_u8 sync_quality
 
_u16 angle_q6_checkbit
 
_u16 distance_q2
 
_u16 distance_angle_1
 
_u16 distance_angle_2
 
_u8 offset_angles_q3
 
_u8 s_checksum_1
 
_u8 s_checksum_2
 
_u16 start_angle_sync_q6
 
rplidar_response_cabin_nodes_t cabins [16]
 
_u8 model
 
_u16 firmware_version
 
_u8 hardware_version
 
_u8 serialnum [16]
 
_u8 status
 
_u16 error_code
 

Macro Definition Documentation

◆ DEFAULT_MOTOR_PWM

#define DEFAULT_MOTOR_PWM   660

Definition at line 75 of file rplidar_cmd.h.

◆ MAX_MOTOR_PWM

#define MAX_MOTOR_PWM   1023

Definition at line 74 of file rplidar_cmd.h.

◆ RPLIDAR_ANS_TYPE_ACC_BOARD_FLAG

#define RPLIDAR_ANS_TYPE_ACC_BOARD_FLAG   0xFF

Definition at line 98 of file rplidar_cmd.h.

◆ RPLIDAR_ANS_TYPE_DEVHEALTH

#define RPLIDAR_ANS_TYPE_DEVHEALTH   0x6

Definition at line 89 of file rplidar_cmd.h.

◆ RPLIDAR_ANS_TYPE_DEVINFO

#define RPLIDAR_ANS_TYPE_DEVINFO   0x4

Definition at line 88 of file rplidar_cmd.h.

◆ RPLIDAR_ANS_TYPE_MEASUREMENT

#define RPLIDAR_ANS_TYPE_MEASUREMENT   0x81

Definition at line 91 of file rplidar_cmd.h.

◆ RPLIDAR_ANS_TYPE_MEASUREMENT_CAPSULED

#define RPLIDAR_ANS_TYPE_MEASUREMENT_CAPSULED   0x82

Definition at line 93 of file rplidar_cmd.h.

◆ RPLIDAR_ANS_TYPE_SAMPLE_RATE

#define RPLIDAR_ANS_TYPE_SAMPLE_RATE   0x15

Definition at line 96 of file rplidar_cmd.h.

◆ RPLIDAR_CMD_EXPRESS_SCAN

#define RPLIDAR_CMD_EXPRESS_SCAN   0x82

Definition at line 54 of file rplidar_cmd.h.

◆ RPLIDAR_CMD_FORCE_SCAN

#define RPLIDAR_CMD_FORCE_SCAN   0x21

Definition at line 44 of file rplidar_cmd.h.

◆ RPLIDAR_CMD_GET_ACC_BOARD_FLAG

#define RPLIDAR_CMD_GET_ACC_BOARD_FLAG   0xFF

Definition at line 58 of file rplidar_cmd.h.

◆ RPLIDAR_CMD_GET_DEVICE_HEALTH

#define RPLIDAR_CMD_GET_DEVICE_HEALTH   0x52

Definition at line 49 of file rplidar_cmd.h.

◆ RPLIDAR_CMD_GET_DEVICE_INFO

#define RPLIDAR_CMD_GET_DEVICE_INFO   0x50

Definition at line 48 of file rplidar_cmd.h.

◆ RPLIDAR_CMD_GET_SAMPLERATE

#define RPLIDAR_CMD_GET_SAMPLERATE   0x59

Definition at line 51 of file rplidar_cmd.h.

◆ RPLIDAR_CMD_RESET

#define RPLIDAR_CMD_RESET   0x40

Definition at line 45 of file rplidar_cmd.h.

◆ RPLIDAR_CMD_SCAN

#define RPLIDAR_CMD_SCAN   0x20

Definition at line 43 of file rplidar_cmd.h.

◆ RPLIDAR_CMD_SET_MOTOR_PWM

#define RPLIDAR_CMD_SET_MOTOR_PWM   0xF0

Definition at line 57 of file rplidar_cmd.h.

◆ RPLIDAR_CMD_STOP

#define RPLIDAR_CMD_STOP   0x25

Definition at line 42 of file rplidar_cmd.h.

◆ RPLIDAR_EXPRESS_SCAN_MODE_FIXANGLE

#define RPLIDAR_EXPRESS_SCAN_MODE_FIXANGLE   1

Definition at line 67 of file rplidar_cmd.h.

◆ RPLIDAR_EXPRESS_SCAN_MODE_NORMAL

#define RPLIDAR_EXPRESS_SCAN_MODE_NORMAL   0

Definition at line 66 of file rplidar_cmd.h.

◆ RPLIDAR_RESP_ACC_BOARD_FLAG_MOTOR_CTRL_SUPPORT_MASK

#define RPLIDAR_RESP_ACC_BOARD_FLAG_MOTOR_CTRL_SUPPORT_MASK   (0x1)

Definition at line 100 of file rplidar_cmd.h.

◆ RPLIDAR_RESP_MEASUREMENT_ANGLE_SHIFT

#define RPLIDAR_RESP_MEASUREMENT_ANGLE_SHIFT   1

Definition at line 113 of file rplidar_cmd.h.

◆ RPLIDAR_RESP_MEASUREMENT_CHECKBIT

#define RPLIDAR_RESP_MEASUREMENT_CHECKBIT   (0x1 << 0)

Definition at line 112 of file rplidar_cmd.h.

◆ RPLIDAR_RESP_MEASUREMENT_EXP_ANGLE_MASK

#define RPLIDAR_RESP_MEASUREMENT_EXP_ANGLE_MASK   (0x3)

Definition at line 129 of file rplidar_cmd.h.

◆ RPLIDAR_RESP_MEASUREMENT_EXP_DISTANCE_MASK

#define RPLIDAR_RESP_MEASUREMENT_EXP_DISTANCE_MASK   (0xFC)

Definition at line 130 of file rplidar_cmd.h.

◆ RPLIDAR_RESP_MEASUREMENT_EXP_SYNC_1

#define RPLIDAR_RESP_MEASUREMENT_EXP_SYNC_1   0xA

Definition at line 139 of file rplidar_cmd.h.

◆ RPLIDAR_RESP_MEASUREMENT_EXP_SYNC_2

#define RPLIDAR_RESP_MEASUREMENT_EXP_SYNC_2   0x5

Definition at line 140 of file rplidar_cmd.h.

◆ RPLIDAR_RESP_MEASUREMENT_EXP_SYNCBIT

#define RPLIDAR_RESP_MEASUREMENT_EXP_SYNCBIT   (0x1 << 15)

Definition at line 142 of file rplidar_cmd.h.

◆ RPLIDAR_RESP_MEASUREMENT_QUALITY_SHIFT

#define RPLIDAR_RESP_MEASUREMENT_QUALITY_SHIFT   2

Definition at line 111 of file rplidar_cmd.h.

◆ RPLIDAR_RESP_MEASUREMENT_SYNCBIT

#define RPLIDAR_RESP_MEASUREMENT_SYNCBIT   (0x1 << 0)

Definition at line 110 of file rplidar_cmd.h.

◆ RPLIDAR_STATUS_ERROR

#define RPLIDAR_STATUS_ERROR   0x2

Definition at line 108 of file rplidar_cmd.h.

◆ RPLIDAR_STATUS_OK

#define RPLIDAR_STATUS_OK   0x0

Definition at line 106 of file rplidar_cmd.h.

◆ RPLIDAR_STATUS_WARNING

#define RPLIDAR_STATUS_WARNING   0x1

Definition at line 107 of file rplidar_cmd.h.

Function Documentation

◆ __attribute__()

struct _rplidar_ans_header_t __attribute__ ( (packed )

Variable Documentation

◆ angle_q6_checkbit

_u16 angle_q6_checkbit

◆ cabins

rplidar_response_cabin_nodes_t cabins[16]

Definition at line 5 of file rplidar_cmd.h.

◆ distance_angle_1

_u16 distance_angle_1

Definition at line 2 of file rplidar_cmd.h.

◆ distance_angle_2

_u16 distance_angle_2

Definition at line 3 of file rplidar_cmd.h.

◆ distance_q2

_u16 distance_q2

◆ error_code

_u16 error_code

Definition at line 3 of file rplidar_cmd.h.

◆ express_sample_duration_us

_u16 express_sample_duration_us

Definition at line 3 of file rplidar_cmd.h.

◆ firmware_version

_u16 firmware_version

Definition at line 3 of file rplidar_cmd.h.

◆ hardware_version

_u8 hardware_version

Definition at line 4 of file rplidar_cmd.h.

◆ model

_u8 model

◆ offset_angles_q3

_u8 offset_angles_q3

Definition at line 4 of file rplidar_cmd.h.

◆ pwm_value

_u16 pwm_value

Definition at line 2 of file rplidar_cmd.h.

◆ reserved

_u32 reserved

Definition at line 3 of file rplidar_cmd.h.

◆ s_checksum_1

_u8 s_checksum_1

Definition at line 2 of file rplidar_cmd.h.

◆ s_checksum_2

_u8 s_checksum_2

Definition at line 3 of file rplidar_cmd.h.

◆ serialnum

_u8 serialnum[16]

Definition at line 5 of file rplidar_cmd.h.

◆ start_angle_sync_q6

_u16 start_angle_sync_q6

◆ status

_u8 status

◆ std_sample_duration_us

_u16 std_sample_duration_us

Definition at line 2 of file rplidar_cmd.h.

◆ support_flag

_u32 support_flag

Definition at line 2 of file rplidar_cmd.h.

◆ sync_quality

_u8 sync_quality

◆ working_mode

_u8 working_mode

Definition at line 2 of file rplidar_cmd.h.




Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST