Skip to content

Commit

Permalink
CFS-41, Add EVS Files
Browse files Browse the repository at this point in the history
  • Loading branch information
astrogeco committed Apr 11, 2021
1 parent f4c667c commit ba63e61
Show file tree
Hide file tree
Showing 19 changed files with 6,202 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@

# But not these files...
!/.gitignore

!/ReadMe.md


# EVS
!modules/evs/fsw/*
!modules/evs/fsw/**/**
!modules/core_api/fsw/inc/cfe_evs*
!modules/core_private/fsw/inc/cfe_evs_log_typedef.h
!modules/evs/CMakeLists.txt

# FS
# !cfe_fs*
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The corresponding, fully-working cFE instance matching the code in this branch c

### How to add your review comments

Navigate to the ["files changed" tab](https://github.com/nasa/cFE/pull/1283/files) in the [nasa/cFE#1283](https://github.com/nasa/cFE/pull/1283) pull request.
Navigate to the ["files changed" tab](https://github.com/nasa/cFE/pull/1294/files) in the [nasa/cFE#1294](https://github.com/nasa/cFE/pull/1294) pull request.


<img width="820" alt="github-review-instructions-1of2" src="https://user-images.githubusercontent.com/59618057/113956688-dca76a00-97eb-11eb-99d4-9ec84b459dce.png">
Expand Down
331 changes: 331 additions & 0 deletions modules/core_api/fsw/inc/cfe_evs.h

Large diffs are not rendered by default.

67 changes: 67 additions & 0 deletions modules/core_api/fsw/inc/cfe_evs_api_typedefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
** GSC-18128-1, "Core Flight Executive Version 6.7"
**
** 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
*
* Title: Event Services API Application Library Header File
*
* Purpose:
* Unit specification for Event services library functions and macros.
*
* Design Notes:
*
* References:
* Flight Software Branch C Coding Standard Version 1.0a
*/

#ifndef CFE_EVS_API_TYPEDEFS_H
#define CFE_EVS_API_TYPEDEFS_H

/********************************** Include Files ************************************/
#include "common_types.h" /* Basic data types */
#include "cfe_evs_extern_typedefs.h"

/** \name Common Event Filter Mask Values */
/** \{ */
#define CFE_EVS_NO_FILTER 0x0000 /**< \brief Stops any filtering. All messages are sent. */
#define CFE_EVS_FIRST_ONE_STOP 0xFFFF /**< \brief Sends the first event. All remaining messages are filtered. */
#define CFE_EVS_FIRST_TWO_STOP 0xFFFE /**< \brief Sends the first 2 events. All remaining messages are filtered. */
#define CFE_EVS_FIRST_4_STOP 0xFFFC /**< \brief Sends the first 4 events. All remaining messages are filtered. */
#define CFE_EVS_FIRST_8_STOP 0xFFF8 /**< \brief Sends the first 8 events. All remaining messages are filtered. */
#define CFE_EVS_FIRST_16_STOP 0xFFF0 /**< \brief Sends the first 16 events. All remaining messages are filtered. */
#define CFE_EVS_FIRST_32_STOP 0xFFE0 /**< \brief Sends the first 32 events. All remaining messages are filtered. */
#define CFE_EVS_FIRST_64_STOP 0xFFC0 /**< \brief Sends the first 64 events. All remaining messages are filtered. */
#define CFE_EVS_EVERY_OTHER_ONE 0x0001 /**< \brief Sends every other event. */
#define CFE_EVS_EVERY_OTHER_TWO 0x0002 /**< \brief Sends two, filters one, sends two, filters one, etc */
#define CFE_EVS_EVERY_FOURTH_ONE 0x0003 /**< \brief Sends every fourth event message. All others are filtered. */
/** \} */

/****************** Structure Definitions *********************/

/** \brief Event message filter defintion structure */
typedef struct CFE_EVS_BinFilter
{
uint16 EventID; /**< \brief Numerical event identifier */
uint16 Mask; /**< \brief Binary filter mask value */

} CFE_EVS_BinFilter_t;

#endif /* CFE_EVS_API_TYPEDEFS_H */
91 changes: 91 additions & 0 deletions modules/core_api/fsw/inc/cfe_evs_core_internal.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/*
** GSC-18128-1, "Core Flight Executive Version 6.7"
**
** 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
*
* Title: Event Services API Application Library Header File
*
* Purpose:
* Unit specification for Event services library functions and macros.
*
* Design Notes:
*
* References:
* Flight Software Branch C Coding Standard Version 1.0a
*/

#ifndef CFE_EVS_CORE_INTERNAL_H
#define CFE_EVS_CORE_INTERNAL_H

#include "common_types.h"
#include "cfe_es_extern_typedefs.h"

/*
* The internal APIs prototyped within this block are only intended to be invoked from
* other CFE core apps. They still need to be prototyped in the shared header such that
* they can be called from other core modules, but applications should not call these.
*/

/** @defgroup CFEAPIEVSCoreInternal cFE Internal Event Services APIs, internal to CFE core
* @{
*/

/*****************************************************************************/
/**
** \brief Entry Point for cFE Core Application
**
** \par Description
** This is the entry point to the cFE EVS Core Application.
**
** \par Assumptions, External Events, and Notes:
** None
**
******************************************************************************/
extern void CFE_EVS_TaskMain(void);

/*****************************************************************************/
/**
** \brief Initializes the cFE core module API Library
**
** \par Description
** Initializes the cFE core module API Library
**
** \par Assumptions, External Events, and Notes:
** -# This function MUST be called before any module API's are called.
**
******************************************************************************/
extern int32 CFE_EVS_EarlyInit(void);

/*****************************************************************************/
/**
** \brief Removes EVS resources associated with specified Application
**
** \par Description
** This function is called by cFE Executive Services to cleanup after
** an Application has been terminated. It frees resources
** that have been allocated to the specified Application.
**
******************************************************************************/
extern int32 CFE_EVS_CleanUpApp(CFE_ES_AppId_t AppId);

/**@}*/

#endif /* CFE_EVS_CORE_INTERNAL_H */
179 changes: 179 additions & 0 deletions modules/core_api/fsw/inc/cfe_evs_extern_typedefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
/*
** GSC-18128-1, "Core Flight Executive Version 6.7"
**
** 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
*
* Declarations and prototypes for cfe_evs_extern_typedefs module
*/

#ifndef CFE_EVS_EXTERN_TYPEDEFS_H
#define CFE_EVS_EXTERN_TYPEDEFS_H

/* This header may be generated from an EDS file,
* tools are available and the feature is enabled */
#ifdef CFE_EDS_ENABLED_BUILD

/* Use the EDS generated version of these types */
#include "cfe_evs_eds_typedefs.h"

#else
/* Use the local definitions of these types */

#include "common_types.h"

/**
* @brief Label definitions associated with CFE_EVS_MsgFormat_Enum_t
*/
enum CFE_EVS_MsgFormat
{

/**
* @brief Short Format Messages
*/
CFE_EVS_MsgFormat_SHORT = 0,

/**
* @brief Long Format Messages
*/
CFE_EVS_MsgFormat_LONG = 1
};

/**
* @brief Identifies format of log messages
*
* @sa enum CFE_EVS_MsgFormat
*/
typedef uint8 CFE_EVS_MsgFormat_Enum_t;

/**
* @brief Label definitions associated with CFE_EVS_LogMode_Enum_t
*/
enum CFE_EVS_LogMode
{

/**
* @brief Overwrite Log Mode
*/
CFE_EVS_LogMode_OVERWRITE = 0,

/**
* @brief Discard Log Mode
*/
CFE_EVS_LogMode_DISCARD = 1
};

/**
* @brief Identifies handling of log messages after storage is filled
*
* @sa enum CFE_EVS_LogMode
*/
typedef uint8 CFE_EVS_LogMode_Enum_t;

/**
* @brief Label definitions associated with CFE_EVS_EventType_Enum_t
*/
enum CFE_EVS_EventType
{

/**
* @brief Events that are intended only for debugging, not nominal operations
*/
CFE_EVS_EventType_DEBUG = 1,

/**
* @brief Events that identify a state change or action that is not an error
*/
CFE_EVS_EventType_INFORMATION = 2,

/**
* @brief Events that identify an error but are not catastrophic (e.g. - bad command
*/
CFE_EVS_EventType_ERROR = 3,

/**
* @brief Events that identify errors that are unrecoverable autonomously
*/
CFE_EVS_EventType_CRITICAL = 4
};

/**
* @brief Identifies type of event message
*
* @sa enum CFE_EVS_EventType
*/
typedef uint16 CFE_EVS_EventType_Enum_t;

/**
* @brief Label definitions associated with CFE_EVS_EventFilter_Enum_t
*/
enum CFE_EVS_EventFilter
{

/**
* @brief Binary event filter
*/
CFE_EVS_EventFilter_BINARY = 0
};

/**
* @brief Identifies event filter schemes
*
* @sa enum CFE_EVS_EventFilter
*/
typedef uint8 CFE_EVS_EventFilter_Enum_t;

/**
* @brief Label definitions associated with CFE_EVS_EventOutput_Enum_t
*/
enum CFE_EVS_EventOutput
{

/**
* @brief Output Port 1
*/
CFE_EVS_EventOutput_PORT1 = 1,

/**
* @brief Output Port 2
*/
CFE_EVS_EventOutput_PORT2 = 2,

/**
* @brief Output Port 3
*/
CFE_EVS_EventOutput_PORT3 = 3,

/**
* @brief Output Port 4
*/
CFE_EVS_EventOutput_PORT4 = 4
};

/**
* @brief Identifies event output port
*
* @sa enum CFE_EVS_EventOutput
*/
typedef uint8 CFE_EVS_EventOutput_Enum_t;

#endif /* CFE_EDS_ENABLED_BUILD */

#endif /* CFE_EVS_EXTERN_TYPEDEFS_H */
Loading

0 comments on commit ba63e61

Please sign in to comment.