示例#1
0
 public MqttItem(IItemValue itemValue, RefreshPriority priority, ComfoBoxMqttClient mqttClient, string topic,
     Func<ComfoBoxClient> comfoBoxClientFunc)
 {
     _comfoBoxClientFunc = comfoBoxClientFunc;
     ItemValue = itemValue;
     Priority = priority;
     MqttClient = mqttClient;
     Topic = topic;
     ItemValue.PropertyChanged += ItemValue_PropertyChanged;
     SubscribeValues();
 }
示例#2
0
 public EnumMqttItem(IItemValue itemValue, RefreshPriority priority, ComfoBoxMqttClient mqttClient, string topic,
     Func<ComfoBoxClient> comfoBoxClientFunc)
     : base(itemValue, priority, mqttClient, topic, comfoBoxClientFunc)
 {
 }
示例#3
0
 public bool WriteValue(IItemValue item, object newItemValue)
 {
     BacnetValue val = new BacnetValue(item.Tag, item.ConvertValueBack(newItemValue));
     return WriteScalarValue(Settings.Default.BacnetMasterId,
         item.BacnetObjectId,
         BacnetPropertyIds.PROP_PRESENT_VALUE,
         val);
 }
示例#4
0
 public BacnetValue ReadValue(IItemValue item)
 {
     BacnetValue val;
     ReadScalarValue(Settings.Default.BacnetMasterId,
         item.BacnetObjectId,
         BacnetPropertyIds.PROP_PRESENT_VALUE,
         out val);
     return val;
 }