Apollo 10.0
自动驾驶开放平台
apollo::canbus::lincoln::Gps6e类 参考

one of the protocol data of lincoln vehicle 更多...

#include <gps_6e.h>

类 apollo::canbus::lincoln::Gps6e 继承关系图:
apollo::canbus::lincoln::Gps6e 的协作图:

Public 成员函数

virtual void Parse (const std::uint8_t *bytes, int32_t length, Lincoln *chassis_detail) const
 
int32_t year (const std::uint8_t *bytes, int32_t length) const
 get year from byte array config detail: {'name': 'year', 'offset': 0.0, 'precision': 1.0, 'len': 7, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|99]', 'bit': 0, 'type': 'int', 'order': 'intel', 'physical_unit': '"years"'}
 
int32_t month (const std::uint8_t *bytes, int32_t length) const
 get month from byte array config detail: {'name': 'month', 'offset': 0.0, 'precision': 1.0, 'len': 4, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[1|12]', 'bit': 8, 'type': 'int', 'order': 'intel', 'physical_unit': '"months"'}
 
int32_t day (const std::uint8_t *bytes, int32_t length) const
 get day from byte array config detail: {'name': 'day', 'offset': 0.0, 'precision': 1.0, 'len': 5, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[1|31]', 'bit': 16, 'type': 'int', 'order': 'intel', 'physical_unit': '"days"'}
 
int32_t hours (const std::uint8_t *bytes, int32_t length) const
 get hours from byte array config detail: {'name': 'hours', 'offset': 0.0, 'precision': 1.0, 'len': 5, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|23]', 'bit': 24, 'type': 'int', 'order': 'intel', 'physical_unit': '"hours"'}
 
int32_t minutes (const std::uint8_t *bytes, int32_t length) const
 get minutes from byte array config detail: {'name': 'minutes', 'offset': 0.0, 'precision': 1.0, 'len': 6, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|59]', 'bit': 32, 'type': 'int', 'order': 'intel', 'physical_unit': '"minutes"'}
 
int32_t seconds (const std::uint8_t *bytes, int32_t length) const
 get year from byte array config detail: {'name': 'seconds', 'offset': 0.0, 'precision': 1.0, 'len': 6, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|59]', 'bit': 40, 'type': 'int', 'order': 'intel', 'physical_unit': '"seconds"'}
 
double compass_direction (const std::uint8_t *bytes, int32_t length) const
 get compass direction from byte array config detail: {'name': 'compass', 'offset': 0.0, 'precision': 45.0, 'len': 4, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|315]', 'bit': 48, 'type': 'double', 'order': 'intel', 'physical_unit': '"degrees"'}
 
double pdop (const std::uint8_t *bytes, int32_t length) const
 get pdop from byte array config detail: {'name': 'pdop', 'offset': 0.0, 'precision': 0.2, 'len': 5, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 56, 'type': 'double', 'order': 'intel', 'physical_unit': '""'}
 
bool is_gps_fault (const std::uint8_t *bytes, int32_t length) const
 check gps fault from byte array config detail: {'name': 'fltgps', 'offset': 0.0, 'precision': 1.0, 'len': 1, 'f_type': 'valid', 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 61, 'type': 'bool', 'order': 'intel', 'physical_unit': '""'}
 
bool is_inferred_position (const std::uint8_t *bytes, int32_t length) const
 get inferred position from byte array config detail: {'name': 'inf', 'offset': 0.0, 'precision': 1.0, 'len': 1, 'f_type': 'valid', 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 62, 'type': 'bool', 'order': 'intel', 'physical_unit': '""'}
 
- Public 成员函数 继承自 apollo::drivers::canbus::ProtocolData< ::apollo::canbus::Lincoln >
 ProtocolData ()=default
 construct protocol data.
 
virtual ~ProtocolData ()=default
 destruct protocol data.
 
virtual uint32_t GetPeriod () const
 
virtual int32_t GetLength () const
 
virtual void Parse (const uint8_t *bytes, int32_t length, ::apollo::canbus::Lincoln *sensor_data) const
 
virtual void UpdateData (uint8_t *data)
 
virtual void UpdateData_Heartbeat (uint8_t *data)
 
virtual void Reset ()
 

静态 Public 属性

static const int32_t ID = 0x6E
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 apollo::drivers::canbus::ProtocolData< ::apollo::canbus::Lincoln >
static std::uint8_t CalculateCheckSum (const uint8_t *input, const uint32_t length)
 static function, used to calculate the checksum of input array.
 
static T BoundedValue (T lower, T upper, T val)
 

详细描述

one of the protocol data of lincoln vehicle

在文件 gps_6e.h40 行定义.

成员函数说明

◆ compass_direction()

double apollo::canbus::lincoln::Gps6e::compass_direction ( const std::uint8_t *  bytes,
int32_t  length 
) const

get compass direction from byte array config detail: {'name': 'compass', 'offset': 0.0, 'precision': 45.0, 'len': 4, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|315]', 'bit': 48, 'type': 'double', 'order': 'intel', 'physical_unit': '"degrees"'}

参数
bytesa pointer to the byte array
lengththe length of the byte array
返回
the value of compass direction

在文件 gps_6e.cc82 行定义.

83 {
84 Byte frame(bytes + 6);
85 int32_t x = frame.get_byte(0, 4);
86 return x * 45.000000;
87}

◆ day()

int32_t apollo::canbus::lincoln::Gps6e::day ( const std::uint8_t *  bytes,
int32_t  length 
) const

get day from byte array config detail: {'name': 'day', 'offset': 0.0, 'precision': 1.0, 'len': 5, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[1|31]', 'bit': 16, 'type': 'int', 'order': 'intel', 'physical_unit': '"days"'}

参数
bytesa pointer to the byte array
lengththe length of the byte array
返回
the value of day

在文件 gps_6e.cc58 行定义.

58 {
59 Byte frame(bytes + 2);
60 int32_t x = frame.get_byte(0, 5);
61 return x;
62}

◆ hours()

int32_t apollo::canbus::lincoln::Gps6e::hours ( const std::uint8_t *  bytes,
int32_t  length 
) const

get hours from byte array config detail: {'name': 'hours', 'offset': 0.0, 'precision': 1.0, 'len': 5, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|23]', 'bit': 24, 'type': 'int', 'order': 'intel', 'physical_unit': '"hours"'}

参数
bytesa pointer to the byte array
lengththe length of the byte array
返回
the value of hours

在文件 gps_6e.cc64 行定义.

64 {
65 Byte frame(bytes + 3);
66 int32_t x = frame.get_byte(0, 5);
67 return x;
68}

◆ is_gps_fault()

bool apollo::canbus::lincoln::Gps6e::is_gps_fault ( const std::uint8_t *  bytes,
int32_t  length 
) const

check gps fault from byte array config detail: {'name': 'fltgps', 'offset': 0.0, 'precision': 1.0, 'len': 1, 'f_type': 'valid', 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 61, 'type': 'bool', 'order': 'intel', 'physical_unit': '""'}

参数
bytesa pointer to the byte array
lengththe length of the byte array
返回
the value of gps fault

在文件 gps_6e.cc95 行定义.

95 {
96 Byte frame(bytes + 7);
97 return frame.is_bit_1(5);
98}

◆ is_inferred_position()

bool apollo::canbus::lincoln::Gps6e::is_inferred_position ( const std::uint8_t *  bytes,
int32_t  length 
) const

get inferred position from byte array config detail: {'name': 'inf', 'offset': 0.0, 'precision': 1.0, 'len': 1, 'f_type': 'valid', 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 62, 'type': 'bool', 'order': 'intel', 'physical_unit': '""'}

参数
bytesa pointer to the byte array
lengththe length of the byte array
返回
the value of inferred position

在文件 gps_6e.cc100 行定义.

101 {
102 Byte frame(bytes + 7);
103 return frame.is_bit_1(6);
104}

◆ minutes()

int32_t apollo::canbus::lincoln::Gps6e::minutes ( const std::uint8_t *  bytes,
int32_t  length 
) const

get minutes from byte array config detail: {'name': 'minutes', 'offset': 0.0, 'precision': 1.0, 'len': 6, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|59]', 'bit': 32, 'type': 'int', 'order': 'intel', 'physical_unit': '"minutes"'}

参数
bytesa pointer to the byte array
lengththe length of the byte array
返回
the value of minutes

在文件 gps_6e.cc70 行定义.

70 {
71 Byte frame(bytes + 4);
72 int32_t x = frame.get_byte(0, 6);
73 return x;
74}

◆ month()

int32_t apollo::canbus::lincoln::Gps6e::month ( const std::uint8_t *  bytes,
int32_t  length 
) const

get month from byte array config detail: {'name': 'month', 'offset': 0.0, 'precision': 1.0, 'len': 4, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[1|12]', 'bit': 8, 'type': 'int', 'order': 'intel', 'physical_unit': '"months"'}

参数
bytesa pointer to the byte array
lengththe length of the byte array
返回
the value of month

在文件 gps_6e.cc52 行定义.

52 {
53 Byte frame(bytes + 1);
54 int32_t x = frame.get_byte(0, 4);
55 return x;
56}

◆ Parse()

void apollo::canbus::lincoln::Gps6e::Parse ( const std::uint8_t *  bytes,
int32_t  length,
Lincoln chassis_detail 
) const
virtual

在文件 gps_6e.cc29 行定义.

30 {
31 chassis_detail->mutable_basic()->set_year(year(bytes, length));
32 chassis_detail->mutable_basic()->set_month(month(bytes, length));
33 chassis_detail->mutable_basic()->set_day(day(bytes, length));
34 chassis_detail->mutable_basic()->set_hours(hours(bytes, length));
35 chassis_detail->mutable_basic()->set_minutes(minutes(bytes, length));
36 chassis_detail->mutable_basic()->set_seconds(seconds(bytes, length));
37 chassis_detail->mutable_basic()->set_compass_direction(
38 compass_direction(bytes, length));
39 chassis_detail->mutable_basic()->set_pdop(pdop(bytes, length));
40 chassis_detail->mutable_basic()->set_is_gps_fault(
41 is_gps_fault(bytes, length));
42 chassis_detail->mutable_basic()->set_is_inferred(
43 is_inferred_position(bytes, length));
44}
bool is_inferred_position(const std::uint8_t *bytes, int32_t length) const
get inferred position from byte array config detail: {'name': 'inf', 'offset': 0.0,...
Definition gps_6e.cc:100
int32_t minutes(const std::uint8_t *bytes, int32_t length) const
get minutes from byte array config detail: {'name': 'minutes', 'offset': 0.0, 'precision': 1....
Definition gps_6e.cc:70
int32_t day(const std::uint8_t *bytes, int32_t length) const
get day from byte array config detail: {'name': 'day', 'offset': 0.0, 'precision': 1....
Definition gps_6e.cc:58
int32_t month(const std::uint8_t *bytes, int32_t length) const
get month from byte array config detail: {'name': 'month', 'offset': 0.0, 'precision': 1....
Definition gps_6e.cc:52
int32_t seconds(const std::uint8_t *bytes, int32_t length) const
get year from byte array config detail: {'name': 'seconds', 'offset': 0.0, 'precision': 1....
Definition gps_6e.cc:76
bool is_gps_fault(const std::uint8_t *bytes, int32_t length) const
check gps fault from byte array config detail: {'name': 'fltgps', 'offset': 0.0, 'precision': 1....
Definition gps_6e.cc:95
double compass_direction(const std::uint8_t *bytes, int32_t length) const
get compass direction from byte array config detail: {'name': 'compass', 'offset': 0....
Definition gps_6e.cc:82
int32_t hours(const std::uint8_t *bytes, int32_t length) const
get hours from byte array config detail: {'name': 'hours', 'offset': 0.0, 'precision': 1....
Definition gps_6e.cc:64
int32_t year(const std::uint8_t *bytes, int32_t length) const
get year from byte array config detail: {'name': 'year', 'offset': 0.0, 'precision': 1....
Definition gps_6e.cc:46
double pdop(const std::uint8_t *bytes, int32_t length) const
get pdop from byte array config detail: {'name': 'pdop', 'offset': 0.0, 'precision': 0....
Definition gps_6e.cc:89

◆ pdop()

double apollo::canbus::lincoln::Gps6e::pdop ( const std::uint8_t *  bytes,
int32_t  length 
) const

get pdop from byte array config detail: {'name': 'pdop', 'offset': 0.0, 'precision': 0.2, 'len': 5, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 56, 'type': 'double', 'order': 'intel', 'physical_unit': '""'}

参数
bytesa pointer to the byte array
lengththe length of the byte array
返回
the value of pdop

在文件 gps_6e.cc89 行定义.

89 {
90 Byte frame(bytes + 7);
91 int32_t x = frame.get_byte(0, 5);
92 return x * 0.200000;
93}

◆ seconds()

int32_t apollo::canbus::lincoln::Gps6e::seconds ( const std::uint8_t *  bytes,
int32_t  length 
) const

get year from byte array config detail: {'name': 'seconds', 'offset': 0.0, 'precision': 1.0, 'len': 6, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|59]', 'bit': 40, 'type': 'int', 'order': 'intel', 'physical_unit': '"seconds"'}

参数
bytesa pointer to the byte array
lengththe length of the byte array
返回
the value of minutes

在文件 gps_6e.cc76 行定义.

76 {
77 Byte frame(bytes + 5);
78 int32_t x = frame.get_byte(0, 6);
79 return x;
80}

◆ year()

int32_t apollo::canbus::lincoln::Gps6e::year ( const std::uint8_t *  bytes,
int32_t  length 
) const

get year from byte array config detail: {'name': 'year', 'offset': 0.0, 'precision': 1.0, 'len': 7, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|99]', 'bit': 0, 'type': 'int', 'order': 'intel', 'physical_unit': '"years"'}

参数
bytesa pointer to the byte array
lengththe length of the byte array
返回
the value of year

在文件 gps_6e.cc46 行定义.

46 {
47 Byte frame(bytes + 0);
48 int32_t x = frame.get_byte(0, 7);
49 return x;
50}

类成员变量说明

◆ ID

const int32_t apollo::canbus::lincoln::Gps6e::ID = 0x6E
static

在文件 gps_6e.h43 行定义.


该类的文档由以下文件生成: