diff --git a/Interface/Harp.Olfactometer/AsyncDevice.Generated.cs b/Interface/Harp.Olfactometer/AsyncDevice.Generated.cs index a2dc709..bab3e3c 100644 --- a/Interface/Harp.Olfactometer/AsyncDevice.Generated.cs +++ b/Interface/Harp.Olfactometer/AsyncDevice.Generated.cs @@ -2385,6 +2385,102 @@ public async Task WriteChannel3RangeAsync(Channel3RangeConfig value, Cancellatio await CommandAsync(request, cancellationToken); } + /// + /// Asynchronously reads the contents of the TemperatureValue register. + /// + /// + /// A which can be used to cancel the operation. + /// + /// + /// A task that represents the asynchronous read operation. The + /// property contains the register payload. + /// + public async Task ReadTemperatureValueAsync(CancellationToken cancellationToken = default) + { + var reply = await CommandAsync(HarpCommand.ReadByte(TemperatureValue.Address), cancellationToken); + return TemperatureValue.GetPayload(reply); + } + + /// + /// Asynchronously reads the timestamped contents of the TemperatureValue register. + /// + /// + /// A which can be used to cancel the operation. + /// + /// + /// A task that represents the asynchronous read operation. The + /// property contains the timestamped register payload. + /// + public async Task> ReadTimestampedTemperatureValueAsync(CancellationToken cancellationToken = default) + { + var reply = await CommandAsync(HarpCommand.ReadByte(TemperatureValue.Address), cancellationToken); + return TemperatureValue.GetTimestampedPayload(reply); + } + + /// + /// Asynchronously reads the contents of the EnableTemperatureCalibration register. + /// + /// + /// A which can be used to cancel the operation. + /// + /// + /// A task that represents the asynchronous read operation. The + /// property contains the register payload. + /// + public async Task ReadEnableTemperatureCalibrationAsync(CancellationToken cancellationToken = default) + { + var reply = await CommandAsync(HarpCommand.ReadByte(EnableTemperatureCalibration.Address), cancellationToken); + return EnableTemperatureCalibration.GetPayload(reply); + } + + /// + /// Asynchronously reads the timestamped contents of the EnableTemperatureCalibration register. + /// + /// + /// A which can be used to cancel the operation. + /// + /// + /// A task that represents the asynchronous read operation. The + /// property contains the timestamped register payload. + /// + public async Task> ReadTimestampedEnableTemperatureCalibrationAsync(CancellationToken cancellationToken = default) + { + var reply = await CommandAsync(HarpCommand.ReadByte(EnableTemperatureCalibration.Address), cancellationToken); + return EnableTemperatureCalibration.GetTimestampedPayload(reply); + } + + /// + /// Asynchronously reads the contents of the UserTemperatureCalibration register. + /// + /// + /// A which can be used to cancel the operation. + /// + /// + /// A task that represents the asynchronous read operation. The + /// property contains the register payload. + /// + public async Task ReadUserTemperatureCalibrationAsync(CancellationToken cancellationToken = default) + { + var reply = await CommandAsync(HarpCommand.ReadByte(UserTemperatureCalibration.Address), cancellationToken); + return UserTemperatureCalibration.GetPayload(reply); + } + + /// + /// Asynchronously reads the timestamped contents of the UserTemperatureCalibration register. + /// + /// + /// A which can be used to cancel the operation. + /// + /// + /// A task that represents the asynchronous read operation. The + /// property contains the timestamped register payload. + /// + public async Task> ReadTimestampedUserTemperatureCalibrationAsync(CancellationToken cancellationToken = default) + { + var reply = await CommandAsync(HarpCommand.ReadByte(UserTemperatureCalibration.Address), cancellationToken); + return UserTemperatureCalibration.GetTimestampedPayload(reply); + } + /// /// Asynchronously reads the contents of the EnableEvents register. /// diff --git a/Interface/Harp.Olfactometer/Device.Generated.cs b/Interface/Harp.Olfactometer/Device.Generated.cs index 4adeddd..d1993cd 100644 --- a/Interface/Harp.Olfactometer/Device.Generated.cs +++ b/Interface/Harp.Olfactometer/Device.Generated.cs @@ -58,11 +58,6 @@ public Device() : base(WhoAmI) { } { 50, typeof(Channel2ActualFlow) }, { 51, typeof(Channel3ActualFlow) }, { 52, typeof(Channel4ActualFlow) }, - { 53, typeof(Channel0Frequency) }, - { 54, typeof(Channel1Frequency) }, - { 55, typeof(Channel2Frequency) }, - { 56, typeof(Channel3Frequency) }, - { 57, typeof(Channel4Frequency) }, { 58, typeof(Channel0DutyCycle) }, { 59, typeof(Channel1DutyCycle) }, { 60, typeof(Channel2DutyCycle) }, @@ -84,7 +79,6 @@ public Device() : base(WhoAmI) { } { 76, typeof(Valve3PulseDuration) }, { 77, typeof(EndValve0PulseDuration) }, { 78, typeof(EndValve1PulseDuration) }, - { 79, typeof(PulseDummyValve) }, { 80, typeof(DO0Sync) }, { 81, typeof(DO1Sync) }, { 82, typeof(DI0Trigger) }, @@ -94,12 +88,11 @@ public Device() : base(WhoAmI) { } { 86, typeof(MimicValve3) }, { 87, typeof(MimicEndValve0) }, { 88, typeof(MimicEndValve1) }, - { 89, typeof(MimicDummyValve) }, { 90, typeof(EnableValveExternalControl) }, { 91, typeof(Channel3Range) }, - { 92, typeof(Reserved0) }, - { 93, typeof(Reserved1) }, - { 94, typeof(Reserved2) }, + { 92, typeof(TemperatureValue) }, + { 93, typeof(EnableTemperatureCalibration) }, + { 94, typeof(UserTemperatureCalibration) }, { 95, typeof(EnableEvents) } }; } @@ -182,6 +175,9 @@ public override IObservable> Process(IObse /// /// /// + /// + /// + /// /// [XmlInclude(typeof(EnableFlow))] [XmlInclude(typeof(Flowmeter))] @@ -236,6 +232,9 @@ public override IObservable> Process(IObse [XmlInclude(typeof(MimicEndValve1))] [XmlInclude(typeof(EnableValveExternalControl))] [XmlInclude(typeof(Channel3Range))] + [XmlInclude(typeof(TemperatureValue))] + [XmlInclude(typeof(EnableTemperatureCalibration))] + [XmlInclude(typeof(UserTemperatureCalibration))] [XmlInclude(typeof(EnableEvents))] [Description("Filters register-specific messages reported by the Olfactometer device.")] public class FilterRegister : FilterRegisterBuilder, INamedElement @@ -311,6 +310,9 @@ string INamedElement.Name /// /// /// + /// + /// + /// /// [XmlInclude(typeof(EnableFlow))] [XmlInclude(typeof(Flowmeter))] @@ -365,6 +367,9 @@ string INamedElement.Name [XmlInclude(typeof(MimicEndValve1))] [XmlInclude(typeof(EnableValveExternalControl))] [XmlInclude(typeof(Channel3Range))] + [XmlInclude(typeof(TemperatureValue))] + [XmlInclude(typeof(EnableTemperatureCalibration))] + [XmlInclude(typeof(UserTemperatureCalibration))] [XmlInclude(typeof(EnableEvents))] [XmlInclude(typeof(TimestampedEnableFlow))] [XmlInclude(typeof(TimestampedFlowmeter))] @@ -419,6 +424,9 @@ string INamedElement.Name [XmlInclude(typeof(TimestampedMimicEndValve1))] [XmlInclude(typeof(TimestampedEnableValveExternalControl))] [XmlInclude(typeof(TimestampedChannel3Range))] + [XmlInclude(typeof(TimestampedTemperatureValue))] + [XmlInclude(typeof(TimestampedEnableTemperatureCalibration))] + [XmlInclude(typeof(TimestampedUserTemperatureCalibration))] [XmlInclude(typeof(TimestampedEnableEvents))] [Description("Filters and selects specific messages reported by the Olfactometer device.")] public partial class Parse : ParseBuilder, INamedElement @@ -491,6 +499,9 @@ public Parse() /// /// /// + /// + /// + /// /// [XmlInclude(typeof(EnableFlow))] [XmlInclude(typeof(Flowmeter))] @@ -545,6 +556,9 @@ public Parse() [XmlInclude(typeof(MimicEndValve1))] [XmlInclude(typeof(EnableValveExternalControl))] [XmlInclude(typeof(Channel3Range))] + [XmlInclude(typeof(TemperatureValue))] + [XmlInclude(typeof(EnableTemperatureCalibration))] + [XmlInclude(typeof(UserTemperatureCalibration))] [XmlInclude(typeof(EnableEvents))] [Description("Formats a sequence of values as specific Olfactometer register messages.")] public partial class Format : FormatBuilder, INamedElement @@ -2627,116 +2641,6 @@ public static Timestamped GetPayload(HarpMessage message) } } - /// - /// Represents a register that switching frequency for proportional valve 0 - DO NOT CHANGE [Hz]. - /// - [Description("Switching frequency for proportional valve 0 - DO NOT CHANGE [Hz].")] - internal partial class Channel0Frequency - { - /// - /// Represents the address of the register. This field is constant. - /// - public const int Address = 53; - - /// - /// Represents the payload type of the register. This field is constant. - /// - public const PayloadType RegisterType = PayloadType.U16; - - /// - /// Represents the length of the register. This field is constant. - /// - public const int RegisterLength = 1; - } - - /// - /// Represents a register that switching frequency for proportional valve 1 - DO NOT CHANGE [Hz]. - /// - [Description("Switching frequency for proportional valve 1 - DO NOT CHANGE [Hz].")] - internal partial class Channel1Frequency - { - /// - /// Represents the address of the register. This field is constant. - /// - public const int Address = 54; - - /// - /// Represents the payload type of the register. This field is constant. - /// - public const PayloadType RegisterType = PayloadType.U16; - - /// - /// Represents the length of the register. This field is constant. - /// - public const int RegisterLength = 1; - } - - /// - /// Represents a register that switching frequency for proportional valve 2 - DO NOT CHANGE [Hz]. - /// - [Description("Switching frequency for proportional valve 2 - DO NOT CHANGE [Hz].")] - internal partial class Channel2Frequency - { - /// - /// Represents the address of the register. This field is constant. - /// - public const int Address = 55; - - /// - /// Represents the payload type of the register. This field is constant. - /// - public const PayloadType RegisterType = PayloadType.U16; - - /// - /// Represents the length of the register. This field is constant. - /// - public const int RegisterLength = 1; - } - - /// - /// Represents a register that switching frequency for proportional valve 3 - DO NOT CHANGE [Hz]. - /// - [Description("Switching frequency for proportional valve 3 - DO NOT CHANGE [Hz].")] - internal partial class Channel3Frequency - { - /// - /// Represents the address of the register. This field is constant. - /// - public const int Address = 56; - - /// - /// Represents the payload type of the register. This field is constant. - /// - public const PayloadType RegisterType = PayloadType.U16; - - /// - /// Represents the length of the register. This field is constant. - /// - public const int RegisterLength = 1; - } - - /// - /// Represents a register that switching frequency for proportional valve 4 - DO NOT CHANGE [Hz]. - /// - [Description("Switching frequency for proportional valve 4 - DO NOT CHANGE [Hz].")] - internal partial class Channel4Frequency - { - /// - /// Represents the address of the register. This field is constant. - /// - public const int Address = 57; - - /// - /// Represents the payload type of the register. This field is constant. - /// - public const PayloadType RegisterType = PayloadType.U16; - - /// - /// Represents the length of the register. This field is constant. - /// - public const int RegisterLength = 1; - } - /// /// Represents a register that duty cycle for proportional valve 0 [%]. /// @@ -4763,28 +4667,6 @@ public static Timestamped GetPayload(HarpMessage message) } } - /// - /// Represents a register that dummy valve pulse duration [1:65535] ms. - /// - [Description("Dummy valve pulse duration [1:65535] ms.")] - internal partial class PulseDummyValve - { - /// - /// Represents the address of the register. This field is constant. - /// - public const int Address = 79; - - /// - /// Represents the payload type of the register. This field is constant. - /// - public const PayloadType RegisterType = PayloadType.U16; - - /// - /// Represents the length of the register. This field is constant. - /// - public const int RegisterLength = 1; - } - /// /// Represents a register that configuration of the digital output 0 (DOUT0). /// @@ -5658,28 +5540,6 @@ public static Timestamped GetPayload(HarpMessage message) } } - /// - /// Represents a register that mimic DummyValve. - /// - [Description("Mimic DummyValve.")] - internal partial class MimicDummyValve - { - /// - /// Represents the address of the register. This field is constant. - /// - public const int Address = 89; - - /// - /// Represents the payload type of the register. This field is constant. - /// - public const PayloadType RegisterType = PayloadType.U8; - - /// - /// Represents the length of the register. This field is constant. - /// - public const int RegisterLength = 1; - } - /// /// Represents a register that enable the valves control via low-level IO screw terminals. /// @@ -5875,69 +5735,291 @@ public static Timestamped GetPayload(HarpMessage message) } /// - /// Represents a register that reserved for future use. + /// Represents a register that temperature sensor reading value. /// - [Description("Reserved for future use.")] - internal partial class Reserved0 + [Description("Temperature sensor reading value.")] + public partial class TemperatureValue { /// - /// Represents the address of the register. This field is constant. + /// Represents the address of the register. This field is constant. /// public const int Address = 92; /// - /// Represents the payload type of the register. This field is constant. + /// Represents the payload type of the register. This field is constant. /// public const PayloadType RegisterType = PayloadType.U8; /// - /// Represents the length of the register. This field is constant. + /// Represents the length of the register. This field is constant. /// public const int RegisterLength = 1; + + /// + /// Returns the payload data for register messages. + /// + /// A object representing the register message. + /// A value representing the message payload. + public static byte GetPayload(HarpMessage message) + { + return message.GetPayloadByte(); + } + + /// + /// Returns the timestamped payload data for register messages. + /// + /// A object representing the register message. + /// A value representing the timestamped message payload. + public static Timestamped GetTimestampedPayload(HarpMessage message) + { + return message.GetTimestampedPayloadByte(); + } + + /// + /// Returns a Harp message for the register. + /// + /// The type of the Harp message. + /// The value to be stored in the message payload. + /// + /// A object for the register + /// with the specified message type and payload. + /// + public static HarpMessage FromPayload(MessageType messageType, byte value) + { + return HarpMessage.FromByte(Address, messageType, value); + } + + /// + /// Returns a timestamped Harp message for the + /// register. + /// + /// The timestamp of the message payload, in seconds. + /// The type of the Harp message. + /// The value to be stored in the message payload. + /// + /// A object for the register + /// with the specified message type, timestamp, and payload. + /// + public static HarpMessage FromPayload(double timestamp, MessageType messageType, byte value) + { + return HarpMessage.FromByte(Address, timestamp, messageType, value); + } } /// - /// Represents a register that reserved for future use. + /// Provides methods for manipulating timestamped messages from the + /// TemperatureValue register. /// - [Description("Reserved for future use.")] - internal partial class Reserved1 + /// + [Description("Filters and selects timestamped messages from the TemperatureValue register.")] + public partial class TimestampedTemperatureValue { /// - /// Represents the address of the register. This field is constant. + /// Represents the address of the register. This field is constant. + /// + public const int Address = TemperatureValue.Address; + + /// + /// Returns timestamped payload data for register messages. + /// + /// A object representing the register message. + /// A value representing the timestamped message payload. + public static Timestamped GetPayload(HarpMessage message) + { + return TemperatureValue.GetTimestampedPayload(message); + } + } + + /// + /// Represents a register that enable flow adjustment based on the temperature calibration. + /// + [Description("Enable flow adjustment based on the temperature calibration.")] + public partial class EnableTemperatureCalibration + { + /// + /// Represents the address of the register. This field is constant. /// public const int Address = 93; /// - /// Represents the payload type of the register. This field is constant. + /// Represents the payload type of the register. This field is constant. /// public const PayloadType RegisterType = PayloadType.U8; /// - /// Represents the length of the register. This field is constant. + /// Represents the length of the register. This field is constant. /// public const int RegisterLength = 1; + + /// + /// Returns the payload data for register messages. + /// + /// A object representing the register message. + /// A value representing the message payload. + public static byte GetPayload(HarpMessage message) + { + return message.GetPayloadByte(); + } + + /// + /// Returns the timestamped payload data for register messages. + /// + /// A object representing the register message. + /// A value representing the timestamped message payload. + public static Timestamped GetTimestampedPayload(HarpMessage message) + { + return message.GetTimestampedPayloadByte(); + } + + /// + /// Returns a Harp message for the register. + /// + /// The type of the Harp message. + /// The value to be stored in the message payload. + /// + /// A object for the register + /// with the specified message type and payload. + /// + public static HarpMessage FromPayload(MessageType messageType, byte value) + { + return HarpMessage.FromByte(Address, messageType, value); + } + + /// + /// Returns a timestamped Harp message for the + /// register. + /// + /// The timestamp of the message payload, in seconds. + /// The type of the Harp message. + /// The value to be stored in the message payload. + /// + /// A object for the register + /// with the specified message type, timestamp, and payload. + /// + public static HarpMessage FromPayload(double timestamp, MessageType messageType, byte value) + { + return HarpMessage.FromByte(Address, timestamp, messageType, value); + } } /// - /// Represents a register that reserved for future use. + /// Provides methods for manipulating timestamped messages from the + /// EnableTemperatureCalibration register. /// - [Description("Reserved for future use.")] - internal partial class Reserved2 + /// + [Description("Filters and selects timestamped messages from the EnableTemperatureCalibration register.")] + public partial class TimestampedEnableTemperatureCalibration { /// - /// Represents the address of the register. This field is constant. + /// Represents the address of the register. This field is constant. + /// + public const int Address = EnableTemperatureCalibration.Address; + + /// + /// Returns timestamped payload data for register messages. + /// + /// A object representing the register message. + /// A value representing the timestamped message payload. + public static Timestamped GetPayload(HarpMessage message) + { + return EnableTemperatureCalibration.GetTimestampedPayload(message); + } + } + + /// + /// Represents a register that user temperature calibration value. + /// + [Description("User temperature calibration value.")] + public partial class UserTemperatureCalibration + { + /// + /// Represents the address of the register. This field is constant. /// public const int Address = 94; /// - /// Represents the payload type of the register. This field is constant. + /// Represents the payload type of the register. This field is constant. /// public const PayloadType RegisterType = PayloadType.U8; /// - /// Represents the length of the register. This field is constant. + /// Represents the length of the register. This field is constant. /// public const int RegisterLength = 1; + + /// + /// Returns the payload data for register messages. + /// + /// A object representing the register message. + /// A value representing the message payload. + public static byte GetPayload(HarpMessage message) + { + return message.GetPayloadByte(); + } + + /// + /// Returns the timestamped payload data for register messages. + /// + /// A object representing the register message. + /// A value representing the timestamped message payload. + public static Timestamped GetTimestampedPayload(HarpMessage message) + { + return message.GetTimestampedPayloadByte(); + } + + /// + /// Returns a Harp message for the register. + /// + /// The type of the Harp message. + /// The value to be stored in the message payload. + /// + /// A object for the register + /// with the specified message type and payload. + /// + public static HarpMessage FromPayload(MessageType messageType, byte value) + { + return HarpMessage.FromByte(Address, messageType, value); + } + + /// + /// Returns a timestamped Harp message for the + /// register. + /// + /// The timestamp of the message payload, in seconds. + /// The type of the Harp message. + /// The value to be stored in the message payload. + /// + /// A object for the register + /// with the specified message type, timestamp, and payload. + /// + public static HarpMessage FromPayload(double timestamp, MessageType messageType, byte value) + { + return HarpMessage.FromByte(Address, timestamp, messageType, value); + } + } + + /// + /// Provides methods for manipulating timestamped messages from the + /// UserTemperatureCalibration register. + /// + /// + [Description("Filters and selects timestamped messages from the UserTemperatureCalibration register.")] + public partial class TimestampedUserTemperatureCalibration + { + /// + /// Represents the address of the register. This field is constant. + /// + public const int Address = UserTemperatureCalibration.Address; + + /// + /// Returns timestamped payload data for register messages. + /// + /// A object representing the register message. + /// A value representing the timestamped message payload. + public static Timestamped GetPayload(HarpMessage message) + { + return UserTemperatureCalibration.GetTimestampedPayload(message); + } } /// @@ -6094,6 +6176,9 @@ public static Timestamped GetPayload(HarpMessage message) /// /// /// + /// + /// + /// /// [XmlInclude(typeof(CreateEnableFlowPayload))] [XmlInclude(typeof(CreateFlowmeterPayload))] @@ -6148,6 +6233,9 @@ public static Timestamped GetPayload(HarpMessage message) [XmlInclude(typeof(CreateMimicEndValve1Payload))] [XmlInclude(typeof(CreateEnableValveExternalControlPayload))] [XmlInclude(typeof(CreateChannel3RangePayload))] + [XmlInclude(typeof(CreateTemperatureValuePayload))] + [XmlInclude(typeof(CreateEnableTemperatureCalibrationPayload))] + [XmlInclude(typeof(CreateUserTemperatureCalibrationPayload))] [XmlInclude(typeof(CreateEnableEventsPayload))] [XmlInclude(typeof(CreateTimestampedEnableFlowPayload))] [XmlInclude(typeof(CreateTimestampedFlowmeterPayload))] @@ -6202,6 +6290,9 @@ public static Timestamped GetPayload(HarpMessage message) [XmlInclude(typeof(CreateTimestampedMimicEndValve1Payload))] [XmlInclude(typeof(CreateTimestampedEnableValveExternalControlPayload))] [XmlInclude(typeof(CreateTimestampedChannel3RangePayload))] + [XmlInclude(typeof(CreateTimestampedTemperatureValuePayload))] + [XmlInclude(typeof(CreateTimestampedEnableTemperatureCalibrationPayload))] + [XmlInclude(typeof(CreateTimestampedUserTemperatureCalibrationPayload))] [XmlInclude(typeof(CreateTimestampedEnableEventsPayload))] [Description("Creates standard message payloads for the Olfactometer device.")] public partial class CreateMessage : CreateMessageBuilder, INamedElement @@ -9171,6 +9262,168 @@ public HarpMessage GetMessage(double timestamp, MessageType messageType) } } + /// + /// Represents an operator that creates a message payload + /// that temperature sensor reading value. + /// + [DisplayName("TemperatureValuePayload")] + [Description("Creates a message payload that temperature sensor reading value.")] + public partial class CreateTemperatureValuePayload + { + /// + /// Gets or sets the value that temperature sensor reading value. + /// + [Description("The value that temperature sensor reading value.")] + public byte TemperatureValue { get; set; } + + /// + /// Creates a message payload for the TemperatureValue register. + /// + /// The created message payload value. + public byte GetPayload() + { + return TemperatureValue; + } + + /// + /// Creates a message that temperature sensor reading value. + /// + /// Specifies the type of the created message. + /// A new message for the TemperatureValue register. + public HarpMessage GetMessage(MessageType messageType) + { + return Harp.Olfactometer.TemperatureValue.FromPayload(messageType, GetPayload()); + } + } + + /// + /// Represents an operator that creates a timestamped message payload + /// that temperature sensor reading value. + /// + [DisplayName("TimestampedTemperatureValuePayload")] + [Description("Creates a timestamped message payload that temperature sensor reading value.")] + public partial class CreateTimestampedTemperatureValuePayload : CreateTemperatureValuePayload + { + /// + /// Creates a timestamped message that temperature sensor reading value. + /// + /// The timestamp of the message payload, in seconds. + /// Specifies the type of the created message. + /// A new timestamped message for the TemperatureValue register. + public HarpMessage GetMessage(double timestamp, MessageType messageType) + { + return Harp.Olfactometer.TemperatureValue.FromPayload(timestamp, messageType, GetPayload()); + } + } + + /// + /// Represents an operator that creates a message payload + /// that enable flow adjustment based on the temperature calibration. + /// + [DisplayName("EnableTemperatureCalibrationPayload")] + [Description("Creates a message payload that enable flow adjustment based on the temperature calibration.")] + public partial class CreateEnableTemperatureCalibrationPayload + { + /// + /// Gets or sets the value that enable flow adjustment based on the temperature calibration. + /// + [Description("The value that enable flow adjustment based on the temperature calibration.")] + public byte EnableTemperatureCalibration { get; set; } + + /// + /// Creates a message payload for the EnableTemperatureCalibration register. + /// + /// The created message payload value. + public byte GetPayload() + { + return EnableTemperatureCalibration; + } + + /// + /// Creates a message that enable flow adjustment based on the temperature calibration. + /// + /// Specifies the type of the created message. + /// A new message for the EnableTemperatureCalibration register. + public HarpMessage GetMessage(MessageType messageType) + { + return Harp.Olfactometer.EnableTemperatureCalibration.FromPayload(messageType, GetPayload()); + } + } + + /// + /// Represents an operator that creates a timestamped message payload + /// that enable flow adjustment based on the temperature calibration. + /// + [DisplayName("TimestampedEnableTemperatureCalibrationPayload")] + [Description("Creates a timestamped message payload that enable flow adjustment based on the temperature calibration.")] + public partial class CreateTimestampedEnableTemperatureCalibrationPayload : CreateEnableTemperatureCalibrationPayload + { + /// + /// Creates a timestamped message that enable flow adjustment based on the temperature calibration. + /// + /// The timestamp of the message payload, in seconds. + /// Specifies the type of the created message. + /// A new timestamped message for the EnableTemperatureCalibration register. + public HarpMessage GetMessage(double timestamp, MessageType messageType) + { + return Harp.Olfactometer.EnableTemperatureCalibration.FromPayload(timestamp, messageType, GetPayload()); + } + } + + /// + /// Represents an operator that creates a message payload + /// that user temperature calibration value. + /// + [DisplayName("UserTemperatureCalibrationPayload")] + [Description("Creates a message payload that user temperature calibration value.")] + public partial class CreateUserTemperatureCalibrationPayload + { + /// + /// Gets or sets the value that user temperature calibration value. + /// + [Description("The value that user temperature calibration value.")] + public byte UserTemperatureCalibration { get; set; } + + /// + /// Creates a message payload for the UserTemperatureCalibration register. + /// + /// The created message payload value. + public byte GetPayload() + { + return UserTemperatureCalibration; + } + + /// + /// Creates a message that user temperature calibration value. + /// + /// Specifies the type of the created message. + /// A new message for the UserTemperatureCalibration register. + public HarpMessage GetMessage(MessageType messageType) + { + return Harp.Olfactometer.UserTemperatureCalibration.FromPayload(messageType, GetPayload()); + } + } + + /// + /// Represents an operator that creates a timestamped message payload + /// that user temperature calibration value. + /// + [DisplayName("TimestampedUserTemperatureCalibrationPayload")] + [Description("Creates a timestamped message payload that user temperature calibration value.")] + public partial class CreateTimestampedUserTemperatureCalibrationPayload : CreateUserTemperatureCalibrationPayload + { + /// + /// Creates a timestamped message that user temperature calibration value. + /// + /// The timestamp of the message payload, in seconds. + /// Specifies the type of the created message. + /// A new timestamped message for the UserTemperatureCalibration register. + public HarpMessage GetMessage(double timestamp, MessageType messageType) + { + return Harp.Olfactometer.UserTemperatureCalibration.FromPayload(timestamp, messageType, GetPayload()); + } + } + /// /// Represents an operator that creates a message payload /// that specifies the active events in the device. diff --git a/Interface/Harp.Olfactometer/Harp.Olfactometer.csproj b/Interface/Harp.Olfactometer/Harp.Olfactometer.csproj index 7362e5c..00117b0 100644 --- a/Interface/Harp.Olfactometer/Harp.Olfactometer.csproj +++ b/Interface/Harp.Olfactometer/Harp.Olfactometer.csproj @@ -17,7 +17,7 @@ LICENSE ..\bin\$(Configuration) net462;netstandard2.0 - 0.1.0 + 0.1.1 9.0 diff --git a/device.yml b/device.yml index 9f964c4..13699aa 100644 --- a/device.yml +++ b/device.yml @@ -3,7 +3,7 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/harp-tech/reflex-generator/main/schema/device.json device: Olfactometer whoAmI: 1140 -firmwareVersion: "1.2" +firmwareVersion: "1.3" hardwareTargets: "1.0" registers: EnableFlow: @@ -325,18 +325,21 @@ registers: access: Write maskType: Channel3RangeConfig description: Selects the flow range for the channel 3. - Reserved0: &reserved + TemperatureValue: address: 92 type: U8 access: Read - description: Reserved for future use. - visibility: private - Reserved1: - <<: *reserved + description: Temperature sensor reading value. + EnableTemperatureCalibration: address: 93 - Reserved2: - <<: *reserved + type: U8 + access: Read + description: Enable flow adjustment based on the temperature calibration. + UserTemperatureCalibration: address: 94 + type: U8 + access: Read + description: Temperature value measured during the device calibration. EnableEvents: address: 95 access: Write