本文整理汇总了C#中Opc.Ua.NodeId类的典型用法代码示例。如果您正苦于以下问题:C# NodeId类的具体用法?C# NodeId怎么用?C# NodeId使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
NodeId类属于Opc.Ua命名空间,在下文中一共展示了NodeId类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExpandedNodeId
/// <summary>
/// Initializes the node id with an identifier.
/// </summary>
public ExpandedNodeId(NodeId nodeId)
{
if (nodeId != null)
{
Identifier = nodeId.Identifier;
}
}
示例2: UpdateList
/// <summary>
/// Updates the list of references.
/// </summary>
private void UpdateList(Session session, NodeId nodeId)
{
m_nodeId = nodeId;
ReferencesLV.Items.Clear();
List<ReferenceDescription> references = Browse(session, nodeId);
DisplayReferences(session, references);
}
示例3: Argument
/// <summary>
/// Initializes an instance of the argument.
/// </summary>
public Argument(string name, NodeId dataType, int valueRank, string description)
{
this.m_name = name;
this.m_dataType = dataType;
this.m_valueRank = valueRank;
this.m_description = description;
}
示例4: 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;
}
示例5: Initialize
/// <summary>
/// Initializes the control with a root and a set of hierarchial reference types to follow.
/// </summary>
/// <param name="session">The session.</param>
/// <param name="rootId">The root of the hierarchy to browse.</param>
/// <param name="referenceTypeIds">The reference types to follow.</param>
public void Initialize(
Session session,
NodeId rootId,
params NodeId[] referenceTypeIds)
{
BrowseCTRL.Initialize(session, rootId, referenceTypeIds);
}
示例6: 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;
}
示例7: 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);
}
}
}
}
示例8: BlockState
/// <summary>
/// Initializes a new instance of the <see cref="BlockState"/> class.
/// </summary>
/// <param name="nodeManager">The context.</param>
/// <param name="nodeId">The node id.</param>
/// <param name="block">The block.</param>
public BlockState(
HistoricalAccessServerNodeManager nodeManager,
NodeId nodeId,
UnderlyingSystemBlock block) : base(null)
{
m_blockId = block.Id;
m_nodeManager = nodeManager;
this.SymbolicName = block.Name;
this.NodeId = nodeId;
this.BrowseName = new QualifiedName(block.Name, nodeId.NamespaceIndex);
this.DisplayName = new LocalizedText(block.Name);
this.Description = null;
this.WriteMask = 0;
this.UserWriteMask = 0;
this.EventNotifier = EventNotifiers.None;
UnderlyingSystem system = nodeManager.SystemContext.SystemHandle as UnderlyingSystem;
if (system != null)
{
IList<UnderlyingSystemTag> tags = block.GetTags();
for (int ii = 0; ii < tags.Count; ii++)
{
BaseVariableState variable = CreateVariable(nodeManager.SystemContext, tags[ii]);
AddChild(variable);
variable.OnSimpleWriteValue = OnWriteTagValue;
}
}
}
示例9: OnGenerateValues
/// <summary>
/// Handles the generate values method.
/// </summary>
protected override ServiceResult OnGenerateValues(
ISystemContext context,
MethodState method,
NodeId objectId,
uint count)
{
TestDataSystem system = context.SystemHandle as TestDataSystem;
if (system == null)
{
return StatusCodes.BadOutOfService;
}
GenerateValue(system, SByteValue);
GenerateValue(system, ByteValue);
GenerateValue(system, Int16Value);
GenerateValue(system, UInt16Value);
GenerateValue(system, Int32Value);
GenerateValue(system, UInt32Value);
GenerateValue(system, UInt32Value);
GenerateValue(system, Int64Value);
GenerateValue(system, UInt64Value);
GenerateValue(system, FloatValue);
GenerateValue(system, DoubleValue);
GenerateValue(system, NumberValue);
GenerateValue(system, IntegerValue);
GenerateValue(system, UIntegerValue);
return base.OnGenerateValues(context, method, objectId, count);
}
示例10: Show
public void Show(Session session, NodeId nodeId)
{
m_session = session;
m_nodeId = nodeId;
Show();
}
示例11: 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;
}
}
示例12: MemoryTagState
/// <summary>
/// Initializes a memory tag for a buffer.
/// </summary>
/// <param name="parent">The buffer that owns the tag.</param>
/// <param name="offet">The offset of the tag address in the memory buffer.</param>
public MemoryTagState(MemoryBufferState parent, uint offet) : base(parent)
{
// these objects are created an discarded during each operation.
// the metadata is derived from the parameters passed to constructors.
NodeId = new NodeId(Utils.Format("{0}[{1}]", parent.SymbolicName, offet), parent.NodeId.NamespaceIndex);
BrowseName = new QualifiedName(Utils.Format("{1:X8}", parent.SymbolicName, offet), parent.TypeDefinitionId.NamespaceIndex);
DisplayName = BrowseName.Name;
Description = null;
WriteMask = AttributeWriteMask.None;
UserWriteMask = AttributeWriteMask.None;
ReferenceTypeId = Opc.Ua.ReferenceTypeIds.HasComponent;
TypeDefinitionId = new NodeId(VariableTypes.MemoryTagType, parent.TypeDefinitionId.NamespaceIndex);
ModellingRuleId = null;
NumericId = offet;
DataType = new NodeId((uint)parent.ElementType);
ValueRank = ValueRanks.Scalar;
ArrayDimensions = null;
AccessLevel = AccessLevels.CurrentReadOrWrite;
UserAccessLevel = AccessLevels.CurrentReadOrWrite;
MinimumSamplingInterval = parent.MaximumScanRate;
Historizing = false;
// re-direct read and write operations to the parent.
OnReadValue = parent.ReadTagValue;
OnWriteValue = parent.WriteTagValue;
m_offset = offet;
}
示例13: ShowDialog
/// <summary>
/// Prompts the user to edit a value.
/// </summary>
public Variant ShowDialog(Session session, NodeId nodeId)
{
m_session = session;
m_nodeId = nodeId;
#region Task #B2 - Write Value
// generate a default value based on the data type.
m_value = Variant.Null;
m_sourceType = GetExpectedType(session, nodeId);
if (m_sourceType != null)
{
m_value = new Variant(TypeInfo.GetDefaultValue(m_sourceType.BuiltInType), m_sourceType);
}
// cast the value to a string.
ValueTB.Text = (string)TypeInfo.Cast(m_value.Value, m_value.TypeInfo, BuiltInType.String);
#endregion
if (ShowDialog() != DialogResult.OK)
{
return Variant.Null;
}
return m_value;
}
示例14: CreateMonitoredItem
/// <summary>
/// Creates the monitored item based on the current definition.
/// </summary>
/// <param name="session">The session.</param>
/// <returns>The monitored item.</returns>
public MonitoredItem CreateMonitoredItem(Session session)
{
// choose the server object by default.
if (AreaId == null)
{
AreaId = ObjectIds.Server;
}
// create the item with the filter.
MonitoredItem monitoredItem = new MonitoredItem();
monitoredItem.DisplayName = null;
monitoredItem.StartNodeId = AreaId;
monitoredItem.RelativePath = null;
monitoredItem.NodeClass = NodeClass.Object;
monitoredItem.AttributeId = Attributes.EventNotifier;
monitoredItem.IndexRange = null;
monitoredItem.Encoding = null;
monitoredItem.MonitoringMode = MonitoringMode.Reporting;
monitoredItem.SamplingInterval = 0;
monitoredItem.QueueSize = UInt32.MaxValue;
monitoredItem.DiscardOldest = true;
monitoredItem.Filter = ConstructFilter(session);
// save the definition as the handle.
monitoredItem.Handle = this;
return monitoredItem;
}
示例15: ShowDialog
/// <summary>
/// Prompts the user to view or edit the value.
/// </summary>
public object ShowDialog(
Session session,
NodeId nodeId,
uint attributeId,
string name,
object value,
bool readOnly,
string caption)
{
if (!String.IsNullOrEmpty(caption))
{
this.Text = caption;
}
OkBTN.Visible = !readOnly;
ValueCTRL.ChangeSession(session);
ValueCTRL.ShowValue(nodeId, attributeId, name, value, readOnly);
if (base.ShowDialog() != DialogResult.OK)
{
return null;
}
return ValueCTRL.GetValue();
}