MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / update

Method update

DSView/pv/deviceagent.cpp:36–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36void DeviceAgent::update()
37{
38 _dev_handle = NULL_HANDLE;
39 _dev_name = "";
40 _path = "";
41 _di = NULL;
42 _dev_type = 0;
43 _is_new_device = false;
44
45 struct ds_device_full_info info;
46
47 if (ds_get_actived_device_info(&info) == SR_OK)
48 {
49 _dev_handle = info.handle;
50 _dev_type = info.dev_type;
51 _di = info.di;
52 _is_new_device = info.actived_times == 1;
53
54 _dev_name = QString::fromLocal8Bit(info.name);
55 _driver_name = QString::fromLocal8Bit(info.driver_name);
56
57 if (info.path[0] != '\0'){
58 _path = QString::fromLocal8Bit(info.path);
59 }
60 }
61}
62
63 sr_dev_inst* DeviceAgent::inst()
64 {

Callers 10

interp_signedMethod · 0.45
interp_fixpointMethod · 0.45
interp_ieee754Method · 0.45
interp_enumMethod · 0.45
startMethod · 0.45
decodeMethod · 0.45
lists.pyFile · 0.45
set_deviceMethod · 0.45
OnMessageMethod · 0.45
resizeEventMethod · 0.45

Calls 1

Tested by

no test coverage detected