Class: Sim800c::Commands::Device
- Inherits:
-
Object
- Object
- Sim800c::Commands::Device
- Includes:
- Helpers
- Defined in:
- lib/sim800c/commands/device.rb
Instance Method Summary collapse
- #battery_info ⇒ Object
-
#initialize(serial) ⇒ Device
constructor
A new instance of Device.
Methods included from Helpers
#at_cmd, #parse_cmgl_response, #read_response, #return_or_raise_error!
Constructor Details
#initialize(serial) ⇒ Device
Returns a new instance of Device.
8 9 10 |
# File 'lib/sim800c/commands/device.rb', line 8 def initialize(serial) @serial = serial end |
Instance Method Details
#battery_info ⇒ Object
12 13 14 15 |
# File 'lib/sim800c/commands/device.rb', line 12 def battery_info at_cmd('AT+CBC') parse_cbc_response(@serial.read(1024)) end |