9#include "CanandUtils.h"
37 CanandMessage(uint8_t busDescriptor, uint32_t
id, uint64_t timestamp, uint8_t dataLen, uint8_t* dataBuf) : \
38 id{id}, timestamp{timestamp}, bus{busDescriptor} {
39 dataSize = (dataLen > 8) ? 8 : dataLen;
40 memcpy(data, dataBuf, 8);
51 inline uint32_t
GetId() {
return id; }
91 inline uint8_t*
GetData() {
return data; }
104 inline units::second_t
GetTimestamp() {
return units::microsecond_t{
static_cast<double>(timestamp)}; }
Definition: CanandMessage.h:26
uint8_t GetApiPage()
Definition: CanandMessage.h:75
CanandMessage(uint8_t busDescriptor, uint32_t id, uint64_t timestamp, uint8_t dataLen, uint8_t *dataBuf)
Definition: CanandMessage.h:37
CANBus GetBus()
Definition: CanandMessage.h:110
uint32_t GetId()
Definition: CanandMessage.h:51
units::second_t GetTimestamp()
Definition: CanandMessage.h:104
uint8_t GetApiIndex()
Definition: CanandMessage.h:59
uint8_t * GetData()
Definition: CanandMessage.h:91
uint8_t GetDeviceId()
Definition: CanandMessage.h:67
uint8_t GetLength()
Definition: CanandMessage.h:97
uint8_t GetDeviceType()
Definition: CanandMessage.h:83
constexpr uint8_t getDeviceType(uint32_t fullId)
Definition: CanandUtils.h:24
constexpr uint8_t getDeviceId(uint32_t fullId)
Definition: CanandUtils.h:57
constexpr uint8_t getApiIndex(uint32_t fullId)
Definition: CanandUtils.h:46
constexpr uint8_t getApiPage(uint32_t fullId)
Definition: CanandUtils.h:35
Definition: CanandMessage.h:10