agentland.device
Class CDPlayerAgent
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--metaglue.AgentAgent
|
+--agentland.device.CDPlayerAgent
- All Implemented Interfaces:
- Agent, CDPlayer, MetagluePrimitives, Player, Remote, Serializable
- public class CDPlayerAgent
- extends AgentAgent
- implements CDPlayer
CDPlayer Agent
Intelligent Room/HAL Project
MIT Artificial Intelligence Laboratory
Cambridge, MA
Adapted from sbj's hci.dev.CDPlayer code into agent form 1/26/98 - jjlilley
Here's part of the original description:
The CDPlayer class controls the CDPlayer currently connected to Bird "A",
by sending the appropriate addresses to the SerialIR class.
It also keeps status information: power on/standby, and
cd status (Play/Pause/Stop). Of course, it doesn't
recieve this information from the CDPlayer, so when this class is
instantiated some status information is assumed. See below.
nn *
- See Also:
- Serialized Form
Methods inherited from class metaglue.AgentAgent |
addMonitor, alive, defrost, defrostAll, defrostBoolean, defrostInt, defrostString, fixAttribute, fixAttribute, freeze, freeze, freeze, freezeAll, freezeVar, getAgentID, getAttribute, getCatalog, getCatalogID, getDesignation, getFrozenVariables, getLogLevel, getMetaglueAgent, getMetaglueAgentID, getOccupation, getProperties, getSociety, log, log, log, lookupClass, obtainMetaglueAgent, obtainMetaglueAgent, obtainMetaglueAgentByName, reliesOn, reliesOn, reliesOn, reliesOnSynch, removeFrozen, replaceExceptionHandler, setFreezeName, setLogLevel, setLogName, shutdown, startAgent, startAgentOn, startAgentOn, startup, status, tiedTo, tiedTo, tiedTo, tiedTo, tieToDesignation, whereAreYou |
CD_STOPPED
public static final int CD_STOPPED
CD_PLAYING
public static final int CD_PLAYING
CD_PAUSED
public static final int CD_PAUSED
CDPlayerAgent
public CDPlayerAgent()
throws RemoteException
setPowerStatus
public void setPowerStatus(boolean on)
throws RemoteException
- Use this to set the power status if it's wrong
- Specified by:
setPowerStatus
in interface CDPlayer
getPowerStatus
public boolean getPowerStatus()
throws RemoteException
- Specified by:
getPowerStatus
in interface CDPlayer
turnOn
public void turnOn()
throws RemoteException
- Specified by:
turnOn
in interface CDPlayer
turnOff
public void turnOff()
throws RemoteException
- Specified by:
turnOff
in interface CDPlayer
setDisc
public void setDisc(int ch)
throws RemoteException
- This sets the disc to the specified integer, by pressing the
buttons in order, followed by "SET DISC". A half-second delay seperates
the presses, and a half-second delay follows the presses.
- Specified by:
setDisc
in interface CDPlayer
setTrack
public void setTrack(int ch)
throws RemoteException
- This sets the track to the specified integer, by pressing the
buttons in order, followed by "SET TRACK". A half-second delay seperates
the presses, and a half-second delay follows the presses.
- Specified by:
setTrack
in interface CDPlayer
play
public void play()
throws RemoteException
- Specified by:
play
in interface CDPlayer
stop
public void stop()
throws RemoteException
- Specified by:
stop
in interface CDPlayer
pause
public void pause()
throws RemoteException
- Specified by:
pause
in interface CDPlayer
nextTrack
public void nextTrack()
throws RemoteException
- Specified by:
nextTrack
in interface CDPlayer
previousTrack
public void previousTrack()
throws RemoteException
- Specified by:
previousTrack
in interface CDPlayer
nextDisc
public void nextDisc()
throws RemoteException
- Specified by:
nextDisc
in interface CDPlayer
previousDisc
public void previousDisc()
throws RemoteException
- Specified by:
previousDisc
in interface CDPlayer
getStringCDStatus
public String getStringCDStatus()
throws RemoteException
- Specified by:
getStringCDStatus
in interface CDPlayer
getIntCDStatus
public int getIntCDStatus()
throws RemoteException
- Specified by:
getIntCDStatus
in interface CDPlayer
playSong
public void playSong(int disc,
int track)
throws RemoteException
- This method plays a song on disc disc and track track.
The player stops after playing the song
- Specified by:
playSong
in interface CDPlayer
play
public void play(Song s)
throws RemoteException
- Specified by:
play
in interface Player
resume
public void resume()
throws RemoteException
- Specified by:
resume
in interface Player