de.fhg.igd.earth.observe.trace
Class AgentGlobalTracer

java.lang.Object
  extended byde.fhg.igd.earth.observe.trace.Tracer
      extended byde.fhg.igd.earth.observe.trace.AgentGlobalTracer
All Implemented Interfaces:
AtlasStimulator

public class AgentGlobalTracer
extends Tracer
implements AtlasStimulator

This class is a special Tracer to observe mobile agents by using the atlas component of SeMoA Title : Earth Copyright : Copyright (c) 2001 Organisation : IGD FhG

Version:
: 1.0
Author:
: Werner Beutel

Field Summary
protected  AtlasConnector acon_
          a link to the SeMoA-Atlas
protected  byte[][] entries_
          the agents entries list
protected  InfoCache infoCache_
          storage for static implicit names
 
Fields inherited from class de.fhg.igd.earth.observe.trace.Tracer
datapath_, enabled_, model_, traceList_, trigger_
 
Constructor Summary
AgentGlobalTracer()
          Creates a instance of this class and initializes the SeMoA-Atlas
 
Method Summary
 void addAgent(byte[] implicitName)
          This method is called by the AtlasConnector to add an agent into the tracer
 void addAgent(byte[] implicitName, String nickname)
          Is called to add an agent to the tracer
 void addAgentsAutomatically(boolean flag)
          Sets flag addAgentsAutomatically_, which is used by AtlasConnector
 int createTraceList()
          Creates the trace list.
 String getIdentName()
          Returns the ident name of this tracer
 byte[][] getLSEntries()
          Returns the list of implicit names
 void hideAtlasGUI()
          Hides the Atlas GUI
private  void init()
          Initializes the SeMoA-Atlas
private  void jump(HistoryGroup hg, double lon, double lat)
          Creates a new agent body and moves it to the given position
 void setDatapath(String datapath)
          sets the I/O datapath
 void showAtlasGUI()
          Shows the Atlas GUI to select an agent
 void simulate(int cmd)
          Simulates jumps of agents
 void stimulus(AtlasConnector acon)
          This method is called from the AtlasConnector if an agent has moved
 void update()
          Calles the trigger delay to update the viewer
private  boolean updateInfo(byte[] implicitName, HistoryGroup hg)
          Updates the info table in an history group with the given implicit name
 
Methods inherited from class de.fhg.igd.earth.observe.trace.Tracer
addLogger, getLoggerList, getTraceList, setModel, setTrigger, start, stop, writeLog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entries_

protected byte[][] entries_
the agents entries list


acon_

protected AtlasConnector acon_
a link to the SeMoA-Atlas


infoCache_

protected InfoCache infoCache_
storage for static implicit names

Constructor Detail

AgentGlobalTracer

public AgentGlobalTracer()
Creates a instance of this class and initializes the SeMoA-Atlas

Method Detail

init

private void init()
Initializes the SeMoA-Atlas


setDatapath

public void setDatapath(String datapath)
sets the I/O datapath

Overrides:
setDatapath in class Tracer
Parameters:
datapath - String

stimulus

public void stimulus(AtlasConnector acon)
This method is called from the AtlasConnector if an agent has moved

Specified by:
stimulus in interface AtlasStimulator
Parameters:
acon - AtlasConnector

updateInfo

private boolean updateInfo(byte[] implicitName,
                           HistoryGroup hg)
Updates the info table in an history group with the given implicit name

Returns:
result (true=ok / false=nok)

jump

private void jump(HistoryGroup hg,
                  double lon,
                  double lat)
Creates a new agent body and moves it to the given position


addAgent

public void addAgent(byte[] implicitName)
This method is called by the AtlasConnector to add an agent into the tracer

Specified by:
addAgent in interface AtlasStimulator
Parameters:
implicitName -

addAgent

public void addAgent(byte[] implicitName,
                     String nickname)
Description copied from interface: AtlasStimulator
Is called to add an agent to the tracer

Specified by:
addAgent in interface AtlasStimulator

getLSEntries

public byte[][] getLSEntries()
Returns the list of implicit names

Returns:
byte[][]

showAtlasGUI

public void showAtlasGUI()
Shows the Atlas GUI to select an agent


hideAtlasGUI

public void hideAtlasGUI()
Hides the Atlas GUI


getIdentName

public String getIdentName()
Returns the ident name of this tracer

Specified by:
getIdentName in class Tracer
Returns:
identName String

createTraceList

public int createTraceList()
Creates the trace list. Returns the number of items in trace list

Specified by:
createTraceList in class Tracer
Returns:
number of items

update

public void update()
Calles the trigger delay to update the viewer

Specified by:
update in class Tracer

simulate

public void simulate(int cmd)
Simulates jumps of agents

Parameters:
cmd - (0=Germany 1=World)

addAgentsAutomatically

public void addAgentsAutomatically(boolean flag)
Sets flag addAgentsAutomatically_, which is used by AtlasConnector



Copyright © Fraunhofer Gesellschaft. All Rights Reserved.