OpenTP1 Version 7 Programming Guide

[Contents][Index][Back][Next]

7.2.3 Acquisition of OpenTP1 node identifier

By calling a function from a UAP, all node identifiers in the multinode area or subarea can be acquired. Through the acquisition of node identifiers, the UAP can recognizes which OpenTP1 nodes are contained in the multinode area or subarea.

Whether to acquire all node identifiers in succession or to acquire the node identifier of only the specified OpenTP1 node can be specified.

Organization of this subsection
(1) How to acquire node identifiers of all OpenTP1 nodes in succession
(2) How to acquire the node identifier of only the local OpenTP1 node

(1) How to acquire node identifiers of all OpenTP1 nodes in succession

The node identifiers of all OpenTP1 nodes in each multinode area or subarea are acquired. To acquire node identifiers in succession, call the function dc_adm_get_nodeconf_begin() with the area specified. This function returns the number of OpenTP1 nodes in the specified area. Then, call the function dc_adm_get_nodeconf_next() to acquire the OpenTP1 node identifiers. Continue using the function dc_adm_get_nodeconf_next() until the node identifier of the last candidate OpenTP1 node is acquired. Finally, issue the function dc_adm_get_nodeconf_done() to terminate status acquisition.

Once the function dc_adm_get_nodeconf_begin() is called, it cannot be called (that is, the function dc_adm_get_nodeconf_begin() cannot be nested).

The figure below shows the procedure for acquiring OpenTP1 node identifiers in succession.

Figure 7-4 Procedure for acquiring OpenTP1 node identifiers in succession

[Figure]

(2) How to acquire the node identifier of only the local OpenTP1 node

To acquire the node identifier of only the OpenTP1 node running the UAP, call the function dc_adm_get_node_id(). This function returns the node identifier of the local OpenTP1 node.