1 // author : Boris Kolpackov <boris@dre.vanderbilt.edu>
3 #ifndef TMCAST_PROTOCOL_HPP
4 #define TMCAST_PROTOCOL_HPP
10 unsigned long const MEMBER_ID_LENGTH
= 38;
14 char id
[MEMBER_ID_LENGTH
];
21 typedef unsigned short TransactionId
;
23 typedef unsigned char TransactionStatus
;
25 TransactionStatus
const TS_BEGIN
= 1;
26 TransactionStatus
const TS_COMMIT
= 2;
27 TransactionStatus
const TS_ABORT
= 3;
28 TransactionStatus
const TS_COMMITED
= 4;
29 TransactionStatus
const TS_ABORTED
= 5;
34 TransactionStatus status
;
37 // Transaction List (TL)
39 // unsigned long const TL_LENGTH = 1;
41 // typedef Transaction TransactionList[TL_LENGTH];
48 unsigned long check_sum
;
54 //TransactionList transaction_list;
57 unsigned long const MAX_MESSAGE_SIZE
= 768;
60 MAX_PAYLOAD_SIZE
= MAX_MESSAGE_SIZE
- sizeof (MessageHeader
);
66 unsigned long const SYNC_PERIOD
= 30000; // in mks
68 unsigned short const VOTING_FRAME
= 4; // in SYNC_PERIOD's
69 unsigned short const SEPARATION_FRAME
= 5; // in SYNC_PERIOD's
71 // FATAL_SILENCE_FRAME in SYNC_PERIOD's
72 // Generally it's a good idea to set it to < VOTING_FRAME + SEPARATION_FRAME
75 short const FATAL_SILENCE_FRAME
= VOTING_FRAME
+ SEPARATION_FRAME
- 2;
77 // short const FATAL_SILENCE_FRAME = 10000;
82 // tslabel (Protocol::TransactionStatus s);
85 // operator << (std::ostream& o, Transaction const& t);
89 #endif // TMCAST_PROTOCOL_HPP