~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to storage/ndb/include/kernel/signaldata/LqhKey.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2003 MySQL AB
 
2
 
 
3
   This program is free software; you can redistribute it and/or modify
 
4
   it under the terms of the GNU General Public License as published by
 
5
   the Free Software Foundation; version 2 of the License.
 
6
 
 
7
   This program is distributed in the hope that it will be useful,
 
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
   GNU General Public License for more details.
 
11
 
 
12
   You should have received a copy of the GNU General Public License
 
13
   along with this program; if not, write to the Free Software
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
 
 
16
#ifndef LQH_KEY_H
 
17
#define LQH_KEY_H
 
18
 
 
19
#include "SignalData.hpp"
 
20
 
 
21
class LqhKeyReq {
 
22
  /**
 
23
   * Reciver(s)
 
24
   */
 
25
  friend class Dblqh;         // Reciver
 
26
 
 
27
  /**
 
28
   * Sender(s)
 
29
   */
 
30
  friend class Dbtc;      
 
31
  friend class Restore;
 
32
  
 
33
  /**
 
34
   * For printing
 
35
   */
 
36
  friend bool printLQHKEYREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo);
 
37
 
 
38
public:
 
39
  STATIC_CONST( FixedSignalLength = 11 );
 
40
 
 
41
private:
 
42
 
 
43
  /**
 
44
   * DATA VARIABLES
 
45
   */
 
46
//-------------------------------------------------------------
 
47
// Unconditional part. First 10 words
 
48
//-------------------------------------------------------------
 
49
  UintR clientConnectPtr;       // DATA 0
 
50
  UintR attrLen;                // DATA 1
 
51
  UintR hashValue;              // DATA 2
 
52
  UintR requestInfo;            // DATA 3
 
53
  UintR tcBlockref;             // DATA 4
 
54
  UintR tableSchemaVersion;     // DATA 5
 
55
  UintR fragmentData;           // DATA 6
 
56
  UintR transId1;               // DATA 7
 
57
  UintR transId2;               // DATA 8
 
58
  UintR savePointId;            // DATA 9
 
59
  union {
 
60
    /**
 
61
     * When sent from  TC -> LQH this variable contains scanInfo
 
62
     * When send from LQH -> LQH this variable contains noFiredTriggers
 
63
     */
 
64
    UintR noFiredTriggers;      // DATA 10 
 
65
    Uint32 scanInfo;            // DATA 10
 
66
  };
 
67
 
 
68
//-------------------------------------------------------------
 
69
// Variable sized key part. Those will be placed to
 
70
// pack the signal in an appropriate manner.
 
71
//-------------------------------------------------------------
 
72
  UintR variableData[10];           // DATA 11 - 21
 
73
 
 
74
  static UintR getAttrLen(const UintR & scanInfoAttrLen);
 
75
  static UintR getScanTakeOverFlag(const UintR & scanInfoAttrLen);
 
76
  static UintR getStoredProcFlag(const UintR & scanData);
 
77
  static UintR getDistributionKey(const UintR & scanData);
 
78
  
 
79
  static UintR getTableId(const UintR & tableSchemaVersion);
 
80
  static UintR getSchemaVersion(const UintR & tableSchemaVersion);
 
81
 
 
82
  static UintR getFragmentId(const UintR & fragmentData);
 
83
  static UintR getNextReplicaNodeId(const UintR & fragmentData);
 
84
 
 
85
  static Uint8 getLockType(const UintR & requestInfo);
 
86
  static Uint8 getDirtyFlag(const UintR & requestInfo);
 
87
  static Uint8 getInterpretedFlag(const UintR & requestInfo);
 
88
  static Uint8 getSimpleFlag(const UintR & requestInfo);
 
89
  static Uint8 getOperation(const UintR & requestInfo);
 
90
  static Uint8 getSeqNoReplica(const UintR & requestInfo);
 
91
  static Uint8 getLastReplicaNo(const UintR & requestInfo);
 
92
  static Uint8 getAIInLqhKeyReq(const UintR & requestInfo);
 
93
  static UintR getKeyLen(const UintR & requestInfo);
 
94
  static UintR getSameClientAndTcFlag(const UintR & requestInfo);
 
95
  static UintR getReturnedReadLenAIFlag(const UintR & requestInfo);
 
96
  static UintR getApplicationAddressFlag(const UintR & requestInfo);
 
97
  static UintR getMarkerFlag(const UintR & requestInfo);
 
98
  static UintR getNoDiskFlag(const UintR & requestInfo);
 
99
 
 
100
  /**
 
101
   * Setters
 
102
   */
 
103
 
 
104
  static void setAttrLen(UintR & scanInfoAttrLen, UintR val);
 
105
  static void setScanTakeOverFlag(UintR & scanInfoAttrLen, UintR val);
 
106
  static void setStoredProcFlag(UintR & scanData, UintR val);
 
107
  static void setDistributionKey(UintR & scanData, UintR val);
 
108
  
 
109
  static void setTableId(UintR & tableSchemaVersion, UintR val);
 
110
  static void setSchemaVersion(UintR & tableSchemaVersion, UintR val);
 
111
 
 
112
  static void setFragmentId(UintR & fragmentData, UintR val);
 
113
  static void setNextReplicaNodeId(UintR & fragmentData, UintR val);
 
114
 
 
115
  static void setLockType(UintR & requestInfo, UintR val);
 
116
  static void setDirtyFlag(UintR & requestInfo, UintR val);
 
117
  static void setInterpretedFlag(UintR & requestInfo, UintR val);
 
118
  static void setSimpleFlag(UintR & requestInfo, UintR val);
 
119
  static void setOperation(UintR & requestInfo, UintR val);
 
120
  static void setSeqNoReplica(UintR & requestInfo, UintR val);
 
121
  static void setLastReplicaNo(UintR & requestInfo, UintR val);
 
122
  static void setAIInLqhKeyReq(UintR & requestInfo, UintR val);
 
123
  static void setKeyLen(UintR & requestInfo, UintR val);
 
124
  static void setSameClientAndTcFlag(UintR & requestInfo, UintR val);
 
125
  static void setReturnedReadLenAIFlag(UintR & requestInfo, UintR val);
 
126
  static void setApplicationAddressFlag(UintR & requestInfo, UintR val);
 
127
  static void setMarkerFlag(UintR & requestInfo, UintR val);
 
128
  static void setNoDiskFlag(UintR & requestInfo, UintR val);
 
129
 
 
130
  static UintR getRowidFlag(const UintR & requestInfo);
 
131
  static void setRowidFlag(UintR & requestInfo, UintR val);
 
132
 
 
133
  /**
 
134
   * When doing DIRTY WRITES
 
135
   */
 
136
  static UintR getGCIFlag(const UintR & requestInfo);
 
137
  static void setGCIFlag(UintR & requestInfo, UintR val);
 
138
 
 
139
  static UintR getNrCopyFlag(const UintR & requestInfo);
 
140
  static void setNrCopyFlag(UintR & requestInfo, UintR val);
 
141
};
 
142
 
 
143
/**
 
144
 * Request Info
 
145
 *
 
146
 * k = Key len                - 10 Bits (0-9) max 1023
 
147
 * l = Last Replica No        - 2  Bits -> Max 3 (10-11)
 
148
 
 
149
 IF version < NDBD_ROWID_VERSION
 
150
   * t = Lock type            - 3  Bits -> Max 7 (12-14)
 
151
 * p = Application Addr. Ind  - 1  Bit (15)
 
152
 * d = Dirty indicator        - 1  Bit (16)
 
153
 * i = Interpreted indicator  - 1  Bit (17)
 
154
 * s = Simple indicator       - 1  Bit (18)
 
155
 * o = Operation              - 3  Bits (19-21)
 
156
 * r = Sequence replica       - 2  Bits (22-23)
 
157
 * a = Attr Info in LQHKEYREQ - 3  Bits (24-26)
 
158
 * c = Same client and tc     - 1  Bit (27)
 
159
 * u = Read Len Return Ind    - 1  Bit (28)
 
160
 * m = Commit ack marker      - 1  Bit (29)
 
161
 * x = No disk usage          - 1  Bit (30)
 
162
 * z = Use rowid for insert   - 1  Bit (31)
 
163
 * g = gci flag               - 1  Bit (12)
 
164
 * n = NR copy                - 1  Bit (13)
 
165
 
 
166
 *             1111111111222222222233
 
167
 *   01234567890123456789012345678901
 
168
 *   kkkkkkkkkklltttpdisooorraaacumxz
 
169
 *   kkkkkkkkkkllgn pdisooorraaacumxz
 
170
 */
 
171
 
 
172
#define RI_KEYLEN_SHIFT      (0)
 
173
#define RI_KEYLEN_MASK       (1023)
 
174
#define RI_LAST_REPL_SHIFT   (10)
 
175
#define RI_LAST_REPL_MASK    (3)
 
176
#define RI_LOCK_TYPE_SHIFT   (12)
 
177
#define RI_LOCK_TYPE_MASK    (7)
 
178
#define RI_APPL_ADDR_SHIFT   (15)
 
179
#define RI_DIRTY_SHIFT       (16)
 
180
#define RI_INTERPRETED_SHIFT (17)
 
181
#define RI_SIMPLE_SHIFT      (18)
 
182
#define RI_OPERATION_SHIFT   (19)
 
183
#define RI_OPERATION_MASK    (7)
 
184
#define RI_SEQ_REPLICA_SHIFT (22)
 
185
#define RI_SEQ_REPLICA_MASK  (3)
 
186
#define RI_AI_IN_THIS_SHIFT  (24)
 
187
#define RI_AI_IN_THIS_MASK   (7)
 
188
#define RI_SAME_CLIENT_SHIFT (27)
 
189
#define RI_RETURN_AI_SHIFT   (28)
 
190
#define RI_MARKER_SHIFT      (29)
 
191
#define RI_NODISK_SHIFT      (30)
 
192
#define RI_ROWID_SHIFT       (31)
 
193
#define RI_GCI_SHIFT         (12)
 
194
#define RI_NR_COPY_SHIFT     (13)
 
195
 
 
196
/**
 
197
 * Scan Info
 
198
 *
 
199
 * a = Attr Len                 - 16 Bits -> max 65535 (0-15)
 
200
 * p = Stored Procedure Ind     -  1 Bit (16)
 
201
 * d = Distribution key         -  8 Bit  -> max 255 (17-24)
 
202
 * t = Scan take over indicator -  1 Bit (25)
 
203
 *
 
204
 *           1111111111222222222233
 
205
 * 01234567890123456789012345678901
 
206
 * aaaaaaaaaaaaaaaapddddddddt             
 
207
 */
 
208
 
 
209
#define SI_ATTR_LEN_MASK     (65535)
 
210
#define SI_ATTR_LEN_SHIFT    (0)
 
211
#define SI_STORED_PROC_SHIFT (16)
 
212
#define SI_DISTR_KEY_MASK    (255)
 
213
#define SI_DISTR_KEY_SHIFT   (17)
 
214
#define SI_SCAN_TO_SHIFT     (25)
 
215
#define SI_SCAN_INFO_MASK    (63)
 
216
#define SI_SCAN_INFO_SHIFT   (26)
 
217
 
 
218
inline 
 
219
UintR
 
220
LqhKeyReq::getAttrLen(const UintR & scanData)
 
221
{
 
222
  return (scanData >> SI_ATTR_LEN_SHIFT) & SI_ATTR_LEN_MASK;
 
223
}
 
224
 
 
225
inline 
 
226
Uint32
 
227
LqhKeyReq::getScanTakeOverFlag(const UintR & scanData)
 
228
{
 
229
  return (scanData >> SI_SCAN_TO_SHIFT) & 1;
 
230
}
 
231
 
 
232
inline
 
233
UintR
 
234
LqhKeyReq::getStoredProcFlag(const UintR & scanData){
 
235
  return (scanData >> SI_STORED_PROC_SHIFT) & 1;
 
236
}
 
237
 
 
238
inline
 
239
UintR
 
240
LqhKeyReq::getDistributionKey(const UintR & scanData){
 
241
  return (scanData >> SI_DISTR_KEY_SHIFT) & SI_DISTR_KEY_MASK;
 
242
}
 
243
 
 
244
inline 
 
245
UintR LqhKeyReq::getTableId(const UintR & tableSchemaVersion)
 
246
{
 
247
 return tableSchemaVersion & 0xFFFF;
 
248
}
 
249
 
 
250
inline 
 
251
UintR LqhKeyReq::getSchemaVersion(const UintR & tableSchemaVersion)
 
252
{
 
253
  return tableSchemaVersion >> 16;
 
254
}
 
255
 
 
256
inline 
 
257
UintR LqhKeyReq::getFragmentId(const UintR & fragmentData)
 
258
{
 
259
  return fragmentData & 0xFFFF;
 
260
}
 
261
 
 
262
inline 
 
263
UintR LqhKeyReq::getNextReplicaNodeId(const UintR & fragmentData)
 
264
{
 
265
 return fragmentData >> 16;
 
266
}
 
267
 
 
268
inline 
 
269
Uint8 LqhKeyReq::getLastReplicaNo(const UintR & requestInfo)
 
270
{
 
271
 return (requestInfo >> RI_LAST_REPL_SHIFT) & RI_LAST_REPL_MASK;
 
272
}
 
273
 
 
274
inline 
 
275
Uint8 LqhKeyReq::getLockType(const UintR & requestInfo)
 
276
{
 
277
  return (requestInfo >> RI_LOCK_TYPE_SHIFT) & RI_LOCK_TYPE_MASK;
 
278
}
 
279
 
 
280
inline 
 
281
Uint8 LqhKeyReq::getDirtyFlag(const UintR & requestInfo)
 
282
{
 
283
  return (requestInfo >> RI_DIRTY_SHIFT) & 1;
 
284
}
 
285
 
 
286
inline 
 
287
Uint8 LqhKeyReq::getInterpretedFlag(const UintR & requestInfo)
 
288
{
 
289
  return (requestInfo >> RI_INTERPRETED_SHIFT) & 1;
 
290
}
 
291
 
 
292
inline 
 
293
Uint8 LqhKeyReq::getSimpleFlag(const UintR & requestInfo)
 
294
{
 
295
  return (requestInfo >> RI_SIMPLE_SHIFT) & 1;
 
296
}
 
297
 
 
298
inline 
 
299
Uint8 LqhKeyReq::getOperation(const UintR & requestInfo)
 
300
{
 
301
  return (requestInfo >> RI_OPERATION_SHIFT) & RI_OPERATION_MASK;
 
302
}
 
303
 
 
304
inline 
 
305
Uint8 LqhKeyReq::getSeqNoReplica(const UintR & requestInfo)
 
306
{
 
307
  return (requestInfo >> RI_SEQ_REPLICA_SHIFT) & RI_SEQ_REPLICA_MASK;
 
308
}
 
309
 
 
310
 
 
311
inline 
 
312
Uint8 LqhKeyReq::getAIInLqhKeyReq(const UintR & requestInfo)
 
313
{
 
314
  return (requestInfo >> RI_AI_IN_THIS_SHIFT) & RI_AI_IN_THIS_MASK;
 
315
}
 
316
 
 
317
inline 
 
318
UintR LqhKeyReq::getKeyLen(const UintR & requestInfo)
 
319
{
 
320
  return (requestInfo >> RI_KEYLEN_SHIFT) & RI_KEYLEN_MASK;
 
321
}
 
322
 
 
323
inline 
 
324
UintR 
 
325
LqhKeyReq::getSameClientAndTcFlag(const UintR & requestInfo)
 
326
{
 
327
  return (requestInfo >> RI_SAME_CLIENT_SHIFT) & 1;
 
328
}
 
329
 
 
330
inline 
 
331
UintR LqhKeyReq::getReturnedReadLenAIFlag(const UintR & requestInfo)
 
332
{
 
333
  return (requestInfo >> RI_RETURN_AI_SHIFT) & 1;
 
334
}
 
335
 
 
336
inline
 
337
UintR 
 
338
LqhKeyReq::getApplicationAddressFlag(const UintR & requestInfo){
 
339
  return (requestInfo >> RI_APPL_ADDR_SHIFT) & 1;
 
340
}
 
341
 
 
342
inline
 
343
void
 
344
LqhKeyReq::setAttrLen(UintR & scanInfoAttrLen, UintR val){
 
345
  ASSERT_MAX(val, SI_ATTR_LEN_MASK, "LqhKeyReq::setAttrLen");
 
346
  scanInfoAttrLen |= (val << SI_ATTR_LEN_SHIFT);
 
347
}
 
348
 
 
349
 
 
350
inline
 
351
void
 
352
LqhKeyReq::setScanTakeOverFlag(UintR & scanInfoAttrLen, UintR val){
 
353
  ASSERT_BOOL(val, "LqhKeyReq::setScanTakeOverFlag");
 
354
  scanInfoAttrLen |= (val << SI_SCAN_TO_SHIFT);
 
355
}
 
356
inline
 
357
void
 
358
 
 
359
LqhKeyReq::setStoredProcFlag(UintR & scanData, UintR val){
 
360
  ASSERT_BOOL(val, "LqhKeyReq::setStoredProcFlag");
 
361
  scanData |= (val << SI_STORED_PROC_SHIFT);
 
362
}
 
363
 
 
364
inline
 
365
void
 
366
 
 
367
LqhKeyReq::setDistributionKey(UintR & scanData, UintR val){
 
368
  ASSERT_MAX(val, SI_DISTR_KEY_MASK, "LqhKeyReq::setDistributionKey");
 
369
  scanData |= (val << SI_DISTR_KEY_SHIFT);
 
370
}
 
371
 
 
372
#if 0  
 
373
inline
 
374
void
 
375
 
 
376
LqhKeyReq::setTableId(UintR & tableSchemaVersion, UintR val){
 
377
  
 
378
}
 
379
inline
 
380
void
 
381
LqhKeyReq::setSchemaVersion(UintR & tableSchemaVersion, UintR val);
 
382
 
 
383
inline
 
384
void
 
385
LqhKeyReq::setFragmentId(UintR & fragmentData, UintR val);
 
386
 
 
387
inline
 
388
void
 
389
LqhKeyReq::setNextReplicaNodeId(UintR & fragmentData, UintR val);
 
390
#endif
 
391
 
 
392
inline
 
393
void
 
394
LqhKeyReq::setLockType(UintR & requestInfo, UintR val){
 
395
  ASSERT_MAX(val, RI_LOCK_TYPE_MASK, "LqhKeyReq::setLockType");
 
396
  requestInfo |= (val << RI_LOCK_TYPE_SHIFT);
 
397
}
 
398
 
 
399
inline
 
400
void
 
401
LqhKeyReq::setDirtyFlag(UintR & requestInfo, UintR val){
 
402
  ASSERT_BOOL(val, "LqhKeyReq::setDirtyFlag");
 
403
  requestInfo |= (val << RI_DIRTY_SHIFT);
 
404
}
 
405
 
 
406
inline
 
407
void
 
408
LqhKeyReq::setInterpretedFlag(UintR & requestInfo, UintR val){
 
409
  ASSERT_BOOL(val, "LqhKeyReq::setInterpretedFlag");
 
410
  requestInfo |= (val << RI_INTERPRETED_SHIFT);
 
411
}
 
412
 
 
413
inline
 
414
void
 
415
LqhKeyReq::setSimpleFlag(UintR & requestInfo, UintR val){
 
416
  ASSERT_BOOL(val, "LqhKeyReq::setSimpleFlag");
 
417
  requestInfo |= (val << RI_SIMPLE_SHIFT);
 
418
}
 
419
 
 
420
inline
 
421
void
 
422
LqhKeyReq::setOperation(UintR & requestInfo, UintR val){
 
423
  ASSERT_MAX(val, RI_OPERATION_MASK, "LqhKeyReq::setOperation");
 
424
  requestInfo |= (val << RI_OPERATION_SHIFT);
 
425
}
 
426
 
 
427
inline
 
428
void
 
429
LqhKeyReq::setSeqNoReplica(UintR & requestInfo, UintR val){
 
430
  ASSERT_MAX(val, RI_SEQ_REPLICA_MASK, "LqhKeyReq::setSeqNoReplica");
 
431
  requestInfo |= (val << RI_SEQ_REPLICA_SHIFT);
 
432
}
 
433
 
 
434
inline
 
435
void
 
436
LqhKeyReq::setLastReplicaNo(UintR & requestInfo, UintR val){
 
437
  ASSERT_MAX(val, RI_LAST_REPL_MASK, "LqhKeyReq::setLastReplicaNo");
 
438
  requestInfo |= (val << RI_LAST_REPL_SHIFT);
 
439
}
 
440
 
 
441
inline
 
442
void
 
443
LqhKeyReq::setAIInLqhKeyReq(UintR & requestInfo, UintR val){
 
444
  ASSERT_MAX(val, RI_AI_IN_THIS_MASK, "LqhKeyReq::setAIInLqhKeyReq");
 
445
  requestInfo |= (val << RI_AI_IN_THIS_SHIFT);
 
446
}
 
447
 
 
448
inline
 
449
void
 
450
LqhKeyReq::setKeyLen(UintR & requestInfo, UintR val){
 
451
  ASSERT_MAX(val, RI_KEYLEN_MASK, "LqhKeyReq::setKeyLen");
 
452
  requestInfo |= (val << RI_KEYLEN_SHIFT);
 
453
}
 
454
 
 
455
inline
 
456
void
 
457
LqhKeyReq::setSameClientAndTcFlag(UintR & requestInfo, UintR val){
 
458
  ASSERT_BOOL(val, "LqhKeyReq::setSameClientAndTcFlag");
 
459
  requestInfo |= (val << RI_SAME_CLIENT_SHIFT);
 
460
}
 
461
 
 
462
inline
 
463
void
 
464
LqhKeyReq::setReturnedReadLenAIFlag(UintR & requestInfo, UintR val){
 
465
  ASSERT_BOOL(val, "LqhKeyReq::setReturnedReadLenAIFlag");
 
466
  requestInfo |= (val << RI_RETURN_AI_SHIFT);
 
467
}
 
468
 
 
469
inline
 
470
void
 
471
LqhKeyReq::setApplicationAddressFlag(UintR & requestInfo, UintR val){
 
472
  ASSERT_BOOL(val, "LqhKeyReq::setApplicationAddressFlag");
 
473
  requestInfo |= (val << RI_APPL_ADDR_SHIFT);
 
474
}
 
475
 
 
476
/**** */
 
477
 
 
478
inline
 
479
void
 
480
LqhKeyReq::setMarkerFlag(UintR & requestInfo, UintR val){
 
481
  ASSERT_BOOL(val, "LqhKeyReq::setMarkerFlag");
 
482
  requestInfo |= (val << RI_MARKER_SHIFT);
 
483
}
 
484
 
 
485
inline
 
486
UintR 
 
487
LqhKeyReq::getMarkerFlag(const UintR & requestInfo){
 
488
  return (requestInfo >> RI_MARKER_SHIFT) & 1;
 
489
}
 
490
 
 
491
inline
 
492
void
 
493
LqhKeyReq::setNoDiskFlag(UintR & requestInfo, UintR val){
 
494
  ASSERT_BOOL(val, "LqhKeyReq::setNoDiskFlag");
 
495
  requestInfo |= (val << RI_NODISK_SHIFT);
 
496
}
 
497
 
 
498
inline
 
499
UintR 
 
500
LqhKeyReq::getNoDiskFlag(const UintR & requestInfo){
 
501
  return (requestInfo >> RI_NODISK_SHIFT) & 1;
 
502
}
 
503
 
 
504
inline
 
505
void
 
506
LqhKeyReq::setRowidFlag(UintR & requestInfo, UintR val){
 
507
  ASSERT_BOOL(val, "LqhKeyReq::setRowidFlag");
 
508
  requestInfo |= (val << RI_ROWID_SHIFT);
 
509
}
 
510
 
 
511
inline
 
512
UintR 
 
513
LqhKeyReq::getRowidFlag(const UintR & requestInfo){
 
514
  return (requestInfo >> RI_ROWID_SHIFT) & 1;
 
515
}
 
516
 
 
517
inline
 
518
void
 
519
LqhKeyReq::setGCIFlag(UintR & requestInfo, UintR val){
 
520
  ASSERT_BOOL(val, "LqhKeyReq::setGciFlag");
 
521
  requestInfo |= (val << RI_GCI_SHIFT);
 
522
}
 
523
 
 
524
inline
 
525
UintR 
 
526
LqhKeyReq::getGCIFlag(const UintR & requestInfo){
 
527
  return (requestInfo >> RI_GCI_SHIFT) & 1;
 
528
}
 
529
 
 
530
inline
 
531
void
 
532
LqhKeyReq::setNrCopyFlag(UintR & requestInfo, UintR val){
 
533
  ASSERT_BOOL(val, "LqhKeyReq::setNrCopyFlag");
 
534
  requestInfo |= (val << RI_NR_COPY_SHIFT);
 
535
}
 
536
 
 
537
inline
 
538
UintR 
 
539
LqhKeyReq::getNrCopyFlag(const UintR & requestInfo){
 
540
  return (requestInfo >> RI_NR_COPY_SHIFT) & 1;
 
541
}
 
542
 
 
543
class LqhKeyConf {
 
544
  /**
 
545
   * Reciver(s)
 
546
   */
 
547
  friend class Dbtc;
 
548
  friend class Restore;
 
549
 
 
550
  /**
 
551
   * Sender(s)
 
552
   */
 
553
  friend class Dblqh;
 
554
 
 
555
  // Sent in a packed signal
 
556
  friend class PackedSignal;
 
557
  /**
 
558
   * For printing
 
559
   */
 
560
  friend bool printPACKED_SIGNAL(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo);
 
561
  friend bool printLQHKEYCONF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo);
 
562
 
 
563
public:
 
564
  STATIC_CONST( SignalLength = 7 );
 
565
 
 
566
private:
 
567
 
 
568
  /**
 
569
   * DATA VARIABLES
 
570
   */
 
571
  Uint32 connectPtr;
 
572
  Uint32 opPtr;
 
573
  Uint32 userRef;
 
574
  Uint32 readLen;
 
575
  Uint32 transId1;
 
576
  Uint32 transId2;
 
577
  Uint32 noFiredTriggers;
 
578
};
 
579
 
 
580
class LqhKeyRef {
 
581
  /**
 
582
   * Reciver(s)
 
583
   */
 
584
  friend class Dbtc;      
 
585
  friend class Restore;
 
586
 
 
587
  /**
 
588
   * Sender(s)
 
589
   */
 
590
  friend class Dblqh;
 
591
 
 
592
  /**
 
593
   * For printing
 
594
   */
 
595
  friend bool printLQHKEYREF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo);
 
596
 
 
597
public:
 
598
  STATIC_CONST( SignalLength = 5 );
 
599
 
 
600
private:
 
601
 
 
602
  /**
 
603
   * DATA VARIABLES
 
604
   */
 
605
  Uint32 userRef;
 
606
  Uint32 connectPtr;
 
607
  Uint32 errorCode;
 
608
  Uint32 transId1;
 
609
  Uint32 transId2;
 
610
};
 
611
 
 
612
#endif