agentland.device
Interface AlphaLEDSign

All Superinterfaces:
Agent, Good, Managed, Remote, Spy, TextOutput
All Known Implementing Classes:
AlphaLEDSignAgent

public interface AlphaLEDSign
extends Managed, TextOutput

The interface for AlphaLEDSignAgent AlphaLEDSignAgent controls the Alpha-brand LED signs. The Alpha LED sign can display two lines of text. Using this agent, you can send text information to either the top line, the bottom line, or the middle (which treats both top and bottom lines as one). The text can be formatted in different colors, sizes, and fonts.

See Also:
AlphaLEDColors, AlphaLEDFonts, Agent

Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Method Summary
 void clear()
          Outputs a " " space character, essentially clearing the display.
 String get()
          Gets the text on the LED.
 String getBottom()
          Gets the text on the bottom line of the LED.
 String getTop()
          Gets the text on the top line of the LED.
 void outputText(String sText)
          outputText displays a message across the entire sign.
 void outputText(String sText, String sColor)
          Outputs text with a specific color to the LED sign.
 void outputText(String sText, String sColor, String sFont)
          Outputs text with a specific color and font to the LED sign.
 void outputTextBoth(String top, String bot)
          Send output to both lines at once.
 void outputTextBottom(String sText)
          SignBottomOut displays a message on the bottom line of the sign.
 void outputTextBottom(String sText, String sColor)
          Outputs text with a specific color to the bottom row of the LED
 void outputTextTop(String sText)
          Outputs text to the top line of the LED sign.
 void outputTextTop(String sText, String sColor)
          Outputs text with a specified color to the top row of the LED
 void setColor(int iColor)
          Sets the color of future text on the display.
 void setColor(String sColor)
          Sets the color of future text on the display.
 void setColorBottom(String sColor)
          Sets the color of the bottom row.
 void setColorTop(String sColor)
          Sets the color of the top row.
 void setFont(int iFont)
          Sets the font of future text.
 void setFont(String sFont)
          Sets the font of future text.
 boolean signTest()
          SignTest asks the sign what is in Text file A.
 boolean testOutputText()
          Tests if we are able to output text to the sign
 
Methods inherited from interface agentland.resource.Managed
getNeed, replace, replace, resources, yank, yank
 
Methods inherited from interface agentland.util.Good
getHistory, getHistoryElement, resetHistory
 
Methods inherited from interface metaglue.Agent
addMonitor, alive, getAgentID, getMetaglueAgentID, shutdown, startup, whereAreYou
 
Methods inherited from interface agentland.util.Spy
tell
 

Method Detail

outputText

public void outputText(String sText)
                throws RemoteException
outputText displays a message across the entire sign. see the LED Sign PDF document for information on each byte that is used.
Specified by:
outputText in interface TextOutput
Parameters:
sText - a String value that contains the text to be displayed on the sign.
Throws:
RemoteException - if an error occurs

outputText

public void outputText(String sText,
                       String sColor)
                throws RemoteException
Outputs text with a specific color to the LED sign.
Parameters:
sText - a String value
sColor - a String value
Throws:
RemoteException - if an error occurs

outputText

public void outputText(String sText,
                       String sColor,
                       String sFont)
                throws RemoteException
Outputs text with a specific color and font to the LED sign.
Parameters:
sText - a String value
sColor - a String value
sFont - a String value
Throws:
RemoteException - if an error occurs

outputTextBottom

public void outputTextBottom(String sText)
                      throws RemoteException
SignBottomOut displays a message on the bottom line of the sign. If the message is long, it will scroll
Parameters:
stuff - a String value that contains the text to be displayed on the bottom line
Throws:
RemoteException - if an error occurs

outputTextBottom

public void outputTextBottom(String sText,
                             String sColor)
                      throws RemoteException
Outputs text with a specific color to the bottom row of the LED
Parameters:
sText - a String value
sColor - a String value
Throws:
RemoteException - if an error occurs

outputTextTop

public void outputTextTop(String sText)
                   throws RemoteException
Outputs text to the top line of the LED sign.
Parameters:
sText - a String value
Throws:
RemoteException - if an error occurs

outputTextTop

public void outputTextTop(String sText,
                          String sColor)
                   throws RemoteException
Outputs text with a specified color to the top row of the LED
Parameters:
sText - a String value
sColor - a String value
Throws:
RemoteException - if an error occurs

outputTextBoth

public void outputTextBoth(String top,
                           String bot)
                    throws RemoteException
Send output to both lines at once. No color is provided here, so colors should be set separately.
Parameters:
topText - a String value
botText - a String value
Throws:
RemoteException - if an error occurs

get

public String get()
           throws RemoteException
Gets the text on the LED.
Returns:
a String value
Throws:
RemoteException - if an error occurs

getTop

public String getTop()
              throws RemoteException
Gets the text on the top line of the LED.
Returns:
a String value
Throws:
RemoteException - if an error occurs

getBottom

public String getBottom()
                 throws RemoteException
Gets the text on the bottom line of the LED.
Returns:
a String value
Throws:
RemoteException - if an error occurs

clear

public void clear()
           throws RemoteException
Outputs a " " space character, essentially clearing the display.
Throws:
RemoteException - if an error occurs

setColor

public void setColor(String sColor)
              throws RemoteException
Sets the color of future text on the display. The valid colors are auto, red, green, amber, dimred, dimgreen, brown, orange, yellow, rainbow1, rainbow2, or mix. If an invalid color is given, the color will be set to auto
Parameters:
sColor - a String value
Throws:
RemoteException - if an error occurs

setColor

public void setColor(int iColor)
              throws RemoteException
Sets the color of future text on the display. The valid colors are AlphaLEDColors.AUTO AlphaLEDColors.RED AlphaLEDColors.GREEN AlphaLEDColors.AMBER AlphaLEDColors.DIMRED AlphaLEDColors.DIMGREEN AlphaLEDColors.BROWN AlphaLEDColors.ORANGE AlphaLEDColors.YELLOW AlphaLEDColors.RAINBOW1 AlphaLEDColors.RAINBOW2 AlphaLEDColors.MIX If an invalid color is given, the color will be set to AlphaLEDColors.AUTO
Parameters:
iColor - an int value
Throws:
RemoteException - if an error occurs

setColorTop

public void setColorTop(String sColor)
                 throws RemoteException
Sets the color of the top row. The bottom row is unaffected.
Parameters:
sColor - a String value
Throws:
RemoteException - if an error occurs

setColorBottom

public void setColorBottom(String sColor)
                    throws RemoteException
Sets the color of the bottom row. The top row is unaffected.
Parameters:
sColor - a String value
Throws:
RemoteException - if an error occurs

setFont

public void setFont(String sFont)
             throws RemoteException
Sets the font of future text. The font can be: small medium mediumbold large huge hugebold
Parameters:
sFont - a String value
Throws:
RemoteException - if an error occurs

setFont

public void setFont(int iFont)
             throws RemoteException
Sets the font of future text. The font can be: AlphaLEDSign.SMALL AlphaLEDSign.MEDIUM AlphaLEDSign.MEDIUMBOLD AlphaLEDSign.LARGE AlphaLEDSign.HUGE AlphaLEDSign.HUGEBOLD
Parameters:
iFont - an int value
Throws:
RemoteException - if an error occurs

signTest

public boolean signTest()
                 throws RemoteException
SignTest asks the sign what is in Text file A. If the sign is connected it will respond and the method will return true. If the sign does not respond with anything, it will return false.
Returns:
a boolean value - True = sign responded, False = sign did not respond
Throws:
RemoteException - if an error occurs

testOutputText

public boolean testOutputText()
                       throws RemoteException
Tests if we are able to output text to the sign
Returns:
a boolean value
Throws:
RemoteException - if an error occurs