mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / storage / ndb / src / common / debugger / signaldata / CntrStart.cpp
blobe25de741691aab45bab87a692a20614a28f5fcd0
1 /* Copyright (c) 2004-2006 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
16 #include <signaldata/CntrStart.hpp>
18 bool
19 printCNTR_START_REQ(FILE * output, const Uint32 * theData,
20 Uint32 len, Uint16 receiverBlockNo) {
21 const CntrStartReq * const sig = (CntrStartReq *)theData;
22 fprintf(output, " nodeId: %x\n", sig->nodeId);
23 fprintf(output, " startType: %x\n", sig->startType);
24 fprintf(output, " lastGci: %x\n", sig->lastGci);
25 return true;
28 bool
29 printCNTR_START_REF(FILE * output, const Uint32 * theData,
30 Uint32 len, Uint16 receiverBlockNo) {
31 const CntrStartRef * const sig = (CntrStartRef *)theData;
32 fprintf(output, " errorCode: %x\n", sig->errorCode);
33 fprintf(output, " masterNodeId: %x\n", sig->masterNodeId);
34 return true;
37 bool
38 printCNTR_START_CONF(FILE * output, const Uint32 * theData,
39 Uint32 len, Uint16 receiverBlockNo) {
40 const CntrStartConf * const sig = (CntrStartConf *)theData;
41 fprintf(output, " startType: %x\n", sig->startType);
42 fprintf(output, " startGci: %x\n", sig->startGci);
43 fprintf(output, " masterNodeId: %x\n", sig->masterNodeId);
44 fprintf(output, " noStartNodes: %x\n", sig->noStartNodes);
46 char buf[32*NdbNodeBitmask::Size+1];
47 fprintf(output, " startedNodes: %s\n",
48 BitmaskImpl::getText(NdbNodeBitmask::Size, sig->startedNodes, buf));
49 fprintf(output, " startingNodes: %s\n",
50 BitmaskImpl::getText(NdbNodeBitmask::Size, sig->startingNodes, buf));
51 return true;