|
Apollo 11.0
自动驾驶开放平台
|
This class defines the message to send. 更多...
#include <can_sender.h>
Public 成员函数 | |
| SenderMessage (const uint32_t message_id, ProtocolData< SensorType > *protocol_data) | |
| Constructor which takes message ID and protocol data. | |
| 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 . | |
| virtual | ~SenderMessage ()=default |
| Destructor. | |
| void | UpdateCurrPeriod (const int32_t delta_period) |
| Update the current period for sending messages by a difference. | |
| void | Update () |
| Update the protocol data. | |
| void | Update_Heartbeat () |
| Always update the protocol data. | |
| struct CanFrame | CanFrame () |
| Get the CAN frame to send. | |
| uint32_t | message_id () const |
| Get the message ID. | |
| int32_t | curr_period () const |
| Get the current period to send messages. | |
This class defines the message to send.
在文件 can_sender.h 第 56 行定义.
| 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. |
在文件 can_sender.h 第 230 行定义.
| 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. |
在文件 can_sender.h 第 235 行定义.
|
virtualdefault |
Destructor.
| struct CanFrame apollo::drivers::canbus::SenderMessage< SensorType >::CanFrame | ( | ) |
Get the CAN frame to send.
在文件 can_sender.h 第 293 行定义.
| 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.
在文件 can_sender.h 第 299 行定义.
| uint32_t apollo::drivers::canbus::SenderMessage< SensorType >::message_id | ( | ) | const |
Get the message ID.
在文件 can_sender.h 第 288 行定义.
| 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.
在文件 can_sender.h 第 264 行定义.
| void apollo::drivers::canbus::SenderMessage< SensorType >::Update_Heartbeat | ( | ) |
Always update the protocol data.
But the updating process depends on the real type of protocol data which inherites ProtocolData.
在文件 can_sender.h 第 276 行定义.
| 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. |
在文件 can_sender.h 第 256 行定义.