/// <summary> /// Creates a packet that, when received by a remote terminus, will set the unit /// for a given sensor. /// </summary> /// <param name="sensorIndex">The 1-based index of the sensor to set the unit for.</param> /// <param name="sensorType">The sensor type. This is necessary to deduce the proper /// unit code for the packet.</param> /// <param name="unit">The unit that the terminus will be set to.</param> /// <returns></returns> // Overridden from IGaugeProtocol public override byte[] CreateSetUnitCommand(int sensorIndex, Sensors.ESensorType sensorType, Unit unit) { var ret = new byte[] { 0x02, (byte)UnitLookup.GetCode(unit), (byte)sensorIndex }; return(ret); }
/// <summary> /// Initializes a new instance of the <see cref="ION.Core.Devices.Protocols.ClassicPressureProtocol"/> class. /// </summary> /// <param name="sensorIndex">Sensor index.</param> /// <param name="sensorType">Sensor type.</param> /// <param name="unit">Unit.</param> public byte[] CreateSetUnitCommand(int sensorIndex, Sensors.ESensorType sensorType, Unit unit) { return(new byte[] { }); }
// Overridden from IGaugeProtocol public abstract byte[] CreateSetUnitCommand(int sensorIndex, Sensors.ESensorType sensorType, Unit unit);