feat:support Tele

This commit is contained in:
Livox-SDK
2020-06-17 15:48:14 +08:00
parent cee246cab0
commit 61e24a74bb
1874 changed files with 299 additions and 228947 deletions
+57 -1
View File
@@ -130,7 +130,7 @@ typedef enum {
#define LIVOX_SDK_MAJOR_VERSION 2
#define LIVOX_SDK_MINOR_VERSION 1
#define LIVOX_SDK_PATCH_VERSION 0
#define LIVOX_SDK_PATCH_VERSION 1
#define kBroadcastCodeSize 16
@@ -473,6 +473,62 @@ typedef struct {
StatusUnion error_union; /**< LiDAR work state. */
} HeartbeatResponse;
/**
* The error code of Getting/Setting Device's Parameters.
*/
typedef enum {
kKeyNoError = 0, /**< No Error. */
kKeyNotSupported = 1, /**< The key is not supported. */
kKeyExecFailed = 2, /**< Execution failed. */
kKeyNotSupportedWritingState = 3, /**< The key cannot be written. */
kKeyValueError = 4, /**< Wrong value. */
kKeyValueLengthError = 5, /**< Wrong value length. */
kKeyNoEnoughMemory = 6, /**< Reading parameter length limit. */
kKeyLengthError = 7, /**< The number of parameters does not match. */
} KeyErrorCode;
/**
* The response body of setting device's parameter.
*/
typedef struct {
uint8_t ret_code; /**< Return code. */
uint16_t error_param_key; /**< Error Key. */
uint8_t error_code; /**< Error code, refer to \ref KeyErrorCode. */
} DeviceParameterResponse;
/**
* Keys of device's parameters.
*/
typedef enum {
kKeyDefault = 0, /**< Default key name. */
kKeyHighSensetivity = 1, /**< Key to get/set LiDAR' Sensetivity. */
} DeviceParamKeyName;
/**
* Key and value of device's parameters.
*/
typedef struct {
uint16_t key; /*< Key, refer to \ref DeviceParamKeyName. */
uint16_t length; /*< Length of value */
uint8_t value[1]; /*< Value */
} KeyValueParam;
/**
* The response body of getting device's parameter.
*/
typedef struct {
DeviceParameterResponse rsp; /*< Return code. */
KeyValueParam kv; /*< Key and value of device's parameters. */
} GetDeviceParameterResponse;
/**
* The request body for the command of getting device's parameters.
*/
typedef struct {
uint8_t param_num; /*< Number of key. */
uint16_t key[1]; /*< Key, refer to \ref DeviceParamKeyName. */
} GetDeviceParameterRequest;
/**
* The request body for the command of setting Livox LiDAR's parameters.
*/
+53
View File
@@ -317,6 +317,59 @@ livox_status GetDeviceIpInformation(uint8_t handle, GetDeviceIpInformationCallba
*/
livox_status RebootDevice(uint8_t handle, uint16_t timeout, CommonCommandCallback cb, void * client_data);
/**
* @c SetDeviceParameters' response callback function.
* @param status kStatusSuccess on successful return, kStatusTimeout on timeout, see \ref LivoxStatus for other
* error code.
* @param handle device handle.
* @param response response from the device.
* @param client_data user data associated with the command.
*/
typedef void (*SetDeviceParametersCallback)(livox_status status,
uint8_t handle,
DeviceParameterResponse *response,
void *client_data);
/**
* LiDAR Enable HighSensitivity.
* @param handle device handle.
* @param cb callback for the command.
* @param client_data user data associated with the command.
* @return kStatusSuccess on successful return, see \ref LivoxStatus for other error code.
*/
livox_status LidarEnableHighSensitivity(uint8_t handle, SetDeviceParametersCallback cb, void *client_data);
/**
* LiDAR Disable HighSensitivity.
* @param handle device handle.
* @param cb callback for the command.
* @param client_data user data associated with the command.
* @return kStatusSuccess on successful return, see \ref LivoxStatus for other error code.
*/
livox_status LidarDisableHighSensitivity(uint8_t handle, SetDeviceParametersCallback cb, void *client_data);
/**
* @c GetDeviceParameters' response callback function.
* @param status kStatusSuccess on successful return, kStatusTimeout on timeout, see \ref LivoxStatus for other
* error code.
* @param handle device handle.
* @param response response from the device.
* @param client_data user data associated with the command.
*/
typedef void (*GetDeviceParametersCallback)(livox_status status,
uint8_t handle,
GetDeviceParameterResponse *response,
void *client_data);
/**
* LiDAR Get HighSensitivity State.
* @param handle device handle.
* @param cb callback for the command.
* @param client_data user data associated with the command.
* @return kStatusSuccess on successful return, see \ref LivoxStatus for other error code.
*/
livox_status LidarGetHighSensitivityState(uint8_t handle, GetDeviceParametersCallback cb, void *client_data);
/**
* @c HubQueryLidarInformation response callback function.
* @param status kStatusSuccess on successful return, kStatusTimeout on timeout, see \ref LivoxStatus for other