C# Class Opc.Ua.ServerTest.SubscribeTest

Browses all of the nodes in the hierarchies.
Inheritance: TestBase
ファイルを表示 Open project: OPCFoundation/UA-.NET Class Usage Examples

Public Methods

Method Description
Run ( ServerTestCase testcase, int iteration ) : bool

Runs the test

SubscribeTest ( Session session, ServerTestConfiguration configuration, ReportMessageEventHandler reportMessage, ReportProgressEventHandler reportProgress, TestBase template ) : System

Creates the test object.

Private Methods

Method Description
AddMonitoredItems ( Node node, MonitoredItemCreateRequestCollection itemsToCreate ) : void

Adds the MonitoredItems to the request collection.

BeginPublish ( ) : void

Sends a publish request.

CreateMonitoredItems ( Subscription subscription, MonitoredItemCreateRequestCollection itemsToCreate, List monitoredItems ) : bool

Creates the monitored items.

CreateSubscription ( double publishingInterval, uint lifetimeCount, uint keepAliveCount, uint maxNotificationsPerPublish, bool publishingEnabled, byte priority ) : bool

Creates a subscription.

DeleteMonitoredItems ( Subscription subscription, List monitoredItems ) : bool

Deletes the monitored items.

DeleteSubscriptions ( ) : bool

Deletes all of the active subscriptions.

DoCreateItemsTest ( ) : bool

Creates subscription, adds items and verifies that the initial update arrives.

DoKeepAliveTest ( ) : bool

Reads an verifies all of the nodes.

DoPublishingIntervalTest ( ) : bool

Reads an verifies all of the nodes.

Find ( uint subscriptionId ) : Subscription

Finds the subscription.

GetAcknowledgements ( ) : SubscriptionAcknowledgementCollection

Returns the acknowledgements to send to the server with the publish.

HaltTestOnError ( Exception e, string format ) : void

Halts the test after an error occurred.

ModifySubscription ( Subscription subscription, double publishingInterval ) : bool

Sets the publishing enable state for the subscriptions.

OnPublishComplete ( IAsyncResult result ) : void

Called when a publish request completes.

OnPublishComplete ( object state ) : void

Called when a publish request completes.

SaveAcknowledgement ( uint subscriptionId, uint sequenceNumber ) : void

Save the acknowledgement to send to the server with the publish.

SetPublishingEnabled ( bool enabled ) : bool

Sets the publishing enable state for the subscriptions.

Subscribe ( Subscription subscription, MonitoredItemCreateRequestCollection itemsToCreate ) : bool

Adds the items to subscription. Verifies the initial update.

ToogleDisabledState ( Subscription subscription, List monitoredItems ) : bool

Toggles the monitoring mode for the items.

VerifyInitialDataChange ( Subscription subscription, DataChangeNotification notification, System.DateTime receiveTime, IList monitoredItems, int &totalCount, MonitoredItem>.Dictionary updatedItems ) : bool

Verifies that the initial data change was received.

VerifyInitialDataChange ( Subscription subscription, IList monitoredItems, bool afterDisable ) : bool

Verifies that the initial data change was received.

VerifyKeepAliveTestResults ( Subscription subscription ) : bool

Verifies the keep alive results for the subscription.

VerifyKeepAliveTestResults ( Subscription subscription, PublishingState state, bool isFirst ) : bool

Verifies the keep alive test results.

VerifyPublishResponse ( ResponseHeader responseHeader, Subscription subscription, UInt32Collection availableSequenceNumbers, bool moreNotifications, NotificationMessage notificationMessage, StatusCodeCollection results, DiagnosticInfoCollection diagnosticInfos ) : bool

Verifies the result of a publish

WaitForUpdates ( Subscription subscription, List monitoredItems, bool afterDisable ) : bool

Waits for updates.

Method Details

Run() public method

Runs the test
public Run ( ServerTestCase testcase, int iteration ) : bool
testcase ServerTestCase
iteration int
return bool

SubscribeTest() public method

Creates the test object.
public SubscribeTest ( Session session, ServerTestConfiguration configuration, ReportMessageEventHandler reportMessage, ReportProgressEventHandler reportProgress, TestBase template ) : System
session Opc.Ua.Client.Session
configuration ServerTestConfiguration
reportMessage ReportMessageEventHandler
reportProgress ReportProgressEventHandler
template TestBase
return System