For the payloads in the intervals, the data type of the value is determined by the type of the payload.
The VTN should make sure that the data type it expects for the provided type matches the one it received.
|
/// Represents one or more values associated with a type. E.g. a type of PRICE contains a single float value. |
|
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] |
|
pub struct EventValuesMap { |
|
/// Enumerated or private string signifying the nature of values. E.G. \"PRICE\" indicates value is to be interpreted as a currency. |
|
#[serde(rename = "type")] |
|
pub value_type: EventType, |
|
/// A list of data points. Most often a singular value such as a price. |
|
// TODO: The type of Value is actually defined by value_type |
|
pub values: Vec<Value>, |
|
} |
For the payloads in the intervals, the data type of the value is determined by the
typeof the payload.The VTN should make sure that the data type it expects for the provided
typematches the one it received.openleadr-rs/openleadr-wire/src/event.rs
Lines 237 to 246 in a0d0128