com.buglabs.bug.sysfs
Class BMIDeviceHelper

java.lang.Object
  extended by com.buglabs.bug.sysfs.BMIDeviceHelper

public class BMIDeviceHelper
extends java.lang.Object

Entry-point into the sysfs API for BUG20. This API is a null-safe way of reading and writing to sysfs entries for BUG drivers that support them.


Constructor Summary
BMIDeviceHelper()
           
 
Method Summary
static java.util.List getAttachedDevices()
           
static BMIDevice getDevice(int slot)
           
static BMIDevice[] getDevices()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BMIDeviceHelper

public BMIDeviceHelper()
Method Detail

getDevices

public static BMIDevice[] getDevices()
Returns:
The BMIDevices attached at the time of the call. If a given array element is null, no module is attached to that slot.
Throws:
java.io.IOException

getAttachedDevices

public static java.util.List getAttachedDevices()
Returns:
list of BMIDevices that are currently attached, or empty list if no modules are attached.

getDevice

public static BMIDevice getDevice(int slot)
Parameters:
slot -
Returns:
The BMIDevice that exists at the passed slot or null if no device attached.