Sha256: 7cf31de6f8397e2d4c77c47827bbd59ca93bc7ebc7fe5bb9090a7d59f50f441b
Contents?: true
Size: 1.28 KB
Versions: 19
Compression:
Stored size: 1.28 KB
Contents
class ProconBypassMan::DeviceConnection::OutputReportWatcher include ProconBypassMan::DeviceConnection::OutputReportMarkerable def initialize @hid_sub_command_request_table = ProconBypassMan::DeviceConnection::OutputReportSubCommandTable.new @timer = ProconBypassMan::SafeTimeout.new end # @param [String] sub_command # @param [String] sub_command_arg # @return [Boolean] def sent?(sub_command: , sub_command_arg: ) @hid_sub_command_request_table.has_key?(sub_command: sub_command, sub_command_arg: sub_command_arg) end # @param [String] sub_command # @param [String] sub_command_arg # @return [Boolean] def received?(sub_command: , sub_command_arg: ) @hid_sub_command_request_table.has_value?(sub_command: sub_command, sub_command_arg: sub_command_arg) end # @return [Boolean] def completed? @hid_sub_command_request_table.completed? end # @return [Boolean] # @raise [Timeout::Error] def timeout_or_completed? if @timer.timeout? ProconBypassMan::SendErrorCommand.execute(error: "[pre_bypass] pre_bypassフェーズがタイムアウトしました") return true end if completed? ProconBypassMan.logger.info "[pre_bypass] pre_bypassフェーズが想定通り終了しました" return true end end end
Version data entries
19 entries across 19 versions & 1 rubygems