56 #include "unity_fixture.h"
58 #include "Mock_rkhqueue.h"
59 #include "Mock_rkhassert.h"
60 #include "Mock_rkhsma_prio.h"
69 static RKHROM
RKH_ROM_T base = {0, 0,
"ao"};
75 MockAssertCallback(
const char*
const file,
int line,
int cmock_num_calls)
83 Mock_rkhassert_Init();
84 Mock_rkhsma_prio_Init();
90 Mock_rkhassert_Verify();
91 Mock_rkhsma_prio_Verify();
92 Mock_rkhassert_Destroy();
93 Mock_rkhsma_prio_Destroy();
102 TEST(sync, BlockActiveObject)
108 TEST(sync, Fails_TriesBlockActiveObjectWithEmptyQueue)
110 rkh_assert_Expect(
"rkhsma_sync", 0);
111 rkh_assert_IgnoreArg_line();
112 rkh_assert_StubWithCallback(MockAssertCallback);
118 TEST(sync, SetActiveObjectReady)
124 TEST(sync, SetActiveObjectUnready)
RKHROM RKH_ROM_T * romrkh
Points to constant parameters of state machine.
void rkh_sma_setUnready(RKH_SMA_T *const me)
Informs the underlying kernel that the active object's event queue is becoming empty. Thus, the active object is removed from the ready list.
Describes the SMA (active object in UML).
RKH_EQ_TYPE equeue
Event queue of the SMA (a.k.a Active Object).
RKH_SM_T sm
State machine.
Constant parameters of state machine.
rui8_t prio
SMA (a.k.a Active Object) priority.
void rkh_sma_setReady(RKH_SMA_T *const me)
Encapsulates the mechanism of signaling the thread waiting on the used native event queue...
void rkh_sma_block(RKH_SMA_T *const me)
Encapsulates the mechanism of blocking the native event queue.
Specifies the interface of the blocking mechanism (synchro) for active object scheduling.