1 /* Copyright (c) 2003-2005, 2007 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 Street, Fifth Floor, Boston, MA 02110-1301, USA */
20 #include <mgmapi_config_parameters.h>
30 DB
= NODE_TYPE_DB
, ///< Database node
31 API
= NODE_TYPE_API
, ///< NDB API node
32 MGM
= NODE_TYPE_MGM
, ///< Management node (incl. NDB API)
33 INVALID
= 255 ///< Invalid type
35 NodeType
getType() const;
37 Uint32 m_version
; ///< Node version
38 Uint32 m_signalVersion
; ///< Signal version
39 Uint32 m_type
; ///< Node type
40 Uint32 m_connectCount
; ///< No of times connected
41 bool m_connected
; ///< Node is connected
42 Uint32 m_heartbeat_cnt
; ///< Missed heartbeats
44 friend NdbOut
& operator<<(NdbOut
&, const NodeInfo
&);
59 NodeInfo::getType() const {
60 return (NodeType
)m_type
;
65 operator<<(NdbOut
& ndbout
, const NodeInfo
& info
){
66 ndbout
<< "[NodeInfo: ";
77 case NodeInfo::INVALID
:
81 ndbout
<< "<Unknown: " << info
.m_type
<< ">";
85 ndbout
<< " version: " << info
.m_version
86 << " sig. version; " << info
.m_signalVersion
87 << " connect count: " << info
.m_connectCount
92 struct NodeVersionInfo
94 STATIC_CONST( DataLength
= 6 );
99 } m_type
[3]; // Indexed as NodeInfo::Type