Skip to content

Commit 1ecd8b4

Browse files
authored
Merge pull request #1610 from skliper/fix1306-es_rid_comments
Fix #1306, ES/ResourceID documentation cleanup
2 parents 7522ce6 + 542e451 commit 1ecd8b4

File tree

8 files changed

+38
-33
lines changed

8 files changed

+38
-33
lines changed

cmake/global_functions.cmake

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ endfunction(generate_c_headerfile)
6565
# source file for the wrapper.
6666
#
6767
# This function now accepts named parameters:
68+
# OUTPUT_DIRECTORY - non-default directory to write the file to (optional)
6869
# FILE_NAME - the name of the file to write
6970
# FALLBACK_FILE - if no files are found in "defs" using the name match, this file will be used instead.
7071
# MATCH_SUFFIX - the suffix to match in the "defs" directory (optional)
@@ -130,18 +131,24 @@ endfunction(generate_config_includefile)
130131
# FUNCTION: read_targetconfig
131132
#
132133
# Scan the list of targets and organize by target system type.
133-
# This function sets up the following variables in the global scope:
134+
#
135+
# If the historical TGT<x> variables are defined, they are translated to name
136+
# based list of MISSION_CPUNAMES (from TGT<x>_NAMEs). The historical settings
137+
# are then translated to the new cpuname based settings as defined in the
138+
# sample_defs/targets.cmake and sets them as global scope.
139+
#
140+
# This function then sets up the following variables in the global scope:
134141
# TGTSYS_LIST: list of CPU architectures used in the build. Note this
135142
# will always contain a "native" target (for tools at least) which
136143
# is forced to be last.
137-
# MISSION_APPS: full list of applications specified in the whole mission
138-
# SYSID_<arch>: set for each entry of TGTSYS_LIST, and indicates the
139-
# toolchain specified in the target file for that CPU arch.
140-
# TGTSYS_<arch>: set to a list of CPU numbers that utilize the same arch
141-
# TGTSYS_<arch>_APPS: set for each entry of TGTSYS_LIST, and indicates the
142-
# full set of applications that need to built for that target architecture
143-
# TGTSYS_<arch>_DRIVERS: set for each entry of TGTSYS_LIST, and indicates the
144-
# full set of device drivers that need to built for that target architecture
144+
# MISSION_APPS: list of all applications in this build
145+
# MISSION_PSPMODULES: list of all psp modules in this build
146+
#
147+
# Additionally for each architechture in TGTSYS_LIST:
148+
# TGTSYS_<arch>: list of CPU names that utilize the same architecture
149+
# TGTSYS_<arch>_APPS: list of apps for the architecture
150+
# TGTSYS_<arch>_STATICAPPS: list of static apps for the architecture
151+
# TGTSYS_<arch>_PSPMODULES: list of psp modules for the architecture
145152
#
146153
function(read_targetconfig)
147154

cmake/sample_defs/targets.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#
1111
# MISSION_CPUNAMES : list of user-friendly cpu names. Should be simple
1212
# words with no punctuation. This MUST be specified.
13+
# <cpuname>_PROCESSORID : numerical identifier for the processor
1314
# <cpuname>_APPLIST : list of applications to build and install on the CPU.
1415
# These are built as dynamically-loaded applications and installed
1516
# as files in the non-volatile storage of the target, and loaded

cmake/target/src/target_config.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ extern const char CFE_MISSION_NAME[]; /**< Name of CFE mission */
6767
extern const char CFE_MISSION_CONFIG[]; /**< Configuration name used for build */
6868

6969
/**
70-
* A list of modules which are statically linked into CFE core.
70+
* A NULL terminated list of modules which are statically linked into CFE core,
71+
* generated by the build system from MISSION_CORE_MODULES.
7172
*
7273
* For module names which appear in this list, the code is directly
7374
* linked into the core executable binary file, and therefore means
@@ -80,7 +81,8 @@ extern const char CFE_MISSION_CONFIG[]; /**< Configuration name used for build *
8081
extern CFE_ConfigName_t CFE_CORE_MODULE_LIST[];
8182

8283
/**
83-
* A list of CFS apps which are also statically linked with this binary.
84+
* A NULL terminated list of CFS apps which are also statically linked with this binary,
85+
* generated by the build system from the target STATIC_APPLIST.
8486
*
8587
* These apps can be started without dynamically loading any modules,
8688
* however the entry point must be separately provided in order to avoid
@@ -89,8 +91,8 @@ extern CFE_ConfigName_t CFE_CORE_MODULE_LIST[];
8991
extern CFE_ConfigName_t CFE_STATIC_APP_LIST[];
9092

9193
/**
92-
* A key-value table containing certain environment information from the build system
93-
* at the time CFE core was built.
94+
* A NULL terminated key-value table containing certain environment information
95+
* from the build system at the time CFE core was built.
9496
*
9597
* This contains basic information such as the time of day, build host, and user.
9698
*/
@@ -99,8 +101,8 @@ extern CFE_ConfigKeyValue_t CFE_BUILD_ENV_TABLE[];
99101
/**
100102
* Version control (source code) versions of all modules
101103
*
102-
* This list includes all modules known to the build system as determined by the
103-
* version control system in use (e.g. git). It is generated by a post-build step
104+
* This NULL terminated list includes all modules known to the build system as determined
105+
* by the version control system in use (e.g. git). It is generated by a post-build step
104106
* to query version control and should change automatically every time code is
105107
* checked in or out.
106108
*
@@ -118,7 +120,8 @@ extern CFE_ConfigKeyValue_t CFE_BUILD_ENV_TABLE[];
118120
extern CFE_ConfigKeyValue_t CFE_MODULE_VERSION_TABLE[];
119121

120122
/**
121-
* A list of PSP modules included in this build of CFE core.
123+
* A NULL terminated list of PSP modules included in this build of CFE core,
124+
* generated by the build system from the target PSPMODULES.
122125
*
123126
* These are always statically linked, and this table contains a pointer
124127
* to its API structure, which in turn contains its entry point.

modules/core_api/fsw/inc/cfe_es.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,14 +389,13 @@ bool CFE_ES_RunLoop(uint32 *RunStatus);
389389
** to satisfy the global system state it is waiting for, and the apps own
390390
** state will be updated accordingly.
391391
**
392+
** \param[in] MinSystemState Determine the state of the App
392393
** \param[in] TimeOutMilliseconds The timeout value in Milliseconds.
393394
** This parameter must be at least 1000. Lower values
394395
** will be rounded up. There is not an option to
395396
** wait indefinitely to avoid hanging a critical
396397
** application because a non-critical app did not start.
397398
**
398-
** \param[in] MinSystemState Determine the state of the App
399-
**
400399
** \return Execution status, see \ref CFEReturnCodes
401400
** \retval #CFE_SUCCESS State successfully achieved
402401
** \retval #CFE_ES_OPERATION_TIMED_OUT Timeout was reached
@@ -796,8 +795,7 @@ int32 CFE_ES_GetModuleInfo(CFE_ES_AppInfo_t *ModuleInfo, CFE_ResourceId_t Resour
796795
** \param[in] StackSize The number of bytes to allocate for the new task's stack.
797796
**
798797
** \param[in] Priority The priority for the new task. Lower numbers are higher priority, with 0 being
799-
** the highest priority. Applications cannot create tasks with a higher priority
800-
** (lower number) than their own priority.
798+
** the highest priority.
801799
**
802800
** \param[in] Flags Reserved for future expansion.
803801
**
@@ -1493,7 +1491,8 @@ void CFE_ES_PerfLogAdd(uint32 Marker, uint32 EntryExit);
14931491
** \brief Register a generic counter
14941492
**
14951493
** \par Description
1496-
** This routine registers a generic counter.
1494+
** This routine registers a generic thread-safe counter which
1495+
** can be used for inter-task management.
14971496
**
14981497
** \par Assumptions, External Events, and Notes:
14991498
** None.

modules/es/fsw/src/cfe_es_api.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ CFE_Status_t CFE_ES_GetAppIDByName(CFE_ES_AppId_t *AppIdPtr, const char *AppName
702702
{
703703
/*
704704
* ensure the output value is set to a safe value,
705-
* in case the does not check the return code.
705+
* in case the caller does not check the return code.
706706
*/
707707
Result = CFE_ES_ERR_NAME_NOT_FOUND;
708708
*AppIdPtr = CFE_ES_APPID_UNDEFINED;
@@ -743,7 +743,7 @@ CFE_Status_t CFE_ES_GetLibIDByName(CFE_ES_LibId_t *LibIdPtr, const char *LibName
743743
{
744744
/*
745745
* ensure the output value is set to a safe value,
746-
* in case the does not check the return code.
746+
* in case the caller does not check the return code.
747747
*/
748748
Result = CFE_ES_ERR_NAME_NOT_FOUND;
749749
*LibIdPtr = CFE_ES_LIBID_UNDEFINED;
@@ -1168,6 +1168,7 @@ int32 CFE_ES_GetModuleInfo(CFE_ES_AppInfo_t *ModuleInfo, CFE_ResourceId_t Resour
11681168
{
11691169
int32 Status;
11701170

1171+
/* Note - ModuleInfo NULL pointer check is perfromed by CFE_ES_GetAppInfo or CFE_ES_GetLibInfo */
11711172
switch (CFE_ResourceId_GetBase(ResourceId))
11721173
{
11731174
case CFE_ES_APPID_BASE:
@@ -2078,7 +2079,7 @@ CFE_Status_t CFE_ES_GetGenCounterIDByName(CFE_ES_CounterId_t *CounterIdPtr, cons
20782079
{
20792080
/*
20802081
* ensure the output value is set to a safe value,
2081-
* in case the does not check the return code.
2082+
* in case the caller does not check the return code.
20822083
*/
20832084
Result = CFE_ES_ERR_NAME_NOT_FOUND;
20842085
*CounterIdPtr = CFE_ES_COUNTERID_UNDEFINED;

modules/es/fsw/src/cfe_es_erlog.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,7 @@ void CFE_ES_BackgroundERLogFileEventHandler(void *Meta, CFE_FS_FileWriteEvent_t
245245

246246
BgFilePtr = (CFE_ES_BackgroundLogDumpGlobal_t *)Meta;
247247

248-
/*
249-
* Note that this runs in the context of ES background task (file writer background job)
250-
* It does NOT run in the context of the CFE_TBL app task.
251-
*
252-
* Events should use CFE_EVS_SendEventWithAppID() rather than CFE_EVS_SendEvent()
253-
* to get proper association with TBL task.
254-
*/
248+
/* Note that this runs in the context of ES background task (file writer background job) */
255249
switch (Event)
256250
{
257251
case CFE_FS_FileWriteEvent_COMPLETE:

modules/es/fsw/src/cfe_es_objtab.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
** cfe_es_objtab.c
2424
**
2525
** Purpose:
26-
** This file contains the OS_object_table for MAP Build1.
26+
** This file contains the OS_object_table for system initialization/startup.
2727
**
2828
** References:
2929
** Flight Software Branch C Coding Standard Version 1.0a

modules/es/fsw/src/cfe_es_start.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void CFE_ES_Main(uint32 StartType, uint32 StartSubtype, uint32 ModeId, const cha
101101
(unsigned int)ReturnCode);
102102

103103
/*
104-
** Delay to allow the message to be read
104+
** Delay to allow the message to be printed
105105
*/
106106
OS_TaskDelay(CFE_ES_PANIC_DELAY);
107107

0 commit comments

Comments
 (0)