search
Start typing to search...

Network Setup And Sending Actions

Author: Aximmetry

Network setup

You can control Aximmetry via HTTP actions sent with the POST method.

In order to turn on this function, go to Edit / Preferences and check Enable HTTP Control.

You can also specify which Port Aximmetry listens for HTTP messages. In most cases, you can leave it as is by default.

The actions must be sent to the URL: http://ip_of_the_Aximmetry_machine:Port
Example: http://127.0.0.1:21463

The actual action must be placed in the content section of the HTTP message.

Sending Actions

There are multiple ways to send HTTP POST actions to Aximmetry, giving you almost unlimited options for interaction and control.

For this guide, we will use ReqBin to send actions. (Please note that ReqBin requires both Google Chrome and the ReqBin Chrome extension.)

To send a action using ReqBin’s online HTTP tool:

  1. Set the address in the page to http://127.0.0.1:21463 and to POST.
  2. Select Body, then choose XML.
  3. Enter one of the actions discussed above. For example:
    <action type="ComposerCtrBoardPressButtonAction" Module="Root\VirtualCam_3-Cam\CAMERAS\SELECT CAMERA" Button="CAM 2" />

Your setup in ReqBin should look similar to this:

Press Send, and the actions will be applied to Aximmetry:

You can also use the Generate drop-down option in ReqBin to automatically translate the action into code snippets in various programming languages. This is useful if you want to integrate the same action into your own applications or scripts.

Notes for Using JavaScript

A typical scenario is calling the HTTP interface from JavaScript within a website that implements a custom interface for Aximmetry.

NOTE 1: Some sending APIs, including JavaScript XMLHttpRequest, send an OPTIONS request prior to sending the actual POST message if "Content-Type" is not "text/plain". Aximmetry does not handle the OPTIONS request. In this case, either do not set the "Content-Type" or set it to "text/plain".

NOTE 2: When you are specifying a file or module path as a string in JavaScript, remember that the backslash (\) character denotes an escape sequence. Therefore, to add an actual backlash, you have to write a double backlash, e.g.

"Root\\VirtualCam_3-Cam\\CAMERAS\\SELECT CAMERA"

NOTE 3: When building the XML action as a string in JavaScript, you can use single quotation marks either for the string itself or for the attributes within the XML, e.g.

cmd = '<action type="ComposerCtrBoardSetButtonAction" Module="Root\\VirtualCam_3-Cam\\CAMERAS\\STREAMING" Button="On" State="' + state + '" />';

or

cmd = "<action type='ComposerCtrBoardSetButtonAction' Module='Root\\VirtualCam_3-Cam\\CAMERAS\\STREAMING' Button='On' State='" + state + "' />";

Of course, you can use a template literal as well:

cmd = `<action type="ComposerCtrBoardSetButtonAction" Module="Root\\VirtualCam_3-Cam\\CAMERAS\\STREAMING" Button="On" State="${state}" />`;

Article Content

Loading
Close
Loading spinner icon
1/10