Apollo  6.0
Open source self driving car software
Public Member Functions | Static Public Attributes | List of all members
apollo::canbus::lincoln::Gear67 Class Reference

one of the protocol data of lincoln vehicle More...

#include <gear_67.h>

Inheritance diagram for apollo::canbus::lincoln::Gear67:
Inheritance graph
Collaboration diagram for apollo::canbus::lincoln::Gear67:
Collaboration graph

Public Member Functions

virtual void Parse (const std::uint8_t *bytes, int32_t length, ChassisDetail *chassis_detail) const
 
int32_t gear_state (const std::uint8_t *bytes, int32_t length) const
 get the gear state from byte array config detail: {'name': 'state', 'offset': 0.0, 'precision': 1.0, 'len': 3, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 0, 'type': 'int', 'order': 'intel', 'physical_unit': '""'} More...
 
bool is_canbus_fault (const std::uint8_t *bytes, int32_t length) const
 check canbus fault from byte array config detail: {'name': 'fltbus', 'offset': 0.0, 'precision': 1.0, 'len': 1, 'f_type': 'valid', 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 7, 'type': 'bool', 'order': 'intel', 'physical_unit': '""'} More...
 
bool is_driver_override (const std::uint8_t *bytes, int32_t length) const
 check driver override from byte array config detail: {'name': 'driver', 'offset': 0.0, 'precision': 1.0, 'len': 1, 'f_type': 'valid', 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 3, 'type': 'bool', 'order': 'intel', 'physical_unit': '""'} More...
 
int32_t reported_gear_cmd (const std::uint8_t *bytes, int32_t length) const
 get reported gear command from byte array config detail: {'name': 'cmd', 'offset': 0.0, 'precision': 1.0, 'len': 3, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 4, 'type': 'int', 'order': 'intel', 'physical_unit': '""'} More...
 
- Public Member Functions inherited from apollo::drivers::canbus::ProtocolData< ::apollo::canbus::ChassisDetail >
 ProtocolData ()=default
 construct protocol data. More...
 
virtual ~ProtocolData ()=default
 destruct protocol data. More...
 
virtual uint32_t GetPeriod () const
 
virtual int32_t GetLength () const
 
virtual void Parse (const uint8_t *bytes, int32_t length, ::apollo::canbus::ChassisDetail *sensor_data) const
 
virtual void UpdateData (uint8_t *data)
 
virtual void Reset ()
 

Static Public Attributes

static const int32_t ID
 

Additional Inherited Members

- Static Public Member Functions inherited from apollo::drivers::canbus::ProtocolData< ::apollo::canbus::ChassisDetail >
static std::uint8_t CalculateCheckSum (const uint8_t *input, const uint32_t length)
 static function, used to calculate the checksum of input array. More...
 
static T BoundedValue (T lower, T upper, T val)
 

Detailed Description

one of the protocol data of lincoln vehicle

Member Function Documentation

◆ gear_state()

int32_t apollo::canbus::lincoln::Gear67::gear_state ( const std::uint8_t *  bytes,
int32_t  length 
) const

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

Parameters
bytesa pointer to the byte array
lengththe length of the byte array
Returns
the value of the gear state

◆ is_canbus_fault()

bool apollo::canbus::lincoln::Gear67::is_canbus_fault ( const std::uint8_t *  bytes,
int32_t  length 
) const

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

Parameters
bytesa pointer to the byte array
lengththe length of the byte array
Returns
the boolean value of canbus fault

◆ is_driver_override()

bool apollo::canbus::lincoln::Gear67::is_driver_override ( const std::uint8_t *  bytes,
int32_t  length 
) const

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

Parameters
bytesa pointer to the byte array
lengththe length of the byte array
Returns
the boolean value of driver override

◆ Parse()

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

◆ reported_gear_cmd()

int32_t apollo::canbus::lincoln::Gear67::reported_gear_cmd ( const std::uint8_t *  bytes,
int32_t  length 
) const

get reported gear command from byte array config detail: {'name': 'cmd', 'offset': 0.0, 'precision': 1.0, 'len': 3, 'f_type': 'value', 'is_signed_var': False, 'physical_range': '[0|0]', 'bit': 4, 'type': 'int', 'order': 'intel', 'physical_unit': '""'}

Parameters
bytesa pointer to the byte array
lengththe length of the byte array
Returns
the value of reported gear command

Member Data Documentation

◆ ID

const int32_t apollo::canbus::lincoln::Gear67::ID
static

The documentation for this class was generated from the following file: