ethercatprint.c File Reference

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

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

Go to the source code of this file.

Data Structures

struct  ec_sdoerrorlist_t
 SDO error list type definition. More...
struct  ec_ALstatuscodelist_t
 AL status code list type definition. More...
struct  ec_soeerrorlist_t
 SoE error list type definition. More...

Defines

#define EC_MAXERRORNAME   127

Functions

char * ec_sdoerror2string (uint32 sdoerrorcode)
 Look up text string that belongs to SDO error code.
char * ec_ALstatuscode2string (uint16 ALstatuscode)
 Look up text string that belongs to AL status code.
char * ec_soeerror2string (uint16 errorcode)
 Look up text string that belongs to SoE error code.
char * ec_elist2string (void)
 Look up error in ec_errorlist and convert to text string.

Variables

char estring [EC_MAXERRORNAME]
const ec_sdoerrorlist_t ec_sdoerrorlist []
 SDO error list definition.
const ec_ALstatuscodelist_t ec_ALstatuscodelist []
 AL status code list definition.
const ec_soeerrorlist_t ec_soeerrorlist []
 SoE error list definition.

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 234 of file ethercatprint.c.

Here is the caller graph for this function:

char* ec_elist2string ( void   ) 

Look up error in ec_errorlist and convert to text string.

Returns:
readable string

Definition at line 271 of file ethercatprint.c.

Here is the call graph for this function:

Here is the caller graph for this function:

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 215 of file ethercatprint.c.

Here is the caller graph for this function:

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 253 of file ethercatprint.c.

Here is the caller graph for this function:


Variable Documentation

AL status code list definition.

Definition at line 118 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 156 of file ethercatprint.c.

char estring[EC_MAXERRORNAME]

Definition at line 83 of file ethercatprint.c.

Generated by  doxygen 1.6.3