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(); }
public EnumMqttItem(IItemValue itemValue, RefreshPriority priority, ComfoBoxMqttClient mqttClient, string topic, Func<ComfoBoxClient> comfoBoxClientFunc) : base(itemValue, priority, mqttClient, topic, comfoBoxClientFunc) { }
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); }
public BacnetValue ReadValue(IItemValue item) { BacnetValue val; ReadScalarValue(Settings.Default.BacnetMasterId, item.BacnetObjectId, BacnetPropertyIds.PROP_PRESENT_VALUE, out val); return val; }