C# Класс Opc.Ua.ServerTest.TestBase

The base class for all tests.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Run ( ServerTestCase testcase, int iteration ) : bool

Runs the test case.

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

Initializes the test with session, configuration and logger.

Защищенные методы

Метод Описание
Browse ( Node node, BrowseDescription nodeToBrowse, ReferenceDescriptionCollection references ) : bool

Browses the node and returns the references found.

CalculateInterval ( System.DateTime start, System.DateTime end ) : double

Calculates the difference between the two times in milliseconds.

CheckCoverage ( int &count ) : bool

Returns true if current node should be included in the test.

GetNodesInHierarchy ( ) : bool

Collects all of the nodes in the hierarchies specified in the configuration file.

GetWriteableVariablesInHierarchy ( ) : bool

Collects all of the nodes in the hierarchies specified in the configuration file.

LockServer ( ) : void

Locks the server.

Log ( Exception e, string format ) : void

Logs a message.

Log ( string format ) : void

Logs a message.

ReportProgress ( double position ) : void

Reports progress.

SetAttributeValue ( Node node, uint attributeId, object attributeValue ) : bool

Stores the attribute value in the object.

UnlockServer ( ) : void

Unlocks the server.

VerifyAttributeConsistency ( Node node ) : bool

Verifies that the node attributes are consistent with each other.

VerifyBadAttribute ( Node node, uint attributeId, StatusCode error ) : bool

Verifies an error returned during an attribute read.

VerifyGoodAttribute ( Node node, uint attributeId, DataValue value ) : bool

Verifies the value returned during an attribute read.

VerifyTimestamps ( Node node, uint attributeId, TimestampsToReturn timestampsToReturn, DataValue value ) : bool

Verifies that the timestamps match the requested filter.

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

Метод Описание
Browse ( Node node, double start, double range ) : bool

Browses the node and verifies the results.

CollectVariables ( INode parent, List variables ) : void

Recursively collects the child variables.

CoverageToModulus ( uint coverage ) : int

Converts a percentage test converage to a modulus.

VerifyVariableBaseConsistency ( IVariableBase node ) : bool

Verifies that the variable or variable type attributes are consistent with each other.

VerifyVariableConsistency ( IVariable node ) : bool

Verifies that the variable attributes are consistent with each other.

VerifyVariableTypeConsistency ( IVariableType node ) : bool

Verifies that the variable type attributes are consistent with each other.

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

Browse() защищенный метод

Browses the node and returns the references found.
protected Browse ( Node node, BrowseDescription nodeToBrowse, ReferenceDescriptionCollection references ) : bool
node Node
nodeToBrowse BrowseDescription
references ReferenceDescriptionCollection
Результат bool

CalculateInterval() защищенный метод

Calculates the difference between the two times in milliseconds.
protected CalculateInterval ( System.DateTime start, System.DateTime end ) : double
start System.DateTime
end System.DateTime
Результат double

CheckCoverage() защищенный метод

Returns true if current node should be included in the test.
protected CheckCoverage ( int &count ) : bool
count int
Результат bool

GetNodesInHierarchy() защищенный метод

Collects all of the nodes in the hierarchies specified in the configuration file.
protected GetNodesInHierarchy ( ) : bool
Результат bool

GetWriteableVariablesInHierarchy() защищенный метод

Collects all of the nodes in the hierarchies specified in the configuration file.
protected GetWriteableVariablesInHierarchy ( ) : bool
Результат bool

LockServer() защищенный метод

Locks the server.
protected LockServer ( ) : void
Результат void

Log() защищенный метод

Logs a message.
protected Log ( Exception e, string format ) : void
e System.Exception
format string
Результат void

Log() защищенный метод

Logs a message.
protected Log ( string format ) : void
format string
Результат void

ReportProgress() защищенный метод

Reports progress.
protected ReportProgress ( double position ) : void
position double
Результат void

Run() публичный метод

Runs the test case.
public Run ( ServerTestCase testcase, int iteration ) : bool
testcase ServerTestCase
iteration int
Результат bool

SetAttributeValue() защищенный метод

Stores the attribute value in the object.
protected SetAttributeValue ( Node node, uint attributeId, object attributeValue ) : bool
node Node
attributeId uint
attributeValue object
Результат bool

TestBase() публичный метод

Initializes the test with session, configuration and logger.
public TestBase ( string name, Session session, ServerTestConfiguration configuration, ReportMessageEventHandler reportMessage, ReportProgressEventHandler reportProgress, TestBase template ) : System
name string
session Opc.Ua.Client.Session
configuration ServerTestConfiguration
reportMessage ReportMessageEventHandler
reportProgress ReportProgressEventHandler
template TestBase
Результат System

UnlockServer() защищенный метод

Unlocks the server.
protected UnlockServer ( ) : void
Результат void

VerifyAttributeConsistency() защищенный метод

Verifies that the node attributes are consistent with each other.
protected VerifyAttributeConsistency ( Node node ) : bool
node Node
Результат bool

VerifyBadAttribute() защищенный метод

Verifies an error returned during an attribute read.
protected VerifyBadAttribute ( Node node, uint attributeId, StatusCode error ) : bool
node Node
attributeId uint
error StatusCode
Результат bool

VerifyGoodAttribute() защищенный метод

Verifies the value returned during an attribute read.
protected VerifyGoodAttribute ( Node node, uint attributeId, DataValue value ) : bool
node Node
attributeId uint
value DataValue
Результат bool

VerifyTimestamps() защищенный метод

Verifies that the timestamps match the requested filter.
protected VerifyTimestamps ( Node node, uint attributeId, TimestampsToReturn timestampsToReturn, DataValue value ) : bool
node Node
attributeId uint
timestampsToReturn TimestampsToReturn
value DataValue
Результат bool