EventHelix.com: CASE Tools; Real-time and Embedded System Design; Object Oriented Design EventStudio 2.0: System Engineering CASE ToolEventStudio 2.5
Sequence diagram based system design and modeling
Home   What's New   EventStudio 2.5   Real-time Mantra   Thought Projects   Contact Us
Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

Hierarchical_State_Machine::Active Class Reference

Inheritance diagram for Hierarchical_State_Machine::Active:

Inheritance graph
[legend]
Collaboration diagram for Hierarchical_State_Machine::Active:

Collaboration graph
[legend]
List of all members.

Detailed Description

This state specifies that the unit is currently in the active plane.

The Active state inherits from Inservice state and further refines the Switchover and Fault Trigger handling.

Definition at line 76 of file Hierarchical_State_Machine.h.

Public Member Functions

void On_Switchover (Hierarchical_State_Machine &u, const Message *p_Message)
 Handling of switchover in the Active state.

void On_Fault_Trigger (Hierarchical_State_Machine &u, const Message *p_Message)
 The Active state overrides this handler, as it has to initiate a switchover to the standby.


Member Function Documentation

void Hierarchical_State_Machine::Active::On_Switchover Hierarchical_State_Machineu,
const Message * p_Message
[virtual]
 

Handling of switchover in the Active state.

Here the base class handler is invoked to perform most of the action. In addition to that, this method just initiates a state transition to the standby state.

Parameters:
u Reference to the state machine object
p_Message Pointer to the message being processed

Reimplemented from Hierarchical_State_Machine::Inservice.

Definition at line 101 of file Hierarchical_State_Machine.cpp.

00102 {
00103     Inservice::On_Switchover(u, p_Message);
00104     u.Next_State(u.Standby_State);
00105 }

void Hierarchical_State_Machine::Active::On_Fault_Trigger Hierarchical_State_Machineu,
const Message * p_Message
[virtual]
 

The Active state overrides this handler, as it has to initiate a switchover to the standby.

The following actions are performed:

  • Switchover is initiated to move to the standby state
  • Once the switchover has taken place, the Inservice state's handler is invoked.

This illustrates the power of hierarchical state machines. The inheriting states just need to write code to refine the base class actions. The entire base class code does not need to be repeated.

Parameters:
u Reference to the state machine object
p_Message Pointer to the message being processed

Reimplemented from Hierarchical_State_Machine::Inservice.

Definition at line 89 of file Hierarchical_State_Machine.cpp.

00090 {
00091     u.Perform_Switchover();
00092     Inservice::On_Fault_Trigger(u, p_Message);  
00093 }


The documentation for this class was generated from the following files:
Generated on Sun Feb 13 21:30:29 2005 for Object Oriented Design Examples by doxygen 1.3.4
 Home   What's New   EventStudio 2.5   Real-time Mantra   Thought Projects   Contact Us
Copyright © 2000-2005 EventHelix.com Inc. All Rights Reserved.