mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-11-12 09:10:34 -05:00
Replace separate create channel methods (BS and CS): v5 plugins
This commit is contained in:
parent
09374da967
commit
bc79acd7ee
@ -55,6 +55,22 @@ void BeamSteeringCWModPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerMIMOChannel(BeamSteeringCWMod::m_channelIdURI, BeamSteeringCWMod::m_channelId, this);
|
||||
}
|
||||
|
||||
void BeamSteeringCWModPlugin::createMIMOChannel(DeviceAPI *deviceAPI, MIMOChannel **bs, ChannelAPI **cs) const
|
||||
{
|
||||
if (bs || cs)
|
||||
{
|
||||
BeamSteeringCWMod *instance = new BeamSteeringCWMod(deviceAPI);
|
||||
|
||||
if (bs) {
|
||||
*bs = instance;
|
||||
}
|
||||
|
||||
if (cs) {
|
||||
*cs = instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SERVER_MODE
|
||||
PluginInstanceGUI* BeamSteeringCWModPlugin::createMIMOChannelGUI(
|
||||
DeviceUISet *deviceUISet,
|
||||
@ -69,16 +85,6 @@ PluginInstanceGUI* BeamSteeringCWModPlugin::createMIMOChannelGUI(DeviceUISet *de
|
||||
}
|
||||
#endif
|
||||
|
||||
MIMOChannel* BeamSteeringCWModPlugin::createMIMOChannelBS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new BeamSteeringCWMod(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelAPI* BeamSteeringCWModPlugin::createMIMOChannelCS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new BeamSteeringCWMod(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelWebAPIAdapter* BeamSteeringCWModPlugin::createChannelWebAPIAdapter() const
|
||||
{
|
||||
return new BeamSteeringCWModWebAPIAdapter();
|
||||
|
||||
@ -36,9 +36,8 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual void createMIMOChannel(DeviceAPI *deviceAPI, MIMOChannel **bs, ChannelAPI **cs) const;
|
||||
virtual PluginInstanceGUI* createMIMOChannelGUI(DeviceUISet *deviceUISet, MIMOChannel *mimoChannel) const;
|
||||
virtual MIMOChannel* createMIMOChannelBS(DeviceAPI *deviceAPI) const;
|
||||
virtual ChannelAPI* createMIMOChannelCS(DeviceAPI *deviceAPI) const;
|
||||
virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const;
|
||||
|
||||
private:
|
||||
|
||||
@ -56,6 +56,22 @@ void InterferometerPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerMIMOChannel(Interferometer::m_channelIdURI, Interferometer::m_channelId, this);
|
||||
}
|
||||
|
||||
void InterferometerPlugin::createMIMOChannel(DeviceAPI *deviceAPI, MIMOChannel **bs, ChannelAPI **cs) const
|
||||
{
|
||||
if (bs || cs)
|
||||
{
|
||||
Interferometer *instance = new Interferometer(deviceAPI);
|
||||
|
||||
if (bs) {
|
||||
*bs = instance;
|
||||
}
|
||||
|
||||
if (cs) {
|
||||
*cs = instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SERVER_MODE
|
||||
PluginInstanceGUI* InterferometerPlugin::createRxChannelGUI(
|
||||
DeviceUISet *deviceUISet,
|
||||
@ -70,16 +86,6 @@ PluginInstanceGUI* InterferometerPlugin::createMIMOChannelGUI(DeviceUISet *devic
|
||||
}
|
||||
#endif
|
||||
|
||||
MIMOChannel* InterferometerPlugin::createMIMOChannelBS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new Interferometer(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelAPI* InterferometerPlugin::createMIMOChannelCS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new Interferometer(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelWebAPIAdapter* InterferometerPlugin::createChannelWebAPIAdapter() const
|
||||
{
|
||||
return new InterferometerWebAPIAdapter();
|
||||
|
||||
@ -36,9 +36,8 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual void createMIMOChannel(DeviceAPI *deviceAPI, MIMOChannel **bs, ChannelAPI **cs) const;
|
||||
virtual PluginInstanceGUI* createMIMOChannelGUI(DeviceUISet *deviceUISet, MIMOChannel *mimoChannel) const;
|
||||
virtual MIMOChannel* createMIMOChannelBS(DeviceAPI *deviceAPI) const;
|
||||
virtual ChannelAPI* createMIMOChannelCS(DeviceAPI *deviceAPI) const;
|
||||
virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const;
|
||||
|
||||
private:
|
||||
|
||||
@ -53,6 +53,22 @@ void ChirpChatPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(ChirpChatDemod::m_channelIdURI, ChirpChatDemod::m_channelId, this);
|
||||
}
|
||||
|
||||
void ChirpChatPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const
|
||||
{
|
||||
if (bs || cs)
|
||||
{
|
||||
ChirpChatDemod *instance = new ChirpChatDemod(deviceAPI);
|
||||
|
||||
if (bs) {
|
||||
*bs = instance;
|
||||
}
|
||||
|
||||
if (cs) {
|
||||
*cs = instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SERVER_MODE
|
||||
PluginInstanceGUI* ChirpChatPlugin::createRxChannelGUI(
|
||||
DeviceUISet *deviceUISet,
|
||||
@ -66,14 +82,3 @@ PluginInstanceGUI* ChirpChatPlugin::createRxChannelGUI(DeviceUISet *deviceUISet,
|
||||
return ChirpChatDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||
}
|
||||
#endif
|
||||
|
||||
BasebandSampleSink* ChirpChatPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new ChirpChatDemod(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelAPI* ChirpChatPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new ChirpChatDemod(deviceAPI);
|
||||
}
|
||||
|
||||
|
||||
@ -35,9 +35,8 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const;
|
||||
virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const;
|
||||
virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const;
|
||||
virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const;
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
|
||||
@ -55,6 +55,22 @@ void SigMFFileSinkPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(SigMFFileSink::m_channelIdURI, SigMFFileSink::m_channelId, this);
|
||||
}
|
||||
|
||||
void SigMFFileSinkPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const
|
||||
{
|
||||
if (bs || cs)
|
||||
{
|
||||
SigMFFileSink *instance = new SigMFFileSink(deviceAPI);
|
||||
|
||||
if (bs) {
|
||||
*bs = instance;
|
||||
}
|
||||
|
||||
if (cs) {
|
||||
*cs = instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SERVER_MODE
|
||||
PluginInstanceGUI* SigMFFileSinkPlugin::createRxChannelGUI(
|
||||
DeviceUISet *deviceUISet,
|
||||
@ -69,16 +85,6 @@ PluginInstanceGUI* SigMFFileSinkPlugin::createRxChannelGUI(DeviceUISet *deviceUI
|
||||
}
|
||||
#endif
|
||||
|
||||
BasebandSampleSink* SigMFFileSinkPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new SigMFFileSink(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelAPI* SigMFFileSinkPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new SigMFFileSink(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelWebAPIAdapter* SigMFFileSinkPlugin::createChannelWebAPIAdapter() const
|
||||
{
|
||||
return new SigMFFileSinkWebAPIAdapter();
|
||||
|
||||
@ -36,9 +36,8 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const;
|
||||
virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const;
|
||||
virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const;
|
||||
virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const;
|
||||
virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const;
|
||||
|
||||
private:
|
||||
|
||||
@ -54,6 +54,22 @@ void ChirpChatModPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerTxChannel(ChirpChatMod::m_channelIdURI, ChirpChatMod::m_channelId, this);
|
||||
}
|
||||
|
||||
void ChirpChatModPlugin::createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const
|
||||
{
|
||||
if (bs || cs)
|
||||
{
|
||||
ChirpChatMod *instance = new ChirpChatMod(deviceAPI);
|
||||
|
||||
if (bs) {
|
||||
*bs = instance;
|
||||
}
|
||||
|
||||
if (cs) {
|
||||
*cs = instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SERVER_MODE
|
||||
PluginInstanceGUI* ChirpChatModPlugin::createTxChannelGUI(
|
||||
DeviceUISet *deviceUISet,
|
||||
@ -68,16 +84,6 @@ PluginInstanceGUI* ChirpChatModPlugin::createTxChannelGUI(DeviceUISet *deviceUIS
|
||||
}
|
||||
#endif
|
||||
|
||||
BasebandSampleSource* ChirpChatModPlugin::createTxChannelBS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new ChirpChatMod(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelAPI* ChirpChatModPlugin::createTxChannelCS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new ChirpChatMod(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelWebAPIAdapter* ChirpChatModPlugin::createChannelWebAPIAdapter() const
|
||||
{
|
||||
return new ChirpChatModWebAPIAdapter();
|
||||
|
||||
@ -35,9 +35,8 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual void createTxChannel(DeviceAPI *deviceAPI, BasebandSampleSource **bs, ChannelAPI **cs) const;
|
||||
virtual PluginInstanceGUI* createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *rxChannel) const;
|
||||
virtual BasebandSampleSource* createTxChannelBS(DeviceAPI *deviceAPI) const;
|
||||
virtual ChannelAPI* createTxChannelCS(DeviceAPI *deviceAPI) const;
|
||||
virtual ChannelWebAPIAdapter* createChannelWebAPIAdapter() const;
|
||||
|
||||
private:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user