public SensorMakerDen(string deviceName, string type, string unit, ValuesPerSample valuesPerSensor, string topic)
 {
     DeviceName = deviceName;
     Type       = type;
     Unit       = unit;
     Topic      = topic;
     Value      = new double[(int)valuesPerSensor];
 }
 public SensorMakerDen(string deviceName, string type, string unit, ValuesPerSample valuesPerSensor, string topic)
 {
     DeviceName = deviceName;
     Type = type;
     Unit = unit;
     Topic = topic;
     Value = new double[(int)valuesPerSensor];
 }
Exemple #3
0
        public SensorBase(SensorType sensorType, ValuesPerSample valuesPerSensor, int SampleRateMilliseconds, string name, string optionalUserDefinedType = "")
            : base(name == null ? _sensorType[(uint)sensorType] : name, optionalUserDefinedType == string.Empty ? _sensorType[(uint)sensorType] : optionalUserDefinedType)
        {
            this.unit = _sensorUnit[(uint)sensorType];
            topic     = topicNamespace + deviceName + "/" + type;
            value     = new double[(uint)valuesPerSensor];
            this.sampleRateMilliseconds = SampleRateMilliseconds;
            this.ThisIotType            = IotType.Sensor;

            SensorThread          = new Thread(new ThreadStart(this.MeasureThread));
            SensorThread.Priority = ThreadPriority.Highest;
        }
        public SensorBase(string sensorType, string sensorUnit, ValuesPerSample valuesPerSensor, int SampleRateMilliseconds, string name)
            : base(name == null ? sensorType : name, sensorType)
        {
            this.unit = sensorUnit;
            topic     = topicNamespace + deviceName + "/" + type;
            value     = new double[(uint)valuesPerSensor];
            this.sampleRateMilliseconds = SampleRateMilliseconds;
            this.ThisIotType            = IotType.Sensor;

            SensorThread          = new Thread(new ThreadStart(this.MeasureThread));
            SensorThread.Priority = ThreadPriority.Highest;
        }
        public SensorBase(string sensorType, string sensorUnit, ValuesPerSample valuesPerSensor, int SampleRateMilliseconds, string name)
            : base(name == null ? sensorType : name, sensorType)
        {
            this.unit = sensorUnit;
            topic = topicNamespace + deviceName + "/" + type;
            value = new double[(uint)valuesPerSensor];
            this.sampleRateMilliseconds = SampleRateMilliseconds;
            this.ThisIotType = IotType.Sensor;

            SensorThread = new Thread(new ThreadStart(this.MeasureThread));
            SensorThread.Priority = ThreadPriority.Highest;
        }