User`s manual
11. Appendix A - Hydra Open Protocol
Barco – iStudio – R5976569 – user's manual – revision 09 – March-2007
____________________________________________________________________________________
11-5
11.2 Connections
There are two connection types available: one for transactions and one for event handling.
11.2.1 Transactions
The following procedure describes how to get a connection for transactions:
• Create a TCP socket with the IP address of the H
YDRA module and with port 8881
• Open the socket
• Send your transaction as XML formatted text
• Receive the result of this transaction as XML formatted text
• Repeat this procedure as many times as necessary, keeping the connection open
• Send closeconnection packet to server when done and close the socket
11.2.2 Events
The following procedure describes how to get a connection for events:
• Create a TCP socket with the IP address of the H
YDRA module and with port 8882
• Open the socket
• Enable or disable desired events (send XML formatted text)
• Receive events as XML formatted text
• Keep connection open until you are done
• Send closeconnection packet to server when done and close the socket
11.2.3 Closing a connection
To close a connection, send the following packet, optionally wait for the result and close the socket.
<XML>
<PACKET MODULE="HYDRA" VERSION="1.0">
<CLOSECONNECTION>
</CLOSECONNECTION>
</PACKET>
</XML>
The HYDRA answers with:
<XML>
<PACKET MODULE="HYDRA" VERSION="1.0">
<CLOSECONNECTIONRESULT>
</CLOSECONNECTIONRESULT>
</PACKET>
</XML>
Sending an XML command does not give any feedback, which means you are not notified, if you
sent a command that the parser could not process. Anyhow, the result of the set-commands can
be checked by asking the respective properties with the corresponding get-command.