87 lines
2.7 KiB
C++
Raw Normal View History

2019-12-31 15:56:23 -05:00
//.$file${.::dpp.hpp} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2019-06-18 16:56:56 -04:00
//
// Model: dpp.qm
2019-10-27 12:26:31 -04:00
// File: ${.::dpp.hpp}
2019-06-18 16:56:56 -04:00
//
2019-12-31 15:56:23 -05:00
// This code has been generated by QM 4.6.0 <www.state-machine.com/qm/>.
2019-06-18 16:56:56 -04:00
// 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.
//
2019-12-31 15:56:23 -05:00
//.$endhead${.::dpp.hpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2019-10-27 12:26:31 -04:00
#ifndef DPP_HPP
#define DPP_HPP
2019-06-18 16:56:56 -04:00
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
TEST_SIG, // published by BSP to test the application
MAX_PUB_SIG, // the last published signal
HUNGRY_SIG, // posted direclty to Table from hungry Philo
MAX_SIG // the last signal
};
} // namespace DPP
2019-12-31 15:56:23 -05:00
//.$declare${Events::TableEvt} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2019-06-18 16:56:56 -04:00
namespace DPP {
2019-12-31 15:56:23 -05:00
//.${Events::TableEvt} .......................................................
2019-06-18 16:56:56 -04:00
class TableEvt : public QP::QEvt {
public:
uint8_t philoNum;
};
} // namespace DPP
2019-12-31 15:56:23 -05:00
//.$enddecl${Events::TableEvt} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2019-06-18 16:56:56 -04:00
// number of philosophers
2020-03-17 21:33:58 -04:00
#define N_PHILO 5U
2019-06-18 16:56:56 -04:00
2019-12-31 15:56:23 -05:00
//.$declare${AOs::AO_Philo[N_PHILO]} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2019-06-18 16:56:56 -04:00
namespace DPP {
extern QP::QActive * const AO_Philo[N_PHILO];
} // namespace DPP
2019-12-31 15:56:23 -05:00
//.$enddecl${AOs::AO_Philo[N_PHILO]} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2019-06-18 16:56:56 -04:00
2019-12-31 15:56:23 -05:00
//.$declare${AOs::AO_Table} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2019-06-18 16:56:56 -04:00
namespace DPP {
extern QP::QActive * const AO_Table;
} // namespace DPP
2019-12-31 15:56:23 -05:00
//.$enddecl${AOs::AO_Table} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2019-06-18 16:56:56 -04:00
2019-10-27 12:26:31 -04:00
#ifdef QXK_HPP
2019-12-31 15:56:23 -05:00
//.$declare${AOs::XT_Test1} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2019-06-18 16:56:56 -04:00
namespace DPP {
extern QP::QXThread * const XT_Test1;
} // namespace DPP
2019-12-31 15:56:23 -05:00
//.$enddecl${AOs::XT_Test1} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//.$declare${AOs::XT_Test2} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2019-06-18 16:56:56 -04:00
namespace DPP {
extern QP::QXThread * const XT_Test2;
} // namespace DPP
2019-12-31 15:56:23 -05:00
//.$enddecl${AOs::XT_Test2} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2019-10-27 12:26:31 -04:00
#endif // QXK_HPP
2019-06-18 16:56:56 -04:00
2019-10-27 12:26:31 -04:00
#endif // DPP_HPP