Rtnl2Init
Rtnl2Init registers the current process as an NL2 client.
Syntax
BOOL Rtnl2Init(
VOID
);
Parameters
None
Return Value
If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.
The possible error codes are listed below:
Error code | Meaning |
---|---|
ERROR_ALREADY_EXISTS |
Rtnl2Init was already called. |
RTNL2_ERROR_NO_MORE_COMMUNICATION |
Can’t communicate with the NL2 process. This might be because the NL2 process is not running, or because one thread of the application process was terminated during a previous call to an NL2 API function. |
RTNL2_ERROR_NO_MEMORY |
Memory allocation failed. |
RTNL2_ERROR_STOPPED |
The NL2 process is not running. |
RTNL2_ERROR_TOO_MANY_ATTACHED_PROCESSES |
There are already too many application processes connected to the NL2 process. The maximum number of simultaneously connected NL2 clients is 50. |
Remarks
This function must be called once by each process that needs to interact with the NL2.
Characteristics
Real-time | ||
Deterministic |
No |
|
Local memory usage | ||
Process |
External MSpace usage |
Internal MSpace usage |
System |
Yes. This function will allocate a shared memory region to communicate with the NL2 process. |
Yes. This function will allocate memory for the kernel objects needed to communicate with the NL2 process. |
NL2 process |
No |
Yes. This function will allocate memory for the handles to the kernel objects created by Rtnl2Api.edll. |
Calling process |
No |
Yes. This function will allocate memory for the handles to the kernel objects created by Rtnl2.eRTOS at startup. |
Contiguous memory usage | ||
Usage |
No |
Requirements
Minimum supported version | Header | Library |
---|---|---|
eRTOS 1.0 SDK |
Rtnl2Api.h |
Rtnl2Api.lib |