ocpp/v2_1/datatype/signed_meter_value
OCPP 2.1 SignedMeterValue data type (schema SignedMeterValueType).
to_json/decoder map to/from its OCPP-J JSON object; new (when
present) builds a value from the required fields only.
Types
Represent a signed version of the meter value.
| Field | Type | Req | Description |
|---|---|---|---|
custom_data | CustomData | — | |
encoding_method | String | ✓ | Format used by the energy meter to encode the meter data. For example: OCMF or EDL. (max 50 chars) |
public_key | String | — | (2.1) Base64 encoded, sending depends on configuration variable PublicKeyWithSignedMeterValue. (max 2500 chars) |
signed_meter_data | String | ✓ | Base64 encoded, contains the signed data from the meter in the format specified in encodingMethod, which might contain more then just the meter value. It can contain information like timestamps, reference to a customer etc. (max 32768 chars) |
signing_method | String | — | (2.1) Method used to create the digital signature. Optional, if already included in signedMeterData. Standard values for this are defined in Appendix as SigningMethodEnumStringType. (max 50 chars) |
Schema: SignedMeterValueType
pub type SignedMeterValue {
SignedMeterValue(
custom_data: option.Option(custom_data.CustomData),
encoding_method: String,
public_key: option.Option(String),
signed_meter_data: String,
signing_method: option.Option(String),
)
}
Constructors
-
SignedMeterValue( custom_data: option.Option(custom_data.CustomData), encoding_method: String, public_key: option.Option(String), signed_meter_data: String, signing_method: option.Option(String), )
Values
pub fn decoder() -> decode.Decoder(SignedMeterValue)
Decode a SignedMeterValue from its OCPP-J JSON object, enforcing schema constraints.
pub fn new(
encoding_method encoding_method: String,
signed_meter_data signed_meter_data: String,
) -> SignedMeterValue
Construct a SignedMeterValue from its required fields, with every optional field set to None.
pub fn to_json(value: SignedMeterValue) -> json.Json
Encode a SignedMeterValue to its OCPP-J JSON object.