Module: Flic::Protocol::Commands
- Defined in:
- lib/flic/protocol/commands.rb,
lib/flic/protocol/commands/ping.rb,
lib/flic/protocol/commands/command.rb,
lib/flic/protocol/commands/get_info.rb,
lib/flic/protocol/commands/create_scanner.rb,
lib/flic/protocol/commands/remove_scanner.rb,
lib/flic/protocol/commands/get_button_uuid.rb,
lib/flic/protocol/commands/force_disconnect.rb,
lib/flic/protocol/commands/cancel_scan_wizard.rb,
lib/flic/protocol/commands/create_scan_wizard.rb,
lib/flic/protocol/commands/change_mode_parameters.rb,
lib/flic/protocol/commands/create_connection_channel.rb,
lib/flic/protocol/commands/remove_connection_channel.rb
Defined Under Namespace
Classes: CancelScanWizard, ChangeModeParameters, Command, CreateConnectionChannel, CreateScanWizard, CreateScanner, ForceDisconnect, GetButtonUuid, GetInfo, Ping, RemoveConnectionChannel, RemoveScanner
Constant Summary
collapse
- COMMAND_CLASS_OPCODE =
{
Commands::GetInfo => 0x00,
Commands::CreateScanner => 0x01,
Commands::RemoveScanner => 0x02,
Commands::CreateConnectionChannel => 0x03,
Commands::RemoveConnectionChannel => 0x04,
Commands::ForceDisconnect => 0x05,
Commands::ChangeModeParameters => 0x06,
Commands::Ping => 0x07,
Commands::GetButtonUuid => 0x08,
Commands::CreateScanWizard => 0x09,
Commands::CancelScanWizard => 0x0A
}.freeze
- OPCODE_COMMAND_CLASS =
COMMAND_CLASS_OPCODE.invert.freeze
Class Method Summary
collapse
Class Method Details
.command_class_for_opcode(opcode) ⇒ Object
35
36
37
|
# File 'lib/flic/protocol/commands.rb', line 35
def self.command_class_for_opcode(opcode)
OPCODE_COMMAND_CLASS[opcode]
end
|
.opcode_for_command_class(command_class) ⇒ Object
39
40
41
|
# File 'lib/flic/protocol/commands.rb', line 39
def self.opcode_for_command_class(command_class)
COMMAND_CLASS_OPCODE[command_class]
end
|