Esempio n. 1
0
 def __init__(self):
     DEVICE.__init__(self)
     self.sreader = asyncio.StreamReader(self.uart)
     self.swriter = asyncio.StreamWriter(self.uart, {})
     self.data = b''
     self.prompt_timeout = self.config['Ctd']['Prompt_Timeout']
     self.warmup_interval = self.config['Warmup_Interval']
Esempio n. 2
0
 def __init__(self, instance):
     self.instance = instance
     self.config_file = __name__ + "." + constants.CONFIG_TYPE
     DEVICE.__init__(self, self.instance)
     self.timeout = self.config["Timeout"]
     self.usr_cfg = ()
     self.hw_cfg = ()
     self.head_cfg = ()
Esempio n. 3
0
 def __init__(self):
     DEVICE.__init__(self)
     self.sreader = asyncio.StreamReader(self.uart)
     self.swriter = asyncio.StreamWriter(self.uart, {})
     self.data = b''
     self.warmup_interval = self.config['Warmup_Interval']
     self.data_length = self.config['Data_Length']
     self.string_label = self.config['String_Label']
     self.records = 0
Esempio n. 4
0
 def __init__(self):
     DEVICE.__init__(self)
     self.sreader = asyncio.StreamReader(self.uart)
     self.swriter = asyncio.StreamWriter(self.uart, {})
     self.data = b''
     self.warmup_interval = self.config['Warmup_Interval']
     self.fix = None
     self.fixed = timesync
     self.displacement = 0
Esempio n. 5
0
 def __init__(self):
     DEVICE.__init__(self)
     self.sreader = asyncio.StreamReader(self.uart)
     self.swriter = asyncio.StreamWriter(self.uart, {})
     self.data = b''
     self.break_timeout = self.config['Adcp']['Break_Timeout']
     self.instrument_config = self.config['Adcp']['Instrument_Config']
     self.deployment_config = self.config['Adcp']['Deployment_Config']
     self.deployment_delay = self.config['Adcp']['Deployment_Delay']
Esempio n. 6
0
 def __init__(self, *args, **kwargs):
     self.config_file = __name__ + "." + constants.CONFIG_TYPE
     DEVICE.__init__(self, *args, **kwargs)
     data_tasks = ["log"]
     if "tasks" in kwargs:
         if any(elem in data_tasks for elem in kwargs["tasks"]):
             if self.main():
                 for task in kwargs["tasks"]:
                     eval("self." + task + "()", {"self": self})
         else:
             for task in kwargs["tasks"]:
                 eval("self." + task + "()", {"self": self})
Esempio n. 7
0
 def __init__(self):
     DEVICE.__init__(self)
     self.sreader = asyncio.StreamReader(self.uart)
     self.swriter = asyncio.StreamWriter(self.uart, {})
     self.data = b''
     self.semaphore = Semaphore()  # Data/Sms semaphore.
     self.disconnect = disconnect
     self.at_timeout = self.config['Modem']['At_Timeout']
     self.init_ats = self.config['Modem']['Init_Ats']
     self.init_timeout = self.config['Modem']['Init_Timeout']
     self.call_ats = self.config['Modem']['Call_Ats']
     self.hangup_ats = self.config['Modem']['Hangup_Ats']
     self.at_delay = self.config['Modem']['At_Delay']
     self.call_attempt = self.config['Modem']['Call_Attempt']
     self.call_delay = self.config['Modem']['Call_Delay']
     self.call_timeout = self.config['Modem']['Call_Timeout']
     self.ymodem_delay = self.config['Modem']['Ymodem_Delay']
     self.keep_alive = self.config['Modem']['Keep_Alive']
     self.sms_ats1 = self.config['Modem']['Sms_Ats1']
     self.sms_ats2 = self.config['Modem']['Sms_Ats2']
     self.sms_timeout = self.config['Modem']['Sms_Timeout']
     self.trigger = trigger
     YMODEM.__init__(self, self.agetc, self.aputc)
Esempio n. 8
0
class MODEM(DEVICE, YMODEM):

    def __init__(self, , *args, **kwargs):
        self.config_file = __name__ + "." + constants.CONFIG_TYPE
        DEVICE.__init__(self, *args, **kwargs)
        self.sending = False
        self.connected = False
        self.sent = False
        self.received = False
        self.timeout = 1
        self.file_paths = []
        self.unsent_files = utils.unsent_files
        self.pre_ats = self.config["Modem"]["Pre_Ats"]
        self.post_ats = self.config["Modem"]["Post_Ats"]
        self.ats_delay = self.config["Modem"]["Ats_Delay"]
        self.call_attempt = self.config["Modem"]["Call_Attempt"]
        self.call_delay = self.config["Modem"]["Call_Delay"]
        self.call_timeout = self.config["Modem"]["Call_Timeout"]
        YMODEM.__init__(self, self._getc, self._putc, mode="Ymodem1k")
Esempio n. 9
0
 def __init__(self):
     DEVICE.__init__(self)
Esempio n. 10
0
 def __init__(self):
     DEVICE.__init__(self)
     self.warmup_interval = self.config['Warmup_Interval']
Esempio n. 11
0
 def __init__(self, instance):
     self.instance = instance
     self.config_file = __name__ + "." + constants.CONFIG_TYPE
     DEVICE.__init__(self, self.instance)
     self.timeout = constants.TIMEOUT
     self.prompt = ">"
Esempio n. 12
0
 def __init__(self):
     self.config_file = __name__ + "." + constants.CONFIG_TYPE
     DEVICE.__init__(self)