Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes

VIAgents.InstitutionalAgent Class Reference

A basic class to be a parent for every agent participating in the institution. It uses the functionality of libsecondlife to visualize the bots and also connects to the institutional infrastructure (AMELI) to ensure correct agent behavior. More...

Inheritance diagram for VIAgents.InstitutionalAgent:
VIAgents.ControlledChatterBot VIAgents.ControlledSLBot VIAgents.SLBot VIAgents.Agent

List of all members.

Public Member Functions

 InstitutionalAgent (string inFirstName, string inLastName, string inPassword, string inRegion, bool inTeleport)
 InstitutionalAgent (string inFirstName, string inLastName, string inPassword)
void UpdateStateBelief (string inNewState)
void SendMessage (string inMessage, string inRecepientFullName)
 Send a message to another agent.
bool WaitForMessage (int inMaxWaitTimeMsec)
bool WaitForMessage ()
bool WaitForMessage (String inMessage, int inMaxWaitTimeMsec)
 Make the agent wait for a specific message.
bool WaitForMessage (String inMessage)
 Make the agent wait for a specific message.

Static Public Member Functions

static Avatar GetAvatar (string inAgentName)
static Vector3 GetAvatarPosition (string inAgentName)
static InstitutionalAgent InstitutionalAgentByName (string inAgentName)
 Get the reference to the institutional agent with the given name.

Public Attributes

AgentStatus agentStatus = null

Protected Member Functions

override void AvatarLoadingFinished ()
virtual void AvatarInfiniteRoutine ()
virtual void FindAllObjects ()
override void Self_IM (object sender, InstantMessageEventArgs ev)
 Inter-agent Communication.
void ReceivedInstantMessage (InstantMessage im)
virtual void OnReceiveAgentMessage (string inMessage, InstitutionalAgent inSender)

Protected Attributes

AutoResetEvent mWaitForMessage = new AutoResetEvent(false)
string mAgentStateBelief = ""

Static Protected Attributes

static Hashtable mAgents = new Hashtable()

Detailed Description

A basic class to be a parent for every agent participating in the institution. It uses the functionality of libsecondlife to visualize the bots and also connects to the institutional infrastructure (AMELI) to ensure correct agent behavior.


Constructor & Destructor Documentation

VIAgents.InstitutionalAgent.InstitutionalAgent ( string  inFirstName,
string  inLastName,
string  inPassword,
string  inRegion,
bool  inTeleport 
)
VIAgents.InstitutionalAgent.InstitutionalAgent ( string  inFirstName,
string  inLastName,
string  inPassword 
)

Member Function Documentation

virtual void VIAgents.InstitutionalAgent.AvatarInfiniteRoutine (  )  [protected, virtual]

If the agent has to continiously perform some actions this function should be overridden

override void VIAgents.InstitutionalAgent.AvatarLoadingFinished (  )  [protected, virtual]

Instructs the agent what to do when it has successfully logged into Second Life and its appearance is fully loaded.

Reimplemented from VIAgents.ControlledSLBot.

virtual void VIAgents.InstitutionalAgent.FindAllObjects (  )  [protected, virtual]

This function should be used to preload the objects that are frequently used

static Avatar VIAgents.InstitutionalAgent.GetAvatar ( string  inAgentName  )  [static]

Get the reference to the avatar associated with the institutional agent named inAgentName

static Vector3 VIAgents.InstitutionalAgent.GetAvatarPosition ( string  inAgentName  )  [static]

Get the current position of the associated avatar in the local coordinates of the current simulator

static InstitutionalAgent VIAgents.InstitutionalAgent.InstitutionalAgentByName ( string  inAgentName  )  [static]

Get the reference to the institutional agent with the given name.

virtual void VIAgents.InstitutionalAgent.OnReceiveAgentMessage ( string  inMessage,
InstitutionalAgent  inSender 
) [protected, virtual]

Allows sending direct messages between agents without using the IM facility

Reimplemented in VIAgents.Agent.

void VIAgents.InstitutionalAgent.ReceivedInstantMessage ( InstantMessage  im  )  [protected]

Will be called every time another agent sends us a message Only for the messages sent via IM

override void VIAgents.InstitutionalAgent.Self_IM ( object  sender,
InstantMessageEventArgs  ev 
) [protected, virtual]

Inter-agent Communication.

Reimplemented from VIAgents.ControlledSLBot.

void VIAgents.InstitutionalAgent.SendMessage ( string  inMessage,
string  inRecepientFullName 
)

Send a message to another agent.

void VIAgents.InstitutionalAgent.UpdateStateBelief ( string  inNewState  ) 
bool VIAgents.InstitutionalAgent.WaitForMessage ( String  inMessage,
int  inMaxWaitTimeMsec 
)

Make the agent wait for a specific message.

bool VIAgents.InstitutionalAgent.WaitForMessage ( int  inMaxWaitTimeMsec  ) 

Wait for a message received from another agent returns true if the message is received and false if timeout has expired with no message received

bool VIAgents.InstitutionalAgent.WaitForMessage ( String  inMessage  ) 

Make the agent wait for a specific message.

bool VIAgents.InstitutionalAgent.WaitForMessage (  ) 

Wait for a message received from another agent returns true if the message is received and false if timeout has expired with no message received


Member Data Documentation

Hashtable VIAgents.InstitutionalAgent.mAgents = new Hashtable() [static, protected]
AutoResetEvent VIAgents.InstitutionalAgent.mWaitForMessage = new AutoResetEvent(false) [protected]

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