>xabsl   The Extensible Agent Behavior Specification Language

XabslEngine Class Library Reference

 

xabsl::CoopState Class Reference

#include <XabslCoopState.h>

Inheritance diagram for xabsl::CoopState:

Inheritance graph
[legend]
Collaboration diagram for xabsl::CoopState:

Collaboration graph
[legend]
List of all members.

Detailed Description

Represents a state which has features to connect to other cooperating agents.

Author:
Max Risler

Definition at line 24 of file XabslCoopState.h.


Public Member Functions

 CoopState (const char *name, ErrorHandler &errorHandler, const unsigned &time, int optionIndex, int index, const int &agentPriority, const int &synchronizationTicks)
 Constructor.

void prepareIncomingMessages ()
 Prepare for processing incoming team messages.


Public Attributes

int numberOfAgentsExecuting
 Number of other agents currently executing this state, not including myself.

int numberOfAgentsEntering
 Number of other agents currently trying to execute this state, but are blocked due to cooperating agents, not including myself.

int numberOfAgentsInOption
 Number of other agents currently executing the option corresponding to this state, not including myself.

int highestPriorityOfAgentsEntering
 Highest priority values of agents currently entering this state, not including myself.

bool entering
 Flag whether the agent is currently trying to execute this state, but is blocked due to cooperating agents.

int enterCount
 Counter for number of cycles that the enter flag of this state is set.

const int & agentPriority
 Priority value of the agent, used for solving conflicts in cooperative state assignment.

const int & synchronizationTicks
 Number of execution cycles that is required for synchonization with other agents, i.e time from sending a message until answer is received.


Constructor & Destructor Documentation

xabsl::CoopState::CoopState const char *  name,
ErrorHandler errorHandler,
const unsigned &  time,
int  optionIndex,
int  index,
const int &  agentPriority,
const int &  synchronizationTicks
[inline]
 

Constructor.

Does not create the state.

Parameters:
name The name of the state. For debugging purposes.
errorHandler A reference to a ErrorHandler instance
time The system time in ms.
optionIndex Index of the corresponding option this state belongs to
index Index of the state in array states in corresponding option
agentPriority Priority value of the agent, used for solving conflicts in cooperative state assignment
synchronizationTicks Number of execution cycles that is required for synchonization with other agents, i.e time from sending a message until answer is received

Definition at line 37 of file XabslCoopState.h.

References enterCount, entering, highestPriorityOfAgentsEntering, numberOfAgentsEntering, numberOfAgentsExecuting, and numberOfAgentsInOption.


Member Function Documentation

void xabsl::CoopState::prepareIncomingMessages  )  [inline]
 

Prepare for processing incoming team messages.

This resets previously processed messages.

Definition at line 80 of file XabslCoopState.h.

References enterCount, entering, numberOfAgentsEntering, numberOfAgentsExecuting, and numberOfAgentsInOption.


Member Data Documentation

int xabsl::CoopState::numberOfAgentsExecuting
 

Number of other agents currently executing this state, not including myself.

Definition at line 56 of file XabslCoopState.h.

Referenced by CoopState(), and prepareIncomingMessages().

int xabsl::CoopState::numberOfAgentsEntering
 

Number of other agents currently trying to execute this state, but are blocked due to cooperating agents, not including myself.

Definition at line 59 of file XabslCoopState.h.

Referenced by CoopState(), and prepareIncomingMessages().

int xabsl::CoopState::numberOfAgentsInOption
 

Number of other agents currently executing the option corresponding to this state, not including myself.

Definition at line 62 of file XabslCoopState.h.

Referenced by CoopState(), and prepareIncomingMessages().

int xabsl::CoopState::highestPriorityOfAgentsEntering
 

Highest priority values of agents currently entering this state, not including myself.

Definition at line 65 of file XabslCoopState.h.

Referenced by CoopState().

bool xabsl::CoopState::entering
 

Flag whether the agent is currently trying to execute this state, but is blocked due to cooperating agents.

Definition at line 68 of file XabslCoopState.h.

Referenced by CoopState(), and prepareIncomingMessages().

int xabsl::CoopState::enterCount
 

Counter for number of cycles that the enter flag of this state is set.

Definition at line 71 of file XabslCoopState.h.

Referenced by CoopState(), and prepareIncomingMessages().

const int& xabsl::CoopState::agentPriority
 

Priority value of the agent, used for solving conflicts in cooperative state assignment.

Definition at line 74 of file XabslCoopState.h.

const int& xabsl::CoopState::synchronizationTicks
 

Number of execution cycles that is required for synchonization with other agents, i.e time from sending a message until answer is received.

Definition at line 77 of file XabslCoopState.h.


The documentation for this class was generated from the following file:

Up | Main Page | Generated at Wed Aug 19 17:32:30 2009.