#include <can_core.h>
Public Member Functions | |
int | buildMsg (TCanMsg *msg, uint8_t id, uint8_t len, char *data) |
Build a message. | |
void | callbackCanMessage (const tinycan::CanMsg::ConstPtr &msg) |
Callcack function for can subscriber. | |
Can () | |
int | init () |
int | printMsg (TCanMsg *msg) |
Print a message. | |
void | publishCanMessage (ros::Publisher *pub_message, TCanMsg *msg) |
Publish can message. | |
int | readMsg (TCanMsg *msg) |
Read a can message from bus. | |
int | sendMsg (TCanMsg *msg) |
Send a can message. | |
~Can () | |
Private Attributes | |
uint32_t | device_idx |
Definition at line 13 of file can_core.h.
Definition at line 20 of file can_core.cpp.
Definition at line 31 of file can_core.cpp.
int tinycan::Can::buildMsg | ( | TCanMsg * | msg, |
uint8_t | id, | ||
uint8_t | len, | ||
char * | data | ||
) |
Build a message.
Definition at line 82 of file can_core.cpp.
void tinycan::Can::callbackCanMessage | ( | const tinycan::CanMsg::ConstPtr & | msg | ) |
Callcack function for can subscriber.
Definition at line 178 of file can_core.cpp.
int tinycan::Can::init | ( | ) |
Definition at line 43 of file can_core.cpp.
int tinycan::Can::printMsg | ( | TCanMsg * | msg | ) |
Print a message.
Definition at line 152 of file can_core.cpp.
void tinycan::Can::publishCanMessage | ( | ros::Publisher * | pub_message, |
TCanMsg * | msg | ||
) |
Publish can message.
Definition at line 198 of file can_core.cpp.
int tinycan::Can::readMsg | ( | TCanMsg * | msg | ) |
Read a can message from bus.
Definition at line 115 of file can_core.cpp.
int tinycan::Can::sendMsg | ( | TCanMsg * | msg | ) |
Send a can message.
Definition at line 98 of file can_core.cpp.
uint32_t tinycan::Can::device_idx [private] |
Definition at line 32 of file can_core.h.