本文整理汇总了C#中ReadoutType类的典型用法代码示例。如果您正苦于以下问题:C# ReadoutType类的具体用法?C# ReadoutType怎么用?C# ReadoutType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ReadoutType类属于命名空间,在下文中一共展示了ReadoutType类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FieldEnum
/// <summary>
/// Enumeration valued field.
/// </summary>
/// <param name="Node">Node</param>
/// <param name="FieldName">Name of field</param>
/// <param name="StringIds">Corresponding String IDs</param>
/// <param name="Timepoint">Timepoint of field value.</param>
/// <param name="Value">Value</param>
/// <param name="Type">Type of value.</param>
public FieldEnum(string NodeId, string FieldName, FieldLanguageStep[] StringIds, DateTime Timepoint,
Enum Value, ReadoutType Type)
: base(NodeId, FieldName, StringIds, Timepoint, Type)
{
this.value = Value.ToString();
this.dataType = Value.GetType ().FullName;
}
示例2: ReadoutRequest
/// <summary>
/// Represents a request for sensor data.
/// </summary>
/// <param name="Types">Readout types to read.</param>
/// <param name="From">From what timestamp readout is desired.</param>
/// <param name="To">To what timestamp readout is desired.</param>
/// <param name="Nodes">Nodes to read.</param>
public ReadoutRequest (ReadoutType Types, DateTime From, DateTime To, NodeReference[] Nodes)
{
this.types = Types;
this.from = From;
this.to = To;
this.nodes = Nodes;
}
示例3: FieldNumeric
/// <summary>
/// Numeric valued field.
/// </summary>
/// <param name="Node">Node</param>
/// <param name="FieldName">Name of field</param>
/// <param name="StringId">Corresponding String ID</param>
/// <param name="Timepoint">Timepoint of field value.</param>
/// <param name="Value">Value</param>
/// <param name="Type">Type of value.</param>
public FieldNumeric(string NodeId, string FieldName, int StringId, DateTime Timepoint,
long Value, ReadoutType Type)
: base(NodeId, FieldName, StringId, Timepoint, Type)
{
this.unit = string.Empty;
this.value = Value;
this.nrDecimals = 0;
}
示例4: Field
/// <summary>
/// Base class of all field values.
/// </summary>
/// <param name="NodeId">Node ID</param>
/// <param name="FieldName">Name of field</param>
/// <param name="StringIds">Corresponding String IDs</param>
/// <param name="Timepoint">Timepoint of field value.</param>
/// <param name="Type">Type of value.</param>
public Field (string NodeId, string FieldName, FieldLanguageStep[] StringIds, DateTime Timepoint, ReadoutType Type)
{
this.nodeId = NodeId;
this.fieldName = FieldName;
this.timepoint = Timepoint;
this.type = Type;
this.languageModule = null;
this.stringIds = StringIds;
this.status = FieldStatus.AutomaticReadout;
}
示例5: ExportField
/// <summary>
/// Exports an enumeration field.
/// </summary>
/// <param name="Xml">XML Output</param>
/// <param name="FieldName">Field name.</param>
/// <param name="Value">Value.</param>
/// <param name="Type">Type.</param>
/// <param name="Status">Status.</param>
public static void ExportField (XmlWriter Xml, string FieldName, Enum Value, ReadoutType Type, FieldStatus Status)
{
ExportField (Xml, new FieldEnum (string.Empty, FieldName, (FieldLanguageStep[])null, DateTime.MinValue, Value, Type, Status));
}
示例6: ExportField
/// <summary>
/// Exports an enumeration field.
/// </summary>
/// <param name="FieldName">Field name.</param>
/// <param name="Value">Value.</param>
/// <param name="Type">Type.</param>
/// <param name="Status">Status.</param>
public void ExportField (string FieldName, Enum Value, ReadoutType Type, FieldStatus Status)
{
Export.ExportField (this.turtle, FieldName, Value, Type, Status);
}
示例7: FieldDateTime
/// <summary>
/// DateTime valued field.
/// </summary>
/// <param name="Node">Node</param>
/// <param name="FieldName">Name of field</param>
/// <param name="StringId">Corresponding String ID</param>
/// <param name="LocalizationSeed">Localization seed, i.e. the default string for creating
/// a localized field name.</param>
/// <param name="Timepoint">Timepoint of field value.</param>
/// <param name="Value">Value</param>
/// <param name="Type">Type of value.</param>
public FieldDateTime(string NodeId, string FieldName, int StringId, string LocalizationSeed,
DateTime Timepoint, DateTime Value, ReadoutType Type)
: base(NodeId, FieldName, StringId, LocalizationSeed, Timepoint, Type)
{
this.value = Value;
}
示例8: ExportField
/// <summary>
/// Exports a TimeSpan field.
/// </summary>
/// <param name="FieldName">Field name.</param>
/// <param name="Value">Value.</param>
/// <param name="Type">Type.</param>
/// <param name="Status">Status.</param>
public void ExportField (string FieldName, TimeSpan Value, ReadoutType Type, FieldStatus Status)
{
Export.ExportField (this.xml, FieldName, Value, Type, Status);
}
示例9: Export
private static void Export (ISensorDataExport Output, IEnumerable<Record> History, ReadoutType Type, ReadoutRequest Request)
{
if ((Request.Types & Type) != 0)
{
foreach (Record Rec in History)
{
if (!Request.ReportTimestamp (Rec.Timestamp))
continue;
Output.StartTimestamp (Rec.Timestamp);
if (Request.ReportField ("Temperature"))
Output.ExportField ("Temperature", Rec.TemperatureC, 1, "C", Type);
if (Request.ReportField ("Light"))
Output.ExportField ("Light", Rec.LightPercent, 1, "%", Type);
if (Request.ReportField ("Motion"))
Output.ExportField ("Motion", Rec.Motion, Type);
Output.EndTimestamp ();
}
}
}