ocpp/v2_0_1/datatype/charging_profile
OCPP 2.0.1 ChargingProfile data type (schema ChargingProfileType).
to_json/decoder map to/from its OCPP-J JSON object; new (when
present) builds a value from the required fields only.
Types
A ChargingProfile consists of ChargingSchedule, describing the amount of power or current that can be delivered per time interval.
| Field | Type | Req | Description |
|---|---|---|---|
charging_profile_kind | ChargingProfileKind | ✓ | |
charging_profile_purpose | ChargingProfilePurpose | ✓ | |
charging_schedule | List(ChargingSchedule) | ✓ | |
custom_data | CustomData | — | |
id | Int | ✓ | Id of ChargingProfile. |
recurrency_kind | RecurrencyKind | — | |
stack_level | Int | ✓ | Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0. |
transaction_id | String | — | SHALL only be included if ChargingProfilePurpose is set to TxProfile. The transactionId is used to match the profile to a specific transaction. (max 36 chars) |
valid_from | DateTime | — | Point in time at which the profile starts to be valid. If absent, the profile is valid as soon as it is received by the Charging Station. |
valid_to | DateTime | — | Point in time at which the profile stops to be valid. If absent, the profile is valid until it is replaced by another profile. |
Schema: ChargingProfileType · Charging_Profile · urn:x-oca:ocpp:uid:2:233255
pub type ChargingProfile {
ChargingProfile(
charging_profile_kind: charging_profile_kind.ChargingProfileKind,
charging_profile_purpose: charging_profile_purpose.ChargingProfilePurpose,
charging_schedule: List(charging_schedule.ChargingSchedule),
custom_data: option.Option(custom_data.CustomData),
id: Int,
recurrency_kind: option.Option(recurrency_kind.RecurrencyKind),
stack_level: Int,
transaction_id: option.Option(String),
valid_from: option.Option(timestamp.Timestamp),
valid_to: option.Option(timestamp.Timestamp),
)
}
Constructors
-
ChargingProfile( charging_profile_kind: charging_profile_kind.ChargingProfileKind, charging_profile_purpose: charging_profile_purpose.ChargingProfilePurpose, charging_schedule: List(charging_schedule.ChargingSchedule), custom_data: option.Option(custom_data.CustomData), id: Int, recurrency_kind: option.Option(recurrency_kind.RecurrencyKind), stack_level: Int, transaction_id: option.Option(String), valid_from: option.Option(timestamp.Timestamp), valid_to: option.Option(timestamp.Timestamp), )
Values
pub fn decoder() -> decode.Decoder(ChargingProfile)
Decode a ChargingProfile from its OCPP-J JSON object, enforcing schema constraints.
pub fn new(
charging_profile_kind charging_profile_kind: charging_profile_kind.ChargingProfileKind,
charging_profile_purpose charging_profile_purpose: charging_profile_purpose.ChargingProfilePurpose,
charging_schedule charging_schedule: List(
charging_schedule.ChargingSchedule,
),
id id: Int,
stack_level stack_level: Int,
) -> ChargingProfile
Construct a ChargingProfile from its required fields, with every optional field set to None.
pub fn to_json(value: ChargingProfile) -> json.Json
Encode a ChargingProfile to its OCPP-J JSON object.