Giter VIP home page Giter VIP logo

Comments (2)

skliper avatar skliper commented on August 17, 2024

Switched to enhancement since this is informational and only in the HK packet (not the get open files command response telemetry) and basically just means we only support reporting up to uint8 files in HK. Note the OSAL_CONFIG_MAX_NUM_OPEN_FILES parameter which is used to set OS_MAX_NUM_OPEN_FILES limits within OSAL the max number of open files which is currently defaulted to 50.

First off the tlm packet does support uint32:

FM/fsw/src/fm_msg.h

Lines 398 to 404 in 3a8d00a

typedef struct
{
CFE_MSG_TelemetryHeader_t TlmHeader; /**< \brief Telemetry Header */
uint32 NumOpenFiles; /**< \brief Number of files opened via cFE */
FM_OpenFilesEntry_t OpenFilesList[OS_MAX_NUM_OPEN_FILES]; /**< \brief List of files opened via cFE */
} FM_OpenFilesPkt_t;

OSAL has a config param defaulted to 50 for the maximum number of open files:
https://github.com/nasa/osal/blob/acb88caaf6507ff4bcae6efe56af81adba88252d/default_config.cmake#L258-L261

Logic for the command all supports uint32:

FM/fsw/src/fm_cmds.c

Lines 582 to 611 in 3a8d00a

bool FM_GetOpenFilesCmd(const CFE_SB_Buffer_t *BufPtr)
{
const char *CmdText = "Get Open Files";
bool CommandResult = false;
uint32 NumOpenFiles = 0;
/* Verify command packet length */
CommandResult =
FM_IsValidCmdPktLength(&BufPtr->Msg, sizeof(FM_GetOpenFilesCmd_t), FM_GET_OPEN_FILES_PKT_ERR_EID, CmdText);
if (CommandResult == true)
{
/* Initialize open files telemetry packet */
CFE_MSG_Init(&FM_GlobalData.OpenFilesPkt.TlmHeader.Msg, CFE_SB_ValueToMsgId(FM_OPEN_FILES_TLM_MID),
sizeof(FM_OpenFilesPkt_t));
/* Get list of open files and count */
NumOpenFiles = FM_GetOpenFilesData(FM_GlobalData.OpenFilesPkt.OpenFilesList);
FM_GlobalData.OpenFilesPkt.NumOpenFiles = NumOpenFiles;
/* Timestamp and send open files telemetry packet */
CFE_SB_TimeStampMsg(&FM_GlobalData.OpenFilesPkt.TlmHeader.Msg);
CFE_SB_TransmitMsg(&FM_GlobalData.OpenFilesPkt.TlmHeader.Msg, true);
/* Send command completion event (debug) */
CFE_EVS_SendEvent(FM_GET_OPEN_FILES_CMD_EID, CFE_EVS_EventType_DEBUG, "%s command", CmdText);
}
return (CommandResult);
} /* End of FM_GetOpenFilesCmd() */

Really the issue is in the HK packet (not the command response telemetry):

uint8 NumOpenFiles; /**< \brief Number of open files in the system */

FM_GlobalData.HousekeepingPkt.NumOpenFiles = FM_GetOpenFilesData(NULL);

from fm.

dmknutsen avatar dmknutsen commented on August 17, 2024

Agreed - that is what I was trying to communicate. Thanks for the clarification!

from fm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.