-
Notifications
You must be signed in to change notification settings - Fork 0
/
md_test_utils.h
78 lines (66 loc) · 2.21 KB
/
md_test_utils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/************************************************************************
* NASA Docket No. GSC-18,922-1, and identified as “Core Flight
* System (cFS) Memory Dwell Application Version 2.4.1”
*
* Copyright (c) 2021 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:https://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
* This file contains the function prototypes and global variables for
* the unit test utilities for the MD application.
*/
#ifndef MD_TEST_UTILS_H
#define MD_TEST_UTILS_H
#include "md_app.h"
#include "md_platform_cfg.h"
#include "utstubs.h"
#include "cfe_msgids.h"
#include "md_extern_typedefs.h"
extern MD_AppData_t MD_AppData;
/*
* Global context structures
*/
typedef struct
{
uint16 EventID;
uint16 EventType;
char Spec[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];
} CFE_EVS_SendEvent_context_t;
typedef struct
{
char Spec[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH];
} CFE_ES_WriteToSysLog_context_t;
extern CFE_EVS_SendEvent_context_t context_CFE_EVS_SendEvent[];
extern CFE_ES_WriteToSysLog_context_t context_CFE_ES_WriteToSysLog;
/* Command buffer typedef for any handler */
typedef union
{
CFE_SB_Buffer_t Buf;
MD_NoArgsCmd_t NoArgsCmd;
MD_CmdStartStop_t CmdStartStop;
MD_CmdJam_t CmdJam;
#if MD_SIGNATURE_OPTION == 1
MD_CmdSetSignature_t CmdSetSignature;
#endif
} UT_CmdBuf_t;
extern UT_CmdBuf_t UT_CmdBuf;
/* Unit test ids */
#define MD_UT_MID_1 CFE_SB_ValueToMsgId(CFE_PLATFORM_TLM_MID_BASE + 1)
/*
* Function Definitions
*/
void MD_Test_Setup(void);
void MD_Test_TearDown(void);
#endif