Make ERROR slave count exceeded unique

feature/soem_140
Andreas Karlsson 2019-05-24 14:05:53 +02:00
parent 7b1ea32343
commit 9c921d8d4e
2 changed files with 7 additions and 5 deletions

View File

@ -142,7 +142,7 @@ int ecx_detect_slaves(ecx_contextt *context)
{
EC_PRINT("Error: too many slaves on network: num_slaves=%d, EC_MAXSLAVE=%d\n",
wkc, EC_MAXSLAVE);
return -2;
return EC_SLAVECOUNTEXCEEDED;
}
}
return wkc;

View File

@ -37,12 +37,14 @@ extern "C"
# define EC_LITTLE_ENDIAN
#endif
/** return value general error */
#define EC_ERROR -3
/** return value no frame returned */
#define EC_NOFRAME -1
#define EC_NOFRAME -1
/** return value unknown frame received */
#define EC_OTHERFRAME -2
#define EC_OTHERFRAME -2
/** return value general error */
#define EC_ERROR -3
/** return value too many slaves */
#define EC_SLAVECOUNTEXCEEDED -4
/** maximum EtherCAT frame length in bytes */
#define EC_MAXECATFRAME 1518
/** maximum EtherCAT LRW frame length in bytes */