~vlad-lesin/percona-server/mysql-5.0.33-original

« back to all changes in this revision

Viewing changes to ndb/include/kernel/signaldata/GrepImpl.hpp

  • Committer: Vlad Lesin
  • Date: 2012-07-31 09:21:34 UTC
  • Revision ID: vladislav.lesin@percona.com-20120731092134-zfodx022b7992wsi
VirginĀ 5.0.33

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