Class: Twib::Interfaces::ITwibMetaInterface

Inherits:
Twib::Interface show all
Defined in:
lib/twib/interfaces/ITwibMetaInterface.rb

Overview

Exposed by twibd

Defined Under Namespace

Modules: Command

Instance Method Summary collapse

Methods inherited from Twib::Interface

#initialize, #send

Constructor Details

This class inherits a constructor from Twib::Interface

Instance Method Details

#list_devicesArray<Hash>

Lists devices known to twibd.

Returns:

  • (Array<Hash>)


16
17
18
19
20
# File 'lib/twib/interfaces/ITwibMetaInterface.rb', line 16

def list_devices
  response = send(Command::LIST_DEVICES).wait_ok.payload
  size = response.unpack("Q<")[0]
  MessagePack.unpack(response[8, size])
end