CS101_ClockSynchronizationHandler

Type Alias CS101_ClockSynchronizationHandler 

Source
pub type CS101_ClockSynchronizationHandler = Option<unsafe extern "C" fn(parameter: *mut c_void, connection: IMasterConnection, asdu: CS101_ASDU, newTime: CP56Time2a) -> bool>;
Expand description

Handler for clock synchronization command (C_CS_NA_1 - 103)

This handler will be called whenever a time synchronization command is received. NOTE: The CS104_Slave instance will automatically send an ACT-CON message for the received time sync command.

§Arguments

  • parameter (direction in) - user provided parameter
  • connection (direction in) - represents the (TCP) connection that received the time sync command
  • asdu (direction in) - the received ASDU
  • the (direction in, out) - time received with the time sync message. The user can update this time for the ACT-CON message

§Returns

true when time synchronization has been successful, false otherwise

Aliased Type§

pub enum CS101_ClockSynchronizationHandler {
    None,
    Some(unsafe extern "C" fn(*mut c_void, *mut sIMasterConnection, *mut sCS101_ASDU, *mut sCP56Time2a) -> bool),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*mut c_void, *mut sIMasterConnection, *mut sCS101_ASDU, *mut sCP56Time2a) -> bool)

Some value of type T.