Common interfaces and utilities for a network of CAN nodes.
More...
|
std::string | roboticslab::CanUtils::msgToStr (std::uint8_t id, std::uint16_t cob, std::size_t len, const std::uint8_t *data) |
| Create a string representation of the given CAN message details.
|
|
std::string | roboticslab::CanUtils::msgToStr (std::size_t len, const std::uint8_t *data) |
| Create a string representation of the given CAN message data payload.
|
|
std::string | roboticslab::CanUtils::msgToStr (std::uint16_t cobId, std::size_t len, const std::uint8_t *data) |
| Create a string representation of the given CAN message details.
|
|
std::string | roboticslab::CanUtils::msgToStr (const can_message &msg) |
| Create a string representation of the given CAN message details.
|
|
template<typename T_int , typename T_frac > |
void | roboticslab::CanUtils::encodeFixedPoint (double value, T_int *integer, T_frac *fractional) |
| Obtain a fixed-point representation given a float value. More...
|
|
template<typename T_int , typename T_frac > |
double | roboticslab::CanUtils::decodeFixedPoint (T_int integer, T_frac fractional) |
| Obtain a float representation of a fixed-point value. More...
|
|
◆ decodeFixedPoint()
template<typename T_int , typename T_frac >
double roboticslab::CanUtils::decodeFixedPoint |
( |
T_int |
integer, |
|
|
T_frac |
fractional |
|
) |
| |
- Template Parameters
-
T_int | Integer part, integral type expected. |
T_frac | Fractional part, integral type expected. |
◆ encodeFixedPoint()
template<typename T_int , typename T_frac >
void roboticslab::CanUtils::encodeFixedPoint |
( |
double |
value, |
|
|
T_int * |
integer, |
|
|
T_frac * |
fractional |
|
) |
| |
- Template Parameters
-
T_int | Integer part, integral type expected. |
T_frac | Fractional part, integral type expected. |