ark::canbus::SdoUpload::Method

Defined in header “ark/canbus/canopen/sdo_upload.hh”.


Abstract method for receiving data from the remote.

Methods

  • Method(uint16_t index, uint8_t subindex)
    Sets up for transfer.

  • 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 & packet)
    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.

  • core::ByteBuffer abort_frame(uint32_t code)
    Synthesizes an abort frame.

  • uint32_t status()
    Returns the SDO result code, when complete.

  • bool complete()
    Returns whether the transfer is complete.

  • void status(uint32_t status)
    Returns the SDO result code, when complete.

  • uint16_t index()
    Returns the SDO index.

  • uint8_t subindex()
    Returns the SDO sub-index.

  • void expected_size(size_t expected)
    Sets the approximate size we are expecting from the remote.

  • size_t expected_size()
    Gets the approximate size we are expecting from the remote.

  • void suppress_abort(bool possible)
    Suppress processing an abort. This is specifically needed for the case where the remote sends a ‘final segment, segment ID is 0..0x1f’, which would look like an ABORT SS message otherwise.

  • bool suppress_abort()
    Indicate whether an ABORT message is current suppressed.