19 #ifndef LQH_TRANS_CONF_H
20 #define LQH_TRANS_CONF_H
22 #include "SignalData.hpp"
40 friend bool printLQH_TRANSCONF(FILE *,
const Uint32 *, Uint32, Uint16);
42 STATIC_CONST( SignalLength = 17 );
47 STATIC_CONST( SignalLength_GCI_LO = 16 );
48 STATIC_CONST( SignalLength_FRAG_ID = 17 );
54 enum OperationStatus {
74 Uint32 operationStatus;
93 static Uint32 getReplicaNo(Uint32 & requestInfo);
94 static Uint32 getReplicaType(Uint32 & requestInfo);
95 static Uint32 getLastReplicaNo(Uint32 & requestInfo);
96 static Uint32 getSimpleFlag(Uint32 & requestInfo);
97 static Uint32 getDirtyFlag(Uint32 & requestInfo);
98 static Uint32 getOperation(Uint32 & requestInfo);
99 static Uint32 getMarkerFlag(Uint32 & requestInfo);
101 static void setReplicaNo(UintR & requestInfo, UintR val);
102 static void setReplicaType(UintR & requestInfo, UintR val);
103 static void setLastReplicaNo(UintR & requestInfo, UintR val);
104 static void setSimpleFlag(UintR & requestInfo, UintR val);
105 static void setDirtyFlag(UintR & requestInfo, UintR val);
106 static void setOperation(UintR & requestInfo, UintR val);
107 static void setMarkerFlag(Uint32 & requestInfo, Uint32 val);
125 #define LTC_REPLICA_TYPE_SHIFT (0)
126 #define LTC_REPLICA_TYPE_MASK (3)
127 #define LTC_REPLICA_NO_SHIFT (2)
128 #define LTC_REPLICA_NO_MASK (3)
129 #define LTC_LAST_REPLICA_SHIFT (4)
130 #define LTC_LAST_REPLICA_MASK (3)
131 #define LTC_SIMPLE_SHIFT (6)
132 #define LTC_DIRTY_SHIFT (7)
133 #define LTC_OPERATION_SHIFT (8)
134 #define LTC_OPERATION_MASK (7)
135 #define LTC_MARKER_SHIFT (10)
139 LqhTransConf::getReplicaType(Uint32 & requestInfo){
140 return (requestInfo >> LTC_REPLICA_TYPE_SHIFT) & LTC_REPLICA_TYPE_MASK;
145 LqhTransConf::getReplicaNo(Uint32 & requestInfo){
146 return (requestInfo >> LTC_REPLICA_NO_SHIFT) & LTC_REPLICA_NO_MASK;
151 LqhTransConf::getLastReplicaNo(Uint32 & requestInfo){
152 return (requestInfo >> LTC_LAST_REPLICA_SHIFT) & LTC_LAST_REPLICA_MASK;
157 LqhTransConf::getSimpleFlag(Uint32 & requestInfo){
158 return (requestInfo >> LTC_SIMPLE_SHIFT) & 1;
163 LqhTransConf::getDirtyFlag(Uint32 & requestInfo){
164 return (requestInfo >> LTC_DIRTY_SHIFT) & 1;
169 LqhTransConf::getOperation(Uint32 & requestInfo){
170 return (requestInfo >> LTC_OPERATION_SHIFT) & LTC_OPERATION_MASK;
175 LqhTransConf::getMarkerFlag(Uint32 & requestInfo){
176 return (requestInfo >> LTC_MARKER_SHIFT) & 1;
182 LqhTransConf::setReplicaNo(UintR & requestInfo, UintR val){
183 ASSERT_MAX(val, LTC_REPLICA_NO_MASK,
"LqhTransConf::setReplicaNo");
184 requestInfo |= (val << LTC_REPLICA_NO_SHIFT);
189 LqhTransConf::setReplicaType(UintR & requestInfo, UintR val){
190 ASSERT_MAX(val, LTC_REPLICA_TYPE_MASK,
"LqhTransConf::setReplicaType");
191 requestInfo |= (val << LTC_REPLICA_TYPE_SHIFT);
196 LqhTransConf::setLastReplicaNo(UintR & requestInfo, UintR val){
197 ASSERT_MAX(val, LTC_LAST_REPLICA_MASK,
"LqhTransConf::setLastReplicaNo");
198 requestInfo |= (val << LTC_LAST_REPLICA_SHIFT);
203 LqhTransConf::setSimpleFlag(UintR & requestInfo, UintR val){
204 ASSERT_BOOL(val,
"LqhTransConf::setSimpleFlag");
205 requestInfo |= (val << LTC_SIMPLE_SHIFT);
210 LqhTransConf::setDirtyFlag(UintR & requestInfo, UintR val){
211 ASSERT_BOOL(val,
"LqhTransConf::setDirtyFlag");
212 requestInfo |= (val << LTC_DIRTY_SHIFT);
217 LqhTransConf::setOperation(UintR & requestInfo, UintR val){
218 ASSERT_MAX(val, LTC_OPERATION_MASK,
"LqhTransConf::setOperation");
219 requestInfo |= (val << LTC_OPERATION_SHIFT);
224 LqhTransConf::setMarkerFlag(UintR & requestInfo, UintR val){
225 ASSERT_BOOL(val,
"LqhTransConf::setMarkerFlag");
226 requestInfo |= (val << LTC_MARKER_SHIFT);