pub struct SensorManagerChannels {
pub tx_sensor_manager_to_tcp_opt: Option<AquaSender<InternalCommand>>,
pub rx_sensor_manager_from_tcp_opt: Option<AquaReceiver<Result<f32, TcpCommunicationError>>>,
pub tx_sensor_manager_to_signal_handler: AquaSender<bool>,
pub rx_sensor_manager_from_signal_handler: AquaReceiver<InternalCommand>,
}Fields§
§tx_sensor_manager_to_tcp_opt: Option<AquaSender<InternalCommand>>Sender part of the channel for communication via TCP wrapped as optional
rx_sensor_manager_from_tcp_opt: Option<AquaReceiver<Result<f32, TcpCommunicationError>>>Receiver part of the channel for communication via TCP wrapped as optional
tx_sensor_manager_to_signal_handler: AquaSender<bool>Sender part of the channel for communication to the signal handler
rx_sensor_manager_from_signal_handler: AquaReceiver<InternalCommand>Receiver part of the channel for communication from the signal handler
Implementations§
Source§impl SensorManagerChannels
impl SensorManagerChannels
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 SensorManagerChannels
impl AcknowledgeSignalHandlerTrait for SensorManagerChannels
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 SensorManagerChannels
impl RefUnwindSafe for SensorManagerChannels
impl Send for SensorManagerChannels
impl !Sync for SensorManagerChannels
impl Unpin for SensorManagerChannels
impl UnwindSafe for SensorManagerChannels
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