xChannelReset() does NOT wait until a communication channel (protocol stack) is configured.
This is because of the fact that a communication channel can be configured in 2 ways.
- configuration via a database
- configuration via command packets
In case of way 2, an application would have always to wait the complete timeout given in the call to xChannelReset() before it can proceed because
in this case the fieldbus system will never reach the configured state (state RUNNING). By using a default timeout of aprox. 10s (10000ms),
each program start-up would take at least 10 seconds and if multiple cards are used, each additional card would extend the start-up time by the same amount.
The implementation of the application program defines the way how the filedbus system will be configured and therefore the application can decide
if it has to wait or not.
Waiting until a communication channel is completely configured can be done by cyclically calling xChannelInfo() after a xChannelReset().
xChannelInfo() returns an information structure containing the so-called Communication COS Register (ulDeviceCOS). This register value contains
the READY flag (bit 0) and the RUNNING flag (bit 1) of the communication channel.