FrontPanelManager

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ocap.hardware.frontpanel
Class FrontPanelManager

    java.lang.Object
      org.ocap.hardware.frontpanel.FrontPanelManager

    public class FrontPanelManager

extends Object

This class represents an optional front panel display and SHOULD not be present in any device that does not support one. A front panel may include a text based display with one or more rows of characters. This API is agnostic as to the type of hardware used in the display (e.g. segmented LED, LCD). The display may also contain individual indicators for status indication such as power.

Method Summary
`IndicatorDisplay` | `getIndicatorDisplay(String[] indicators)` Gets the individual indicators display.
`static FrontPanelManager` | `getInstance()` Gets the singleton instance of the front panel manager.
`String[]` | `getSupportedIndicators()` Gets the set of available indicators.
`TextDisplay` | `getTextDisplay()` Gets the front panel text display.
`void` | `releaseIndicator(String indicator)` Releases a front panel indicator from a previous reservation.
`void` | `releaseTextDisplay()` Releases the front panel text display from a previous reservation.
`boolean` | `reserveIndicator(ResourceClient resourceClient, String indicator)` Reserves one of the indicators for exclusive use by an application.
`boolean` | `reserveTextDisplay(ResourceClient resourceClient)` Reserves the front panel text display for exclusive use by an application.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static FrontPanelManager getInstance()

  Gets the singleton instance of the front panel manager. The singleton MAY be implemented using application or implementation scope.

  Returns:
    The front panel manager.
  Throws:
    `SecurityException` - if the calling application does not have MonitorAppPermission("frontpanel").

### reserveTextDisplay

    public boolean reserveTextDisplay(ResourceClient resourceClient)

  Reserves the front panel text display for exclusive use by an application. The ResourceProxy of the TextDisplay SHALL be used for resource contention.

  Parameters:
    `resourceClient` - A DAVIC resource client for resource control.
  Returns:
    True if the implementation accepted the reservation request, otherwise returns false.

### reserveIndicator

    public boolean reserveIndicator(ResourceClient resourceClient,
                                    String indicator)
                             throws IllegalArgumentException

  Reserves one of the indicators for exclusive use by an application. The ResourceProxy of the Indicator SHALL be used for resource contention.

  Parameters:
    `resourceClient` - A DAVIC resource client for resource control.
    `indicator` - One of the indicator String names found in the table returned by `IndicatorDisplay.getIndicators()` method.
  Returns:
    True if the implementation accepted the reservation request, otherwise returns false.
  Throws:
    `IllegalArgumentException` - if indicator does not equal one of the indicator names.

### releaseTextDisplay

    public void releaseTextDisplay()

  Releases the front panel text display from a previous reservation. If the calling application is not the application that reserved the front panel, or if the front panel is not reserved when this method is called, this method does nothing.

### releaseIndicator

    public void releaseIndicator(String indicator)
                          throws IllegalArgumentException

  Releases a front panel indicator from a previous reservation. If the calling application is not the application that reserved the indicator, or if the indicator is not reserved when this method is called, this method does nothing.

  Throws:
    `IllegalArgumentException` - if the indicator argument is not contained in the table returned by the `IndicatorDisplay.getIndicators()` method.

### getTextDisplay

    public TextDisplay getTextDisplay()

  Gets the front panel text display. A front panel must be reserved before an application can get it with this method.

  Returns:
    Front panel text display, or null if the application has not reserved it.

### getSupportedIndicators

    public String[] getSupportedIndicators()

  Gets the set of available indicators. The array returned SHALL contain the name of all the indicators supported with `getIndicatorDisplay(String[])`. The set of standardized indicators includes "power", "rfbypass", "message", and "record" and these MAY be returned.

  Returns:
    The set of supported indicators. MAY return indicators not included in the standardized set.

### getIndicatorDisplay

    public IndicatorDisplay getIndicatorDisplay(String[] indicators)

  Gets the individual indicators display. Indicators must be reserved before an application can get them with this method.

  Parameters:
    `indicators` - Set of indicator names.
  Returns:
    Set of individual indicators, or null if the application has not reserved one or more of the parameter indicators.
  Throws:
    `IllegalArgumentException` - if any of the indicator arguments are not contained in the table returned by the `IndicatorDisplay.getIndicators()` method.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD