Class: Device::System
- Inherits:
-
Object
- Object
- Device::System
- Defined in:
- lib/device/system.rb
Class Attribute Summary collapse
-
.backlight ⇒ Object
Returns the value of attribute backlight.
-
.klass ⇒ Object
Returns the value of attribute klass.
-
.serial ⇒ Object
readonly
Returns the value of attribute serial.
Class Method Summary collapse
- .adapter ⇒ Object
- .app ⇒ Object
-
.battery ⇒ Object
Read the battery level.
- .beep ⇒ Object
- .brand ⇒ Object
- .model ⇒ Object
- .reboot ⇒ Object
- .restart ⇒ Object
- .versions ⇒ Object
Class Attribute Details
.backlight ⇒ Object
Returns the value of attribute backlight.
5 6 7 |
# File 'lib/device/system.rb', line 5 def backlight @backlight end |
.klass ⇒ Object
Returns the value of attribute klass.
6 7 8 |
# File 'lib/device/system.rb', line 6 def klass @klass end |
.serial ⇒ Object (readonly)
Returns the value of attribute serial.
5 6 7 |
# File 'lib/device/system.rb', line 5 def serial @serial end |
Class Method Details
.adapter ⇒ Object
9 10 11 |
# File 'lib/device/system.rb', line 9 def self.adapter Device.adapter::System end |
.app ⇒ Object
57 58 59 |
# File 'lib/device/system.rb', line 57 def self.app self.klass.to_s.downcase end |
.battery ⇒ Object
Read the battery level.
0 Battery voltage low and battery icon blinks. Suggested that do not process transaction, print and wireless communication etc. at this moment. You should recharge the battery immediately to avoid shut down and lost data.
1 Battery icon displays 1 grid
2 Battery icon displays 2 grids
3 Battery icon displays 3 grids
4 Battery icon displays 4 grids
5 Powered by external power supply and the battery in charging. Battery icon displays form empty to full cycle. The battery status indicator on the bottom of terminal is displaying red
6 Powered by external power supply and the battery charging 6 finished. Battery icon displays full grids. The battery status indicator on the bottom of terminal is displaying green. 7 Powered by external power supply and has no battery.
41 42 43 |
# File 'lib/device/system.rb', line 41 def self.battery adapter.battery end |
.beep ⇒ Object
45 46 47 |
# File 'lib/device/system.rb', line 45 def self.beep adapter.beep end |
.brand ⇒ Object
65 66 67 |
# File 'lib/device/system.rb', line 65 def self.brand adapter.brand end |
.model ⇒ Object
61 62 63 |
# File 'lib/device/system.rb', line 61 def self.model adapter.model end |
.reboot ⇒ Object
53 54 55 |
# File 'lib/device/system.rb', line 53 def self.reboot adapter.reboot end |
.restart ⇒ Object
49 50 51 |
# File 'lib/device/system.rb', line 49 def self.restart adapter.reboot end |
.versions ⇒ Object
69 70 71 |
# File 'lib/device/system.rb', line 69 def self.versions adapter.versions end |