Exemple #1
0
 def send_message(self, notification: Notification, state: States):
     if notification.get_message() == 'EXIT':
         for state_device_manager in self.__device_state_list:
             state_device_manager.send_to_devices(notification)
     else:
         self.__device_state_list[state.value].send_to_devices(notification)
Exemple #2
0
 def send_to_devices(self, notification: Notification):
     f = open("legitnetwork.txt", "w")
     f.write(self.__state.name + ' ' + notification.get_message())
     f.close()