nn::nex::DuplicatedObject::Publish Member Function

Syntax

qBool Publish(
     qUnsignedInt32 uiTimeout = DEFAULT_PUBLISH_TIMEOUT
);

Parameters

Name Description
in uiTimeout Specifies a timeout period (in milliseconds) to wait until the occurrence completes. Must be 0 in single-thread mode. The default value is 500 ms.

Return Values



Value Description
true Returned when creation was successful.
false Returned when creation failed. If this function is called in single-thread mode , and the SYSTEMERROR_GEN_INVALID_WAIT error is signaled if uiTimeout is invalid. If this function is called on a duplicated object on which DeleteMainRef has been called, the SYSTEMERROR_GEN_INVALID_OPERATION error is signaled. When this value is returned, you must call the DeleteMainRef function and delete the duplicated object's main reference.

Description

Publishes an instance of this duplicated object to the stations in the session.

A duplicated object must be created and then published before other stations in the session can detect it.

If you want the duplicated object that you publish to have completely up-to-date datasets when you call this function, set default values after you call the Create function and before you call the Publish function.

Revision History

2012/07/03
Changed the default timeout to 500 ms.
2011/01/27
Initial version.

CONFIDENTIAL