class Device::System

Attributes

backlight[R]
klass[RW]
serial[R]

Public Class Methods

adapter() click to toggle source
# File lib/device/system.rb, line 9
def self.adapter
  Device.adapter::System
end
app() click to toggle source
# File lib/device/system.rb, line 77
def self.app
  self.klass.to_s.downcase
end
backlight=(level) click to toggle source

Set screen backlight (turn on automatically if there has actions like key-pressing, card-swiping or card-inserting).

0 = Turn off backlight.
1 = (D200): Keep backlight on for 30 seconds ( auto-shut-down after 30 seconds).
1 = (Vx510): On.
2 = (D200): Always on.
n = (Evo/Telium 2): Percentage until 100.
# File lib/device/system.rb, line 27
def self.backlight=(level)
  adapter.backlight = level
  @backlight = level
end
battery() click to toggle source

Read the battery level, return the value in percentage.

# File lib/device/system.rb, line 44
def self.battery
  adapter.battery
end
battery_capacity_type() click to toggle source

Checks the type of the battery capacity return (percentage or scale).

# File lib/device/system.rb, line 49
def self.battery_capacity_type
  begin
    adapter.battery_capacity_type
  rescue StandardError => exception
    'scale'
  end
end
beep() click to toggle source
# File lib/device/system.rb, line 57
def self.beep
  adapter.beep
end
brand() click to toggle source
# File lib/device/system.rb, line 85
def self.brand
  adapter.brand
end
klass=(application_name) click to toggle source
# File lib/device/system.rb, line 69
def self.klass=(application_name)
  if @klass != application_name
    DaFunk::PaymentChannel.app = application_name
    @klass = application_name
  end
  @klass
end
model() click to toggle source
# File lib/device/system.rb, line 81
def self.model
  adapter.model
end
power_supply() click to toggle source

Check if device is connected to any power supply

true Connected
false Not Connected
# File lib/device/system.rb, line 39
def self.power_supply
  adapter.power_supply
end
reboot() click to toggle source
# File lib/device/system.rb, line 65
def self.reboot
  adapter.reboot
end
restart() click to toggle source
# File lib/device/system.rb, line 61
def self.restart
  adapter.reboot
end
teardown() click to toggle source
# File lib/device/system.rb, line 13
def self.teardown
  adapter.teardown if adapter.respond_to?(:teardown)
end
update(path) click to toggle source
# File lib/device/system.rb, line 93
def self.update(path)
  adapter.update(path)
end
versions() click to toggle source
# File lib/device/system.rb, line 89
def self.versions
  adapter.versions
end