30#ifndef SCPIMiscInstrument_h
31#define SCPIMiscInstrument_h
45 typedef std::shared_ptr<SCPIMiscInstrument> (*MiscCreateProcType)(
SCPITransport*);
46 static void DoAddDriverClass(std::string name, MiscCreateProcType proc);
48 static void EnumDrivers(std::vector<std::string>& names);
49 static std::shared_ptr<SCPIMiscInstrument> CreateInstrument(std::string driver,
SCPITransport* transport);
56 typedef std::map< std::string, MiscCreateProcType > MiscCreateMapType;
57 static MiscCreateMapType m_misccreateprocs;
60#define MISC_INITPROC(T) \
61 static std::shared_ptr<SCPIMiscInstrument> CreateInstance(SCPITransport* transport) \
62 { return std::make_shared<T>(transport); } \
63 virtual std::string GetDriverName() const override \
64 { return GetDriverNameInternal(); }
66#define AddMiscInstrumentDriverClass(T) SCPIMiscInstrument::DoAddDriverClass(T::GetDriverNameInternal(), T::CreateInstance)
An SCPI-based oscilloscope.
Definition: SCPIInstrument.h:38
An SCPI-based miscellaneous instrument.
Definition: SCPIMiscInstrument.h:37
Abstraction of a transport layer for moving SCPI data between endpoints.
Definition: SCPITransport.h:47