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

Method set_config_string

DSView/pv/deviceagent.cpp:436–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434 }
435
436 bool DeviceAgent::set_config_string(int key, const char *value, const sr_channel *ch, const sr_channel_group *cg)
437 {
438 assert(value);
439 assert(_dev_handle);
440
441 GVariant *gvar = g_variant_new_string(value);
442 int ret = ds_set_actived_device_config(ch, cg, key, gvar);
443
444 if (ret != SR_OK)
445 {
446 if (ret != SR_ERR_NA)
447 dsv_err("%s%d", "ERROR: DeviceAgent::set_config_string, Failed to set value of config id:", key);
448 return false;
449 }
450 return true;
451 }
452
453bool DeviceAgent::get_config_bool(int key, bool &value, const sr_channel *ch, const sr_channel_group *cg)
454{

Callers 1

on_collect_modeMethod · 0.80

Calls 1

Tested by

no test coverage detected