|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.intel.research.rain.Service
|
+--uwcse.location.LocationService
|
+--uwcse.location.FusionService
A service to collect the Measurements generated by various hardware drivers and perform sensor fusion.
Measurement| Nested Class Summary | |
protected class |
FusionService.FusionMeasurementThread
A helper thread class for the FusionService to consume measurements received and queued by the FusionService and update the appropriate physical object's trackers. |
protected class |
FusionService.FusionThread
A helper abstract thread class for the FusionService |
protected class |
FusionService.NameSubscriptionThread
A thread class to manage and dispatch name subscription issues. |
protected class |
FusionService.SubscriptionThread
A thread class to manage and dispatch subscription issues. |
protected class |
FusionService.TypeSubscriptionThread
A thread class to manage and dispatch type subscription issues. |
| Nested classes inherited from class uwcse.location.LocationService |
LocationService.RediscoverServices |
| Field Summary | |
protected String |
m_dbInitDir
|
protected String |
m_dbSaveDir
|
protected DisplayPanel |
m_displayPanel
|
protected ThreadGroup |
m_fusionMeasurementThreadGroup
|
protected ThreadGroup |
m_fusionThreadGroup
|
protected JFrame |
m_mainFrame
|
protected ProducerConsumerQueue |
m_measurementQueue
|
protected PhysicalObjectDatabase |
m_objectDatabase
|
protected Map |
m_subscriptionToThreadMap
|
protected long |
SUBSCRIPTION_LENGTH
|
protected long |
SUBSCRIPTION_PERIOD
|
| Fields inherited from class uwcse.location.LocationService |
CONFIG_FILENAME, MESSAGE_ELEMENT, MESSAGE_EXTENSION, RPC_ELEMENT, RPC_EXCEPTION_ELEMENT, RPC_EXTENSION, RPC_RESULT_ELEMENT |
| Constructor Summary | |
FusionService(String databaseInitDirectory,
String databaseSaveDirectory)
Construct a FusionServce. |
|
| Method Summary | |
protected void |
handleTerminalCommand(String cmd)
Process fusion terminal command strings captured by runTerminalCommandLoop. |
void |
hideVisualization()
Hide the visualization window. |
static void |
main(String[] argv)
|
protected static void |
printUsageAndExit()
Show the program argument usage and then exit. |
protected void |
processLocationMsg(ServiceID from,
LocationMsg@MeasurementMsg measMsg)
Handle incoming Measurements by placing them on the processing queue. |
protected LocationRpcResult |
processLocationRpc(ServiceID from,
LocationRpc@AddChildObjectRpc addChildObjectRpc)
Handle an RPC request to add a child PhysicalObject to the database with an existing parent. |
protected LocationRpcResult |
processLocationRpc(ServiceID from,
LocationRpc@AddObjectRpc addRpc)
Handle an RPC request to add a PhysicalObject to the database. |
protected LocationRpcResult |
processLocationRpc(ServiceID from,
LocationRpc@AddObjectWithStateRpc addRpc)
Handle an RPC request to add a PhysicalObject to the database and initialize its State. |
protected LocationRpcResult |
processLocationRpc(ServiceID from,
LocationRpc@LinkObjectRpc linkObjectRpc)
Handle an RPC request to hierarchically link two existing PhysicalObjects in the database. |
protected LocationRpcResult |
processLocationRpc(ServiceID from,
LocationRpc@LocationQuery query)
Respond to a query request for the locations of objects. |
protected LocationRpcResult |
processLocationRpc(ServiceID from,
LocationRpc@NameSubscriptionReq nameSubReq)
Request a subscription to the named object. |
protected LocationRpcResult |
processLocationRpc(ServiceID from,
LocationRpc@ObjectNameQuery query)
Respond to a request to query the database for the names of objects. |
protected LocationRpcResult |
processLocationRpc(ServiceID from,
LocationRpc@PhysicalObjectQuery query)
Respond to a query request for a PhysicalObject. |
protected LocationRpcResult |
processLocationRpc(ServiceID from,
LocationRpc@PhysicalObjectRootQuery query)
Respond to a query request for a root PhysicalObject. |
protected LocationRpcResult |
processLocationRpc(ServiceID from,
LocationRpc@RemoveObjectGroupRpc removeObjectGroupRpc)
Handle an RPC request to remove from the database a PhysicalObject and all child objects in its hierarchical group. |
protected LocationRpcResult |
processLocationRpc(ServiceID from,
LocationRpc@RemoveObjectRpc removeObjectRpc)
Handle an RPC request to remove a PhysicalObject from the database. |
protected LocationRpcResult |
processLocationRpc(ServiceID from,
LocationRpc@SubscriptionCancellationReq req)
Handle a request to cancel an existing subscription. |
protected LocationRpcResult |
processLocationRpc(ServiceID from,
LocationRpc@SubscriptionExpirationReq req)
Handle a request to expire an existing subscription. |
protected LocationRpcResult |
processLocationRpc(ServiceID from,
LocationRpc@SubscriptionRenewalReq req)
Handle a request to renew an existing subscription. |
protected LocationRpcResult |
processLocationRpc(ServiceID from,
LocationRpc@TypeLocationQuery query)
Respond to a query request for the locations of all objects of a certain type. |
protected LocationRpcResult |
processLocationRpc(ServiceID from,
LocationRpc@TypeSubscriptionReq typeSubReq)
Request a subscription to all objects of a given type. |
protected LocationRpcResult |
processLocationRpc(ServiceID from,
LocationRpc@UnlinkObjectRpc unlinkObjectRpc)
Handle an RPC request to unlink an existing PhysicalObjects from any grouping parents in the database. |
protected LocationRpcResult |
processLocationRpc(ServiceID from,
LocationRpc@WorldMapQuery query)
Respond to a query request for the world map. |
void |
showVisualization()
Display the visualization window. |
protected void |
withdraw()
Supplement the inherited behavior to gracefully shutdown the thread groups and possibly save a database snapshot when withdrawing from Rain. |
| Methods inherited from class uwcse.location.LocationService |
addObject, callLocationRpc, correctedTimeMillis, getObject, getSysclockError, multicastLocationMsg, multicastLocationMsgs, processLocationMsg, processLocationRpc, runTerminalCommandLoop, sendLocationMsg, sendLocationMsgs, setDescription |
| Methods inherited from class com.intel.research.rain.Service |
getDaemon, getDispatcher, getServiceID, process, receive, setDaemon |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected final long SUBSCRIPTION_LENGTH
protected final long SUBSCRIPTION_PERIOD
protected ProducerConsumerQueue m_measurementQueue
protected ThreadGroup m_fusionThreadGroup
protected ThreadGroup m_fusionMeasurementThreadGroup
protected PhysicalObjectDatabase m_objectDatabase
protected Map m_subscriptionToThreadMap
protected String m_dbInitDir
protected String m_dbSaveDir
protected JFrame m_mainFrame
protected DisplayPanel m_displayPanel
| Constructor Detail |
public FusionService(String databaseInitDirectory,
String databaseSaveDirectory)
throws RainException,
LocationException
databaseInitDirectory - the name of the filesystem directory
containing a persistent database snapshot that will be used for
initalization. Must not be null and should designate an existing
directory.databaseSaveDirectory - the name of a filesystem directory to save a
persistent database snapshot when the FusionService is withdrawn. No
snapshot is saved if this parameter is null.
RainException
LocationExceptionwithdraw()| Method Detail |
protected void processLocationMsg(ServiceID from,
LocationMsg@MeasurementMsg measMsg)
processLocationMsg in class LocationServiceMeasurement,
ProducerConsumerQueue
protected LocationRpcResult processLocationRpc(ServiceID from,
LocationRpc@AddChildObjectRpc addChildObjectRpc)
throws DuplicatePhysicalObjectException,
NoSuchPhysicalObjectException
processLocationRpc in class LocationServiceDuplicatePhysicalObjectException
NoSuchPhysicalObjectExceptionPhysicalObjectDatabase.add(PhysicalObject,String)
protected LocationRpcResult processLocationRpc(ServiceID from,
LocationRpc@AddObjectRpc addRpc)
throws DuplicatePhysicalObjectException,
NoSuchPhysicalObjectException
processLocationRpc in class LocationServiceDuplicatePhysicalObjectException
NoSuchPhysicalObjectExceptionPhysicalObjectDatabase.add(PhysicalObject)
protected LocationRpcResult processLocationRpc(ServiceID from,
LocationRpc@AddObjectWithStateRpc addRpc)
throws DuplicatePhysicalObjectException,
NoSuchPhysicalObjectException
processLocationRpc in class LocationServiceDuplicatePhysicalObjectException
NoSuchPhysicalObjectExceptionPhysicalObjectDatabase.add(PhysicalObject),
PhysicalObjectDatabase.getTracker(String),
Tracker.initLocation(LocationReport)
protected LocationRpcResult processLocationRpc(ServiceID from,
LocationRpc@LinkObjectRpc linkObjectRpc)
throws NoSuchPhysicalObjectException
processLocationRpc in class LocationServiceNoSuchPhysicalObjectExceptionPhysicalObjectDatabase.link(String,String)
protected LocationRpcResult processLocationRpc(ServiceID from,
LocationRpc@UnlinkObjectRpc unlinkObjectRpc)
throws NoSuchPhysicalObjectException
processLocationRpc in class LocationServiceNoSuchPhysicalObjectExceptionPhysicalObjectDatabase.unlink(String)
protected LocationRpcResult processLocationRpc(ServiceID from,
LocationRpc@RemoveObjectGroupRpc removeObjectGroupRpc)
throws NoSuchPhysicalObjectException
processLocationRpc in class LocationServiceNoSuchPhysicalObjectExceptionPhysicalObjectDatabase.removeGroup(String)
protected LocationRpcResult processLocationRpc(ServiceID from,
LocationRpc@RemoveObjectRpc removeObjectRpc)
throws NoSuchPhysicalObjectException
processLocationRpc in class LocationServiceNoSuchPhysicalObjectExceptionPhysicalObjectDatabase.remove(String)
protected LocationRpcResult processLocationRpc(ServiceID from,
LocationRpc@WorldMapQuery query)
throws NoSuchPhysicalObjectException
processLocationRpc in class LocationServiceNoSuchPhysicalObjectExceptionPhysicalObjectDatabase.getObject(String)
protected LocationRpcResult processLocationRpc(ServiceID from,
LocationRpc@PhysicalObjectQuery query)
throws NoSuchPhysicalObjectException
processLocationRpc in class LocationServiceNoSuchPhysicalObjectExceptionPhysicalObjectDatabase.getObject(String)
protected LocationRpcResult processLocationRpc(ServiceID from,
LocationRpc@PhysicalObjectRootQuery query)
throws NoSuchPhysicalObjectException
processLocationRpc in class LocationServiceNoSuchPhysicalObjectExceptionPhysicalObjectDatabase.getObject(String)
protected LocationRpcResult processLocationRpc(ServiceID from,
LocationRpc@LocationQuery query)
processLocationRpc in class LocationServiceLocationReport,
PhysicalObjectDatabase.getTracker(String),
Tracker.createLocationReport()
protected LocationRpcResult processLocationRpc(ServiceID from,
LocationRpc@TypeLocationQuery query)
throws ClassNotFoundException
processLocationRpc in class LocationServiceClassNotFoundExceptionLocationReport,
PhysicalObjectDatabase.getTracker(String),
Tracker.createLocationReport()
protected LocationRpcResult processLocationRpc(ServiceID from,
LocationRpc@NameSubscriptionReq nameSubReq)
processLocationRpc in class LocationService
protected LocationRpcResult processLocationRpc(ServiceID from,
LocationRpc@TypeSubscriptionReq typeSubReq)
throws ClassNotFoundException
processLocationRpc in class LocationServiceClassNotFoundException
protected LocationRpcResult processLocationRpc(ServiceID from,
LocationRpc@SubscriptionRenewalReq req)
throws NoSuchSubscriptionException
processLocationRpc in class LocationServiceNoSuchSubscriptionException
protected LocationRpcResult processLocationRpc(ServiceID from,
LocationRpc@SubscriptionExpirationReq req)
throws NoSuchSubscriptionException
processLocationRpc in class LocationServiceNoSuchSubscriptionException
protected LocationRpcResult processLocationRpc(ServiceID from,
LocationRpc@SubscriptionCancellationReq req)
throws NoSuchSubscriptionException
processLocationRpc in class LocationServiceNoSuchSubscriptionException
protected LocationRpcResult processLocationRpc(ServiceID from,
LocationRpc@ObjectNameQuery query)
processLocationRpc in class LocationServicePhysicalObjectDatabase.queryNames(),
PhysicalObjectDatabase.queryNamesByType(String),
PhysicalObjectDatabase.queryNamesByGroup(String),
PhysicalObjectDatabase.queryNamesByTypeAndGroup(String,String)protected void withdraw()
withdraw in class LocationServiceFusionService#FusionService(String),
FusionService(String,String),
FusionService#FusionService(String,String,String),
PhysicalObjectDatabase.save(File)public void showVisualization()
public void hideVisualization()
protected void handleTerminalCommand(String cmd)
handleTerminalCommand in class LocationService#runTerminalCommandLoop()protected static void printUsageAndExit()
public static void main(String[] argv)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||