pub struct TankLevelSwitchChannels {
pub tx_tank_level_switch_to_tcp_opt: Option<AquaSender<InternalCommand>>,
pub rx_tank_level_switch_from_tcp_opt: Option<AquaReceiver<Result<f32, TcpCommunicationError>>>,
pub tx_tank_level_switch_to_signal_handler: AquaSender<bool>,
pub rx_tank_level_switch_from_signal_handler: AquaReceiver<InternalCommand>,
}Fields§
§tx_tank_level_switch_to_tcp_opt: Option<AquaSender<InternalCommand>>§rx_tank_level_switch_from_tcp_opt: Option<AquaReceiver<Result<f32, TcpCommunicationError>>>§tx_tank_level_switch_to_signal_handler: AquaSender<bool>§rx_tank_level_switch_from_signal_handler: AquaReceiver<InternalCommand>Implementations§
Source§impl TankLevelSwitchChannels
impl TankLevelSwitchChannels
Sourcepub fn send_to_tcp(
&mut self,
command: InternalCommand,
) -> Option<Result<(), AquaChannelError>>
pub fn send_to_tcp( &mut self, command: InternalCommand, ) -> Option<Result<(), AquaChannelError>>
Sends a command to the TCP simulator if the channel exists.
Sourcepub fn receive_from_tcp(
&mut self,
) -> Option<Result<Result<f32, TcpCommunicationError>, AquaChannelError>>
pub fn receive_from_tcp( &mut self, ) -> Option<Result<Result<f32, TcpCommunicationError>, AquaChannelError>>
Receives a result from the TCP simulator if the channel exists.
Sourcepub fn send_to_signal_handler(
&mut self,
ack: bool,
) -> Result<(), AquaChannelError>
pub fn send_to_signal_handler( &mut self, ack: bool, ) -> Result<(), AquaChannelError>
Sends an acknowledgment to the signal handler.
Sourcepub fn receive_from_signal_handler(
&mut self,
) -> Result<InternalCommand, AquaChannelError>
pub fn receive_from_signal_handler( &mut self, ) -> Result<InternalCommand, AquaChannelError>
Receives a command from the signal handler.
Trait Implementations§
Source§impl AcknowledgeSignalHandlerTrait for TankLevelSwitchChannels
impl AcknowledgeSignalHandlerTrait for TankLevelSwitchChannels
Source§fn send_true_to_signal_handler(&mut self) -> Result<(), AquaChannelError>
fn send_true_to_signal_handler(&mut self) -> Result<(), AquaChannelError>
Source§fn location(&self) -> String
fn location(&self) -> String
Returns the source location (module path) for logging purposes. Read more
Source§fn acknowledge_signal_handler(&mut self)
fn acknowledge_signal_handler(&mut self)
Acknowledges the
SignalHandler by sending a confirmation message. Read moreAuto Trait Implementations§
impl Freeze for TankLevelSwitchChannels
impl RefUnwindSafe for TankLevelSwitchChannels
impl Send for TankLevelSwitchChannels
impl !Sync for TankLevelSwitchChannels
impl Unpin for TankLevelSwitchChannels
impl UnwindSafe for TankLevelSwitchChannels
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