Преглед на файлове

Module socket_protocol update

mod_update
Dirk Alders преди 4 години
родител
ревизия
cb2ed9395d
променени са 2 файла, в които са добавени 8 реда и са изтрити 2 реда
  1. 7
    1
      smarthome.py
  2. 1
    1
      socket_protocol

+ 7
- 1
smarthome.py Целия файл

@@ -31,6 +31,12 @@ class WetationFrameProt(gui.Wetation):
31 31
     PROT_ID_OUT = 2
32 32
     ALL_PROT_IDS = [PROT_ID_GARAGE, PROT_ID_IN, PROT_ID_OUT, ]
33 33
 
34
+    PROT_NAMES = {
35
+        PROT_ID_GARAGE: u'garage',
36
+        PROT_ID_IN: u'wet-in',
37
+        PROT_ID_OUT: u'wet-out',
38
+    }
39
+
34 40
     PROT_IPS = {
35 41
         PROT_ID_GARAGE: config.server_garage_ip,
36 42
         PROT_ID_IN: config.server_in_ip,
@@ -113,7 +119,7 @@ class WetationFrameProt(gui.Wetation):
113 119
         for prot_id in self.ALL_PROT_IDS:
114 120
             logger.debug('Initiating communication channel for prot_id %d', prot_id)
115 121
             c_tcp = tcp_socket.tcp_client_stp(self.PROT_IPS[prot_id], self.PROT_PORTS[prot_id], rx_log_lvl=logging.DEBUG)
116
-            self.__prot__[prot_id] = self.PROT_CLASSES[prot_id](c_tcp, secret=self.PROT_SECRETS[prot_id], auto_auth=True)
122
+            self.__prot__[prot_id] = self.PROT_CLASSES[prot_id](c_tcp, secret=self.PROT_SECRETS[prot_id], auto_auth=True, channel_name=self.PROT_NAMES[prot_id])
117 123
             #
118 124
             self.__prot__[prot_id].register_callback(None, None, self.__prot_resp_callbacks__, prot_id)
119 125
 

+ 1
- 1
socket_protocol

@@ -1 +1 @@
1
-Subproject commit 8a8522d26b486b005f65e7e542742e898f1109e7
1
+Subproject commit 8beacaef2257e82852e1c0b5442ec4d09b891b7c

Loading…
Отказ
Запис