scc
2025.09
SystemC components library
ihex_parser.h
1
/*******************************************************************************
2
* Copyright 2025 MINRES Technologies GmbH
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*******************************************************************************/
16
17
#ifndef _UTIL_IHEX_PARSER_H_
18
#define _UTIL_IHEX_PARSER_H_
19
20
#include <cstdint>
21
#include <functional>
22
#include <iostream>
27
namespace
util
{
39
struct
ihex_parser
{
43
enum
{ IHEX_DATA_SIZE = 255 };
53
static
bool
parse
(std::istream&, std::function<
bool
(uint64_t, uint64_t,
const
uint8_t*)>);
54
};
55
}
// namespace util
56
#endif
util
SCC common utilities.
Definition
bit_field.h:30
util::ihex_parser
A utility class for parsing Intel Hex (IHEX) files.
Definition
ihex_parser.h:39
util::ihex_parser::parse
static bool parse(std::istream &, std::function< bool(uint64_t, uint64_t, const uint8_t *)>)
Parses an IHEX file from the given input stream and invokes a callback function for each data record ...
Definition
ihex_parser.cpp:41
src
common
util
ihex_parser.h
Generated by
1.15.0