/home/dko/projects/mobilec/trunk/src/include/agent.h File Reference

#include "agent_datastate.h"
#include "agent_task.h"
#include "libmc.h"
#include "message.h"
#include "macros.h"
#include "data_structures.h"
#include "agent_mailbox.h"

Go to the source code of this file.

Data Structures

struct  agent_s

Functions

agent_p agent_New (void)
agent_p agent_Copy (const agent_p agent)
agent_p agent_Initialize (struct mc_platform_s *mc_platform, message_p message, int id)
int agent_Destroy (agent_p agent)
void agent_RunChScript (MCAgent_t agent, struct mc_platform_s *global)
void * agent_RunChScriptThread (void *agent)


Function Documentation

agent_p agent_Copy ( const agent_p  agent  ) 

Definition at line 46 of file agent.c.

References agent_datastate_Copy(), agent_s::agent_interp, agent_s::agent_persistent, agent_s::agent_status, agent_s::agent_thread, agent_s::agent_type, agent_s::arrival_time, agent_s::datastate, agent_s::home, agent_s::home_port, agent_s::id, agent_s::lock, MUTEX_INIT, MUTEX_LOCK, MUTEX_T, agent_s::name, agent_s::orphan, agent_s::owner, agent_s::return_data, and agent_s::run_lock.

Referenced by MC_CopyAgent().

int agent_Destroy ( agent_p  agent  ) 

Definition at line 237 of file agent.c.

References agent_datastate_Destroy(), agent_s::agent_interp, agent_mailbox_Destroy(), agent_s::agent_status, agent_s::agent_thread, agent_s::datastate, agent_s::home, agent_s::lock, agent_s::mailbox, MC_AGENT_NEUTRAL, MC_SUCCESS, MUTEX_DESTROY, MUTEX_LOCK, agent_s::name, agent_s::owner, and agent_s::run_lock.

Referenced by agent_Initialize().

agent_p agent_Initialize ( struct mc_platform_s mc_platform,
message_p  message,
int  id 
)

Definition at line 131 of file agent.c.

References agent_datastate_New(), agent_Destroy(), agent_mailbox_New(), agent_s::agent_pipe_active, agent_s::agent_pipe_ready_to_read, agent_s::agent_ready_to_send, agent_s::agent_script_ready, agent_s::agent_status, agent_s::agent_thread, agent_s::agent_thread_id, agent_s::agent_type, message_s::agent_xml_flag, agent_xml_parse(), agent_s::arrival_time, agent_s::datastate, mc_platform_s::default_agentstatus, mc_platform_s::err, agent_s::id, agent_s::lock, agent_s::mailbox, MC_ERR_PARSE, agent_s::mc_platform, MC_REMOTE_AGENT, MC_RETURN_AGENT, MC_WAIT_CH, message_s::message_type, MOBILE_AGENT, MUTEX_DESTROY, MUTEX_INIT, MUTEX_T, agent_s::orphan, RETURN_MSG, agent_s::run_lock, agent_datastate_s::xml_agent_root, message_s::xml_payload, message_s::xml_root, and agent_datastate_s::xml_root.

Referenced by acc_MessageHandlerThread().

agent_p agent_New ( void   ) 

Definition at line 108 of file agent.c.

References agent_s::lock, MUTEX_INIT, MUTEX_NEW, and agent_s::run_lock.

Referenced by MC_ComposeAgent().

void agent_RunChScript ( MCAgent_t  agent,
struct mc_platform_s global 
)

void* agent_RunChScriptThread ( void *  agent  ) 

Definition at line 312 of file agent.c.

References agent_s::agent_interp, agent_return_data_Destroy(), agent_return_data_InitializeFromAgent(), mc_platform_s::ams, COND_SIGNAL, agent_s::datastate, agent_s::id, mc_platform_s::interp_options, MC_Acl_AddReceiver_chdl(), MC_Acl_AddReplyTo_chdl(), MC_Acl_SetContent_chdl(), MC_Acl_SetPerformative_chdl(), MC_Acl_SetSender_chdl(), MC_AclDestroy_chdl(), MC_AclNew_chdl(), MC_AclPost_chdl(), MC_AclReply_chdl(), MC_AclRetrieve_chdl(), MC_AclSend_chdl(), MC_AclWaitRetrieve_chdl(), MC_AddAgent_chdl(), MC_AGENT_NEUTRAL, MC_Barrier_chdl(), MC_BarrierDelete_chdl(), MC_BarrierInit_chdl(), MC_CallAgentFunc_chdl(), MC_ComposeAgent_chdl(), MC_CondBroadcast_chdl(), MC_CondReset_chdl(), MC_CondSignal_chdl(), MC_CondWait_chdl(), MC_DeleteAgent_chdl(), MC_DeregisterService_chdl(), MC_DestroyServiceSearchResult_chdl(), MC_End_chdl(), MC_EXEC_AGENT, MC_FindAgentByID_chdl(), MC_FindAgentByName_chdl(), MC_GetAgentID_chdl(), MC_GetAgentName_chdl(), MC_GetAgentStatus_chdl(), MC_GetAgentXMLString_chdl(), MC_GetTimeOfDay_chdl(), MC_HaltAgency_chdl(), MC_MutexLock_chdl(), MC_MutexUnlock_chdl(), agent_s::mc_platform, mc_platform, MC_PrintAgentCode_chdl(), MC_RegisterService_chdl(), MC_ResumeAgency_chdl(), MC_RetrieveAgent_chdl(), MC_RetrieveAgentCode_chdl(), MC_RETURN_AGENT, MC_SearchForService_chdl(), MC_SemaphorePost_chdl(), MC_SemaphoreWait_chdl(), MC_SendAgentMigrationMessage_chdl(), MC_SendAgentMigrationMessageFile_chdl(), MC_SendSteerCommand_chdl(), MC_SetAgentStatus_chdl(), MC_SetDefaultAgentStatus_chdl(), mc_platform_s::MC_signal, mc_platform_s::MC_signal_cond, mc_platform_s::MC_signal_lock, MC_SyncDelete_chdl(), MC_SyncInit_chdl(), MC_TerminateAgent_chdl(), MC_WAIT_FINISHED, MC_WAIT_MESSGSEND, MUTEX_LOCK, MUTEX_UNLOCK, agent_s::name, SIGNAL, and agent_datastate_s::task_progress.

Referenced by agent_RunChScript().


Generated on Fri May 16 14:49:55 2008 for Mobile-C by  doxygen 1.5.4