Public Types | |
| enum | MC_AgentType_e |
| Enum for describing the type of an agent. More... | |
| enum | MC_AgentStatus_e |
| Enum for describing the status of an agent. More... | |
Public Member Functions | |
| MCAgent () | |
| Default constructor. | |
| override string | ToString () |
| Display the agent's fields. | |
| int | DeleteAgent () |
| Deletes an agent. | |
| String | GetAgentXMLString () |
| Gets the agent's XML string. | |
| int | PrintAgentCode () |
| Gets the agent's C code string. | |
| String | RetrieveAgentCode () |
| Gets the agent's C code string. | |
| int | TerminateAgent () |
| Terminates an agent. | |
| int | AclPost (MCAclMessage message) |
| Posts an ACL message to the agent. | |
| MCAclMessage | AclRetrieve () |
| Retrieve an ACL message from the agent. | |
| MCAclMessage | AclWaitRetrieve () |
| Wait for and retrieve an ACL message from the agent. | |
| int | CallAgentFunc (String funcName, IntPtr retval, IntPtr varg) |
| Calls a function in an agent script. | |
| int | CallAgentFunc (String funcName, ref object retval, ref object varg) |
| Calls a function in an agent script. | |
| IntPtr | GetAgentExecEngine () |
| Gets an agent's Ch interpreter. | |
| int | GetAgentReturnData (int task_num, IntPtr data, IntPtr dim, IntPtr extent) |
| Calls a function in an agent script. | |
Properties | |
| int | AgentID [get] |
| Gets the agent's ID number. | |
| String | AgentName [get] |
| Gets the agent's name. | |
| int | AgentNumTasks [get] |
| Gets the agent's number of tasks. | |
| MC_AgentStatus_e | AgentStatus [get, set] |
| Gets or sets the agent's status. | |
| MC_AgentType_e | AgentType [get] |
| Gets the agent's type. | |
| bool | Valid [get] |
| Checks whether the agent is valid. | |
This class provides an interface to the Mobile-C agent structure. Member functions for the class are generally overloaded versions of the respective functions in the Mobile-C library. The class maintains a pointer to a Mobile-C agent in unmanaged memory. The pointer is not accessible by the user.
Definition at line 61 of file MCAgent.cs.
Enum for describing the type of an agent.
| MC_NONE | Default value to describe unininitialized agent. |
| MC_REMOTE_AGENT | A remote agent. |
| MC_LOCAL_AGENT | A local agent. |
| MC_RETURN_AGENT | A returning agent. |
Definition at line 75 of file MCAgent.cs.
Enum for describing the status of an agent.
Definition at line 88 of file MCAgent.cs.
| LibMC.MCAgent.MCAgent | ( | ) |
| override string LibMC.MCAgent.ToString | ( | ) |
Display the agent's fields.
Formats an returns a string with all of the agents properties.
Definition at line 126 of file MCAgent.cs.
References LibMC.MCAgent.AgentID, LibMC.MCAgent.AgentName, LibMC.MCAgent.AgentNumTasks, LibMC.MCAgent.AgentStatus, and LibMC.MCAgent.AgentType.
| int LibMC.MCAgent.DeleteAgent | ( | ) |
Deletes an agent.
Deletes an agent from the agency.
Definition at line 322 of file MCAgent.cs.
| String LibMC.MCAgent.GetAgentXMLString | ( | ) |
Gets the agent's XML string.
Returns the full XML string associated with the agent.
Definition at line 335 of file MCAgent.cs.
| int LibMC.MCAgent.PrintAgentCode | ( | ) |
Gets the agent's C code string.
Prints the C code associated with the agent to stdout.
Definition at line 348 of file MCAgent.cs.
| String LibMC.MCAgent.RetrieveAgentCode | ( | ) |
Gets the agent's C code string.
Returns the C code associated with the agent.
Definition at line 360 of file MCAgent.cs.
| int LibMC.MCAgent.TerminateAgent | ( | ) |
Terminates an agent.
Terminates an agent regardless of the agent's state.
Definition at line 373 of file MCAgent.cs.
| int LibMC.MCAgent.AclPost | ( | MCAclMessage | message | ) |
Posts an ACL message to the agent.
Delivers an ACL message to the agent.
| message | The ACL message object to deliver. |
Definition at line 398 of file MCAgent.cs.
References LibMC.MCAclMessage.AclMsg.
| MCAclMessage LibMC.MCAgent.AclRetrieve | ( | ) |
Retrieve an ACL message from the agent.
Retrieves an ACL message from the agent if one is available.
Definition at line 414 of file MCAgent.cs.
| MCAclMessage LibMC.MCAgent.AclWaitRetrieve | ( | ) |
Wait for and retrieve an ACL message from the agent.
Retrieves an ACL message from the agent when one becomes available.
Definition at line 433 of file MCAgent.cs.
| int LibMC.MCAgent.CallAgentFunc | ( | String | funcName, | |
| IntPtr | retval, | |||
| IntPtr | varg | |||
| ) |
Calls a function in an agent script.
Calls a function in an agent's script file. This function requires manual marshaling by the user.
| funcName | The name of the function to call | |
| retval | A pointer to memory for the return value | |
| varg | A pointer to the argument for the function |
Definition at line 459 of file MCAgent.cs.
Referenced by LibMC.MCAgent.CallAgentFunc().
| int LibMC.MCAgent.CallAgentFunc | ( | String | funcName, | |
| ref object | retval, | |||
| ref object | varg | |||
| ) |
Calls a function in an agent script.
Calls a function in an agent's script file. This function requires boxing of parameters, but no marshaling.
| funcName | The name of the function to call | |
| retval | A boxed object to hold the return value | |
| varg | The boxed argument to the agent function |
Definition at line 489 of file MCAgent.cs.
References LibMC.MCAgent.CallAgentFunc().
| IntPtr LibMC.MCAgent.GetAgentExecEngine | ( | ) |
Gets an agent's Ch interpreter.
Gets a pointer to the agent's Ch interpreter. Will be improved shortly.
Definition at line 534 of file MCAgent.cs.
| int LibMC.MCAgent.GetAgentReturnData | ( | int | task_num, | |
| IntPtr | data, | |||
| IntPtr | dim, | |||
| IntPtr | extent | |||
| ) |
Calls a function in an agent script.
Calls a function in an agent's script file. This function requires manual marshaling by the user.
| task_num | Task number to get data from | |
| data | A pointer to memory for the data | |
| dim | A pointer to hold the dimensions of the data | |
| extent | A pointer to hold the dimensions of the data |
Definition at line 555 of file MCAgent.cs.
int LibMC.MCAgent.AgentID [get] |
Gets the agent's ID number.
Gets the agent's ID number as assigned by Mobile-C if the agent is a valid agent.
Definition at line 181 of file MCAgent.cs.
Referenced by LibMC.MCAgent.ToString().
String LibMC.MCAgent.AgentName [get] |
Gets the agent's name.
Gets the agent's name as assigned by Mobile-C or the agent script if the agent is a valid agent.
Definition at line 201 of file MCAgent.cs.
Referenced by LibMC.MCAgent.ToString().
int LibMC.MCAgent.AgentNumTasks [get] |
Gets the agent's number of tasks.
Gets the agent's ID number of tasks if the agent is a valid agent.
Definition at line 220 of file MCAgent.cs.
Referenced by LibMC.MCAgent.ToString().
MC_AgentStatus_e LibMC.MCAgent.AgentStatus [get, set] |
Gets or sets the agent's status.
Gets or sets the agent's status. When setting the status, the status is double-checked after setting it and may not be set depending on the state of the agent and the agency.
Definition at line 242 of file MCAgent.cs.
Referenced by LibMC.MCAgent.ToString().
MC_AgentType_e LibMC.MCAgent.AgentType [get] |
Gets the agent's type.
Gets the agent's type.
Definition at line 264 of file MCAgent.cs.
Referenced by LibMC.MCAgent.ToString().
bool LibMC.MCAgent.Valid [get] |
Checks whether the agent is valid.
Checks the internal agent pointer to see if it is non-zero.
Definition at line 286 of file MCAgent.cs.
1.5.4