def call_async_balanced(self, cmd, timeout=5000): self.__pending_commands[cmd.command_handle] = cmd if self.on_progress is not None: tml.tml_Cmd_Register_Progress(cmd.command_handle, on_cmd_progress_handler, self) if self.on_status_reply is not None: tml.tml_Cmd_Register_StatusReply(cmd.command_handle, on_cmd_status_reply_handler, self) tml.tml_Cmd_Register_CommandReady(cmd.command_handle, on_profile_command_ready_handler, self) tml.tml_Bal_Send_AsyncMessage(self.__tml_core.core_handle, cmd.command_handle, self.__profile, timeout)
def call_async(self, host, port, profile, cmd, timeout=5000): cmd.tml_core = self self.__pending_commands[cmd.command_handle] = cmd tml.tml_Cmd_Register_CommandReady(cmd.command_handle, on_core_command_ready_handler, self) if self.on_progress is not None: tml.tml_Cmd_Register_Progress(cmd.command_handle, on_core_command_progress_handler, self) if self.on_status_reply is not None: tml.tml_Cmd_Register_StatusReply(cmd.command_handle, on_core_command_statusreply_handler, self) tml.tml_Send_AsyncMessage(self.__core_handle, cmd.command_handle, profile, host, port, timeout)
def call_sync(self, host, port, cmd, timeout=5000): if self.on_progress is not None: tml.tml_Cmd_Register_Progress(cmd.command_handle, on_cmd_progress_handler, self) if self.on_status_reply is not None: tml.tml_Cmd_Register_StatusReply(cmd.command_handle, on_cmd_status_reply_handler, self) tml.tml_Send_SyncMessage(self.__tml_core.core_handle, cmd.command_handle, self.__profile, host, port, timeout)