Rtnl2CreateLinkStatusChangeEvent
Rtnl2CreateLinkStatusChangeEvent creates a Link Status Change event for the specified interface. This event is signaled by the NL2 whenever the link status of the interface changes.
Syntax
BOOL Rtnl2CreateLinkStatusChangeEvent(
[in] RTNL2_HINTERFACE Interface,
[out] HANDLE *pEvent
);
Parameters
[in] Interface
A handle to the interface obtained from Rtnl2OpenInterface.
[out] pEvent
A handle to an event that will be signaled when a link status change occurs.
Return Value
If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.
Possible error codes:
Error code | Meaning |
---|---|
ERROR_NOT_READY |
The calling process has not called Rtnl2Init. |
ERROR_INVALID_PARAMETER |
The supplied interface handle is invalid. |
ERROR_ALREADY_EXISTS |
The calling process has already created a Link Status Change event for this interface. |
RTNL2_ERROR_SERIALIZED_COMMAND_TIMEOUT |
The NL2 process didn’t reply within an acceptable delay. |
RTNL2_ERROR_NO_MORE_COMMUNICATION |
Unable to communicate with the NL2 process. This might be because the NL2 process is not running anymore, or because an application process thread was terminated during a previous call to an NL2 API function. |
Remarks
Important: Although the same application process can open several handles to the same interface, this function can create only one Link Status Change event per interface. The NL2 keeps track of which interface handle has been used to create the Link Status Change event.
Characteristics
Real-time | ||
Deterministic |
No |
|
Local memory usage | ||
Process |
External MSpace usage |
Internal MSpace usage |
System |
No |
Yes. This function will allocate memory for the Event kernel object. |
NL2 process |
No |
Yes. This function will allocate memory for the object handle. |
Calling process |
No |
Yes. This function will allocate memory for the object handle. |
Contiguous memory usage | ||
Usage |
No |
Requirements
Minimum supported version | Header | Library |
---|---|---|
eRTOS 1.0 SDK |
Rtnl2Api.h |
Rtnl2Api.lib |
See Also: