Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/add-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Add Issue or PR to Project

on:
issues:
types: [opened]
pull_request_target:
types: [opened, ready_for_review, converted_to_draft]

jobs:
add-to-project:
name: Add issue or pull request to project
uses: nasa/cFS/.github/workflows/add-to-project-reusable.yml@dev
secrets: inherit
7 changes: 3 additions & 4 deletions .github/workflows/build-documentation.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Deploy Documentation
name: Build Documentation

on:
push:
Expand All @@ -15,9 +15,8 @@ on:
jobs:
build-documentation:
name: Build and deploy cFS documents
uses: nasa/cFS/.github/workflows/build-deploy-doc.yml@main
uses: nasa/cFS/.github/workflows/build-doc-reusable.yml@dev
with:
target: "[\"lc-usersguide\"]"
app-name: lc
buildpdf: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
deploy: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}
buildpdf: ${{ github.event_name == 'push' && (contains(github.ref, 'main') || contains(github.ref, 'dev')) }}
5 changes: 4 additions & 1 deletion .github/workflows/build-run-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ on:
- reopened
- synchronize
workflow_dispatch:
schedule:
# 9:35 PM UTC every Sunday
- cron: '35 21 * * 0'

jobs:
build-run:
name: Build and run with startup msg verification
uses: nasa/cFS/.github/workflows/build-run-app.yml@main
uses: nasa/cFS/.github/workflows/build-run-app-reusable.yml@dev
5 changes: 1 addition & 4 deletions .github/workflows/codeql-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ on:
jobs:
codeql:
name: Codeql Analysis
uses: nasa/cFS/.github/workflows/codeql-reusable.yml@main
uses: nasa/cFS/.github/workflows/codeql-reusable.yml@dev
with:
component-path: apps/lc
prep: 'make prep; make -C build/tools/elf2cfetbl'
make: 'make -C build/native/default_cpu1/apps/lc'
setup: |
cp ./cfe/cmake/Makefile.sample Makefile && cp -r ./cfe/cmake/sample_defs sample_defs
sed -i "/list(APPEND MISSION_GLOBAL_APPLIST/a list(APPEND MISSION_GLOBAL_APPLIST lc)" sample_defs/targets.cmake
7 changes: 6 additions & 1 deletion .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ name: Format Check

# Run on all push and pull requests
on:
push:
branches:
- dev
- main
pull_request:
types:
- opened
- reopened
- synchronize
workflow_dispatch:

jobs:
format-check:
name: Run format check
uses: nasa/cFS/.github/workflows/format-check.yml@main
uses: nasa/cFS/.github/workflows/format-check.yml@dev
20 changes: 20 additions & 0 deletions .github/workflows/mcdc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: MCDC Analysis

on:
push:
branches:
- dev
- main
pull_request:
types:
- opened
- reopened
- synchronize
workflow_dispatch:

jobs:
mcdc:
name: Run MCDC Analysis
uses: nasa/cFS/.github/workflows/mcdc-reusable.yml@dev
with:
app-name: 'lc'
6 changes: 2 additions & 4 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,5 @@ on:

jobs:
static-analysis:
name: Run cppcheck
uses: nasa/cFS/.github/workflows/static-analysis.yml@main
with:
strict-dir-list: './fsw'
name: Static Analysis
uses: nasa/cFS/.github/workflows/app-static-analysis-reusable.yml@dev
5 changes: 4 additions & 1 deletion .github/workflows/unit-test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ on:
- reopened
- synchronize
workflow_dispatch:
schedule:
# 9:25 PM UTC every Sunday
- cron: '25 21 * * 0'

jobs:
unit-test-coverage:
name: Run unit test and coverage
uses: nasa/cFS/.github/workflows/unit-test-coverage.yml@main
uses: nasa/cFS/.github/workflows/unit-test-coverage-reusable.yml@dev
10 changes: 5 additions & 5 deletions config/default_lc_fcncode_values.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@
* Macro Definitions
************************************************************************/

#define LC_CCVAL(x) LC_FunctionCode_##x
#define LC_CCVAL(x) LC_FunctionCode_##x
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed

enum LC_FunctionCode
{
enum LC_FunctionCode
{
LC_FunctionCode_NOOP = 0,
LC_FunctionCode_RESET_COUNTERS = 1,
LC_FunctionCode_SET_LC_STATE = 2,
LC_FunctionCode_SET_AP_STATE = 3,
LC_FunctionCode_SET_AP_PERM_OFF = 4,
LC_FunctionCode_RESET_AP_STATS = 5,
LC_FunctionCode_RESET_WP_STATS = 6,
};
};

#endif
#endif
1 change: 0 additions & 1 deletion config/default_lc_msgid_values.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@
#define LC_TLM_PLATFORM_MIDVAL(x) CFE_PLATFORM_TLM_TOPICID_TO_MIDV(LC_MISSION_##x##_TOPICID)

#endif

4 changes: 2 additions & 2 deletions config/default_lc_msgids.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
* \{
*/

#define LC_CMD_MID LC_CMD_PLATFORM_MIDVAL(CMD) /**< \brief Msg ID for cmds to LC */
#define LC_SEND_HK_MID LC_CMD_PLATFORM_MIDVAL(SEND_HK) /**< \brief Msg ID to request LC housekeeping */
#define LC_CMD_MID LC_CMD_PLATFORM_MIDVAL(CMD) /**< \brief Msg ID for cmds to LC */
#define LC_SEND_HK_MID LC_CMD_PLATFORM_MIDVAL(SEND_HK) /**< \brief Msg ID to request LC housekeeping */
#define LC_SAMPLE_AP_MID LC_CMD_PLATFORM_MIDVAL(SAMPLE_AP) /**< \brief Msg ID to request actionpoint sample */

/**\}*/
Expand Down
74 changes: 37 additions & 37 deletions config/default_lc_tblstruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
*/
typedef struct
{
uint8 DefaultState; /**< \brief Default state for this AP (enumerated)
uint8 DefaultState; /**< \brief Default state for this AP (enumerated)
States are defined in lc_msgdefs.h */
uint8 MaxPassiveEvents; /**< \brief Max number of events before filter
uint8 MaxPassiveEvents; /**< \brief Max number of events before filter
- RTS not started because AP is passive */
uint8 MaxPassFailEvents; /**< \brief Max number of events before filter
uint8 MaxPassFailEvents; /**< \brief Max number of events before filter
- AP result transition from pass to fail */
uint8 MaxFailPassEvents; /**< \brief Max number of events before filter
uint8 MaxFailPassEvents; /**< \brief Max number of events before filter
- AP result transition from fail to pass */
uint16 RTSId; /**< \brief RTS to request if this AP fails */
uint16 MaxFailsBeforeRTS; /**< \brief How may consecutive failures before
Expand Down Expand Up @@ -95,33 +95,33 @@ typedef union
*/
typedef struct
{
uint8 DataType; /**< \brief Watchpoint Data Type (enumerated) */
uint8 OperatorID; /**< \brief Comparison type (enumerated) */
CFE_SB_MsgId_t MessageID; /**< \brief Message ID for the message containing
the watchpoint */
uint32 WatchpointOffset; /**< \brief Byte offset from the beginning of
the message (including any headers)
to the watchpoint */
uint32 BitMask; /**< \brief Value to be masked with watchpoint
data prior to comparison */
LC_MultiType_t ComparisonValue; /**< \brief Value watchpoint data is compared
against */
uint32 ResultAgeWhenStale; /**< \brief Number of LC Sample Actionpoint
commands that must be processed after
comparison before result goes stale */
uint32 CustomFuncArgument; /**< \brief Data passed to the custom function
when Operator_ID is set to
#LC_OPER_CUSTOM */
uint8 DataType; /**< \brief Watchpoint Data Type (enumerated) */
uint8 OperatorID; /**< \brief Comparison type (enumerated) */
CFE_SB_MsgId_t MessageID; /**< \brief Message ID for the message containing
the watchpoint */
uint32 WatchpointOffset; /**< \brief Byte offset from the beginning of
the message (including any headers)
to the watchpoint */
uint32 BitMask; /**< \brief Value to be masked with watchpoint
data prior to comparison */
LC_MultiType_t ComparisonValue; /**< \brief Value watchpoint data is compared
against */
uint32 ResultAgeWhenStale; /**< \brief Number of LC Sample Actionpoint
commands that must be processed after
comparison before result goes stale */
uint32 CustomFuncArgument; /**< \brief Data passed to the custom function
when Operator_ID is set to
#LC_OPER_CUSTOM */
} LC_WDTEntry_t;

/**
* \brief Watchpoint Transition Structure
*/
typedef struct
{
uint32 Value; /**< \brief Watchpoint value at comparison that caused
the transition */
uint8 DataType; /**< \brief Same as Watchpoint Data Type (enumerated) */
uint32 Value; /**< \brief Watchpoint value at comparison that caused
the transition */
uint8 DataType; /**< \brief Same as Watchpoint Data Type (enumerated) */

uint8 Padding[3]; /**< \brief Structure padding */

Expand All @@ -138,19 +138,19 @@ typedef struct

uint8 Padding[3]; /**< \brief Structure padding */

uint32 CountdownToStale; /**< \brief Number of LC Sample Actionpoint
commands still to be processed
before WatchResult becomes stale */
uint32 EvaluationCount; /**< \brief How many times this watchpoint has
been evaluated */
uint32 FalseToTrueCount; /**< \brief How many times this watchpoint has
transitioned from FALSE to TRUE */
uint32 ConsecutiveTrueCount; /**< \brief Number of consecutive times this
watchpoint has evaluated to TRUE */
uint32 CumulativeTrueCount; /**< \brief Total number of times this watchpoint
has evaluated to TRUE */
LC_WRTTransition_t LastFalseToTrue; /**< \brief Last transition from FALSE to TRUE */
LC_WRTTransition_t LastTrueToFalse; /**< \brief Last transition from TRUE to FALSE */
uint32 CountdownToStale; /**< \brief Number of LC Sample Actionpoint
commands still to be processed
before WatchResult becomes stale */
uint32 EvaluationCount; /**< \brief How many times this watchpoint has
been evaluated */
uint32 FalseToTrueCount; /**< \brief How many times this watchpoint has
transitioned from FALSE to TRUE */
uint32 ConsecutiveTrueCount; /**< \brief Number of consecutive times this
watchpoint has evaluated to TRUE */
uint32 CumulativeTrueCount; /**< \brief Total number of times this watchpoint
has evaluated to TRUE */
LC_WRTTransition_t LastFalseToTrue; /**< \brief Last transition from FALSE to TRUE */
LC_WRTTransition_t LastTrueToFalse; /**< \brief Last transition from TRUE to FALSE */
} LC_WRTEntry_t;

/**
Expand Down
2 changes: 1 addition & 1 deletion config/eds_lc_interface_cfg_values.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
************************************************************************/

/**
/**
* @file
* CFS Limit Checker (LC) Application Public Definitions
*
Expand Down
2 changes: 1 addition & 1 deletion config/eds_lc_msgstruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
************************************************************************/

/**
/**
* @file
* Specification for the LC command and telemetry
* message data types.
Expand Down
8 changes: 4 additions & 4 deletions config/eds_lc_tbldefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
* ADD THEM TO lc_tbl.h IF NEEDED!
*/

#ifndef EDS_LC_TBLDEFS_H
#define EDS_LC_TBLDEFS_H
#ifndef EDS_LC_TBLDEFS_H
#define EDS_LC_TBLDEFS_H

#include "lc_eds_typedefs.h"
#include "lc_eds_typedefs.h"

#endif
#endif
30 changes: 30 additions & 0 deletions config/eds_lc_topicid_values.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/************************************************************************
* NASA Docket No. GSC-19,200-1, and identified as "cFS Draco"
*
* Copyright (c) 2023 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
************************************************************************/

/**
* @file
* CFS Limit Checker (LC) Application Topic IDs
*/
#ifndef EDS_LC_TOPICID_VALUES_H
#define EDS_LC_TOPICID_VALUES_H

#include "cfe_mission_eds_designparameters.h"

#define LC_MISSION_TIDVAL(x) EdsParam_CFE_MISSION_LC_##x##_TOPICID

#endif
4 changes: 3 additions & 1 deletion eds/LC.xml
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@
<ContainerDataType name="SetLCState_Payload" shortDescription="Modify PDU file size command structure">
<EntryList>
<Entry name="NewLCState" type="BASE_TYPES/uint16" shortDescription="New LC application state" />
<PaddingEntry sizeInBits="16" shortDescription="32-bit alignment"/>
</EntryList>
</ContainerDataType>

Expand All @@ -294,7 +295,7 @@
</EntryList>
</ContainerDataType>

<ContainerDataType name="SetAPPermOff_Payload" basetype="CFE_HDR/CommandHeader" shortDescription="Set AP (Actionpoint) Permanently Off">
<ContainerDataType name="SetAPPermOff_Payload" shortDescription="Set AP (Actionpoint) Permanently Off">
<EntryList>
<Entry name="APNumber" type="BASE_TYPES/uint16" shortDescription="Which actionpoint to change" />
<Entry name="Padding" type="BASE_TYPES/uint16" shortDescription="Structure padding" />
Expand All @@ -304,6 +305,7 @@
<ContainerDataType name="ResetAPStats_Payload" shortDescription="Reset AP (Actionpoint) Statistics">
<EntryList>
<Entry name="APNumber" type="BASE_TYPES/uint16" shortDescription="Which actionpoint to change" />
<PaddingEntry sizeInBits="16" shortDescription="Padding for 32-bit alignment"/>
</EntryList>
</ContainerDataType>

Expand Down
19 changes: 9 additions & 10 deletions fsw/inc/lc_topicids.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,26 @@
* limitations under the License.
************************************************************************/

/**
/**
* @file
* CFS Limit Checker (LC) Application Topic IDs
*/

#ifndef LC_TOPICIDS_H
#define LC_TOPICIDS_H
#ifndef LC_TOPICIDS_H
#define LC_TOPICIDS_H

#include "lc_topicid_values.h"

#define LC_MISSION_CMD_TOPICID LC_MISSION_TIDVAL(CMD)
#define DEFAULT_LC_MISSION_CMD_TOPICID 0xA4

#define LC_MISSION_CMD_TOPICID LC_MISSION_TIDVAL(CMD)
#define DEFAULT_LC_MISSION_CMD_TOPICID 0xA4

#define LC_MISSION_SEND_HK_TOPICID LC_MISSION_TIDVAL(SEND_HK)
#define DEFAULT_LC_MISSION_SEND_HK_TOPICID 0xA5
#define LC_MISSION_SEND_HK_TOPICID LC_MISSION_TIDVAL(SEND_HK)
#define DEFAULT_LC_MISSION_SEND_HK_TOPICID 0xA5

#define LC_MISSION_SAMPLE_AP_TOPICID LC_MISSION_TIDVAL(SAMPLE_AP)
#define DEFAULT_LC_MISSION_SAMPLE_AP_TOPICID 0xA6

#define LC_MISSION_HK_TLM_TOPICID LC_MISSION_TIDVAL(HK_TLM)
#define DEFAULT_LC_MISSION_HK_TLM_TOPICID 0xA7
#define LC_MISSION_HK_TLM_TOPICID LC_MISSION_TIDVAL(HK_TLM)
#define DEFAULT_LC_MISSION_HK_TLM_TOPICID 0xA7

#endif
Loading
Loading