Index: firmware/App/Services/NVMsgQ.c =================================================================== diff -u -re17e1dc97bf8878056f1f7e4aa861c2448db52bc -r9a14f69c0f0de343b5664b20753142b50bc4e093 --- firmware/App/Services/NVMsgQ.c (.../NVMsgQ.c) (revision e17e1dc97bf8878056f1f7e4aa861c2448db52bc) +++ firmware/App/Services/NVMsgQ.c (.../NVMsgQ.c) (revision 9a14f69c0f0de343b5664b20753142b50bc4e093) @@ -31,7 +31,7 @@ // ********** private definitions ********** // Once a new calibration data is available the driver, sets a signal for the defined time. Once the time is out, it turns the signal off. -#define NEW_CAL_AVAILABLE_SIGNAL_TIMEOUT_MS (1 * MS_PER_SECOND) ///< New calibration available signal timeout in milliseconds.#define QUEUE_MAX_SIZE 20U ///< Max queue size. +#define NEW_CAL_AVAILABLE_SIGNAL_TIMEOUT_MS (1 * MS_PER_SECOND) ///< New calibration available signal timeout in milliseconds. #define QUEUE_MAX_SIZE 20U ///< Max queue size. #define QUEUE_START_INDEX 0U ///< Queue start index. #define MAX_JOB_DATA_SIZE_BYTES 32U ///< Max bytes per job (32 bytes). @@ -60,7 +60,7 @@ /// Memory operations structure. typedef struct { - NVM_OPERATION_T memoryOperation; ///< Memory operation. + NVM_OPERATION_T memoryOperation; ///< Memory operation. U32 recordFlashAddress; ///< Operation start address. U08 buffer[ MAX_JOB_DATA_SIZE_BYTES ]; ///< Buffer. U32 length; ///< Length of a buffer. @@ -89,13 +89,13 @@ static U08 recordQueueFrontIndex; ///< Record queue front index. static U08 recordQueueCount; ///< Record queue count. static PROCESS_RECORD_JOB_T recordCurrentJob; ///< Record queue current job. -static NVM_RECORDS_READ_STATUS_T recordsReadStatus; ///< NVM records read status. +static NVM_RECORDS_READ_STATUS_T recordsReadStatus; ///< NVM records read status. static BOOL isNewNVRecordAvailable; ///< Signal to indicate whether a new NVM data is available. -static NVM_RECORD_TYPE_T recordToPublish; ///< Record to publish (i.e. calibration, system) -static NVM_RECORD_TYPE_T nvPublishRecordType; +static NVM_RECORD_TYPE_T recordToPublish; ///< Record type which is being processed currently for sending +static NVM_RECORD_TYPE_T nvPublishRecordType; ///< Used to index over isPublishRecordRequested in the idle state static SEND_RECORD_STATE_T nvMExecSendRecordState; ///< NVM exec process record state. static RECEIVE_RECORD_STATE_T nvmExecReceiveRecordState; ///< NVM exec receive record state. -static NVM_RECORD_TYPE_T currentRxRecordType; +static NVM_RECORD_TYPE_T currentRxRecordType; ///< Record type which is being processed currently for receiving static BOOL isPublishRecordRequested[ NUM_OF_NVM_RECORD_TYPES ]; ///< Record state machine publish request flag. static U32 recordPublishMsgCount; ///< Record data publish message counter. static U32 recordPublishTotalMsgs; ///< Record data total number of messages to be sent. @@ -120,6 +120,22 @@ static MSG_ID_T getNVMRecordResponseMsgId (NVM_RECORD_TYPE_T job ); static void monitorNewCalSignal( void ); +/*********************************************************************//** + * @brief + * The initNVMsgQ function initializes the NV message queue and related + * state variables. It resets queue indices, counters, flags, and + * publishing states to default values. + * @details \b Inputs: none + * @details \b Outputs: recordUpdateAddress, recordQueueRearIndex, + * recordQueueFrontIndex, recordQueueCount, recordsReadStatus, + * isNewNVRecordAvailable, nvMExecSendRecordState, + * nvmExecReceiveRecordState, nvPublishRecordType, + * isPublishRecordRequested, newRecordStartTimer, + * recordPublishMsgCount, recordPublishTotalMsgs, + * recordSendDataIntervalCounter, previousRecordMessageNum, + * recordReceiveStartTime + * @return none + *************************************************************************/ void initNVMsgQ ( void ) { recordUpdateAddress = 0; @@ -148,17 +164,20 @@ recordReceiveStartTime = 0; } + /*********************************************************************//** * @brief - * The execNVMSendRecord runs the NVM send records related - * to tasks. - * @details Inputs: nvMExecSendRecordState, + * The execNVMPSendReceiveRecord function executes the NV record processing + * state machines. It handles send and receive operations and monitors + * for timeouts and calibration signals. + * @details \b Alarms: ALARM_ID_DD_SOFTWARE_FAULT if invalid send state + * @details \b Inputs: nvMExecSendRecordState, * nvmExecReceiveRecordState, recordReceiveStartTime - * @details Outputs: nvMExecSendRecordState, + * @details \b Outputs: nvMExecSendRecordState, * nvmExecReceiveRecordState * @return none *************************************************************************/ -void execNVMProcessRecord( void ) +void execNVMPSendReceiveRecord( void ) { switch ( nvMExecSendRecordState ) { @@ -197,13 +216,16 @@ /*********************************************************************//** * @brief - * The handleExecSendRecordIdleState handles the idle state of the - * exec cal state machine. - * @details Inputs: isPublishRecordRequested, recordPublishTotalMsgs, - * recordPublishMsgCount, recordSendDataIntervalCounter - * @details Outputs: isPublishRecordRequested, recordPublishTotalMsgs, - * recordPublishMsgCount, recordSendDataIntervalCounter - * @return next state of the state machine + * The handleExecSendRecordIdleState function handles the idle state of + * the exec send record state machine. It prepares record data for + * publishing when requested. + * @details \b Inputs: isPublishRecordRequested, + * nvPublishRecordType + * @details \b Outputs: isPublishRecordRequested, + * recordPublishTotalMsgs, recordPublishMsgCount, + * recordSendDataIntervalCounter, nvPublishRecordType, + * recordToPublish + * @return state next state of the state machine *************************************************************************/ static SEND_RECORD_STATE_T handleExecSendRecordIdleState( void ) { @@ -232,7 +254,7 @@ } nvPublishRecordType = ( NVM_RECORD_TYPE_T )( nvPublishRecordType + 1 ); - if(nvPublishRecordType >= NUM_OF_NVM_RECORD_TYPES) + if( nvPublishRecordType >= NUM_OF_NVM_RECORD_TYPES ) { nvPublishRecordType = NVM_SYSTEM_RECORD; } @@ -242,13 +264,15 @@ /*********************************************************************//** * @brief - * The handleExecSendRecordSendState handles the send nvm - * record state of the state machine. - * @details Inputs: dgCalibrationRecord, recordPublishTotalMsgs, - * recordPublishMsgCount, recordSendDataIntervalCounter - * @details Outputs: recordPublishTotalMsgs, recordPublishMsgCount, + * The handleExecSendRecordSendState function handles the send state of + * the exec send record state machine. It sends record data in chunks + * based on timing and message count. + * @details \b Inputs: recordPublishTotalMsgs, + * recordPublishMsgCount, recordSendDataIntervalCounter, + * recordToPublish + * @details \b Outputs: recordPublishMsgCount, * recordSendDataIntervalCounter - * @return next state of the state machine + * @return state next state of the state machine *************************************************************************/ static SEND_RECORD_STATE_T handleExecSendRecordSendState( void ) { @@ -296,11 +320,14 @@ /*********************************************************************//** * @brief - * The enqueueRecordJob function enqueues a new record job. - * @details Inputs: recordQueueRearIndex, queueCount, recordJobQueue - * @details Outputs: recordQueueRearIndex, queueCount, recordJobQueue - * @param ops: memory operation (i.e write, read) - * @param job: type of job (i.e write calibration data) + * The enqueueRecordJob function enqueues a new record job into the + * record queue. It updates the queue with the new job and advances + * the rear index. + * @details \b Inputs: recordQueueRearIndex, recordQueueCount + * @details \b Outputs: recordJobQueue, recordQueueRearIndex, + * recordQueueCount + * @param ops memory operation (i.e write, read) + * @param job type of job (i.e write calibration data) * @return none *************************************************************************/ void enqueueRecordJob( NVM_OPERATION_T ops, NVM_RECORD_TYPE_T job ) @@ -317,11 +344,13 @@ /*********************************************************************//** * @brief - * The dequeueRecordJob increments the front index counter and if it is - * equal to rear index, it sets it to -1, meaning that the queue is empty. - * @details Inputs: recordQueueFrontIndex, recordQueueCount, recordCurrentJob, + * The dequeueRecordJob function removes a record job from the queue. + * It updates the front index, retrieves the job, and updates the + * queue count. + * @details \b Inputs: recordQueueFrontIndex, recordQueueCount, * recordJobQueue - * @details Outputs: recordQueueFrontIndex, recordQueueCount, recordCurrentJob + * @details \b Outputs: recordQueueFrontIndex, recordQueueCount, + * recordCurrentJob * @return none *************************************************************************/ void dequeueRecordJob( void ) @@ -345,11 +374,11 @@ /*********************************************************************//** * @brief - * The isRecordQueueEmpty checks whether the queue is empty and if it is - * empty, it will return a false. - * @details Inputs: recordQueueCount - * @details Outputs: none - * @return TRUE if queue is not empty + * The isRecordQueueEmpty function checks whether the record queue is + * empty. It returns the status based on the queue count. + * @details \b Inputs: recordQueueCount + * @details \b Outputs: none + * @return TRUE if queue is empty otherwise FALSE *************************************************************************/ BOOL isRecordQueueEmpty( void ) { @@ -363,6 +392,14 @@ return isEmpty; } +/*********************************************************************//** + * @brief + * The isRecordQueueFull function checks whether the record queue is + * full based on the maximum queue size. + * @details \b Inputs: recordQueueCount + * @details \b Outputs: none + * @return TRUE if queue is full otherwise FALSE + *************************************************************************/ BOOL isRecordQueueFull( void ) { BOOL isFull = FALSE; @@ -377,25 +414,35 @@ /*********************************************************************//** * @brief - * The getAvailableRecordQueueCount returns the number of available record - * queues. - * @details Inputs: recordQueueCount - * @details Outputs: none + * The getAvailableRecordQueueCount function returns the number of + * available record queue slots based on the current queue count. + * @details \b Inputs: recordQueueCount + * @details \b Outputs: none * @return available record queues *************************************************************************/ + U32 getAvailableRecordQueueCount( void ) { return QUEUE_MAX_SIZE - recordQueueCount; } +/*********************************************************************//** + * @brief + * The enqueueEraseAndWriteSector function enqueues erase and write + * operations for the given record type. + * @details \b Inputs: none + * @details \b Outputs: none + * @param job Record type for which erase and write operations are scheduled + * @return TRUE if the operations were successfully enqueued otherwise FALSE + *************************************************************************/ BOOL enqueueEraseAndWriteSector( NVM_RECORD_TYPE_T job ) { BOOL status = FALSE; if ( getAvailableRecordQueueCount() >= MIN_JOBS_NEEDED_TO_WRITE_A_RECORD ) { // Service and Calibration record are stored in the same sector. - if( ( job == NVM_SERVICE_RECORD ) || ( job == NVM_CALIBRATION_RECORD ) ) + if ( ( job == NVM_SERVICE_RECORD ) || ( job == NVM_CALIBRATION_RECORD ) ) { enqueueRecordJob( NVM_OPERATION_ERASE, NVM_SERVICE_RECORD ); enqueueRecordJob( NVM_OPERATION_WRITE, NVM_SERVICE_RECORD ); @@ -413,6 +460,15 @@ return status; } +/*********************************************************************//** + * @brief + * The enqueuewriteAllRecords function enqueues erase and write + * operations for all records. It schedules jobs for all record types + * if sufficient queue space is available. + * @details \b Inputs: none + * @details \b Outputs: none + * @return TRUE if all operations were successfully enqueued otherwise FALSE + *************************************************************************/ BOOL enqueuewriteAllRecords( void ) { BOOL status = FALSE; @@ -441,10 +497,12 @@ /*********************************************************************//** * @brief - * The enqueueReadAllRecords enqueues the NV records to be read during POST. - * @details Inputs: none - * @details Outputs: recordsReadStatus - * @return none + * The enqueueReadAllRecords function enqueues all NV records to be read + * during POST. It schedules read jobs for all record types if sufficient + * queue space is available. + * @details \b Inputs: none + * @details \b Outputs: recordsReadStatus + * @return TRUE if records were successfully enqueued otherwise FALSE *************************************************************************/ BOOL enqueueReadAllRecords( void ) { @@ -469,29 +527,28 @@ /*********************************************************************//** * @brief - * The getNVRecordsReadStatus function returns the status of the NV POST. - * @details Inputs: none - * @details Outputs: none + * The getNVRecordsReadStatus function returns the current NV records + * read status of the POST process. + * @details \b Inputs: recordsReadStatus + * @details \b Outputs: none * @return recordsReadStatus *************************************************************************/ NVM_RECORDS_READ_STATUS_T getNVRecordsReadStatus( void ) { return recordsReadStatus; } - - /*********************************************************************//** * @brief - * The sendDDCalibrationRecord function sends out the DD calibration - * record. - * @details Inputs: none - * @details Outputs: DG calibration record msg constructed and queued - * @param msgId : Message Id for response record - * @param msgCurrNum: current payload number - * @param msgTotalNum: total number of payloads - * @param length: buffer length to be written - * @param recordAddress: start address of the calibration record + * The sendDDRecord function sends a DD record payload over communication. + * It prepares the payload and queues it for transmission. + * @details \b Inputs: none + * @details \b Outputs: none + * @param msgId Message Id for response record + * @param payloadCurrNum Current payload number + * @param payloadTotalNum Total number of payloads + * @param length Buffer length to be written + * @param recordAddress Start address of the record data * @return TRUE if msg successfully queued for transmit, FALSE if not *************************************************************************/ static BOOL sendDDRecord( MSG_ID_T msgId, U32 payloadCurrNum, U32 payloadTotalNum, @@ -511,6 +568,17 @@ return result; } +/*********************************************************************//** + * @brief + * The receiveDDRecord function processes a received DD record message. + * It extracts payload information and verifies the received data before + * saving it. + * @details \b Inputs: none + * @details \b Outputs: none + * @param message Pointer to received message structure + * @return TRUE if the record is successfully verified and saved, + * otherwise FALSE + *************************************************************************/ static BOOL receiveDDRecord( MESSAGE_T *message ) { BOOL status = FALSE; @@ -543,17 +611,19 @@ /*********************************************************************//** * @brief - * The verifyAndSaveReceivedRecord function receives the record that has been sent - * from Dialin and if the CRCs passed, it schedules a write to the NV data. - * @details Inputs: currentMessage, nvmExecReceiveRecordState, - * previousRecordMessageNum, totalMessages, previousRecordMessageNum, - * @details Outputs: nvmExecReceiveRecordState, recordReceiveStartTime, - * previousRecordMessageNum, recordUpdateAddress, recordUpdateAddress - * @param job: the job that has to be received and written (i.e. service record) - * @param currentMessage: current message number that is received from Dialin - * @param totalMessages: total number of messages from Dialin - * @param length: message length in bytes - * @param *addressPtr: address to the beginning of the calibration data from Dialin + * The verifyAndSaveReceivedRecord function receives the record sent + * from Dialin, assembles it, validates it using CRC, and schedules a + * write to NV memory if valid. + * @details \b Inputs: nvmExecReceiveRecordState, + * @details \b Outputs: nvmExecReceiveRecordState, + * recordReceiveStartTime, previousRecordMessageNum, + * recordUpdateAddress, currentRxRecordType, + * newRecordStartTimer, isNewNVRecordAvailable + * @param job The job that has to be received and written + * @param currentMessage Current message number received from Dialin + * @param totalMessages Total number of messages from Dialin + * @param length Message length in bytes + * @param addressPtr Address to the beginning of received data from Dialin * @return TRUE if the request was successfully registered *************************************************************************/ static BOOL verifyAndSaveReceivedRecord( NVM_RECORD_TYPE_T job, U32 currentMessage, @@ -562,17 +632,19 @@ BOOL status = TRUE; // If the calibration message number is the first message number and receive exec state is idle, switch to idle - if ( ( RECORD_DATA_FIRST_RECEIVING_MSG_NUM == currentMessage ) && ( NVM_RECEIVE_RECORD_STATE_IDLE == nvmExecReceiveRecordState ) ) + if ( ( RECORD_DATA_FIRST_RECEIVING_MSG_NUM == currentMessage ) && + ( NVM_RECEIVE_RECORD_STATE_IDLE == nvmExecReceiveRecordState ) ) { - nvmExecReceiveRecordState = NVM_RECEIVE_RECORD_STATE_RECEIVE; - currentRxRecordType = job; + nvmExecReceiveRecordState = NVM_RECEIVE_RECORD_STATE_RECEIVE; + currentRxRecordType = job; recordReceiveStartTime = getMSTimerCount(); previousRecordMessageNum = 0; recordUpdateAddress = 0; } // Check if there is still a message left to be received - if ( ( NVM_RECEIVE_RECORD_STATE_RECEIVE == nvmExecReceiveRecordState ) && ( currentMessage <= totalMessages ) ) + if ( ( NVM_RECEIVE_RECORD_STATE_RECEIVE == nvmExecReceiveRecordState ) && + ( currentMessage <= totalMessages ) ) { // Check if the current message is different from the previous message by 1 if ( RECORD_DATA_MAX_MESSAGE_DFFIRENCE == ( currentMessage - previousRecordMessageNum ) ) @@ -593,7 +665,8 @@ // and 0 everything out since we are done writing if ( currentMessage == totalMessages ) { - U16 calcCRC = crc16 ( tempRxSpec.structAddressPtr, tempRxSpec.sizeofRecord - sizeof(U16) ); + U16 calcCRC = crc16 ( tempRxSpec.structAddressPtr, + tempRxSpec.sizeofRecord - sizeof(U16) ); // Get the CRC of the structure without the last 16 bits which is the CRC as well as the padding values U16 recordCRC = *(U16*)tempRxSpec.structCRCPtr; @@ -640,11 +713,20 @@ return status; } +/*********************************************************************//** + * @brief + * The getNVMRecordJobState function maps the received message ID to + * the corresponding NV record job type. + * @details \b Inputs: none + * @details \b Outputs: none + * @param msgID Message ID received + * @return job corresponding NV record type + *************************************************************************/ static NVM_RECORD_TYPE_T getNVMRecordJobState( MSG_ID_T msgID ) { NVM_RECORD_TYPE_T job; - switch( msgID ) + switch ( msgID ) { case MSG_ID_DD_NVM_SET_CALIBRATION_RECORD: job = NVM_CALIBRATION_RECORD; @@ -667,14 +749,23 @@ break; default: - // Software Fault - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, ( U32 )msgID ) + // Do nothing for Invalid Input from Dialin break; } return job; } +/*********************************************************************//** + * @brief + * The getNVMRecordResponseMsgId function maps the NV record type to + * the corresponding response message ID. + * provided + * @details \b Inputs: none + * @details \b Outputs: none + * @param job NV record type + * @return msgID corresponding response message ID + *************************************************************************/ static MSG_ID_T getNVMRecordResponseMsgId( NVM_RECORD_TYPE_T job ) { MSG_ID_T msgID; @@ -702,8 +793,7 @@ break; default: - // Software fault - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, ( U32 )job ) + // Do nothing for Invalid Input from Dialin break; } @@ -713,60 +803,108 @@ /*********************************************************************//** * @brief * The monitorNewCalSignal function monitors the new calibration signal - * and if it on and time to on has elapsed, it turns it off. - * @details Inputs: isNewNVRecordAvailable - * @details Outputs: isNewNVRecordAvailable + * and clears it when the timeout has elapsed. + * @details \b Inputs: isNewNVRecordAvailable, + * newRecordStartTimer + * @details \b Outputs: isNewNVRecordAvailable * @return none *************************************************************************/ + static void monitorNewCalSignal( void ) { - if ( ( TRUE == didTimeout( newRecordStartTimer, NEW_CAL_AVAILABLE_SIGNAL_TIMEOUT_MS ) ) && ( TRUE == isNewNVRecordAvailable ) ) + if ( ( TRUE == didTimeout( newRecordStartTimer, NEW_CAL_AVAILABLE_SIGNAL_TIMEOUT_MS ) ) && + ( TRUE == isNewNVRecordAvailable ) ) { isNewNVRecordAvailable = FALSE; } } /*********************************************************************//** * @brief - * The isNewCalibrationRecordAvailable function returns the status of a - * new calibration availability. - * @details Inputs: none - * @details Outputs: none - * @return isNewNVRecordAvailable which is TRUE if new calibration is available, - * otherwise FALSE + * The isNewCalibrationRecordAvailable function returns the status of + * new calibration record availability. + * @details \b Inputs: isNewNVRecordAvailable + * @details \b Outputs: none + * @return isNewNVRecordAvailable which is TRUE if new calibration is + * available otherwise FALSE *************************************************************************/ BOOL isNewCalibrationRecordAvailable( void ) { return isNewNVRecordAvailable; } +/*********************************************************************//** + * @brief + * The updateNewNVRecordAvailableFlag function updates the flag + * indicating new NV record availability. + * @details \b Inputs: none + * @details \b Outputs: isNewNVRecordAvailable + * @param value Flag value to be updated + * @return none + *************************************************************************/ void updateNewNVRecordAvailableFlag( BOOL value ) { isNewNVRecordAvailable = value; } +/*********************************************************************//** + * @brief + * The updateRecordReadStatus function updates the NV records read + * status with the provided value. + * @details \b Inputs: none + * @details \b Outputs: recordsReadStatus + * @param status Record read status to be updated + * @return none + *************************************************************************/ void updateRecordReadStatus( NVM_RECORDS_READ_STATUS_T status ) { recordsReadStatus = status; } +/*********************************************************************//** + * @brief + * The updateRecordStartTimer function updates the record start timer + * with the provided value. + * @details \b Inputs: none + * @details \b Outputs: newRecordStartTimer + * @param value Timer value to be updated + * @return none + *************************************************************************/ void updateRecordStartTimer( U32 value ) { newRecordStartTimer = value; } +/*********************************************************************//** + * @brief + * The getCurrentProcessRecordJob function gets the current record job + * from the processing queue. + * @details \b Inputs: recordCurrentJob + * @details \b Outputs: none + * @return recordCurrentJob + *************************************************************************/ PROCESS_RECORD_JOB_T getCurrentProcessRecordJob ( void ) { return recordCurrentJob; } - /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/ +/*********************************************************************//** + * @brief + * The testDDGetNVRecord function processes a request to publish an NV + * record. It validates the payload and sets the publish request flag + * for the selected record. + * @details \b Inputs: nvMExecSendRecordState + * @details \b Outputs: isPublishRecordRequested, + * recordToPublish + * @param message Pointer to the received message + * @return TRUE if the request is accepted otherwise FALSE + *************************************************************************/ BOOL testDDGetNVRecord( MESSAGE_T *message ) { BOOL result = FALSE; @@ -776,21 +914,31 @@ if ( 1 == message->hdr.payloadLen ) { job = ( NVM_RECORD_TYPE_T )message->payload[ 0 ]; -// job = getNVMRecordJobState( msgID ); + // Accept the request only if the send exec is in the idle state if ( ( job < NUM_OF_NVM_RECORD_TYPES ) && ( NVM_SEND_RECORD_STATE_IDLE == nvMExecSendRecordState ) ) { isPublishRecordRequested[ job ] = TRUE; - recordToPublish = job; - result = TRUE; + recordToPublish = job; + result = TRUE; } } return result; } +/*********************************************************************//** + * @brief + * The testDDSetNVSystemRecord function processes a request to update + * the system record. It allows updates only when the system is in + * service mode. + * @details \b Inputs: none + * @details \b Outputs: none + * @param message Pointer to the received message + * @return TRUE if the record is successfully processed otherwise FALSE + *************************************************************************/ BOOL testDDSetNVSystemRecord( MESSAGE_T *message ) { BOOL result = FALSE; @@ -804,6 +952,16 @@ return result; } +/*********************************************************************//** + * @brief + * The testDDSetNVServiceRecord function processes a request to update + * the service record. It allows updates only when the system is in + * service mode. + * @details \b Inputs: none + * @details \b Outputs: none + * @param message Pointer to the received message + * @return TRUE if the record is successfully processed otherwise FALSE + *************************************************************************/ BOOL testDDSetNVServiceRecord( MESSAGE_T *message ) { BOOL result = FALSE; @@ -817,6 +975,16 @@ return result; } +/*********************************************************************//** + * @brief + * The testDDSetNVCalibrationRecord function processes a request to + * update the calibration record. It allows updates only when the + * system is in service mode. + * @details \b Inputs: none + * @details \b Outputs: none + * @param message Pointer to the received message + * @return TRUE if the record is successfully processed otherwise FALSE + *************************************************************************/ BOOL testDDSetNVCalibrationRecord( MESSAGE_T *message ) { BOOL result = FALSE; @@ -830,13 +998,31 @@ return result; } +/*********************************************************************//** + * @brief + * The testDDSetNVInstitutionalRecord function processes a request to + * update the institutional record. + * @details \b Inputs: none + * @details \b Outputs: none + * @param message Pointer to the received message + * @return TRUE if the record is successfully processed otherwise FALSE + *************************************************************************/ BOOL testDDSetNVInstitutionalRecord( MESSAGE_T *message ) { BOOL result = FALSE; result = receiveDDRecord ( message ); return result; } +/*********************************************************************//** + * @brief + * The testDDSetNVUsageInfoRecord function processes a request to + * update the usage information record. + * @details \b Inputs: none + * @details \b Outputs: none + * @param message Pointer to the received message + * @return TRUE if the record is successfully processed otherwise FALSE + *************************************************************************/ BOOL testDDSetNVUsageInfoRecord( MESSAGE_T *message ) { BOOL result = FALSE;