Changes between Version 30 and Version 31 of ProtocolOne


Ignore:
Timestamp:
Jun 28, 2011 8:18:31 PM (13 years ago)
Author:
jherwitz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ProtocolOne

    v30 v31  
    4242
    4343== Command Structure ==
    44 [ProtocolOne] provides the user two ways of executing Quagent commands. All commands are represented as objects. These objects handle writing the specified command to the server, automatically update data fields with any relevant server data response, and maintain auxiliary data related to the command, such as command [[exitcode]] and runtime.
    45 The user may choose to execute commands by either explicitly instantiating these objects or calling the relevant function. Each command has an object which is specific to its individual properties, such as data response, parameter access, and socket server protocol. To execute a command explicitly using the object, simply call.
     44[[ProtocolOne]] provides the user two ways of executing Quagent commands. Both of these adhere to a unique programming paradigm - one method is [http://en.wikipedia.org/wiki/Object-oriented_programming Object-Oriented] while the other is [http://en.wikipedia.org/wiki/Functional_programming Functional]. These methods are (approximately) equivalent in usability and accessibility, so the user may choose to use whichever paradigm is preferred.
     45The user may choose to execute commands by either explicitly instantiating the command objects or calling a relevant function. Internally, all commands are represented as command-specific objects. These objects handle writing the specified command to the server, automatically update data fields with any relevant server data response, and maintain auxiliary data related to the command, such as command [[exitcode]] and runtime. To execute a command explicitly using the object, simply call the member function {{{run()}}}. Function calls automatically instantiate, run, and return the relevant object.
    4646It is important to note that all Commands are implemented as [http://download.oracle.com/javase/1.4.2/docs/api/java/util/TimerTask.html TimerTasks], so a user may easily implement an application involving high-level scheduling or planning using [http://download.oracle.com/javase/1.4.2/docs/api/java/util/Timer.html Timers] (this is actually how the periodic execution is implemented).
    4747It is recommended that users new to Quagents use the command functions, as these provide a more intuitive command interface and also allow the client to record any results in its command history (although this may be moved into the Command class to ensure identical functionality between both methods of execution).
     
    5454{{{
    5555FireWeapon fw = new FireWeapon();
     56fw.run();
    5657}}}
    5758