Oracle Java Wireless Client

com.oracle.deviceaccess
Interface Peripheral

All Known Subinterfaces:
GPIOPin, GPIOPort, I2CSlave, MMIODevice, SPISlave

public interface Peripheral

The Peripheral interface represents peripheral devices in the system. This interface provides generic methods for handling peripherals.
All peripherals must implement the Peripheral interface.


Method Summary
 void close()
          Releases the underlying peripheral device, making it available to other applications.
 int getID()
          Returns the numerical ID of the underlying peripheral device.
 java.lang.String getName()
          Returns the name of the underlying peripheral device.
 

Method Detail

getID

int getID()
Returns the numerical ID of the underlying peripheral device.

Returns:
this peripheral numerical ID.

getName

java.lang.String getName()
Returns the name of the underlying peripheral device. A name is a descriptive version of the peripheral ID. For example, "LED1".

Returns:
this peripheral's name.

close

void close()
           throws java.io.IOException
Releases the underlying peripheral device, making it available to other applications. Once released, subsequent operations on that very same Peripheral instance will result in a PeripheralNotAvailableException being thrown.

This method has no effects if the peripheral device has already been released.

Throws:
java.io.IOException - if an IO error occurred.

Oracle Java Wireless Client

Copyright (c) 1990, 2012, Oracle and/or its affiliates. All rights reserved.