Newer
Older
using SDK.Contracts.Data;
using SDK.Models;
namespace Main
{
public static class TestData
{
public static BeaconContract GetBeacon()
{
return new BeaconContract
{
SectorId = 1,
BranchId = 1,
Mac = "aa:aa:aa:aa:aa:aa",
X = 0,
Y = 0,
Z = 0,
Title = "sdk-test",
Active = true,
TypeId = 23,
Position = true,
Geofence = true,
GeofenceRange = 20,
Cluster = "c1",
UseGps = false,
};
}
public static BeaconContract GetBeaconPatch()
{
return new BeaconContract
{
X = 0,
Y = 0,
Z = 0,
Title = "sdk-test",
Active = true,
TypeId = 24,
Position = true,
Geofence = true,
GeofenceRange = 20,
Cluster = "c1",
UseGps = false,
};
}
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
public static DeviceLocationContract[] GetLocalizationDataBatch()
{
DistanceContract[] distanceContract1 = new DistanceContract[]
{
new DistanceContract {BeaconId = 34, RSSI= -56},
new DistanceContract {BeaconId = 34, RSSI= -56},
new DistanceContract {BeaconId = 34, RSSI= -56},
};
LocationContract[] locationContract = new LocationContract[]
{
new LocationContract {SectorId = 1, Battery = 100, IsMoving = true, Timestamp = 1599644652178,
X = 0, Y = 0, Z = 0, Interval = 300, Distances = distanceContract1 },
new LocationContract {SectorId = 2, Battery = 100, IsMoving = true, Timestamp = 1599644652178,
X = 0, Y = 0, Z = 0, Interval = 300, Distances = distanceContract1 },
new LocationContract {SectorId = 3, Battery = 100, IsMoving = true, Timestamp = 1599644652178,
X = 0, Y = 0, Z = 0, Interval = 300, Distances = distanceContract1 },
new LocationContract {SectorId = 4, Battery = 100, IsMoving = true, Timestamp = 1599644652178,
X = 0, Y = 0, Z = 0, Interval = 300, Distances = distanceContract1 },
};
return new DeviceLocationContract[] { new DeviceLocationContract { Login = "sdk-device", Locations = locationContract } };
}
public static LocationContract[] GetLocalizationData()
{
DistanceContract[] distanceContract1 = new DistanceContract[]
{
new DistanceContract {BeaconId = 34, RSSI= -56},
new DistanceContract {BeaconId = 34, RSSI= -56},
new DistanceContract {BeaconId = 34, RSSI= -56},
};
return new LocationContract[]
{
new LocationContract {SectorId = 1, Battery = 100, IsMoving = true, Timestamp = 1599644652178,
X = 0, Y = 0, Z = 0, Interval = 300, Distances = distanceContract1 },
new LocationContract {SectorId = 2, Battery = 100, IsMoving = true, Timestamp = 1599644652178,
X = 0, Y = 0, Z = 0, Interval = 300, Distances = distanceContract1 },
new LocationContract {SectorId = 3, Battery = 100, IsMoving = true, Timestamp = 1599644652178,
X = 0, Y = 0, Z = 0, Interval = 300, Distances = distanceContract1 },
new LocationContract {SectorId = 4, Battery = 100, IsMoving = true, Timestamp = 1599644652178,
X = 0, Y = 0, Z = 0, Interval = 300, Distances = distanceContract1 },
};
}
public static SensorContract GetSensor()
{
SensorDataContract data1 = new SensorDataContract
{
Quantity = "Temperature",
Value = "16",
Unit = "°C",
};
SensorDataContract data2 = new SensorDataContract
{
Quantity = "Humidity",
Value = "31",
Unit = "%",
};
SensorDataContract[] sensorDataContracts = new SensorDataContract[] { data1, data2 };
SensorContract sensor = new SensorContract
{
Id = 7351,
Login = "sdk-sensor2",
Title = "testtt",
SectorId = 2,
SensorData = sensorDataContracts,
AreaId = 19
};
return sensor;
}
public static SensorContract GetSensorUpdate()
{
SensorContract sensor = new SensorContract
{
Id = 7351,
Login = "sdk-sensor2",
Title = "tests",
SectorId = 2,
AreaId = 19
};
return sensor;
}
public static SensorContract[] GetSensorDataBatch()
{
SensorDataContract data1 = new SensorDataContract
{
Quantity = "Temperature",
Value = "16",
Unit = "°C",
};
SensorDataContract data2 = new SensorDataContract
{
Quantity = "Humidity",
Value = "31",
Unit = "%",
};
SensorDataContract data3 = new SensorDataContract
{
Quantity = "CO2",
Timestamp = 1614599484673,
Value = "800",
DataType = "Int32",
};
SensorDataContract[] sensorDataContracts = new SensorDataContract[] { data1, data2, data3 };
SensorContract sensor = new SensorContract
{
Login = "sdk-sensor",
SectorId = 2,
SensorData = sensorDataContracts,
AreaId = 24
};
SensorContract[] sensorContracts = new SensorContract[] { sensor };
return sensorContracts;
}
public static SensorDataContract[] GetSensorData()
{
SensorDataContract data1 = new SensorDataContract
{
Quantity = "Temperature",
Value = "16",
Unit = "°C",
};
SensorDataContract data2 = new SensorDataContract
{
Quantity = "Humidity",
Value = "31",
Unit = "%",
};
SensorDataContract data3 = new SensorDataContract
{
Quantity = "CO2",
Timestamp = 1614599484673,
Value = "800",
DataType = "Int32",
};
SensorDataContract[] sensorDataContracts = new SensorDataContract[] { data1, data2, data3 };
return sensorDataContracts;
}
}
}