wsnsim/node.py
def _main_routine(self) -> Generator[Event, Any, Any]:
        """Main routine of the nodes."""
        self._print_info('is awake')
        # Start routing protocol setup routine
        self.env.process(self.routing_protocol.setup())
        # Wait for the sensing offset
        yield self.env.timeout(self.sensing_offset)
        while True:
            # Sensing every 15 minutes
            event = self._send_message(self._format_measurement('X'), 'sink')
            self.env.process(event)
            yield self.env.timeout(self.sensing_period)
Main routine of the nodes.
Main routine of the nodes.
Main routine of the nodes .
def _main_routine(self) -> Generator[Event, Any, Any]:
        self._print_info('is awake')
        self.env.process(self.routing_protocol.setup())
        yield self.env.timeout(self.sensing_offset)
        while True:
            event = self._send_message(self._format_measurement('X'), 'sink')
            self.env.process(event)
            yield self.env.timeout(self.sensing_period)
def _main_routine ( self ) -> Generator [ Event , Any , Any ] : self . _print_info ( 'is awake' ) self . env . process ( self . routing_protocol . setup ( ) ) yield self . env . timeout ( self . sensing_offset ) while True : event = self . _send_message ( self . _format_measurement ( 'X' ) , 'sink' ) self . env . process ( event ) yield self . env . timeout ( self . sensing_period )
Main routine of the nodes.
Main routine of the nodes .
"""Main routine of the nodes.""" # Start routing protocol setup routine # Wait for the sensing offset # Sensing every 15 minutes
self