C# Класс Quickstarts.FormUtils

Defines numerous re-useable utility functions.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

Browse() публичный статический Метод

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.
Результат ReferenceDescriptionCollection

Browse() публичный статический Метод

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.
Результат ReferenceDescriptionCollection

BrowseSuperTypes() публичный статический Метод

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.
Результат ReferenceDescriptionCollection

CollectFieldsForInstance() публичный статический Метод

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.
Результат void

CollectFieldsForType() публичный статический Метод

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.
Результат void

ConstructEvent() публичный статический Метод

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.
Результат Opc.Ua.BaseEventState

DiscoverServers() публичный статический Метод

Discovers the servers on the local machine.
public static DiscoverServers ( ApplicationConfiguration configuration ) : IList
configuration ApplicationConfiguration The configuration.
Результат IList

FindEventType() публичный статический Метод

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.
Результат Opc.Ua.NodeId

GetAttributeDisplayText() публичный статический Метод

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.
Результат string

SelectEndpoint() публичный статический Метод

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.
Результат Opc.Ua.EndpointDescription

TranslateBrowsePaths() публичный статический Метод

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.
Результат List