nn::rdt::CTR::Sender::Initialize Member Function

Syntax

nn::Result Initialize(
     const SenderConfig & config
);

Arguments

Name Description
in config Structure that contains the initialization parameters. See SenderConfig for more details.

Return Values

Returns the result of initialization. Specifically, the value of the nn::Result::IsSuccess function, ResultNullPointer, ResultInvalidSize and ResultAlreadyInitialized might be returned, as well as other result codes that can be returned by the UDS API.

Description

Initializes an instance.

If initialization succeeds, two nn::uds::CTR::EndpointDescriptor objects are consumed implicitly within this function. If initialization fails, the function returns without consuming any nn::uds::CTR::EndpointDescriptor objects. The memory that is passed to the instance during this call must remain allocated until Finalize is called.

Internally, nn::uds::CTR::Attach is called implicitly with nn::uds::CTR::ATTACH_BUFFER_SIZE_DEFAULT specified for the size of the receive buffer. Because nn::uds::CTR::Attach utilizes the buffer passed to the nn::uds::CTR::Initialize function, if the application did not give a buffer of sufficient size to nn::uds::CTR::Initialize the function will return nn::uds::CTR::ResultOutOfResource and initialization will fail.

Revision History

2011/06/09
Added a note that internally the nn::uds::CTR::Attach function is called implicitly.
2010/06/14
Initial version.

CONFIDENTIAL