pub struct StationCtx {
pub app: App,
pub station_id: i64,
pub identity: String,
pub station_evse_id: String,
pub version: OcppVersion,
pub registration: Registration,
}Expand description
State of a connected station shared with the version handlers.
Fields§
§app: App§station_id: i64§identity: String§station_evse_id: StringStation S e-mobility ID, used to derive EVSE IDs.
version: OcppVersion§registration: RegistrationImplementations§
Source§impl StationCtx
impl StationCtx
pub fn now() -> DateTime
pub fn heartbeat_interval(&self) -> i64
Sourcepub async fn log_event(&self, action: &str, payload: &str)
pub async fn log_event(&self, action: &str, payload: &str)
Stores a message in the station event log. Failures are logged, not propagated: losing an audit entry must not make the station retry the message.
Sourcepub async fn boot(
&mut self,
info: &BootInfo<'_>,
) -> Result<Registration, RpcError>
pub async fn boot( &mut self, info: &BootInfo<'_>, ) -> Result<Registration, RpcError>
Records a BootNotification and decides the registration status from
the station’s boot_policy (the operator’s onboarding control).
pub async fn heartbeat(&self) -> Result<(), RpcError>
Sourcepub async fn status(&self, u: &StatusUpdate<'_>) -> Result<(), RpcError>
pub async fn status(&self, u: &StatusUpdate<'_>) -> Result<(), RpcError>
Connector status; evse_number == 0 is the station itself.
pub async fn meter_values( &self, transaction_id: Option<i64>, evse_number: i32, at: Ts, sampled: &Value, ) -> Result<(), RpcError>
Auto Trait Implementations§
impl !RefUnwindSafe for StationCtx
impl !UnwindSafe for StationCtx
impl Freeze for StationCtx
impl Send for StationCtx
impl Sync for StationCtx
impl Unpin for StationCtx
impl UnsafeUnpin for StationCtx
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more