83 lines
2.8 KiB
C
Raw Normal View History

2017-11-12 21:35:04 -05:00
//$file${.::dpp.h} ###########################################################
//
2017-02-08 20:24:04 -05:00
// Model: dpp_qmsm.qm
2017-11-12 21:35:04 -05:00
// File: C:/qp_lab/qpcpp/examples/performance/dpp_efm32-slstk3401a/dpp.h
2016-07-09 12:58:13 -04:00
//
2017-11-12 21:35:04 -05:00
// This code has been generated by QM tool (https://state-machine.com/qm).
2016-07-09 12:58:13 -04:00
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
//
2017-11-12 21:35:04 -05:00
// This code is covered by the following QP license:
// License # : QPCPP-EVAL-171231
2017-02-08 20:24:04 -05:00
// Issued to : Company/individual evaluating the QP/C++ framework
// Framework(s): qpcpp
2017-11-12 21:35:04 -05:00
// Support ends: 2017-12-31
2017-02-08 20:24:04 -05:00
// Product(s) :
// This license is available only for evaluation purposes and
// the generated code is still licensed under the terms of GPL.
// Please submit request for extension of the evaluaion period at:
2017-11-12 21:35:04 -05:00
// https://state-machine.com/licensing/#RequestForm
//
//$endhead${.::dpp.h} ########################################################
2016-07-09 12:58:13 -04:00
#ifndef dpp_h
#define dpp_h
namespace DPP {
enum DPPSignals {
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
SERVE_SIG, // published by BSP to serve re-start serving forks
2016-12-01 10:31:49 -05:00
TEST_SIG, // published by BSP to test the application
2016-07-09 12:58:13 -04:00
MAX_PUB_SIG, // the last published signal
HUNGRY_SIG, // posted direclty to Table from hungry Philo
MAX_SIG // the last signal
};
} // namespace DPP
2017-11-12 21:35:04 -05:00
//$declare${Events::TableEvt} ################################################
2016-07-09 12:58:13 -04:00
namespace DPP {
//${Events::TableEvt} ........................................................
class TableEvt : public QP::QEvt {
public:
uint8_t philoNum;
};
2017-11-12 21:35:04 -05:00
} // namespace DPP//$enddecl${Events::TableEvt} ################################################
2016-07-09 12:58:13 -04:00
// number of philosophers
#define N_PHILO ((uint8_t)5)
2017-11-12 21:35:04 -05:00
//$declare${AOs::AO_Philo[N_PHILO]} ##########################################
2016-07-09 12:58:13 -04:00
namespace DPP {
2016-12-01 10:31:49 -05:00
extern QP::QActive * const AO_Philo[N_PHILO];
2016-07-09 12:58:13 -04:00
2017-11-12 21:35:04 -05:00
} // namespace DPP//$enddecl${AOs::AO_Philo[N_PHILO]} ##########################################
2016-07-09 12:58:13 -04:00
2017-11-12 21:35:04 -05:00
//$declare${AOs::AO_Table} ###################################################
2016-07-09 12:58:13 -04:00
namespace DPP {
2016-12-01 10:31:49 -05:00
extern QP::QActive * const AO_Table;
2017-11-12 21:35:04 -05:00
} // namespace DPP//$enddecl${AOs::AO_Table} ###################################################
2016-12-01 10:31:49 -05:00
#ifdef qxk_h
2017-11-12 21:35:04 -05:00
//$declare${AOs::XT_Test1} ###################################################
2016-12-01 10:31:49 -05:00
namespace DPP {
extern QP::QXThread * const XT_Test1;
2017-11-12 21:35:04 -05:00
} // namespace DPP//$enddecl${AOs::XT_Test1} ###################################################
//$declare${AOs::XT_Test2} ###################################################
2016-12-01 10:31:49 -05:00
namespace DPP {
extern QP::QXThread * const XT_Test2;
2016-07-09 12:58:13 -04:00
2017-11-12 21:35:04 -05:00
} // namespace DPP//$enddecl${AOs::XT_Test2} ###################################################
2016-12-01 10:31:49 -05:00
#endif // qxk_h
2016-07-09 12:58:13 -04:00
2017-11-12 21:35:04 -05:00
#endif // dpp_h