TestWaitForEthernetLinkStatus
Valid for: CANoe DE • CANoe4SW DEFunction Syntax
long TestWaitForEthernetLinkStatus(long channel, long status, dword aTimeout); // form 1long TestWaitForEthernetLinkStatus(long channel, Int64 hwChannel, long status, dword aTimeout); // form 2long TestWaitForEthernetLinkStatus(ethernetport hwport, long status, dword aTimeout); // form 3
Description
Waits for the occurrence of the specified Ethernet link status. Should the Ethernet link status not occur before the expiration of the time aTimeout, the wait condition is resolved nevertheless. If the Ethernet link has already the expected state, the function returns immediately with return value 1.Parameters
-
channel: Ethernet channel number.
Value range: 1..32 -
hwChannel: Ethernet hardware channel number.
Value range: 1..64 - hwPort: Hardware port qualifier.
-
Status: Wait for this status:
- 0 = link down
- 1 = link up
- aTimeout: Maximum time that should be waited [ms] (Transmission of 0: no timeout controlling).
Return Values
- -2: Resume due to constraint violation
- -1: General error, for example, functionality is not available
- 0: Resume due to timeout
- 1: Resume due to event occurred