public void ReceivedInteger(ILogoVariable <short> logoVariable, byte[] payload) { if (mqttFormat.ToValue(payload, out short value)) { logoVariable.Set(value); } }
public void ReceivedByte(ILogoVariable <byte> logoVariable, byte[] payload) { if (mqttFormat.ToValue(payload, out byte value)) { logoVariable.Set(value); } }
public void ReceivedFloat(ILogoVariable <float> logoVariable, byte[] payload) { if (mqttFormat.ToValue(payload, out float value)) { logoVariable.Set(value); } }
public async Task PublishFloat(ILogoVariable <float> logoVariable, string topic, bool retain, MqttQualityOfServiceLevel qualityOfService) { var value = logoVariable.Get(); await Publish(topic, MqttFormat.ToPayload(value), retain, qualityOfService).ConfigureAwait(false); }
public NotificationContext(int address, int length, ILogoVariable <T> logoVariable, Action <ILogoVariable <T> > onChanged) : base(address, length) { this.logoVariable = logoVariable; this.onChanged = onChanged; }