('sr_unit', ('Unit', 'Unit of measurement')),
('sr_mqflag', ('QuantityFlag', 'Flag applied to measured quantity')),
('sr_configkey', ('ConfigKey', 'Configuration key')),
+ ('sr_configcap', ('Capability', 'Configuration capability')),
('sr_datatype', ('DataType', 'Configuration data type')),
('sr_channeltype', ('ChannelType', 'Channel type')),
('sr_trigger_matches', ('TriggerMatchType', 'Trigger match type')),
for file in (header, code):
print("/* Generated file - edit enums.py instead! */", file=file)
+print("namespace sigrok {", file=header)
+
# Template for beginning of class declaration and public members.
header_public_template = """
/** {brief} */
filename = os.path.join(dirname, "%s_methods.i" % classname)
if os.path.exists(filename):
print(str.join('', open(filename).readlines()), file=swig)
+
+print("}", file=header)