-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
426 changed files
with
19,675 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
# CFS_IO_LIB | ||
Input/Output Library | ||
|
||
NASA core Flight System Scheduler Application | ||
|
||
Description | ||
|
||
The I/O Library (IO_LIB) is a collection of protocol libraries to be called by the CI/TO application custom implementations. | ||
|
||
The cFS is a platform and project independent reusable software framework and set of reusable applications developed by NASA Goddard Space Flight Center. This framework is used as the basis for the flight software for satellite data systems and instruments, but can be used on other embedded systems. More information on the cFS can be found at http://cfs.gsfc.nasa.gov | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[../fsw/public_inc/tc_sync.h:33]: (error) Invalid number of character ({) when these macros are defined: '__cplusplus'. | ||
[../fsw/public_inc/tm_sync.h:33]: (error) Invalid number of character ({) when these macros are defined: '__cplusplus'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Checking ../fsw/src/formats/tctf.c... | ||
Checking ../fsw/src/formats/tctf.c: _VXWORKS_OS_... | ||
Checking ../fsw/src/formats/tctf.c: __cplusplus... | ||
1/11 files checked 9% done | ||
Checking ../fsw/src/formats/tmtf.c... | ||
2/11 files checked 19% done | ||
Checking ../fsw/src/io_lib_init.c... | ||
Checking ../fsw/src/io_lib_init.c: _VXWORKS_OS_... | ||
Checking ../fsw/src/io_lib_init.c: __cplusplus... | ||
3/11 files checked 21% done | ||
Checking ../fsw/src/io_lib_utils.c... | ||
Checking ../fsw/src/io_lib_utils.c: _VXWORKS_OS_... | ||
Checking ../fsw/src/io_lib_utils.c: __cplusplus... | ||
4/11 files checked 24% done | ||
Checking ../fsw/src/services/cop1.c... | ||
Checking ../fsw/src/services/cop1.c: _VXWORKS_OS_... | ||
Checking ../fsw/src/services/cop1.c: __cplusplus... | ||
5/11 files checked 45% done | ||
Checking ../fsw/src/services/tc_sync.c... | ||
Checking ../fsw/src/services/tc_sync.c: _VXWORKS_OS_... | ||
Checking ../fsw/src/services/tc_sync.c: __cplusplus... | ||
6/11 files checked 49% done | ||
Checking ../fsw/src/services/tm_sdlp.c... | ||
Checking ../fsw/src/services/tm_sdlp.c: _VXWORKS_OS_... | ||
Checking ../fsw/src/services/tm_sdlp.c: __cplusplus... | ||
7/11 files checked 75% done | ||
Checking ../fsw/src/services/tm_sync.c... | ||
Checking ../fsw/src/services/tm_sync.c: _VXWORKS_OS_... | ||
Checking ../fsw/src/services/tm_sync.c: __cplusplus... | ||
8/11 files checked 77% done | ||
Checking ../fsw/src/services/trans_rs422.c... | ||
Checking ../fsw/src/services/trans_rs422.c: _VXWORKS_OS_... | ||
Checking ../fsw/src/services/trans_rs422.c: __cplusplus... | ||
9/11 files checked 85% done | ||
Checking ../fsw/src/services/trans_select.c... | ||
Checking ../fsw/src/services/trans_select.c: _VXWORKS_OS_... | ||
Checking ../fsw/src/services/trans_select.c: __cplusplus... | ||
10/11 files checked 90% done | ||
Checking ../fsw/src/services/trans_udp.c... | ||
Checking ../fsw/src/services/trans_udp.c: _VXWORKS_OS_... | ||
Checking ../fsw/src/services/trans_udp.c: __cplusplus... | ||
11/11 files checked 100% done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
# Runs cppcheck on io_lib | ||
|
||
io_lib="../fsw" | ||
|
||
output_file="./cppcheck_io_lib.txt" | ||
error_file="./cppcheck_errors_io_lib.txt" | ||
|
||
command -v cppcheck >/dev/null 2>&1 || { echo >&2 "Error: Requires cppcheck but it's not installed. Aborting."; exit 1; } | ||
|
||
paths_to_check="$io_lib/src/ $io_lib/formats/ $io_lib/services/" | ||
|
||
include_dirs="-I $io_lib/public_inc" | ||
|
||
flags="-v --report-progress --std=c89" | ||
|
||
cppcheck $flags $include_dirs $paths_to_check 2> $error_file > $output_file |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
############################################################################### | ||
# File: CFS Application Makefile | ||
# | ||
# $Id: Makefile 1.6 2009/07/09 11:41:26EDT rmcgraw Exp $ | ||
# | ||
# $Log: Makefile $ | ||
# Revision 1.6 2009/07/09 11:41:26EDT rmcgraw | ||
# DCR8291:1 Changed CFE_MISSION_INC to CFS_MISSION_INC and added log if needed | ||
# | ||
############################################################################### | ||
# | ||
# Subsystem produced by this makefile. | ||
# | ||
APPTARGET = io_lib | ||
|
||
# | ||
# Entry Point for task | ||
# | ||
ENTRY_PT = IO_LibInit | ||
|
||
# | ||
# Object files required to build subsystem. | ||
# | ||
OBJS = io_lib_init.o \ | ||
io_lib_utils.o \ | ||
trans_udp.o \ | ||
trans_rs422.o \ | ||
trans_select.o \ | ||
tmtf.o \ | ||
tm_sdlp.o \ | ||
tm_sync.o \ | ||
tctf.o \ | ||
cop1.o \ | ||
tc_sync.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/public_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 | ||
VPATH += $(CFS_APP_SRC)/$(APPTARGET)/fsw/src/services | ||
VPATH += $(CFS_APP_SRC)/$(APPTARGET)/fsw/src/formats | ||
|
||
## | ||
## Include the common make rules for building a cFE Application | ||
## | ||
include $(CFE_CORE_SRC)/make/app-rules.mak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/******************************************************************************* | ||
* File: cop1.h | ||
* | ||
* Purpose: | ||
* Provides the interface functionality for the receiver side of the Communications | ||
* Operation Procedure-1 (COP-1), i.e. the Frame Acceptance and Reporting | ||
* Mechanism-1 (FARM-1) | ||
* | ||
* Reference(s): | ||
* - _Communications Operation Procedure-1_, CCSDS 232.1-B-2 | ||
* | ||
* Notes: | ||
* -Setter functions have not been provided for all the fields in the Communications | ||
* Link Control Word (CLCW). The value for the virtual channel ID is set when the | ||
* CLCW is initialized. Most other values are updated internally when processing | ||
* a transfer frame. Values set outside of the COP1 procedure have setters | ||
* provided. | ||
* | ||
* | ||
* History: | ||
* 03/16/2015 Alan Asp, Odyssey Space Research, LLC | ||
* * Created | ||
* | ||
******************************************************************************/ | ||
|
||
#ifndef _COP1_H_ | ||
#define _COP1_H_ | ||
|
||
#include "io_lib.h" | ||
#include "tctf.h" | ||
|
||
|
||
#define COP1_SLIDING_WINDOW_WIDTH 126 | ||
|
||
#define COP1_SUCCESS 0 | ||
#define COP1_BADINPUT_ERR -1 | ||
#define COP1_INVALID_TF_ERR -2 | ||
#define COP1_FARM1_ERR -3 | ||
|
||
typedef struct | ||
{ | ||
uint8 Status; /* CLCW info and status */ | ||
uint8 Channel; /* virtual channel ID */ | ||
uint8 Flags; /* flags */ | ||
uint8 Report; /* report value, a.k.a the Next Expected Frame Sequence Number, N(R) */ | ||
} COP1_Clcw_t; | ||
|
||
|
||
int32 COP1_InitClcw(COP1_Clcw_t *clcwPtr, uint16 vcId); | ||
int32 COP1_ProcessFrame(uint8* toBuffer, COP1_Clcw_t *clcwPtr, TCTF_Hdr_t *tfPtr, | ||
TCTF_ChannelService_t *channelService); | ||
|
||
|
||
uint16 COP1_GetClcwCtrlWordType(COP1_Clcw_t *clcwPtr); | ||
|
||
uint16 COP1_GetClcwVersion(COP1_Clcw_t *clcwPtr); | ||
|
||
void COP1_SetClcwStatus(COP1_Clcw_t *clcwPtr, uint16 value); | ||
uint16 COP1_GetClcwStatus(COP1_Clcw_t *clcwPtr); | ||
|
||
uint16 COP1_GetClcwCopEffect(COP1_Clcw_t *clcwPtr); | ||
|
||
uint16 COP1_GetClcwVcId(COP1_Clcw_t *clcwPtr); | ||
|
||
void COP1_SetClcwNoRf(COP1_Clcw_t *clcwPtr, boolean value); | ||
boolean COP1_GetClcwNoRf(COP1_Clcw_t *clcwPtr); | ||
|
||
void COP1_SetClcwNoBitlock(COP1_Clcw_t *clcwPtr, boolean value); | ||
boolean COP1_GetClcwNoBitlock(COP1_Clcw_t *clcwPtr); | ||
|
||
boolean COP1_GetClcwLockout(COP1_Clcw_t *clcwPtr); | ||
|
||
boolean COP1_GetClcwWait(COP1_Clcw_t *clcwPtr); | ||
|
||
boolean COP1_GetClcwRetransmit(COP1_Clcw_t *clcwPtr); | ||
|
||
uint16 COP1_GetClcwFarmbCtr(COP1_Clcw_t *clcwPtr); | ||
|
||
uint8 COP1_GetClcwReport(COP1_Clcw_t *clcwPtr); | ||
|
||
|
||
#endif /* _COP1_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/************************************************************************ | ||
** File: io_lib.h | ||
** | ||
** Purpose: | ||
** The IO Lib header file | ||
** | ||
** Notes: | ||
** | ||
** History: | ||
** Apr, 2015 Guy de Carufel | ||
** * Created | ||
** | ||
*************************************************************************/ | ||
#ifndef _IO_LIB_H_ | ||
#define _IO_LIB_H_ | ||
|
||
#include "cfe.h" | ||
#include "common_types.h" | ||
#include "network_includes.h" | ||
|
||
#ifdef _VXWORKS_OS_ | ||
/* For vxworks, include ioLib for ioctl suport */ | ||
#include <ioLib.h> | ||
|
||
/* In VxWorks inet_aton() returns OK and ERORR | ||
* in VxWorks ERROR = -1, OK = 0 | ||
* */ | ||
#define INET_ATON_ERROR ERROR | ||
|
||
#else | ||
/* If not vxworks, include termios and select.h */ | ||
#include <termios.h> | ||
#include <sys/select.h> | ||
|
||
/* In Linux inet_aton() returns 0 for error and non-zero for ok */ | ||
#define INET_ATON_ERROR 0 | ||
|
||
#endif | ||
|
||
#include "io_lib_events.h" | ||
|
||
|
||
#define IO_LIB_MAJOR_VERSION 1 | ||
#define IO_LIB_MINOR_VERSION 0 | ||
#define IO_LIB_REVISION 0 | ||
#define IO_LIB_MISSION_REV 0 | ||
|
||
#define IO_LIB_SUCCESS 0 | ||
#define IO_LIB_ERROR -1 | ||
|
||
#define IO_TRANS_PEND_FOREVER -1 | ||
|
||
typedef struct | ||
{ | ||
/* CFE Event table */ | ||
CFE_EVS_BinFilter_t EventTbl[IO_LIB_EVT_CNT]; | ||
} IO_LIB_LibData_t; | ||
|
||
|
||
int32 IO_LibInit(void); | ||
|
||
#endif /* _io_lib_h_ */ | ||
|
||
/************************/ | ||
/* End of File Comment */ | ||
/************************/ |
Oops, something went wrong.