45 if (value.size() >=
sizeof(std::uint64_t)) {
47 std::memcpy(&
csv_timestamp, value.data(),
sizeof(std::uint64_t));
50 const std::uint8_t* csv_data = value.data() +
sizeof(std::uint64_t);
51 std::size_t
csv_data_size = value.size() -
sizeof(std::uint64_t);
EPOS-inspired Agent implementation using composition over inheritance.
Definition agent.h:35
Message::Array Value
Definition agent.h:39
Message::Microseconds Microseconds
Definition agent.h:42
Message::Origin Address
Definition agent.h:38
Address address() const
Definition agent.h:648
bool thread_running()
Definition agent.h:656
void log_message(const Message &msg, const std::string &direction)
Definition agent.h:493
bool running()
Definition agent.h:399
const bool external() const
Definition agent.h:66
int can_send(Message *msg)
Definition agent.h:652
Message::Unit Unit
Definition agent.h:40
Value get(Unit unit)
Get data using function pointer instead of virtual method.
Definition agent.h:260
std::string name() const
Definition agent.h:67
CSVAgent(CAN *bus, const std::string &name, Unit unit, Type type, Address address, DataProducer producer, ResponseHandler handler, std::unique_ptr< ComponentData > data, bool external)
Definition csv_agent.h:19
void reply(Unit unit)
Reply method that calls function pointer instead of virtual method.
Definition csv_agent.h:25
~CSVAgent()
Definition csv_agent.h:23
Template class for network messages with Clock integration.
Definition message.h:31
Type
Definition message.h:35
std::vector< std::uint8_t >(* DataProducer)(std::uint32_t unit, ComponentData *data)
Function pointer type for data production.
Definition component_functions.hpp:22
void(* ResponseHandler)(void *msg, ComponentData *data)
Function pointer type for response handling.
Definition component_functions.hpp:34
Select_Debug<(Traits< T >::debugged &&Traits< Debug >::error)> db(Debug_Error l)
Definition debug.h:166
T * data()
Definition protocol.h:24