1148 lines
26 KiB
C
1148 lines
26 KiB
C
/**
|
|
* The MIT License (MIT)
|
|
*
|
|
* Copyright (c) 2018-2019 Erik Moqvist
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person
|
|
* obtaining a copy of this software and associated documentation
|
|
* files (the "Software"), to deal in the Software without
|
|
* restriction, including without limitation the rights to use, copy,
|
|
* modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
* of the Software, and to permit persons to whom the Software is
|
|
* furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be
|
|
* included in all copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
|
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
* SOFTWARE.
|
|
*/
|
|
|
|
/**
|
|
* This file was generated by cantools version 0.1.dev1740+ge714fab Tue Jun 11 14:48:42 2024.
|
|
*/
|
|
|
|
#ifndef CAN1_H
|
|
#define CAN1_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
|
|
#ifndef EINVAL
|
|
# define EINVAL 22
|
|
#endif
|
|
|
|
/* Frame ids. */
|
|
#define CAN1_VN200_GNSS_LL_FRAME_ID (0x05u)
|
|
#define CAN1_VN200_INS_YPR_FRAME_ID (0x06u)
|
|
#define CAN1_VN200_IMU_ACC_LIN_FRAME_ID (0x02u)
|
|
#define CAN1_VN200_IMU_ACC_ANG_FRAME_ID (0x01u)
|
|
#define CAN1_VN200_INS_LL_FRAME_ID (0x11u)
|
|
#define CAN1_VN200_INS_VEL_FRAME_ID (0x32u)
|
|
|
|
/* Frame lengths in bytes. */
|
|
#define CAN1_VN200_GNSS_LL_LENGTH (8u)
|
|
#define CAN1_VN200_INS_YPR_LENGTH (8u)
|
|
#define CAN1_VN200_IMU_ACC_LIN_LENGTH (8u)
|
|
#define CAN1_VN200_IMU_ACC_ANG_LENGTH (8u)
|
|
#define CAN1_VN200_INS_LL_LENGTH (8u)
|
|
#define CAN1_VN200_INS_VEL_LENGTH (8u)
|
|
|
|
/* Extended or standard frame types. */
|
|
#define CAN1_VN200_GNSS_LL_IS_EXTENDED (0)
|
|
#define CAN1_VN200_INS_YPR_IS_EXTENDED (0)
|
|
#define CAN1_VN200_IMU_ACC_LIN_IS_EXTENDED (0)
|
|
#define CAN1_VN200_IMU_ACC_ANG_IS_EXTENDED (0)
|
|
#define CAN1_VN200_INS_LL_IS_EXTENDED (0)
|
|
#define CAN1_VN200_INS_VEL_IS_EXTENDED (0)
|
|
|
|
/* Frame cycle times in milliseconds. */
|
|
|
|
|
|
/* Signal choices. */
|
|
|
|
|
|
/* Frame Names. */
|
|
#define CAN1_VN200_GNSS_LL_NAME "VN200_GNSS_LL"
|
|
#define CAN1_VN200_INS_YPR_NAME "VN200_INS_YPR"
|
|
#define CAN1_VN200_IMU_ACC_LIN_NAME "VN200_IMU_ACC_LIN"
|
|
#define CAN1_VN200_IMU_ACC_ANG_NAME "VN200_IMU_ACC_ANG"
|
|
#define CAN1_VN200_INS_LL_NAME "VN200_INS_LL"
|
|
#define CAN1_VN200_INS_VEL_NAME "VN200_INS_VEL"
|
|
|
|
/* Signal Names. */
|
|
#define CAN1_VN200_GNSS_LL_LATITUDE_NAME "Latitude"
|
|
#define CAN1_VN200_GNSS_LL_LONGITUDE_NAME "Longitude"
|
|
#define CAN1_VN200_GNSS_LL_UNCERTAINTY_N_NAME "UncertaintyN"
|
|
#define CAN1_VN200_GNSS_LL_UNCERTAINTY_E_NAME "UncertaintyE"
|
|
#define CAN1_VN200_INS_YPR_YAW_NAME "Yaw"
|
|
#define CAN1_VN200_INS_YPR_PITCH_NAME "Pitch"
|
|
#define CAN1_VN200_INS_YPR_ROLL_NAME "Roll"
|
|
#define CAN1_VN200_INS_YPR_UNCERTAINTY_NAME "Uncertainty"
|
|
#define CAN1_VN200_IMU_ACC_LIN_ACC_LIN_X_NAME "AccLinX"
|
|
#define CAN1_VN200_IMU_ACC_LIN_ACC_LIN_Y_NAME "AccLinY"
|
|
#define CAN1_VN200_IMU_ACC_LIN_ACC_LIN_Z_NAME "AccLinZ"
|
|
#define CAN1_VN200_IMU_ACC_ANG_ACC_ANG_X_NAME "AccAngX"
|
|
#define CAN1_VN200_IMU_ACC_ANG_ACC_ANG_Y_NAME "AccAngY"
|
|
#define CAN1_VN200_IMU_ACC_ANG_ACC_ANG_Z_NAME "AccAngZ"
|
|
#define CAN1_VN200_INS_LL_LATITUDE_NAME "Latitude"
|
|
#define CAN1_VN200_INS_LL_LONGITUDE_NAME "Longitude"
|
|
#define CAN1_VN200_INS_LL_UNCERTAINTY_N_NAME "UncertaintyN"
|
|
#define CAN1_VN200_INS_LL_UNCERTAINTY_E_NAME "UncertaintyE"
|
|
#define CAN1_VN200_INS_VEL_VEL_LIN_X_NAME "VelLinX"
|
|
#define CAN1_VN200_INS_VEL_VEL_LIN_Y_NAME "VelLinY"
|
|
#define CAN1_VN200_INS_VEL_VEL_LIN_Z_NAME "VelLinZ"
|
|
#define CAN1_VN200_INS_VEL_UNCERTAINTY_NAME "Uncertainty"
|
|
|
|
/**
|
|
* Signals in message VN200_GNSS_LL.
|
|
*
|
|
* Raw
|
|
*
|
|
* All signal values are as on the CAN bus.
|
|
*/
|
|
struct can1_vn200_gnss_ll_t {
|
|
/**
|
|
* Latitude
|
|
*
|
|
* Range: -18000..18000 (-90..90 deg)
|
|
* Scale: 0.005
|
|
* Offset: 0
|
|
*/
|
|
int16_t latitude;
|
|
|
|
/**
|
|
* Range: -3600..3600 (-180..180 deg)
|
|
* Scale: 0.05
|
|
* Offset: 0
|
|
*/
|
|
int16_t longitude;
|
|
|
|
/**
|
|
* Range: 0..65000 (0..65 m)
|
|
* Scale: 0.001
|
|
* Offset: 0
|
|
*/
|
|
uint16_t uncertainty_n;
|
|
|
|
/**
|
|
* Range: 0..65000 (0..65 m)
|
|
* Scale: 0.001
|
|
* Offset: 0
|
|
*/
|
|
uint16_t uncertainty_e;
|
|
};
|
|
|
|
/**
|
|
* Signals in message VN200_INS_YPR.
|
|
*
|
|
* Yaw Pitch Roll
|
|
*
|
|
* All signal values are as on the CAN bus.
|
|
*/
|
|
struct can1_vn200_ins_ypr_t {
|
|
/**
|
|
* Yaw
|
|
*
|
|
* Range: -180000..180000 (-180..180 deg)
|
|
* Scale: 0.001
|
|
* Offset: 0
|
|
*/
|
|
int16_t yaw;
|
|
|
|
/**
|
|
* Range: -180000..180000 (-180..180 deg)
|
|
* Scale: 0.001
|
|
* Offset: 0
|
|
*/
|
|
int16_t pitch;
|
|
|
|
/**
|
|
* Range: -180000..180000 (-180..180 deg)
|
|
* Scale: 0.001
|
|
* Offset: 0
|
|
*/
|
|
int16_t roll;
|
|
|
|
/**
|
|
* Range: 0..65000 (0..6.5 deg)
|
|
* Scale: 0.0001
|
|
* Offset: 0
|
|
*/
|
|
uint16_t uncertainty;
|
|
};
|
|
|
|
/**
|
|
* Signals in message VN200_IMU_ACC_LIN.
|
|
*
|
|
* Linear Acceleration
|
|
*
|
|
* All signal values are as on the CAN bus.
|
|
*/
|
|
struct can1_vn200_imu_acc_lin_t {
|
|
/**
|
|
* Range: -540000..540000 (-54..54 m/s²)
|
|
* Scale: 0.0001
|
|
* Offset: 0
|
|
*/
|
|
int32_t acc_lin_x;
|
|
|
|
/**
|
|
* Range: -540000..540000 (-54..54 m/s²)
|
|
* Scale: 0.0001
|
|
* Offset: 0
|
|
*/
|
|
int32_t acc_lin_y;
|
|
|
|
/**
|
|
* Range: -540000..540000 (-54..54 m/s²)
|
|
* Scale: 0.0001
|
|
* Offset: 0
|
|
*/
|
|
int32_t acc_lin_z;
|
|
};
|
|
|
|
/**
|
|
* Signals in message VN200_IMU_ACC_ANG.
|
|
*
|
|
* Angular Acceleration
|
|
*
|
|
* All signal values are as on the CAN bus.
|
|
*/
|
|
struct can1_vn200_imu_acc_ang_t {
|
|
/**
|
|
* Range: -540000..540000 (-54..54 rad/s²)
|
|
* Scale: 0.0001
|
|
* Offset: 0
|
|
*/
|
|
int32_t acc_ang_x;
|
|
|
|
/**
|
|
* Range: -540000..540000 (-54..54 rad/s²)
|
|
* Scale: 0.0001
|
|
* Offset: 0
|
|
*/
|
|
int32_t acc_ang_y;
|
|
|
|
/**
|
|
* Range: -540000..540000 (-54..54 rad/s²)
|
|
* Scale: 0.0001
|
|
* Offset: 0
|
|
*/
|
|
int32_t acc_ang_z;
|
|
};
|
|
|
|
/**
|
|
* Signals in message VN200_INS_LL.
|
|
*
|
|
* INS solution LLA
|
|
*
|
|
* All signal values are as on the CAN bus.
|
|
*/
|
|
struct can1_vn200_ins_ll_t {
|
|
/**
|
|
* Range: -180000..180000 (-180..180 deg)
|
|
* Scale: 0.001
|
|
* Offset: 0
|
|
*/
|
|
int16_t latitude;
|
|
|
|
/**
|
|
* Range: -90000..90000 (-90..90 deg)
|
|
* Scale: 0.001
|
|
* Offset: 0
|
|
*/
|
|
int16_t longitude;
|
|
|
|
/**
|
|
* Range: 0..65000 (0..6.5 m)
|
|
* Scale: 0.0001
|
|
* Offset: 0
|
|
*/
|
|
uint16_t uncertainty_n;
|
|
|
|
/**
|
|
* Range: 0..65000 (0..6.5 m)
|
|
* Scale: 0.0001
|
|
* Offset: 0
|
|
*/
|
|
uint16_t uncertainty_e;
|
|
};
|
|
|
|
/**
|
|
* Signals in message VN200_INS_VEL.
|
|
*
|
|
* Velocity
|
|
*
|
|
* All signal values are as on the CAN bus.
|
|
*/
|
|
struct can1_vn200_ins_vel_t {
|
|
/**
|
|
* North
|
|
*
|
|
* Range: 0..65000 (0..65 m/s)
|
|
* Scale: 0.001
|
|
* Offset: 0
|
|
*/
|
|
uint16_t vel_lin_x;
|
|
|
|
/**
|
|
* East
|
|
*
|
|
* Range: 0..65000 (0..65 m/s)
|
|
* Scale: 0.001
|
|
* Offset: 0
|
|
*/
|
|
uint16_t vel_lin_y;
|
|
|
|
/**
|
|
* Down
|
|
*
|
|
* Range: 0..65000 (0..65 m/s)
|
|
* Scale: 0.001
|
|
* Offset: 0
|
|
*/
|
|
uint16_t vel_lin_z;
|
|
|
|
/**
|
|
* Range: 0..65000 (0..6.5 m/s)
|
|
* Scale: 0.0001
|
|
* Offset: 0
|
|
*/
|
|
uint16_t uncertainty;
|
|
};
|
|
|
|
/**
|
|
* Pack message VN200_GNSS_LL.
|
|
*
|
|
* @param[out] dst_p Buffer to pack the message into.
|
|
* @param[in] src_p Data to pack.
|
|
* @param[in] size Size of dst_p.
|
|
*
|
|
* @return Size of packed data, or negative error code.
|
|
*/
|
|
int can1_vn200_gnss_ll_pack(
|
|
uint8_t *dst_p,
|
|
const struct can1_vn200_gnss_ll_t *src_p,
|
|
size_t size);
|
|
|
|
/**
|
|
* Unpack message VN200_GNSS_LL.
|
|
*
|
|
* @param[out] dst_p Object to unpack the message into.
|
|
* @param[in] src_p Message to unpack.
|
|
* @param[in] size Size of src_p.
|
|
*
|
|
* @return zero(0) or negative error code.
|
|
*/
|
|
int can1_vn200_gnss_ll_unpack(
|
|
struct can1_vn200_gnss_ll_t *dst_p,
|
|
const uint8_t *src_p,
|
|
size_t size);
|
|
|
|
/**
|
|
* Init message fields to default values from VN200_GNSS_LL.
|
|
*
|
|
* @param[in] msg_p Message to init.
|
|
*
|
|
* @return zero(0) on success or (-1) in case of nullptr argument.
|
|
*/
|
|
int can1_vn200_gnss_ll_init(struct can1_vn200_gnss_ll_t *msg_p);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
int16_t can1_vn200_gnss_ll_latitude_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_gnss_ll_latitude_decode(int16_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_gnss_ll_latitude_is_in_range(int16_t value);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
int16_t can1_vn200_gnss_ll_longitude_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_gnss_ll_longitude_decode(int16_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_gnss_ll_longitude_is_in_range(int16_t value);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
uint16_t can1_vn200_gnss_ll_uncertainty_n_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_gnss_ll_uncertainty_n_decode(uint16_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_gnss_ll_uncertainty_n_is_in_range(uint16_t value);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
uint16_t can1_vn200_gnss_ll_uncertainty_e_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_gnss_ll_uncertainty_e_decode(uint16_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_gnss_ll_uncertainty_e_is_in_range(uint16_t value);
|
|
|
|
/**
|
|
* Pack message VN200_INS_YPR.
|
|
*
|
|
* @param[out] dst_p Buffer to pack the message into.
|
|
* @param[in] src_p Data to pack.
|
|
* @param[in] size Size of dst_p.
|
|
*
|
|
* @return Size of packed data, or negative error code.
|
|
*/
|
|
int can1_vn200_ins_ypr_pack(
|
|
uint8_t *dst_p,
|
|
const struct can1_vn200_ins_ypr_t *src_p,
|
|
size_t size);
|
|
|
|
/**
|
|
* Unpack message VN200_INS_YPR.
|
|
*
|
|
* @param[out] dst_p Object to unpack the message into.
|
|
* @param[in] src_p Message to unpack.
|
|
* @param[in] size Size of src_p.
|
|
*
|
|
* @return zero(0) or negative error code.
|
|
*/
|
|
int can1_vn200_ins_ypr_unpack(
|
|
struct can1_vn200_ins_ypr_t *dst_p,
|
|
const uint8_t *src_p,
|
|
size_t size);
|
|
|
|
/**
|
|
* Init message fields to default values from VN200_INS_YPR.
|
|
*
|
|
* @param[in] msg_p Message to init.
|
|
*
|
|
* @return zero(0) on success or (-1) in case of nullptr argument.
|
|
*/
|
|
int can1_vn200_ins_ypr_init(struct can1_vn200_ins_ypr_t *msg_p);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
int16_t can1_vn200_ins_ypr_yaw_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_ins_ypr_yaw_decode(int16_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_ins_ypr_yaw_is_in_range(int16_t value);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
int16_t can1_vn200_ins_ypr_pitch_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_ins_ypr_pitch_decode(int16_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_ins_ypr_pitch_is_in_range(int16_t value);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
int16_t can1_vn200_ins_ypr_roll_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_ins_ypr_roll_decode(int16_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_ins_ypr_roll_is_in_range(int16_t value);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
uint16_t can1_vn200_ins_ypr_uncertainty_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_ins_ypr_uncertainty_decode(uint16_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_ins_ypr_uncertainty_is_in_range(uint16_t value);
|
|
|
|
/**
|
|
* Pack message VN200_IMU_ACC_LIN.
|
|
*
|
|
* @param[out] dst_p Buffer to pack the message into.
|
|
* @param[in] src_p Data to pack.
|
|
* @param[in] size Size of dst_p.
|
|
*
|
|
* @return Size of packed data, or negative error code.
|
|
*/
|
|
int can1_vn200_imu_acc_lin_pack(
|
|
uint8_t *dst_p,
|
|
const struct can1_vn200_imu_acc_lin_t *src_p,
|
|
size_t size);
|
|
|
|
/**
|
|
* Unpack message VN200_IMU_ACC_LIN.
|
|
*
|
|
* @param[out] dst_p Object to unpack the message into.
|
|
* @param[in] src_p Message to unpack.
|
|
* @param[in] size Size of src_p.
|
|
*
|
|
* @return zero(0) or negative error code.
|
|
*/
|
|
int can1_vn200_imu_acc_lin_unpack(
|
|
struct can1_vn200_imu_acc_lin_t *dst_p,
|
|
const uint8_t *src_p,
|
|
size_t size);
|
|
|
|
/**
|
|
* Init message fields to default values from VN200_IMU_ACC_LIN.
|
|
*
|
|
* @param[in] msg_p Message to init.
|
|
*
|
|
* @return zero(0) on success or (-1) in case of nullptr argument.
|
|
*/
|
|
int can1_vn200_imu_acc_lin_init(struct can1_vn200_imu_acc_lin_t *msg_p);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
int32_t can1_vn200_imu_acc_lin_acc_lin_x_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_imu_acc_lin_acc_lin_x_decode(int32_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_imu_acc_lin_acc_lin_x_is_in_range(int32_t value);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
int32_t can1_vn200_imu_acc_lin_acc_lin_y_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_imu_acc_lin_acc_lin_y_decode(int32_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_imu_acc_lin_acc_lin_y_is_in_range(int32_t value);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
int32_t can1_vn200_imu_acc_lin_acc_lin_z_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_imu_acc_lin_acc_lin_z_decode(int32_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_imu_acc_lin_acc_lin_z_is_in_range(int32_t value);
|
|
|
|
/**
|
|
* Pack message VN200_IMU_ACC_ANG.
|
|
*
|
|
* @param[out] dst_p Buffer to pack the message into.
|
|
* @param[in] src_p Data to pack.
|
|
* @param[in] size Size of dst_p.
|
|
*
|
|
* @return Size of packed data, or negative error code.
|
|
*/
|
|
int can1_vn200_imu_acc_ang_pack(
|
|
uint8_t *dst_p,
|
|
const struct can1_vn200_imu_acc_ang_t *src_p,
|
|
size_t size);
|
|
|
|
/**
|
|
* Unpack message VN200_IMU_ACC_ANG.
|
|
*
|
|
* @param[out] dst_p Object to unpack the message into.
|
|
* @param[in] src_p Message to unpack.
|
|
* @param[in] size Size of src_p.
|
|
*
|
|
* @return zero(0) or negative error code.
|
|
*/
|
|
int can1_vn200_imu_acc_ang_unpack(
|
|
struct can1_vn200_imu_acc_ang_t *dst_p,
|
|
const uint8_t *src_p,
|
|
size_t size);
|
|
|
|
/**
|
|
* Init message fields to default values from VN200_IMU_ACC_ANG.
|
|
*
|
|
* @param[in] msg_p Message to init.
|
|
*
|
|
* @return zero(0) on success or (-1) in case of nullptr argument.
|
|
*/
|
|
int can1_vn200_imu_acc_ang_init(struct can1_vn200_imu_acc_ang_t *msg_p);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
int32_t can1_vn200_imu_acc_ang_acc_ang_x_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_imu_acc_ang_acc_ang_x_decode(int32_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_imu_acc_ang_acc_ang_x_is_in_range(int32_t value);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
int32_t can1_vn200_imu_acc_ang_acc_ang_y_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_imu_acc_ang_acc_ang_y_decode(int32_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_imu_acc_ang_acc_ang_y_is_in_range(int32_t value);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
int32_t can1_vn200_imu_acc_ang_acc_ang_z_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_imu_acc_ang_acc_ang_z_decode(int32_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_imu_acc_ang_acc_ang_z_is_in_range(int32_t value);
|
|
|
|
/**
|
|
* Pack message VN200_INS_LL.
|
|
*
|
|
* @param[out] dst_p Buffer to pack the message into.
|
|
* @param[in] src_p Data to pack.
|
|
* @param[in] size Size of dst_p.
|
|
*
|
|
* @return Size of packed data, or negative error code.
|
|
*/
|
|
int can1_vn200_ins_ll_pack(
|
|
uint8_t *dst_p,
|
|
const struct can1_vn200_ins_ll_t *src_p,
|
|
size_t size);
|
|
|
|
/**
|
|
* Unpack message VN200_INS_LL.
|
|
*
|
|
* @param[out] dst_p Object to unpack the message into.
|
|
* @param[in] src_p Message to unpack.
|
|
* @param[in] size Size of src_p.
|
|
*
|
|
* @return zero(0) or negative error code.
|
|
*/
|
|
int can1_vn200_ins_ll_unpack(
|
|
struct can1_vn200_ins_ll_t *dst_p,
|
|
const uint8_t *src_p,
|
|
size_t size);
|
|
|
|
/**
|
|
* Init message fields to default values from VN200_INS_LL.
|
|
*
|
|
* @param[in] msg_p Message to init.
|
|
*
|
|
* @return zero(0) on success or (-1) in case of nullptr argument.
|
|
*/
|
|
int can1_vn200_ins_ll_init(struct can1_vn200_ins_ll_t *msg_p);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
int16_t can1_vn200_ins_ll_latitude_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_ins_ll_latitude_decode(int16_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_ins_ll_latitude_is_in_range(int16_t value);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
int16_t can1_vn200_ins_ll_longitude_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_ins_ll_longitude_decode(int16_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_ins_ll_longitude_is_in_range(int16_t value);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
uint16_t can1_vn200_ins_ll_uncertainty_n_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_ins_ll_uncertainty_n_decode(uint16_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_ins_ll_uncertainty_n_is_in_range(uint16_t value);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
uint16_t can1_vn200_ins_ll_uncertainty_e_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_ins_ll_uncertainty_e_decode(uint16_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_ins_ll_uncertainty_e_is_in_range(uint16_t value);
|
|
|
|
/**
|
|
* Pack message VN200_INS_VEL.
|
|
*
|
|
* @param[out] dst_p Buffer to pack the message into.
|
|
* @param[in] src_p Data to pack.
|
|
* @param[in] size Size of dst_p.
|
|
*
|
|
* @return Size of packed data, or negative error code.
|
|
*/
|
|
int can1_vn200_ins_vel_pack(
|
|
uint8_t *dst_p,
|
|
const struct can1_vn200_ins_vel_t *src_p,
|
|
size_t size);
|
|
|
|
/**
|
|
* Unpack message VN200_INS_VEL.
|
|
*
|
|
* @param[out] dst_p Object to unpack the message into.
|
|
* @param[in] src_p Message to unpack.
|
|
* @param[in] size Size of src_p.
|
|
*
|
|
* @return zero(0) or negative error code.
|
|
*/
|
|
int can1_vn200_ins_vel_unpack(
|
|
struct can1_vn200_ins_vel_t *dst_p,
|
|
const uint8_t *src_p,
|
|
size_t size);
|
|
|
|
/**
|
|
* Init message fields to default values from VN200_INS_VEL.
|
|
*
|
|
* @param[in] msg_p Message to init.
|
|
*
|
|
* @return zero(0) on success or (-1) in case of nullptr argument.
|
|
*/
|
|
int can1_vn200_ins_vel_init(struct can1_vn200_ins_vel_t *msg_p);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
uint16_t can1_vn200_ins_vel_vel_lin_x_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_ins_vel_vel_lin_x_decode(uint16_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_ins_vel_vel_lin_x_is_in_range(uint16_t value);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
uint16_t can1_vn200_ins_vel_vel_lin_y_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_ins_vel_vel_lin_y_decode(uint16_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_ins_vel_vel_lin_y_is_in_range(uint16_t value);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
uint16_t can1_vn200_ins_vel_vel_lin_z_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_ins_vel_vel_lin_z_decode(uint16_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_ins_vel_vel_lin_z_is_in_range(uint16_t value);
|
|
|
|
/**
|
|
* Encode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to encode.
|
|
*
|
|
* @return Encoded signal.
|
|
*/
|
|
uint16_t can1_vn200_ins_vel_uncertainty_encode(double value);
|
|
|
|
/**
|
|
* Decode given signal by applying scaling and offset.
|
|
*
|
|
* @param[in] value Signal to decode.
|
|
*
|
|
* @return Decoded signal.
|
|
*/
|
|
double can1_vn200_ins_vel_uncertainty_decode(uint16_t value);
|
|
|
|
/**
|
|
* Check that given signal is in allowed range.
|
|
*
|
|
* @param[in] value Signal to check.
|
|
*
|
|
* @return true if in range, false otherwise.
|
|
*/
|
|
bool can1_vn200_ins_vel_uncertainty_is_in_range(uint16_t value);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|