Commit 67708419 authored by wwalkowski's avatar wwalkowski

Copying from trunk for bundle 1.1.4

parent 41d466bc
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/ocap_api"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ocap_fp</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
#Fri Oct 19 13:24:35 MDT 2007
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.5
#Fri Oct 19 13:24:35 MDT 2007
eclipse.preferences.version=1
internal.default.compliance=default
package org.ocap.hardware.frontpanel;
/**
* This interface represents the front panel display blinking
* specification. If BlinkSpec is for {@link TextDisplay}, all characters blink
* at the same time.
*/
public interface BlinkSpec
{
/**
* Gets the number of times per minute the display will blink.
*
* @return Number of blink iterations per minute.
*/
public int getIterations();
/**
* Gets the maximum number of times per minute all segments in an LED can
* blink.
*
* @return Maximum number of blink iterations per minute. Returns zero
* if blinking is not supported.
*/
public int getMaxCycleRate();
/**
* Sets the number of times per minute data will blink across all of the
* LEDs.
*
* @param iterations Number of blink iterations per minute.
*
* @throws IllegalArgumentException if the iteration is negative or cannot
* be supported by the front panel.
*/
public void setIterations(int iterations);
/**
* Gets the percentage of time the text will be on during one blink
* iteration.
*
* @return Text display blink on percentage duration.
*/
public int getOnDuration();
/**
* Sets the percentage of time the text display will remain on
* during one blink iteration.
*
* @param duration Text display blink on percentage duration. Setting
* this value to 100 sets the display no solid, no blinking. Setting
* this value to 0 effectively turns off the front panel display.
* Subtracting this value from 100 yields the percentage of off
* time during one blink iteration.
*
* @throws IllegalArgumentException if the duration is negative or
* exceeds 100.
*/
public void setOnDuration(int duration);
}
package org.ocap.hardware.frontpanel;
/**
* This interface represents the front panel display brightness
* specification. If the Indicator supports just turn on/off, the brightness
* value {@link #OFF} represents turn off and value 1 represents turn on, and
* a brightness level shall be 2. If the Indicator supports bright/dark/off
* brightness, the brightness value {@link #OFF} represents turn off and
* value 1 represents dark and value 2 represents bright, and a brightness
* level shall be 3. The brightness level can be any levels corresponding to
* the Indicator's capability.
*/
public interface BrightSpec
{
/** Brightness OFF setting that represents the Indicator is off. */
public final static int OFF = 0x00;
/**
* Gets the current brightness of the Indicator. Possible return values
* shall be an integer that meets:
* <BR> {@link #OFF} =< brightness =< getBrightnessLevels()-1
*
* @return a current brightness value of Indicator.
*/
public int getBrightness();
/**
* Gets the number of brightness levels supported. The minimum support
* brightness level SHALL be 2, i.e., two levels that includes {@link #OFF}
* and brightness=1 (on). This provides an on/off capability.
*
* @return Supported indicator brightness levels.
*/
public int getBrightnessLevels();
/**
* Sets the brightness of the indicator. Setting the brightness
* level to {@link #OFF} turns the indicator off.
*
* @param brightness Indicator brightness.
*
* @throws IllegalArgumentException if the brightness value is not
* an integer that meets:
* <BR> {@link #OFF} =< brightness =< getBrightnessLevels()-1
*/
public void setBrightness(int brightness) throws IllegalArgumentException;
}
package org.ocap.hardware.frontpanel;
/**
* This interface represents the front panel display Color
* specification.
*/
public interface ColorSpec
{
/*
* Standardized indicator colors. Host devices MAY include addition
* implementation specific colors.
*/
/** Indicator color blue. */
public final static byte BLUE = 0x01;
/** Indicator color green. */
public final static byte GREEN = 0x02;
/** Indicator color red. */
public final static byte RED = 0x04;
/** Indicator color yellow. */
public final static byte YELLOW = 0x08;
/** Indicator color orange. */
public final static byte ORANGE = 0x10;
/**
* Gets the current color of the indicator. See definitions of
* {@link #BLUE}, {@link #GREEN},{@link #RED},
* {@link #YELLOW}, and {@link #ORANGE} for possible
* values.
*
* @return Indicator color.
*/
public byte getColor();
/**
* Gets the supported colors. The value returned SHALL contain values
* for the possible color set OR'ed together. {@link #BLUE},
* {@link #GREEN}, {@link #RED}, {@link #YELLOW}, and {@link #ORANGE}
* for possible values.
*
* @return Supported color set.
*/
public byte getSupportedColors();
/**
* Sets the color of this indicator.
*
* @param color Indicator color.
*
* @throws IllegalArgumentException if the value of the color parameter
* is not in the supported color set.
*/
public void setColor(byte color) throws IllegalArgumentException;
}
package org.ocap.hardware.frontpanel;
import org.davic.resources.ResourceClient;
/**
* 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.
*/
public class FrontPanelManager
{
/**
* Protected constructor. Cannot be used by an application.
*/
protected FrontPanelManager()
{
}
/**
* Gets the singleton instance of the front panel manager. The singleton
* MAY be implemented using application or implementation scope.
*
* @return The front panel manager.
*
* @throws SecurityException if the calling application does not have
* MonitorAppPermission("frontpanel").
*/
public static FrontPanelManager getInstance()
{
return null;
}
/**
* Reserves the front panel text display for exclusive use by an application.
* The ResourceProxy of the TextDisplay SHALL be used for resource
* contention.
*
* @param resourceClient A DAVIC resource client for resource control.
*
* @return True if the implementation accepted the reservation request,
* otherwise returns false.
*/
public boolean reserveTextDisplay(ResourceClient resourceClient)
{
return false;
}
/**
* Reserves one of the indicators for exclusive use by an application.
* The ResourceProxy of the Indicator SHALL be used for resource
* contention.
*
* @param resourceClient A DAVIC resource client for resource control.
* @param indicator One of the indicator String names found in the
* table returned by the
* {@link FrontPanelManager#getSupportedIndicators} method.
*
* @return True if the implementation accepted the reservation request,
* otherwise returns false.
*
* @throws IllegalArgumentException if the indicator argument is not
* contained in the table returned by the
* {@link FrontPanelManager#getSupportedIndicators} method.
*/
public boolean reserveIndicator(ResourceClient resourceClient,
String indicator)
{
return false;
}
/**
* 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.
*/
public void releaseTextDisplay()
{
}
/**
* 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.
*
* @param indicator One of the indicator String names found in the
* table returned by the
* {@link FrontPanelManager#getSupportedIndicators} method.
*
* @throws IllegalArgumentException if the indicator argument is not
* contained in the table returned by the
* {@link FrontPanelManager#getSupportedIndicators} method.
*/
public void releaseIndicator(String indicator)
{
}
/**
* Gets the front panel text display. A front panel must be reserved
* before an application can get it with this method.
*
* @return Front panel text display, or null if the application has not
* reserved it.
*/
public TextDisplay getTextDisplay()
{
return null;
}
/**
* Gets the set of available indicators. The array returned SHALL contain
* the name of all the indicators supported with
* {@link #getIndicatorDisplay(String[])}. The set of standardized indicators
* includes "power", "rfbypass", "message", and "record" and these MAY be
* returned.
*
* @return The set of supported indicators. MAY return indicators not
* included in the standardized set.
*/
public String[] getSupportedIndicators()
{
return null;
}
/**
* Gets the individual indicators display. Indicators must be reserved
* before an application can get them with this method.
*
* @param indicators Set of indicator names.
*
* @return 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
* {@link IndicatorDisplay#getIndicators} method.
*/
public IndicatorDisplay getIndicatorDisplay(String[] indicators)
{
return null;
}
/**
* Provides an indication of whether or not text display is supported.
* For backwards compatibility, the implementation must allow an application
* to reserve, get, and write to the text display even if the device does not
* contain a text display. If an application attempts to write to a
* nonexistent text display, the implementation shall not return an error.
*
* @return True if text display is supported, false if text display is not
* supported
*
*/
public boolean isTextDisplaySupported()
{
return false;
}
}
package org.ocap.hardware.frontpanel;
import org.davic.resources.ResourceProxy;
/**
* This interface represents an indicator in the front panel display and
* allows its properties to be checked and set.
*/
public interface Indicator extends ResourceProxy
{
/**
* Gets the brightness specification for the front panel Indicator.
* Changing values within the object returned by this method does not
* take affect until one of the set methods in this interface
* is called and the object is passed to the implementation.
*
* @return LED front panel brightness specification.
*/
public BrightSpec getBrightSpec();
/**
* Sets the Brightness specification for the front panel Indicator.
*
* @param brightSpec Brightness specification.
*
* @throws IllegalArgumentException if null is passed in.
*
* @throws IllegalStateException if the Indicator resource was lost.
*/
public void setBrightSpec( BrightSpec brightSpec ) throws IllegalStateException;
/**
* Gets the Color specification for the front panel Indicator.
* Changing values within the object returned by this method does not
* take affect until one of the set methods in this interface
* is called and the object is passed to the implementation.
*
* @return LED front panel Color specification or MAY return null if
* changing the color is not supported.
*/
public ColorSpec getColorSpec();
/**
* Sets the Color specification for the front panel Indicator.
*
* @param colorSpec Color specification if color is desired.
*
* @throws IllegalArgumentException if null is passed in.
*
* @throws IllegalStateException if the Indicator resource was lost.
*/
public void setColorSpec( ColorSpec colorSpec ) throws IllegalStateException;
/**
* Gets the blink specification for the front panel Indicator.
* Changing values within the object returned by this method does not
* take affect until one of the set display methods in this interface
* is called and the object is passed to the implementation.
*
* @return LED front panel blink specification or MAY return null if
* blinking is not supported.
*/
public BlinkSpec getBlinkSpec();
/**
* Sets the blink specification for the front panel Indicator.
*
* @param blinkSpec Blink specification if blinking is desired. A value
* of null turns blinking off.
*
* @throws IllegalStateException if the Indicator resource was lost.
*/
public void setBlinkSpec( BlinkSpec blinkSpec ) throws IllegalStateException;
}
package org.ocap.hardware.frontpanel;
import java.util.Hashtable;
/**
* This interface represents the set of individual indicators on a front
* panel (e.g. power, recording). An individual indicator is a single
* lamp or icon that can be turned on or off. It may have properties
* such as color and brightness that can be set.
*/
public interface IndicatorDisplay
{
/**
* Set of possible individual indicator names. Host devices MAY come
* with other implementation specific indicators.
*/
/** Power LED */
public String POWER = "power";
/** RF bypass LED */
public String RFBYPASS = "rfbypass";
/** Message LED */
public String MESSAGE = "message";
/** Record LED */
public String RECORD = "record";
/** Remote LED */
public String REMOTE = "remote";
/**
* Gets the set of reserved indicators. The HashTable returned SHALL
* contain the name of the indicator and a corresponding
* {@link Indicator} object. The set of standardized indicators
* includes "power", "rfbypass", "message", and "record". The
* Indicator object associated with each indicator can be used to
* change the color and brightness (i.e. turn on or off) if those
* properties are supported.
*
* @return The set of Indicators reserved using
* {@link FrontPanelManager#reserveIndicator}
*/
public Hashtable getIndicators();
}
package org.ocap.hardware.frontpanel;
/**
* This interface represents th scrolling specification of a front panel
* text display. In a single line display text will scroll from right
* to left. In a multi-line display text will scroll from bottom to top.
* In this mode either text lines must not exceed the length of the display
* or wrap must be turned on.
*/
public interface ScrollSpec
{
/**
* Gets the maximum number of times per minute characters can
* scroll right to left across the display with zero hold time set.
*
* @return Number of horizontal scroll iterations per minute. Returns
* zero if horizontal scroll is not supported.
*/
public int getMaxHorizontalIterations();
/**
* Gets the maximum number of times per minute characters can
* scroll bottom to top across the display with zero hold time set.
*
* @return Number of vertical scroll iterations per minute. Returns -1
* if the display only supports one row. Returns zero if vertical
* scroll is not supported.
*/
public int getMaxVerticalIterations();
/**
* Gets the number of times per minute the characters are set to scroll
* across the screen from right to left.
*
* @return Number of horizontal scroll iterations per minute. A value of
* 0 indicates horizontal scrolling is turned off. A value of -1
* indicates there is more than one row displayed and characters
* will scroll vertically.
*/
public int getHorizontalIterations();
/**
* Gets the number of times per minute the characters are set to scroll
* across the screen from bottom to top.
*
* @return Number of vertical scroll iterations per minute. A value of
* 0 indicates vertical scrolling is turned off. A value of -1
* indicates there is only one row of characters displayed and
* characters will scroll horizontally.
*/
public int getVerticalIterations();
/**
* Sets the number of times per minute one character will scroll across
* the display from right to left.
*
* @param iterations Number of horizontal scroll iterations per minute.
*
* @throws IllegalArgumentException if the iteration is negative or
* exceed the value returned by
* <code>getMaxHorizontalIterations</code>.
*/
public void setHorizontalIterations(int iterations);
/**
* Sets the number of times per minute one character will scroll across
* the display from bottom to top.
*
* @param iterations Number of vertical scroll iterations per minute.
*
* @throws IllegalArgumentException if the iteration is negative or
* exceed the value returned by
* <code>getMaxVerticalalIterations</code>.
*/
public void setVerticalIterations(int iterations);
/**
* Gets the percentage of time the scroll will hold at each character
* during one scroll iteration.
*
* @return Character hold duration.
*/
public int getHoldDuration();
/**
* Sets the percentage of time to hold at each character before
* scrolling it to the next position during one scroll iteration.
*
* @param duration Character hold percentage duration. Setting this
* value causes a smooth scroll across all characters without a
* hold on any of them.
*
* @throws IllegalArgumentException if duration is negative or if the
* duration percentage is greater than 100 divided by the number
* of characters to scroll across during horizontal scroll, or
* the number of rows to scroll across during vertical scroll.
*/
public void setHoldDuration(int duration);
}
package org.ocap.hardware.frontpanel;
import org.davic.resources.ResourceClient;
import org.davic.resources.ResourceProxy;
/**
* This interface represents one line of characters in a front panel display.
*/
public interface TextDisplay extends ResourceProxy
{
/*
* Modes.
*/
/**
* This line will display the network time using a standard 12 hour
* HH:MM format.
*/
public final static byte TWELVE_HOUR_CLOCK = 0x00;
/**
* This line will display the network time using a military 24 hour
* HH:MM format.
*/
public final static byte TWENTYFOUR_HOUR_CLOCK = 0x01;
/**
* The line can be set using a string of displayable characters.
*/
public final static byte STRING_MODE = 0x02;
/**
* Gets the brightness specification for the front panel text display.
* Changing values within the object returned by this method does not
* take affect until one of the set methods in this interface
* is called and the object is passed to the implementation.
*
* @return LED front panel brightness specification.
*/
public BrightSpec getBrightSpec();
/**
* Gets the Color specification for the front panel text display.
* Changing values within the object returned by this method does not