codelabsab / rust-ocpp

Libraries for ocpp 1.6 and 2.0.1
https://docs.rs/rust-ocpp/latest/rust_ocpp/
Apache License 2.0
64 stars 15 forks source link

OCPP1.6 Missing Option for timestamp in StatusNotificationRequest #10

Closed StaticVoidMoon closed 1 year ago

StaticVoidMoon commented 1 year ago

Hi Code Labs,

For OCPP1.6, I think there is a minor error in StatusNotificationRequest. According to the document the timestamp field for StatusNotificationRequest should be an optional field.

pub struct StatusNotificationRequest {
    pub connector_id: u64,
    pub error_code: ChargePointErrorCode,
    pub info: Option<String>,
    pub status: ChargePointStatus,
    pub timestamp: DateTime<Utc>, <-- Option<DateTime<Utc>> I think
    pub vendor_id: Option<String>,
    pub vendor_error_code: Option<String>,
}

I am still beginner in both rust and ev field, so I am sorry if this is my misunderstanding. Thanks.

tommymalmqvist commented 1 year ago

Hello @StaticVoidMoon, I'll have a look later today. Thanks for the issue.