87 lines
2.7 KiB
C
Raw Normal View History

2019-04-16 22:11:29 -04:00
//$file${.::dpp.h} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2018-02-12 18:51:22 -05:00
//
// Model: dpp.qm
2018-02-12 18:51:22 -05:00
// File: ${.::dpp.h}
//
2019-04-16 22:11:29 -04:00
// This code has been generated by QM 4.5.0 (https://www.state-machine.com/qm).
2013-10-10 20:01:51 -04:00
// DO NOT EDIT THIS FILE MANUALLY. All your changes will be lost.
//
2013-10-10 20:01:51 -04:00
// 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.
2018-02-12 18:51:22 -05:00
//
2019-04-16 22:11:29 -04:00
//$endhead${.::dpp.h} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#ifndef dpp_h
#define dpp_h
namespace DPP {
enum DPPSignals {
EAT_SIG = QP::Q_USER_SIG, // published by Table to let a philosopher eat
2015-05-14 16:05:04 -04:00
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-09-29 19:54:50 -04:00
TEST_SIG, // published by BSP to test the application
2015-05-14 16:05:04 -04:00
MAX_PUB_SIG, // the last published signal
HUNGRY_SIG, // posted direclty to Table from hungry Philo
MAX_SIG // the last signal
};
2013-12-30 17:41:15 -05:00
} // namespace DPP
2019-04-16 22:11:29 -04:00
//$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2013-12-30 17:41:15 -05:00
namespace DPP {
2014-04-13 21:35:34 -04:00
//${Events::TableEvt} ........................................................
class TableEvt : public QP::QEvt {
public:
uint8_t philoNum;
};
2013-12-30 17:41:15 -05:00
} // namespace DPP
2019-04-16 22:11:29 -04:00
//$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// number of philosophers
#define N_PHILO ((uint8_t)5)
2019-04-16 22:11:29 -04:00
//$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2013-12-30 17:41:15 -05:00
namespace DPP {
2016-12-01 10:31:49 -05:00
extern QP::QActive * const AO_Philo[N_PHILO];
2013-10-10 20:01:51 -04:00
2013-12-30 17:41:15 -05:00
} // namespace DPP
2019-04-16 22:11:29 -04:00
//$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2013-12-30 17:41:15 -05:00
2019-04-16 22:11:29 -04:00
//$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2013-12-30 17:41:15 -05:00
namespace DPP {
2016-12-01 10:31:49 -05:00
extern QP::QActive * const AO_Table;
2013-10-10 20:01:51 -04:00
2013-12-30 17:41:15 -05:00
} // namespace DPP
2019-04-16 22:11:29 -04:00
//$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2015-12-31 14:56:37 -05:00
#ifdef qxk_h
2019-04-16 22:11:29 -04:00
//$declare${AOs::XT_Test1} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2015-12-31 14:56:37 -05:00
namespace DPP {
2016-09-29 19:54:50 -04:00
extern QP::QXThread * const XT_Test1;
} // namespace DPP
2019-04-16 22:11:29 -04:00
//$enddecl${AOs::XT_Test1} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//$declare${AOs::XT_Test2} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2016-09-29 19:54:50 -04:00
namespace DPP {
extern QP::QXThread * const XT_Test2;
2015-12-31 14:56:37 -05:00
} // namespace DPP
2019-04-16 22:11:29 -04:00
//$enddecl${AOs::XT_Test2} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2015-12-31 14:56:37 -05:00
#endif // qxk_h
2019-04-16 22:11:29 -04:00
#endif // dpp_h