The Kapow Katalyst installation contains six additional API code examples, these examples are found in API\robosuite-dotnet-api\example

Compiling & Running the Examples

To compile the examples run the build.bat from a command prompt. This will cause six .exe files to be produced, which can be run directly.

The .exe files are relying on the robosuite-dotnet-api.dll and the log4net.dll both of which are located in the examples directory. Both files are identical copies of the ones located in the bin folder and are copied in here to make it easier to run the examples.

Each example program will print a small usage text when run without any arguments.

C# Compiler Issues

The build.bat file assumes that the C# compiler is available in the path.

.NET Framework 4.0

The API and accompanying log4net is build targeting the .net framework 4.0 client profile. For details on the .net framework 4.0 client profile see http://msdn.microsoft.com/en-us/library/cc656912.aspx

Ssl example

To run the ssl example RunSslRobot.exe the RoboServer has to be configured to use ssl and the certificate has to be imported on the client machine. This guide will show you how to configure ssl using a self-signed certificate on a windows PC running a local RoboServer.

Creating the self-signed certificate

The bat file MakeCertificates.bat included in the examples directory will create a self-signed certificate for your .net API client. You can use MakeCertificates.bat as follows

  1. Start a Visual Studio Command Prompt and go do the examples directory

  2. Type MakeCertificates.bat

  3. You will now be prompted to type the password for the certificate in this case we simply type "123"

  4. You will now be prompted to type a hostname that the certificate. For a local RoboServer we type "localhost" It is important that this is the same hostname that you use in your client code when creating the protocol.

  5. Now you will be prompted 3 times for the password again - type "123" in each dialog

Certificates can also be created with Keytool as described in API Client Certificates

Configure the RoboServer

  1. On the RoboServer start the Settings application located in Start -> All Programs -> Kapow Katalyst

  2. In the Settings application goto the certificates tab

  3. Click change and select the file API\robosuite-dotnet-api\example\server.pfx

  4. When prompted for a password type "123".

  5. the RoboServer is now fully configured and can be started using the switch -service ssl:50443 to use the ssl configuration on port 50443

Configure the API client

  1. Run the command mmc.exe

  2. On the Console menu, click Add/Remove Snap-in

  3. Under Snap-in, double-click Certificates, and select to manage certificates for the Local computer and click Finish

  4. With the certificates snap-in loaded expand the node Certificates -> Trusted root Certification Authorities and right click the Certificates node and click the menu item All tasks -> Import

  5. This will start the Certificate Import Wizard. When prompted to pick the certificate file browse to API\robosuite-dotnet-api\example\server.pub.cer and complete the import

After completing these steps, both the server and client are configured to use ssl and running the example RunSslRobot.exe can be used to verify the configuration.