You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When sending the TBL Validate command with a valid table name, the following error is produced:
To Reproduce
Steps to reproduce the behavior:
Compile and run the latest version of cFS with SIMULATION=native
Send a TBL Load command for any table file in the bundle (/cf/sch_lab_table.tbl is an easy one but this should work for any table). This command should be successful
Send a TBL Validate command with the table name listed out by the info event generated by the Load command and the ActiveTableFlag set to 0.
The "Too many Table Validations have been requested" error event should have been issued instead of a success event
Commanding was done using COSMOS 5, but the ground software shouldn't affect this bug. The "Too many Table Validations" error shows up in other situations, like when validating an active table or with other tables besides the SCH lab table. I was not able to get a successful table validation command regardless of configuration or command parameters. This bug is not present in the official draco-rc5 tagged version
Expected behavior
A TBL Validate command with valid parameters should issue the following event:
CFE_EVS_SendEvent(CFE_TBL_VAL_REQ_MADE_INF_EID, CFE_EVS_EventType_DEBUG,
"Tbl Services issued validation request for '%s'", TableName);
Code snips
This is the relevant block of code:
/* Find a free Validation Response Block */
PendingValId = CFE_TBL_GetNextValResultBlock();
ValResultPtr = CFE_TBL_LocateValidationResultByID(CFE_TBL_VALRESULTID_C(PendingValId));
if (ValResultPtr != NULL)
{
/* Allocate this Validation Response Block */
ValResultPtr->State = CFE_TBL_VALIDATION_PENDING;
ValResultPtr->Result = 0;
memcpy(ValResultPtr->TableName, TableName, CFE_TBL_MAX_FULL_NAME_LEN);
/* Compute the CRC on the specified table buffer */
CrcOfTable =
CFE_ES_CalculateCRC(SelectedBufferPtr->BufferPtr, RegRecPtr->Size, 0, CFE_MISSION_ES_DEFAULT_CRC);
ValResultPtr->CrcOfTable = CrcOfTable;
ValResultPtr->ActiveBuffer = (CmdPtr->ActiveTableFlag != 0);
CFE_TBL_ValidationResultSetUsed(ValResultPtr, PendingValId);
/* If owner has a validation function, then notify the */
/* table owner that there is data to be validated */
if (RegRecPtr->ValidationFuncPtr != NULL)
{
if (CmdPtr->ActiveTableFlag)
{
RegRecPtr->ValidateActiveId = CFE_TBL_ValidationResultGetId(ValResultPtr);
}
else
{
RegRecPtr->ValidateInactiveId = CFE_TBL_ValidationResultGetId(ValResultPtr);
}
/* If application requested notification by message, then do so */
if (CFE_TBL_SendNotificationMsg(RegRecPtr) == CFE_SUCCESS)
{
/* Notify ground that validation request has been made */
CFE_EVS_SendEvent(CFE_TBL_VAL_REQ_MADE_INF_EID, CFE_EVS_EventType_DEBUG,
"Tbl Services issued validation request for '%s'", TableName);
}
/* Maintain statistic on number of validation requests given to applications */
CFE_TBL_Global.NumValRequests++;
}
else
{
/* If there isn't a validation function pointer, then the process is complete */
/* By setting this value, we are letting the Housekeeping process recognize it */
/* as data to be sent to the ground in telemetry. */
ValResultPtr->State = CFE_TBL_VALIDATION_PERFORMED;
CFE_EVS_SendEvent(CFE_TBL_ASSUMED_VALID_INF_EID, CFE_EVS_EventType_INFORMATION,
"Tbl Services assumes '%s' is valid. No Validation Function has been registered",
TableName);
}
/* Increment Successful Command Counter */
ReturnCode = CFE_TBL_INC_CMD_CTR;
}
else
{
CFE_EVS_SendEvent(CFE_TBL_TOO_MANY_VALIDATIONS_ERR_EID, CFE_EVS_EventType_ERROR,
"Too many Table Validations have been requested");
}
System observed on:
Hardware: PC
OS: Ubuntu 20.04.6 LTS
Versions: The latest in the github main branches, as of today that is commit 9d70401 for the cFS bundle repo
Describe the bug
When sending the TBL Validate command with a valid table name, the following error is produced:
To Reproduce
Steps to reproduce the behavior:
Commanding was done using COSMOS 5, but the ground software shouldn't affect this bug. The "Too many Table Validations" error shows up in other situations, like when validating an active table or with other tables besides the SCH lab table. I was not able to get a successful table validation command regardless of configuration or command parameters. This bug is not present in the official draco-rc5 tagged version
Expected behavior
A TBL Validate command with valid parameters should issue the following event:
Code snips
This is the relevant block of code:
System observed on:
Reporter Info
Sara Garcia-Beech
sara.garcia-beech@nasa.gov
GSFC Code 582
Note that this bug was originally reported to the DTN dev team by Krishnan Narayanan and then investigated further by me.
The text was updated successfully, but these errors were encountered: