OptaSense Third Party Interface Specification
OptaSense Third Party Interface Specification
Issue: Issue 9
Contact :
G Ciorra
Software Manager
OptaSense Ltd
Phone: 01305 367106
Email: [email protected]
®
The document contains information proprietary to OptaSense and whose unauthorised disclosure
®
would cause damage to the interests of OptaSense . Requests for permission for wider use or dissemination
should be made to G Ciorra
®
Specification is liable to change without warning – please contact OptaSense for latest version.
Reference: OptaSense/OLA/033
®
Copyright © OptaSense Ltd 2017, Cody Technology Park, Ively Road, Farnborough GU14 0LX
Confidential
®
© OptaSense Ltd 2017 1 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
Amendment Record
Confidential
®
© OptaSense Ltd 2017 2 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
Contents
1 Introduction.................................................................................................................................... 5
1.1 Document Purpose and Scope ................................................................................................ 5
1.2 Overview .................................................................................................................................. 5
1.2.1 OptaSense Server .............................................................................................................. 5
1.2.2 Outgoing Messages ............................................................................................................ 5
1.2.3 Use of XML Schema ........................................................................................................... 5
2 Basic Usage ................................................................................................................................... 6
2.1 Post Parameters ...................................................................................................................... 7
2.2 XML Return Data ..................................................................................................................... 7
3 Alert Commands ............................................................................................................................ 8
3.1 Set Alerts (ADD & UPDATE) ................................................................................................... 8
3.1.1 Post Parameters ................................................................................................................. 8
3.1.2 Return XML Data ................................................................................................................ 8
3.2 Get Alerts ................................................................................................................................. 9
3.2.1 Post Parameters ................................................................................................................. 9
3.2.2 Return XML Data ................................................................................................................ 9
3.3 Acknowledge Alerts ............................................................................................................... 10
3.3.1 Post Parameters ............................................................................................................... 10
3.3.2 Return XML Data .............................................................................................................. 10
3.4 Dismiss Alerts ........................................................................................................................ 11
3.4.1 Post Parameters ............................................................................................................... 11
3.4.2 Return XML Data .............................................................................................................. 11
3.5 Acknowledge and Dismiss All Alerts ..................................................................................... 12
3.5.1 Post Parameters ............................................................................................................... 12
3.5.2 Returned XML Data .......................................................................................................... 12
3.6 List ......................................................................................................................................... 12
3.6.1 Post Parameters ............................................................................................................... 12
3.6.2 Return XML Data .............................................................................................................. 12
3.7 Request Data Refresh ........................................................................................................... 13
Confidential
®
© OptaSense Ltd 2017 3 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
Confidential
®
© OptaSense Ltd 2017 4 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
1 Introduction
1.2 Overview
1.2.1 OptaSense Server
OptaSense provides an HTTP Server that accepts HTTP POST key/value pairs to allow third party
software to manage threat alerts and control aspects of the GUI. Data returned from OptaSense is
formatted as XML.
Client software can be written in any language that supports URL encoding, including Java, Python
and AJAX. A Java client example program can be supplied with the HTTP interface, and this includes
a simple Java file that encapsulates the entire interface.
Returned XML can be parsed with any common parser; the example client program uses a simple
SAX parser.
Confidential
®
© OptaSense Ltd 2017 5 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
2 Basic Usage
It is possible to have one instance of the OptaSense HTTP server and client running on each
OptaSense node. The HTTP interface instance number is passed to the HTTP process via the
command line in the OptaSense system schema when the process is started. The instance number is
used to uniquely identify settings for each HTTP interface. If no instance number is provided the
HTTP interface will be backwards compatible with older versions of the OptaSense software which
support a single HTTP interface only.
To connect to the OptaSense system via the HTTP Server, you must format URLs based on the
following rules;
http://192.168.0.1:8008
For backwards compatibility settings relating to older releases of the OptaSense software which
allowed only a single instance of the HTTP server and client are supported. These settings are
prefixed with ‘httpInterface.’.
The latest version of the software uses settings with the prefix ‘httpInterface.X.’ where X is the
integer instance number.
To enable the OptaSense HTTP Server, the following setting must be created and set as follows:
To enable the use of the XSD to generate all outgoing XML message content the following setting
must be present:
Confidential
®
© OptaSense Ltd 2017 6 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
All commands are issued via POST parameters (unlike GET parameters, which are embedded within
the URL, POST parameters are written to the HTTP request header).
Parameters are passed as key/value pairs. For example, to set the system highlight cursor (on the
Map Window), the following key/values would be specified;
If the use of the optional XSD is selected this XML data will be generated using the XSD and
can be parsed by a third party client using the same XSD. In this case the XML is guaranteed to
be well formed. A typical XML return message generated with the XSD might look like this:
For backwards compatibility with older OptaSense systems the use of the XSD may be
disabled. In this case the XML message content will require bespoke parsing to be correctly
received.
Data generated this way is contained within an <optasenseMessage> tree and will always
contain a <status> field that contains a number signifying whether the command was
successful or not.
A typical XML return generated without the XSD might look like this:
<optasenseMessage>
<status>1</status>
<alertId>123456</alertId>
<opsNumber>0</opsNumber>
<opticalDistance>2440.5</opticalDistance>
</optasenseMessage>
Confidential
®
© OptaSense Ltd 2017 7 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
3 Alert Commands
Confidential
®
© OptaSense Ltd 2017 8 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
<optasenseMessage>
<status>1</status>
</optasenseMessage>
Fail:
<optasesenseMessage>
<status>-1</status>
<error>string</error>
</optasenseMessage>
Fail:
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><optasenseMessage><statusMessage><status>-1</status><error>Get failed - alert
id XXXX not found</error></statusMessage></optasenseMessage>
Confidential
®
© OptaSense Ltd 2017 9 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
<startTime>long</startTime>
<endTime>long</endTime>
st
where time is represented as milliseconds since 1 Jan 1970 UTC
<cpsNumber>int</cpsNumber>
<startChannel>int</startChannel>
<endChannel>int</endChannel>
<startOpticalDistanceMetres>float</startOpticalDistanceMetres>
<endOpticalDistanceMetres>float</endOpticalDistanceMetres>
<startLatitude>float</startLatitude>
<startLongitude>float</startLongitude>
<endLatitude>float</endLatitude>
<endLongitude>float</endLongitude>
<scalePoint>string</scalePoint>
<zoneName>string</ zoneName >
<alertType>string</alertType>
<alertLevel>string</alertLevel>
where the alert is of external type the following are also retuned
<externalType>string</externalType>
<externalId>string</externalId>
</optasenseMessage>
Fail:
<optasesenseMessage>
<status>-1</status>
<error>string</error>
</optasenseMessage>
instruction ACK String Required; all alert commands require a separate instruction
Confidential
®
© OptaSense Ltd 2017 10 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
Success:
<optasenseMessage>
<status>1</status>
</optasenseMessage>
Fail:
<optasesenseMessage>
<status>-1</status>
<error>string</error>
</optasenseMessage>
Fail:
<optasesenseMessage>
<status>-1</status>
<error>string</error>
</optasenseMessage>
Confidential
®
© OptaSense Ltd 2017 11 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
Fail:
<optasesenseMessage>
<status>-1</status>
<error>string</error>
</optasenseMessage>
3.6 List
3.6.1 Post Parameters
Key Value Type Note
command alert String Required; tells Poster to target alert republisher
Required; all alert commands require a separate
instruction LIST String
instruction
Confidential
®
© OptaSense Ltd 2017 12 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
titude>double</startLatitude><startLongitude>-
double</startLongitude><endLatitude>double</endLatitude><endLongitude>-
double</endLongitude><zoneName>string</zoneName><scalePoint>string</scalePoint><alertType>str
ing</alertType><alertLevel>string</alertLevel><speed>string</speed><externalType>optional
string</externalType><externalId>optional string</externalId></alertDetails><alertDetails>Content
repeated for each additional alert in the
list</alertDetails></alertDetailsMessage></optasenseMessage>
Fail:
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><optasenseMessage><statusMessage><status>-1</status><error>Could not
retrieve list of alerts</error></statusMessage></optasenseMessage>
where the alert is of external type the following are also retuned
<externalType>string</externalType>
<externalId>string</externalId>
if more than one alert is present, then the details would be repeated for the next alert
from this point starting with alertId
</optasenseMessage>
Fail:
<optasesenseMessage>
<status>-1</status>
<error>string</error>
</optasenseMessage>
Confidential
®
© OptaSense Ltd 2017 13 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
Fail:
<optasesenseMessage>
<status>-1</status>
<error>string</error>
</optasenseMessage>
Confidential
®
© OptaSense Ltd 2017 14 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
4.1 Set
4.1.1 Post Parameters
Key Value Type Note
Required; tells Poster to
command highlight String
target system highlight
Specify either geographic coordinates...
Decimal latitude of alert (eg,
decimalDegreesLatitude Latitude Float
43.123)
Decimal longitude of alert (eg,
decimalDegreesLongitude Longitude Float
-21.123)
or OPS and optical distance...
Number (ID) of optical
opsNumber Ops int
processing unit
opticalDistanceMetres opticalDistance Float Distance in metres along fibre
Fail:
<optasesenseMessage>
<status>-1</status>
<error>string</error>
</optasenseMessage>
Confidential
®
© OptaSense Ltd 2017 15 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
5 Audio Position
5.1 Set
5.1.1 POST parameters
Key Value Type Note
Required; tells
command audio String Poster to target
audio subsystem
mono | Required; specifies
audioMode independent | String the audio mode
neighbour required
Specify either geographic coordinates...
Decimal latitude of
decimalDegreesLatitude Latitude Float
alert (eg, 43.123)
Decimal longitude of
decimalDegreesLongitude Longitude Float
alert (eg, -21.123)
or OPS and optical distance...
Number (ID) of
opsNumber Ops int optical processing
unit
Distance in metres
opticalDistanceMetres opticalDistance Float
along fibre
the following apply where audioMode=independent...
Decimal latitude of
decimalDegreesLatitudeLeft Latitude Float
alert (eg, 43.123)
Decimal longitude of
decimalDegreesLongitudeLeft Longitude Float
alert (eg, -21.123)
or OPS and optical distance...
Number (ID) of
opsNumberLeft Ops int optical processing
unit
Distance in metres
opticalDistanceMetresLeft opticalDistance Float
along fibre
Confidential
®
© OptaSense Ltd 2017 16 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
Fail:
<optasesenseMessage>
<status>-1</status>
<error>string</error>
</optasenseMessage>
Confidential
®
© OptaSense Ltd 2017 17 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
6 External Status
Using HTTP, you have the ability to show an External Status on OLA.
<externalStatus>
<name>PP-Status</name> The name
<components>
A sub process with children
<main>
<Active>OK</Active> The status of the process (‘OK’ is working and
<Online>BAD</Online> ‘BAD’ is not working)
<ApplicationStatus>OK</ApplicationStatus>
</main>
<data>BAD</data>
A sub process without children
</components>
</externalStatus>
In order to send multiple external statuses, you need to send each status individually.
Confidential
®
© OptaSense Ltd 2017 18 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
7 Unsolicited Messages
OptaSense software is able to output system status, hardware and software errors, fibre break
messages, alert acknowledge/ dismiss messages and alert updates in the format of XML or POST
parameters.
OptaSense software acts as an HTTP client to an external server, sending HTTP POST requests to the
server.
The user can specify in the OptaSense settings which server to send these messages to and if
OptaSense should output XML messages or POST parameters. If the ‘useXsd’ setting is set to true the
XML message content is generated using the XSD. A different HTTP client instance can be configured
on each OptaSense node.
For backwards compatibility with legacy systems the settings prefix ‘httpInterface.’ is still supported.
For new systems the settings prefix is ‘httpInterface.X.’ where X is the HTTP instance number.
To enable an OptaSense client, the following setting must be created and set as follows:
Key Default Value Type Note
httpInterface.X.outgoing.enabled true boolean
To connect a server to the Optasense software, the user must enter these parameters into the
settings:
Default
Key Type Note
Value
Specifies the server's
httpInterface.X.outgoing.ipAddress 127.0.0.1 String
IP address
Specifies the port to
httpInterface.X.outgoing.port 49000 int
use
Specifies the output
format. If true the
httpInterface.X.outgoing.outputXml true boolean
output will be in XML
format
Confidential
®
© OptaSense Ltd 2017 19 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
Messages are sent from the OptaSense software as key/value pairs. The following key/values would
be sent to the server whenever a highlight position is changed, an alert is updated, a software or
hardware error occurs and the status (heartbeat) of the system would be sent as defined by the
interval setting;
Heartbeat messages...
Specifies the status of the
heartbeat 1 | -1 Int Optasense software (1 =
green, -1 = red)
Confidential
®
© OptaSense Ltd 2017 20 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
Fibrebreak Messages …
A message with details about any
fibreBreakMessage Message String
new or resolved fibrebreak alerts.
Confidential
®
© OptaSense Ltd 2017 21 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
Acknowledged/Dismissed Messages …
The text representation of the alert
statusUpdate Alert State String
state. Acknowledged / Dismissed
String representing type of alert (eg,
alertType Alert Type String
External or Vehicle)
alertId Alert ID String OptaSense internal ID
Confidential
®
© OptaSense Ltd 2017 22 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
Using XSD:
A typical XML return might look like this:
Heartbeat status:
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><optasenseMessage>
<heartbeatMessage>1</heartbeatMessage></optasenseMessage>
Alert updated:
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><optasenseMessage><alertUpdateMessage><alertId>string</alertId><startTime>lo
ng</startTime><endTime>long</endTime><cpsNumber>int</cpsNumber><startChannel>int</startCha
nnel><endChannel>int</endChannel><startOpticalDistanceMetres>float</startOpticalDistanceMetres>
<endOpticalDistanceMetres>float</endOpticalDistanceMetres><startLatitude>double</startLatitude><
startLongitude>-double</startLongitude><endLatitude>double</endLatitude><endLongitude>-
double</endLongitude><zoneName>string</zoneName><scalePoint>string</scalePoint><alertType>str
ing</alertType><alertLevel>string</alertLevel><speed>string</speed><externalType>optional
string</externalType><externalId>optional string</externalId></ alertUpdateMessage
></optasenseMessage>
Software Error:
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><optasenseMessage><softwareErrorMessage>
Software Error on ProcessingNode1 (192.168.0.1)</softwareErrorMessage></optasenseMessage>
Hardware Error:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><optasenseMessage>
<hardwareErrorMessage>Hardware Error on ProcessingNode1
(192.168.0.1)</hardwareErrorMessage>
</optasenseMessage>
IU Error:
Confidential
®
© OptaSense Ltd 2017 23 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
IU Error Cleared:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><optasenseMessage>
<hardwareErrorMessage>IU Error Cleared on OPS 1</hardwareErrorMessage>
</optasenseMessage>
Heartbeat status:
<optasenseMessage>
<heartbeat>1</heartbeat>
</optasenseMessage>
Alert updated:
<optasenseMessage>
<alertId>string</alertId>
Confidential
®
© OptaSense Ltd 2017 24 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
<startTime>long</startTime>
<endTime>long</endTime>
st
where time is represented as milliseconds since 1 Jan 1970 UTC
<cpsNumber>int</cpsNumber>
<startChannel>int</startChannel>
<endChannel>int</endChannel>
<startOpticalDistanceMetres>float</startOpticalDistanceMetres>
<endOpticalDistanceMetres>float</endOpticalDistanceMetres>
<startLatitude>float</startLatitude>
<startLongitude>float</startLongitude>
<endLatitude>float</endLatitude>
<endLongitude>float</endLongitude>
<scalePoint>string</scalePoint>
<zoneName>string</ zoneName >
<alertType>string</alertType>
<alertLevel>string</alertLevel>
<speed>string(m/s)</speed>
where the alert is of external type the following are also retuned
<externalType>string</externalType>
<externalId>string</externalId>
</optasenseMessage>
Software Error:
<optasenseMessage>
<softwareError>Software Error on ProcessingNode1 (192.168.0.1) ProcessName:
LocalServices</softwareError>
</optasenseMessage>
Hardware Error:
<optasenseMessage>
<hardwareError>Hardware Error on ProcessingNode1 (192.168.0.1)</hardwareError>
</optasenseMessage>
IU Error:
<optasenseMessage>
<hardwareError>IU Error on OPS 1</hardwareError>
</optasenseMessage>
IU Error Cleared:
<optasenseMessage>
<hardwareError>IU Error Cleared on OPS 1</hardwareError>
</optasenseMessage>
Confidential
®
© OptaSense Ltd 2017 25 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
<optasenseMessage>
<fibreBreakMessage>Fibre break detected from channel 30</ fibreBreakMessage>
</optasenseMessage>
where the alert is of external type the following are also retuned
<externalType>string</externalType>
<externalId>string</externalId>
</optasenseMessage>
Confidential
®
© OptaSense Ltd 2017 26 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
<!--
============================================================================
Type definitions used to build message types
============================================================================
-->
<xs:simpleType name="StatusType">
<xs:restriction base="xs:int">
<xs:enumeration value="-1"/>
<xs:enumeration value="1"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TimeType">
<xs:restriction base="xs:long">
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="OpsNumberType">
<xs:restriction base="xs:int">
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ChannelType">
<xs:restriction base="xs:int">
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="LatitudeType">
<xs:restriction base="xs:double">
<xs:minInclusive value="-90"/>
<xs:maxInclusive value="90"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="LongitudeType">
<xs:restriction base="xs:double">
<xs:minInclusive value="-180"/>
<xs:maxInclusive value="180"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="OpticalDistanceType">
<xs:restriction base="xs:float">
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="StatusUpdateType">
<xs:restriction base="xs:string">
<xs:enumeration value="Acknowledged"/>
<xs:enumeration value="Dismissed"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AudioModeType">
<xs:restriction base="xs:string">
<xs:enumeration value="Independent"/>
Confidential
®
© OptaSense Ltd 2017 27 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
<xs:enumeration value="Mono"/>
<xs:enumeration value="Neighbour"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AlertLevelType">
<xs:restriction base="xs:string">
<xs:enumeration value="high"/>
<xs:enumeration value="medium"/>
<xs:enumeration value="low"/>
</xs:restriction>
</xs:simpleType>
<!--
Optasense alert details.
Time is represented as milliseconds since 1st Jan 1970 UTC.
-->
<xs:complexType name="AlertDetailsType">
<xs:sequence>
<xs:element name="alertId" type="xs:string"/>
<xs:element name="startTime" type="TimeType"/>
<xs:element name="endTime" type="TimeType"/>
<xs:element name="cpsNumber" type="OpsNumberType"/>
<xs:element name="startChannel" type="ChannelType"/>
<xs:element name="endChannel" type="ChannelType"/>
<xs:element name="startOpticalDistanceMetres" type="OpticalDistanceType"/>
<xs:element name="endOpticalDistanceMetres" type="OpticalDistanceType"/>
<xs:element name="startLatitude" type="LatitudeType"/>
<xs:element name="startLongitude" type="LongitudeType"/>
<xs:element name="endLatitude" type="LatitudeType"/>
<xs:element name="endLongitude" type="LongitudeType"/>
<xs:element name="zoneName" type="xs:string"/>
<xs:element name="scalePoint" type="xs:string"/>
<xs:element name="alertType" type="xs:string"/>
<xs:element name="alertLevel" type="AlertLevelType"/>
<xs:element name="speed" type="xs:string"/>
<xs:element name="externalType" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="externalId" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="AlertRefreshType">
<xs:sequence>
<xs:element name="refresh" type="xs:string"/>
<xs:element name="state" type="xs:string"/>
<xs:element name="alertId" type="xs:string"/>
<xs:element name="startTime" type="TimeType"/>
<xs:element name="endTime" type="TimeType"/>
<xs:element name="cpsNumber" type="OpsNumberType"/>
<xs:element name="startChannel" type="ChannelType"/>
<xs:element name="endChannel" type="ChannelType"/>
<xs:element name="startOpticalDistanceMetres" type="OpticalDistanceType"/>
<xs:element name="endOpticalDistanceMetres" type="OpticalDistanceType"/>
<xs:element name="startLatitude" type="LatitudeType"/>
<xs:element name="startLongitude" type="LongitudeType"/>
<xs:element name="endLatitude" type="LatitudeType"/>
<xs:element name="endLongitude" type="LongitudeType"/>
<xs:element name="zoneName" type="xs:string"/>
<xs:element name="scalePoint" type="xs:string"/>
<xs:element name="alertType" type="xs:string"/>
<xs:element name="alertLevel" type="AlertLevelType"/>
<xs:element name="speed" type="xs:string"/>
<xs:element name="externalType" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="externalId" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GuiStatusType">
<xs:sequence>
<xs:element name="ipAddress" type="xs:string"/>
<xs:element name="status" type="StatusType"/>
<xs:element name="error" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<!--
Confidential
®
© OptaSense Ltd 2017 28 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
============================================================================
Type definitions for messages sent in response to HTTP POST commands
received from an external HTTP client.
============================================================================
-->
<!--
Status message sent in response to SET, ACK, DEL, ACK-DISS-ALL,
highlight and audio HTTP POST commands. Also sent to report an error
if a command has failed.
-->
<xs:complexType name="StatusMessageType">
<xs:sequence>
<xs:element name="status" type="StatusType"/>
<xs:element name="error" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<!--
Alert details message sent in response to successful GET and LIST HTTP
POST commands.
-->
<xs:complexType name="AlertDetailsMessageType">
<xs:sequence>
<xs:element name="status" type="StatusType"/>
<xs:element name="alertDetails" type="AlertDetailsType" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!--
Gui status message sent in response to hightlight and audio HTTP POST
ommands.
-->
<xs:complexType name="GuiStatusMessageType">
<xs:sequence>
<xs:element name="guiStatus" type="GuiStatusType" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!--
============================================================================
Type definitions for unsolicited messages sent via HTTP POST to an
external HTTP server. The content of these messages can optionally be
sent as HTTP key/value pairs.
============================================================================
-->
<!--
Status update message sent when an slert is acknowledged or dismissed.
-->
<xs:complexType name="StatusUpdateMessageType">
<xs:sequence>
<xs:element name="statusUpdate" type="StatusUpdateType"/>
<xs:element name="alertType" type="xs:string"/>
<xs:element name="alertId" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<!--
============================================================================
This is the main message body. One and only one message type element
will be present when this message is sent.
============================================================================
-->
<xs:element name="optasenseMessage">
<xs:complexType>
<xs:choice>
<!--
The following elements are sent in response to HTTP POST
commands from an external client.
-->
<xs:element name="statusMessage" type="StatusMessageType"/>
<xs:element name="alertDetailsMessage" type="AlertDetailsMessageType"/>
Confidential
®
© OptaSense Ltd 2017 29 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
<!--
The following elements are unsolicited and are sent via
HTTP POST to and external server.
-->
<xs:element name="statusUpdateMessage" type="StatusUpdateMessageType"/>
<xs:element name="heartbeatMessage" type="StatusType"/>
<xs:element name="alertUpdateMessage" type="AlertDetailsType"/>
<xs:element name="alertRefreshMessage" type="AlertRefreshType"/>
<xs:element name="fibreBreakMessage" type="xs:string"/>
<xs:element name="hardwareErrorMessage" type="xs:string"/>
<xs:element name="softwareErrorMessage" type="xs:string"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Confidential
®
© OptaSense Ltd 2017 30 OptaSense Third Party Interface Specification
Confidential OptaSense/OLA/033 Issue 9
Abbreviation Meaning
ACK Acknowledge
ID Identifier
IU Interrogator Unit
Confidential
®
© OptaSense Ltd 2017 31 OptaSense Third Party Interface Specification