Skip to content

Tag.Values

Paul Spangler edited this page May 9, 2019 · 3 revisions

NationalInstruments.SystemLink.Clients.Tag.Values

Contents

BoolTagValueReader type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Wraps the ability to read a Bool tag's current and aggregate values using an ITagReader.

#ctor(reader,tag) constructor

Summary

Initializes an instance. The tag must be a Bool tag.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
tag NationalInstruments.SystemLink.Clients.Tag.TagData The tag whose value will be read.
Exceptions
Name Description
System.ArgumentException if tag is not a bool tag with a valid path.
System.ArgumentNullException if reader or tag is null.

#ctor(reader,path) constructor

Summary

Initializes an instance. Tag reads will fail if path does not identify an existing Bool tag.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
path System.String The path of the tag whose value will be read.
Exceptions
Name Description
System.ArgumentException if path is empty or invalid.
System.ArgumentNullException if reader or path is null.

BoolTagValueWriter type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Wraps the ability to write a Bool tag's value using an ITagWriter.

#ctor(writer,tag) constructor

Summary

Initializes an instance. The tag must be a Bool tag.

Parameters
Name Type Description
writer NationalInstruments.SystemLink.Clients.Tag.ITagWriter The ITagWriter to use when writing values.
tag NationalInstruments.SystemLink.Clients.Tag.TagData The tag to associate with the value.
Exceptions
Name Description
System.ArgumentException if tag is not a bool tag with a valid path.
System.ArgumentNullException if writer or tag is null.

#ctor(writer,path) constructor

Summary

Initializes an instance. Tag writes will fail if path does not identify an existing Bool tag.

Parameters
Name Type Description
writer NationalInstruments.SystemLink.Clients.Tag.ITagWriter The ITagWriter to use when writing values.
path System.String The path of the tag to associate with the value.
Exceptions
Name Description
System.ArgumentException if path is empty or invalid.
System.ArgumentNullException if writer or path is null.

DateTimeTagValueReader type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Wraps the ability to read a DateTime tag's current and aggregate values using an ITagReader.

#ctor(reader,tag) constructor

Summary

Initializes an instance. The tag must be a DateTime tag.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
tag NationalInstruments.SystemLink.Clients.Tag.TagData The tag whose value will be read.
Exceptions
Name Description
System.ArgumentException if tag is not a DateTime tag with a valid path.
System.ArgumentNullException if reader or tag is null.

#ctor(reader,path) constructor

Summary

Initializes an instance. Tag reads will fail if path does not identify an existing DateTime tag.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
path System.String The path of the tag whose value will be read.
Exceptions
Name Description
System.ArgumentException if path is empty or invalid.
System.ArgumentNullException if reader or path is null.

DateTimeTagValueWriter type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Wraps the ability to write a DateTime tag's value using an ITagWriter.

#ctor(writer,tag) constructor

Summary

Initializes an instance. The tag must be a DateTime tag.

Parameters
Name Type Description
writer NationalInstruments.SystemLink.Clients.Tag.ITagWriter The ITagWriter to use when writing values.
tag NationalInstruments.SystemLink.Clients.Tag.TagData The tag to associate with the value.
Exceptions
Name Description
System.ArgumentException if tag is not a DateTime tag with a valid path.
System.ArgumentNullException if writer or tag is null.

#ctor(writer,path) constructor

Summary

Initializes an instance. Tag writes will fail if path does not identify an existing DateTime tag.

Parameters
Name Type Description
writer NationalInstruments.SystemLink.Clients.Tag.ITagWriter The ITagWriter to use when writing values.
path System.String The path of the tag to associate with the value.
Exceptions
Name Description
System.ArgumentException if path is empty or invalid.
System.ArgumentNullException if writer or path is null.

DoubleTagAggregates type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Represents the aggregate values for Double tags that have CollectAggregates set to true.

#ctor(count,min,max,mean) constructor

Summary

Initializes an instance.

Parameters
Name Type Description
count System.Int32 The number of times the tag's value has been written.
min System.Double The smallest value written to the tag.
max System.Double The largest value written to the tag.
mean System.Double The mean of all values written to the tag.

Max property

Summary

Gets the largest value written to the tag.

Min property

Summary

Gets the smallest value written to the tag.

DoubleTagValueReader type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Wraps the ability to read a Double tag's current and aggregate values using an ITagReader.

#ctor(reader,tag) constructor

Summary

Initializes an instance. The tag must be a Double tag.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
tag NationalInstruments.SystemLink.Clients.Tag.TagData The tag whose value will be read.
Exceptions
Name Description
System.ArgumentException if tag is not a double tag with a valid path.
System.ArgumentNullException if reader or tag is null.

#ctor(reader,path) constructor

Summary

Initializes an instance. Tag reads will fail if path does not identify an existing Double tag.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
path System.String The path of the tag whose value will be read.
Exceptions
Name Description
System.ArgumentException if path is empty or invalid.
System.ArgumentNullException if reader or path is null.

DoubleTagValueWriter type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Wraps the ability to write a Double tag's value using an ITagWriter.

#ctor(writer,tag) constructor

Summary

Initializes an instance. The tag must be a Double tag.

Parameters
Name Type Description
writer NationalInstruments.SystemLink.Clients.Tag.ITagWriter The ITagWriter to use when writing values.
tag NationalInstruments.SystemLink.Clients.Tag.TagData The tag to associate with the value.
Exceptions
Name Description
System.ArgumentException if tag is not a double tag with a valid path.
System.ArgumentNullException if writer or tag is null.

#ctor(writer,path) constructor

Summary

Initializes an instance. Tag writes will fail if path does not identify an existing Double tag.

Parameters
Name Type Description
writer NationalInstruments.SystemLink.Clients.Tag.ITagWriter The ITagWriter to use when writing values.
path System.String The path of the tag to associate with the value.
Exceptions
Name Description
System.ArgumentException if path is empty or invalid.
System.ArgumentNullException if writer or path is null.

Int32TagAggregates type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Represents the aggregate values for Int32 tags that have CollectAggregates set to true.

#ctor(count,min,max,mean) constructor

Summary

Initializes an instance.

Parameters
Name Type Description
count System.Int32 The number of times the tag's value has been written.
min System.Int32 The smallest value written to the tag.
max System.Int32 The largest value written to the tag.
mean System.Double The mean of all values written to the tag.

Max property

Summary

Gets the largest value written to the tag.

Min property

Summary

Gets the smallest value written to the tag.

Int32TagValueReader type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Wraps the ability to read a Int32 tag's current and aggregate values using an ITagReader.

#ctor(reader,tag) constructor

Summary

Initializes an instance. The tag must be a Int32 tag.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
tag NationalInstruments.SystemLink.Clients.Tag.TagData The tag whose value will be read.
Exceptions
Name Description
System.ArgumentException if tag is not an Int32 tag with a valid path.
System.ArgumentNullException if reader or tag is null.

#ctor(reader,path) constructor

Summary

Initializes an instance. Tag reads will fail if path does not identify an existing Int32 tag.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
path System.String The path of the tag whose value will be read.
Exceptions
Name Description
System.ArgumentException if path is empty or invalid.
System.ArgumentNullException if reader or path is null.

Int32TagValueWriter type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Wraps the ability to write an Int32 tag's value using an ITagWriter.

#ctor(writer,tag) constructor

Summary

Initializes an instance. The tag must be an Int32 tag.

Parameters
Name Type Description
writer NationalInstruments.SystemLink.Clients.Tag.ITagWriter The ITagWriter to use when writing values.
tag NationalInstruments.SystemLink.Clients.Tag.TagData The tag to associate with the value.
Exceptions
Name Description
System.ArgumentException if tag is not an Int32 tag with a valid path.
System.ArgumentNullException if writer or tag is null.

#ctor(writer,path) constructor

Summary

Initializes an instance. Tag writes will fail if path does not identify an existing Int32 tag.

Parameters
Name Type Description
writer NationalInstruments.SystemLink.Clients.Tag.ITagWriter The ITagWriter to use when writing values.
path System.String The path of the tag to associate with the value.
Exceptions
Name Description
System.ArgumentException if path is empty or invalid.
System.ArgumentNullException if writer or path is null.

NonNumericTagValueReader`1 type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Core

Summary

Represents the ability to read the value of a generic non-numeric tag using an ITagReader. This is an abstract class. Instantiate a value reader specific to the data type of the tag to read, such as BoolTagValueReader.

#ctor(reader,tag,requiredType) constructor

Summary

Initializes an instance.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
tag NationalInstruments.SystemLink.Clients.Tag.TagData The tag whose values will be read.
requiredType NationalInstruments.SystemLink.Clients.Tag.DataType The required data type of tag.
Exceptions
Name Description
System.ArgumentException if tag is not a tag of the required type with a valid path.
System.ArgumentNullException if reader or tag is null.
System.ArgumentOutOfRangeException if requiredType is Unknown.

#ctor(reader,path,dataType) constructor

Summary

Initializes an instance.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
path System.String The path of the tag whose values will be read.
dataType NationalInstruments.SystemLink.Clients.Tag.DataType The expected data type of the tag referenced by path.
Exceptions
Name Description
System.ArgumentException if path is not a valid tag path.
System.ArgumentNullException if reader or path is null.
System.ArgumentOutOfRangeException if dataType is Unknown.

DeserializeValue() method

Summary

Inherit from parent.

Parameters

This method has no parameters.

TryParseValue(serializedValue,value) method

Summary

Parses a current or aggregate value of a tag after reading.

Returns

True if the value was parsed successfully, false if invalid.

Parameters
Name Type Description
serializedValue System.String The value serialized as a string.
value `0@ On success, the parsed value.

NumericTagAggregates type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Represents the aggregate values for a numeric tag type that has CollectAggregates set to true.

#ctor(count,mean) constructor

Summary

Initializes an instance.

Parameters
Name Type Description
count System.Int32 The number of times the tag's value has been written.
mean System.Double The mean of all values written to the tag.

Mean property

Summary

Gets the mean of all values written to the tag.

NumericTagValueReader`2 type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Core

Summary

Represents the ability to read the value of a generic numeric tag using an ITagReader. This is an abstract class. Instantiate a value reader specific to the data type of the tag to read, such as DoubleTagValueReader.

#ctor(reader,tag,requiredType) constructor

Summary

Initializes an instance.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
tag NationalInstruments.SystemLink.Clients.Tag.TagData The tag whose values will be read.
requiredType NationalInstruments.SystemLink.Clients.Tag.DataType The required data type of tag.
Exceptions
Name Description
System.ArgumentException if tag is not a tag of the required type with a valid path.
System.ArgumentNullException if reader or tag is null.
System.ArgumentOutOfRangeException if requiredType is Unknown.

#ctor(reader,path,dataType) constructor

Summary

Initializes an instance.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
path System.String The path of the tag whose values will be read.
dataType NationalInstruments.SystemLink.Clients.Tag.DataType The expected data type of the tag referenced by path.
Exceptions
Name Description
System.ArgumentException if path is not a valid tag path.
System.ArgumentNullException if reader or path is null.
System.ArgumentOutOfRangeException if dataType is Unknown.

CreateAggregates(count,min,max,mean) method

Summary

Stores the parsed aggregate values for returning from the reader.

Returns

An instance containing the aggregate values.

Parameters
Name Type Description
count System.Int32 The number of times the tag's value has been written.
min `0 The smallest value written to the tag.
max `0 The largest value written to the tag.
mean System.Double The mean of all values written to the tag.

DeserializeValue() method

Summary

Inherit from parent.

Parameters

This method has no parameters.

TryParseValue(serializedValue,value) method

Summary

Parses a current or aggregate value of a tag after reading.

Returns

True if the value was parsed successfully, false if invalid.

Parameters
Name Type Description
serializedValue System.String The value serialized as a string.
value `0@ On success, the parsed value.

SerializedTagWithAggregates type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Core

Summary

Represents a generic tag value serialized to a string with optional aggregate values also serialized to a string. Clients typically do not interact with this instances of this class directly. Use a TagValueReader instead.

#ctor(path,type,value) constructor

Summary

Initializes an instance with value only.

Parameters
Name Type Description
path System.String The path of the tag associated with the value.
type NationalInstruments.SystemLink.Clients.Tag.DataType The type of the value serialized as a string.
value System.String The value serialized as a string.

#ctor(path,type,value,timestamp) constructor

Summary

Initializes an instance with value and timestamp.

Parameters
Name Type Description
path System.String The path of the tag associated with the value.
type NationalInstruments.SystemLink.Clients.Tag.DataType The type of the value serialized as a string.
value System.String The value serialized as a string.
timestamp System.DateTimeOffset The timestamp associated with the value.

#ctor(path,type,value,count,min,max,mean) constructor

Summary

Initializes an instance with value and aggregates.

Parameters
Name Type Description
path System.String The path of the tag associated with the value.
type NationalInstruments.SystemLink.Clients.Tag.DataType The type of the value serialized as a string.
value System.String The value serialized as a string.
count System.Nullable{System.Int32} The number of times the tag has been written, or null if
the tag is not collecting aggregates.
min System.String The minimum value of the tag serialized to a string, or null if
the tag is not collecting aggregates or the data type of the tag does not track a
minimum value.
max System.String The maximum value of the tag serialized to a string, or null if
the tag is not collecting aggregates or the data type of the tag does not track a
maximum value.
mean System.Nullable{System.Double} The mean value of the tag, or null if the tag is not
collecting aggregates or the data type of the tag does not track a
mean value.

#ctor(path,type,value,timestamp,count,min,max,mean) constructor

Summary

Initializes an instance with value, timestamp, and aggregates.

Parameters
Name Type Description
path System.String The path of the tag associated with the value.
type NationalInstruments.SystemLink.Clients.Tag.DataType The type of the value serialized as a string.
value System.String The value serialized as a string.
timestamp System.DateTimeOffset The timestamp associated with the value.
count System.Nullable{System.Int32} The number of times the tag has been written, or null if
the tag is not collecting aggregates.
min System.String The minimum value of the tag serialized to a string, or null if
the tag is not collecting aggregates or the data type of the tag does not track a
minimum value.
max System.String The maximum value of the tag serialized to a string, or null if
the tag is not collecting aggregates or the data type of the tag does not track a
maximum value.
mean System.Nullable{System.Double} The average value of the tag, or null if the tag is not
collecting aggregates or the data type of the tag does not track a
mean value.

Count property

Summary

Gets the number of times the tag has been written, or null if the tag is not collecting aggregates.

DataType property

Summary

Gets the type of the value that was serialized as a string.

Max property

Summary

Gets the maximum value of the tag serialized to a string, or null if the tag is not collecting aggregates or the data type of the tag does not track a maximum value.

Mean property

Summary

Gets the mean value of the tag, or null if the tag is not collecting aggregates or the data type of the tag does not track a mean value.

Min property

Summary

Gets the minimum value of the tag serialized to a string, or null if the tag is not collecting aggregates or the data type of the tag does not track a minimum value.

Path property

Summary

Gets the path of the tag associated with the value.

Timestamp property

Summary

Gets the timestamp associated with the value, if available.

Value property

Summary

Gets the value of the tag serialized as a string.

StringTagValueReader type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Wraps the ability to read a String tag's current and aggregate values using an ITagReader.

#ctor(reader,tag) constructor

Summary

Initializes an instance. The tag must be a String tag.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
tag NationalInstruments.SystemLink.Clients.Tag.TagData The tag whose value will be read.
Exceptions
Name Description
System.ArgumentException if tag is not a string tag with a valid path.
System.ArgumentNullException if reader or tag is null.

#ctor(reader,path) constructor

Summary

Initializes an instance. Tag reads will fail if path does not identify an existing String tag.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
path System.String The path of the tag whose value will be read.
Exceptions
Name Description
System.ArgumentException if path is empty or invalid.
System.ArgumentNullException if reader or path is null.

StringTagValueWriter type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Wraps the ability to write a String tag's value using an ITagWriter.

#ctor(writer,tag) constructor

Summary

Initializes an instance. The tag must be a String tag.

Parameters
Name Type Description
writer NationalInstruments.SystemLink.Clients.Tag.ITagWriter The ITagWriter to use when writing values.
tag NationalInstruments.SystemLink.Clients.Tag.TagData The tag to associate with the value.
Exceptions
Name Description
System.ArgumentException if tag is not a string tag with a valid path.
System.ArgumentNullException if writer or tag is null.

#ctor(writer,path) constructor

Summary

Initializes an instance. Tag writes will fail if path does not identify an existing String tag.

Parameters
Name Type Description
writer NationalInstruments.SystemLink.Clients.Tag.ITagWriter The ITagWriter to use when writing values.
path System.String The path of the tag to associate with the value.
Exceptions
Name Description
System.ArgumentException if path is empty or invalid.
System.ArgumentNullException if writer or path is null.

TagAggregates type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Represents the aggregate values common to all tags that have CollectAggregates set to true. Some tag data types have additional aggregates.

#ctor(count) constructor

Summary

Initializes an instance.

Parameters
Name Type Description
count System.Int32 The number of times the tag's value has been written.

Count property

Summary

Gets the number of times the tag's value has been written.

TagValueReader type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Represents the ability to read a single tag's value using an ITagReader. This is an abstract class. Instantiate a value reader specific to the data type of the tag to read, such as BoolTagValueReader.

#ctor(reader,tag,requiredType) constructor

Summary

Initializes an instance.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
tag NationalInstruments.SystemLink.Clients.Tag.TagData The tag whose values will be read.
requiredType NationalInstruments.SystemLink.Clients.Tag.DataType The required data type of tag.
Exceptions
Name Description
System.ArgumentException if tag is not a tag of the required type with a valid path.
System.ArgumentNullException if reader or tag is null.
System.ArgumentOutOfRangeException if requiredType is Unknown.

#ctor(reader,path,dataType) constructor

Summary

Initializes an instance.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
path System.String The path of the tag whose values will be read.
dataType NationalInstruments.SystemLink.Clients.Tag.DataType The expected data type of the tag referenced by path.
Exceptions
Name Description
System.ArgumentException if path is not a valid tag path.
System.ArgumentNullException if reader or path is null.
System.ArgumentOutOfRangeException if dataType is Unknown.

DataType property

Summary

Gets the data type of the tag associated with the value.

Path property

Summary

Gets the path of the tag associated with the value.

Reader property

Summary

Gets the underlying ITagReader for reading values.

TagValueReaderGeneric`2 type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Core

Summary

Represents the ability to read the value of a generic type of tag using a ITagReader. This is an abstract class. Instantiate a value reader specific to the data type of the tag to write, such as BoolTagValueReader.

#ctor(reader,tag,requiredType) constructor

Summary

Initializes an instance.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
tag NationalInstruments.SystemLink.Clients.Tag.TagData The tag whose values will be read.
requiredType NationalInstruments.SystemLink.Clients.Tag.DataType The required data type of tag.
Exceptions
Name Description
System.ArgumentException if tag is not a tag of the required type with a valid path.
System.ArgumentNullException if reader or tag is null.
System.ArgumentOutOfRangeException if requiredType is Unknown.

#ctor(reader,path,dataType) constructor

Summary

Initializes an instance.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
path System.String The path of the tag whose values will be read.
dataType NationalInstruments.SystemLink.Clients.Tag.DataType The expected data type of the tag referenced by path.
Exceptions
Name Description
System.ArgumentException if path is not a valid tag path.
System.ArgumentNullException if reader or path is null.
System.ArgumentOutOfRangeException if dataType is Unknown.

DeserializeValue(serializedValue,aggregates) method

Summary

Deserializes the current and aggregate values of a tag after reading.

Returns

The deserialized value of the tag.

Parameters
Name Type Description
serializedValue NationalInstruments.SystemLink.Clients.Tag.Core.SerializedTagWithAggregates The serialized values.
aggregates `1@ Set to the deserialized aggregate values.
Exceptions
Name Description
NationalInstruments.SystemLink.Clients.Core.ApiException if serializedValue contains invalid data.

Read() method

Summary

Reads the current value of the tag.

Returns

The value of the tag, or null if the tag exists but does not have a value.

Parameters

This method has no parameters.

Exceptions
Name Description
System.ObjectDisposedException if the underlying reader has been disposed.
NationalInstruments.SystemLink.Clients.Core.ApiException if the API call fails.

Read(timestamp) method

Summary

Reads the current value of the tag.

Returns

The value of the tag, or null if the tag exists but does not have a value.

Parameters
Name Type Description
timestamp System.DateTimeOffset@ On success, set to the timestamp associated with the value,
or MinValue if the tag exists but does not have a value.
Exceptions
Name Description
System.ObjectDisposedException if the underlying reader has been disposed.
NationalInstruments.SystemLink.Clients.Core.ApiException if the API call fails.

Read(aggregates) method

Summary

Reads the current and aggregate values of the tag.

Returns

The value of the tag, or null if the tag exists but does not have a value.

Parameters
Name Type Description
aggregates `1@ On success, set to the tag's aggregate values, or null
if the tag exists but does not have a value.
Exceptions
Name Description
System.ObjectDisposedException if the underlying reader has been disposed.
NationalInstruments.SystemLink.Clients.Core.ApiException if the API call fails.

Read(timestamp,aggregates) method

Summary

Reads the current and aggregate values of the tag.

Returns

The value of the tag, or null if the tag exists but does not have a value.

Parameters
Name Type Description
timestamp System.DateTimeOffset@ On success, set to the timestamp associated with the value,
or MinValue if the tag exists but does not have a value.
aggregates `1@ On success, set to the tag's aggregate values, or null
if the tag exists but does not have a value.
Exceptions
Name Description
System.ObjectDisposedException if the underlying reader has been disposed.
NationalInstruments.SystemLink.Clients.Core.ApiException if the API call fails.

TagValueWriter type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Represents the ability to write a single tag's value using an ITagWriter. This is an abstract class. Instantiate a value writer specific to the data type of the tag to write, such as BoolTagValueWriter.

#ctor(writer,tag,requiredType) constructor

Summary

Initializes an instance.

Parameters
Name Type Description
writer NationalInstruments.SystemLink.Clients.Tag.ITagWriter The ITagWriter to use when writing values.
tag NationalInstruments.SystemLink.Clients.Tag.TagData The tag to associate with the written values.
requiredType NationalInstruments.SystemLink.Clients.Tag.DataType The required data type of tag.
Exceptions
Name Description
System.ArgumentException if tag is not a tag of the required type with a valid path.
System.ArgumentNullException if writer or tag is null.
System.ArgumentOutOfRangeException if requiredType is Unknown.

#ctor(writer,path,dataType) constructor

Summary

Initializes an instance.

Parameters
Name Type Description
writer NationalInstruments.SystemLink.Clients.Tag.ITagWriter The ITagWriter to use when writing values.
path System.String The tag path to associate with the written values.
dataType NationalInstruments.SystemLink.Clients.Tag.DataType The expected data type of the tag referenced by path.
Exceptions
Name Description
System.ArgumentException if path is not a valid tag path.
System.ArgumentNullException if writer or path is null.
System.ArgumentOutOfRangeException if dataType is Unknown.

DataType property

Summary

Gets the data type of the tag associated with the value.

Path property

Summary

Gets the path of the tag associated with the value.

Write(serializedValue) method

Summary

Writes a value for the tag using an automatic timestamp.

Parameters
Name Type Description
serializedValue System.String The tag value to write, serialized as a string.
Exceptions
Name Description
System.ArgumentNullException if serializedValue is null.
System.ObjectDisposedException if the underlying writer has been disposed.
NationalInstruments.SystemLink.Clients.Core.ApiException if the API call fails.

Write(serializedValue,timestamp) method

Summary

Writes a value for the tag with a custom timestamp. Clients should typically use automatic timestamps instead. This overload enables submitting measurements or forwarding values that already have timestamps.

Parameters
Name Type Description
serializedValue System.String The tag value to write, serialized as a string.
timestamp System.DateTimeOffset The date and time associated with the value.
Exceptions
Name Description
System.ArgumentNullException if serializedValue is null.
System.ObjectDisposedException if the underlying writer has been disposed.
NationalInstruments.SystemLink.Clients.Core.ApiException if the API call fails.

WriteAsync(serializedValue) method

Summary

Asynchronously writes a value for the tag using an automatic timestamp.

Returns

A task representing the asynchronous operation.

Parameters
Name Type Description
serializedValue System.String The tag value to write, serialized as a string.
Exceptions
Name Description
System.ArgumentNullException if serializedValue is null.
System.ObjectDisposedException if the underlying writer has been disposed.
NationalInstruments.SystemLink.Clients.Core.ApiException if the API call fails.

WriteAsync(serializedValue,timestamp) method

Summary

Asynchronously writes a value for the tag with a custom timestamp. Clients should typically use automatic timestamps instead. This overload enables submitting measurements or forwarding values that already have timestamps.

Returns

A task representing the asynchronous operation.

Parameters
Name Type Description
serializedValue System.String The tag value to write, serialized as a string.
timestamp System.DateTimeOffset The date and time associated with the value.
Exceptions
Name Description
System.ArgumentNullException if serializedValue is null.
System.ObjectDisposedException if the underlying writer has been disposed.
NationalInstruments.SystemLink.Clients.Core.ApiException if the API call fails.

TagValueWriterGeneric`1 type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Core

Summary

Represents the ability to write the value of a generic type of tag using an ITagWriter. This is an abstract class. Instantiate a value writer specific to the data type of the tag to write, such as BoolTagValueWriter.

#ctor(writer,tag,requiredType) constructor

Summary

Initializes an instance.

Parameters
Name Type Description
writer NationalInstruments.SystemLink.Clients.Tag.ITagWriter The ITagWriter to use when writing values.
tag NationalInstruments.SystemLink.Clients.Tag.TagData The tag to associate with the written values.
requiredType NationalInstruments.SystemLink.Clients.Tag.DataType The required data type of tag.
Exceptions
Name Description
System.ArgumentException if tag is not a tag of the required type with a valid path.
System.ArgumentNullException if writer or tag is null.
System.ArgumentOutOfRangeException if requiredType is Unknown.

#ctor(writer,path,dataType) constructor

Summary

Initializes an instance.

Parameters
Name Type Description
writer NationalInstruments.SystemLink.Clients.Tag.ITagWriter The ITagWriter to use when writing values.
path System.String The tag path to associate with the written values.
dataType NationalInstruments.SystemLink.Clients.Tag.DataType The expected data type of the tag referenced by path.
Exceptions
Name Description
System.ArgumentException if path is not a valid tag path.
System.ArgumentNullException if writer or path is null.
System.ArgumentOutOfRangeException if dataType is Unknown.

SerializeValue(value) method

Summary

Serializes a tag value to a string for writing.

Returns

The serialized value.

Parameters
Name Type Description
value `0 The tag's value to serialize.

Write(value) method

Summary

Writes a value for the tag using an automatic timestamp.

Parameters
Name Type Description
value `0 The tag value to write.
Exceptions
Name Description
System.ObjectDisposedException if the underlying writer has been disposed.
NationalInstruments.SystemLink.Clients.Core.ApiException if the API call fails.

Write(value,timestamp) method

Summary

Writes a value for the tag with a custom timestamp. Clients should typically use automatic timestamps instead. This overload enables submitting measurements or forwarding values that already have timestamps.

Parameters
Name Type Description
value `0 The tag value to write.
timestamp System.DateTimeOffset The date and time associated with the value.
Exceptions
Name Description
System.ObjectDisposedException if the underlying writer has been disposed.
NationalInstruments.SystemLink.Clients.Core.ApiException if the API call fails.

WriteAsync(value) method

Summary

Asynchronously writes a value for the tag using an automatic timestamp.

Returns

A task representing the asynchronous operation.

Parameters
Name Type Description
value `0 The tag value to write.
Exceptions
Name Description
System.ObjectDisposedException if the underlying writer has been disposed.
NationalInstruments.SystemLink.Clients.Core.ApiException if the API call fails.

WriteAsync(value,timestamp) method

Summary

Asynchronously writes a value for the tag with a custom timestamp. Clients should typically use automatic timestamps instead. This overload enables submitting measurements or forwarding values that already have timestamps.

Returns

A task representing the asynchronous operation.

Parameters
Name Type Description
value `0 The tag value to write.
timestamp System.DateTimeOffset The date and time associated with the value.
Exceptions
Name Description
System.ObjectDisposedException if the underlying writer has been disposed.
NationalInstruments.SystemLink.Clients.Core.ApiException if the API call fails.

UInt64TagAggregates type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Represents the aggregate values for UInt64 tags that have CollectAggregates set to true.

#ctor(count,min,max,mean) constructor

Summary

Initializes an instance.

Parameters
Name Type Description
count System.Int32 The number of times the tag's value has been written.
min System.UInt64 The smallest value written to the tag.
max System.UInt64 The largest value written to the tag.
mean System.Double The mean of all values written to the tag.

Max property

Summary

Gets the largest value written to the tag.

Min property

Summary

Gets the smallest value written to the tag.

UInt64TagValueReader type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Wraps the ability to read a UInt64 tag's current and aggregate values using an ITagReader.

#ctor(reader,tag) constructor

Summary

Initializes an instance. The tag must be a UInt64 tag.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
tag NationalInstruments.SystemLink.Clients.Tag.TagData The tag whose value will be read.
Exceptions
Name Description
System.ArgumentException if tag is not a UInt64 tag with a valid path.
System.ArgumentNullException if reader or tag is null.

#ctor(reader,path) constructor

Summary

Initializes an instance. Tag reads will fail if path does not identify an existing UInt64 tag.

Parameters
Name Type Description
reader NationalInstruments.SystemLink.Clients.Tag.ITagReader The ITagReader to use when reading values.
path System.String The path of the tag whose value will be read.
Exceptions
Name Description
System.ArgumentException if path is empty or invalid.
System.ArgumentNullException if reader or path is null.

UInt64TagValueWriter type

Namespace

NationalInstruments.SystemLink.Clients.Tag.Values

Summary

Wraps the ability to write a UInt64 tag's value using an ITagWriter.

#ctor(writer,tag) constructor

Summary

Initializes an instance. The tag must be a UInt64 tag.

Parameters
Name Type Description
writer NationalInstruments.SystemLink.Clients.Tag.ITagWriter The ITagWriter to use when writing values.
tag NationalInstruments.SystemLink.Clients.Tag.TagData The tag to associate with the value.
Exceptions
Name Description
System.ArgumentException if tag is not a UInt64 tag with a valid path.
System.ArgumentNullException if writer or tag is null.

#ctor(writer,path) constructor

Summary

Initializes an instance. Tag writes will fail if path does not identify an existing UInt64 tag.

Parameters
Name Type Description
writer NationalInstruments.SystemLink.Clients.Tag.ITagWriter The ITagWriter to use when writing values.
path System.String The path of the tag to associate with the value.
Exceptions
Name Description
System.ArgumentException if path is empty or invalid.
System.ArgumentNullException if writer or path is null.

Clone this wiki locally