25using ::apollo::drivers::canbus::Byte;
30 Lincoln *chassis_detail)
const {
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(
39 chassis_detail->mutable_basic()->set_pdop(
pdop(bytes, length));
40 chassis_detail->mutable_basic()->set_is_gps_fault(
42 chassis_detail->mutable_basic()->set_is_inferred(
46int32_t
Gps6e::year(
const std::uint8_t *bytes, int32_t length)
const {
47 Byte frame(bytes + 0);
48 int32_t x = frame.get_byte(0, 7);
52int32_t
Gps6e::month(
const std::uint8_t *bytes, int32_t length)
const {
53 Byte frame(bytes + 1);
54 int32_t x = frame.get_byte(0, 4);
58int32_t
Gps6e::day(
const std::uint8_t *bytes, int32_t length)
const {
59 Byte frame(bytes + 2);
60 int32_t x = frame.get_byte(0, 5);
64int32_t
Gps6e::hours(
const std::uint8_t *bytes, int32_t length)
const {
65 Byte frame(bytes + 3);
66 int32_t x = frame.get_byte(0, 5);
71 Byte frame(bytes + 4);
72 int32_t x = frame.get_byte(0, 6);
77 Byte frame(bytes + 5);
78 int32_t x = frame.get_byte(0, 6);
83 int32_t length)
const {
84 Byte frame(bytes + 6);
85 int32_t x = frame.get_byte(0, 4);
89double Gps6e::pdop(
const std::uint8_t *bytes, int32_t length)
const {
90 Byte frame(bytes + 7);
91 int32_t x = frame.get_byte(0, 5);
96 Byte frame(bytes + 7);
97 return frame.is_bit_1(5);
101 int32_t length)
const {
102 Byte frame(bytes + 7);
103 return frame.is_bit_1(6);
virtual void Parse(const std::uint8_t *bytes, int32_t length, Lincoln *chassis_detail) const
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,...
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....
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....
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....
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....
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....
double compass_direction(const std::uint8_t *bytes, int32_t length) const
get compass direction from byte array config detail: {'name': 'compass', 'offset': 0....
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....
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....
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....
the class of Gps6e (for lincoln vehicle)