44 .stateFunction = NULL,
73 printf(
"PUBSUB REG | BMP=%u ICM=%u SD=%u SX1262=%u\n",
s_fsmErrors.bmpPubsubError,
s_fsmErrors.icmPubsubError,
76 if (pubsubOk ==
false)
112 printf(
"INIT | CORE=%d BMP=%d ICM=%d SD=%d SX1262=%d\n", (
int)ret, (
int)bmpInit, (
int)icmInit, (
int)sdInit,
135 if (p_commonBit == NULL)
199 if (p_sx1262Contract == NULL ||
208 if (producersFailed || consumersFailed)
const SPP_SERVICE_ProducerContract_t * SPP_SERVICES_BMP390_getProducerContract(void)
Returns the BMP390 producer contract for PUBSUB registration.
BMP390 barometric sensor driver and SPP producer.
CommonBitErrors_t * SPP_CORE_COMMONBIT_getBit(void)
Get the pointer to the common bit.
SPP_RetVal_t SPP_CORE_init()
Initializes the SPP core services.
SPP core initialisation and port registration API.
static FsmErrors_t s_fsmErrors
static spp_bool_t guard_startInitializationOfModules(void)
Registers producers and consumers and initializes the SPP core.
static spp_bool_t CUSTOM_registerConsumerProducer(void)
Registers the application's producers and consumers.
const FSM_Transition_t * CUSTOM_getFsmTable(void)
Returns the application-specific FSM transition table.
static FSM_Transition_t s_transitionTable[]
static void action_emitTelemetry(void)
Publishes application and core initialization error flags.
Application-specific FSM configuration and error tracking.
SPP_Packet_t * SPP_SERVICES_DATABANK_getPacket(void)
Acquire a free packet from the pool.
SPP_RetVal_t SPP_SERVICES_DATABANK_packetData(SPP_Packet_t *p_packet, spp_uint16_t apid, spp_uint16_t seq, const void *p_data, spp_uint16_t dataLen)
Fill a packet with data and compute its CRC.
Static packet pool manager.
const SPP_SERVICE_ConsumerContract_t * SPP_SERVICES_DATALOGGER_getConsumerContract(void)
Returns the datalogger consumer contract.
SD card packet logger service.
const SPP_SERVICE_ProducerContract_t * SPP_SERVICES_ICM20948_getProducerContract(void)
Returns a pointer to the ICM20948 producer contract.
ICM20948 IMU driver and SPP service.
APID bitmask assignments for every SPP producer.
SPP_RetVal_t SPP_SERVICES_PUBSUB_getConsumerInitResult(const SPP_SERVICE_ConsumerContract_t *p_consumerData, SPP_RetVal_t *p_initResult)
Retrieves the initialization result of a registered consumer.
SPP_RetVal_t SPP_SERVICES_PUBSUB_getProducerInitResult(const SPP_SERVICE_ProducerContract_t *p_producerData, SPP_RetVal_t *p_initResult)
Retrieves the initialization result of a registered producer.
SPP_RetVal_t SPP_SERVICES_PUBSUB_registerProducer(const SPP_SERVICE_ProducerContract_t *p_producerData, SPP_Kpid_t *p_assignedKpid)
Registers a producer and assigns it a unique KPID.
SPP_RetVal_t SPP_SERVICES_PUBSUB_publish(SPP_Packet_t *p_pkt)
Copies a packet into the internal buffer and returns it to the databank.
SPP_RetVal_t SPP_SERVICES_PUBSUB_registerConsumer(const SPP_SERVICE_ConsumerContract_t *p_consumerData, SPP_Kpid_t subscription)
Publish-subscribe packet router.
SPP_RetVal_t
Unified return type for all SPP API functions.
SPP module descriptor and registry API.
A single row in the FSM transition table.
Describes the contract of a consumer module. This module needs to have:
Defines the callbacks and metadata of an SPP producer.
const SPP_SERVICE_ConsumerContract_t * SPP_SERVICES_SX1262_getConsumerContract(void)
Returns the SX1262 consumer contract for PUBSUB registration.
SX1262 LoRa telemetry consumer interface and configuration.