Exemple #1
0
    def stop(self):

        # call superclass to stop--sets self._running
        # to False so that the 'run' loop will exit cleanly.
        BackendBase.stop(self)

        # disconnect from modem
        if self.modem is not None:
            self.modem.disconnect()
Exemple #2
0
    def start(self):
        self.sent_messages = 0
        self.received_messages = 0

        self.modem = pygsm.GsmModem(
            logger=self.gsm_log,
            **self.modem_kwargs)

        # If we got the connection, call superclass to
        # start the run loop--it just sets self._running to True
        # and calls run.
        if self.modem is not None:
            BackendBase.start(self)
Exemple #3
0
    def start(self):
        self.sent_messages = 0
        self.failed_messages = 0
        self.received_messages = 0

        self.modem = pygsm.GsmModem(
            logger=self.gsm_log,
            **self.modem_kwargs)

        # if we connected successfully to the modem, call
        # superclass to start the run loop -- it just sets
        # self._running to True and calls run.
        if self.modem is not None:
            BackendBase.start(self)