srecord: input/file/os65v.h Source File

srecord 1.65.0

Loading...
Searching...
No Matches
os65v.h
Go to the documentation of this file.
1//
2// srecord - manipulate eprom load files
3// Copyright (C) 2002, 2006-2008, 2010, 2011, 2013 Peter Miller
4//
5// This program is free software; you can redistribute it and/or modify it
6// under the terms of the GNU Lesser General Public License as published by
7// the Free Software Foundation; either version 3 of the License, or (at your
8// option) any later version.
9//
10// This program is distributed in the hope that it will be useful, but WITHOUT
11// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12// FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13// License for more details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with this program. If not, see <http://www.gnu.org/licenses/>.
17//
18
19#ifndef SRECORD_INPUT_FILE_OS65V_H
20#define SRECORD_INPUT_FILE_OS65V_H
21
22
23#include <srecord/input/file.h>
24
25namespace srecord {
26
27/**
28 * The srecord::input_file_os65v class is used to represent the input state
29 * of an Ohio Scientific hexadecimal formatted file.
30 */
31 class input_file_os65v:
32 public input_file
33{
34public:
35 /**
36 * The destructor.
37 */
38 virtual ~input_file_os65v();
39
40 /**
41 * The create class method is used to create new dynamically
42 * allocated instances of this class.
43 *
44 * @param file_name
45 * The name of the file to be read.
46 * @returns
47 * smart pointer to new instance
48 */
49 static pointer create(const std::string &file_name);
50
51protected:
52 // See base class for documentation.
53 bool read(record &record);
54
55 // See base class for documentation.
56 const char *get_file_format_name(void) const;
57
58 // See base class for documentation.
59 int format_option_number(void) const;
60
61private:
62 /**
63 * The constructor.
64 *
65 * @param file_name
66 * The name of the file to be read.
67 */
68 input_file_os65v(const std::string &file_name);
69
70 /**
71 * The default constructor. Do not use.
72 */
73 input_file_os65v();
74
75 /**
76 * The copy constructor. Do not use.
77 */
78 input_file_os65v(const input_file_os65v &);
79
80 /**
81 * The assignment operator. Do not use.
82 */
83 input_file_os65v &operator=(const input_file_os65v &);
84
85 /**
86 * The read_inner method is used by the read method to get
87 * another portion of input.
88 */
89 bool read_inner(record &);
90
91 /**
92 * The seen_some_input instance variable is used to remember whether
93 * or not some valid inpout has been seen.
94 */
95 bool seen_some_input;
96
97 /**
98 * The address instance variable is used to remember the current
99 * address. It is advanced for every byte read.
100 */
101 unsigned long address;
102
103 /**
104 * The state instance variable is used to member the current input
105 * state (unknown, address, data).
106 */
107 char state;
108
109 /**
110 * The ignore_the_rest instance variable is used to remember when
111 * it is time to ignore the rest of the file. This happens after a
112 * "return to monitor" sequence, or after a "GO" command.
113 */
114 bool ignore_the_rest;
115};
116
117};
118
119#endif // SRECORD_INPUT_FILE_OS65V_H
120// vim: set ts=8 sw=4 et :
srecord::input_file_os65v::~input_file_os65v
virtual ~input_file_os65v()
The destructor.
srecord::input_file_os65v::get_file_format_name
const char * get_file_format_name(void) const
The get_file_format_name method is used to find out the name of the file format being read.
srecord::input_file_os65v::format_option_number
int format_option_number(void) const
The format_option_number method is used to obtain the option number, which can then be turned into te...
srecord::input_file_os65v::read
bool read(record &record)
The read method is used to read one record from the input.
srecord::input_file_os65v::create
static pointer create(const std::string &file_name)
The create class method is used to create new dynamically allocated instances of this class.
srecord::input_file::input_file
input_file(const std::string &file_name)
The constructor.
srecord::input_file::pointer
std::shared_ptr< input_file > pointer
Definition file.h:39
srecord::record
The srecord::record class is used to represent a data record read from a file.
Definition record.h:35
file.h
srecord
Definition adler16.h:25