forked from dk307/HSPI_InfluxDBPersistence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDevicePersistenceData.cs
43 lines (39 loc) · 1.46 KB
/
DevicePersistenceData.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using NullGuard;
using System.Collections.Generic;
namespace Hspi
{
internal enum TrackedType
{
Value = 0,
String = 1,
}
[NullGuard(ValidationFlags.Arguments | ValidationFlags.NonPublic)]
internal sealed class DevicePersistenceData
{
public DevicePersistenceData(string id, int deviceRefId, string measurement,
[AllowNull]string field, [AllowNull]string fieldString,
[AllowNull]IReadOnlyDictionary<string, string> tags,
[AllowNull]double? maxValidValue, [AllowNull]double? minValidValue,
[AllowNull]TrackedType? trackedType = null)
{
Id = id;
DeviceRefId = deviceRefId;
Measurement = measurement;
Field = field;
FieldString = fieldString;
Tags = tags;
MaxValidValue = maxValidValue;
MinValidValue = minValidValue;
TrackedType = trackedType ?? TrackedType.Value;
}
public int DeviceRefId { get; }
public string Id { get; }
public string Measurement { get; }
public string Field { get; }
public string FieldString { get; }
public IReadOnlyDictionary<string, string> Tags { get; }
public double? MaxValidValue { get; }
public double? MinValidValue { get; }
public TrackedType TrackedType { get; }
}
}