|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.cybergarage.upnp.Device
edu.wisc.trace.upnptarget.SatelliteDevice
public class SatelliteDevice
This class provides functionality of SatelliteBox device. It uses cybergarage UPNP library. It extends Device class and implements ActionListener and QueryListener interfaces.
Created on: 11/15/2007
Known bugs: None
Thread safe: Yes
| Field Summary |
|---|
| Fields inherited from class org.cybergarage.upnp.Device |
|---|
DEFAULT_DESCRIPTION_URI, DEFAULT_DISCOVERY_WAIT_TIME, DEFAULT_LEASE_TIME, DEFAULT_STARTUP_WAIT_TIME, ELEM_NAME, HTTP_DEFAULT_PORT, UPNP_ROOTDEVICE |
| Constructor Summary | |
|---|---|
SatelliteDevice(File deviceDescription)
Class constructor. |
|
| Method Summary | |
|---|---|
boolean |
actionControlReceived(org.cybergarage.upnp.Action action)
This method is being called when any actions is performed on SatelliteBoxDevice. |
int |
getCurrentChannel()
Returns current channel |
boolean |
getMuteStatus()
Returns MuteStateVariable |
String |
getPowerState()
Returns power mode state ( "ON" or "STANDBY" ) |
int |
getPreviousChannel()
Returns Previous channel |
int |
getVolume()
Returns volume |
void |
mute(boolean muteFlag)
Sets MuteStateVariable to the value passed. |
void |
on()
Sets PowerMode state variable to on. |
boolean |
queryControlReceived(org.cybergarage.upnp.StateVariable stateVar)
This method is being called when query is called on any state variable of SatelliteBoxDevice. |
void |
setCurrentChannel(int channel)
Set value of ActiveChannelStateVariable to channel |
void |
SetPowerMode(String state)
Call corresponding method for changing power mode. |
void |
setPreviousChannel(int prevChannel)
Set value of PreviousChannelStateVariable to prevChannel |
void |
setSatelliteBoxListener(IDeviceListener listener)
Assigns ISatelliteBoxListener objects. |
void |
setVolume(int vol)
Set value of VolumeStateVariable to vol |
void |
standby()
Sets PowerMode state variable to standby. |
void |
startDevice()
Calls start method |
void |
stopDevice()
Calls stop method |
void |
stopSatelliteBoxDevice()
|
| Methods inherited from class org.cybergarage.upnp.Device |
|---|
announce, announce, byebye, byebye, deviceSearchReceived, deviceSearchResponse, getAction, getDescriptionFile, getDescriptionFilePath, getDevice, getDeviceByDescriptionURI, getDeviceList, getDeviceNode, getDeviceType, getElapsedTime, getFriendlyName, getHTTPPort, getIcon, getIconList, getInterfaceAddress, getLeaseTime, getLocation, getLocationURL, getManufacture, getManufactureURL, getModelDescription, getModelName, getModelNumber, getModelURL, getParentDevice, getPresentationURL, getRootDevice, getRootNode, getSerialNumber, getService, getServiceByControlURL, getServiceByEventSubURL, getServiceBySCPDURL, getServiceList, getSSDPAnnounceCount, getSSDPPacket, getStateVariable, getStateVariable, getSubscriberService, getTimeStamp, getUDN, getUPC, getURLBase, hasUDN, httpRequestRecieved, isDevice, isDeviceNode, isDeviceType, isExpired, isNMPRMode, isRootDevice, isWirelessMode, loadDescription, loadDescription, lock, notifyWait, postSearchResponse, setActionListener, setActionListener, setDeviceNode, setDeviceType, setFriendlyName, setHTTPPort, setLeaseTime, setLocation, setManufacture, setManufactureURL, setModelDescription, setModelName, setModelNumber, setModelURL, setNMPRMode, setPresentationURL, setQueryListener, setQueryListener, setRootNode, setSerialNumber, setSSDPPacket, setUDN, setUPC, setWirelessMode, start, stop, unlock |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SatelliteDevice(File deviceDescription)
throws org.cybergarage.upnp.device.InvalidDescriptionException
deviceDescription - XML file containing Satellite Box device description.
org.cybergarage.upnp.device.InvalidDescriptionException| Method Detail |
|---|
public void stopSatelliteBoxDevice()
public void setSatelliteBoxListener(IDeviceListener listener)
listener - Object of ISatelliteBoxListenerpublic void on()
public void standby()
public void SetPowerMode(String state)
state - String containing power state.public String getPowerState()
public void setCurrentChannel(int channel)
channel - integer valuepublic int getCurrentChannel()
public void setPreviousChannel(int prevChannel)
prevChannel - integer valuepublic int getPreviousChannel()
public void setVolume(int vol)
vol - integer value( 0 to 100 )public int getVolume()
public void mute(boolean muteFlag)
muteFlag - boolean value indicating switching ON or OFF mutepublic boolean getMuteStatus()
public boolean actionControlReceived(org.cybergarage.upnp.Action action)
actionControlReceived in interface org.cybergarage.upnp.control.ActionListeneraction - an Action object
public boolean queryControlReceived(org.cybergarage.upnp.StateVariable stateVar)
queryControlReceived in interface org.cybergarage.upnp.control.QueryListenerstateVar - variable in which query result is stored
public void startDevice()
public void stopDevice()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||