parent
49810a5adf
commit
c892921d7e
@ -291,18 +291,14 @@ char* ec_mbxerror2string( uint16 errorcode)
|
||||
return (char *) ec_mbxerrorlist[i].errordescription;
|
||||
}
|
||||
|
||||
/** Look up error in ec_errorlist and convert to text string.
|
||||
/** Convert an error to text string.
|
||||
*
|
||||
* @param[in] context = context struct
|
||||
* @param[in] Ec = Struct describing the error.
|
||||
* @return readable string
|
||||
*/
|
||||
char* ecx_elist2string(ecx_contextt *context)
|
||||
char* ecx_err2string(const ec_errort Ec)
|
||||
{
|
||||
ec_errort Ec;
|
||||
char timestr[20];
|
||||
|
||||
if (ecx_poperror(context, &Ec))
|
||||
{
|
||||
sprintf(timestr, "Time:%12.3f", Ec.Time.sec + (Ec.Time.usec / 1000000.0) );
|
||||
switch (Ec.Etype)
|
||||
{
|
||||
@ -350,6 +346,20 @@ char* ecx_elist2string(ecx_contextt *context)
|
||||
}
|
||||
}
|
||||
return (char*) estring;
|
||||
}
|
||||
|
||||
/** Look up error in ec_errorlist and convert to text string.
|
||||
*
|
||||
* @param[in] context = context struct
|
||||
* @return readable string
|
||||
*/
|
||||
char* ecx_elist2string(ecx_contextt *context)
|
||||
{
|
||||
ec_errort Ec;
|
||||
|
||||
if (ecx_poperror(context, &Ec))
|
||||
{
|
||||
return ecx_err2string(Ec);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -19,6 +19,8 @@ extern "C"
|
||||
char* ec_sdoerror2string( uint32 sdoerrorcode);
|
||||
char* ec_ALstatuscode2string( uint16 ALstatuscode);
|
||||
char* ec_soeerror2string( uint16 errorcode);
|
||||
char* ec_mbxerror2string( uint16 errorcode);
|
||||
char* ecx_err2string(const ec_errort Ec);
|
||||
char* ecx_elist2string(ecx_contextt *context);
|
||||
|
||||
#ifdef EC_VER1
|
||||
|
Loading…
x
Reference in New Issue
Block a user