ark::canbus::SdoDownload::Manager
Defined in header “ark/canbus/canopen/sdo_download.hh”.
This class manages transferring data from the host to the remote.
It automatically chooses Expedited, Segmented, or Block transfer based on amount of data.
Methods
-
Manager(size_t block_threshold)
-
void setup(uint16_t index, uint8_t subindex, const core::ByteBuffer & data)
Sets up for transfer. -
void setup(uint16_t index, uint8_t subindex, const std::vector< uint8_t > & data)
-
core::ByteBuffer initiate_transfer()
Begins the segmented transfer. Returns the data payload to send to the SSDO to initiate the transfer. -
std::vector< core::ByteBuffer > continue_transfer(const core::ByteBuffer & reply)
Receives the data from a CAN packet, and sends a request for additional data (if necessary, or an empty optional if the buffer is complete). The returned buffer vector is a set of CANopen payloads that should be sent to the SSDO that we are transferring data to.Returns an empty vector if transfer is complete.
-
uint32_t status()
Returns the SDO result code, when complete. -
bool complete()
Returns true if complete.