|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmadkit.strobekit.CognitiveEnv
This class define the cognitive environment structure of the STROBEKIT API. A CognitiveEnv
belongs to a Strobe agent and is dedicated to another one. It has two input and output stream of messages.
A CognitiveEnv
is associated to a Scheme environment (provided by Kawa). This Scheme environment contains a Scheme interpreter used by the CognitiveEnv to evaluate messages.
This class contains methods for:
Constructor Summary | |
CognitiveEnv(StrobeAbstractAgent owner,
madkit.kernel.AgentAddress dedicated)
Create a new cognitive environment dedicated to dedicated which belongs to owner . |
Method Summary | |
void |
evaluateStrobeMsg(StrobeMsg msg)
Evaluate a Strobe message in the cognitive environment (with the local interpreter); if the result is a message then it is push in the cognitive environment output stream else, the method analyzeAnswer of the owner Strobe agent is called. |
gnu.mapping.SimpleEnvironment |
getBind()
Return the cognitive environment Scheme environment. |
java.util.Vector |
getInputStream()
Return the cognitive environment input stream of messages. |
java.util.Vector |
getOutputStream()
Return the cognitive environment output stream of messages. |
void |
initializeWithSchemeFile(java.lang.String scmfilename)
Allow to load a Scheme file in the cognitive environment. |
boolean |
isStreamEmpty(java.util.Vector msgStream)
Return true if msgStream is empty |
StrobeMsg |
popStream(java.util.Vector msgStream)
Remove a message to a cognitive environment stream (input or output). |
void |
pushStream(java.util.Vector msgStream,
StrobeMsg msg)
Add a message to a cognitive environment stream (input or output). |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CognitiveEnv(StrobeAbstractAgent owner, madkit.kernel.AgentAddress dedicated)
dedicated
which belongs to owner
.
Method Detail |
public void initializeWithSchemeFile(java.lang.String scmfilename)
public gnu.mapping.SimpleEnvironment getBind()
public java.util.Vector getInputStream()
public java.util.Vector getOutputStream()
public void pushStream(java.util.Vector msgStream, StrobeMsg msg)
public StrobeMsg popStream(java.util.Vector msgStream)
public boolean isStreamEmpty(java.util.Vector msgStream)
true
if msgStream
is empty
public void evaluateStrobeMsg(StrobeMsg msg)
analyzeAnswer
of the owner Strobe agent is called.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |