Class RainPointSceneCondition
- Namespace
- RainPointClient
- Assembly
- RainPointClient.dll
An immutable condition. Unsupported vendor conditions are identified without exposing their encoded payload.
public sealed class RainPointSceneCondition
- Inheritance
-
RainPointSceneCondition
- Inherited Members
Properties
AtLocal
Home-local wall time; no conversion using the computer's time zone is made.
public DateTime? AtLocal { get; }
Property Value
ClockTime
Gets the home-local time of day for a fixed-clock condition, or null for other conditions.
public TimeSpan? ClockTime { get; }
Property Value
Comparison
Gets the decoded threshold comparison, or null when unavailable.
public RainPointSceneComparison? Comparison { get; }
Property Value
Description
Gets a readable decoded description or an explicit unsupported-condition message.
public string Description { get; }
Property Value
DeviceAddress
Gets the associated RF address for a device condition, or null for other condition families.
public int? DeviceAddress { get; }
Property Value
- int?
Enabled
Gets the recognized enabled flag, or null for an unknown value.
public bool? Enabled { get; }
Property Value
- bool?
HubId
Gets the associated positive hub ID, or null when absent.
public long? HubId { get; }
Property Value
- long?
Kind
Gets the recognized condition kind, or Unsupported without discarding its wire representation.
public RainPointSceneConditionKind Kind { get; }
Property Value
Metric
Gets the weather-threshold metric, or null when this is not a decoded weather-threshold condition.
public RainPointSceneWeatherMetric? Metric { get; }
Property Value
Repeat
Gets the time condition's recurrence pattern, or null when unavailable.
public RainPointSceneRepeat? Repeat { get; }
Property Value
Threshold
Gets the threshold in the selected metric's units, or null when unavailable.
public decimal? Threshold { get; }
Property Value
Time
Gets the fixed-clock or solar-time selection, or null when unavailable.
public RainPointSceneTime? Time { get; }
Property Value
WeatherTypeCodes
Gets the matched vendor weather codes for a weather-types condition, otherwise an empty list.
public IReadOnlyList<int> WeatherTypeCodes { get; }
Property Value
Weekdays
Gets the selected weekday mask for weekly recurrence; None denotes no selected weekdays.
public RainPointSceneWeekdays Weekdays { get; }
Property Value
Methods
Once(DateTime)
Creates a one-time condition at a home-local wall-clock time.
public static RainPointSceneCondition Once(DateTime homeLocal)
Parameters
homeLocalDateTimeA whole-minute home-local wall time in 2020 through 2083 with Unspecified kind.
Returns
- RainPointSceneCondition
An immutable one-time home-local condition.
Exceptions
- ArgumentException
Use a whole minute in home-local time, 2020..2083.
Repeating(RainPointSceneRepeat, RainPointSceneTime, TimeSpan?, RainPointSceneWeekdays)
Creates a recurring condition using a fixed local time or sunrise/sunset.
public static RainPointSceneCondition Repeating(RainPointSceneRepeat repeat, RainPointSceneTime time, TimeSpan? clockTime = null, RainPointSceneWeekdays weekdays = RainPointSceneWeekdays.None)
Parameters
repeatRainPointSceneRepeatThe recurrence pattern; the operation validates the supported combinations.
timeRainPointSceneTimeA fixed local clock time, sunrise or sunset selector.
clockTimeTimeSpan?A whole-minute time from midnight through 23:59, required only for a fixed-clock condition.
weekdaysRainPointSceneWeekdaysThe selected weekdays, used only with a weekly recurrence.
Returns
- RainPointSceneCondition
An immutable repeating clock or solar-time condition.
Exceptions
- ArgumentOutOfRangeException
An argument is outside the supported range described above.
- ArgumentException
Specify weekdays only for a weekday recurrence. Specify a whole-minute clock time only for a clock condition.
Weather(RainPointSceneWeatherMetric, RainPointSceneComparison, decimal)
Creates a threshold comparison using the units of the selected weather metric.
public static RainPointSceneCondition Weather(RainPointSceneWeatherMetric metric, RainPointSceneComparison comparison, decimal threshold)
Parameters
metricRainPointSceneWeatherMetricThe weather metric whose documented units determine the threshold.
comparisonRainPointSceneComparisonThe comparison applied to the selected weather metric.
thresholddecimalThe threshold: -40..60 Celsius in 0.1-degree steps, 0..150 km/h in whole units, or 0..100 percent in whole units, according to the metric.
Returns
- RainPointSceneCondition
An immutable weather-threshold condition.
Exceptions
- ArgumentOutOfRangeException
An argument is outside the supported range described above.
WeatherTypes(IReadOnlyList<RainPointWeatherType>)
Creates a condition matching the selected vendor weather-condition codes.
public static RainPointSceneCondition WeatherTypes(IReadOnlyList<RainPointWeatherType> types)
Parameters
typesIReadOnlyList<RainPointWeatherType>Distinct weather catalog entries with codes from 0 through 31.
Returns
- RainPointSceneCondition
An immutable condition matching the selected weather codes.
Exceptions
- ArgumentException
Select distinct types from the weather catalog.