F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
CRCChecker.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title CRCChecker.hpp
3 // \author ortega
4 // \brief hpp file for a crc32 checker
5 //
6 // \copyright
7 // Copyright 2009-2020, by the California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged.
10 // ======================================================================
11 
12 #ifndef CRC_CHECKER_HPP
13 #define CRC_CHECKER_HPP
14 
15 #include <FpConfig.hpp>
16 
17 namespace Utils {
18 
20  static const U32 CRC_MAX_FILENAME_SIZE = 128; // TODO use a config variable
21 
22  typedef enum
23  {
34  } crc_stat_t;
35 
36  crc_stat_t create_checksum_file(const char* const filename);
37  crc_stat_t read_crc32_from_file(const char* const fname, U32 &checksum_from_file);
38  crc_stat_t verify_checksum(const char* const filename, U32 &expected, U32 &actual);
39 
40 }
41 
42 #endif
static const FwSignedSizeType CRC_FILE_READ_BLOCK
Definition: CRCChecker.hpp:19
crc_stat_t create_checksum_file(const char *const fname)
Definition: CRCChecker.cpp:24
crc_stat_t read_crc32_from_file(const char *const fname, U32 &checksum_from_file)
Definition: CRCChecker.cpp:115
static const U32 CRC_MAX_FILENAME_SIZE
Definition: CRCChecker.hpp:20
crc_stat_t verify_checksum(const char *const fname, U32 &expected, U32 &actual)
Definition: CRCChecker.cpp:144
C++-compatible configuration header for fprime configuration.
PlatformSignedSizeType FwSignedSizeType
Definition: FpConfig.h:30