ocpp/v2_0_1/datatype/signed_meter_value
OCPP 2.0.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 | ✓ | Method used to encode the meter values before applying the digital signature algorithm. (max 50 chars) |
public_key | String | ✓ | Base64 encoded, sending depends on configuration variable PublicKeyWithSignedMeterValue. (max 2500 chars) |
signed_meter_data | String | ✓ | Base64 encoded, contains the signed data which might contain more then just the meter value. It can contain information like timestamps, reference to a customer etc. (max 2500 chars) |
signing_method | String | ✓ | Method used to create the digital signature. (max 50 chars) |
Schema: SignedMeterValueType
pub type SignedMeterValue {
SignedMeterValue(
custom_data: option.Option(custom_data.CustomData),
encoding_method: String,
public_key: String,
signed_meter_data: String,
signing_method: String,
)
}
Constructors
-
SignedMeterValue( custom_data: option.Option(custom_data.CustomData), encoding_method: String, public_key: String, signed_meter_data: String, signing_method: 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,
public_key public_key: String,
signed_meter_data signed_meter_data: String,
signing_method signing_method: 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.