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

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

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

Go to the source code of this file.

Classes

struct  ec_ALstatuscodelist_t
struct  ec_mbxerrorlist_t
struct  ec_sdoerrorlist_t
struct  ec_soeerrorlist_t

Defines

#define EC_MAXERRORNAME   127

Functions

char * ec_ALstatuscode2string (uint16 ALstatuscode)
char * ec_mbxerror2string (uint16 errorcode)
char * ec_sdoerror2string (uint32 sdoerrorcode)
char * ec_soeerror2string (uint16 errorcode)
char * ecx_elist2string (ecx_contextt *context)

Variables

const ec_ALstatuscodelist_t ec_ALstatuscodelist []
const ec_mbxerrorlist_t ec_mbxerrorlist []
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 55 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 279 of file ethercatprint.c.

char* ec_mbxerror2string ( uint16  errorcode)

Look up text string that belongs to MBX error code.

Parameters:
[in]errorcode= MBX error code as defined in EtherCAT protocol
Returns:
readable string

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

char* ec_soeerror2string ( uint16  errorcode)

Look up text string that belongs to SoE error code.

Parameters:
[in]errorcode= SoE error code as defined in EtherCAT protocol
Returns:
readable string

Definition at line 297 of file ethercatprint.c.

char* ecx_elist2string ( ecx_contextt context)

Look up error in ec_errorlist and convert to text string.

Parameters:
[in]context= context struct
Returns:
readable string

Definition at line 333 of file ethercatprint.c.


Variable Documentation

AL status code list definition

Definition at line 132 of file ethercatprint.c.

Initial value:
 {
   {0x0000, "No error" },
   {0x0001, "Syntax of 6 octet Mailbox Header is wrong" },
   {0x0002, "The mailbox protocol is not supported" },
   {0x0003, "Channel Field contains wrong value"},
   {0x0004, "The service is no supported"},
   {0x0005, "Invalid mailbox header"},
   {0x0006, "Length of received mailbox data is too short"},
   {0x0007, "No more memory in slave"},
   {0x0008, "The lenght of data is inconsistent"},
   {0xffff, "Unknown"}
}

MBX error list definition

Definition at line 243 of file ethercatprint.c.

SDO error list definition

Definition at line 96 of file ethercatprint.c.

SoE error list definition

Definition at line 188 of file ethercatprint.c.

Definition at line 93 of file ethercatprint.c.



ethercat_soem
Author(s): Arthur Ketels, M.J.G. van de Molengraft
autogenerated on Wed Aug 26 2015 11:32:40