mirror of
https://github.com/QuantumLeaps/qpcpp.git
synced 2025-01-14 05:42:57 +08:00
6.9.1
This commit is contained in:
parent
2a72a4a2d8
commit
7da15c3281
@ -59,10 +59,9 @@ class DPP:
|
||||
def on_run(self):
|
||||
glb_filter("QS_USER_00")
|
||||
|
||||
# NOTE: the names of objects for loc_filter() and current_obj()
|
||||
# must match the QS Object Dictionaries produced by the application.
|
||||
# NOTE: the name of object for current_obj() must match the
|
||||
# QS Object Dictionaries produced by the application.
|
||||
current_obj(OBJ_AO, "Table::inst")
|
||||
loc_filter(OBJ_TE, "Philo::inst[0].timeEvt")
|
||||
|
||||
# turn lists into tuples for better performance
|
||||
self._philo_obj = tuple(self._philo_obj)
|
||||
|
@ -67,10 +67,9 @@ class DPP:
|
||||
def on_run(self):
|
||||
glb_filter("QS_QEP_TRAN")
|
||||
|
||||
# NOTE: the names of objects for loc_filter() and current_obj()
|
||||
# must match the QS Object Dictionaries produced by the application.
|
||||
# NOTE: the name of object for current_obj() must match the
|
||||
# QS Object Dictionaries produced by the application.
|
||||
current_obj(OBJ_AO, "Table::inst")
|
||||
loc_filter(OBJ_TE, "Philo::inst[0].m_timeEvt")
|
||||
|
||||
# turn lists into tuples for better performance
|
||||
self._philo_obj = tuple(self._philo_obj)
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
///***************************************************************************
|
||||
// Product: DPP example, EK-TM4C123GXL board, cooperative QV kernel
|
||||
// Last updated for version 6.9.1
|
||||
// Last updated on 2020-09-21
|
||||
// Last updated for version 6.9.2
|
||||
// Last updated on 2020-12-14
|
||||
//
|
||||
// Q u a n t u m L e a P s
|
||||
// ------------------------
|
||||
@ -424,6 +424,9 @@ void QS::onCommand(uint8_t cmdId, uint32_t param1,
|
||||
QS_END()
|
||||
|
||||
if (cmdId == 10U) {
|
||||
queryCurrObj(param1);
|
||||
}
|
||||
else if (cmdId == 11U) {
|
||||
assert_failed("QS_onCommand", 11);
|
||||
}
|
||||
}
|
||||
|
@ -59,10 +59,9 @@ class DPP:
|
||||
def on_run(self):
|
||||
glb_filter("QS_USER_00")
|
||||
|
||||
# NOTE: the names of objects for loc_filter() and current_obj()
|
||||
# must match the QS Object Dictionaries produced by the application.
|
||||
# NOTE: the name of object for current_obj() must match the
|
||||
# QS Object Dictionaries produced by the application.
|
||||
current_obj(OBJ_AO, "Table::inst")
|
||||
loc_filter(OBJ_TE, "Philo::inst[0].timeEvt")
|
||||
|
||||
# turn lists into tuples for better performance
|
||||
self._philo_obj = tuple(self._philo_obj)
|
||||
|
@ -67,10 +67,9 @@ class DPP:
|
||||
def on_run(self):
|
||||
glb_filter("QS_QEP_TRAN")
|
||||
|
||||
# NOTE: the names of objects for loc_filter() and current_obj()
|
||||
# must match the QS Object Dictionaries produced by the application.
|
||||
# NOTE: the name of object for current_obj() must match the
|
||||
# QS Object Dictionaries produced by the application.
|
||||
current_obj(OBJ_AO, "Table::inst")
|
||||
loc_filter(OBJ_TE, "Philo::inst[0].m_timeEvt")
|
||||
|
||||
# turn lists into tuples for better performance
|
||||
self._philo_obj = tuple(self._philo_obj)
|
||||
|
Binary file not shown.
Binary file not shown.
@ -59,10 +59,9 @@ class DPP:
|
||||
def on_run(self):
|
||||
glb_filter("QS_USER_00")
|
||||
|
||||
# NOTE: the names of objects for loc_filter() and current_obj()
|
||||
# must match the QS Object Dictionaries produced by the application.
|
||||
# NOTE: the name of object for current_obj() must match the
|
||||
# QS Object Dictionaries produced by the application.
|
||||
current_obj(OBJ_AO, "Table::inst")
|
||||
loc_filter(OBJ_TE, "Philo::inst[0].timeEvt")
|
||||
|
||||
# turn lists into tuples for better performance
|
||||
self._philo_obj = tuple(self._philo_obj)
|
||||
|
@ -67,10 +67,9 @@ class DPP:
|
||||
def on_run(self):
|
||||
glb_filter("QS_QEP_TRAN")
|
||||
|
||||
# NOTE: the names of objects for loc_filter() and current_obj()
|
||||
# must match the QS Object Dictionaries produced by the application.
|
||||
# NOTE: the name of object for current_obj() must match the
|
||||
# QS Object Dictionaries produced by the application.
|
||||
current_obj(OBJ_AO, "Table::inst")
|
||||
loc_filter(OBJ_TE, "Philo::inst[0].m_timeEvt")
|
||||
|
||||
# turn lists into tuples for better performance
|
||||
self._philo_obj = tuple(self._philo_obj)
|
||||
|
Binary file not shown.
Binary file not shown.
@ -59,10 +59,9 @@ class DPP:
|
||||
def on_run(self):
|
||||
glb_filter("QS_USER_00")
|
||||
|
||||
# NOTE: the names of objects for loc_filter() and current_obj()
|
||||
# must match the QS Object Dictionaries produced by the application.
|
||||
# NOTE: the name of object for current_obj() must match the
|
||||
# QS Object Dictionaries produced by the application.
|
||||
current_obj(OBJ_AO, "Table::inst")
|
||||
loc_filter(OBJ_TE, "Philo::inst[0].timeEvt")
|
||||
|
||||
# turn lists into tuples for better performance
|
||||
self._philo_obj = tuple(self._philo_obj)
|
||||
|
@ -67,10 +67,9 @@ class DPP:
|
||||
def on_run(self):
|
||||
glb_filter("QS_QEP_TRAN")
|
||||
|
||||
# NOTE: the names of objects for loc_filter() and current_obj()
|
||||
# must match the QS Object Dictionaries produced by the application.
|
||||
# NOTE: the name of object for current_obj() must match the
|
||||
# QS Object Dictionaries produced by the application.
|
||||
current_obj(OBJ_AO, "Table::inst")
|
||||
loc_filter(OBJ_TE, "Philo::inst[0].m_timeEvt")
|
||||
|
||||
# turn lists into tuples for better performance
|
||||
self._philo_obj = tuple(self._philo_obj)
|
||||
|
Binary file not shown.
Binary file not shown.
@ -59,10 +59,9 @@ class DPP:
|
||||
def on_run(self):
|
||||
glb_filter("QS_USER_00")
|
||||
|
||||
# NOTE: the names of objects for loc_filter() and current_obj()
|
||||
# must match the QS Object Dictionaries produced by the application.
|
||||
# NOTE: the name of object for current_obj() must match the
|
||||
# QS Object Dictionaries produced by the application.
|
||||
current_obj(OBJ_AO, "Table::inst")
|
||||
loc_filter(OBJ_TE, "Philo::inst[0].timeEvt")
|
||||
|
||||
# turn lists into tuples for better performance
|
||||
self._philo_obj = tuple(self._philo_obj)
|
||||
|
@ -67,10 +67,9 @@ class DPP:
|
||||
def on_run(self):
|
||||
glb_filter("QS_QEP_TRAN")
|
||||
|
||||
# NOTE: the names of objects for loc_filter() and current_obj()
|
||||
# must match the QS Object Dictionaries produced by the application.
|
||||
# NOTE: the name of object for current_obj() must match the
|
||||
# QS Object Dictionaries produced by the application.
|
||||
current_obj(OBJ_AO, "Table::inst")
|
||||
loc_filter(OBJ_TE, "Philo::inst[0].m_timeEvt")
|
||||
|
||||
# turn lists into tuples for better performance
|
||||
self._philo_obj = tuple(self._philo_obj)
|
||||
|
Binary file not shown.
Binary file not shown.
@ -59,10 +59,9 @@ class DPP:
|
||||
def on_run(self):
|
||||
glb_filter("QS_USER_00")
|
||||
|
||||
# NOTE: the names of objects for loc_filter() and current_obj()
|
||||
# must match the QS Object Dictionaries produced by the application.
|
||||
# NOTE: the name of object for current_obj() must match the
|
||||
# QS Object Dictionaries produced by the application.
|
||||
current_obj(OBJ_AO, "Table::inst")
|
||||
loc_filter(OBJ_TE, "Philo::inst[0].timeEvt")
|
||||
|
||||
# turn lists into tuples for better performance
|
||||
self._philo_obj = tuple(self._philo_obj)
|
||||
|
@ -67,10 +67,9 @@ class DPP:
|
||||
def on_run(self):
|
||||
glb_filter("QS_QEP_TRAN")
|
||||
|
||||
# NOTE: the names of objects for loc_filter() and current_obj()
|
||||
# must match the QS Object Dictionaries produced by the application.
|
||||
# NOTE: the name of object for current_obj() must match the
|
||||
# QS Object Dictionaries produced by the application.
|
||||
current_obj(OBJ_AO, "Table::inst")
|
||||
loc_filter(OBJ_TE, "Philo::inst[0].m_timeEvt")
|
||||
|
||||
# turn lists into tuples for better performance
|
||||
self._philo_obj = tuple(self._philo_obj)
|
||||
|
Binary file not shown.
Binary file not shown.
@ -59,10 +59,9 @@ class DPP:
|
||||
def on_run(self):
|
||||
glb_filter("QS_USER_00")
|
||||
|
||||
# NOTE: the names of objects for loc_filter() and current_obj()
|
||||
# must match the QS Object Dictionaries produced by the application.
|
||||
# NOTE: the name of object for current_obj() must match the
|
||||
# QS Object Dictionaries produced by the application.
|
||||
current_obj(OBJ_AO, "Table::inst")
|
||||
loc_filter(OBJ_TE, "Philo::inst[0].timeEvt")
|
||||
|
||||
# turn lists into tuples for better performance
|
||||
self._philo_obj = tuple(self._philo_obj)
|
||||
|
@ -67,10 +67,9 @@ class DPP:
|
||||
def on_run(self):
|
||||
glb_filter("QS_QEP_TRAN")
|
||||
|
||||
# NOTE: the names of objects for loc_filter() and current_obj()
|
||||
# must match the QS Object Dictionaries produced by the application.
|
||||
# NOTE: the name of object for current_obj() must match the
|
||||
# QS Object Dictionaries produced by the application.
|
||||
current_obj(OBJ_AO, "Table::inst")
|
||||
loc_filter(OBJ_TE, "Philo::inst[0].m_timeEvt")
|
||||
|
||||
# turn lists into tuples for better performance
|
||||
self._philo_obj = tuple(self._philo_obj)
|
||||
|
Binary file not shown.
Binary file not shown.
@ -14,7 +14,7 @@
|
||||
// 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:
|
||||
// Please submit request for extension of the evaluation period at:
|
||||
// <www.state-machine.com/licensing/#RequestForm>
|
||||
//
|
||||
//.$endhead${.::dpp.hpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -14,7 +14,7 @@
|
||||
// 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:
|
||||
// Please submit request for extension of the evaluation period at:
|
||||
// <www.state-machine.com/licensing/#RequestForm>
|
||||
//
|
||||
//.$endhead${.::philo.cpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -14,7 +14,7 @@
|
||||
// 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:
|
||||
// Please submit request for extension of the evaluation period at:
|
||||
// <www.state-machine.com/licensing/#RequestForm>
|
||||
//
|
||||
//.$endhead${.::table.cpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -14,7 +14,7 @@
|
||||
// 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:
|
||||
// Please submit request for extension of the evaluation period at:
|
||||
// <www.state-machine.com/licensing/#RequestForm>
|
||||
//
|
||||
//.$endhead${src::qmsmtst.cpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -14,7 +14,7 @@
|
||||
// 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:
|
||||
// Please submit request for extension of the evaluation period at:
|
||||
// <www.state-machine.com/licensing/#RequestForm>
|
||||
//
|
||||
//.$endhead${src::qmsmtst.hpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -14,7 +14,7 @@
|
||||
// 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:
|
||||
// Please submit request for extension of the evaluation period at:
|
||||
// <www.state-machine.com/licensing/#RequestForm>
|
||||
//
|
||||
//.$endhead${.::calc1_sub.cpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -14,7 +14,7 @@
|
||||
// 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:
|
||||
// Please submit request for extension of the evaluation period at:
|
||||
// <www.state-machine.com/licensing/#RequestForm>
|
||||
//
|
||||
//.$endhead${.::calc1_sub.hpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -14,7 +14,7 @@
|
||||
// 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:
|
||||
// Please submit request for extension of the evaluation period at:
|
||||
// <www.state-machine.com/licensing/#RequestForm>
|
||||
//
|
||||
//.$endhead${.::calc1_sub.cpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -14,7 +14,7 @@
|
||||
// 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:
|
||||
// Please submit request for extension of the evaluation period at:
|
||||
// <www.state-machine.com/licensing/#RequestForm>
|
||||
//
|
||||
//.$endhead${.::calc1_sub.hpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -66,10 +66,9 @@ class DPP:
|
||||
def on_run(self):
|
||||
glb_filter("QS_USER_00")
|
||||
|
||||
# NOTE: the names of objects for loc_filter() and current_obj()
|
||||
# must match the QS Object Dictionaries produced by the application.
|
||||
# NOTE: the name of object for current_obj() must match the
|
||||
# QS Object Dictionaries produced by the application.
|
||||
current_obj(OBJ_AO, "Table::inst")
|
||||
loc_filter(OBJ_TE, "Philo::inst[0].timeEvt")
|
||||
|
||||
# turn lists into tuples for better performance
|
||||
self._philo_obj = tuple(self._philo_obj)
|
||||
|
@ -77,10 +77,9 @@ class DPP:
|
||||
def on_run(self):
|
||||
glb_filter("QS_QEP_TRAN")
|
||||
|
||||
# NOTE: the names of objects for loc_filter() and current_obj()
|
||||
# must match the QS Object Dictionaries produced by the application.
|
||||
# NOTE: the name of object for current_obj() must match the
|
||||
# QS Object Dictionaries produced by the application.
|
||||
current_obj(OBJ_AO, "Table::inst")
|
||||
loc_filter(OBJ_TE, "Philo::inst[0].m_timeEvt")
|
||||
|
||||
# turn lists into tuples for better performance
|
||||
self._philo_obj = tuple(self._philo_obj)
|
||||
|
Binary file not shown.
Binary file not shown.
@ -14,7 +14,7 @@
|
||||
// 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:
|
||||
// Please submit request for extension of the evaluation period at:
|
||||
// <www.state-machine.com/licensing/#RequestForm>
|
||||
//
|
||||
//.$endhead${.::history.cpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -14,7 +14,7 @@
|
||||
// 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:
|
||||
// Please submit request for extension of the evaluation period at:
|
||||
// <www.state-machine.com/licensing/#RequestForm>
|
||||
//
|
||||
//.$endhead${.::history.hpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -14,7 +14,7 @@
|
||||
// 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:
|
||||
// Please submit request for extension of the evaluation period at:
|
||||
// <www.state-machine.com/licensing/#RequestForm>
|
||||
//
|
||||
//.$endhead${.::qmsmtst.cpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -14,7 +14,7 @@
|
||||
// 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:
|
||||
// Please submit request for extension of the evaluation period at:
|
||||
// <www.state-machine.com/licensing/#RequestForm>
|
||||
//
|
||||
//.$endhead${.::qmsmtst.hpp} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -3,8 +3,8 @@
|
||||
/// @ingroup qs
|
||||
/// @cond
|
||||
///***************************************************************************
|
||||
/// Last updated for version 6.9.1
|
||||
/// Last updated on 2020-09-30
|
||||
/// Last updated for version 6.9.2
|
||||
/// Last updated on 2020-12-14
|
||||
///
|
||||
/// Q u a n t u m L e a P s
|
||||
/// ------------------------
|
||||
@ -390,9 +390,15 @@ public:
|
||||
//! Obtain the number of free bytes in the QS RX data buffer
|
||||
static std::uint16_t rxGetNfree(void) noexcept;
|
||||
|
||||
//! put one byte into the QS RX lock-free buffer
|
||||
//! Put one byte into the QS RX lock-free buffer
|
||||
static void rxPut(std::uint8_t const b) noexcept;
|
||||
|
||||
//! Set the "current object" in the Target
|
||||
static void setCurrObj(std::uint8_t obj_kind, void *obj_ptr) noexcept;
|
||||
|
||||
//! Query the "current object" in the Target
|
||||
static void queryCurrObj(std::uint8_t obj_kind) noexcept;
|
||||
|
||||
// QS buffer access ......................................................
|
||||
//! Byte-oriented interface to the QS data buffer.
|
||||
static std::uint16_t getByte(void) noexcept;
|
||||
@ -1057,11 +1063,11 @@ extern std::uint8_t volatile QF_intNest;
|
||||
QP::QS::getTestProbe_(QP::QS::force_cast<void (*)(void)>(fun_));
|
||||
|
||||
//! QS macro to apply a Test-Probe
|
||||
#define QS_TEST_PROBE(code_) \
|
||||
#define QS_TEST_PROBE(code_) \
|
||||
if (qs_tp_ != 0U) { code_ }
|
||||
|
||||
//! QS macro to apply a Test-Probe
|
||||
#define QS_TEST_PROBE_ID(id_, code_) \
|
||||
#define QS_TEST_PROBE_ID(id_, code_) \
|
||||
if (qs_tp_ == static_cast<std::uint32_t>(id_)) { code_ }
|
||||
|
||||
//! QS macro to pause test execution and enter the test event loop
|
||||
|
146
src/qs/qs_rx.cpp
146
src/qs/qs_rx.cpp
@ -3,8 +3,8 @@
|
||||
/// @ingroup qs
|
||||
/// @cond
|
||||
///***************************************************************************
|
||||
/// Last updated for version 6.9.1
|
||||
/// Last updated on 2020-09-19
|
||||
/// Last updated for version 6.9.2
|
||||
/// Last updated on 2020-12-14
|
||||
///
|
||||
/// Q u a n t u m L e a P s
|
||||
/// ------------------------
|
||||
@ -295,6 +295,78 @@ std::uint16_t QS::rxGetNfree(void) noexcept {
|
||||
return nFree;
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
///
|
||||
/// @description
|
||||
/// This function programmatically sets the "current object" in the Target.
|
||||
///
|
||||
void QS::setCurrObj(std::uint8_t obj_kind, void *obj_ptr) noexcept {
|
||||
|
||||
Q_REQUIRE_ID(100, obj_kind < Q_DIM(rxPriv_.currObj));
|
||||
rxPriv_.currObj[obj_kind] = obj_ptr;
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
///
|
||||
/// @description
|
||||
/// This function programmatically generates the response to the query for
|
||||
/// a "current object".
|
||||
///
|
||||
void QS::queryCurrObj(std::uint8_t obj_kind) noexcept {
|
||||
Q_REQUIRE_ID(200, obj_kind < Q_DIM(rxPriv_.currObj));
|
||||
|
||||
if (QS::rxPriv_.currObj[obj_kind] != nullptr) {
|
||||
QS_CRIT_STAT_
|
||||
QS_CRIT_E_();
|
||||
QS::beginRec_(static_cast<std::uint_fast8_t>(QS_QUERY_DATA));
|
||||
QS_TIME_PRE_(); // timestamp
|
||||
QS_U8_PRE_(obj_kind); // object kind
|
||||
QS_OBJ_PRE_(QS::rxPriv_.currObj[obj_kind]); // object pointer
|
||||
switch (obj_kind) {
|
||||
case SM_OBJ: // intentionally fall through
|
||||
case AO_OBJ:
|
||||
QS_FUN_PRE_(
|
||||
reinterpret_cast<QHsm *>(
|
||||
QS::rxPriv_.currObj[obj_kind])->m_state.fun);
|
||||
break;
|
||||
case QS::MP_OBJ:
|
||||
QS_MPC_PRE_(reinterpret_cast<QMPool *>(
|
||||
QS::rxPriv_.currObj[obj_kind])->m_nFree);
|
||||
QS_MPC_PRE_(reinterpret_cast<QMPool *>(
|
||||
QS::rxPriv_.currObj[obj_kind])->m_nMin);
|
||||
break;
|
||||
case QS::EQ_OBJ:
|
||||
QS_EQC_PRE_(reinterpret_cast<QEQueue *>(
|
||||
QS::rxPriv_.currObj[obj_kind])->m_nFree);
|
||||
QS_EQC_PRE_(reinterpret_cast<QEQueue *>(
|
||||
QS::rxPriv_.currObj[obj_kind])->m_nMin);
|
||||
break;
|
||||
case QS::TE_OBJ:
|
||||
QS_OBJ_PRE_(reinterpret_cast<QTimeEvt *>(
|
||||
QS::rxPriv_.currObj[obj_kind])->m_act);
|
||||
QS_TEC_PRE_(reinterpret_cast<QTimeEvt *>(
|
||||
QS::rxPriv_.currObj[obj_kind])->m_ctr);
|
||||
QS_TEC_PRE_(reinterpret_cast<QTimeEvt *>(
|
||||
QS::rxPriv_.currObj[obj_kind])->m_interval);
|
||||
QS_SIG_PRE_(reinterpret_cast<QTimeEvt *>(
|
||||
QS::rxPriv_.currObj[obj_kind])->sig);
|
||||
QS_U8_PRE_ (reinterpret_cast<QTimeEvt *>(
|
||||
QS::rxPriv_.currObj[obj_kind])->refCtr_);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
QS::endRec_();
|
||||
QS_CRIT_X_();
|
||||
|
||||
QS_REC_DONE(); // user callback (if defined)
|
||||
}
|
||||
else {
|
||||
rxReportError_(static_cast<std::uint8_t>(QS_RX_AO_FILTER));
|
||||
}
|
||||
// no need to report Done
|
||||
}
|
||||
|
||||
//****************************************************************************
|
||||
void QS::rxParse(void) {
|
||||
while (rxPriv_.head != rxPriv_.tail) { // QS-RX buffer not empty?
|
||||
@ -965,14 +1037,21 @@ void QS::rxHandleGoodFrame_(std::uint8_t const state) {
|
||||
case WAIT4_OBJ_FRAME: {
|
||||
i = l_rx.var.obj.kind;
|
||||
if (i < static_cast<std::uint8_t>(QS::MAX_OBJ)) {
|
||||
if (l_rx.var.obj.recId == static_cast<std::uint8_t>(QS_RX_CURR_OBJ)) {
|
||||
rxPriv_.currObj[i] = reinterpret_cast<void *>(l_rx.var.obj.addr);
|
||||
if (l_rx.var.obj.recId
|
||||
== static_cast<std::uint8_t>(QS_RX_CURR_OBJ))
|
||||
{
|
||||
rxPriv_.currObj[i] =
|
||||
reinterpret_cast<void *>(l_rx.var.obj.addr);
|
||||
rxReportAck_(QS_RX_CURR_OBJ);
|
||||
}
|
||||
else if (l_rx.var.obj.recId == static_cast<std::uint8_t>(QS_RX_AO_FILTER)) {
|
||||
else if (l_rx.var.obj.recId
|
||||
== static_cast<std::uint8_t>(QS_RX_AO_FILTER))
|
||||
{
|
||||
if (l_rx.var.obj.addr != 0U) {
|
||||
std::int_fast16_t filter =
|
||||
static_cast<std::int_fast16_t>(reinterpret_cast<QActive *>(l_rx.var.obj.addr)->m_prio);
|
||||
static_cast<std::int_fast16_t>(
|
||||
reinterpret_cast<QActive *>(
|
||||
l_rx.var.obj.addr)->m_prio);
|
||||
locFilter_((i == 0)
|
||||
? filter
|
||||
:-filter);
|
||||
@ -988,7 +1067,9 @@ void QS::rxHandleGoodFrame_(std::uint8_t const state) {
|
||||
}
|
||||
// both SM and AO
|
||||
else if (i == static_cast<std::uint8_t>(QS::SM_AO_OBJ)) {
|
||||
if (l_rx.var.obj.recId == static_cast<std::uint8_t>(QS_RX_CURR_OBJ)) {
|
||||
if (l_rx.var.obj.recId
|
||||
== static_cast<std::uint8_t>(QS_RX_CURR_OBJ))
|
||||
{
|
||||
rxPriv_.currObj[SM_OBJ] = (void *)l_rx.var.obj.addr;
|
||||
rxPriv_.currObj[AO_OBJ] = (void *)l_rx.var.obj.addr;
|
||||
}
|
||||
@ -1001,56 +1082,7 @@ void QS::rxHandleGoodFrame_(std::uint8_t const state) {
|
||||
break;
|
||||
}
|
||||
case WAIT4_QUERY_FRAME: {
|
||||
i = l_rx.var.obj.kind;
|
||||
ptr = reinterpret_cast<std::uint8_t *>(QS::rxPriv_.currObj[i]);
|
||||
if (ptr != nullptr) {
|
||||
QS_CRIT_E_();
|
||||
QS::beginRec_(static_cast<std::uint_fast8_t>(QS_QUERY_DATA));
|
||||
QS_TIME_PRE_(); // timestamp
|
||||
QS_U8_PRE_(i); // object kind
|
||||
QS_OBJ_PRE_(ptr);
|
||||
switch (i) {
|
||||
case SM_OBJ: // intentionally fall through
|
||||
case AO_OBJ:
|
||||
QS_FUN_PRE_(
|
||||
reinterpret_cast<QHsm *>(ptr)->m_state.fun);
|
||||
break;
|
||||
case QS::MP_OBJ:
|
||||
QS_MPC_PRE_(reinterpret_cast<QMPool *>(ptr)
|
||||
->m_nFree);
|
||||
QS_MPC_PRE_(reinterpret_cast<QMPool *>(ptr)
|
||||
->m_nMin);
|
||||
break;
|
||||
case QS::EQ_OBJ:
|
||||
QS_EQC_PRE_(reinterpret_cast<QEQueue *>(ptr)
|
||||
->m_nFree);
|
||||
QS_EQC_PRE_(reinterpret_cast<QEQueue *>(ptr)
|
||||
->m_nMin);
|
||||
break;
|
||||
case QS::TE_OBJ:
|
||||
QS_OBJ_PRE_(reinterpret_cast<QTimeEvt *>(ptr)
|
||||
->m_act);
|
||||
QS_TEC_PRE_(reinterpret_cast<QTimeEvt *>(ptr)
|
||||
->m_ctr);
|
||||
QS_TEC_PRE_(reinterpret_cast<QTimeEvt *>(ptr)
|
||||
->m_interval);
|
||||
QS_SIG_PRE_(reinterpret_cast<QTimeEvt *>(ptr)
|
||||
->sig);
|
||||
QS_U8_PRE_ (reinterpret_cast<QTimeEvt *>(ptr)
|
||||
->refCtr_);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
QS::endRec_();
|
||||
QS_CRIT_X_();
|
||||
|
||||
QS_REC_DONE(); // user callback (if defined)
|
||||
}
|
||||
else {
|
||||
rxReportError_(static_cast<std::uint8_t>(QS_RX_AO_FILTER));
|
||||
}
|
||||
// no need to report Done
|
||||
queryCurrObj(l_rx.var.obj.kind);
|
||||
break;
|
||||
}
|
||||
case WAIT4_EVT_FRAME: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user