Skip to main content

Sensor

Struct Sensor 

Source
pub struct Sensor {
Show 61 fields pub base: Resource, pub reading_type: Option<Option<ReadingType>>, pub status: Option<Status>, pub reading: Option<Option<Decimal>>, pub reading_units: Option<Option<String>>, pub physical_context: Option<Option<PhysicalContext>>, pub physical_sub_context: Option<Option<PhysicalSubContext>>, pub peak_reading: Option<Option<Decimal>>, pub max_allowable_operating_value: Option<Option<Decimal>>, pub min_allowable_operating_value: Option<Option<Decimal>>, pub adjusted_max_allowable_operating_value: Option<Option<Decimal>>, pub adjusted_min_allowable_operating_value: Option<Option<Decimal>>, pub apparent_va: Option<Option<Decimal>>, pub reactive_var: Option<Option<Decimal>>, pub power_factor: Option<Option<Decimal>>, pub load_percent: Option<Option<Decimal>>, pub location: Option<Location>, pub electrical_context: Option<Option<ElectricalContext>>, pub voltage_type: Option<Option<VoltageType>>, pub thresholds: Option<Thresholds>, pub reading_range_max: Option<Option<Decimal>>, pub reading_range_min: Option<Option<Decimal>>, pub precision: Option<Option<Decimal>>, pub accuracy: Option<Option<Decimal>>, pub sensing_frequency: Option<Option<Decimal>>, pub peak_reading_time: Option<Option<DateTimeOffset>>, pub sensor_reset_time: Option<Option<DateTimeOffset>>, pub actions: Option<Actions>, pub crest_factor: Option<Option<Decimal>>, pub thd_percent: Option<Option<Decimal>>, pub lifetime_reading: Option<Option<Decimal>>, pub sensing_interval: Option<Option<Duration>>, pub reading_time: Option<Option<DateTimeOffset>>, pub implementation: Option<Option<ImplementationType>>, pub speed_rpm: Option<Option<Decimal>>, pub links: Option<Links>, pub sensor_group: Option<RedundantGroup>, pub lowest_reading: Option<Option<Decimal>>, pub lowest_reading_time: Option<Option<DateTimeOffset>>, pub average_reading: Option<Option<Decimal>>, pub averaging_interval: Option<Option<Duration>>, pub averaging_interval_achieved: Option<Option<Boolean>>, pub calibration: Option<Option<Decimal>>, pub calibration_time: Option<Option<DateTimeOffset>>, pub apparentk_vah: Option<Option<Decimal>>, pub reactivek_varh: Option<Option<Decimal>>, pub phase_angle_degrees: Option<Option<Decimal>>, pub reading_basis: Option<Option<ReadingBasisType>>, pub reading_accuracy: Option<Option<Decimal>>, pub manufacturer: Option<Option<String>>, pub model: Option<Option<String>>, pub sku: Option<Option<String>>, pub serial_number: Option<Option<String>>, pub part_number: Option<Option<String>>, pub spare_part_number: Option<Option<String>>, pub user_label: Option<String>, pub lifetime_start_date_time: Option<Option<DateTimeOffset>>, pub enabled: Option<Option<Boolean>>, pub peak_interval_reading: Option<Option<Decimal>>, pub lowest_interval_reading: Option<Option<Decimal>>, pub related_item: Option<Vec<ReferenceLeaf>>,
}
Expand description

The Sensor schema describes a sensor and its properties.

This resource shall represent a sensor for a Redfish implementation.

Fields§

§base: Resource

Base type

§reading_type: Option<Option<ReadingType>>

The type of sensor.

This property shall contain the type of the sensor.

§status: Option<Status>

The status and health of the resource and its subordinate or dependent resources.

This property shall contain any status or health properties of the resource.

§reading: Option<Option<Decimal>>

The sensor value.

This property shall contain the sensor value. This property shall not be returned if the Enabled property is supported and contains false.

§reading_units: Option<Option<String>>

The units of the reading, thresholds, and other reading-related properties in UCUM c/s format.

This property shall contain the units of the sensor’s reading, thresholds, and other reading-related properties. The value shall follow the case-sensitive symbol format defined by the Unified Code for Units of Measure (UCUM), as specified by the ‘Units of measure annotation’ clause of the Redfish Specification.

§physical_context: Option<Option<PhysicalContext>>

The area or device to which this sensor measurement applies.

This property shall contain a description of the affected component or region within the equipment to which this sensor measurement applies.

§physical_sub_context: Option<Option<PhysicalSubContext>>

The usage or location within a device to which this sensor measurement applies.

This property shall contain a description of the usage or sub-region within the equipment to which this sensor measurement applies. This property generally differentiates multiple sensors within the same PhysicalContext instance.

§peak_reading: Option<Option<Decimal>>

The peak sensor value.

This property shall contain the peak sensor value since the last ResetMetrics action was performed or since the service last reset the time-based property values.

§max_allowable_operating_value: Option<Option<Decimal>>

The maximum allowable operating value for this equipment.

This property shall contain the maximum allowable operating value for the equipment that this sensor monitors, as specified by a standards body, manufacturer, or both.

§min_allowable_operating_value: Option<Option<Decimal>>

The minimum allowable operating value for this equipment.

This property shall contain the minimum allowable operating value for the equipment that this sensor monitors, as specified by a standards body, manufacturer, or both.

§adjusted_max_allowable_operating_value: Option<Option<Decimal>>

The adjusted maximum allowable operating value for this equipment based on the environmental conditions.

This property shall contain the adjusted maximum allowable operating value for the equipment that this sensor monitors, as specified by a standards body, manufacturer, or both. The value is adjusted based on environmental conditions. For example, liquid inlet temperature can be adjusted based on the available liquid pressure.

§adjusted_min_allowable_operating_value: Option<Option<Decimal>>

The adjusted minimum allowable operating value for this equipment based on the environmental conditions.

This property shall contain the adjusted minimum allowable operating value for the equipment that this sensor monitors, as specified by a standards body, manufacturer, or both. This value is adjusted based on environmental conditions. For example, liquid inlet temperature can be adjusted based on the available liquid pressure.

§apparent_va: Option<Option<Decimal>>

The product of voltage and current for an AC circuit, in volt-ampere units.

This property shall contain the product of voltage (RMS) multiplied by current (RMS) for a circuit. This property can appear in sensors of the Power ReadingType, and shall not appear in sensors of other ReadingType values.

§reactive_var: Option<Option<Decimal>>

The square root of the difference term of squared apparent VA and squared power (Reading) for a circuit, in VAR units.

This property shall contain the arithmetic mean of product terms of instantaneous voltage and quadrature current measurements calculated over an integer number of line cycles for a circuit. This property can appear in sensors of the Power ReadingType, and shall not appear in sensors of other ReadingType values.

§power_factor: Option<Option<Decimal>>

The power factor for this sensor.

This property shall identify the quotient of real power (W) and apparent power (VA) for a circuit. PowerFactor is expressed in unit-less 1/100ths. This property can appear in sensors containing a ReadingType value of Power, and shall not appear in sensors of other ReadingType values.

§load_percent: Option<Option<Decimal>>

The power load utilization for this sensor.

This property shall indicate the power load utilization percent for this sensor. This property can appear in sensors of the Power ReadingType, and shall not appear in sensors of other ReadingType values.

§location: Option<Location>

The location information for this sensor.

This property shall indicate the location information for this sensor.

§electrical_context: Option<Option<ElectricalContext>>

The combination of current-carrying conductors.

This property shall represent the combination of current-carrying conductors that distribute power.

§voltage_type: Option<Option<VoltageType>>

The voltage type for this sensor.

This property shall represent the type of input voltage the sensor monitors.

§thresholds: Option<Thresholds>

The set of thresholds defined for this sensor.

This property shall contain the set of thresholds that derive a sensor’s health and operational range.

§reading_range_max: Option<Option<Decimal>>

The maximum possible value for this sensor.

This property shall indicate the maximum possible value of the Reading property for this sensor. This value is the range of valid readings for this sensor. Values outside this range are discarded as reading errors.

§reading_range_min: Option<Option<Decimal>>

The minimum possible value for this sensor.

This property shall indicate the minimum possible value of the Reading property for this sensor. This value is the range of valid readings for this sensor. Values outside this range are discarded as reading errors.

§precision: Option<Option<Decimal>>

The number of significant digits in the reading.

This property shall contain the number of significant digits in the Reading property.

§accuracy: Option<Option<Decimal>>

The estimated percent error of measured versus actual values.

This property shall contain the percent error +/- of the measured versus actual values of the Reading property.

§sensing_frequency: Option<Option<Decimal>>

The time interval between readings of the physical sensor.

This property shall contain the time interval between readings of the physical sensor.

§peak_reading_time: Option<Option<DateTimeOffset>>

The time when the peak sensor value occurred.

This property shall contain the date and time when the peak sensor value was observed, as reported as the value of PeakReading.

§sensor_reset_time: Option<Option<DateTimeOffset>>

The date and time when the time-based properties were last reset.

This property shall contain the date and time when the ResetMetrics action was last performed or when the service last reset the time-based property values.

§actions: Option<Actions>

The available actions for this resource.

This property shall contain the available actions for this resource.

§crest_factor: Option<Option<Decimal>>

The crest factor for this sensor.

This property shall contain the ratio of the peak measurement divided by the RMS measurement and calculated over same N line cycles. A sine wave would have a value of 1.414.

§thd_percent: Option<Option<Decimal>>

The total harmonic distortion percent (% THD).

This property shall contain the total harmonic distortion of the Reading property in percent units, typically 0 to 100.

§lifetime_reading: Option<Option<Decimal>>

The total accumulation value for this sensor.

This property shall contain the total accumulation of the Reading property over the sensor’s lifetime. This value shall not be reset by the ResetMetrics action.

§sensing_interval: Option<Option<Duration>>

The time interval between readings of the sensor.

This property shall contain the time interval between readings of data from the sensor.

§reading_time: Option<Option<DateTimeOffset>>

The date and time that the reading was acquired from the sensor.

This property shall contain the date and time that the reading data was acquired from the sensor. This value is used to synchronize readings from multiple sensors and does not represent the time at which the resource was accessed.

§implementation: Option<Option<ImplementationType>>

The implementation of the sensor.

This property shall contain the implementation of the sensor.

§speed_rpm: Option<Option<Decimal>>

The rotational speed.

This property shall contain a reading of the rotational speed of the device in revolutions per minute (RPM) units.

§links: Option<Links>

The links to other resources that are related to this resource.

This property shall contain links to resources that are related to but are not contained by, or subordinate to, this resource.

§sensor_group: Option<RedundantGroup>

The group of sensors that provide readings for this sensor.

This property shall contain information for a group of sensors that provide input for the value of this sensor’s reading. If this property is present, the Implementation property shall contain the value Synthesized. The group may be created for redundancy or to improve the accuracy of the reading through multiple sensor inputs.

§lowest_reading: Option<Option<Decimal>>

The lowest sensor value.

This property shall contain the lowest sensor value since the last ResetMetrics action was performed or since the service last reset the time-based property values.

§lowest_reading_time: Option<Option<DateTimeOffset>>

The time when the lowest sensor value occurred.

This property shall contain the date and time when the lowest sensor value was observed, as reported as the value of LowestReading.

§average_reading: Option<Option<Decimal>>

The average sensor value.

This property shall contain the average sensor value over the time specified by the value of the AveragingInterval property. The value shall be reset by the ResetMetrics action or by a service reset of time-based property values.

§averaging_interval: Option<Option<Duration>>

The interval over which the average sensor value is calculated.

This property shall contain the interval over which the sensor value is averaged to produce the value of the AverageReading property. This property shall only be present if the AverageReading property is present.

§averaging_interval_achieved: Option<Option<Boolean>>

Indicates that enough readings were collected to calculate the average sensor reading over the averaging interval time.

This property shall indicate that enough readings were collected to calculate the AverageReading value over the interval specified by the AveragingInterval property. The value shall be reset by the ResetMetrics action. This property shall only be present if the AveragingInterval property is present.

§calibration: Option<Option<Decimal>>

The calibration offset applied to the Reading.

This property shall contain the offset applied to the raw sensor value to provide a calibrated value for the sensor as returned by the Reading property. The value of this property shall follow the units of the Reading property for this sensor instance. Updating the value of this property shall not affect the value of the CalibrationTime property.

§calibration_time: Option<Option<DateTimeOffset>>

The date and time that the sensor was last calibrated.

This property shall contain the date and time that the sensor was last calibrated. This property is intended to reflect the actual time the calibration occurred.

§apparentk_vah: Option<Option<Decimal>>

Apparent energy (kVAh).

This property shall contain the apparent energy, in kilovolt-ampere-hour units, for an electrical energy measurement. This property can appear in sensors with a ReadingType containing EnergykWh, and shall not appear in sensors with other ReadingType values.

§reactivek_varh: Option<Option<Decimal>>

Reactive energy (kVARh).

This property shall contain the reactive energy, in kilovolt-ampere-hours (reactive) units, for an electrical energy measurement. This property can appear in sensors with a ReadingType containing EnergykWh, and shall not appear in sensors with other ReadingType values.

§phase_angle_degrees: Option<Option<Decimal>>

The phase angle (degrees) between the current and voltage waveforms.

This property shall contain the phase angle, in degree units, between the current and voltage waveforms for an electrical measurement. This property can appear in sensors with a ReadingType containing Power, and shall not appear in sensors with other ReadingType values.

§reading_basis: Option<Option<ReadingBasisType>>

The basis for the reading of this sensor.

This property shall indicate the basis or frame of reference for the value of the Reading property. If this property is not present, the value shall be assumed to be Zero.

§reading_accuracy: Option<Option<Decimal>>

Accuracy (+/-) of the reading.

This property shall contain the accuracy of the value of the Reading property for this sensor. The value shall be the absolute value of the maximum deviation of the Reading from its actual value. The value shall be in units that follow the ReadingUnits for this sensor.

§manufacturer: Option<Option<String>>

The manufacturer of this sensor.

This property shall contain the name of the organization responsible for producing the sensor. This organization may be the entity from whom the sensor is purchased, but this is not necessarily true. This property is generally used only for replaceable or user-configurable sensors.

§model: Option<Option<String>>

The model number of the sensor.

This property shall contain the name by which the manufacturer generally refers to the sensor. This property is generally used only for replaceable or user-configurable sensors.

§sku: Option<Option<String>>

The SKU of the sensor.

This property shall contain the stock-keeping unit number for this sensor. This property is generally used only for replaceable or user-configurable sensors.

§serial_number: Option<Option<String>>

The serial number of the sensor.

This property shall contain a manufacturer-allocated number that identifies the sensor. This property is generally used only for replaceable or user-configurable sensors.

§part_number: Option<Option<String>>

The part number of the sensor.

This property shall contain a part number assigned by the organization that is responsible for producing or manufacturing the sensor. This property is generally used only for replaceable or user-configurable sensors.

§spare_part_number: Option<Option<String>>

The spare part number of the sensor.

This property shall contain the spare part number of the sensor. This property is generally used only for replaceable or user-configurable sensors.

§user_label: Option<String>

A user-assigned label.

This property shall contain a user-assigned label used to identify this resource. This property shall only be present if the sensor can be configured for different purposes, or is dependent on configuration or end-user settings. This property shall not be present for embedded sensors with defined functions that cannot be altered. If a value has not been assigned by a user, the value of this property shall be an empty string.

§lifetime_start_date_time: Option<Option<DateTimeOffset>>

The date and time when the sensor started accumulating readings for the LifetimeReading property.

This property shall contain the date and time when the sensor started accumulating readings for the LifetimeReading property. This might contain the same value as the production date of the device that contains this sensor.

§enabled: Option<Option<Boolean>>

Indicates whether the sensor is enabled and provides a reading.

This property shall indicate whether the sensor is enabled and provides a Reading. The value true shall indicate the sensor is enabled and returns the Reading property with a valid value. The value false shall indicate the sensor is disabled, shall not return the Reading property, and shall not trigger events, logging, or other functionality. This property allows a user to disable a faulty sensor or to otherwise remove it from use.

§peak_interval_reading: Option<Option<Decimal>>

The peak sensor value over a time interval.

This property shall contain the peak sensor value over the time specified by the value of the AveragingInterval property. The value shall be reset by the ResetMetrics action or by a service reset of time-based property values.

§lowest_interval_reading: Option<Option<Decimal>>

The lowest sensor value over a time interval.

This property shall contain the lowest sensor value over the time specified by the value of the AveragingInterval property. The value shall be reset by the ResetMetrics action or by a service reset of time-based property values.

§related_item: Option<Vec<ReferenceLeaf>>

Trait Implementations§

Source§

impl Debug for Sensor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Sensor

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl EntityTypeRef for Sensor

Source§

fn odata_id(&self) -> &ODataId

Value of @odata.id field of the Entity.
Source§

fn etag(&self) -> Option<&ODataETag>

Value of @odata.etag field of the Entity.
Source§

fn refresh<B>( &self, bmc: &B, ) -> impl Future<Output = Result<Arc<Self>, <B as Bmc>::Error>> + Send
where B: Bmc, Self: Sized + Sync + Send + 'static + for<'de> Deserialize<'de>,

Refresh the entity by fetching it again from the BMC.
Source§

impl Expandable for Sensor

Source§

fn expand<B>( &self, bmc: &B, query: ExpandQuery, ) -> impl Future<Output = Result<Arc<Self>, <B as Bmc>::Error>> + Send
where B: Bmc,

Expand the entity according to the provided query.
Source§

impl RedfishSettings<Sensor> for Sensor

Source§

fn settings_object(&self) -> Option<NavProperty<Self>>

Reference to the enity type object.
Source§

impl Updatable<SensorUpdate> for Sensor

Source§

fn update<B>( &self, bmc: &B, update: &V, ) -> impl Future<Output = Result<ModificationResponse<Self>, <B as Bmc>::Error>> + Send
where B: Bmc,

Update an entity using update as payload.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,