LightJason - AgentSpeak(L++)
org.lightjason.agentspeak.agent.TestCHanoiTowers Class Reference

abstract test for playing towers of hanoi If a file agentprintin.conf exists on the main directory alls print statements will be shown More...

+ Inheritance diagram for org.lightjason.agentspeak.agent.TestCHanoiTowers:
+ Collaboration diagram for org.lightjason.agentspeak.agent.TestCHanoiTowers:

Classes

class  CAgent
 agent class More...
 
class  CEmptyPrint
 empty print action More...
 
class  CGenerator
 agent generator More...
 
class  CSlice
 defines a slice More...
 
class  CStop
 stop action More...
 
class  CTower
 tower More...
 
class  CTowerPop
 pops an elements from a tower More...
 
class  CTowerPush
 pushs a slice to a tower More...
 
class  CTowerSize
 returns the number of elements of an tower More...
 

Public Member Functions

void initialize () throws Exception
 test initialize More...
 
void play () throws InterruptedException
 test execution More...
 

Static Package Functions

 [static initializer]
 

Private Member Functions

void execute ()
 running towers of hanoi More...
 
void setup (final int p_agentnumber, final long p_towernumber, final long p_slicenumber, final String p_asl, final Stream< IAction > p_action) throws Exception
 initialize call More...
 

Private Attributes

Map< Integer, CAgentm_agents
 agent map More...
 
AtomicBoolean m_running
 running flag (agent can disable execution) More...
 
Long m_slicenumber
 number of slices More...
 
Map< Integer, CTowerm_tower
 tower map More...
 
Long m_towernumber
 number of towers More...
 

Additional Inherited Members

- Static Protected Attributes inherited from org.lightjason.agentspeak.IBaseTest
static final boolean PRINTENABLE = Files.exists( Paths.get( "agentprinting.conf" ) )
 enable printing of test-data More...
 

Detailed Description

Definition at line 71 of file TestCHanoiTowers.java.

Member Function Documentation

◆ [static initializer]()

org.lightjason.agentspeak.agent.TestCHanoiTowers.[static initializer] ( )
staticpackage

◆ execute()

void org.lightjason.agentspeak.agent.TestCHanoiTowers.execute ( )
private

Definition at line 179 of file TestCHanoiTowers.java.

References org.lightjason.agentspeak.IBaseTest.PRINTENABLE.

Referenced by org.lightjason.agentspeak.agent.TestCHanoiTowers.play().

+ Here is the caller graph for this function:

◆ initialize()

void org.lightjason.agentspeak.agent.TestCHanoiTowers.initialize ( ) throws Exception
Exceptions
Exceptionon initialize error

Definition at line 108 of file TestCHanoiTowers.java.

References org.lightjason.agentspeak.agent.TestCHanoiTowers.setup().

+ Here is the call graph for this function:

◆ play()

void org.lightjason.agentspeak.agent.TestCHanoiTowers.play ( ) throws InterruptedException
Exceptions
InterruptedExceptionis thrown on execution error

Definition at line 122 of file TestCHanoiTowers.java.

References org.lightjason.agentspeak.agent.TestCHanoiTowers.execute().

+ Here is the call graph for this function:

◆ setup()

void org.lightjason.agentspeak.agent.TestCHanoiTowers.setup ( final int  p_agentnumber,
final long  p_towernumber,
final long  p_slicenumber,
final String  p_asl,
final Stream< IAction p_action 
) throws Exception
private
Parameters
p_agentnumbernumber of agents
p_towernumbernumber of towers
p_slicenumbernumber of slices
p_aslasl file
p_actionaction stream
Exceptions
Exceptionthrown on initialize error

Definition at line 137 of file TestCHanoiTowers.java.

References org.lightjason.agentspeak.agent.TestCHanoiTowers.CGenerator.generatesingle(), and org.lightjason.agentspeak.agent.TestCHanoiTowers.CTower.push().

Referenced by org.lightjason.agentspeak.agent.TestCHanoiTowers.initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_agents

Map<Integer, CAgent> org.lightjason.agentspeak.agent.TestCHanoiTowers.m_agents
private

Definition at line 76 of file TestCHanoiTowers.java.

◆ m_running

AtomicBoolean org.lightjason.agentspeak.agent.TestCHanoiTowers.m_running
private

◆ m_slicenumber

Long org.lightjason.agentspeak.agent.TestCHanoiTowers.m_slicenumber
private

◆ m_tower

◆ m_towernumber

Long org.lightjason.agentspeak.agent.TestCHanoiTowers.m_towernumber
private