Solaris Software
Loading...
Searching...
No Matches
custom.c File Reference

Custom definitions for the Solaris Packet Protocol. More...

Include dependency graph for custom.c:

Go to the source code of this file.

Functions

static spp_bool_t CUSTOM_registerConsumerProducer (void)
 Register consumers and producers.
static spp_bool_t CUSTOM_initCheck (void)
static spp_bool_t guard_startInitializationOfModules (void)
static void action_emitTelemetry (void)
static void statefunction_bmpPerformanceLoop (void)
const FSM_Transition_t * CUSTOM_getFsmTable (void)
spp_uint32_t CUSTOM_getBusyTimeUs (void)
spp_uint16_t CUSTOM_getProcessedSamples (void)

Variables

static FSM_Transition_t s_transitionTable []
static FsmErrors_t s_fsmErrors = {0}
static const SPP_SERVICE_ProducerContract_t * s_p_bmpProducerContract = NULL
static spp_uint16_t s_processedSamples = 0U
static spp_uint32_t s_busyTimeUs = 0U

Detailed Description

Custom definitions for the Solaris Packet Protocol.

Definition in file custom.c.

Function Documentation

◆ CUSTOM_registerConsumerProducer()

spp_bool_t CUSTOM_registerConsumerProducer ( void )
static

Register consumers and producers.

Returns
K_SPP_OK on success.

Definition at line 171 of file custom.c.

References CUSTOM_registerConsumerProducer(), K_SPP_ERROR, K_SPP_OK, s_fsmErrors, s_p_bmpProducerContract, SPP_SERVICES_BMP390_getProducerContract(), and SPP_SERVICES_PUBSUB_registerProducer().

Referenced by CUSTOM_registerConsumerProducer(), and guard_startInitializationOfModules().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CUSTOM_initCheck()

spp_bool_t CUSTOM_initCheck ( void )
static

Definition at line 247 of file custom.c.

References CUSTOM_initCheck(), K_SPP_ERROR_NOT_INITIALIZED, K_SPP_OK, s_fsmErrors, s_p_bmpProducerContract, and SPP_SERVICES_PUBSUB_getProducerInitResult().

Referenced by CUSTOM_initCheck(), and guard_startInitializationOfModules().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ guard_startInitializationOfModules()

spp_bool_t guard_startInitializationOfModules ( void )
static

Definition at line 87 of file custom.c.

References CUSTOM_initCheck(), CUSTOM_registerConsumerProducer(), guard_startInitializationOfModules(), K_SPP_OK, and SPP_CORE_init().

Referenced by guard_startInitializationOfModules().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ action_emitTelemetry()

void action_emitTelemetry ( void )
static

Definition at line 113 of file custom.c.

References action_emitTelemetry(), CommonBitErrors_t::errors, FsmErrors_t::errors, K_SPP_KPID_FSM, K_SPP_OK, s_fsmErrors, SPP_CORE_COMMONBIT_getBit(), SPP_Packet_t, SPP_SERVICES_DATABANK_getPacket(), SPP_SERVICES_DATABANK_packetData(), and SPP_SERVICES_PUBSUB_publish().

Referenced by action_emitTelemetry().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ statefunction_bmpPerformanceLoop()

void statefunction_bmpPerformanceLoop ( void )
static

Definition at line 145 of file custom.c.

References s_busyTimeUs, s_processedSamples, SPP_HAL_TIME_getTimeUs(), SPP_SERVICES_PUBSUB_callConsumers(), SPP_SERVICES_PUBSUB_callProducers(), SPP_SERVICES_PUBSUB_queueDepth(), and statefunction_bmpPerformanceLoop().

Referenced by statefunction_bmpPerformanceLoop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CUSTOM_getFsmTable()

const FSM_Transition_t * CUSTOM_getFsmTable ( void )

Definition at line 66 of file custom.c.

References CUSTOM_getFsmTable(), and s_transitionTable.

Referenced by app_main(), and CUSTOM_getFsmTable().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CUSTOM_getBusyTimeUs()

spp_uint32_t CUSTOM_getBusyTimeUs ( void )

Definition at line 71 of file custom.c.

References CUSTOM_getBusyTimeUs(), and s_busyTimeUs.

Referenced by app_main(), and CUSTOM_getBusyTimeUs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CUSTOM_getProcessedSamples()

spp_uint16_t CUSTOM_getProcessedSamples ( void )

Definition at line 76 of file custom.c.

References CUSTOM_getProcessedSamples(), and s_processedSamples.

Referenced by app_main(), and CUSTOM_getProcessedSamples().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ s_transitionTable

FSM_Transition_t s_transitionTable[]
static
Initial value:
= {
{
.fromState = FSM_STATE_INIT,
.fromSubState = FSM_SUBSTATE_NONE,
.toState = FSM_STATE_READY,
.toSubState = FSM_SUBSTATE_NONE,
.stateFunction = NULL,
},
{
.fromState = FSM_STATE_READY,
.fromSubState = FSM_SUBSTATE_NONE,
.toState = FSM_STATE_READY,
.toSubState = FSM_SUBSTATE_NONE,
.guard = NULL,
.action = NULL,
},
}
static spp_bool_t guard_startInitializationOfModules(void)
Definition custom.c:87
static void statefunction_bmpPerformanceLoop(void)
Definition custom.c:145
static void action_emitTelemetry(void)
Definition custom.c:113
@ FSM_STATE_READY
Definition fsm.h:29
@ FSM_STATE_INIT
Definition fsm.h:28
@ FSM_SUBSTATE_NONE
Definition fsm.h:39

Definition at line 36 of file custom.c.

Referenced by CUSTOM_getFsmTable().

◆ s_fsmErrors

FsmErrors_t s_fsmErrors = {0}
static

◆ s_p_bmpProducerContract

const SPP_SERVICE_ProducerContract_t* s_p_bmpProducerContract = NULL
static

Definition at line 58 of file custom.c.

Referenced by CUSTOM_initCheck(), and CUSTOM_registerConsumerProducer().

◆ s_processedSamples

spp_uint16_t s_processedSamples = 0U
static

Definition at line 60 of file custom.c.

Referenced by CUSTOM_getProcessedSamples(), and statefunction_bmpPerformanceLoop().

◆ s_busyTimeUs

spp_uint32_t s_busyTimeUs = 0U
static

Definition at line 61 of file custom.c.

Referenced by CUSTOM_getBusyTimeUs(), and statefunction_bmpPerformanceLoop().