41 lines
1.3 KiB
C
Raw Normal View History

2012-08-14 18:00:48 -04:00
//////////////////////////////////////////////////////////////////////////////
2012-12-10 16:01:54 -05:00
// Model: dpp.qm
// File: ./dpp.h
2012-08-14 18:00:48 -04:00
//
2012-12-10 16:01:54 -05:00
// This file has been generated automatically by QP Modeler (QM).
// DO NOT EDIT THIS FILE MANUALLY.
2012-08-14 18:00:48 -04:00
//
2012-12-10 16:01:54 -05:00
// Please visit www.state-machine.com/qm for more information.
2012-08-14 18:00:48 -04:00
//////////////////////////////////////////////////////////////////////////////
#ifndef dpp_h
#define dpp_h
2012-12-10 16:01:54 -05:00
namespace DPP {
2012-08-14 18:00:48 -04:00
enum DPPSignals {
2012-12-10 16:01:54 -05:00
EAT_SIG = QP::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
2012-08-14 18:00:48 -04:00
2012-12-10 16:01:54 -05:00
HUNGRY_SIG, // posted direclty to Table from hungry Philo
MAX_SIG // the last signal
2012-08-14 18:00:48 -04:00
};
2012-12-10 16:01:54 -05:00
// @(/1/0) ...................................................................
class TableEvt : public QP::QEvt {
public:
uint8_t philoNum;
2012-08-14 18:00:48 -04:00
};
2012-12-10 16:01:54 -05:00
// number of philosophers
#define N_PHILO ((uint8_t)5)
extern QP::QActive * const AO_Philo[N_PHILO];
extern QP::QActive * const AO_Table;
2012-08-14 18:00:48 -04:00
2012-12-10 16:01:54 -05:00
} // namespace DPP
2012-08-14 18:00:48 -04:00
2012-12-10 16:01:54 -05:00
#endif // dpp_h