C# Class Quickstarts.DataAccessServer.UnderlyingSystemBlock

This class simulates a block in the system.
Datei anzeigen Open project: OPCFoundation/UA-.NET Class Usage Examples

Public Methods

Method Description
CreateTag ( string tagName, UnderlyingSystemDataType dataType, UnderlyingSystemTagType tagType, string engineeringUnits, bool writeable ) : void

Creates the tag.

DoSimulation ( long counter, int index, Opc generator ) : void

Simulates a block by updating the state of the tags belonging to the condition.

GetTags ( ) : IList

Returns a snapshot of the tags belonging to the block.

StartMonitoring ( TagsChangedEventHandler callback ) : void

Starts the monitoring.

StopMonitoring ( ) : void

Stops monitoring.

UnderlyingSystemBlock ( ) : System

Initializes a new instance of the UnderlyingSystemBlock class.

WriteTagValue ( string tagName, object value ) : uint

Writes the tag value.

Private Methods

Method Description
FindTag ( string tagName ) : UnderlyingSystemTag

Finds the tag identified by the name.

UpdateTagMetadata ( UnderlyingSystemTag tag, Opc generator ) : bool

Updates the metadata for a tag.

UpdateTagValue ( UnderlyingSystemTag tag, Opc generator ) : bool

Updates the value of an tag.

Method Details

CreateTag() public method

Creates the tag.
public CreateTag ( string tagName, UnderlyingSystemDataType dataType, UnderlyingSystemTagType tagType, string engineeringUnits, bool writeable ) : void
tagName string Name of the tag.
dataType UnderlyingSystemDataType Type of the data.
tagType UnderlyingSystemTagType Type of the tag.
engineeringUnits string The engineering units.
writeable bool if set to true the tag is writeable.
return void

DoSimulation() public method

Simulates a block by updating the state of the tags belonging to the condition.
public DoSimulation ( long counter, int index, Opc generator ) : void
counter long The number of simulation cycles that have elapsed.
index int The index of the block within the system.
generator Opc An object which generates random data.
return void

GetTags() public method

Returns a snapshot of the tags belonging to the block.
public GetTags ( ) : IList
return IList

StartMonitoring() public method

Starts the monitoring.
public StartMonitoring ( TagsChangedEventHandler callback ) : void
callback TagsChangedEventHandler The callback to use when reporting changes.
return void

StopMonitoring() public method

Stops monitoring.
public StopMonitoring ( ) : void
return void

UnderlyingSystemBlock() public method

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

WriteTagValue() public method

Writes the tag value.
public WriteTagValue ( string tagName, object value ) : uint
tagName string Name of the tag.
value object The value.
return uint