1
/* Copyright (C) 2003 MySQL AB
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.
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.
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 */
16
#include <signaldata/PackedSignal.hpp>
17
#include <signaldata/LqhKey.hpp>
18
#include <debugger/DebuggerNames.hpp>
21
printPACKED_SIGNAL(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo){
22
fprintf(output, "Signal data: ");
25
fprintf(output, "H\'%.8x ", theData[i++]);
27
fprintf(output, "--------- Begin Packed Signals --------\n");
28
// Print each signal separately
29
for (i = 0; i < len;) {
30
switch (PackedSignal::getSignalType(theData[i])) {
32
Uint32 signalLength = 4;
33
fprintf(output, "--------------- Signal ----------------\n");
34
fprintf(output, "r.bn: %u \"%s\", length: %u \"COMMIT\"\n",
35
receiverBlockNo, getBlockName(receiverBlockNo,""), signalLength);
36
fprintf(output, "Signal data: ");
37
for(Uint32 j = 0; j < signalLength; j++)
38
fprintf(output, "H\'%.8x ", theData[i++]);
43
Uint32 signalLength = 3;
44
fprintf(output, "--------------- Signal ----------------\n");
45
fprintf(output, "r.bn: %u \"%s\", length: %u \"COMPLETE\"\n",
46
receiverBlockNo, getBlockName(receiverBlockNo,""), signalLength);
47
fprintf(output, "Signal data: ");
48
for(Uint32 j = 0; j < signalLength; j++)
49
fprintf(output, "H\'%.8x ", theData[i++]);
54
Uint32 signalLength = 3;
55
fprintf(output, "--------------- Signal ----------------\n");
56
fprintf(output, "r.bn: %u \"%s\", length: %u \"COMMITTED\"\n",
57
receiverBlockNo, getBlockName(receiverBlockNo,""), signalLength);
58
fprintf(output, "Signal data: ");
59
for(Uint32 j = 0; j < signalLength; j++)
60
fprintf(output, "H\'%.8x ", theData[i++]);
65
Uint32 signalLength = 3;
66
fprintf(output, "--------------- Signal ----------------\n");
67
fprintf(output, "r.bn: %u \"%s\", length: %u \"COMPLETED\"\n",
68
receiverBlockNo, getBlockName(receiverBlockNo,""), signalLength);
69
fprintf(output, "Signal data: ");
70
for(Uint32 j = 0; j < signalLength; j++)
71
fprintf(output, "H\'%.8x ", theData[i++]);
76
Uint32 signalLength = LqhKeyConf::SignalLength;
78
fprintf(output, "--------------- Signal ----------------\n");
79
fprintf(output, "r.bn: %u \"%s\", length: %u \"LQHKEYCONF\"\n",
80
receiverBlockNo, getBlockName(receiverBlockNo,""), signalLength);
81
printLQHKEYCONF(output, theData + i, signalLength, receiverBlockNo);
85
case ZREMOVE_MARKER: {
86
Uint32 signalLength = 2;
87
fprintf(output, "--------------- Signal ----------------\n");
88
fprintf(output, "r.bn: %u \"%s\", length: %u \"REMOVE_MARKER\"\n",
89
receiverBlockNo, getBlockName(receiverBlockNo,""), signalLength);
90
fprintf(output, "Signal data: ");
91
i++; // Skip first word!
92
for(Uint32 j = 0; j < signalLength; j++)
93
fprintf(output, "H\'%.8x ", theData[i++]);
98
fprintf(output, "Unknown signal type\n");
99
i = len; // terminate printing
103
fprintf(output, "--------- End Packed Signals ----------\n");