1
0
forked from me/IronOS

static state

This commit is contained in:
Ben V. Brown
2020-06-17 18:15:16 +10:00
parent 6d23617670
commit c55b91af6a
2 changed files with 3 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ uint32_t PolicyEngine::TaskBuffer[PolicyEngine::TaskStackSize];
osStaticThreadDef_t PolicyEngine::TaskControlBlock;
union pd_msg PolicyEngine::tempMessage;
union pd_msg PolicyEngine::_last_dpm_request;
PolicyEngine::policy_engine_state PolicyEngine::state = PESinkStartup;
StaticQueue_t PolicyEngine::xStaticQueue;
uint8_t PolicyEngine::ucQueueStorageArea[PDB_MSG_POOL_SIZE
* sizeof(union pd_msg)];
@@ -67,7 +68,7 @@ void PolicyEngine::pe_task(const void *arg) {
_pps_index = 8;
/* Initialize the last_pps */
_last_pps = 8;
PolicyEngine::policy_engine_state state = PESinkStartup;
for (;;) {
//Loop based on state
switch (state) {

View File

@@ -121,6 +121,7 @@ private:
static osStaticThreadDef_t TaskControlBlock;
static union pd_msg tempMessage;
static union pd_msg _last_dpm_request;
static policy_engine_state state;
//queue of up to PDB_MSG_POOL_SIZE messages to send
static StaticQueue_t xStaticQueue;
/* The array to use as the queue's storage area. This must be at least