|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.squawk.JavaDriverManager
public class JavaDriverManager
The Java driver manager. This manager supports dynamic loading of drivers.
| Field Summary | |
|---|---|
static int |
STATUS_CAUGHT
Constant to be used with getInterruptStatus(int, int) to query the number of times
a particular interrupt has been caught and handled. |
static int |
STATUS_IGNORED
Constant to be used with getInterruptStatus(int, int) to query the number of times
a particular interrupt has been ignored. |
static int |
STATUS_TIMESTAMP
Constant to be used with getInterruptStatus(int, int) to query the last time
at which a particular interrupt was caught. |
| Constructor Summary | |
|---|---|
JavaDriverManager()
|
|
| Method Summary | |
|---|---|
static String |
deviceInterruptName(int interrupt)
Returns a suitable key for an interrupt. |
static long |
getInterruptStatus(int interrupt,
int id)
Retrieves the value of a low-level statistic for a given device interrupt. |
static void |
initializeDrivers(String[] args)
Initializes the driver used to dynamically load other drivers. |
static boolean |
loadDriver(String className)
Sends a request to the kernel to loads and initialize a driver. |
static void |
main(String[] args)
Main routine. |
static void |
sendInterrupt(int signum)
Emulates generation of a hardware interrupt. |
static void |
setupAlarmInterval(int start,
int period)
Schedules the platform-specific alarm timer. |
static void |
setupInterrupt(int interrupt,
String handler)
Configures the interrupt handler table by indicating that a given signal/interrupt will be handled by a Java device driver. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int STATUS_CAUGHT
getInterruptStatus(int, int) to query the number of times
a particular interrupt has been caught and handled.
public static final int STATUS_IGNORED
getInterruptStatus(int, int) to query the number of times
a particular interrupt has been ignored.
public static final int STATUS_TIMESTAMP
getInterruptStatus(int, int) to query the last time
at which a particular interrupt was caught.
| Constructor Detail |
|---|
public JavaDriverManager()
| Method Detail |
|---|
public static void initializeDrivers(String[] args)
args - the command line argument arraypublic static boolean loadDriver(String className)
className - fully qualified name of a class that implements Driver.
public static String deviceInterruptName(int interrupt)
interrupt - identfier of interrupt to handle
public static void main(String[] args)
throws Exception
args - the command line argument array
Exception
public static void setupInterrupt(int interrupt,
String handler)
deviceInterruptName(int)
with interrupt.
interrupt - the interrupt to be handledhandler - name of a C function that can be dynamically loaded/bound to
public static long getInterruptStatus(int interrupt,
int id)
interrupt - identifier of interrupt to queryid - STATUS_CAUGHT, STATUS_IGNORED or STATUS_TIMESTAMP
IllegalArgumentException - if id is not one of the accepted valuespublic static void sendInterrupt(int signum)
signum - the signal to raise
public static void setupAlarmInterval(int start,
int period)
start - interval to wait (in microseconds) before delivering first signalperiod - period to wait (in microseconds) before delivering subsequent signals
|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||