ocpp/v2_1/datatype/gradient
OCPP 2.1 Gradient data type (schema GradientType).
to_json/decoder map to/from its OCPP-J JSON object; new (when
present) builds a value from the required fields only.
Types
| Field | Type | Req | Description |
|---|---|---|---|
custom_data | CustomData | — | |
gradient | Float | ✓ | Default ramp rate in seconds (0 if not applicable) |
priority | Int | ✓ | Id of setting (≥ 0) |
soft_gradient | Float | ✓ | Soft-start ramp rate in seconds (0 if not applicable) |
Schema: GradientType
pub type Gradient {
Gradient(
custom_data: option.Option(custom_data.CustomData),
gradient: Float,
priority: Int,
soft_gradient: Float,
)
}
Constructors
-
Gradient( custom_data: option.Option(custom_data.CustomData), gradient: Float, priority: Int, soft_gradient: Float, )
Values
pub fn decoder() -> decode.Decoder(Gradient)
Decode a Gradient from its OCPP-J JSON object, enforcing schema constraints.
pub fn new(
gradient gradient: Float,
priority priority: Int,
soft_gradient soft_gradient: Float,
) -> Gradient
Construct a Gradient from its required fields, with every optional field set to None.