nn::uds::CTR::Initialize Function

Syntax

nn::Result Initialize(
     nn::os::Event * pStatusUpdateEvent,
     void * receiveBuffer,
     const size_t bufferSize
);

Arguments

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.

Return Values

Returns the function's execution result. Returns one of the Result values listed below.
Value Description
ResultSuccess Initialization successful.
ResultAlreadyOccupiedWirelessDevice Communication is already taking place. New UDS communication cannot begin.
ResultOutOfResource System resources are insufficient.
ResultWirelessOff Wireless OFF mode.

Description

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.

Revision History

2010/10/15
Expanded the information on the return values. Revised the Description to make it easier to understand.
2010/09/27
Eliminated text from the description of receiveBuffer related to its purpose and noted that applications are prohibited from accessing the specified memory region until Finalize completes.
2010/09/18
Noted that this function may take some time to complete.
2010/06/14
Initial version.

CONFIDENTIAL