#include "vca_sdoabortmsg.h"

/**
 * vca_sdo_abort_msg - translates sdo communication abort code to the text
 * @code:  abort code
 */
const char* vca_sdo_abort_msg(unsigned code)
{
    unsigned u;
    for(u=0; sdo_abort_codes[u].code; u++) {
        if(sdo_abort_codes[u].code == code) break;
    }
    return sdo_abort_codes[u].msg;
}

/**
 * vca_upload_sdo - Uploads SDO to the CANopen device using previously opened vca_handle
 * @sdo_port:  SDO port of device (usualy 0x600)
 * @node:  ID of uploaded node (1 - 127)
 * @index:  SDO object index in the Object Dictionary
 * @subindex:  SDO object subindex in the Object Dictionary
 * @data:  buffer for the uploaded data
 * @size:  size of the buffer
 * @errcode: Error code of transfer, if errcode == NULL than is not set.
 *
 * Returns number of the uploaded bytes
 */
int vca_upload_sdo(int sdo_port, int node, int index, int subindex, unsigned char *data, int size, unsigned *errcode)
{
}

