Previous | Table of Contents | Next |
//File: DAISNode.idl #ifndef _DAIS_NODE_IDL #define _DAIS_NODE_IDL #pragma prefix "omg.org" #include <DAISCommon.idl>
module DAIS { module Node {
struct Description
{ |
|||||
ResourceID | id; | ||||
ResourceID | parent; | ||||
string | label; | ||||
string | descrip; | ||||
ResourceID | type; | ||||
boolean | is_leaf; | ||||
}; |
typedef sequence< Description > Descriptions;
interface Iterator { boolean next_n (
in | unsigned long | n, | |||
out | Descriptions | nodes | |||
); |
void reset(); Iterator clone(); void destroy();
};
interface IHome
{ exception UnknownResourceID {string reason;}; exception InvalidFilter {string reason;}; exception UnkownTypeID {string reason;};
Description find ( in ResourceID node ) raises (UnknownResourceID);
Descriptions find_each ( in ResourceIDs nodes ) raises (UnknownResourceID);
Iterator find_by_parent ( in ResourceID node, in string filter_criteria
) raises (UnknownResourceID, InvalidFilter);
Iterator find_by_type ( in ResourceID node, in string filter_criteria, in ResourceIDs type_filter
) raises (UnknownResourceID, InvalidFilter, UnknownTypeID);
Strings get_pathnames ( in ResourceIDs nodes );
ResourceIDs get_ids ( in Strings pathnames
); };};}; #endif // _DAIS_NODE_IDL
Description
A struct describing a node.
Member | Description | ||||
id | The identification of this node. | ||||
parent | The identification of the parent node. | ||||
label | The label (single level designation) of the node. | ||||
descrip | A descriptive text for the node. | ||||
type | A reference to the type of the node. | ||||
is_leaf | Indicate if the node is a leaf (i.e., it has no child nodes). |
Iterator
Refer to Section 3.1.6, “Iterator Methods IDL,? on page 3-10. This interface corresponds
to the OPC interface EnumString with the difference that the Iterator returns the Description struct instead of a string.
IHome
An interface used for browsing nodes. The interface corresponds to the IOPCBrowseServerAddressSpace with the BrowseFilterType
set to OPC_BRANCH or the IOPCEventAreaBrowser. A major difference to OPC is that the server does not provide a cursor for
clients. Instead clients have to provide the browse position in each call.
UnknownResourceID
An exception telling that the ResourceID is unknown. For methods taking a sequence of resource ids the first found unknown
id is reported. The likely reason behind this exception is some misunderstanding between the server and client code due to
a programming error.
InvalidFilter
An exception telling the filter_criteria string is not correct. The likely reason behind this exception is an erroneously
entered string.
UnknownTypeID
An exception telling one or more TypeIDs does not exist.
find()
For a given node, return information about that node.
Parameter |
Description |
||||
node | A node identification. | ||||
return | The node description. |
find_each ()
For a sequence of nodes, return information about each node.
Parameter |
Description |
||||
nodes | A sequence of node identifications. | ||||
return | An iterator holding the node descriptions. |
find_by_parent ()
For a given node, return all child nodes at that node. Hence to reach leaf nodes using this method repeated calls must be
made for each level. This corresponds to the OPC method BrowseOPCItemIDs with the parameter dwBrowseFilterType set to OPC_BRANCH..
Parameter | Description | ||||
node | The parent node identification. | ||||
filter_criteria | A server specific filter string. This is entirely free format and may be entered by the user via a text field. An empty string indicates no filtering. The filter selects nodes with a pathname matching the filter criteria. For a description of the filter refer to Section 3.1.11, “Filter Definitions,? on page 3-25. | ||||
return | An iterator holding the child node descriptions. |
find_by_type()
For a sub-tree given by the node parameter, return all child nodes of the specified type. This will return all leaf nodes
under the given sub-tree root node. There is no
corresponding operation in OPC. Refer to Section 4.2.4.1, “DAIS::Item Overview,? on
page 4-15 for a description of how item browsing is mapped to OPC.
filter_criteriatype_filterreturn |
|||||
A server specific filter string. This is entirely free format and may be entered by the user via a text field. An empty string indicates no filtering. The filter selects nodes with a pathname matching the filter criteria. For a description of the filter refer to Section 3.1.11, “Filter Definitions,? on page 3-25. | |||||
A list of TypeIDs. Nodes matching any of the TypeIDs will be held by the returned iterator. | |||||
An iterator holding descriptions for the found nodes. |
get_pathnames()
Translate a sequence of node identifications to the corresponding sequence of pathnames. If a node fails to translate to a
pathname (due to an unknown node identification), the corresponding pathname is an empty string.
Parameter |
Description |
||||
nodes | The sequence of nodes. | ||||
return | The corresponding sequence of pathnames. |
get_ids()
Translate a sequence of pathnames to the corresponding sequence of node identifications. If a pathname fails to translate
to a node identification (due to an unrecognized pathname), the corresponding node identification is NULL.
Parameter |
Description |
||||
pathnames | The sequence of pathnames. | ||||
return | The corresponding sequence of node identifications. |