}
Context::Context() :
+ UserOwned(structure),
session(NULL)
{
check(sr_init(&structure));
+
struct sr_dev_driver **driver_list = sr_driver_list();
if (driver_list)
for (int i = 0; driver_list[i]; i++)
}
Driver::Driver(struct sr_dev_driver *structure) :
- StructureWrapper(structure),
+ ParentOwned(structure),
initialized(false)
{
}
}
HardwareDevice::HardwareDevice(Driver *driver, struct sr_dev_inst *structure) :
- StructureWrapper(structure),
+ ParentOwned(structure),
Device(structure),
driver(driver)
{
}
Channel::Channel(struct sr_channel *structure) :
- StructureWrapper(structure),
+ ParentOwned(structure),
type(ChannelType::get(structure->type))
{
}
ChannelGroup::ChannelGroup(Device *device,
struct sr_channel_group *structure) :
- StructureWrapper(structure),
+ ParentOwned(structure),
Configurable(device->structure->driver, device->structure, structure)
{
for (GSList *entry = structure->channels; entry; entry = entry->next)
}
Trigger::Trigger(shared_ptr<Context> context, string name) :
- structure(sr_trigger_new(name.c_str())), context(context)
+ UserOwned(sr_trigger_new(name.c_str())),
+ context(context)
{
for (auto stage = structure->stages; stage; stage = stage->next)
stages.push_back(new TriggerStage((struct sr_trigger_stage *) stage->data));
}
TriggerStage::TriggerStage(struct sr_trigger_stage *structure) :
- StructureWrapper(structure)
+ ParentOwned(structure)
{
}
}
TriggerMatch::TriggerMatch(struct sr_trigger_match *structure, shared_ptr<Channel> channel) :
- StructureWrapper(structure), channel(channel)
+ ParentOwned(structure), channel(channel)
{
}
}
Session::Session(shared_ptr<Context> context) :
+ UserOwned(structure),
context(context), saving(false)
{
check(sr_session_new(&structure));
}
Session::Session(shared_ptr<Context> context, string filename) :
+ UserOwned(structure),
context(context), saving(false)
{
check(sr_session_load(filename.c_str(), &structure));
Packet::Packet(shared_ptr<Device> device,
const struct sr_datafeed_packet *structure) :
- structure(structure),
+ UserOwned(structure),
device(device)
{
switch (structure->type)
}
Header::Header(const struct sr_datafeed_header *structure) :
- StructureWrapper(structure),
+ ParentOwned(structure),
PacketPayload()
{
}
}
Meta::Meta(const struct sr_datafeed_meta *structure) :
- StructureWrapper(structure),
+ ParentOwned(structure),
PacketPayload()
{
}
}
Logic::Logic(const struct sr_datafeed_logic *structure) :
- StructureWrapper(structure),
+ ParentOwned(structure),
PacketPayload()
{
}
}
Analog::Analog(const struct sr_datafeed_analog *structure) :
- StructureWrapper(structure),
+ ParentOwned(structure),
PacketPayload()
{
}
}
InputFormat::InputFormat(const struct sr_input_module *structure) :
- StructureWrapper(structure)
+ ParentOwned(structure)
{
}
}
Input::Input(shared_ptr<Context> context, const struct sr_input *structure) :
- structure(structure),
+ UserOwned(structure),
context(context),
device(nullptr)
{
InputDevice::InputDevice(shared_ptr<Input> input,
struct sr_dev_inst *structure) :
- StructureWrapper(structure),
+ ParentOwned(structure),
Device(structure),
input(input)
{
Option::Option(const struct sr_option *structure,
shared_ptr<const struct sr_option *> structure_array) :
- structure(structure),
+ UserOwned(structure),
structure_array(structure_array)
{
}
}
OutputFormat::OutputFormat(const struct sr_output_module *structure) :
- StructureWrapper(structure)
+ ParentOwned(structure)
{
}
Output::Output(shared_ptr<OutputFormat> format,
shared_ptr<Device> device, map<string, Glib::VariantBase> options) :
- structure(sr_output_new(format->structure,
+ UserOwned(sr_output_new(format->structure,
map_to_hash_variant(options), device->structure)),
format(format), device(device), options(options)
{