def __init__(self, msg_handler, generate_handlers, data_structures, remote_dict):
    self.msg_handler = msg_handler
    self.statistic_handler = Statistic_Handler(generate_handlers, data_structures, remote_dict)
    self.rpc_server_handle = generate_handlers.construct_rpc_sever(data_structures['PLC_RPC_SERVER'])
    self.rpc_server_handle.register_call_back('modbus_relay', self.process_modbus_message)
    self.rpc_server_handle.register_call_back('ping_message', self.process_ping_message)
    self.rpc_server_handle.add_time_out_function(self.process_null_msg)
    self.rpc_server_handle.start()
def __init__(self, msg_handler, generate_handlers, data_structures, remote_dict):
    self.msg_handler = msg_handler
    self.statistic_handler = Statistic_Handler(generate_handlers, data_structures, remote_dict)
    self.rpc_server_handle = generate_handlers.construct_rpc_sever(data_structures['PLC_RPC_SERVER'])
    self.rpc_server_handle.register_call_back('modbus_relay', self.process_modbus_message)
    self.rpc_server_handle.register_call_back('ping_message', self.process_ping_message)
    self.rpc_server_handle.add_time_out_function(self.process_null_msg)
    self.rpc_server_handle.start()