Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make hs_custom.h commands and EIDs public #60

Closed
3 tasks done
chillfig opened this issue Jan 5, 2023 · 0 comments · Fixed by #61
Closed
3 tasks done

Make hs_custom.h commands and EIDs public #60

chillfig opened this issue Jan 5, 2023 · 0 comments · Fixed by #61
Assignees
Milestone

Comments

@chillfig
Copy link
Contributor

chillfig commented Jan 5, 2023

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I reviewed the README file to see if the feature is in the major future work.
  • I performed a cursory search to see if the feature request is relevant, not redundant, nor in conflict with other tickets.

Is your feature request related to a problem? Please describe.
The commands and EIDs curently in hs_customs.h need to be made public.

HS/fsw/src/hs_custom.h

Lines 33 to 243 in 7afa69a

/*************************************************************************
* Constants
************************************************************************/
#define HS_UTIL_DIAG_REPORTS 4
/**
* \ingroup cfshscmdcodes
*
* Custom command codes must not conflict with those in hs_msgdefs.h
* \{
*/
/**
* \brief Report Util Diagnostics
*
* \par Description
* Reports the Utilization Diagnostics
*
* \par Command Structure
* #HS_NoArgsCmd_t
*
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
* - #HS_HkPacket_t.CmdCount will increment
* - The #HS_UTIL_DIAG_REPORT_EID informational event message will be
* generated when the command is executed
*
* \par Error Conditions
* This command may fail for the following reason(s):
* - Command packet length not as expected
*
* \par Evidence of failure may be found in the following telemetry:
* - #HS_HkPacket_t.CmdErrCount will increment
*
* \par Criticality
* None
*/
#define HS_REPORT_DIAG_CC 12
/**
* \brief Set Utilization Calibration Parameters
*
* \par Description
* Sets the Utilization Calibration Parameter
*
* \par Command Structure
* #HS_SetUtilParamsCmd_t
*
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
* - #HS_HkPacket_t.CmdCount will increment
*
* \par Error Conditions
* This command may fail for the following reason(s):
* - Command packet length not as expected
* - Any parameter is set to 0.
*
* \par Evidence of failure may be found in the following telemetry:
* - #HS_HkPacket_t.CmdErrCount will increment
*
* \par Criticality
* None
*/
#define HS_SET_UTIL_PARAMS_CC 13
/**
* \brief Set Utilization Diagnostics Parameter
*
* \par Description
* Sets the Utilization Diagnostics parameter
*
* \par Command Structure
* #HS_SetUtilDiagCmd_t
*
* \par Command Verification
* Successful execution of this command may be verified with
* the following telemetry:
* - #HS_HkPacket_t.CmdCount will increment
*
* \par Error Conditions
* This command may fail for the following reason(s):
* - Command packet length not as expected
*
* \par Evidence of failure may be found in the following telemetry:
* - #HS_HkPacket_t.CmdErrCount will increment
*
* \par Criticality
* None
*/
#define HS_SET_UTIL_DIAG_CC 14
/**\}*/
/**
* \ingroup cfshsevents
*
* Custom Event IDs must not conflict with those in hs_events.h
* \{
*/
/**
* \brief HS CPU Utilization Monitoring Create Child Task Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when CFS Health and Safety
* is unable to create its child task via the #CFE_ES_CreateChildTask
* API
*/
#define HS_CR_CHILD_TASK_ERR_EID 101
/**
* \brief HS CPU Utilization Monitoring Register Sync Callback Failed Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* This event message is issued when CFS Health and Safety
* is unable to create its sync callback via the #CFE_TIME_RegisterSynchCallback
* API
*/
#define HS_CR_SYNC_CALLBACK_ERR_EID 102
/**
* \brief HS Report Diagnostics Command Event ID
*
* \par Type: INFORMATION
*
* \par Cause:
*
* This event message is issued when CFS Health and Safety receives the #HS_REPORT_DIAG_CC command.
*/
#define HS_UTIL_DIAG_REPORT_EID 103
/**
* \brief HS Set Utilization Paramaters Command Event ID
*
* \par Type: Debug
*
* \par Cause:
*
* This event message is issued when CFS Health and Safety successfully processes the #HS_SET_UTIL_PARAMS_CC command.
*/
#define HS_SET_UTIL_PARAMS_DBG_EID 104
/**
* \brief HS Set Utilization Parameters Zero Value Event ID
*
* \par Type: Error
*
* \par Cause:
*
* This event message is issued when CFS Health and Safety fails to processes the #HS_SET_UTIL_PARAMS_CC command.
* due to a 0 as at least one of the parameters.
*/
#define HS_SET_UTIL_PARAMS_ERR_EID 105
/**
* \brief HS Set Utilization Diagnostics Command Event ID
*
* \par Type: Debug
*
* \par Cause:
*
* This event message is issued when CFS Health and Safety successfully processes the #HS_SET_UTIL_DIAG_CC command.
*/
#define HS_SET_UTIL_DIAG_DBG_EID 106
/**\}*/
/*************************************************************************
* Command Structure Definitions
************************************************************************/
/**
* \ingroup cfshscmdstructs
* \{
*/
/**
* \brief Set Utilitiliztion Parameters Command
*
* See #HS_SET_UTIL_PARAMS_CC
*/
typedef struct
{
CFE_MSG_CommandHeader_t CmdHeader; /**< \brief Command header */
int32 Mult1; /**< \brief Multiplier 1 parameter */
int32 Div; /**< \brief Divisior parameter */
int32 Mult2; /**< \brief Multiplier 2 parameter */
} HS_SetUtilParamsCmd_t;
/**
* \brief Set Utilization Diagnostics Command
*
* See #HS_SET_UTIL_DIAG_CC
*/
typedef struct
{
CFE_MSG_CommandHeader_t CmdHeader; /**< \brief Command header */
uint32 Mask; /**< \brief Utilization Diagnostics Mask */
} HS_SetUtilDiagCmd_t;
/**\}*/

Describe the solution you'd like
Make new file hs/fsw/inc/hs_custom_internal.h and move the aforementioned definitions to it.

Describe alternatives you've considered
Simply move the aforementioned definitions to fsw/inc/hs_extern_typedefs.h

Additional context
JSC needs this change to build successfully

Requester Info
Justin Figueroa, Vantage Systems

@chillfig chillfig self-assigned this Jan 5, 2023
dzbaker added a commit that referenced this issue Jan 5, 2023
Fix #60, Moves custom commands and EIDs to public interface
@dmknutsen dmknutsen added this to the Draco milestone Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants