KaCanOpen
 All Classes Functions Variables Typedefs Enumerations Pages
Public Member Functions | Public Attributes | List of all members
kaco::SDOResponse Struct Reference

This struct contains the response of a SDO request. Note that there are two types of response - segmented and expedited. Index, subindex and get_data() are not valid in segmented responses. More...

#include <sdo_response.h>

Public Member Functions

uint16_t get_index () const
 Returns the dictionary index (only for expedited transfer).
 
uint16_t get_subindex () const
 Returns the subindex (only for expedited transfer).
 
uint8_t get_length () const
 Returns the number of data bytes.
 
uint8_t failed () const
 Check if the transfer failed.
 
uint32_t get_data () const
 Returns the data as a single 4-byte value (only for expedited transfer).
 
void print () const
 Prints the response to command line.
 
std::string get_error () const
 Returns a human-readable representation of the error (only if failed()==true) More...
 

Public Attributes

uint8_t node_id
 Node id.
 
uint8_t command
 SDO command specifier.
 
uint16_t index
 Dictionary index. More...
 
uint8_t subindex
 Subindex. More...
 
uint8_t data [7]
 Data bytes.
 

Detailed Description

This struct contains the response of a SDO request. Note that there are two types of response - segmented and expedited. Index, subindex and get_data() are not valid in segmented responses.

Definition at line 43 of file sdo_response.h.

Member Function Documentation

std::string kaco::SDOResponse::get_error ( ) const

Returns a human-readable representation of the error (only if failed()==true)

Todo:
reimplement this using sdo_error class -> remove code duplication

Definition at line 83 of file sdo_response.cpp.

Member Data Documentation

uint16_t kaco::SDOResponse::index

Dictionary index.

Deprecated:
Todo:
Remove this.

Definition at line 54 of file sdo_response.h.

uint8_t kaco::SDOResponse::subindex

Subindex.

Deprecated:
Todo:
Remove this.

Definition at line 59 of file sdo_response.h.


The documentation for this struct was generated from the following files: