Debian Codegraph @

bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp

raw symbols SCIP
1 /*
2 * This file is part of the libsigrok project.
3 *
4 * Copyright (C) 2013-2014 Martin Ling <[email protected]>
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 /**
21
22 @mainpage API Reference
23
24 Introduction
25 ------------
26
27 The libsigrokcxx API provides an object-oriented C++ interface to the
28 functionality in libsigrok, including automatic memory and resource management.
29
30 It is built on top of the public libsigrok C API, and is designed to be used as
31 a standalone alternative API. Programs should not mix usage of the C and C++
32 APIs; the C++ interface code needs to have full control of all C API calls for
33 resources to be managed correctly.
34
35 Memory management
36 -----------------
37
38 All runtime objects created through the C++ API are passed and accessed via
39 shared pointers, using the C++11 std::shared_ptr implementation. This means
40 that a reference count is kept for each object.
41
42 Shared pointers can be copied and assigned in a user's program, automatically
43 updating their reference count and deleting objects when they are no longer in
44 use. The C++ interface code also keeps track of internal dependencies between
45 libsigrok resources, and ensures that objects are not prematurely deleted when
46 their resources are in use by other objects.
47
48 This means that management of libsigrokcxx objects and their underlying
49 libsigrok resources can be treated as fully automatic. As long as all shared
50 pointers to objects are deleted or reassigned when no longer in use, all
51 underlying resources will be released at the right time.
52
53 Getting started
54 ---------------
55
56 Usage of the C++ API needs to begin with a call to sigrok::Context::create().
57 This will create the global libsigrok context and returns a shared pointer to
58 the sigrok::Context object. Methods on this object provide access to the
59 hardware drivers, input and output formats supported by the library, as well
60 as means of creating other objects such as sessions and triggers.
61
62 Error handling
63 --------------
64
65 When any libsigrok C API call returns an error, a sigrok::Error exception is
66 raised, which provides access to the error code and description.
67
68 */
69
70 #ifndef LIBSIGROKCXX_HPP
71 #define LIBSIGROKCXX_HPPcxx . . $ `bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp:71:9`!
72
73 #include <libsigrok/libsigrok.h>cxx . . $ `<file>/include/libsigrok/libsigrok.h`/
74
75 /* Suppress warnings due to glibmm's use of std::auto_ptr<> in a public
76 * header file. To be removed once glibmm is fixed. */
77 G_GNUC_BEGIN_IGNORE_DEPRECATIONScxx . . $ `<external>/12741050725406041920/gmacros.h:771:9`!
78 #include <glibmm.h>
79 G_GNUC_END_IGNORE_DEPRECATIONScxx . . $ `<external>/12741050725406041920/gmacros.h:774:9`!
80
81 #include <stdexcept>
82 #include <memory>
83 #include <vector>
84 #include <map>
85 #include <set>
86
87 namespace sigrokcxx . . $ sigrok/
88 {
89
90 /* Forward declarations */
91 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Errorcxx . . $ sigrok/Error#;
92 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Contextcxx . . $ sigrok/Context#;
93 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Drivercxx . . $ sigrok/Driver#;
94 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Devicecxx . . $ sigrok/Device#;
95 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! HardwareDevicecxx . . $ sigrok/HardwareDevice#;
96 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Channelcxx . . $ sigrok/Channel#;
97 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Sessioncxx . . $ sigrok/Session#;
98 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! ConfigKeycxx . . $ sigrok/ConfigKey#;
99 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Capabilitycxx . . $ sigrok/Capability#;
100 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! InputFormatcxx . . $ sigrok/InputFormat#;
101 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! OutputFormatcxx . . $ sigrok/OutputFormat#;
102 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! OutputFlagcxx . . $ sigrok/OutputFlag#;
103 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! LogLevelcxx . . $ sigrok/LogLevel#;
104 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! ChannelGroupcxx . . $ sigrok/ChannelGroup#;
105 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Triggercxx . . $ sigrok/Trigger#;
106 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! TriggerStagecxx . . $ sigrok/TriggerStage#;
107 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! TriggerMatchcxx . . $ sigrok/TriggerMatch#;
108 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! TriggerMatchTypecxx . . $ sigrok/TriggerMatchType#;
109 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! ChannelTypecxx . . $ sigrok/ChannelType#;
110 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Packetcxx . . $ sigrok/Packet#;
111 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! PacketPayloadcxx . . $ sigrok/PacketPayload#;
112 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! PacketTypecxx . . $ sigrok/PacketType#;
113 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Quantitycxx . . $ sigrok/Quantity#;
114 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Unitcxx . . $ sigrok/Unit#;
115 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! QuantityFlagcxx . . $ sigrok/QuantityFlag#;
116 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Rationalcxx . . $ sigrok/Rational#;
117 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Inputcxx . . $ sigrok/Input#;
118 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! InputDevicecxx . . $ sigrok/InputDevice#;
119 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Outputcxx . . $ sigrok/Output#;
120 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! DataTypecxx . . $ sigrok/DataType#;
121 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Optioncxx . . $ sigrok/Option#;
122 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! UserDevicecxx . . $ sigrok/UserDevice#;
123
124 /** Exception thrown when an error code is returned by any libsigrok call. */
125 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Errorcxx . . $ sigrok/Error#: public stdcxx . . $ std/::exception
126 {
127 public:
128 explicit Errorcxx . . $ sigrok/Error#Error(d4f767463ce0a6b3).(int result);
129 ~cxx . . $ sigrok/Error#`~Error`(ced63f7c635d850d).Errorcxx . . $ sigrok/Error#() noexcept;
130 const int resultcxx . . $ sigrok/Error#result.;
131 const char *whatcxx . . $ sigrok/Error#what(ba32b354807b2b81).() const noexcept;
132 };
133
134 /* Base template for classes whose resources are owned by a parent object. */
135 template <class Class, class Parent>
136 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! ParentOwnedcxx . . $ sigrok/ParentOwned#
137 {
138 private:
139 /* Weak pointer for shared_from_this() implementation. */
140 stdcxx . . $ std/::weak_ptrcxx . . $ std/weak_ptr#<Class> _weak_thiscxx . . $ sigrok/ParentOwned#_weak_this.;
141
142 static void reset_parentcxx . . $ sigrok/ParentOwned#reset_parent(ebd0a1552f8ce24f).(Class *object)
143 {
144 if (!object->_parent)
145 throw Errorcxx . . $ sigrok/Error#Error(d4f767463ce0a6b3).(SR_ERR_BUG);
146 object->_parent.reset();
147 }
148
149 protected:
150 /* Parent object which owns this child object's underlying structure.
151
152 This shared pointer will be null when this child is unused, but
153 will be assigned to point to the parent before any shared pointer
154 to this child is handed out to the user.
155
156 When the reference count of this child falls to zero, this shared
157 pointer to its parent is reset by a custom deleter on the child's
158 shared pointer.
159
160 This strategy ensures that the destructors for both the child and
161 the parent are called at the correct time, i.e. only when all
162 references to both the parent and all its children are gone. */
163 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Parent> _parentcxx . . $ sigrok/ParentOwned#_parent.;
164
165 ParentOwnedcxx . . $ sigrok/ParentOwned#`ParentOwned<Class, Parent>`(49f6e7a06ebc5aa8).() {}
166
167 /* Note, this implementation will create a new smart_ptr if none exists. */
168 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Class> shared_from_thiscxx . . $ sigrok/ParentOwned#shared_from_this(676e398b0772ed8e).()
169 {
170 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Class> shared = _weak_thiscxx . . $ sigrok/ParentOwned#_weak_this..lockcxx . . $ std/weak_ptr#lock(a1b13de252cffcea).();
171
172 if (!shared)
173 {
174 shared.resetcxx . . $ std/__shared_ptr#reset(ced63f7c635d850d).(static_cast<Class *>(this), &reset_parentcxx . . $ sigrok/ParentOwned#reset_parent(ebd0a1552f8ce24f).);
175 _weak_thiscxx . . $ sigrok/ParentOwned#_weak_this. = shared;
176 }
177
178 return shared;
179 }
180
181 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Class> share_owned_bycxx . . $ sigrok/ParentOwned#share_owned_by(bdac5665f95b957d).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Parent> parent)
182 {
183 if (!parent)
184 throw Errorcxx . . $ sigrok/Error#Error(d4f767463ce0a6b3).(SR_ERR_BUG);
185 this->_parentcxx . . $ sigrok/ParentOwned#_parent. = parent;
186 return shared_from_thiscxx . . $ sigrok/ParentOwned#shared_from_this(676e398b0772ed8e).();
187 }
188
189 public:
190 /* Get parent object that owns this object. */
191 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Parent> parentcxx . . $ sigrok/ParentOwned#parent(699e4a4e0fbb3235).()
192 {
193 return _parentcxx . . $ sigrok/ParentOwned#_parent.;
194 }
195 };
196
197 /* Base template for classes whose resources are owned by the user. */
198 template <class Class>
199 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! UserOwnedcxx . . $ sigrok/UserOwned# : public stdcxx . . $ std/::enable_shared_from_thiscxx . . $ std/enable_shared_from_this#<Class>
200 {
201 protected:
202 UserOwnedcxx . . $ sigrok/UserOwned#`UserOwned<Class>`(49f6e7a06ebc5aa8).() {}
203
204 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Class> shared_from_thiscxx . . $ sigrok/UserOwned#shared_from_this(676e398b0772ed8e).()
205 {
206 auto shared = stdcxx . . $ std/::enable_shared_from_thiscxx . . $ std/enable_shared_from_this#<Class>::shared_from_this();
207 if (!shared)
208 throw Errorcxx . . $ sigrok/Error#Error(d4f767463ce0a6b3).(SR_ERR_BUG);
209 return shared;
210 }
211 };
212
213 /** Type of log callback */
214 typedef stdcxx . . $ std/::functioncxx . . $ std/function#<void(const LogLevelcxx . . $ sigrok/LogLevel# *, stdcxx . . $ std/::stringcxx . . $ std/string# message)> LogCallbackFunctioncxx . . $ sigrok/LogCallbackFunction#;
215
216 /** Resource reader delegate. */
217 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! ResourceReadercxx . . $ sigrok/ResourceReader#
218 {
219 public:
220 ResourceReadercxx . . $ sigrok/ResourceReader#ResourceReader(49f6e7a06ebc5aa8).() {}
221 virtual ~cxx . . $ sigrok/ResourceReader#`~ResourceReader`(ced63f7c635d850d).ResourceReadercxx . . $ sigrok/ResourceReader#();
222 private:
223 /** Resource open hook. */
224 virtual void opencxx . . $ sigrok/ResourceReader#open(214e8a0c69b39289).(struct sr_resource *res, stdcxx . . $ std/::stringcxx . . $ std/string# name) = 0;
225 /** Resource close hook. */
226 virtual void closecxx . . $ sigrok/ResourceReader#close(b6e331cd329e161d).(struct sr_resource *res) = 0;
227 /** Resource read hook. */
228 virtual size_t readcxx . . $ sigrok/ResourceReader#read(f939044d33101403).(const struct sr_resource *res, void *buf, size_t count) = 0;
229
230 static SR_PRIVcxx . . $ `include/libsigrok/libsigrok.h:128:9`! int open_callbackcxx . . $ sigrok/ResourceReader#open_callback(af53a1a20faf5814).(struct sr_resource *res,
231 const char *name, void *cb_data) noexcept;
232 static SR_PRIVcxx . . $ `include/libsigrok/libsigrok.h:128:9`! int close_callbackcxx . . $ sigrok/ResourceReader#close_callback(9f1256f8791b3e10).(struct sr_resource *res,
233 void *cb_data) noexcept;
234 static SR_PRIVcxx . . $ `include/libsigrok/libsigrok.h:128:9`! gssize read_callbackcxx . . $ sigrok/ResourceReader#read_callback(fd370e2baec1036e).(const struct sr_resource *res,
235 void *buf, size_t count, void *cb_data) noexcept;
236 friend class Contextcxx . . $ sigrok/Context#;
237 };
238
239 /** The global libsigrok context */
240 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Contextcxx . . $ sigrok/Context# : public UserOwnedcxx . . $ sigrok/UserOwned#<Contextcxx . . $ sigrok/Context#>
241 {
242 public:
243 /** Create new context */
244 static stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Contextcxx . . $ sigrok/Context#> createcxx . . $ sigrok/Context#create(d21b66c3c53303b3).();
245 /** libsigrok package version. */
246 static stdcxx . . $ std/::stringcxx . . $ std/string# package_versioncxx . . $ sigrok/Context#package_version(efd28698952f529a).();
247 /** libsigrok library version. */
248 static stdcxx . . $ std/::stringcxx . . $ std/string# lib_versioncxx . . $ sigrok/Context#lib_version(efd28698952f529a).();
249 /** Available hardware drivers, indexed by name. */
250 stdcxx . . $ std/::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Drivercxx . . $ sigrok/Driver#> > driverscxx . . $ sigrok/Context#drivers(1599ace750210e19).();
251 /** Available input formats, indexed by name. */
252 stdcxx . . $ std/::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<InputFormatcxx . . $ sigrok/InputFormat#> > input_formatscxx . . $ sigrok/Context#input_formats(75ef39b32c89c9af).();
253 /** Lookup the responsible input module for an input file. */
254 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<InputFormatcxx . . $ sigrok/InputFormat#> input_format_matchcxx . . $ sigrok/Context#input_format_match(6d6f87abea93ba19).(stdcxx . . $ std/::stringcxx . . $ std/string# filename);
255 /** Available output formats, indexed by name. */
256 stdcxx . . $ std/::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<OutputFormatcxx . . $ sigrok/OutputFormat#> > output_formatscxx . . $ sigrok/Context#output_formats(4fb78eb1b1157358).();
257 /** Current log level. */
258 const LogLevelcxx . . $ sigrok/LogLevel# *log_levelcxx . . $ sigrok/Context#log_level(588e2980f092eda5).() const;
259 /** Set the log level.
260 * @param level LogLevel to use. */
261 void set_log_levelcxx . . $ sigrok/Context#set_log_level(430d955f56207c9b).(const LogLevelcxx . . $ sigrok/LogLevel# *level);
262 /** Set the log callback.
263 * @param callback Callback of the form callback(LogLevel, string). */
264 void set_log_callbackcxx . . $ sigrok/Context#set_log_callback(f85c67c53028233e).(LogCallbackFunctioncxx . . $ sigrok/LogCallbackFunction# callback);
265 /** Set the log callback to the default handler. */
266 void set_log_callback_defaultcxx . . $ sigrok/Context#set_log_callback_default(49f6e7a06ebc5aa8).();
267 /** Install a delegate for reading resource files.
268 * @param reader The resource reader delegate, or nullptr to unset. */
269 void set_resource_readercxx . . $ sigrok/Context#set_resource_reader(b02f4f3a147afa53).(ResourceReadercxx . . $ sigrok/ResourceReader# *reader);
270 /** Create a new session. */
271 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Sessioncxx . . $ sigrok/Session#> create_sessioncxx . . $ sigrok/Context#create_session(d028a682ac49200c).();
272 /** Create a new user device. */
273 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<UserDevicecxx . . $ sigrok/UserDevice#> create_user_devicecxx . . $ sigrok/Context#create_user_device(e7732e711aec3d6c).(
274 stdcxx . . $ std/::stringcxx . . $ std/string# vendor, stdcxx . . $ std/::stringcxx . . $ std/string# model, stdcxx . . $ std/::stringcxx . . $ std/string# version);
275 /** Create a header packet. */
276 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Packetcxx . . $ sigrok/Packet#> create_header_packetcxx . . $ sigrok/Context#create_header_packet(87fc124357087e11).(Glibcxx . . $ Glib/::TimeValcxx . . $ Glib/TimeVal# start_time);
277 /** Create a meta packet. */
278 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Packetcxx . . $ sigrok/Packet#> create_meta_packetcxx . . $ sigrok/Context#create_meta_packet(317b5fd1c7eb9ec4).(
279 stdcxx . . $ std/::mapcxx . . $ std/map#<const ConfigKeycxx . . $ sigrok/ConfigKey# *, Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase#> config);
280 /** Create a logic packet. */
281 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Packetcxx . . $ sigrok/Packet#> create_logic_packetcxx . . $ sigrok/Context#create_logic_packet(21087aeeb87a5a36).(
282 void *data_pointer, size_t data_length, unsigned int unit_size);
283 /** Create an analog packet. */
284 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Packetcxx . . $ sigrok/Packet#> create_analog_packetcxx . . $ sigrok/Context#create_analog_packet(e74b82fa26374eda).(
285 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Channelcxx . . $ sigrok/Channel#> > channels,
286 float *data_pointer, unsigned int num_samples, const Quantitycxx . . $ sigrok/Quantity# *mq,
287 const Unitcxx . . $ sigrok/Unit# *unit, stdcxx . . $ std/::vectorcxx . . $ std/vector#<const QuantityFlagcxx . . $ sigrok/QuantityFlag# *> mqflags);
288 /** Create an end packet. */
289 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Packetcxx . . $ sigrok/Packet#> create_end_packetcxx . . $ sigrok/Context#create_end_packet(b8fc133ffe614fbf).();
290 /** Load a saved session.
291 * @param filename File name string. */
292 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Sessioncxx . . $ sigrok/Session#> load_sessioncxx . . $ sigrok/Context#load_session(1e18b27143aa3492).(stdcxx . . $ std/::stringcxx . . $ std/string# filename);
293 /** Create a new trigger.
294 * @param name Name string for new trigger. */
295 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Triggercxx . . $ sigrok/Trigger#> create_triggercxx . . $ sigrok/Context#create_trigger(b03c11c21793b5b8).(stdcxx . . $ std/::stringcxx . . $ std/string# name);
296 /** Open an input file.
297 * @param filename File name string. */
298 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Inputcxx . . $ sigrok/Input#> open_filecxx . . $ sigrok/Context#open_file(a7070d19ca3f6999).(stdcxx . . $ std/::stringcxx . . $ std/string# filename);
299 /** Open an input stream based on header data.
300 * @param header Initial data from stream. */
301 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Inputcxx . . $ sigrok/Input#> open_streamcxx . . $ sigrok/Context#open_stream(a7070d19ca3f6999).(stdcxx . . $ std/::stringcxx . . $ std/string# header);
302 stdcxx . . $ std/::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> serialscxx . . $ sigrok/Context#serials(a15b711fde05b6f2).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Drivercxx . . $ sigrok/Driver#> driver) const;
303 private:
304 struct sr_context *_structurecxx . . $ sigrok/Context#_structure.;
305 stdcxx . . $ std/::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<Drivercxx . . $ sigrok/Driver#> > _driverscxx . . $ sigrok/Context#_drivers.;
306 stdcxx . . $ std/::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<InputFormatcxx . . $ sigrok/InputFormat#> > _input_formatscxx . . $ sigrok/Context#_input_formats.;
307 stdcxx . . $ std/::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<OutputFormatcxx . . $ sigrok/OutputFormat#> > _output_formatscxx . . $ sigrok/Context#_output_formats.;
308 Sessioncxx . . $ sigrok/Session# *_sessioncxx . . $ sigrok/Context#_session.;
309 LogCallbackFunctioncxx . . $ sigrok/LogCallbackFunction# _log_callbackcxx . . $ sigrok/Context#_log_callback.;
310 Contextcxx . . $ sigrok/Context#Context(49f6e7a06ebc5aa8).();
311 ~cxx . . $ sigrok/Context#`~Context`(ced63f7c635d850d).Contextcxx . . $ sigrok/Context#();
312 friend class Sessioncxx . . $ sigrok/Session#;
313 friend class Drivercxx . . $ sigrok/Driver#;
314 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<Contextcxx . . $ sigrok/Context#>;
315 };
316
317 /** An object that can be configured. */
318 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Configurablecxx . . $ sigrok/Configurable#
319 {
320 public:
321 /** Supported configuration keys. */
322 stdcxx . . $ std/::setcxx . . $ std/set#<const ConfigKeycxx . . $ sigrok/ConfigKey# *> config_keyscxx . . $ sigrok/Configurable#config_keys(76bc23ef13c08d9).() const;
323 /** Read configuration for the given key.
324 * @param key ConfigKey to read. */
325 Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase# config_getcxx . . $ sigrok/Configurable#config_get(661a6ea2e6b7aa4b).(const ConfigKeycxx . . $ sigrok/ConfigKey# *key) const;
326 /** Set configuration for the given key to a specified value.
327 * @param key ConfigKey to set.
328 * @param value Value to set. */
329 void config_setcxx . . $ sigrok/Configurable#config_set(6007688ad3181a49).(const ConfigKeycxx . . $ sigrok/ConfigKey# *key, const Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase# &value);
330 /** Enumerate available values for the given configuration key.
331 * @param key ConfigKey to enumerate values for. */
332 Glibcxx . . $ Glib/::VariantContainerBasecxx . . $ Glib/VariantContainerBase# config_listcxx . . $ sigrok/Configurable#config_list(5c22f9070a16e941).(const ConfigKeycxx . . $ sigrok/ConfigKey# *key) const;
333 /** Enumerate configuration capabilities for the given configuration key.
334 * @param key ConfigKey to enumerate capabilities for. */
335 stdcxx . . $ std/::setcxx . . $ std/set#<const Capabilitycxx . . $ sigrok/Capability# *> config_capabilitiescxx . . $ sigrok/Configurable#config_capabilities(7636acb9dbba9e10).(const ConfigKeycxx . . $ sigrok/ConfigKey# *key) const;
336 /** Check whether a configuration capability is supported for a given key.
337 * @param key ConfigKey to check.
338 * @param capability Capability to check for. */
339 bool config_checkcxx . . $ sigrok/Configurable#config_check(b60634020e187e45).(const ConfigKeycxx . . $ sigrok/ConfigKey# *key, const Capabilitycxx . . $ sigrok/Capability# *capability) const;
340 protected:
341 Configurablecxx . . $ sigrok/Configurable#Configurable(283c4488c2ec2419).(
342 struct sr_dev_driver *driver,
343 struct sr_dev_instcxx . . $ sr_dev_inst# *sdi,
344 struct sr_channel_group *channel_group);
345 virtual ~cxx . . $ sigrok/Configurable#`~Configurable`(ced63f7c635d850d).Configurablecxx . . $ sigrok/Configurable#();
346 struct sr_dev_driver *config_drivercxx . . $ sigrok/Configurable#config_driver.;
347 struct sr_dev_instcxx . . $ sr_dev_inst# *config_sdicxx . . $ sigrok/Configurable#config_sdi.;
348 struct sr_channel_group *config_channel_groupcxx . . $ sigrok/Configurable#config_channel_group.;
349 };
350
351 /** A hardware driver provided by the library */
352 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Drivercxx . . $ sigrok/Driver# : public ParentOwnedcxx . . $ sigrok/ParentOwned#<Drivercxx . . $ sigrok/Driver#, Contextcxx . . $ sigrok/Context#>, public Configurablecxx . . $ sigrok/Configurable#
353 {
354 public:
355 /** Name of this driver. */
356 stdcxx . . $ std/::stringcxx . . $ std/string# namecxx . . $ sigrok/Driver#name(219584694fe2b248).() const;
357 /** Long name for this driver. */
358 stdcxx . . $ std/::stringcxx . . $ std/string# long_namecxx . . $ sigrok/Driver#long_name(219584694fe2b248).() const;
359 /** Scan options supported by this driver. */
360 stdcxx . . $ std/::setcxx . . $ std/set#<const ConfigKeycxx . . $ sigrok/ConfigKey# *> scan_optionscxx . . $ sigrok/Driver#scan_options(76bc23ef13c08d9).() const;
361 /** Scan for devices and return a list of devices found.
362 * @param options Mapping of (ConfigKey, value) pairs. */
363 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<HardwareDevicecxx . . $ sigrok/HardwareDevice#> > scancxx . . $ sigrok/Driver#scan(d8ee5246a8bc7bf0).(stdcxx . . $ std/::mapcxx . . $ std/map#<const ConfigKeycxx . . $ sigrok/ConfigKey# *, Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase#>
364 options = stdcxx . . $ std/map#map(49f6e7a06ebc5aa8).::mapcxx . . $ std/map#<const ConfigKeycxx . . $ sigrok/ConfigKey# *, Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase#>());
365 private:
366 struct sr_dev_driver *_structurecxx . . $ sigrok/Driver#_structure.;
367 bool _initializedcxx . . $ sigrok/Driver#_initialized.;
368 stdcxx . . $ std/::vectorcxx . . $ std/vector#<HardwareDevicecxx . . $ sigrok/HardwareDevice# *> _devicescxx . . $ sigrok/Driver#_devices.;
369 explicit Drivercxx . . $ sigrok/Driver#Driver(34d49490a1227cd6).(struct sr_dev_driver *structure);
370 ~cxx . . $ sigrok/Driver#`~Driver`(ced63f7c635d850d).Drivercxx . . $ sigrok/Driver#();
371 friend class Contextcxx . . $ sigrok/Context#;
372 friend class HardwareDevicecxx . . $ sigrok/HardwareDevice#;
373 friend class ChannelGroupcxx . . $ sigrok/ChannelGroup#;
374 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<Drivercxx . . $ sigrok/Driver#>;
375 };
376
377 /** A generic device, either hardware or virtual */
378 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Devicecxx . . $ sigrok/Device# : public Configurablecxx . . $ sigrok/Configurable#
379 {
380 public:
381 /** Vendor name for this device. */
382 stdcxx . . $ std/::stringcxx . . $ std/string# vendorcxx . . $ sigrok/Device#vendor(219584694fe2b248).() const;
383 /** Model name for this device. */
384 stdcxx . . $ std/::stringcxx . . $ std/string# modelcxx . . $ sigrok/Device#model(219584694fe2b248).() const;
385 /** Version string for this device. */
386 stdcxx . . $ std/::stringcxx . . $ std/string# versioncxx . . $ sigrok/Device#version(219584694fe2b248).() const;
387 /** Serial number for this device. */
388 stdcxx . . $ std/::stringcxx . . $ std/string# serial_numbercxx . . $ sigrok/Device#serial_number(219584694fe2b248).() const;
389 /** Connection ID for this device. */
390 stdcxx . . $ std/::stringcxx . . $ std/string# connection_idcxx . . $ sigrok/Device#connection_id(219584694fe2b248).() const;
391 /** List of the channels available on this device. */
392 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Channelcxx . . $ sigrok/Channel#> > channelscxx . . $ sigrok/Device#channels(fb362987ee4d880e).();
393 /** Channel groups available on this device, indexed by name. */
394 stdcxx . . $ std/::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<ChannelGroupcxx . . $ sigrok/ChannelGroup#> > channel_groupscxx . . $ sigrok/Device#channel_groups(2d736fe00504ca7).();
395 /** Open device. */
396 void opencxx . . $ sigrok/Device#open(49f6e7a06ebc5aa8).();
397 /** Close device. */
398 void closecxx . . $ sigrok/Device#close(49f6e7a06ebc5aa8).();
399 protected:
400 explicit Devicecxx . . $ sigrok/Device#Device(f888466bd8db8b2b).(struct sr_dev_instcxx . . $ sr_dev_inst# *structure);
401 ~cxx . . $ sigrok/Device#`~Device`(ced63f7c635d850d).Devicecxx . . $ sigrok/Device#();
402 virtual stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Devicecxx . . $ sigrok/Device#> get_shared_from_thiscxx . . $ sigrok/Device#get_shared_from_this(863503f11ba56615).() = 0;
403 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Channelcxx . . $ sigrok/Channel#> get_channelcxx . . $ sigrok/Device#get_channel(d0f5d8616c1ad81).(struct sr_channelcxx . . $ sr_channel# *ptr);
404
405 struct sr_dev_instcxx . . $ sr_dev_inst# *_structurecxx . . $ sigrok/Device#_structure.;
406 stdcxx . . $ std/::mapcxx . . $ std/map#<struct sr_channelcxx . . $ sr_channel# *, stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<Channelcxx . . $ sigrok/Channel#> > _channelscxx . . $ sigrok/Device#_channels.;
407 private:
408 stdcxx . . $ std/::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<ChannelGroupcxx . . $ sigrok/ChannelGroup#> > _channel_groupscxx . . $ sigrok/Device#_channel_groups.;
409
410 friend class Sessioncxx . . $ sigrok/Session#;
411 friend class Channelcxx . . $ sigrok/Channel#;
412 friend class ChannelGroupcxx . . $ sigrok/ChannelGroup#;
413 friend class Outputcxx . . $ sigrok/Output#;
414 friend class Analogcxx . . $ sigrok/Analog#;
415 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<Devicecxx . . $ sigrok/Device#>;
416 };
417
418 /** A real hardware device, connected via a driver */
419 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! HardwareDevicecxx . . $ sigrok/HardwareDevice# :
420 public UserOwnedcxx . . $ sigrok/UserOwned#<HardwareDevicecxx . . $ sigrok/HardwareDevice#>,
421 public Devicecxx . . $ sigrok/Device#
422 {
423 public:
424 /** Driver providing this device. */
425 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Drivercxx . . $ sigrok/Driver#> drivercxx . . $ sigrok/HardwareDevice#driver(1189a6daa7994c95).();
426 private:
427 HardwareDevicecxx . . $ sigrok/HardwareDevice#HardwareDevice(139cad4767fd412).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Drivercxx . . $ sigrok/Driver#> driver, struct sr_dev_instcxx . . $ sr_dev_inst# *structure);
428 ~cxx . . $ sigrok/HardwareDevice#`~HardwareDevice`(ced63f7c635d850d).HardwareDevicecxx . . $ sigrok/HardwareDevice#();
429 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Devicecxx . . $ sigrok/Device#> get_shared_from_thiscxx . . $ sigrok/HardwareDevice#get_shared_from_this(863503f11ba56615).();
430 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Drivercxx . . $ sigrok/Driver#> _drivercxx . . $ sigrok/HardwareDevice#_driver.;
431
432 friend class Drivercxx . . $ sigrok/Driver#;
433 friend class ChannelGroupcxx . . $ sigrok/ChannelGroup#;
434 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<HardwareDevicecxx . . $ sigrok/HardwareDevice#>;
435 };
436
437 /** A virtual device, created by the user */
438 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! UserDevicecxx . . $ sigrok/UserDevice# :
439 public UserOwnedcxx . . $ sigrok/UserOwned#<UserDevicecxx . . $ sigrok/UserDevice#>,
440 public Devicecxx . . $ sigrok/Device#
441 {
442 public:
443 /** Add a new channel to this device. */
444 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Channelcxx . . $ sigrok/Channel#> add_channelcxx . . $ sigrok/UserDevice#add_channel(f368b751668a107c).(unsigned int index, const ChannelTypecxx . . $ sigrok/ChannelType# *type, stdcxx . . $ std/::stringcxx . . $ std/string# name);
445 private:
446 UserDevicecxx . . $ sigrok/UserDevice#UserDevice(b078d394f433f1d4).(stdcxx . . $ std/::stringcxx . . $ std/string# vendor, stdcxx . . $ std/::stringcxx . . $ std/string# model, stdcxx . . $ std/::stringcxx . . $ std/string# version);
447 ~cxx . . $ sigrok/UserDevice#`~UserDevice`(ced63f7c635d850d).UserDevicecxx . . $ sigrok/UserDevice#();
448 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Devicecxx . . $ sigrok/Device#> get_shared_from_thiscxx . . $ sigrok/UserDevice#get_shared_from_this(863503f11ba56615).();
449
450 friend class Contextcxx . . $ sigrok/Context#;
451 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<UserDevicecxx . . $ sigrok/UserDevice#>;
452 };
453
454 /** A channel on a device */
455 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Channelcxx . . $ sigrok/Channel# :
456 public ParentOwnedcxx . . $ sigrok/ParentOwned#<Channelcxx . . $ sigrok/Channel#, Devicecxx . . $ sigrok/Device#>
457 {
458 public:
459 /** Current name of this channel. */
460 stdcxx . . $ std/::stringcxx . . $ std/string# namecxx . . $ sigrok/Channel#name(219584694fe2b248).() const;
461 /** Set the name of this channel. *
462 * @param name Name string to set. */
463 void set_namecxx . . $ sigrok/Channel#set_name(8d4ab0a187bf9331).(stdcxx . . $ std/::stringcxx . . $ std/string# name);
464 /** Type of this channel. */
465 const ChannelTypecxx . . $ sigrok/ChannelType# *typecxx . . $ sigrok/Channel#type(dcfb714a372fc7b).() const;
466 /** Enabled status of this channel. */
467 bool enabledcxx . . $ sigrok/Channel#enabled(50ce9a9e25b4a850).() const;
468 /** Set the enabled status of this channel.
469 * @param value Boolean value to set. */
470 void set_enabledcxx . . $ sigrok/Channel#set_enabled(b45ddcbc8423892c).(bool value);
471 /** Get the index number of this channel. */
472 unsigned int indexcxx . . $ sigrok/Channel#index(ddd8539a2fcdd4ce).() const;
473 private:
474 explicit Channelcxx . . $ sigrok/Channel#Channel(59c431915d44291a).(struct sr_channelcxx . . $ sr_channel# *structure);
475 ~cxx . . $ sigrok/Channel#`~Channel`(ced63f7c635d850d).Channelcxx . . $ sigrok/Channel#();
476 struct sr_channelcxx . . $ sr_channel# *_structurecxx . . $ sigrok/Channel#_structure.;
477 const ChannelTypecxx . . $ sigrok/ChannelType# * const _typecxx . . $ sigrok/Channel#_type.;
478 friend class Devicecxx . . $ sigrok/Device#;
479 friend class UserDevicecxx . . $ sigrok/UserDevice#;
480 friend class ChannelGroupcxx . . $ sigrok/ChannelGroup#;
481 friend class Sessioncxx . . $ sigrok/Session#;
482 friend class TriggerStagecxx . . $ sigrok/TriggerStage#;
483 friend class Contextcxx . . $ sigrok/Context#;
484 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<Channelcxx . . $ sigrok/Channel#>;
485 };
486
487 /** A group of channels on a device, which share some configuration */
488 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! ChannelGroupcxx . . $ sigrok/ChannelGroup# :
489 public ParentOwnedcxx . . $ sigrok/ParentOwned#<ChannelGroupcxx . . $ sigrok/ChannelGroup#, Devicecxx . . $ sigrok/Device#>,
490 public Configurablecxx . . $ sigrok/Configurable#
491 {
492 public:
493 /** Name of this channel group. */
494 stdcxx . . $ std/::stringcxx . . $ std/string# namecxx . . $ sigrok/ChannelGroup#name(219584694fe2b248).() const;
495 /** List of the channels in this group. */
496 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Channelcxx . . $ sigrok/Channel#> > channelscxx . . $ sigrok/ChannelGroup#channels(fb362987ee4d880e).();
497 private:
498 ChannelGroupcxx . . $ sigrok/ChannelGroup#ChannelGroup(4d892332e60ef86c).(const Devicecxx . . $ sigrok/Device# *device, struct sr_channel_group *structure);
499 ~cxx . . $ sigrok/ChannelGroup#`~ChannelGroup`(ced63f7c635d850d).ChannelGroupcxx . . $ sigrok/ChannelGroup#();
500 stdcxx . . $ std/::vectorcxx . . $ std/vector#<Channelcxx . . $ sigrok/Channel# *> _channelscxx . . $ sigrok/ChannelGroup#_channels.;
501 friend class Devicecxx . . $ sigrok/Device#;
502 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<ChannelGroupcxx . . $ sigrok/ChannelGroup#>;
503 };
504
505 /** A trigger configuration */
506 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Triggercxx . . $ sigrok/Trigger# : public UserOwnedcxx . . $ sigrok/UserOwned#<Triggercxx . . $ sigrok/Trigger#>
507 {
508 public:
509 /** Name of this trigger configuration. */
510 stdcxx . . $ std/::stringcxx . . $ std/string# namecxx . . $ sigrok/Trigger#name(219584694fe2b248).() const;
511 /** List of the stages in this trigger. */
512 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<TriggerStagecxx . . $ sigrok/TriggerStage#> > stagescxx . . $ sigrok/Trigger#stages(90a70035b61194d3).();
513 /** Add a new stage to this trigger. */
514 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<TriggerStagecxx . . $ sigrok/TriggerStage#> add_stagecxx . . $ sigrok/Trigger#add_stage(bc6462b81fd24db5).();
515 private:
516 Triggercxx . . $ sigrok/Trigger#Trigger(86b3b61fb1c21eb5).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Contextcxx . . $ sigrok/Context#> context, stdcxx . . $ std/::stringcxx . . $ std/string# name);
517 ~cxx . . $ sigrok/Trigger#`~Trigger`(ced63f7c635d850d).Triggercxx . . $ sigrok/Trigger#();
518 struct sr_trigger *_structurecxx . . $ sigrok/Trigger#_structure.;
519 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Contextcxx . . $ sigrok/Context#> _contextcxx . . $ sigrok/Trigger#_context.;
520 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<TriggerStagecxx . . $ sigrok/TriggerStage#> > _stagescxx . . $ sigrok/Trigger#_stages.;
521 friend class Contextcxx . . $ sigrok/Context#;
522 friend class Sessioncxx . . $ sigrok/Session#;
523 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<Triggercxx . . $ sigrok/Trigger#>;
524 };
525
526 /** A stage in a trigger configuration */
527 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! TriggerStagecxx . . $ sigrok/TriggerStage# :
528 public ParentOwnedcxx . . $ sigrok/ParentOwned#<TriggerStagecxx . . $ sigrok/TriggerStage#, Triggercxx . . $ sigrok/Trigger#>
529 {
530 public:
531 /** Index number of this stage. */
532 int numbercxx . . $ sigrok/TriggerStage#number(455f465bc33b4cdf).() const;
533 /** List of match conditions on this stage. */
534 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<TriggerMatchcxx . . $ sigrok/TriggerMatch#> > matchescxx . . $ sigrok/TriggerStage#matches(6c440ad5faa58599).();
535 /** Add a new match condition to this stage.
536 * @param channel Channel to match on.
537 * @param type TriggerMatchType to apply. */
538 void add_matchcxx . . $ sigrok/TriggerStage#add_match(1757e2046a4c43a1).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Channelcxx . . $ sigrok/Channel#> channel, const TriggerMatchTypecxx . . $ sigrok/TriggerMatchType# *type);
539 /** Add a new match condition to this stage.
540 * @param channel Channel to match on.
541 * @param type TriggerMatchType to apply.
542 * @param value Threshold value. */
543 void add_matchcxx . . $ sigrok/TriggerStage#add_match(9d9d457aee5b8b4).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Channelcxx . . $ sigrok/Channel#> channel, const TriggerMatchTypecxx . . $ sigrok/TriggerMatchType# *type, float value);
544 private:
545 struct sr_trigger_stage *_structurecxx . . $ sigrok/TriggerStage#_structure.;
546 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<TriggerMatchcxx . . $ sigrok/TriggerMatch#> > _matchescxx . . $ sigrok/TriggerStage#_matches.;
547 explicit TriggerStagecxx . . $ sigrok/TriggerStage#TriggerStage(43e7fb630da29513).(struct sr_trigger_stage *structure);
548 ~cxx . . $ sigrok/TriggerStage#`~TriggerStage`(ced63f7c635d850d).TriggerStagecxx . . $ sigrok/TriggerStage#();
549 friend class Triggercxx . . $ sigrok/Trigger#;
550 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<TriggerStagecxx . . $ sigrok/TriggerStage#>;
551 };
552
553 /** A match condition in a trigger configuration */
554 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! TriggerMatchcxx . . $ sigrok/TriggerMatch# :
555 public ParentOwnedcxx . . $ sigrok/ParentOwned#<TriggerMatchcxx . . $ sigrok/TriggerMatch#, TriggerStagecxx . . $ sigrok/TriggerStage#>
556 {
557 public:
558 /** Channel this condition matches on. */
559 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Channelcxx . . $ sigrok/Channel#> channelcxx . . $ sigrok/TriggerMatch#channel(9ce753a89323f683).();
560 /** Type of match. */
561 const TriggerMatchTypecxx . . $ sigrok/TriggerMatchType# *typecxx . . $ sigrok/TriggerMatch#type(7cbf97880ea9db3e).() const;
562 /** Threshold value. */
563 float valuecxx . . $ sigrok/TriggerMatch#value(5036dfe8d4170af2).() const;
564 private:
565 TriggerMatchcxx . . $ sigrok/TriggerMatch#TriggerMatch(5ec175069d346b1f).(struct sr_trigger_match *structure, stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Channelcxx . . $ sigrok/Channel#> channel);
566 ~cxx . . $ sigrok/TriggerMatch#`~TriggerMatch`(ced63f7c635d850d).TriggerMatchcxx . . $ sigrok/TriggerMatch#();
567 struct sr_trigger_match *_structurecxx . . $ sigrok/TriggerMatch#_structure.;
568 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Channelcxx . . $ sigrok/Channel#> _channelcxx . . $ sigrok/TriggerMatch#_channel.;
569 friend class TriggerStagecxx . . $ sigrok/TriggerStage#;
570 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<TriggerMatchcxx . . $ sigrok/TriggerMatch#>;
571 };
572
573 /** Type of session stopped callback */
574 typedef stdcxx . . $ std/::functioncxx . . $ std/function#<void()> SessionStoppedCallbackcxx . . $ sigrok/SessionStoppedCallback#;
575
576 /** Type of datafeed callback */
577 typedef stdcxx . . $ std/::functioncxx . . $ std/function#<void(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Devicecxx . . $ sigrok/Device#>, stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Packetcxx . . $ sigrok/Packet#>)>
578 DatafeedCallbackFunctioncxx . . $ sigrok/DatafeedCallbackFunction#;
579
580 /* Data required for C callback function to call a C++ datafeed callback */
581 class SR_PRIVcxx . . $ `include/libsigrok/libsigrok.h:128:9`! DatafeedCallbackDatacxx . . $ sigrok/DatafeedCallbackData#
582 {
583 public:
584 void runcxx . . $ sigrok/DatafeedCallbackData#run(e95a8db2f2081304).(const struct sr_dev_instcxx . . $ sr_dev_inst# *sdi,
585 const struct sr_datafeed_packet *pkt);
586 private:
587 DatafeedCallbackFunctioncxx . . $ sigrok/DatafeedCallbackFunction# _callbackcxx . . $ sigrok/DatafeedCallbackData#_callback.;
588 DatafeedCallbackDatacxx . . $ sigrok/DatafeedCallbackData#DatafeedCallbackData(2628ba1d6b1b23d).(Sessioncxx . . $ sigrok/Session# *session,
589 DatafeedCallbackFunctioncxx . . $ sigrok/DatafeedCallbackFunction# callback);
590 Sessioncxx . . $ sigrok/Session# *_sessioncxx . . $ sigrok/DatafeedCallbackData#_session.;
591 friend class Sessioncxx . . $ sigrok/Session#;
592 };
593
594 /** A virtual device associated with a stored session */
595 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! SessionDevicecxx . . $ sigrok/SessionDevice# :
596 public ParentOwnedcxx . . $ sigrok/ParentOwned#<SessionDevicecxx . . $ sigrok/SessionDevice#, Sessioncxx . . $ sigrok/Session#>,
597 public Devicecxx . . $ sigrok/Device#
598 {
599 private:
600 explicit SessionDevicecxx . . $ sigrok/SessionDevice#SessionDevice(f888466bd8db8b2b).(struct sr_dev_instcxx . . $ sr_dev_inst# *sdi);
601 ~cxx . . $ sigrok/SessionDevice#`~SessionDevice`(ced63f7c635d850d).SessionDevicecxx . . $ sigrok/SessionDevice#();
602 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Devicecxx . . $ sigrok/Device#> get_shared_from_thiscxx . . $ sigrok/SessionDevice#get_shared_from_this(863503f11ba56615).();
603
604 friend class Sessioncxx . . $ sigrok/Session#;
605 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<SessionDevicecxx . . $ sigrok/SessionDevice#>;
606 };
607
608 /** A sigrok session */
609 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Sessioncxx . . $ sigrok/Session# : public UserOwnedcxx . . $ sigrok/UserOwned#<Sessioncxx . . $ sigrok/Session#>
610 {
611 public:
612 /** Add a device to this session.
613 * @param device Device to add. */
614 void add_devicecxx . . $ sigrok/Session#add_device(f28ce408fc67d92d).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Devicecxx . . $ sigrok/Device#> device);
615 /** List devices attached to this session. */
616 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Devicecxx . . $ sigrok/Device#> > devicescxx . . $ sigrok/Session#devices(bd9bd7ca01920f1e).();
617 /** Remove all devices from this session. */
618 void remove_devicescxx . . $ sigrok/Session#remove_devices(49f6e7a06ebc5aa8).();
619 /** Add a datafeed callback to this session.
620 * @param callback Callback of the form callback(Device, Packet). */
621 void add_datafeed_callbackcxx . . $ sigrok/Session#add_datafeed_callback(bf8695e11dcc81cf).(DatafeedCallbackFunctioncxx . . $ sigrok/DatafeedCallbackFunction# callback);
622 /** Remove all datafeed callbacks from this session. */
623 void remove_datafeed_callbackscxx . . $ sigrok/Session#remove_datafeed_callbacks(49f6e7a06ebc5aa8).();
624 /** Start the session. */
625 void startcxx . . $ sigrok/Session#start(49f6e7a06ebc5aa8).();
626 /** Run the session event loop. */
627 void runcxx . . $ sigrok/Session#run(49f6e7a06ebc5aa8).();
628 /** Stop the session. */
629 void stopcxx . . $ sigrok/Session#stop(49f6e7a06ebc5aa8).();
630 /** Return whether the session is running. */
631 bool is_runningcxx . . $ sigrok/Session#is_running(50ce9a9e25b4a850).() const;
632 /** Set callback to be invoked on session stop. */
633 void set_stopped_callbackcxx . . $ sigrok/Session#set_stopped_callback(13411efb8aeb1b14).(SessionStoppedCallbackcxx . . $ sigrok/SessionStoppedCallback# callback);
634 /** Get current trigger setting. */
635 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Triggercxx . . $ sigrok/Trigger#> triggercxx . . $ sigrok/Session#trigger(4f21ec0bc50417e8).();
636 /** Get the context. */
637 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Contextcxx . . $ sigrok/Context#> contextcxx . . $ sigrok/Session#context(d21b66c3c53303b3).();
638 /** Set trigger setting.
639 * @param trigger Trigger object to use. */
640 void set_triggercxx . . $ sigrok/Session#set_trigger(4493a05162d49de6).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Triggercxx . . $ sigrok/Trigger#> trigger);
641 /** Get filename this session was loaded from. */
642 stdcxx . . $ std/::stringcxx . . $ std/string# filenamecxx . . $ sigrok/Session#filename(219584694fe2b248).() const;
643 private:
644 explicit Sessioncxx . . $ sigrok/Session#Session(14dac491d6e31552).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Contextcxx . . $ sigrok/Context#> context);
645 Sessioncxx . . $ sigrok/Session#Session(86b3b61fb1c21eb5).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Contextcxx . . $ sigrok/Context#> context, stdcxx . . $ std/::stringcxx . . $ std/string# filename);
646 ~cxx . . $ sigrok/Session#`~Session`(ced63f7c635d850d).Sessioncxx . . $ sigrok/Session#();
647 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Devicecxx . . $ sigrok/Device#> get_devicecxx . . $ sigrok/Session#get_device(24d1e15f69717493).(const struct sr_dev_instcxx . . $ sr_dev_inst# *sdi);
648 struct sr_session *_structurecxx . . $ sigrok/Session#_structure.;
649 const stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Contextcxx . . $ sigrok/Context#> _contextcxx . . $ sigrok/Session#_context.;
650 stdcxx . . $ std/::mapcxx . . $ std/map#<const struct sr_dev_instcxx . . $ sr_dev_inst# *, stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<SessionDevicecxx . . $ sigrok/SessionDevice#> > _owned_devicescxx . . $ sigrok/Session#_owned_devices.;
651 stdcxx . . $ std/::mapcxx . . $ std/map#<const struct sr_dev_instcxx . . $ sr_dev_inst# *, stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Devicecxx . . $ sigrok/Device#> > _other_devicescxx . . $ sigrok/Session#_other_devices.;
652 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<DatafeedCallbackDatacxx . . $ sigrok/DatafeedCallbackData#> > _datafeed_callbackscxx . . $ sigrok/Session#_datafeed_callbacks.;
653 SessionStoppedCallbackcxx . . $ sigrok/SessionStoppedCallback# _stopped_callbackcxx . . $ sigrok/Session#_stopped_callback.;
654 stdcxx . . $ std/::stringcxx . . $ std/string# _filenamecxx . . $ sigrok/Session#_filename.;
655 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Triggercxx . . $ sigrok/Trigger#> _triggercxx . . $ sigrok/Session#_trigger.;
656
657 friend class Contextcxx . . $ sigrok/Context#;
658 friend class DatafeedCallbackDatacxx . . $ sigrok/DatafeedCallbackData#;
659 friend class SessionDevicecxx . . $ sigrok/SessionDevice#;
660 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<Sessioncxx . . $ sigrok/Session#>;
661 };
662
663 /** A packet on the session datafeed */
664 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Packetcxx . . $ sigrok/Packet# : public UserOwnedcxx . . $ sigrok/UserOwned#<Packetcxx . . $ sigrok/Packet#>
665 {
666 public:
667 /** Type of this packet. */
668 const PacketTypecxx . . $ sigrok/PacketType# *typecxx . . $ sigrok/Packet#type(c5d6bf69d2f2ebe1).() const;
669 /** Payload of this packet. */
670 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<PacketPayloadcxx . . $ sigrok/PacketPayload#> payloadcxx . . $ sigrok/Packet#payload(dc616278c3f25b8b).();
671 private:
672 Packetcxx . . $ sigrok/Packet#Packet(3e838637a3311471).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Devicecxx . . $ sigrok/Device#> device,
673 const struct sr_datafeed_packet *structure);
674 ~cxx . . $ sigrok/Packet#`~Packet`(ced63f7c635d850d).Packetcxx . . $ sigrok/Packet#();
675 const struct sr_datafeed_packet *_structurecxx . . $ sigrok/Packet#_structure.;
676 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Devicecxx . . $ sigrok/Device#> _devicecxx . . $ sigrok/Packet#_device.;
677 stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<PacketPayloadcxx . . $ sigrok/PacketPayload#> _payloadcxx . . $ sigrok/Packet#_payload.;
678
679 friend class Sessioncxx . . $ sigrok/Session#;
680 friend class Outputcxx . . $ sigrok/Output#;
681 friend class DatafeedCallbackDatacxx . . $ sigrok/DatafeedCallbackData#;
682 friend class Headercxx . . $ sigrok/Header#;
683 friend class Metacxx . . $ sigrok/Meta#;
684 friend class Logiccxx . . $ sigrok/Logic#;
685 friend class Analogcxx . . $ sigrok/Analog#;
686 friend class Contextcxx . . $ sigrok/Context#;
687 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<Packetcxx . . $ sigrok/Packet#>;
688 };
689
690 /** Abstract base class for datafeed packet payloads */
691 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! PacketPayloadcxx . . $ sigrok/PacketPayload#
692 {
693 protected:
694 PacketPayloadcxx . . $ sigrok/PacketPayload#PacketPayload(49f6e7a06ebc5aa8).();
695 virtual ~cxx . . $ sigrok/PacketPayload#`~PacketPayload`(ced63f7c635d850d).PacketPayloadcxx . . $ sigrok/PacketPayload#() = 0;
696 private:
697 virtual stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<PacketPayloadcxx . . $ sigrok/PacketPayload#> share_owned_bycxx . . $ sigrok/PacketPayload#share_owned_by(1f08ad1c6787391d).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Packetcxx . . $ sigrok/Packet#> parent) = 0;
698
699 friend class Packetcxx . . $ sigrok/Packet#;
700 friend class Outputcxx . . $ sigrok/Output#;
701 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<PacketPayloadcxx . . $ sigrok/PacketPayload#>;
702 };
703
704 /** Payload of a datafeed header packet */
705 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Headercxx . . $ sigrok/Header# :
706 public ParentOwnedcxx . . $ sigrok/ParentOwned#<Headercxx . . $ sigrok/Header#, Packetcxx . . $ sigrok/Packet#>,
707 public PacketPayloadcxx . . $ sigrok/PacketPayload#
708 {
709 public:
710 /* Feed version number. */
711 int feed_versioncxx . . $ sigrok/Header#feed_version(455f465bc33b4cdf).() const;
712 /* Start time of this session. */
713 Glibcxx . . $ Glib/::TimeValcxx . . $ Glib/TimeVal# start_timecxx . . $ sigrok/Header#start_time(9a8a35daf447bba0).() const;
714 private:
715 explicit Headercxx . . $ sigrok/Header#Header(77e3df22ef13f866).(const struct sr_datafeed_header *structure);
716 ~cxx . . $ sigrok/Header#`~Header`(ced63f7c635d850d).Headercxx . . $ sigrok/Header#();
717 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<PacketPayloadcxx . . $ sigrok/PacketPayload#> share_owned_bycxx . . $ sigrok/Header#share_owned_by(1f08ad1c6787391d).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Packetcxx . . $ sigrok/Packet#> parent);
718
719 const struct sr_datafeed_header *_structurecxx . . $ sigrok/Header#_structure.;
720
721 friend class Packetcxx . . $ sigrok/Packet#;
722 };
723
724 /** Payload of a datafeed metadata packet */
725 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Metacxx . . $ sigrok/Meta# :
726 public ParentOwnedcxx . . $ sigrok/ParentOwned#<Metacxx . . $ sigrok/Meta#, Packetcxx . . $ sigrok/Packet#>,
727 public PacketPayloadcxx . . $ sigrok/PacketPayload#
728 {
729 public:
730 /* Mapping of (ConfigKey, value) pairs. */
731 stdcxx . . $ std/::mapcxx . . $ std/map#<const ConfigKeycxx . . $ sigrok/ConfigKey# *, Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase#> configcxx . . $ sigrok/Meta#config(fa1241042e82c634).() const;
732 private:
733 explicit Metacxx . . $ sigrok/Meta#Meta(2278957d52d69f0e).(const struct sr_datafeed_meta *structure);
734 ~cxx . . $ sigrok/Meta#`~Meta`(ced63f7c635d850d).Metacxx . . $ sigrok/Meta#();
735 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<PacketPayloadcxx . . $ sigrok/PacketPayload#> share_owned_bycxx . . $ sigrok/Meta#share_owned_by(1f08ad1c6787391d).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Packetcxx . . $ sigrok/Packet#> parent);
736
737 const struct sr_datafeed_meta *_structurecxx . . $ sigrok/Meta#_structure.;
738 stdcxx . . $ std/::mapcxx . . $ std/map#<const ConfigKeycxx . . $ sigrok/ConfigKey# *, Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase#> _configcxx . . $ sigrok/Meta#_config.;
739
740 friend class Packetcxx . . $ sigrok/Packet#;
741 };
742
743 /** Payload of a datafeed packet with logic data */
744 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Logiccxx . . $ sigrok/Logic# :
745 public ParentOwnedcxx . . $ sigrok/ParentOwned#<Logiccxx . . $ sigrok/Logic#, Packetcxx . . $ sigrok/Packet#>,
746 public PacketPayloadcxx . . $ sigrok/PacketPayload#
747 {
748 public:
749 /* Pointer to data. */
750 void *data_pointercxx . . $ sigrok/Logic#data_pointer(50c7df7de5344ebb).();
751 /* Data length in bytes. */
752 size_t data_lengthcxx . . $ sigrok/Logic#data_length(fe4d2d262d4164a8).() const;
753 /* Size of each sample in bytes. */
754 unsigned int unit_sizecxx . . $ sigrok/Logic#unit_size(ddd8539a2fcdd4ce).() const;
755 private:
756 explicit Logiccxx . . $ sigrok/Logic#Logic(81d87e43e8f0d21f).(const struct sr_datafeed_logic *structure);
757 ~cxx . . $ sigrok/Logic#`~Logic`(ced63f7c635d850d).Logiccxx . . $ sigrok/Logic#();
758 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<PacketPayloadcxx . . $ sigrok/PacketPayload#> share_owned_bycxx . . $ sigrok/Logic#share_owned_by(1f08ad1c6787391d).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Packetcxx . . $ sigrok/Packet#> parent);
759
760 const struct sr_datafeed_logic *_structurecxx . . $ sigrok/Logic#_structure.;
761
762 friend class Packetcxx . . $ sigrok/Packet#;
763 friend class Analogcxx . . $ sigrok/Analog#;
764 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<Logiccxx . . $ sigrok/Logic#>;
765 };
766
767 /** Payload of a datafeed packet with analog data */
768 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Analogcxx . . $ sigrok/Analog# :
769 public ParentOwnedcxx . . $ sigrok/ParentOwned#<Analogcxx . . $ sigrok/Analog#, Packetcxx . . $ sigrok/Packet#>,
770 public PacketPayloadcxx . . $ sigrok/PacketPayload#
771 {
772 public:
773 /** Pointer to data. */
774 void *data_pointercxx . . $ sigrok/Analog#data_pointer(50c7df7de5344ebb).();
775 /**
776 * Fills dest pointer with the analog data converted to float.
777 * The pointer must have space for num_samples() floats.
778 */
779 void get_data_as_floatcxx . . $ sigrok/Analog#get_data_as_float(e6881f009d13a851).(float *dest);
780 /** Number of samples in this packet. */
781 unsigned int num_samplescxx . . $ sigrok/Analog#num_samples(ddd8539a2fcdd4ce).() const;
782 /** Channels for which this packet contains data. */
783 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Channelcxx . . $ sigrok/Channel#> > channelscxx . . $ sigrok/Analog#channels(fb362987ee4d880e).();
784 /** Size of a single sample in bytes. */
785 unsigned int unitsizecxx . . $ sigrok/Analog#unitsize(ddd8539a2fcdd4ce).() const;
786 /** Samples use a signed data type. */
787 bool is_signedcxx . . $ sigrok/Analog#is_signed(50ce9a9e25b4a850).() const;
788 /** Samples use float. */
789 bool is_floatcxx . . $ sigrok/Analog#is_float(50ce9a9e25b4a850).() const;
790 /** Samples are stored in big-endian order. */
791 bool is_bigendiancxx . . $ sigrok/Analog#is_bigendian(50ce9a9e25b4a850).() const;
792 /**
793 * Number of significant digits after the decimal point if positive,
794 * or number of non-significant digits before the decimal point if negative
795 * (refers to the value we actually read on the wire).
796 */
797 int digitscxx . . $ sigrok/Analog#digits(455f465bc33b4cdf).() const;
798 /** TBD */
799 bool is_digits_decimalcxx . . $ sigrok/Analog#is_digits_decimal(50ce9a9e25b4a850).() const;
800 /** TBD */
801 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Rationalcxx . . $ sigrok/Rational#> scalecxx . . $ sigrok/Analog#scale(ce6b9a3fe4fbe092).();
802 /** TBD */
803 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Rationalcxx . . $ sigrok/Rational#> offsetcxx . . $ sigrok/Analog#offset(ce6b9a3fe4fbe092).();
804 /** Measured quantity of the samples in this packet. */
805 const Quantitycxx . . $ sigrok/Quantity# *mqcxx . . $ sigrok/Analog#mq(7eba9fad30402869).() const;
806 /** Unit of the samples in this packet. */
807 const Unitcxx . . $ sigrok/Unit# *unitcxx . . $ sigrok/Analog#unit(bd523f256925ffb5).() const;
808 /** Measurement flags associated with the samples in this packet. */
809 stdcxx . . $ std/::vectorcxx . . $ std/vector#<const QuantityFlagcxx . . $ sigrok/QuantityFlag# *> mq_flagscxx . . $ sigrok/Analog#mq_flags(3ecc2790537ea128).() const;
810 /**
811 * Provides a Logic packet that contains a conversion of the analog
812 * data using a simple threshold.
813 *
814 * @param threshold Threshold to use.
815 * @param data_ptr Pointer to num_samples() bytes where the logic
816 * samples are stored. When nullptr, memory for
817 * logic->data_pointer() will be allocated and must
818 * be freed by the caller.
819 */
820 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Logiccxx . . $ sigrok/Logic#> get_logic_via_thresholdcxx . . $ sigrok/Analog#get_logic_via_threshold(81fa42d427d4a9a7).(float threshold,
821 uint8_tcxx . . $ uint8_t# *data_ptr=nullptr) const;
822 /**
823 * Provides a Logic packet that contains a conversion of the analog
824 * data using a Schmitt-Trigger.
825 *
826 * @param lo_thr Low threshold to use (anything below this is low).
827 * @param hi_thr High threshold to use (anything above this is high).
828 * @param state Points to a byte that contains the current state of the
829 * converter. For best results, set to value of logic
830 * sample n-1.
831 * @param data_ptr Pointer to num_samples() bytes where the logic
832 * samples are stored. When nullptr, memory for
833 * logic->data_pointer() will be allocated and must be
834 * freed by the caller.
835 */
836 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Logiccxx . . $ sigrok/Logic#> get_logic_via_schmitt_triggercxx . . $ sigrok/Analog#get_logic_via_schmitt_trigger(3e87b0919041f4ec).(float lo_thr,
837 float hi_thr, uint8_tcxx . . $ uint8_t# *state, uint8_tcxx . . $ uint8_t# *data_ptr=nullptr) const;
838 private:
839 explicit Analogcxx . . $ sigrok/Analog#Analog(bc579ff9b10ef62c).(const struct sr_datafeed_analog *structure);
840 ~cxx . . $ sigrok/Analog#`~Analog`(ced63f7c635d850d).Analogcxx . . $ sigrok/Analog#();
841 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<PacketPayloadcxx . . $ sigrok/PacketPayload#> share_owned_bycxx . . $ sigrok/Analog#share_owned_by(1f08ad1c6787391d).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Packetcxx . . $ sigrok/Packet#> parent);
842
843 const struct sr_datafeed_analog *_structurecxx . . $ sigrok/Analog#_structure.;
844
845 friend class Packetcxx . . $ sigrok/Packet#;
846 };
847
848 /** Number represented by a numerator/denominator integer pair */
849 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Rationalcxx . . $ sigrok/Rational# :
850 public ParentOwnedcxx . . $ sigrok/ParentOwned#<Rationalcxx . . $ sigrok/Rational#, Analogcxx . . $ sigrok/Analog#>
851 {
852 public:
853 /** Numerator, i.e. the dividend. */
854 int64_tcxx . . $ int64_t# numeratorcxx . . $ sigrok/Rational#numerator(57a65ae535d7db84).() const;
855 /** Denominator, i.e. the divider. */
856 uint64_tcxx . . $ uint64_t# denominatorcxx . . $ sigrok/Rational#denominator(fe4d2d262d4164a8).() const;
857 /** Actual (lossy) value. */
858 float valuecxx . . $ sigrok/Rational#value(5036dfe8d4170af2).() const;
859 private:
860 explicit Rationalcxx . . $ sigrok/Rational#Rational(a9573840492496f0).(const struct sr_rational *structure);
861 ~cxx . . $ sigrok/Rational#`~Rational`(ced63f7c635d850d).Rationalcxx . . $ sigrok/Rational#();
862 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Rationalcxx . . $ sigrok/Rational#> share_owned_bycxx . . $ sigrok/Rational#share_owned_by(1fcf83709e3b6094).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Analogcxx . . $ sigrok/Analog#> parent);
863
864 const struct sr_rational *_structurecxx . . $ sigrok/Rational#_structure.;
865
866 friend class Analogcxx . . $ sigrok/Analog#;
867 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<Rationalcxx . . $ sigrok/Rational#>;
868 };
869
870 /** An input format supported by the library */
871 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! InputFormatcxx . . $ sigrok/InputFormat# :
872 public ParentOwnedcxx . . $ sigrok/ParentOwned#<InputFormatcxx . . $ sigrok/InputFormat#, Contextcxx . . $ sigrok/Context#>
873 {
874 public:
875 /** Name of this input format. */
876 stdcxx . . $ std/::stringcxx . . $ std/string# namecxx . . $ sigrok/InputFormat#name(219584694fe2b248).() const;
877 /** Description of this input format. */
878 stdcxx . . $ std/::stringcxx . . $ std/string# descriptioncxx . . $ sigrok/InputFormat#description(219584694fe2b248).() const;
879 /** A list of preferred file name extensions for this file format.
880 * @note This list is a recommendation only. */
881 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> extensionscxx . . $ sigrok/InputFormat#extensions(491c255a7e496038).() const;
882 /** Options supported by this input format. */
883 stdcxx . . $ std/::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Optioncxx . . $ sigrok/Option#> > optionscxx . . $ sigrok/InputFormat#options(cec3e8b68ba7bd23).();
884 /** Create an input using this input format.
885 * @param options Mapping of (option name, value) pairs. */
886 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Inputcxx . . $ sigrok/Input#> create_inputcxx . . $ sigrok/InputFormat#create_input(3a87090563f4698).(stdcxx . . $ std/::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase#>
887 options = stdcxx . . $ std/map#map(49f6e7a06ebc5aa8).::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase#>());
888 private:
889 explicit InputFormatcxx . . $ sigrok/InputFormat#InputFormat(39ee40cb8bc8283e).(const struct sr_input_module *structure);
890 ~cxx . . $ sigrok/InputFormat#`~InputFormat`(ced63f7c635d850d).InputFormatcxx . . $ sigrok/InputFormat#();
891
892 const struct sr_input_module *_structurecxx . . $ sigrok/InputFormat#_structure.;
893
894 friend class Contextcxx . . $ sigrok/Context#;
895 friend class InputDevicecxx . . $ sigrok/InputDevice#;
896 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<InputFormatcxx . . $ sigrok/InputFormat#>;
897 };
898
899 /** An input instance (an input format applied to a file or stream) */
900 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Inputcxx . . $ sigrok/Input# : public UserOwnedcxx . . $ sigrok/UserOwned#<Inputcxx . . $ sigrok/Input#>
901 {
902 public:
903 /** Virtual device associated with this input. */
904 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<InputDevicecxx . . $ sigrok/InputDevice#> devicecxx . . $ sigrok/Input#device(acbaffa3f859e387).();
905 /** Send next stream data.
906 * @param data Next stream data.
907 * @param length Length of data. */
908 void sendcxx . . $ sigrok/Input#send(5500c4293b1bbef0).(void *data, size_t length);
909 /** Signal end of input data. */
910 void endcxx . . $ sigrok/Input#end(49f6e7a06ebc5aa8).();
911 void resetcxx . . $ sigrok/Input#reset(49f6e7a06ebc5aa8).();
912 private:
913 Inputcxx . . $ sigrok/Input#Input(88efd340b5735254).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Contextcxx . . $ sigrok/Context#> context, const struct sr_input *structure);
914 ~cxx . . $ sigrok/Input#`~Input`(ced63f7c635d850d).Inputcxx . . $ sigrok/Input#();
915 const struct sr_input *_structurecxx . . $ sigrok/Input#_structure.;
916 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Contextcxx . . $ sigrok/Context#> _contextcxx . . $ sigrok/Input#_context.;
917 stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<InputDevicecxx . . $ sigrok/InputDevice#> _devicecxx . . $ sigrok/Input#_device.;
918
919 friend class Contextcxx . . $ sigrok/Context#;
920 friend class InputFormatcxx . . $ sigrok/InputFormat#;
921 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<Inputcxx . . $ sigrok/Input#>;
922 };
923
924 /** A virtual device associated with an input */
925 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! InputDevicecxx . . $ sigrok/InputDevice# :
926 public ParentOwnedcxx . . $ sigrok/ParentOwned#<InputDevicecxx . . $ sigrok/InputDevice#, Inputcxx . . $ sigrok/Input#>,
927 public Devicecxx . . $ sigrok/Device#
928 {
929 private:
930 InputDevicecxx . . $ sigrok/InputDevice#InputDevice(277fe2b1d38a2538).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Inputcxx . . $ sigrok/Input#> input, struct sr_dev_instcxx . . $ sr_dev_inst# *sdi);
931 ~cxx . . $ sigrok/InputDevice#`~InputDevice`(ced63f7c635d850d).InputDevicecxx . . $ sigrok/InputDevice#();
932 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Devicecxx . . $ sigrok/Device#> get_shared_from_thiscxx . . $ sigrok/InputDevice#get_shared_from_this(863503f11ba56615).();
933 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Inputcxx . . $ sigrok/Input#> _inputcxx . . $ sigrok/InputDevice#_input.;
934 friend class Inputcxx . . $ sigrok/Input#;
935 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<InputDevicecxx . . $ sigrok/InputDevice#>;
936 };
937
938 /** An option used by an output format */
939 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Optioncxx . . $ sigrok/Option# : public UserOwnedcxx . . $ sigrok/UserOwned#<Optioncxx . . $ sigrok/Option#>
940 {
941 public:
942 /** Short name of this option suitable for command line usage. */
943 stdcxx . . $ std/::stringcxx . . $ std/string# idcxx . . $ sigrok/Option#id(219584694fe2b248).() const;
944 /** Short name of this option suitable for GUI usage. */
945 stdcxx . . $ std/::stringcxx . . $ std/string# namecxx . . $ sigrok/Option#name(219584694fe2b248).() const;
946 /** Description of this option in a sentence. */
947 stdcxx . . $ std/::stringcxx . . $ std/string# descriptioncxx . . $ sigrok/Option#description(219584694fe2b248).() const;
948 /** Default value for this option. */
949 Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase# default_valuecxx . . $ sigrok/Option#default_value(475e798d1ebd9604).() const;
950 /** Possible values for this option, if a limited set. */
951 stdcxx . . $ std/::vectorcxx . . $ std/vector#<Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase#> valuescxx . . $ sigrok/Option#values(b3c7563c14b3dc99).() const;
952 /** Parse a string argument into the appropriate type for this option. */
953 Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase# parse_stringcxx . . $ sigrok/Option#parse_string(d872336c13f69e2f).(stdcxx . . $ std/::stringcxx . . $ std/string# value);
954 private:
955 Optioncxx . . $ sigrok/Option#Option(996f1c7915b1c31).(const struct sr_option *structure,
956 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<const struct sr_option *> structure_array);
957 ~cxx . . $ sigrok/Option#`~Option`(ced63f7c635d850d).Optioncxx . . $ sigrok/Option#();
958 const struct sr_option *_structurecxx . . $ sigrok/Option#_structure.;
959 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<const struct sr_option *> _structure_arraycxx . . $ sigrok/Option#_structure_array.;
960
961 friend class InputFormatcxx . . $ sigrok/InputFormat#;
962 friend class OutputFormatcxx . . $ sigrok/OutputFormat#;
963 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<Optioncxx . . $ sigrok/Option#>;
964 };
965
966 /** An output format supported by the library */
967 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! OutputFormatcxx . . $ sigrok/OutputFormat# :
968 public ParentOwnedcxx . . $ sigrok/ParentOwned#<OutputFormatcxx . . $ sigrok/OutputFormat#, Contextcxx . . $ sigrok/Context#>
969 {
970 public:
971 /** Name of this output format. */
972 stdcxx . . $ std/::stringcxx . . $ std/string# namecxx . . $ sigrok/OutputFormat#name(219584694fe2b248).() const;
973 /** Description of this output format. */
974 stdcxx . . $ std/::stringcxx . . $ std/string# descriptioncxx . . $ sigrok/OutputFormat#description(219584694fe2b248).() const;
975 /** A list of preferred file name extensions for this file format.
976 * @note This list is a recommendation only. */
977 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> extensionscxx . . $ sigrok/OutputFormat#extensions(491c255a7e496038).() const;
978 /** Options supported by this output format. */
979 stdcxx . . $ std/::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Optioncxx . . $ sigrok/Option#> > optionscxx . . $ sigrok/OutputFormat#options(cec3e8b68ba7bd23).();
980 /** Create an output using this format.
981 * @param device Device to output for.
982 * @param options Mapping of (option name, value) pairs. */
983 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Outputcxx . . $ sigrok/Output#> create_outputcxx . . $ sigrok/OutputFormat#create_output(5d15ee34a5f87ce3).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Devicecxx . . $ sigrok/Device#> device,
984 stdcxx . . $ std/::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase#> options = stdcxx . . $ std/map#map(49f6e7a06ebc5aa8).::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase#>());
985 /** Create an output using this format.
986 * @param filename Name of destination file.
987 * @param device Device to output for.
988 * @param options Mapping of (option name, value) pairs. */
989 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Outputcxx . . $ sigrok/Output#> create_outputcxx . . $ sigrok/OutputFormat#create_output(64f23e9fb3a974dc).(stdcxx . . $ std/::stringcxx . . $ std/string# filename,
990 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Devicecxx . . $ sigrok/Device#> device,
991 stdcxx . . $ std/::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase#> options = stdcxx . . $ std/map#map(49f6e7a06ebc5aa8).::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase#>());
992 /**
993 * Checks whether a given flag is set.
994 * @param flag Flag to check
995 * @return true if flag is set for this module
996 * @see sr_output_flags
997 */
998 bool test_flagcxx . . $ sigrok/OutputFormat#test_flag(a79f08b35b6eb6ed).(const OutputFlagcxx . . $ sigrok/OutputFlag# *flag) const;
999 private:
1000 explicit OutputFormatcxx . . $ sigrok/OutputFormat#OutputFormat(6ea868f441f34bb1).(const struct sr_output_module *structure);
1001 ~cxx . . $ sigrok/OutputFormat#`~OutputFormat`(ced63f7c635d850d).OutputFormatcxx . . $ sigrok/OutputFormat#();
1002
1003 const struct sr_output_module *_structurecxx . . $ sigrok/OutputFormat#_structure.;
1004
1005 friend class Contextcxx . . $ sigrok/Context#;
1006 friend class Outputcxx . . $ sigrok/Output#;
1007 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<OutputFormatcxx . . $ sigrok/OutputFormat#>;
1008 };
1009
1010 /** An output instance (an output format applied to a device) */
1011 class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! Outputcxx . . $ sigrok/Output# : public UserOwnedcxx . . $ sigrok/UserOwned#<Outputcxx . . $ sigrok/Output#>
1012 {
1013 public:
1014 /** Update output with data from the given packet.
1015 * @param packet Packet to handle. */
1016 stdcxx . . $ std/::stringcxx . . $ std/string# receivecxx . . $ sigrok/Output#receive(dabb994af452712c).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Packetcxx . . $ sigrok/Packet#> packet);
1017 /** Output format in use for this output */
1018 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<OutputFormatcxx . . $ sigrok/OutputFormat#> formatcxx . . $ sigrok/Output#format(93835788dd360389).();
1019 private:
1020 Outputcxx . . $ sigrok/Output#Output(ec438c8fcaea8a9).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<OutputFormatcxx . . $ sigrok/OutputFormat#> format, stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Devicecxx . . $ sigrok/Device#> device);
1021 Outputcxx . . $ sigrok/Output#Output(212595dd94d574a2).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<OutputFormatcxx . . $ sigrok/OutputFormat#> format,
1022 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Devicecxx . . $ sigrok/Device#> device, stdcxx . . $ std/::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase#> options);
1023 Outputcxx . . $ sigrok/Output#Output(f01d2e8b96d49ddf).(stdcxx . . $ std/::stringcxx . . $ std/string# filename, stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<OutputFormatcxx . . $ sigrok/OutputFormat#> format,
1024 stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Devicecxx . . $ sigrok/Device#> device, stdcxx . . $ std/::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase#> options);
1025 ~cxx . . $ sigrok/Output#`~Output`(ced63f7c635d850d).Outputcxx . . $ sigrok/Output#();
1026
1027 const struct sr_output *_structurecxx . . $ sigrok/Output#_structure.;
1028 const stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<OutputFormatcxx . . $ sigrok/OutputFormat#> _formatcxx . . $ sigrok/Output#_format.;
1029 const stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<Devicecxx . . $ sigrok/Device#> _devicecxx . . $ sigrok/Output#_device.;
1030 const stdcxx . . $ std/::mapcxx . . $ std/map#<stdcxx . . $ std/::stringcxx . . $ std/string#, Glibcxx . . $ Glib/::VariantBasecxx . . $ Glib/VariantBase#> _optionscxx . . $ sigrok/Output#_options.;
1031
1032 friend class OutputFormatcxx . . $ sigrok/OutputFormat#;
1033 friend struct stdcxx . . $ std/::default_deletecxx . . $ std/default_delete#<Outputcxx . . $ sigrok/Output#>;
1034 };
1035
1036 /** Base class for objects which wrap an enumeration value from libsigrok */
1037 template <class Class, typename Enum> class SR_APIcxx . . $ `include/libsigrok/libsigrok.h:121:9`! EnumValuecxx . . $ sigrok/EnumValue#
1038 {
1039 public:
1040 /** The integer constant associated with this value. */
1041 int idcxx . . $ sigrok/EnumValue#id(455f465bc33b4cdf).() const
1042 {
1043 return static_cast<int>(_idcxx . . $ sigrok/EnumValue#_id.);
1044 }
1045 /** The name associated with this value. */
1046 stdcxx . . $ std/::stringcxx . . $ std/string# namecxx . . $ sigrok/EnumValue#name(219584694fe2b248).() const
1047 {
1048 return _namecxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5).;
1049 }
1050 /** Get value associated with a given integer constant. */
1051 static const Class *getcxx . . $ sigrok/EnumValue#get(553ad3ca39c2a0b3).(int id)
1052 {
1053 const auto pos = _valuescxx . . $ sigrok/EnumValue#_values..findcxx . . $ std/map#find(36f8d56706583706).(static_cast<Enum>(id));
1054 if (pos == _valuescxx . . $ sigrok/EnumValue#_values..endcxx . . $ std/map#end(7e4de33083b6e738).())
1055 throw Errorcxx . . $ sigrok/Error#Error(d4f767463ce0a6b3).(SR_ERR_ARG);
1056 return pos->second;
1057 }
1058 /** Get possible values. */
1059 static stdcxx . . $ std/::vectorcxx . . $ std/vector#<const Class *> valuescxx . . $ sigrok/EnumValue#values(20707e2058150564).()
1060 {
1061 stdcxx . . $ std/::vectorcxx . . $ std/vector#<const Class *> result;
1062 for (auto entry : _valuescxx . . $ sigrok/EnumValue#_values.)
1063 result.push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(entry.second);
1064 return result;
1065 }
1066 protected:
1067 EnumValuecxx . . $ sigrok/EnumValue#`EnumValue<Class, Enum>`(4e54be8b3dde4db5).(Enum id, const char name[]) : _idcxx . . $ sigrok/EnumValue#_id.(id), _namecxx . . $ sigrok/EnumValue#_name.(name)
1068 {
1069 }
1070 ~cxx . . $ sigrok/EnumValue#`~EnumValue<Class, Enum>`(49f6e7a06ebc5aa8).EnumValue()
1071 {
1072 }
1073 private:
1074 static const stdcxx . . $ std/::mapcxx . . $ std/map#<const Enum, const Class * const> _valuescxx . . $ sigrok/EnumValue#_values.;
1075 const Enum _idcxx . . $ sigrok/EnumValue#_id.;
1076 const stdcxx . . $ std/::stringcxx . . $ std/string# _namecxx . . $ sigrok/EnumValue#_name.;
1077 };
1078
1079 }
1080
1081 #include <libsigrokcxx/enums.hpp>cxx . . $ `<file>/bindings/cxx/include/libsigrokcxx/enums.hpp`/
1082
1083 #endif