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"
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] |
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 EC_MAXERRORNAME 127 |
Definition at line 55 of file ethercatprint.c.
char* ec_ALstatuscode2string | ( | uint16 | ALstatuscode | ) |
Look up text string that belongs to AL status code.
[in] | ALstatuscode | = AL status code as defined in EtherCAT protocol |
Definition at line 279 of file ethercatprint.c.
char* ec_mbxerror2string | ( | uint16 | errorcode | ) |
Look up text string that belongs to MBX error code.
[in] | errorcode | = MBX error code as defined in EtherCAT protocol |
Definition at line 315 of file ethercatprint.c.
char* ec_sdoerror2string | ( | uint32 | sdoerrorcode | ) |
Look up text string that belongs to SDO error code.
[in] | sdoerrorcode | = SDO error code as defined in EtherCAT protocol |
Definition at line 261 of file ethercatprint.c.
char* ec_soeerror2string | ( | uint16 | errorcode | ) |
Look up text string that belongs to SoE error code.
[in] | errorcode | = SoE error code as defined in EtherCAT protocol |
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.
[in] | context | = context struct |
Definition at line 333 of file ethercatprint.c.
AL status code list definition
Definition at line 132 of file ethercatprint.c.
const ec_mbxerrorlist_t ec_mbxerrorlist[] |
{ {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.
const ec_sdoerrorlist_t ec_sdoerrorlist[] |
SDO error list definition
Definition at line 96 of file ethercatprint.c.
const ec_soeerrorlist_t ec_soeerrorlist[] |
SoE error list definition
Definition at line 188 of file ethercatprint.c.
char estring[EC_MAXERRORNAME] |
Definition at line 93 of file ethercatprint.c.