C# Class Opc.Ua.Client.Controls.ClientUtils

Mostrar archivo Open project: OPCFoundation/UA-.NET Class Usage Examples

Public Properties

Property Type Description
ImageList System.Windows.Forms.ImageList

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.

Browse ( Session session, ViewDescription view, BrowseDescription nodeToBrowse, bool throwOnError ) : ReferenceDescriptionCollection

Browses the address space and returns the references found.

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

Browses the address space and returns the references found.

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

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

ClientUtils ( ) : System

Initializes a new instance of the ClientUtils class.

CollectInstanceDeclarationsForType ( Session session, NodeId typeId ) : List

Collects the instance declarations for a type.

CollectInstanceDeclarationsForType ( Session session, NodeId typeId, bool includeSupertypes ) : List

Collects the instance declarations for a 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 ) : NodeId

Finds the type of the event for the notification.

GetAccessLevelDisplayText ( byte accessLevel ) : string

Gets the display text for the access level attribute.

GetAppIcon ( ) : System.Drawing.Icon

Returns the application icon.

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

Gets the display text for the specified attribute.

GetEventNotifierDisplayText ( byte eventNotifier ) : string

Gets the display text for the event notifier attribute.

GetImageIndex ( Session session, NodeClass nodeClass, ExpandedNodeId typeDefinitionId, bool selected ) : int

Returns an image index for the specified attribute.

GetImageIndex ( bool isOutputArgument, object value ) : int

Returns an image index for the specified method argument.

GetImageIndex ( uint attributeId, object value ) : int

Returns an image index for the specified attribute.

GetValueRankDisplayText ( int valueRank ) : string

Gets the display text for the value rank attribute.

HandleException ( string caption, Exception e ) : void

Handles an exception.

SelectEndpoint ( string discoveryUrl, bool useSecurity ) : EndpointDescription

Finds the endpoint that best matches the current settings.

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

Returns the node ids for a set of relative paths.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

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

Collects the fields for the instance node.

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

Collects the fields for the instance.

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

Collects the fields for the type.

CollectInstanceDeclarations ( Session session, NodeId typeId, InstanceDeclaration parent, List instances, InstanceDeclaration>.IDictionary map ) : void

Collects the fields for the instance node.

ContainsPath ( SimpleAttributeOperandCollection selectClause, QualifiedNameCollection browsePath ) : int

Determines whether the specified select clause contains the browse path.

FindTargetOfReference ( Session session, List nodeIds, NodeId referenceTypeId, bool throwOnError ) : List

Finds the targets for the specified reference.

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

UpdateInstanceDescriptions ( Session session, List instances, bool throwOnError ) : void

Finds the targets for the specified reference.

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 Session The session.
nodeToBrowse 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 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

Browse() public static method

Browses the address space and returns the references found.
public static Browse ( Session session, ViewDescription view, BrowseDescription nodeToBrowse, bool throwOnError ) : ReferenceDescriptionCollection
session Session
view ViewDescription
nodeToBrowse BrowseDescription
throwOnError bool
return ReferenceDescriptionCollection

Browse() public static method

Browses the address space and returns the references found.
public static Browse ( Session session, ViewDescription view, BrowseDescriptionCollection nodesToBrowse, bool throwOnError ) : ReferenceDescriptionCollection
session Session
view ViewDescription
nodesToBrowse BrowseDescriptionCollection
throwOnError bool
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, NodeId typeId, bool throwOnError ) : ReferenceDescriptionCollection
session Session The session.
typeId 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

ClientUtils() public method

Initializes a new instance of the ClientUtils class.
public ClientUtils ( ) : System
return System

CollectInstanceDeclarationsForType() public static method

Collects the instance declarations for a type.
public static CollectInstanceDeclarationsForType ( Session session, NodeId typeId ) : List
session Session
typeId NodeId
return List

CollectInstanceDeclarationsForType() public static method

Collects the instance declarations for a type.
public static CollectInstanceDeclarationsForType ( Session session, NodeId typeId, bool includeSupertypes ) : List
session Session
typeId NodeId
includeSupertypes bool
return List

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 Session The session.
monitoredItem MonitoredItem The monitored item that produced the notification.
notification EventFieldList The notification.
knownEventTypes Type>.Dictionary The known event types.
eventTypeMappings NodeId>.Dictionary Mapping between event types and known event types.
return BaseEventState

DiscoverServers() public static method

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

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

FindEventType() public static method

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

GetAccessLevelDisplayText() public static method

Gets the display text for the access level attribute.
public static GetAccessLevelDisplayText ( byte accessLevel ) : string
accessLevel byte The access level.
return string

GetAppIcon() public static method

Returns the application icon.
public static GetAppIcon ( ) : System.Drawing.Icon
return System.Drawing.Icon

GetAttributeDisplayText() public static method

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

GetEventNotifierDisplayText() public static method

Gets the display text for the event notifier attribute.
public static GetEventNotifierDisplayText ( byte eventNotifier ) : string
eventNotifier byte The event notifier.
return string

GetImageIndex() public static method

Returns an image index for the specified attribute.
public static GetImageIndex ( Session session, NodeClass nodeClass, ExpandedNodeId typeDefinitionId, bool selected ) : int
session Session
nodeClass NodeClass
typeDefinitionId ExpandedNodeId
selected bool
return int

GetImageIndex() public static method

Returns an image index for the specified method argument.
public static GetImageIndex ( bool isOutputArgument, object value ) : int
isOutputArgument bool
value object
return int

GetImageIndex() public static method

Returns an image index for the specified attribute.
public static GetImageIndex ( uint attributeId, object value ) : int
attributeId uint
value object
return int

GetValueRankDisplayText() public static method

Gets the display text for the value rank attribute.
public static GetValueRankDisplayText ( int valueRank ) : string
valueRank int The value rank.
return string

HandleException() public static method

Handles an exception.
public static HandleException ( string caption, Exception e ) : void
caption string
e Exception
return void

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 EndpointDescription

TranslateBrowsePaths() public static method

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

Property Details

ImageList public_oe property

A list of shared images for controls.
public System.Windows.Forms.ImageList ImageList
return System.Windows.Forms.ImageList