18 #ifndef NODE_STATE_HPP
19 #define NODE_STATE_HPP
22 #include <NodeBitmask.hpp>
95 ST_SYSTEM_RESTART = 1,
97 ST_INITIAL_NODE_RESTART = 3,
138 Uint32 systemShutdown;
145 Uint32 singleUserMode;
146 Uint32 singleUserApi;
150 void setDynamicId(Uint32 dynamic);
151 void setNodeGroup(Uint32
group);
152 void setSingleUser(Uint32 s);
153 void setSingleUserApi(Uint32
n);
196 NodeState::NodeState(){
205 dynamicId = 0xFFFFFFFF;
207 singleUserApi = 0xFFFFFFFF;
208 m_connected_nodes.
clear();
212 NodeState::NodeState(StartLevel sl){
216 singleUserApi = 0xFFFFFFFF;
220 NodeState::NodeState(StartLevel sl, Uint32 sp, StartType typeOfStart){
223 starting.startPhase = sp;
224 starting.restartType = typeOfStart;
226 singleUserApi = 0xFFFFFFFF;
230 NodeState::NodeState(StartLevel sl,
bool sys){
233 stopping.systemShutdown = sys;
235 singleUserApi = 0xFFFFFFFF;
239 void NodeStatePOD::setDynamicId(Uint32 dynamic){
244 void NodeStatePOD::setNodeGroup(Uint32
group){
249 void NodeStatePOD::setSingleUser(Uint32 s) {
254 void NodeStatePOD::setSingleUserApi(Uint32
n) {
260 (starting.restartType == ST_NODE_RESTART ||
261 starting.restartType == ST_INITIAL_NODE_RESTART);
266 return singleUserMode;
271 return singleUserApi;
282 ndbout <<
"[NodeState: startLevel: ";
285 ndbout <<
"<NOTHING> ]";
288 ndbout <<
"<CMVMI> ]";
291 ndbout <<
"<STARTING type: ";
292 switch(state.starting.restartType){
293 case NodeState::ST_INITIAL_START:
294 ndbout <<
" INITIAL START";
296 case NodeState::ST_SYSTEM_RESTART:
297 ndbout <<
" SYSTEM RESTART ";
299 case NodeState::ST_NODE_RESTART:
300 ndbout <<
" NODE RESTART ";
302 case NodeState::ST_INITIAL_NODE_RESTART:
303 ndbout <<
" INITIAL NODE RESTART ";
305 case NodeState::ST_ILLEGAL_TYPE:
307 ndbout <<
" UNKNOWN " << state.starting.restartType;
309 ndbout <<
" phase: " << state.starting.startPhase <<
"> ]";
312 ndbout <<
"<STARTED> ]";
315 ndbout <<
"<STOPPING 1 sys: " << state.stopping.systemShutdown <<
"> ]";
318 ndbout <<
"<STOPPING 2 sys: " << state.stopping.systemShutdown <<
"> ]";
321 ndbout <<
"<STOPPING 3 sys: " << state.stopping.systemShutdown <<
"> ]";
324 ndbout <<
"<STOPPING 4 sys: " << state.stopping.systemShutdown <<
"> ]";
327 ndbout <<
"<UNKNOWN " << state.
startLevel <<
"> ]";
338 dynamicId = ns.dynamicId;
340 starting.startPhase = ns.starting.startPhase;
341 starting.restartType = ns.starting.restartType;
344 stopping.alarmTime = ns.stopping.alarmTime;
345 singleUserMode = ns.singleUserMode;
346 singleUserApi = ns.singleUserApi;
347 m_connected_nodes.
assign(ns.m_connected_nodes);