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

« back to all changes in this revision

Viewing changes to storage/ndb/include/kernel/signaldata/GrepImpl.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 GREP_IMPL_HPP
 
17
#define GREP_IMPL_HPP
 
18
 
 
19
#include "SignalData.hpp"
 
20
#include <GrepError.hpp>
 
21
#include <NodeBitmask.hpp>
 
22
 
 
23
 
 
24
 
 
25
/*****************************************************************************
 
26
 * GREP REQ   Request a Global Replication  (between SS and PS)
 
27
 *****************************************************************************/
 
28
/**
 
29
 * @class GrepReq
 
30
 * @brief
 
31
 */
 
32
class GrepReq 
 
33
{
 
34
  /**
 
35
   * Sender(s)/Reciver(s)
 
36
   */
 
37
  friend class Grep;
 
38
 
 
39
public:
 
40
  enum Request {
 
41
    START = 0,            ///< Start Global Replication (all phases)
 
42
    SLOWSTOP = 1,       ///< Stop after finishing applying current GCI epoch
 
43
    FASTSTOP = 2,       ///< Stop after finishing applying all PS GCI epochs
 
44
    STATUS = 3,           ///< Status
 
45
    REMOVE_BUFFERS = 4,   ///< Remove buffers from PS and SS
 
46
 
 
47
    START_SUBSCR = 5,
 
48
    START_METALOG = 6,    ///< Start Global Replication Logging of Metadata
 
49
    START_METASCAN = 7,   ///< Start Global Replication Scanning of Metadata
 
50
    START_DATALOG = 8,    ///< Start Global Replication Logging of table data
 
51
    START_DATASCAN = 9,   ///< Start Global Replication Scanning of table data
 
52
    START_REQUESTOR = 10, ///< Start Global Replication Requestor
 
53
    START_TRANSFER = 11,  ///< Start SS-PS transfer
 
54
    START_APPLY = 12,     ///< Start applying GCI epochs in SS
 
55
    START_DELETE = 13,    ///< Start deleting buffers at PS/SS REP automatic.
 
56
 
 
57
    STOP_SUBSCR = 14,     ///< Remove subscription
 
58
    STOP_METALOG = 15,    ///< Stop Global Replication Logging of Metadata
 
59
    STOP_METASCAN = 16,   ///< Stop Global Replication Scanning of Metadata
 
60
    STOP_DATALOG = 17,    ///< Stop Global Replication Logging of table data
 
61
    STOP_DATASCAN = 18,   ///< Stop Global Replication Scanning of table data
 
62
    STOP_REQUESTOR = 19,  ///< Stop Global Replication Requestor
 
63
    STOP_TRANSFER = 20,   ///< Stop SS-PS transfer
 
64
    STOP_APPLY = 21,      ///< Stop applying GCI epochs in SS
 
65
    STOP_DELETE = 22,     ///< Stop deleting buffers at PS/SS REP automatically
 
66
    CREATE_SUBSCR = 23,   ///< Create subscription ID in SUMA
 
67
    DROP_TABLE = 24,      ///< Create subscription ID in SUMA
 
68
    STOP = 25,
 
69
 
 
70
    NO_REQUEST = 0xffffffff
 
71
  };
 
72
 
 
73
  STATIC_CONST( SignalLength = 2 );
 
74
 
 
75
  Uint32 senderRef;
 
76
  Uint32 request;
 
77
};
 
78
 
 
79
 
 
80
/*****************************************************************************
 
81
 * CREATE   Between SS and PS  (DB and REP nodes)
 
82
 *****************************************************************************/
 
83
/**
 
84
 * @class GrepSubCreateReq
 
85
 * @brief
 
86
 */
 
87
class GrepSubCreateReq 
 
88
{
 
89
  /**
 
90
   * Sender(s)/Reciver(s)
 
91
   */
 
92
  friend class Grep;
 
93
  
 
94
  friend bool printGREP_SUB_CREATE_REQ(FILE *, 
 
95
                                       const Uint32 *, 
 
96
                                       Uint32, 
 
97
                                       Uint16);
 
98
public:
 
99
  STATIC_CONST( SignalLength = 5 );
 
100
  Uint32 subscriptionId;
 
101
  Uint32 subscriptionKey;
 
102
  Uint32 subscriptionType;
 
103
  Uint32 senderRef;
 
104
  Uint32 senderData;
 
105
  SECTION( TABLE_LIST = 0 );  
 
106
};
 
107
 
 
108
/**
 
109
 * @class GrepSubCreateReq
 
110
 * @brief
 
111
 */
 
112
class GrepSubCreateRef 
 
113
{
 
114
  /**
 
115
   * Sender(s)/Reciver(s)
 
116
   */
 
117
  friend class Grep;
 
118
  
 
119
  friend bool printGREP_SUB_CREATE_REF(FILE *, 
 
120
                                       const Uint32 *, 
 
121
                                       Uint32, 
 
122
                                       Uint16);
 
123
public:
 
124
  STATIC_CONST( SignalLength = 6 );
 
125
  Uint32 subscriptionId;
 
126
  Uint32 subscriptionKey;
 
127
  Uint32 subscriptionType;
 
128
  Uint32 err;
 
129
  Uint32 senderRef;
 
130
  Uint32 senderData;
 
131
};
 
132
 
 
133
 
 
134
/**
 
135
 * @class GrepSubCreateConf
 
136
 * @brief
 
137
 */
 
138
class GrepSubCreateConf 
 
139
{
 
140
  /**
 
141
   * Sender(s)/Reciver(s)
 
142
   */
 
143
  friend class Grep;
 
144
  
 
145
  friend bool printGREP_SUB_CREATE_CONF(FILE *, 
 
146
                                        const Uint32 *, 
 
147
                                        Uint32, 
 
148
                                        Uint16);
 
149
public:
 
150
  STATIC_CONST( SignalLength = 6 );
 
151
  Uint32 subscriptionId;
 
152
  Uint32 subscriptionKey;
 
153
  Uint32 subscriptionType;
 
154
  Uint32 senderRef;
 
155
  Uint32 senderData;
 
156
  Uint32 noOfNodeGroups;
 
157
};
 
158
 
 
159
 
 
160
 
 
161
/*****************************************************************************
 
162
 * CREATE   Internal between PS DB nodes
 
163
 *****************************************************************************/
 
164
 
 
165
/**
 
166
 * @class GrepCreateReq
 
167
 * @brief
 
168
 */
 
169
class GrepCreateReq {
 
170
  /**
 
171
   * Sender(s)/Reciver(s)
 
172
   */
 
173
  friend class GrepParticipant;
 
174
  
 
175
  friend bool printGREP_CREATE_REQ(FILE *, 
 
176
                                   const Uint32 *, 
 
177
                                   Uint32, 
 
178
                                   Uint16);
 
179
public:
 
180
  STATIC_CONST( SignalLength = 8 );
 
181
 
 
182
  Uint32 senderRef;
 
183
  Uint32 senderData;
 
184
  Uint32 subscriberData;
 
185
  Uint32 subscriberRef;
 
186
  Uint32 subscriptionId;
 
187
  Uint32 subscriptionKey;
 
188
  Uint32 subscriptionType;
 
189
  SECTION( TABLE_LIST = 0 );  
 
190
};
 
191
 
 
192
 
 
193
/**
 
194
 * @class GrepCreateRef
 
195
 * @brief
 
196
 */
 
197
class GrepCreateRef {
 
198
  /**
 
199
   * Sender(s)/Reciver(s)
 
200
   */
 
201
 
 
202
  friend class GrepParticipant;  
 
203
 
 
204
  friend bool printGREP_CREATE_REF(FILE *, 
 
205
                                   const Uint32 *, 
 
206
                                   Uint32, 
 
207
                                   Uint16);
 
208
public:
 
209
  enum ErrorCode {
 
210
    NF_FakeErrorREF = GrepError::NF_FakeErrorREF
 
211
  };
 
212
  STATIC_CONST( SignalLength = 6 );
 
213
  Uint32 senderRef;
 
214
  Uint32 senderData;
 
215
  union {
 
216
    Uint32 err;
 
217
    Uint32 errorCode;
 
218
  };
 
219
  Uint32 subscriptionId;
 
220
  Uint32 subscriptionKey;
 
221
  Uint32 subscriptionType;
 
222
};
 
223
 
 
224
 
 
225
/**
 
226
 * @class GrepCreateConf
 
227
 * @brief
 
228
 */
 
229
class GrepCreateConf {
 
230
  /**
 
231
   * Sender(s)/Reciver(s)
 
232
   */
 
233
 
 
234
  friend class GrepParticipant;
 
235
  
 
236
  friend bool printGREP_CREATE_CONF(FILE *, 
 
237
                                   const Uint32 *, 
 
238
                                   Uint32, 
 
239
                                   Uint16);
 
240
public:
 
241
  STATIC_CONST( SignalLength = 6 );
 
242
  Uint32 senderNodeId;
 
243
  Uint32 senderRef;
 
244
  Uint32 senderData;
 
245
  Uint32 subscriptionId;
 
246
  Uint32 subscriptionKey;
 
247
  Uint32 subscriptionType;
 
248
};
 
249
 
 
250
 
 
251
/*****************************************************************************
 
252
 * START   Between SS and PS  (DB and REP nodes)
 
253
 *****************************************************************************/
 
254
 
 
255
/**
 
256
 * @class GrepSubStartReq
 
257
 * @brief
 
258
 */
 
259
class GrepSubStartReq {
 
260
  /**
 
261
   * Sender(s)/Reciver(s)
 
262
   */
 
263
  friend class Grep;
 
264
  
 
265
  friend bool printGREP_SUB_START_REQ(FILE *, 
 
266
                                   const Uint32 *, 
 
267
                                   Uint32, 
 
268
                                   Uint16);
 
269
public:
 
270
  STATIC_CONST( SignalLength = 5 );
 
271
  Uint32 subscriptionId;
 
272
  Uint32 subscriptionKey;
 
273
  Uint32 senderRef;
 
274
  Uint32 senderData;
 
275
  Uint32 part;
 
276
};
 
277
 
 
278
/**
 
279
 * @class GrepSubStartRef
 
280
 * @brief
 
281
 */
 
282
class GrepSubStartRef {
 
283
  /**
 
284
   * Sender(s)/Reciver(s)
 
285
   */
 
286
  friend class Grep;
 
287
  
 
288
  friend bool printGREP_SUB_START_REF(FILE *, 
 
289
                                   const Uint32 *, 
 
290
                                   Uint32, 
 
291
                                   Uint16);
 
292
public:
 
293
  STATIC_CONST( SignalLength = 6 );
 
294
  Uint32 subscriptionId;
 
295
  Uint32 subscriptionKey;
 
296
  Uint32 err;
 
297
  Uint32 senderRef;
 
298
  Uint32 senderData;
 
299
  Uint32 part;
 
300
};
 
301
 
 
302
 
 
303
 
 
304
/**
 
305
 * @class GrepSubStartConf
 
306
 * @brief
 
307
 */
 
308
class GrepSubStartConf {
 
309
  /**
 
310
   * Sender(s)/Reciver(s)
 
311
   */
 
312
  friend class Grep;
 
313
  
 
314
  friend bool printGREP_SUB_START_CONF(FILE *, 
 
315
                                       const Uint32 *, 
 
316
                                       Uint32, 
 
317
                                       Uint16);
 
318
public:
 
319
  STATIC_CONST( SignalLength = 6 );
 
320
 
 
321
  Uint32 subscriptionId;
 
322
  Uint32 subscriptionKey;
 
323
  Uint32 senderRef;
 
324
  Uint32 senderData;
 
325
  Uint32 part;
 
326
  Uint32 firstGCI;
 
327
};
 
328
 
 
329
 
 
330
/*****************************************************************************
 
331
 * START  Internal between PS DB nodes
 
332
 *****************************************************************************/
 
333
 
 
334
/**
 
335
 * @class GrepStartReq
 
336
 * @brief
 
337
 */
 
338
class GrepStartReq {
 
339
  /**
 
340
   * Sender(s)/Reciver(s)
 
341
   */
 
342
  friend class GrepParticipant;
 
343
  
 
344
  friend bool printGREP_START_REQ(FILE *, 
 
345
                                   const Uint32 *, 
 
346
                                   Uint32, 
 
347
                                   Uint16);
 
348
public:
 
349
  STATIC_CONST( SignalLength = 4 );
 
350
 
 
351
  Uint32 senderData;
 
352
  Uint32 part;
 
353
  Uint32 subscriptionId;
 
354
  Uint32 subscriptionKey;
 
355
};
 
356
 
 
357
 
 
358
/**
 
359
 * @class GrepStartRef
 
360
 * @brief
 
361
 */
 
362
class GrepStartRef {
 
363
  /**
 
364
   * Sender(s)/Reciver(s)
 
365
   */
 
366
 
 
367
  friend class GrepParticipant;  
 
368
 
 
369
  friend bool printGREP_START_REF(FILE *, 
 
370
                                  const Uint32 *, 
 
371
                                  Uint32, 
 
372
                                  Uint16);
 
373
public:
 
374
  enum ErrorCode {
 
375
    NF_FakeErrorREF = GrepError::NF_FakeErrorREF
 
376
  };
 
377
  STATIC_CONST( SignalLength = 6 );
 
378
  Uint32 senderRef;
 
379
  Uint32 senderData;
 
380
  Uint32 part;
 
381
  Uint32 subscriptionId;
 
382
  Uint32 subscriptionKey;
 
383
  union {
 
384
    Uint32 err;
 
385
    Uint32 errorCode;
 
386
  };
 
387
};
 
388
 
 
389
 
 
390
/**
 
391
 * @class GrepStartConf
 
392
 * @brief
 
393
 */
 
394
class GrepStartConf {
 
395
   /**
 
396
    * Sender(s)/Reciver(s)
 
397
    */
 
398
   
 
399
   friend class GrepParticipant;
 
400
   
 
401
   friend bool printGREP_START_CONF(FILE *, 
 
402
                                    const Uint32 *, 
 
403
                                    Uint32, 
 
404
                                    Uint16);
 
405
 public:
 
406
   STATIC_CONST( SignalLength = 7 );
 
407
   
 
408
   Uint32 senderRef;
 
409
   Uint32 senderData;
 
410
   Uint32 part;
 
411
   Uint32 subscriptionId;
 
412
   Uint32 subscriptionKey;
 
413
   Uint32 firstGCI;
 
414
   Uint32 senderNodeId;
 
415
 };
 
416
 
 
417
 
 
418
/*****************************************************************************
 
419
 * SCAN (SYNC)  Between SS and PS (REP and DB nodes)
 
420
 *****************************************************************************/
 
421
 
 
422
/**
 
423
 * @class GrepSubSyncReq
 
424
 * @brief
 
425
 */
 
426
class GrepSubSyncReq {
 
427
  /**
 
428
   * Sender(s)/Reciver(s)
 
429
   */
 
430
  friend class Grep;
 
431
  
 
432
  friend bool printGREP_SUB_SYNC_REQ(FILE *, 
 
433
                                     const Uint32 *, 
 
434
                                     Uint32, 
 
435
                                     Uint16);
 
436
public:
 
437
  STATIC_CONST( SignalLength = 5 );
 
438
  Uint32 subscriptionId;
 
439
  Uint32 subscriptionKey;
 
440
  Uint32 senderRef;
 
441
  Uint32 senderData;
 
442
  Uint32 part;
 
443
};
 
444
 
 
445
 
 
446
/**
 
447
 * @class GrepSubSyncRef
 
448
 * @brief
 
449
 */
 
450
class GrepSubSyncRef {
 
451
  /**
 
452
   * Sender(s)/Reciver(s)
 
453
   */
 
454
  friend class Grep;
 
455
  
 
456
  friend bool printGREP_SUB_SYNC_REF(FILE *, 
 
457
                                     const Uint32 *, 
 
458
                                     Uint32, 
 
459
                                     Uint16);
 
460
public:
 
461
  STATIC_CONST( SignalLength = 6 );
 
462
  Uint32 subscriptionId;
 
463
  Uint32 subscriptionKey;
 
464
  Uint32 senderRef;
 
465
  Uint32 err;
 
466
  Uint32 senderData;
 
467
  Uint32 part;
 
468
};
 
469
 
 
470
 
 
471
/**
 
472
 * @class GrepSubSyncConf
 
473
 * @brief
 
474
 */
 
475
class GrepSubSyncConf {
 
476
   /**
 
477
    * Sender(s)/Reciver(s)
 
478
   */
 
479
   friend class Grep;
 
480
   
 
481
   friend bool printGREP_SUB_SYNC_CONF(FILE *, 
 
482
                                       const Uint32 *, 
 
483
                                       Uint32, 
 
484
                                       Uint16);
 
485
 public:
 
486
   STATIC_CONST( SignalLength = 7 );
 
487
   Uint32 subscriptionId;
 
488
   Uint32 subscriptionKey;
 
489
   Uint32 senderRef;
 
490
   Uint32 senderData;
 
491
   Uint32 part;
 
492
   Uint32 firstGCI;
 
493
   Uint32 lastGCI;
 
494
};
 
495
 
 
496
 
 
497
 
 
498
/*****************************************************************************
 
499
 * SCAN (SYNC)  Internal between PS DB nodes
 
500
 *****************************************************************************/
 
501
 
 
502
/**
 
503
 * @class GrepSyncReq
 
504
 * @brief
 
505
 */
 
506
class GrepSyncReq {
 
507
  /**
 
508
   * Sender(s)/Reciver(s)
 
509
   */
 
510
  friend class GrepParticipant;
 
511
  
 
512
  friend bool printGREP_SYNC_REQ(FILE *, 
 
513
                                   const Uint32 *, 
 
514
                                   Uint32, 
 
515
                                   Uint16);
 
516
public:
 
517
  STATIC_CONST( SignalLength = 4 );
 
518
 
 
519
  Uint32 senderData;
 
520
  Uint32 part;
 
521
  Uint32 subscriptionId;
 
522
  Uint32 subscriptionKey;
 
523
};
 
524
 
 
525
 
 
526
/**
 
527
 * @class GrepSyncRef
 
528
 * @brief
 
529
 */
 
530
class GrepSyncRef {
 
531
  /**
 
532
   * Sender(s)/Reciver(s)
 
533
   */
 
534
 
 
535
  friend class GrepParticipant;  
 
536
 
 
537
  friend bool printGREP_SYNC_REF(FILE *, 
 
538
                                 const Uint32 *, 
 
539
                                 Uint32, 
 
540
                                 Uint16);
 
541
public:
 
542
  enum ErrorCode {
 
543
    NF_FakeErrorREF = GrepError::NF_FakeErrorREF
 
544
  };
 
545
  STATIC_CONST( SignalLength = 6 );
 
546
  Uint32 senderRef;
 
547
  Uint32 senderData;
 
548
  Uint32 part;
 
549
  Uint32 subscriptionId;
 
550
  Uint32 subscriptionKey;
 
551
  union {
 
552
    Uint32 err;
 
553
    Uint32 errorCode;
 
554
  };
 
555
};
 
556
 
 
557
 
 
558
/**
 
559
 * @class GrepSyncConf
 
560
 * @brief
 
561
 */
 
562
class GrepSyncConf 
 
563
{
 
564
  /**
 
565
   * Sender(s)/Reciver(s)
 
566
   */
 
567
  friend class GrepParticipant;
 
568
  
 
569
  friend bool printGREP_SYNC_CONF(FILE *, const Uint32 *, Uint32, Uint16);
 
570
 
 
571
public:
 
572
  STATIC_CONST( SignalLength = 8 );
 
573
  Uint32 senderRef;
 
574
  Uint32 senderData;
 
575
  Uint32 part;
 
576
  Uint32 subscriptionId;
 
577
  Uint32 subscriptionKey;
 
578
  Uint32 senderNodeId;
 
579
  Uint32 firstGCI;
 
580
  Uint32 lastGCI;
 
581
};
 
582
 
 
583
/*****************************************************************************
 
584
 * ABORT - remove subscription
 
585
 *****************************************************************************/
 
586
 
 
587
/**
 
588
 * @class GrepSubRemoveReq
 
589
 * @brief Between PS and SS
 
590
 */
 
591
class GrepSubRemoveReq {
 
592
  /**
 
593
   * Sender(s)/Reciver(s)
 
594
   */
 
595
  friend class Grep;
 
596
  
 
597
  friend bool printGREP_SUB_REMOVE_REQ(FILE *, const Uint32 *, 
 
598
                                       Uint32, Uint16);
 
599
public:
 
600
  STATIC_CONST( SignalLength = 4 );
 
601
 
 
602
  Uint32 senderRef;
 
603
  Uint32 senderData;
 
604
  Uint32 subscriptionId;
 
605
  Uint32 subscriptionKey;
 
606
};
 
607
 
 
608
 
 
609
/**
 
610
 * @class GrepSubRemoveRef
 
611
 * @brief Between PS and SS
 
612
 */
 
613
class GrepSubRemoveRef {
 
614
  /**
 
615
   * Sender(s)/Reciver(s)
 
616
   */
 
617
  friend class Grep;
 
618
  
 
619
  friend bool printGREP_SUB_REMOVE_REF(FILE *, const Uint32 *, 
 
620
                                       Uint32, Uint16);
 
621
public:
 
622
  STATIC_CONST( SignalLength = 5 );
 
623
 
 
624
  Uint32 senderRef;
 
625
  Uint32 senderData;
 
626
  Uint32 subscriptionId;
 
627
  Uint32 subscriptionKey;
 
628
  Uint32 err;
 
629
};
 
630
 
 
631
 
 
632
/**
 
633
 * @class 
 
634
 * @brief
 
635
 */
 
636
class GrepSubRemoveConf {
 
637
  /**
 
638
   * Sender(s)/Reciver(s)
 
639
   */
 
640
  friend class Grep;
 
641
  
 
642
  friend bool printGREP_SUB_REMOVE_CONF(FILE *, 
 
643
                                      const Uint32 *, 
 
644
                                      Uint32, 
 
645
                                      Uint16);
 
646
public:
 
647
  STATIC_CONST( SignalLength = 4 );
 
648
 
 
649
  Uint32 senderRef;
 
650
  Uint32 senderData;
 
651
  Uint32 subscriptionId;
 
652
  Uint32 subscriptionKey;
 
653
};
 
654
 
 
655
 
 
656
/**
 
657
 * @class 
 
658
 * @brief
 
659
 */
 
660
class GrepRemoveReq {
 
661
  /**
 
662
   * Sender(s)/Reciver(s)
 
663
   */
 
664
  friend class GrepParticipant;
 
665
  
 
666
  friend bool printGREP_REMOVE_REQ(FILE *, 
 
667
                                   const Uint32 *, 
 
668
                                   Uint32, 
 
669
                                   Uint16);
 
670
public:
 
671
  STATIC_CONST( SignalLength = 4 );
 
672
 
 
673
  Uint32 senderRef;
 
674
  Uint32 senderData;
 
675
  Uint32 subscriptionId;
 
676
  Uint32 subscriptionKey;
 
677
};
 
678
 
 
679
 
 
680
/**
 
681
 * @class 
 
682
 * @brief
 
683
 */
 
684
class GrepRemoveRef {
 
685
  /**
 
686
   * Sender(s)/Reciver(s)
 
687
   */
 
688
 
 
689
  friend class GrepParticipant;  
 
690
 
 
691
  friend bool printGREP_REMOVE_REF(FILE *, 
 
692
                                 const Uint32 *, 
 
693
                                 Uint32, 
 
694
                                 Uint16);
 
695
public:
 
696
  enum ErrorCode {
 
697
    NF_FakeErrorREF = GrepError::NF_FakeErrorREF
 
698
  };
 
699
  STATIC_CONST( SignalLength = 5 );
 
700
  Uint32 senderRef;
 
701
  Uint32 senderData;
 
702
  Uint32 subscriptionId;
 
703
  Uint32 subscriptionKey;
 
704
  union {
 
705
    Uint32 err;
 
706
    Uint32 errorCode;
 
707
  };
 
708
};
 
709
 
 
710
 
 
711
/**
 
712
 * @class 
 
713
 * @brief
 
714
 */
 
715
class GrepRemoveConf {
 
716
  /**
 
717
   * Sender(s)/Reciver(s)
 
718
   */
 
719
 
 
720
  friend class GrepParticipant;
 
721
  
 
722
  friend bool printGREP_REMOVE_CONF(FILE *, 
 
723
                                    const Uint32 *, 
 
724
                                    Uint32, 
 
725
                                    Uint16);
 
726
public:
 
727
  STATIC_CONST( SignalLength = 5 );
 
728
  Uint32 senderRef;
 
729
  Uint32 senderData; 
 
730
  Uint32 subscriptionId;
 
731
  Uint32 subscriptionKey;
 
732
  Uint32 senderNodeId;
 
733
};
 
734
 
 
735
 
 
736
/*****************************************************************************
 
737
 * WAIT FOR CGP
 
738
 *****************************************************************************/
 
739
 
 
740
/**
 
741
 * @class GrepWaitGcpReq
 
742
 * @brief
 
743
 */
 
744
class GrepWaitGcpReq {
 
745
  /**
 
746
   * Sender(s)/Reciver(s)
 
747
   */
 
748
 
 
749
  friend class GrepParticipant;
 
750
  
 
751
  friend bool printGREP_WAITGCP_REQ(FILE *, const Uint32 *, 
 
752
                                    Uint32, Uint16);
 
753
public:
 
754
  STATIC_CONST( SignalLength = 5 );
 
755
  
 
756
  Uint32 senderData;
 
757
  Uint32 gcp;
 
758
  Uint32 subscriptionId;
 
759
  Uint32 subscriptionKey;
 
760
  Uint32 senderNodeId;
 
761
};
 
762
 
 
763
/**
 
764
 * @class GrepWaitGcpConf
 
765
 * @brief
 
766
 */
 
767
class GrepWaitGcpConf {
 
768
  /**
 
769
   * Sender(s)/Reciver(s)
 
770
   */
 
771
 
 
772
  friend class GrepParticipant;
 
773
  
 
774
  friend bool printGREP_WAITGCP_CONF(FILE *, 
 
775
                                     const Uint32 *, 
 
776
                                     Uint32, 
 
777
                                     Uint16);
 
778
public:
 
779
  STATIC_CONST( SignalLength = 4 );
 
780
  
 
781
  Uint32 senderData;
 
782
  Uint32 subscriptionId;
 
783
  Uint32 subscriptionKey;
 
784
  Uint32 senderNodeId;
 
785
};
 
786
 
 
787
 
 
788
 
 
789
class GrepCreateSubscriptionIdConf {
 
790
  friend class Grep;
 
791
  
 
792
  friend bool printGREP_CREATE_SUBSCRIPTION_ID_CONF(FILE *, const Uint32 *, 
 
793
                                               Uint32, Uint16);
 
794
public:
 
795
  STATIC_CONST( SignalLength = 3 );
 
796
  
 
797
  Uint32 subscriptionId;
 
798
  Uint32 subscriptionKey;
 
799
  union { // Haven't decide what to call it
 
800
    Uint32 senderData;
 
801
    Uint32 subscriberData;
 
802
  };
 
803
};
 
804
 
 
805
 
 
806
 
 
807
class GrepStartMe {
 
808
  friend class Grep;  
 
809
  friend bool printGREP_START_ME(FILE *, const Uint32 *, 
 
810
                                 Uint32, Uint16);
 
811
public:
 
812
  STATIC_CONST( SignalLength = 1 );
 
813
  Uint32 senderRef;
 
814
};
 
815
 
 
816
 
 
817
 
 
818
 
 
819
/**
 
820
 * @class GrepAddSubReq
 
821
 * @brief
 
822
 */
 
823
class GrepAddSubReq {
 
824
  /**
 
825
   * Sender(s)/Reciver(s)
 
826
   */
 
827
  friend class GrepParticipant;
 
828
  
 
829
  friend bool printGREP_ADD_SUB_REQ(FILE *, 
 
830
                                    const Uint32 *, 
 
831
                                    Uint32, 
 
832
                                    Uint16);
 
833
public:
 
834
  STATIC_CONST( SignalLength = 7 );
 
835
  Uint32 senderRef;
 
836
  Uint32 senderData;
 
837
  Uint32 subscriberData;
 
838
  Uint32 subscriberRef;
 
839
  Uint32 subscriptionId;
 
840
  Uint32 subscriptionKey;
 
841
  Uint32 subscriptionType;
 
842
};
 
843
 
 
844
 
 
845
/**
 
846
 * @class GrepAddSubRef
 
847
 * @brief
 
848
 */
 
849
class GrepAddSubRef {
 
850
  /**
 
851
   * Sender(s)/Reciver(s)
 
852
   */
 
853
 
 
854
  friend class GrepParticipant;  
 
855
 
 
856
  friend bool printGREP_CREATE_REF(FILE *, 
 
857
                                   const Uint32 *, 
 
858
                                   Uint32, 
 
859
                                   Uint16);
 
860
public:
 
861
  STATIC_CONST( SignalLength = 5 );
 
862
  Uint32 senderData;
 
863
  Uint32 err;
 
864
  Uint32 subscriptionId;
 
865
  Uint32 subscriptionKey;
 
866
  Uint32 subscriptionType;
 
867
};
 
868
 
 
869
 
 
870
/**
 
871
 * @class GrepAddSubConf
 
872
 * @brief
 
873
 */
 
874
class GrepAddSubConf {
 
875
  /**
 
876
   * Sender(s)/Reciver(s)
 
877
   */
 
878
 
 
879
  friend class GrepParticipant;
 
880
  
 
881
  friend bool printGREP_CREATE_CONF(FILE *, 
 
882
                                   const Uint32 *, 
 
883
                                   Uint32, 
 
884
                                   Uint16);
 
885
public:
 
886
  STATIC_CONST( SignalLength = 1 );
 
887
  Uint32 noOfSub;
 
888
};
 
889
 
 
890
#endif