Quantum Leaps eed870ce9d 5.2.0
2013-12-30 17:37:40 -05:00

58 lines
1.9 KiB
C

/*****************************************************************************
* Model: dpp.qm
* File: ./dpp.h
*
* This code has been generated by QM tool (see state-machine.com/qm).
* DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
*
* This program is open source software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
* by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*****************************************************************************/
/* @(/3/0) .................................................................*/
#ifndef dpp_h
#define dpp_h
enum DPPSignals {
EAT_SIG = Q_USER_SIG, /* published by Table to let a philosopher eat */
DONE_SIG, /* published by Philosopher when done eating */
PAUSE_SIG, /* published by BSP to pause the application */
TERMINATE_SIG, /* published by BSP to terminate the application */
MAX_PUB_SIG, /* the last published signal */
HUNGRY_SIG, /* posted direclty to Table from hungry Philo */
MAX_SIG /* the last signal */
};
/* @(/1/0) .................................................................*/
typedef struct TableEvtTag {
/* protected: */
QEvt super;
/* public: */
uint8_t philoNum;
} TableEvt;
/* number of philosophers */
#define N_PHILO ((uint8_t)5)
/* @(/2/4) .................................................................*/
void Philo_ctor(void);
/* @(/2/5) .................................................................*/
void Table_ctor(void);
extern QActive * const AO_Philo[N_PHILO];
extern QActive * const AO_Table;
#endif /* dpp_h */