nn::uds::CTR::Initialize Functionnn::Result Initialize( nn::os::Event * pStatusUpdateEvent, void * receiveBuffer, const size_t bufferSize, nn::cfg::UserName * pUserName );
| Name | Description | |
|---|---|---|
| out | pStatusUpdateEvent |
Event used to notify about connection state updates. This is initialized as an auto-reset event within the library. |
| in | receiveBuffer |
Pointer indicating the head of the receive buffer used by the UDS library. Specify a buffer aligned to 4096 bytes. Device memory cannot be used. Access to the memory region specified by the buffer is prohibited until the Finalize function's execution is complete. |
| in | bufferSize |
Size of the receive buffer. Specify a value that is a multiple of 4096. |
| in | pUserName |
Specifies the user name. Handle user names according to UGC guidelines. System settings are used if NULL. |
Result values listed below.| Value | Description |
|---|---|
Result::IsSuccess |
Initialization successful. |
ResultAlreadyOccupiedWirelessDevice |
Communication is already taking place. New UDS communication cannot begin. |
ResultOutOfResource |
System resources are insufficient. |
ResultWirelessOff |
Wireless-disabled mode. |
Initializes the UDS library. Initialization fails if any other communication features are already in use.
This function may block for a long time because it finalizes communications in the background and the UDS library takes control of the communication device until Finalize is run. Always call the Finalize function to release the communication device after you have finished using the UDS library. Handle the user name given by pUserName according to UGC guidelines. This function is thread-unsafe.
Finalize completes.
CONFIDENTIAL