Class: Sphero::Response::GetBluetoothInfo

Inherits:
Sphero::Response show all
Defined in:
lib/sphero/response.rb

Constant Summary

Constants inherited from Sphero::Response

CODE_EBAD_CMD, CODE_EBAD_DID, CODE_EBAD_MSG, CODE_ECHKSUM, CODE_EEXEC, CODE_EFRAG, CODE_EGEN, CODE_EPARAM, CODE_EUNSUPP, CODE_FLASH_FAIL, CODE_MA_CORRUPT, CODE_MSG_TIMEOUT, CODE_OK, CODE_PAGE_ILLEGAL, CODE_POWER_NOGOOD, CODE_TO_EXCEPTION, CODE_TO_MESSAGE, DLEN, MRSP, SEQ, SOP1, SOP2

Instance Method Summary collapse

Methods inherited from Sphero::Response

#body, #empty?, #exception, #initialize, #seq, #success?

Constructor Details

This class inherits a constructor from Sphero::Response

Instance Method Details

#btaObject


122
123
124
# File 'lib/sphero/response.rb', line 122

def bta
  body.drop(16).slice_before(0x00).first.pack 'C*'
end

#nameObject


118
119
120
# File 'lib/sphero/response.rb', line 118

def name
  body.take(16).slice_before(0x00).first.pack 'C*'
end