-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#216] Initial draft of MC_DISABLED;
- Loading branch information
Showing
9 changed files
with
112 additions
and
5 deletions.
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
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
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
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
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
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,63 @@ | ||
/* Copyright (C) 2009 - 2022 National Aeronautics and Space Administration. | ||
All Foreign Rights are Reserved to the U.S. Government. | ||
This software is provided "as is" without any warranty of any kind, either expressed, implied, or statutory, | ||
including, but not limited to, any warranty that the software will conform to specifications, any implied warranties | ||
of merchantability, fitness for a particular purpose, and freedom from infringement, and any warranty that the | ||
documentation will conform to the program, or any warranty that the software will be error free. | ||
In no event shall NASA be liable for any damages, including, but not limited to direct, indirect, special or | ||
consequential damages, arising out of, resulting from, or in any way connected with the software or its | ||
documentation, whether or not based upon warranty, contract, tort or otherwise, and whether or not loss was sustained | ||
from, or arose out of the results of, or use of, the software, documentation or services provided hereunder. | ||
ITC Team | ||
NASA IV&V | ||
[email protected] | ||
*/ | ||
#include "mc_interface.h" | ||
|
||
/* Variables */ | ||
static McInterfaceStruct mc_if_struct; | ||
|
||
/* Prototypes */ | ||
static int32_t mc_initialize(void); | ||
static void mc_log(int32_t error_code); | ||
static int32_t mc_shutdown(void); | ||
|
||
/* Functions */ | ||
McInterface get_mc_interface_disabled(void) | ||
{ | ||
/* MC Interface, SDLS */ | ||
mc_if_struct.mc_initialize = mc_initialize; | ||
mc_if_struct.mc_log = mc_log; | ||
mc_if_struct.mc_shutdown = mc_shutdown; | ||
|
||
/* MC Interface, SDLS-EP */ | ||
/* | ||
mc_if_struct.mc_ping = mc_ping; | ||
mc_if_struct.mc_log_status = mc_log_status; | ||
mc_if_struct.mc_dump_log = mc_dump_log; | ||
mc_if_struct.mc_erase_log = mc_erase_log; | ||
mc_if_struct.mc_self_test = mc_self_test; | ||
mc_if_struct.mc_alarm_reset_flag = mc_alarm_reset_flag; | ||
*/ | ||
|
||
return &mc_if_struct; | ||
} | ||
|
||
static int32_t mc_initialize(void) | ||
{ | ||
return CRYPTO_LIB_SUCCESS; | ||
} | ||
|
||
static void mc_log(int32_t error_code) | ||
{ | ||
error_code = error_code; | ||
return; | ||
} | ||
|
||
static int32_t mc_shutdown(void) | ||
{ | ||
return CRYPTO_LIB_SUCCESS; | ||
} |
29 changes: 29 additions & 0 deletions
29
src/mc/disabled_stub/mc_interface_disabled_stub.template.c
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,29 @@ | ||
/* Copyright (C) 2009 - 2022 National Aeronautics and Space Administration. | ||
All Foreign Rights are Reserved to the U.S. Government. | ||
This software is provided "as is" without any warranty of any kind, either expressed, implied, or statutory, | ||
including, but not limited to, any warranty that the software will conform to specifications, any implied warranties | ||
of merchantability, fitness for a particular purpose, and freedom from infringement, and any warranty that the | ||
documentation will conform to the program, or any warranty that the software will be error free. | ||
In no event shall NASA be liable for any damages, including, but not limited to direct, indirect, special or | ||
consequential damages, arising out of, resulting from, or in any way connected with the software or its | ||
documentation, whether or not based upon warranty, contract, tort or otherwise, and whether or not loss was sustained | ||
from, or arose out of the results of, or use of, the software, documentation or services provided hereunder. | ||
ITC Team | ||
NASA IV&V | ||
[email protected] | ||
*/ | ||
|
||
#include "mc_interface.h" | ||
|
||
/* Variables */ | ||
static McInterfaceStruct mc_if_struct; | ||
|
||
/* Functions */ | ||
McInterface get_mc_interface_disabled(void) | ||
{ | ||
fprintf(stderr,"ERROR: Loading disabled monitoring and control interface stub source code. Rebuild CryptoLib with -DMC_DISABLED=ON to use implementation.\n"); | ||
return &mc_if_struct; | ||
} |
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
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