es.upv.dsic.gti_ia.jgomas
Class CSoldier

java.lang.Object
  extended by jade.core.Agent
      extended by es.upv.dsic.gti_ia.jgomas.CJGomasAgent
          extended by es.upv.dsic.gti_ia.jgomas.CBasicTroop
              extended by es.upv.dsic.gti_ia.jgomas.CTroop
                  extended by es.upv.dsic.gti_ia.jgomas.CSoldier
All Implemented Interfaces:
jade.core.TimerListener, java.io.Serializable, java.lang.Runnable

public class CSoldier
extends CTroop

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class jade.core.Agent
jade.core.Agent.Interrupted
 
Field Summary
 
Fields inherited from class es.upv.dsic.gti_ia.jgomas.CBasicTroop
ARG_TEAM, CLASS_ENGINEER, CLASS_FIELDOPS, CLASS_MEDIC, CLASS_NONE, CLASS_SOLDIER, m_AimedAgent, m_AStarPath, m_bEscaping, m_bFighting, m_bObjectiveCarried, m_ControlPoints, m_CurrentTask, m_eClass, m_eTeam, m_FOVObjects, m_iAStarPathIndex, m_iControlPointsIndex, m_iEngineersCount, m_iFieldOpsCount, m_iMedicsCount, m_iSoldiersCount, m_iTeamCount, m_Manager, m_Map, m_Movement, m_sAmmoService, m_sBackupService, m_sMedicService, m_TaskList, m_TaskPriority, m_Threshold, MV_CANNOT_GET_POSITION, MV_NOT_MOVED_BY_TIME, MV_OK, TEAM_ALLIED, TEAM_AXIS, TEAM_NONE, TRANSITION_DEFAULT, TRANSITION_TO_FIGHTING, TRANSITION_TO_GOTO_TARGET, TRANSITION_TO_STANDING, TRANSITION_TO_TARGET_REACHED
 
Fields inherited from class es.upv.dsic.gti_ia.jgomas.CJGomasAgent
m_ID, m_ServiceList
 
Fields inherited from class jade.core.Agent
AP_ACTIVE, AP_DELETED, AP_IDLE, AP_INITIATED, AP_MAX, AP_MIN, AP_SUSPENDED, AP_WAITING, D_ACTIVE, D_MAX, D_MIN, D_RETIRED, D_SUSPENDED, D_UNKNOWN
 
Constructor Summary
CSoldier()
           
 
Method Summary
protected  boolean checkBackupAction(java.lang.String _sContent)
          Decides if agent accepts the CFB request This method is a decision function invoked when a CALL FOR BACKUP request has arrived.
protected  void setup()
          'setup' method of jade agents.
protected  void SetUpPriorities()
          Definition of priorities for each kind of task.
 
Methods inherited from class es.upv.dsic.gti_ia.jgomas.CTroop
takeDown
 
Methods inherited from class es.upv.dsic.gti_ia.jgomas.CBasicTroop
AddServiceType, AddTask, AddTask, CallForAmmo, CallForBackup, CallForMedic, CheckStaticPosition, CheckStaticPosition, CreateControlPoints, GenerateEscapePosition, GeneratePath, GetAgentToAim, GetAmmo, GetHealth, GetPower, GetStamina, HaveAgentToShot, Look, Move, ObjectivePackTaken, PerformAimAction, PerformInjuryAction, PerformLookAction, PerformNoAmmoAction, PerformTargetReached, PerformThresholdAction, Shot, ShouldUpdateTargets, UpdateTargets, UsePower, UseStamina
 
Methods inherited from class es.upv.dsic.gti_ia.jgomas.CJGomasAgent
AddService
 
Methods inherited from class jade.core.Agent
addBehaviour, afterClone, afterMove, beforeClone, beforeMove, blockingReceive, blockingReceive, blockingReceive, blockingReceive, changeStateTo, clean, doActivate, doClone, doDelete, doMove, doSuspend, doTimeOut, doWait, doWait, doWake, getAgentState, getAID, getAMS, getArguments, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getHap, getHelper, getLocalName, getName, getO2AObject, getProperty, getQueueSize, getState, here, notifyChangeBehaviourState, notifyRestarted, postMessage, putBack, putO2AObject, receive, receive, removeBehaviour, restartLater, restore, restoreBufferedState, run, send, setArguments, setEnabledO2ACommunication, setGenerateBehaviourEvents, setQueueSize, waitUntilStarted, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSoldier

public CSoldier()
Method Detail

setup

protected void setup()
'setup' method of jade agents. This method perform actions in common to CSoldier agents (and derived classes) and calls parent's setup.

Overrides:
setup in class CTroop

SetUpPriorities

protected void SetUpPriorities()
Description copied from class: CBasicTroop
Definition of priorities for each kind of task. This method can be implemented in CBasicTroop's derived classes to define the task's priorities in agreement to the role of the new class. Priorities must be defined in the array m_TaskPriority. It's very useful to overload this method.

Overrides:
SetUpPriorities in class CBasicTroop

checkBackupAction

protected boolean checkBackupAction(java.lang.String _sContent)
Decides if agent accepts the CFB request This method is a decision function invoked when a CALL FOR BACKUP request has arrived. Parameter sContent is the content of message received in CFB responder behaviour as result of a CallForBackup request, so it must be: ( x , y , z ) ( SoldiersCount ) . By default, the return value is TRUE, so agents always accepts all CFB requests. It's very useful to overload this method.

Parameters:
_sContent -
Returns:
TRUE