Class: Fusuma::Plugin::Inputs::Hidraw::Device

Inherits:
Object
  • Object
show all
Defined in:
lib/fusuma/plugin/inputs/hidraw/device.rb

Constant Summary collapse

HIDIOCGRAWNAME =

Definitions of IOCTL commands

0x80804804
HIDIOCGRAWPHYS =
0x80404805
HIDIOCGRAWINFO =
0x80084803
HIDIOCGRDESCSIZE =
0x80044801
HIDIOCGRDESC =
0x90044802
BUS_PCI =

Definitions of bus types

0x01
BUS_ISAPNP =
0x02
BUS_USB =
0x03
BUS_HIL =
0x04
BUS_BLUETOOTH =
0x05
BUS_VIRTUAL =
0x06

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hidraw_path:) ⇒ Device

Returns a new instance of Device.



29
30
31
32
# File 'lib/fusuma/plugin/inputs/hidraw/device.rb', line 29

def initialize(hidraw_path:)
  @hidraw_path = hidraw_path
  load_device_info
end

Instance Attribute Details

#bustypeObject (readonly)

Returns the value of attribute bustype.



27
28
29
# File 'lib/fusuma/plugin/inputs/hidraw/device.rb', line 27

def bustype
  @bustype
end

#hidraw_pathObject (readonly)

Returns the value of attribute hidraw_path.



27
28
29
# File 'lib/fusuma/plugin/inputs/hidraw/device.rb', line 27

def hidraw_path
  @hidraw_path
end

#nameObject (readonly)

Returns the value of attribute name.



27
28
29
# File 'lib/fusuma/plugin/inputs/hidraw/device.rb', line 27

def name
  @name
end

#product_idObject (readonly)

Returns the value of attribute product_id.



27
28
29
# File 'lib/fusuma/plugin/inputs/hidraw/device.rb', line 27

def product_id
  @product_id
end

#vendor_idObject (readonly)

Returns the value of attribute vendor_id.



27
28
29
# File 'lib/fusuma/plugin/inputs/hidraw/device.rb', line 27

def vendor_id
  @vendor_id
end