Example #1
0
 private SensorCloud.Sensor getSensor(SensorCloud.Device device)
 {
     var sensor = device.GetSensor(this.DPDeviceID.ToString());
     return sensor;
 }
Example #2
0
 private SensorCloud.Sensor addSensor(SensorCloud.Device device, Device DPDevice)
 {
     SensorCloud.Sensor sensor = null;
     if (!device.HasSensor(this.DPDeviceID.ToString()))
     {
         sensor = device.AddSensor(this.DPDeviceID.ToString(), DPDevice.Name, DPDevice.ProductType.Name, DPDevice.SerialNumber);
     }
     else
     {
         sensor = getSensor(device);
     }
     return sensor;
 }
Example #3
0
 private SensorCloud.Channel getChannel(SensorCloud.Sensor sensor, string channelID)
 {
     SensorCloud.Channel channel = sensor.GetChannel(channelID);
     return channel;
 }
Example #4
0
 private SensorCloud.Channel addChannel(SensorCloud.Sensor sensor, string channelID, string label, string description)
 {
     SensorCloud.Channel channel = null;
     if (!sensor.HasChannel(channelID))
     {
         channel = sensor.AddChannel(channelID, label, description);
     }
     return channel;
 }