Classes | Defines | Functions | Variables
ethercatprint.c File Reference

Module to convert EtherCAT errors to readable messages. More...

#include <stdio.h>
#include <youbot_driver/soem/ethercattype.h>
#include <youbot_driver/soem/ethercatmain.h>
Include dependency graph for ethercatprint.c:

Go to the source code of this file.

Classes

struct  ec_ALstatuscodelist_t
struct  ec_sdoerrorlist_t
struct  ec_soeerrorlist_t

Defines

#define EC_MAXERRORNAME   127

Functions

char * ec_ALstatuscode2string (uint16 ALstatuscode)
char * ec_elist2string (void)
char * ec_sdoerror2string (uint32 sdoerrorcode)
char * ec_soeerror2string (uint16 errorcode)

Variables

const ec_ALstatuscodelist_t ec_ALstatuscodelist []
const ec_sdoerrorlist_t ec_sdoerrorlist []
const ec_soeerrorlist_t ec_soeerrorlist []
char estring [EC_MAXERRORNAME]

Detailed Description

Module to convert EtherCAT errors to readable messages.

SDO abort messages and AL status codes are used to relay slave errors to the user application. This module converts the binary codes to readble text. For the defined error codes see the EtherCAT protocol documentation.

Definition in file ethercatprint.c.


Define Documentation

#define EC_MAXERRORNAME   127

Definition at line 54 of file ethercatprint.c.


Function Documentation

char* ec_ALstatuscode2string ( uint16  ALstatuscode)

Look up text string that belongs to AL status code.

Parameters:
[in]ALstatuscode= AL status code as defined in EtherCAT protocol
Returns:
readable string

Definition at line 211 of file ethercatprint.c.

char* ec_elist2string ( void  )

Look up error in ec_errorlist and convert to text string.

Returns:
readable string

Definition at line 244 of file ethercatprint.c.

char* ec_sdoerror2string ( uint32  sdoerrorcode)

Look up text string that belongs to SDO error code.

Parameters:
[in]sdoerrorcode= SDO error code as defined in EtherCAT protocol
Returns:
readable string

Definition at line 194 of file ethercatprint.c.

char* ec_soeerror2string ( uint16  errorcode)

Look up text string that belongs to SoE error code.

Parameters:
[in]errorcode= AL status code as defined in EtherCAT protocol
Returns:
readable string

Definition at line 228 of file ethercatprint.c.


Variable Documentation

Initial value:
 { {0x0000, "No error"}, {0x0001, "Unspecified error"}, {
    0x0011, "Invalid requested state change"},
                                                     {0x0012, "Unknown requested state"}, {0x0013,
                                                                                           "Bootstrap not supported"},
                                                     {0x0014, "No valid firmware"}, {0x0015,
                                                                                     "Invalid mailbox configuration"},
                                                     {0x0016, "Invalid mailbox configuration"}, {
                                                         0x0017, "Invalid sync manager configuration"},
                                                     {0x0018, "No valid inputs available"},
                                                     {0x0019, "No valid outputs"}, {0x001A, "Synchronization error"}, {
                                                         0x001B, "Sync manager watchdog"},
                                                     {0x001C, "Invalid Sync Manager Types"}, {
                                                         0x001D, "Invalid Output Configuration"},
                                                     {0x001E, "Invalid Input Configuration"}, {
                                                         0x001F, "Invalid Watchdog Configuration"},
                                                     {0x0020, "Slave needs cold start"}, {0x0021, "Slave needs INIT"}, {
                                                         0x0022, "Slave needs PREOP"},
                                                     {0x0023, "Slave needs SAFEOP"}, {
                                                         0x002D, "Invalid Output FMMU Configuration"},
                                                     {0x002E, "Invalid Input FMMU Configuration"}, {
                                                         0x0030, "Invalid DC SYNCH Configuration"},
                                                     {0x0031, "Invalid DC Latch Configuration"}, {0x0032, "PLL Error"},
                                                     {0x0033, "Invalid DC IO Error"}, {0x0034,
                                                                                       "Invalid DC Timeout Error"},
                                                     {0x0042, "MBX_EOE"}, {0x0043, "MBX_COE"}, {0x0044, "MBX_FOE"}, {
                                                         0x0045, "MBX_SOE"},
                                                     {0x004F, "MBX_VOE"}, {0xffff, "Unknown"}}

AL status code list definition

Definition at line 111 of file ethercatprint.c.

Initial value:
 {
    {0x00000000, "No error"}, {0x05030000, "Toggle bit not changed"}, {0x05040000, "SDO protocol timeout"}, {
        0x05040001, "Client/Server command specifier not valid or unknown"},
    {0x05040005, "Out of memory"}, {0x06010000, "Unsupported access to an object"}, {
        0x06010001, "Attempt to read to a write only object"},
    {0x06010002, "Attempt to write to a read only object"}, {0x06020000,
                                                             "The object does not exist in the object directory"},
    {0x06040041, "The object can not be mapped into the PDO"}, {
        0x06040042, "The number and length of the objects to be mapped would exceed the PDO length"},
    {0x06040043, "General parameter incompatibility reason"}, {0x06040047,
                                                               "General internal incompatibility in the device"},
    {0x06060000, "Access failed due to a hardware error"}, {
        0x06070010, "Data type does not match, length of service parameter does not match"},
    {0x06070012, "Data type does not match, length of service parameter too high"}, {
        0x06070013, "Data type does not match, length of service parameter too low"},
    {0x06090011, "Subindex does not exist"}, {0x06090030, "Value range of parameter exceeded (only for write access)"},
    {0x06090031, "Value of parameter written too high"}, {0x06090032, "Value of parameter written too low"}, {
        0x06090036, "Maximum value is less than minimum value"},
    {0x08000000, "General error"}, {0x08000020, "Data cannot be transferred or stored to the application"}, {
        0x08000021, "Data cannot be transferred or stored to the application because of local control"},
    {0x08000022, "Data cannot be transferred or stored to the application because of the present device state"}, {
        0x08000023, "Object dictionary dynamic generation fails or no object dictionary is present"},
    {0xffffffff, "Unknown"}}

SDO error list definition

Definition at line 86 of file ethercatprint.c.

SoE error list definition

Definition at line 140 of file ethercatprint.c.

Definition at line 83 of file ethercatprint.c.



youbot_driver
Author(s): Jan Paulus
autogenerated on Mon Oct 6 2014 09:08:03