Class: ProconBypassMan::DeviceConnection::OutputReportWatcher
- Inherits:
-
Object
- Object
- ProconBypassMan::DeviceConnection::OutputReportWatcher
show all
- Includes:
- OutputReportMarkerable
- Defined in:
- lib/procon_bypass_man/device_connection/output_report_watcher.rb
Constant Summary
ProconBypassMan::DeviceConnection::OutputReportMarkerable::INPUT_REPORT_FORMAT, ProconBypassMan::DeviceConnection::OutputReportMarkerable::OUTPUT_REPORT_FORMAT
Instance Method Summary
collapse
#mark_as_receive, #mark_as_send
Constructor Details
Returns a new instance of OutputReportWatcher.
Instance Method Details
#completed? ⇒ Boolean
24
25
26
|
# File 'lib/procon_bypass_man/device_connection/output_report_watcher.rb', line 24
def completed?
@hid_sub_command_request_table.completed?
end
|
#received?(sub_command:, sub_command_arg:) ⇒ Boolean
19
20
21
|
# File 'lib/procon_bypass_man/device_connection/output_report_watcher.rb', line 19
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
|
#sent?(sub_command:, sub_command_arg:) ⇒ Boolean
12
13
14
|
# File 'lib/procon_bypass_man/device_connection/output_report_watcher.rb', line 12
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
|
#timeout_or_completed? ⇒ Boolean
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/procon_bypass_man/device_connection/output_report_watcher.rb', line 30
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
|