/************************************************************************** * * Copyright (c) 2026-2027 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file NVMsgQ.h * * @author (original) Arpita Srivastava * @date (original) 6-Aug-2026 * ***************************************************************************/ #ifndef _NV_MSG_Q_H_ #define _NV_MSG_Q_H_ #ifdef _DD_ #include "NVRecordsDD.h" #endif /** * @defgroup NVMsgQ NVMsgQ * @brief This module manages the NV record message queue. It provides interfaces * to enqueue, dequeue, and monitor UI requests to get or set records. * * @addtogroup NVMsgQ * @{ */ // ********** public definitions ********** /// NVM Message Request Type typedef enum { NVM_MSG_GET_RECORD_REQUEST = 0, ///< Request to Get the NVM Record NVM_MSG_SET_RECORD_REQUEST, ///< Request to Set the NVM Record NUM_OF_NVM_MSG_REQUEST } NVM_MSG_REQUEST_TYPE_T; /// NVM Message Queue Structure typedef struct { NVM_MSG_REQUEST_TYPE_T requestType; ///< Type of Request Received from UI NV_DATA_T recordType; ///< Type of Record for which Request was received BOOL isIndexed; ///< TRUE if this record is indexed U32 idx; ///< Index value received with the request } NVM_MSG_REQUEST_Q_T; // ********** public function prototypes ********** void initNVMsgQ( void ); void enqueueNVMsgRequest( NVM_MSG_REQUEST_Q_T request ); void dequeueNVMsgRequest( void ); BOOL isNVMsgRequestQueueEmpty( void ); BOOL isNVMsgRequestQueueFull( void ); U32 getAvailableNVMsgRequestQueueCount( void ); NVM_MSG_REQUEST_Q_T getCurrentNVMsgRequest( void ); /**@}*/ #endif /* _NV_MSG_Q_H_ */