Skip to content

Commit

Permalink
Seed from sch_lab 2.2.0.0 code base
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake Hageman committed May 16, 2019
1 parent 61fa202 commit c8716cf
Show file tree
Hide file tree
Showing 7 changed files with 490 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
cmake_minimum_required(VERSION 2.6.4)
project(CFS_SCH_LAB C)

include_directories(fsw/mission_inc)
include_directories(fsw/platform_inc)
include_directories(${ci_lab_MISSION_DIR}/fsw/platform_inc)
include_directories(${to_lab_MISSION_DIR}/fsw/platform_inc)
include_directories(${sample_app_MISSION_DIR}/fsw/platform_inc)

aux_source_directory(fsw/src APP_SRC_FILES)

# Create the app module
add_cfe_app(sch_lab ${APP_SRC_FILES})

Binary file added LICENSE-18128-Apache-2_0.pdf
Binary file not shown.
112 changes: 112 additions & 0 deletions fsw/for_build/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
###############################################################################
# File: CFS Application Makefile
#
# $Id: Makefile 1.5 2009/07/09 10:41:17GMT-05:00 rmcgraw Exp $
#
# $Log: Makefile $
# Revision 1.5 2009/07/09 10:41:17GMT-05:00 rmcgraw
# DCR8291:1 Changed CFE_MISSION_INC to CFS_MISSION_INC and added log if needed
#
###############################################################################
#
# Subsystem produced by this makefile.
#
APPTARGET = sch_lab

#
# Entry Point for task
#
ENTRY_PT = SCH_Lab_AppMain

#
# Object files required to build subsystem.
#
OBJS = sch_lab_app.o

#
# Source files required to build subsystem; used to generate dependencies.
# As long as there are no assembly files this can be automated.
#
SOURCES = $(OBJS:.o=.c)


##
## Specify extra C Flags needed to build this subsystem
##
LOCAL_COPTS =


##
## EXEDIR is defined here, just in case it needs to be different for a custom
## build
##
EXEDIR=../exe

##
## Certain OSs and Application Loaders require the following option for
## Shared libraries. Currently only needed for vxWorks 5.5 and RTEMS.
## For each shared library that this app depends on, you need to have an
## entry like the following:
## -R../tst_lib/tst_lib.elf
##
SHARED_LIB_LINK =

########################################################################
# Should not have to change below this line, except for customized
# Mission and cFE directory structures
########################################################################

#
# Set build type to CFE_APP. This allows us to
# define different compiler flags for the cFE Core and Apps.
#
BUILD_TYPE = CFE_APP

##
## Include all necessary cFE make rules
## Any of these can be copied to a local file and
## changed if needed.
##
##
## cfe-config.mak contains PSP and OS selection
##
include ../cfe/cfe-config.mak
##
## debug-opts.mak contains debug switches
##
include ../cfe/debug-opts.mak
##
## compiler-opts.mak contains compiler definitions and switches/defines
##
include $(CFE_PSP_SRC)/$(PSP)/make/compiler-opts.mak

##
## Setup the include path for this subsystem
## The OS specific includes are in the build-rules.make file
##
## If this subsystem needs include files from another app, add the path here.
##
INCLUDE_PATH = \
-I$(OSAL_SRC)/inc \
-I$(CFE_CORE_SRC)/inc \
-I$(CFE_PSP_SRC)/inc \
-I$(CFE_PSP_SRC)/$(PSP)/inc \
-I$(CFS_APP_SRC)/inc \
-I$(CFS_APP_SRC)/$(APPTARGET)/fsw/src \
-I$(CFS_MISSION_INC) \
-I../cfe/inc \
-I../inc

##
## Define the VPATH make variable.
## This can be modified to include source from another directory.
## If there is no corresponding app in the cfs-apps directory, then this can be discarded, or
## if the mission chooses to put the src in another directory such as "src", then that can be
## added here as well.
##
VPATH = $(CFS_APP_SRC)/$(APPTARGET)/fsw/src

##
## Include the common make rules for building a cFE Application
##
include $(CFE_CORE_SRC)/make/app-rules.mak
49 changes: 49 additions & 0 deletions fsw/mission_inc/sch_lab_perfids.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/************************************************************************
**
** GSC-18128-1, "Core Flight Executive Version 6.6"
**
** Copyright (c) 2006-2019 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:
**
** Purpose:
** Define SCH Lab Performance IDs
**
** Notes:
**
** $Log: sch_lab_perfids.h $
** Revision 1.3 2010/09/20 12:28:52GMT-05:00 wmoleski
** Modified the CI_LAB, SCH_LAB and TO_LAB applications to use unique message IDs and Pipe Names. The "_LAB" was
** added to all definitions so that a mission can use these "Lab" apps as well as their own mission apps together.
** Revision 1.2 2008/04/30 16:04:46EDT rjmcgraw
** Member moved from sch_lab_perfids.h in project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/sch_lab/fsw/platform_cfg/project.pj to sch_lab_perfids.h in project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/sch_lab/fsw/mission_inc/project.pj.
** Revision 1.1 2008/04/30 15:04:46ACT rjmcgraw
** Initial revision
** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/sch_lab/fsw/platform_cfg/project.pj
**
*************************************************************************/
#ifndef _sch_lab_perfids_h_
#define _sch_lab_perfids_h_


#define SCH_MAIN_TASK_PERF_ID 20

#endif /* _sch_lab_perfids_h_ */

/************************/
/* End of File Comment */
/************************/
106 changes: 106 additions & 0 deletions fsw/platform_inc/sch_lab_sched_tab.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
/************************************************************************
**
** GSC-18128-1, "Core Flight Executive Version 6.6"
**
** Copyright (c) 2006-2019 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: sch_lab_sched_tab.h
**
** Purpose:
** This file contains the schedule tables for the SCH Lab app.
** It is intended to go in the platform include directory so the SCH_LAB
** app source code does not have to be modified.
**
** Notes:
**
** $Log: sch_lab_sched_tab.h $
** Revision 1.1 2014/07/17 12:36:57GMT-05:00 acudmore
** Initial revision
** Member added to project c:/MKSDATA/MKS-REPOSITORY/MKS-CFE-PROJECT/tools/sch_lab/fsw/platform_inc/project.pj
**
*************************************************************************/


#include "cfe_msgids.h"

/*
** Include headers for message IDs here
*/
#include "ci_lab_msgids.h"
#include "to_lab_msgids.h"

#include "sample_app_msgids.h"

#if 0
#include "sc_msgids.h"
#include "hs_msgids.h"
#include "fm_msgids.h"
#include "ds_msgids.h"
#include "lc_msgids.h"
#endif

/*
** Defines
*/
#define SCH_LAB_END_OF_TABLE 0
#define SCH_LAB_MAX_SCHEDULE_ENTRIES 32

/*
** Typedefs
*/
typedef struct
{
CFE_SB_MsgId_t MessageID; /* Message ID for the table entry */
uint32 PacketRate; /* Rate: Send packet every N seconds */
uint32 Counter; /* Counter used to send packet */

} SCH_LAB_ScheduleTable_t;


/*
** SCH Lab schedule table
** When populating this table:
** 1. Make sure the table is terminated by the SCH_LAB_END_OF_TABLE entry
** 2. You can have commented out entries, but a zero MID will terminate the table processing,
** skipping the remaining entries.
** 3. If the table grows too big, increase SCH_LAB_MAX_SCHEDULE_ENTRIES
*/
SCH_LAB_ScheduleTable_t SCH_LAB_ScheduleTable[SCH_LAB_MAX_SCHEDULE_ENTRIES] =
{
{ CFE_ES_SEND_HK_MID, 4, 0 }, /* Housekeeping requests go out every 4 seconds */
{ CFE_EVS_SEND_HK_MID, 4, 0 },
{ CFE_TIME_SEND_HK_MID, 4, 0 },
{ CFE_SB_SEND_HK_MID, 4, 0 },
{ CFE_TBL_SEND_HK_MID, 4, 0 },

{ CI_LAB_SEND_HK_MID, 4, 0 },
{ TO_LAB_SEND_HK_MID, 4, 0 },
{ SAMPLE_APP_SEND_HK_MID, 4, 0 },

#if 0
{ SC_SEND_HK_MID, 4, 0 },
{ SC_1HZ_WAKEUP_MID, 1, 0 }, /* Example of a 1hz packet */
{ HS_SEND_HK_MID, 4, 0 },
{ FM_SEND_HK_MID, 4, 0 },
{ DS_SEND_HK_MID, 4, 0 },
{ LC_SEND_HK_MID, 4, 0 },

#endif

{ SCH_LAB_END_OF_TABLE, 0, 0 }
};

Loading

0 comments on commit c8716cf

Please sign in to comment.