liftof_rb::threads::data_publisher

Function data_publisher

Source
pub fn data_publisher(
    data: &Receiver<TofPacket>,
    address: String,
    output_fname: Option<String>,
    print_packets: bool,
    thread_control: Arc<Mutex<ThreadControl>>,
)
Expand description

Manage the 0MQ PUB socket and send everything which comes in over the wire as a byte payload

§Arguments

  • write_to_disk : Write data to local disk (most likely a SD card). This option should be only used for diagnostic purposes.
  • address : IP address to use for the local PUB socket to publish data over the network
  • output_fname : In case a local file should be written, write it with this name. In case of a calibration file, then also save it in the dedicated foler. If this is None, don’t write anything.
  • print_packets : Print outgoing packets to terminal