|
Apollo
6.0
Open source self driving car software
|
This class defines the message to send. More...
#include <can_sender.h>

Public Member Functions | |
| SenderMessage (const uint32_t message_id, ProtocolData< SensorType > *protocol_data) | |
| Constructor which takes message ID and protocol data. More... | |
| SenderMessage (const uint32_t message_id, ProtocolData< SensorType > *protocol_data, bool init_with_one) | |
| Constructor which takes message ID and protocol data and and indicator whether to initialize all bits of the . More... | |
| virtual | ~SenderMessage ()=default |
| Destructor. More... | |
| void | UpdateCurrPeriod (const int32_t delta_period) |
| Update the current period for sending messages by a difference. More... | |
| void | Update () |
| Update the protocol data. But the updating process depends on the real type of protocol data which inherites ProtocolData. More... | |
| struct CanFrame | CanFrame () |
| Get the CAN frame to send. More... | |
| uint32_t | message_id () const |
| Get the message ID. More... | |
| int32_t | curr_period () const |
| Get the current period to send messages. It may be different from the period from protocol data by updating. More... | |
This class defines the message to send.
| apollo::drivers::canbus::SenderMessage< SensorType >::SenderMessage | ( | const uint32_t | message_id, |
| ProtocolData< SensorType > * | protocol_data | ||
| ) |
Constructor which takes message ID and protocol data.
| message_id | The message ID. |
| protocol_data | A pointer of ProtocolData which contains the content to send. |
| apollo::drivers::canbus::SenderMessage< SensorType >::SenderMessage | ( | const uint32_t | message_id, |
| ProtocolData< SensorType > * | protocol_data, | ||
| bool | init_with_one | ||
| ) |
Constructor which takes message ID and protocol data and and indicator whether to initialize all bits of the .
| message_id | The message ID. |
| protocol_data | A pointer of ProtocolData which contains the content to send. |
| init_with_one | If it is true, then initialize all bits in the protocol data as one. |
|
virtualdefault |
Destructor.
| struct CanFrame apollo::drivers::canbus::SenderMessage< SensorType >::CanFrame | ( | ) |
Get the CAN frame to send.
| int32_t apollo::drivers::canbus::SenderMessage< SensorType >::curr_period | ( | ) | const |
Get the current period to send messages. It may be different from the period from protocol data by updating.
| uint32_t apollo::drivers::canbus::SenderMessage< SensorType >::message_id | ( | ) | const |
Get the message ID.
| void apollo::drivers::canbus::SenderMessage< SensorType >::Update | ( | ) |
Update the protocol data. But the updating process depends on the real type of protocol data which inherites ProtocolData.
| void apollo::drivers::canbus::SenderMessage< SensorType >::UpdateCurrPeriod | ( | const int32_t | delta_period | ) |
Update the current period for sending messages by a difference.
| delta_period | Update the current period by reducing delta_period. |
1.8.13