User`s manual
11. Appendix A - Hydra Open Protocol
Barco – iStudio – R5976569 – user's manual – revision 09 – March-2007
____________________________________________________________________________________
11-6
11.3 Transactions
11.3.1 Definition
Transaction
A transaction contains a number of commands to be executed by the H
YDRA. Transactions are always completely
executed before another transaction is processed. All the commands in a transaction are executed sequentially. A
transaction sits inside a PACKET tag and has the following tag:
<TRANSACTION SERIAL="serial" MODE="mode">
...
</TRANSACTION>
serial is a unique string (e.g. a number) to identify each transaction (necessary for the answer from the
server). mode determines how this transaction has to be executed:
• 0: complete all commands in transaction (even when some commands fail)
• 1: when a command fails, stop the transaction and thus the execution of the remaining commands
• 2: when a command fails, stop the transaction and do a full rollback (this mode might be fully supported
later on but works the same like mode 1 currently)
The result of a transaction is always sent with the following tag:
<TRANSACTIONRESULT SERIAL="serial" ERROR="error">
...
</TRANSACTIONRESULT>
Within this structure the results for each individual command are stored in the same order as they were put in
the TRANSACTION tag. error shows the number of commands that have failed (0 means no failures).
Command
Each command sits inside a TRANSACTION tag and is created with the following tag:
<COMMAND ID="name" SERIAL="serial">
...
</COMMAND>
The ID is the name of the command and the serial is the unique serial (e.g. a number) to identify each com-
mand in a transaction result.
The result of a command sits inside a TRANSACTIONRESULT tag and is created with the following tag:
<COMMANDRESULT SERIAL="serial" ERROR="error">
...
</COMMANDRESULT>
The error is 0 when the command was successful and not zero if an error occurred. The meaning of this number
depends on the command. Most commands return 1 if an error occurred and the execution of the command has
failed.