本文整理汇总了C#中ISystemContext类的典型用法代码示例。如果您正苦于以下问题:C# ISystemContext类的具体用法?C# ISystemContext怎么用?C# ISystemContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISystemContext类属于命名空间,在下文中一共展示了ISystemContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SystemEventRegistry
public SystemEventRegistry(ISystemContext context)
{
if (context == null)
throw new ArgumentNullException("context");
Context = context;
}
示例2: AreaBrowser
/// <summary>
/// Creates a new browser object with a set of filters.
/// </summary>
public AreaBrowser(
ISystemContext context,
ViewDescription view,
NodeId referenceType,
bool includeSubtypes,
BrowseDirection browseDirection,
QualifiedName browseName,
IEnumerable<IReference> additionalReferences,
bool internalOnly,
AreaState area)
:
base(
context,
view,
referenceType,
includeSubtypes,
browseDirection,
browseName,
additionalReferences,
internalOnly)
{
m_stage = Stage.Begin;
if (area != null)
{
m_area = AreaState.GetDirectory(context, area.NodeId);
m_isRoot = area.IsRoot;
}
}
示例3: AddAlias
/// <summary>
/// Adds an alias to the node set.
/// </summary>
public void AddAlias(ISystemContext context, string alias, Opc.Ua.NodeId nodeId)
{
int count = 1;
if (this.Aliases != null)
{
for (int ii = 0; ii < this.Aliases.Length; ii++)
{
if (this.Aliases[ii].Alias == alias)
{
this.Aliases[ii].Value = Export(nodeId, context.NamespaceUris);
return;
}
}
count += this.Aliases.Length;
}
NodeIdAlias[] aliases = new NodeIdAlias[count];
if (this.Aliases != null)
{
Array.Copy(this.Aliases, aliases, this.Aliases.Length);
}
aliases[count-1] = new NodeIdAlias() { Alias = alias, Value = Export(nodeId, context.NamespaceUris) };
this.Aliases = aliases;
}
示例4: OnAfterCreate
/// <summary>
/// Initializes the object as a collection of counters which change value on read.
/// </summary>
protected override void OnAfterCreate(ISystemContext context, NodeState node)
{
base.OnAfterCreate(context, node);
UpdateStateVariable(context, Objects.ShelvedStateMachineType_Unshelved, CurrentState);
UpdateTransitionVariable(context, 0, LastTransition);
}
示例5: LogEventRouter
/// <summary>
/// Constructs the router around the given system context.
/// </summary>
/// <param name="context">The context of the system where this
/// router relies on.</param>
/// <exception cref="ArgumentNullException">
/// If the <paramref name="context"/> parameter is <c>null</c>.
/// </exception>
public LogEventRouter(ISystemContext context)
{
if (context == null)
throw new ArgumentNullException("context");
Context = context;
}
示例6: OnAfterCreate
/// <summary>
/// Initializes the object as a collection of counters which change value on read.
/// </summary>
protected override void OnAfterCreate(ISystemContext context, NodeState node)
{
base.OnAfterCreate(context, node);
UpdateStateVariable(context, Objects.ExclusiveLimitStateMachineType_High, CurrentState);
UpdateTransitionVariable(context, 0, LastTransition);
}
示例7: Initialize
/// <summary>
/// Initializes the snapshot from an instance.
/// </summary>
/// <param name="context">The context.</param>
/// <param name="state">The state.</param>
public void Initialize(
ISystemContext context,
BaseInstanceState state)
{
m_typeDefinitionId = state.TypeDefinitionId;
m_snapshot = CreateChildNode(context, state);
}
示例8: Initialize
/// <summary>
/// Initializes the instance with the default values.
/// </summary>
protected override void Initialize(ISystemContext context)
{
base.Initialize(context);
Executable = true;
UserExecutable = true;
}
示例9: Browser
/// <summary>
/// Creates a new browser object with a set of filters.
/// </summary>
public Browser(
ISystemContext context,
ViewDescription view,
NodeId referenceType,
bool includeSubtypes,
BrowseDirection browseDirection,
QualifiedName browseName,
IEnumerable<IReference> additionalReferences,
bool internalOnly,
Opc.Ua.Client.Session client,
NamespaceMapper mapper,
NodeState source,
NodeId rootId)
:
base(
context,
view,
referenceType,
includeSubtypes,
browseDirection,
browseName,
additionalReferences,
internalOnly)
{
m_client = client;
m_mapper = mapper;
m_source = source;
m_rootId = rootId;
m_stage = Stage.Begin;
}
示例10: OnAfterCreate
/// <summary>
/// Called after a node is created.
/// </summary>
protected override void OnAfterCreate(ISystemContext context, NodeState node)
{
base.OnAfterCreate(context, node);
if (this.ShelvingState != null)
{
if (this.ShelvingState.UnshelveTime != null)
{
this.ShelvingState.UnshelveTime.OnSimpleReadValue = OnReadUnshelveTime;
this.ShelvingState.UnshelveTime.MinimumSamplingInterval = 1000;
}
this.ShelvingState.OneShotShelve.OnCallMethod = OnOneShotShelve;
this.ShelvingState.OneShotShelve.OnReadExecutable = IsOneShotShelveExecutable;
this.ShelvingState.OneShotShelve.OnReadUserExecutable = IsOneShotShelveExecutable;
this.ShelvingState.TimedShelve.OnCall = OnTimedShelve;
this.ShelvingState.TimedShelve.OnReadExecutable = IsTimedShelveExecutable;
this.ShelvingState.TimedShelve.OnReadUserExecutable = IsTimedShelveExecutable;
this.ShelvingState.Unshelve.OnCallMethod = OnUnshelve;
this.ShelvingState.Unshelve.OnReadExecutable = IsTimedShelveExecutable;
this.ShelvingState.Unshelve.OnReadUserExecutable = IsTimedShelveExecutable;
}
}
示例11: OnAfterCreate
/// <summary>
/// Initializes the object as a collection of counters which change value on read.
/// </summary>
protected override void OnAfterCreate(ISystemContext context, NodeState node)
{
base.OnAfterCreate(context, node);
InitializeVariable(context, BooleanValue, TestData.Variables.UserScalarValueObjectType_BooleanValue);
InitializeVariable(context, SByteValue, TestData.Variables.UserScalarValueObjectType_SByteValue);
InitializeVariable(context, ByteValue, TestData.Variables.UserScalarValueObjectType_ByteValue);
InitializeVariable(context, Int16Value, TestData.Variables.UserScalarValueObjectType_Int16Value);
InitializeVariable(context, UInt16Value, TestData.Variables.UserScalarValueObjectType_UInt16Value);
InitializeVariable(context, Int32Value, TestData.Variables.UserScalarValueObjectType_Int32Value);
InitializeVariable(context, UInt32Value, TestData.Variables.UserScalarValueObjectType_UInt32Value);
InitializeVariable(context, Int64Value, TestData.Variables.UserScalarValueObjectType_Int64Value);
InitializeVariable(context, UInt64Value, TestData.Variables.UserScalarValueObjectType_UInt64Value);
InitializeVariable(context, FloatValue, TestData.Variables.UserScalarValueObjectType_FloatValue);
InitializeVariable(context, DoubleValue, TestData.Variables.UserScalarValueObjectType_DoubleValue);
InitializeVariable(context, StringValue, TestData.Variables.UserScalarValueObjectType_StringValue);
InitializeVariable(context, DateTimeValue, TestData.Variables.UserScalarValueObjectType_DateTimeValue);
InitializeVariable(context, GuidValue, TestData.Variables.UserScalarValueObjectType_GuidValue);
InitializeVariable(context, ByteStringValue, TestData.Variables.UserScalarValueObjectType_ByteStringValue);
InitializeVariable(context, XmlElementValue, TestData.Variables.UserScalarValueObjectType_XmlElementValue);
InitializeVariable(context, NodeIdValue, TestData.Variables.UserScalarValueObjectType_NodeIdValue);
InitializeVariable(context, ExpandedNodeIdValue, TestData.Variables.UserScalarValueObjectType_ExpandedNodeIdValue);
InitializeVariable(context, QualifiedNameValue, TestData.Variables.UserScalarValueObjectType_QualifiedNameValue);
InitializeVariable(context, LocalizedTextValue, TestData.Variables.UserScalarValueObjectType_LocalizedTextValue);
InitializeVariable(context, StatusCodeValue, TestData.Variables.UserScalarValueObjectType_StatusCodeValue);
InitializeVariable(context, VariantValue, TestData.Variables.UserScalarValueObjectType_VariantValue);
}
示例12: NodeBrowser
/// <summary>
/// Creates a new browser object with a set of filters.
/// </summary>
public NodeBrowser(
ISystemContext context,
ViewDescription view,
NodeId referenceType,
bool includeSubtypes,
BrowseDirection browseDirection,
QualifiedName browseName,
IEnumerable<IReference> additionalReferences,
bool internalOnly)
{
m_context = context;
m_view = view;
m_referenceType = referenceType;
m_includeSubtypes = includeSubtypes;
m_browseDirection = browseDirection;
m_browseName = browseName;
m_internalOnly = internalOnly;
m_references = new List<IReference>();
m_index = 0;
// add any additional references if they meet the criteria.
if (additionalReferences != null)
{
foreach (IReference reference in additionalReferences)
{
if (IsRequired(reference.ReferenceTypeId, reference.IsInverse))
{
m_references.Add(reference);
}
}
}
}
示例13: OnAfterCreate
/// <summary>
/// Initializes the object as a collection of counters which change value on read.
/// </summary>
protected override void OnAfterCreate(ISystemContext context, NodeState node)
{
base.OnAfterCreate(context, node);
UpdateStateVariable(context, Objects.ProgramStateMachineType_Ready, CurrentState);
UpdateTransitionVariable(context, 0, LastTransition);
Start.OnCallMethod = OnStart;
Start.OnReadExecutable = IsStartExecutable;
Start.OnReadUserExecutable = IsStartUserExecutable;
Suspend.OnCallMethod = OnSuspend;
Suspend.OnReadExecutable = IsSuspendExecutable;
Suspend.OnReadUserExecutable = IsSuspendUserExecutable;
Resume.OnCallMethod = OnResume;
Resume.OnReadExecutable = IsResumeExecutable;
Resume.OnReadUserExecutable = IsResumeUserExecutable;
Halt.OnCallMethod = OnHalt;
Halt.OnReadExecutable = IsHaltExecutable;
Halt.OnReadUserExecutable = IsHaltUserExecutable;
Reset.OnCallMethod = OnReset;
Reset.OnReadExecutable = IsResetExecutable;
Reset.OnReadUserExecutable = IsResetUserExecutable;
}
示例14: DaElementBrowser
/// <summary>
/// Creates a new browser object with a set of filters.
/// </summary>
/// <param name="context">The system context to use.</param>
/// <param name="view">The view which may restrict the set of references/nodes found.</param>
/// <param name="referenceType">The type of references being followed.</param>
/// <param name="includeSubtypes">Whether subtypes of the reference type are followed.</param>
/// <param name="browseDirection">Which way the references are being followed.</param>
/// <param name="browseName">The browse name of a specific target (used when translating browse paths).</param>
/// <param name="additionalReferences">Any additional references that should be included.</param>
/// <param name="internalOnly">If true the browser should not making blocking calls to external systems.</param>
/// <param name="itemId">The item id.</param>
/// <param name="namespaceIndex">Index of the namespace.</param>
public DaElementBrowser(
ISystemContext context,
ViewDescription view,
NodeId referenceType,
bool includeSubtypes,
BrowseDirection browseDirection,
QualifiedName browseName,
IEnumerable<IReference> additionalReferences,
bool internalOnly,
string itemId,
ushort namespaceIndex)
:
base(
context,
view,
referenceType,
includeSubtypes,
browseDirection,
browseName,
additionalReferences,
internalOnly)
{
m_itemId = itemId;
m_namespaceIndex = namespaceIndex;
m_stage = Stage.Begin;
}
示例15: TriggerEventRouter
public TriggerEventRouter(ISystemContext systemContext)
{
if (systemContext == null)
throw new ArgumentNullException("systemContext");
SystemContext = systemContext;
}