Skip to main content

cimstructs/
CurveStyle.rs

1/// Style or shape of curve.
2#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
3pub enum CurveStyle {
4    /// The Y-axis values are assumed constant until the next curve point and prior to the first curve point.
5    constantYValue,
6    /// The Y-axis values are assumed to be a straight line between values. Also known as linear interpolation.
7    straightLineYValues,
8}
9
10impl CurveStyle {
11    pub fn uri(&self) -> &'static str {
12        match self {
13            CurveStyle::constantYValue => "http://iec.ch/TC57/CIM100#CurveStyle.constantYValue",
14            CurveStyle::straightLineYValues => "http://iec.ch/TC57/CIM100#CurveStyle.straightLineYValues",
15        }
16    }
17}