Class: Device::System

Inherits:
Object
  • Object
show all
Defined in:
lib/device/system.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.backlightObject

Returns the value of attribute backlight.



5
6
7
# File 'lib/device/system.rb', line 5

def backlight
  @backlight
end

.klassObject

Returns the value of attribute klass.



6
7
8
# File 'lib/device/system.rb', line 6

def klass
  @klass
end

.serialObject (readonly)

Returns the value of attribute serial.



5
6
7
# File 'lib/device/system.rb', line 5

def serial
  @serial
end

Class Method Details

.adapterObject



9
10
11
# File 'lib/device/system.rb', line 9

def self.adapter
  Device.adapter::System
end

.appObject



57
58
59
# File 'lib/device/system.rb', line 57

def self.app
  self.klass.to_s.downcase
end

.batteryObject

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

.beepObject



45
46
47
# File 'lib/device/system.rb', line 45

def self.beep
  adapter.beep
end

.brandObject



65
66
67
# File 'lib/device/system.rb', line 65

def self.brand
  adapter.brand
end

.modelObject



61
62
63
# File 'lib/device/system.rb', line 61

def self.model
  adapter.model
end

.rebootObject



53
54
55
# File 'lib/device/system.rb', line 53

def self.reboot
  adapter.reboot
end

.restartObject



49
50
51
# File 'lib/device/system.rb', line 49

def self.restart
  adapter.reboot
end

.versionsObject



69
70
71
# File 'lib/device/system.rb', line 69

def self.versions
  adapter.versions
end