/*
 * (c) Your Company, 2011
 *
 * All rights reserved. Reproduction, modification,
 * use or disclosure to third parties without express
 * authority is forbidden.
 */

/* Command line options: -p CADIFRA -l cppx -o oven first_example_step3.cdd   */
/* This file is generated from first_example_step3.cdd - do not edit manually  */
/* Generated on: Sat Oct 29 16:49:01 CEST 2011 / version 2.5 */


#ifndef __OVEN_H__
#define __OVEN_H__

#include "oven_ext.h"
class oven
{
	public:
		oven(void);

		int processEvent(OVEN_EVENT_T msg);

		void initialize();

		// Helper(s) to reset history
		void resetHistorySuper(void);

		// Helper(s) to find out if the machine is in a certain state
		int isInSuper(void) const;
		int isInCompleted(void) const;
		int isInCookingPause(void) const;
		int isInIdle(void) const;
		int isInCooking(void) const;

		// Returns the state name as string
		const char* getNameByState(unsigned short state) const;

		// Returns the event as string
		const char* getNameByEvent(OVEN_EVENT_T evt) const;

		enum States{
			Super,
			Completed,
			CookingPause,
			Idle,
			Cooking,
			NUM_STATES  // number of states in the machine
		};

	private:
		int m_initialized;



	protected:
		// State variables
		States stateVar;
		States stateVarSuper;
};

#endif // __OVEN_H__

