Psyclone AIR Plug for Windows

What is the Psyclone AIR Plug?

The Psyclone AIR Plug is the Software Development Kit for creating external Psyclone modules.

External modules are usually specified in the psySpec with an executable specification which tells Psyclone the command line with which to start the executable containing the external module. Normally one would fully specify subscription information here too, although mechanisms exists to manually register from within the external module when it is running.

The Psyclone AIR Plug will enable you to create executables which contain external modules by providing a basic AIRPlug object which your object can either inherit from or use as an internal variable. The AIRPlug object will facilitate all communication with the Psyclone Server, including overwriting existing subscriptions if needed, receiving wakeup messages from Whiteboards and posting output messages back. The AIRPlug object is also used for information about the module's parameters and even binary streams - more information about this can be found in the Psyclone Manual (psycloneManual.html).

 

How do I unpack Psyclone AIR Plug?

The Psyclone AIR Plug is downloaded inside a zip archive. Before you can use it you need to unpack it and the supporting files. To do so you need to get a zip unpacker such as WinZIP to help you unpack the archive. This will create a directory with the name

      cppair[version]ncl.win32

where version is the Psyclone AIR Plug version, such as 0.5.0.0.

Inside this you will find the Psyclone AIR Plug filesalong with the license file and the quickstart readme file as well as three example external modules, the Reader, Poster and Tester.

 

How do I run Psyclone AIR Plug?

If you want to try the compiled examples first, you can give the following command (for cpptester):

      cpptester.exe psyclone=localhost

Make sure Psyclone is running first.

To compile the examples you will need Microsoft Visual Studio .NET 2003 (versions for Visual Studio 6 and 2005 .NET can be made available).

To start up the project in Visual Studio, double-click on the Examples.sln file. Then build the solution.

This will compile and build the three examples, which you can run manually by first starting up the Psyclone Server without a psySpec in one command window

      psyclone[version]ncl.exe

and in another command windows run the Tester module

      cpptester.exe

If Psyclone is running on a port other than 10000 you will have to specify this by

      cpptester.exe psyclone=localhost:12000

or if Psyclone is running on another computer on the network

      cpptester.exe psyclone=mikescomputer:12000

To include an external module when running Psyclone and have Psyclone help you by starting the module for you automatically you will need to create a psySpec and define a module which provides the full command line with which to start up the external module. For example, to define a module which uses an external module in the executable file mymodule.exe, you would specify the module like this

    <module name="MyModule">
        <description>This module is my first external module</description>
        <executable name="MyModuleName" consoleoutput="yes">
            ./mymodule.exe psyclone=%host%:%port% name=%name%
        
</executable>
        
<trigger after="100" type="Psyclone.System.Ready"/>
        <post to="WB1" type="Other.Message.Type" />
    </module>

You can even specify multiple command lines if the same psySpec is used on different computers and even different operating systems

        <executable name="MyModuleName" consoleoutput="yes">
          
<sys hostname="mikescomputer">
                ./mymodule.exe psyclone=%host%:%port% name=%name%
          
</sys>
          
<sys hostname="brianscomputer">
                ./mymodule.exe psyclone=%host%:%port% name=%name%
          
</sys>
          
<sys ostype="Linux">
                ./mymodule.exe psyclone=%host%:%port% name=%name%
          
</sys>
          
<sys ostype="OSX" hostname="johnscomputer">
                ./mymodule.exe psyclone=%host%:%port% name=%name%
          
</sys>
        
</executable>