public SetpointCommandNormalized(int objectAddress, float value, SetpointCommandQualifier qos) : base(objectAddress) { // TODO check if value is in range this.scaledValue = (int)(value * 32767f); this.qos = qos; }
internal SetpointCommandScaled(ConnectionParameters parameters, byte[] msg, int startIndex) : base(parameters, msg, startIndex, false) { startIndex += parameters.SizeOfIOA; /* skip IOA */ scaledValue = new ScaledValue(msg, startIndex); startIndex += 2; this.qos = new SetpointCommandQualifier(msg[startIndex++]); }
internal SetpointCommandShort(ConnectionParameters parameters, byte[] msg, int startIndex) : base(parameters, msg, startIndex, false) { startIndex += parameters.SizeOfIOA; /* skip IOA */ /* parse float value */ value = System.BitConverter.ToSingle(msg, startIndex); startIndex += 4; this.qos = new SetpointCommandQualifier(msg[startIndex++]); }
internal SetpointCommandNormalized(ConnectionParameters parameters, byte[] msg, int startIndex) : base(parameters, msg, startIndex, false) { startIndex += parameters.SizeOfIOA; /* skip IOA */ scaledValue = msg[startIndex++]; scaledValue += (msg[startIndex++] * 0x100); if (scaledValue > 32767) { scaledValue = scaledValue - 65536; } this.qos = new SetpointCommandQualifier(msg[startIndex++]); }
public SetpointCommandShortWithCP56Time2a(int objectAddress, float value, SetpointCommandQualifier qos, CP56Time2a timestamp) : base(objectAddress, value, qos) { this.timestamp = timestamp; }
public SetpointCommandShort(int objectAddress, float value, SetpointCommandQualifier qos) : base(objectAddress) { this.value = value; this.qos = qos; }
public SetpointCommandScaledWithCP56Time2a(int objectAddress, ScaledValue value, SetpointCommandQualifier qos, CP56Time2a timestamp) : base(objectAddress, value, qos) { this.timestamp = timestamp; }
public SetpointCommandScaled(int objectAddress, ScaledValue value, SetpointCommandQualifier qos) : base(objectAddress) { this.scaledValue = value; this.qos = qos; }
public SetpointCommandNormalized(int ObjectAddress, short value, SetpointCommandQualifier qos) : base(ObjectAddress) { this.scaledValue = new ScaledValue(value); this.qos = qos; }
public SetpointCommandNormalized(int objectAddress, float value, SetpointCommandQualifier qos) : base(objectAddress) { this.scaledValue = new ScaledValue((int)((value * 32767.5) - 0.5)); this.qos = qos; }