C# Class Quickstarts.FormUtils

Defines numerous re-useable utility functions.
Show file Open project: OPCFoundation/UA-.NET Class Usage Examples

Public Methods

Method Description
Browse ( Session session, BrowseDescription nodeToBrowse, bool throwOnError ) : ReferenceDescriptionCollection

Browses the address space and returns the references found.

Browse ( Session session, BrowseDescriptionCollection nodesToBrowse, bool throwOnError ) : ReferenceDescriptionCollection

Browses the address space and returns the references found.

BrowseSuperTypes ( Session session, Opc.Ua.NodeId typeId, bool throwOnError ) : ReferenceDescriptionCollection

Browses the address space and returns all of the supertypes of the specified type node.

CollectFieldsForInstance ( Session session, Opc.Ua.NodeId instanceId, SimpleAttributeOperandCollection fields, List fieldNodeIds ) : void

Collects the fields for the instance.

CollectFieldsForType ( Session session, Opc.Ua.NodeId typeId, SimpleAttributeOperandCollection fields, List fieldNodeIds ) : void

Collects the fields for the type.

ConstructEvent ( Session session, MonitoredItem monitoredItem, EventFieldList notification, Type>.Dictionary knownEventTypes, NodeId>.Dictionary eventTypeMappings ) : BaseEventState

Constructs an event object from a notification.

DiscoverServers ( ApplicationConfiguration configuration ) : IList

Discovers the servers on the local machine.

FindEventType ( MonitoredItem monitoredItem, EventFieldList notification ) : Opc.Ua.NodeId

Finds the type of the event for the notification.

GetAttributeDisplayText ( Session session, uint attributeId, Variant value ) : string

Gets the display text for the specified attribute.

SelectEndpoint ( string discoveryUrl, bool useSecurity ) : EndpointDescription

Finds the endpoint that best matches the current settings.

TranslateBrowsePaths ( Session session, Opc.Ua.NodeId startNodeId, Opc.Ua.NamespaceTable namespacesUris ) : List

Returns the node ids for a set of relative paths.

Private Methods

Method Description
CollectFields ( Session session, Opc.Ua.NodeId nodeId, QualifiedNameCollection parentPath, SimpleAttributeOperandCollection fields, List fieldNodeIds, QualifiedNameCollection>.Dictionary foundNodes ) : void

Collects the fields for the instance node.

ContainsPath ( SimpleAttributeOperandCollection selectClause, QualifiedNameCollection browsePath ) : int

Determines whether the specified select clause contains the browse path.

GetAccessLevelDisplayText ( byte accessLevel ) : string

Gets the display text for the access level attribute.

GetEventNotifierDisplayText ( byte eventNotifier ) : string

Gets the display text for the event notifier attribute.

GetValueRankDisplayText ( int valueRank ) : string

Gets the display text for the value rank attribute.

Method Details

Browse() public static method

Browses the address space and returns the references found.
public static Browse ( Session session, BrowseDescription nodeToBrowse, bool throwOnError ) : ReferenceDescriptionCollection
session Opc.Ua.Client.Session The session.
nodeToBrowse Opc.Ua.BrowseDescription The NodeId for the starting node.
throwOnError bool if set to true a exception will be thrown on an error.
return ReferenceDescriptionCollection

Browse() public static method

Browses the address space and returns the references found.
public static Browse ( Session session, BrowseDescriptionCollection nodesToBrowse, bool throwOnError ) : ReferenceDescriptionCollection
session Opc.Ua.Client.Session The session.
nodesToBrowse BrowseDescriptionCollection The set of browse operations to perform.
throwOnError bool if set to true a exception will be thrown on an error.
return ReferenceDescriptionCollection

BrowseSuperTypes() public static method

Browses the address space and returns all of the supertypes of the specified type node.
public static BrowseSuperTypes ( Session session, Opc.Ua.NodeId typeId, bool throwOnError ) : ReferenceDescriptionCollection
session Opc.Ua.Client.Session The session.
typeId Opc.Ua.NodeId The NodeId for a type node in the address space.
throwOnError bool if set to true a exception will be thrown on an error.
return ReferenceDescriptionCollection

CollectFieldsForInstance() public static method

Collects the fields for the instance.
public static CollectFieldsForInstance ( Session session, Opc.Ua.NodeId instanceId, SimpleAttributeOperandCollection fields, List fieldNodeIds ) : void
session Opc.Ua.Client.Session The session.
instanceId Opc.Ua.NodeId
fields SimpleAttributeOperandCollection The fields.
fieldNodeIds List The node id for the declaration of the field.
return void

CollectFieldsForType() public static method

Collects the fields for the type.
public static CollectFieldsForType ( Session session, Opc.Ua.NodeId typeId, SimpleAttributeOperandCollection fields, List fieldNodeIds ) : void
session Opc.Ua.Client.Session The session.
typeId Opc.Ua.NodeId
fields SimpleAttributeOperandCollection The fields.
fieldNodeIds List The node id for the declaration of the field.
return void

ConstructEvent() public static method

Constructs an event object from a notification.
public static ConstructEvent ( Session session, MonitoredItem monitoredItem, EventFieldList notification, Type>.Dictionary knownEventTypes, NodeId>.Dictionary eventTypeMappings ) : BaseEventState
session Opc.Ua.Client.Session The session.
monitoredItem Opc.Ua.Client.MonitoredItem The monitored item that produced the notification.
notification Opc.Ua.EventFieldList The notification.
knownEventTypes Type>.Dictionary The known event types.
eventTypeMappings NodeId>.Dictionary Mapping between event types and known event types.
return Opc.Ua.BaseEventState

DiscoverServers() public static method

Discovers the servers on the local machine.
public static DiscoverServers ( ApplicationConfiguration configuration ) : IList
configuration ApplicationConfiguration The configuration.
return IList

FindEventType() public static method

Finds the type of the event for the notification.
public static FindEventType ( MonitoredItem monitoredItem, EventFieldList notification ) : Opc.Ua.NodeId
monitoredItem Opc.Ua.Client.MonitoredItem The monitored item.
notification Opc.Ua.EventFieldList The notification.
return Opc.Ua.NodeId

GetAttributeDisplayText() public static method

Gets the display text for the specified attribute.
public static GetAttributeDisplayText ( Session session, uint attributeId, Variant value ) : string
session Opc.Ua.Client.Session The currently active session.
attributeId uint The id of the attribute.
value Variant The value of the attribute.
return string

SelectEndpoint() public static method

Finds the endpoint that best matches the current settings.
public static SelectEndpoint ( string discoveryUrl, bool useSecurity ) : EndpointDescription
discoveryUrl string The discovery URL.
useSecurity bool if set to true select an endpoint that uses security.
return Opc.Ua.EndpointDescription

TranslateBrowsePaths() public static method

Returns the node ids for a set of relative paths.
public static TranslateBrowsePaths ( Session session, Opc.Ua.NodeId startNodeId, Opc.Ua.NamespaceTable namespacesUris ) : List
session Opc.Ua.Client.Session An open session with the server to use.
startNodeId Opc.Ua.NodeId The starting node for the relative paths.
namespacesUris Opc.Ua.NamespaceTable The namespace URIs referenced by the relative paths.
return List