ark::canbus::Cia315Controller

Defined in header “ark/canbus/cia315_controller.hh”.


Represents a controller for the CIA315 protocol, allowing you to package up CAN frames and retransmit them over some other protocol (such as UDP or TCP).

This class can consume raw CAN frame and produce CIA315 frames, or vice-versa.

Methods

  • void write(uint8_t interface_id, const CanPacket & packet)
    Writes a new CAN packet this will be packed into frames meant for transmission to other CIA315 clients.

  • void receive(const core::ByteBuffer & buffer)
    Receives a CIA315 frame from some source. This is a raw buffer, and will be decoded into CIA315 frames (and then, CAN packets). These will be available for transmission to the connected CANbus.

  • std::vector< core::ByteBuffer > pop_outgoing()
    Pops all available CIA315 frames intended to be transmitted to other CIA315 clients. Any in-progress frames will be finalized. ie, this is the result of the write() call.

  • std::vector< CanPacket > pop_incoming()
    Pops all available CAN packets that should be transmitted onto the local CANbus. ie, this is the result of the receive() call.

  • void queue_keepalive(uint8_t interface_id)
    Queues a keep-alive packet for the given interface.

  • const Cia315ControllerStatistics & statistics()
    Returns running statistics from this controller.