Skip to content

Conversation

@fredzo
Copy link
Contributor

@fredzo fredzo commented Jan 23, 2026

Hi Andrew,

This PR is an extension of SCPIInstrument API used to provide information about models supported by the driver and accepted transports.
AddInstrumentDialog (PR to come once ngscopeclient/scopehal-apps#951 has been merged) relies on this API to pre-fill transport combo, path string and nickname:

ngscopeclient_AYsDHJJlgG

Driver may add a static GetDriverSupportedModels() to list supported model names and their associated transport / connection string template.
If they do, this list will be used in AddInstrumentDialog to limit the list of available transports and to pre-fill nickname and connection string.
If they don't, the behavior of the AddInstrumentDialog remains unchanged.
If a driver lists more than one model, a model combo is added to the dialog.

static std::vector<SCPIInstrumentModel> GetDriverSupportedModels()
{
	return {
	{"Owon XDG 2000", {
		{ SCPITransportType::TRANSPORT_LAN, "<ip_address>:3000" },
		{ SCPITransportType::TRANSPORT_USBTMC, "/dev/usbtmc<x>" },
	}},
	{"Owon XDG 3000", {
		{ SCPITransportType::TRANSPORT_LAN, "<ip_address>:3000" },
		{ SCPITransportType::TRANSPORT_USBTMC, "/dev/usbtmc<x>" },
	}}
	};
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant