nn::nex::DuplicatedObject::Create Member Function

Syntax

static DuplicatedObject * Create(
     qUnsignedInt32 uiTimeout = =DEFAULT_CREATE_TIMEOUT
);

Parameters

Name Description
in uiTimeout Specifies a timeout period (in ms) to wait until the duplicated object is created. The default value is 500.

Return Values

Returns a pointer to the local instance of the duplicated object that was created.

Value Description
NULL This value is returned in a rare case when the child station could not communicate with the parent station prior to when the duplicated object was initialized after the child station joined the session. If NULL is returned, make sure to destroy the NetZ instance and then exit from the session.

Description

Creates a local instance of a duplicated object.

This function may return NULL. If NULL is returned, immediately destroy the NetZ instance and exit the session.

Normally, a value should be returned immediately and the function should not block. However, in the rare case that a child station could not communicate with the parent station and NULL is returned prior to the completion of the duplicated object initialization after joining a session, the function blocks for the period of time specified by uiTimeout at the maximum.

You can also use this function without blocking by specifying 0 for uiTimeout.

This static function is defined for each duplicated object class created by the Data Definition Language (DDL) compiler. For example, to create an instance of the Avatar class, call the Avatar::Create function. No function named DuplicatedObject::Create is supported.

See Also

Publish, CreateWellKnown

Revision History

2012/07/03
This function can now specify a timeout. Added that there is a rare possibility that a NULL pointer may be returned, in which case it is necessary to destroy the NetZ instance.
2012/01/27
Initial version.

CONFIDENTIAL