Oracle Java Wireless Client

com.oracle.deviceaccess.mmio
Class MMIOManager

java.lang.Object
  extended by com.oracle.deviceaccess.mmio.MMIOManager

public class MMIOManager
extends java.lang.Object

The MMIOManager class provides methods for getting MMIODevice instances using its platform-specific unique numerical ID or name.

In order to access a specific memory block a device has been mapped to, an application should first acquire an MMIODevice instance for the memory-mapped I/O device the application wants to control and access, either using its numerical ID or name.

MMIODevice represents group of memory region used for memory-mapped I/O. Memory mapped I/O is typically used for controlling hardware peripherals by reading from and writing to registers or memory blocks of the hardware mapped to the system memory. The MMIO APIs allows for low level control over the peripheral.

Acquiring a MMIODevice instance is subject to permission checks (see MMIOPermission).


Method Summary
static MMIODevice getDevice(int id)
          Gets a MMIODevice instance for the given ID.
static MMIODevice getDevice(java.lang.String name)
          Gets a MMIODevice instance for the given name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDevice

public static MMIODevice getDevice(int id)
                            throws java.io.IOException,
                                   PeripheralTypeNotSupportedException,
                                   PeripheralNotFoundException,
                                   PeripheralNotAvailableException
Gets a MMIODevice instance for the given ID. A new instance is returned upon each call.

Parameters:
id - the MMIO device ID.
Returns:
a MMIODevice instance for the given ID.
Throws:
java.io.IOException - if any I/O error occurred.
PeripheralTypeNotSupportedException - if MMIO is not supported.
PeripheralNotFoundException - if the designated MMIO device is not found.
PeripheralNotAvailableException - if the peripheral is not currently available.
java.lang.SecurityException - if the caller has no permission to access the designated MMIO device.
java.lang.IllegalArgumentException - if id is not greater than or equal to 0.

getDevice

public static MMIODevice getDevice(java.lang.String name)
                            throws java.io.IOException,
                                   PeripheralTypeNotSupportedException,
                                   PeripheralNotFoundException,
                                   PeripheralNotAvailableException
Gets a MMIODevice instance for the given name. A new instance is returned upon each call.

Parameters:
name - the name of memory block
Returns:
a MMIODevice instance for the given name.
Throws:
java.io.IOException - if any I/O error occurred.
PeripheralTypeNotSupportedException - if MMIO is not supported.
PeripheralNotFoundException - if the designated MMIO device is not found.
PeripheralNotAvailableException - if the peripheral is not currently available.
java.lang.SecurityException - if the caller has no permission to access the designated MMIO device.
java.lang.NullPointerException - if name is null.

Oracle Java Wireless Client

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