summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim O'Shea <tim.oshea753@gmail.com>2013-03-22 13:25:02 -0400
committerTom Rondeau <trondeau@vt.edu>2013-03-27 17:01:17 -0400
commitdda7b1631815dd9532ef4fa5b700fdda46355d09 (patch)
tree94087c43d7924c15e1f045c009e9f71ea71098c0
parentb2e4a3e22fc2f75817a716d7c81e99ef64129bc6 (diff)
cleaning up ice interface
-rw-r--r--gnuradio-runtime/include/rpcserver_ice.h5
-rw-r--r--gnuradio-runtime/lib/frontend.ice118
-rw-r--r--gnuradio-runtime/lib/gnuradio.ice59
3 files changed, 88 insertions, 94 deletions
diff --git a/gnuradio-runtime/include/rpcserver_ice.h b/gnuradio-runtime/include/rpcserver_ice.h
index 66ed8d5156..198e565978 100644
--- a/gnuradio-runtime/include/rpcserver_ice.h
+++ b/gnuradio-runtime/include/rpcserver_ice.h
@@ -29,6 +29,7 @@
#include <map>
#include <gnuradio.h>
#include <Ice/Exception.h>
+#include <boost/format.hpp>
class rpcserver_ice : public virtual rpcserver_base, public GNURadio::ControlPort
{
@@ -109,7 +110,9 @@ private:
}
}
else {
- throw IceUtil::NullHandleException(__FILE__, __LINE__);
+ std::cout << "Ctrlport Key called with unregistered key (" << p << ")\n";
+ std::string tmpkey(p);
+ throw IceUtil::NullHandleException((boost::format("%s Ctrlport Key called with unregistered key = %s")%__FILE__%p).str().c_str(), __LINE__);
}
}
diff --git a/gnuradio-runtime/lib/frontend.ice b/gnuradio-runtime/lib/frontend.ice
index befb5b7a97..87ffe55085 100644
--- a/gnuradio-runtime/lib/frontend.ice
+++ b/gnuradio-runtime/lib/frontend.ice
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 Free Software Foundation, Inc.
+ * Copyright 2013 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -25,78 +25,128 @@
module GNURadio {
module Frontend {
+ // primitive types
+ dictionary<string, string> StrStrDict;
+ dictionary<string, string> TunerArgs;
+ struct F32Range
+ {
+ float min;
+ float max;
+ };
+
+ // exception types
exception NotSupported {};
exception InvalidSetting { string msg; };
exception ReceiverFailure { string msg; };
- exception NotExist {};
- dictionary<string, string> TunerArgs;
+ exception NotExist {};
+
+ // Status Types
struct TunerStatus {
+ float freq;
+ float rate;
int a2dbits;
float gain;
+ F32Range gainrange;
bool isInverted;
+ StrStrDict info;
};
- interface Tuner {
- TunerStatus configureTuner(TunerArgs args); //ADDED
- idempotent TunerStatus status();
- idempotent float setGain(float gain) throws NotSupported, InvalidSetting;
- idempotent bool setInversion(bool inverted) throws NotSupported, InvalidSetting;
+ struct StreamInfo {
+ string uri;
+ StrStrDict info;
+ };
+
+ struct ReceiverInfo {
+ string uid;
+ string name;
+ StrStrDict info;
};
struct ChannelStatus {
- string uid;
+ string uid;
+ string name;
bool active;
float freq;
float bandwidth;
- int payloadBits;
bool isComplex;
- string signalName;
+ StrStrDict info;
};
- interface Channel extends Component {
- idempotent ChannelStatus status();
- idempotent FeedInfo feed();
- idempotent bool active();
+ struct ChannelizerStatus {
+ string uid;
+ string name;
+ StrStrDict info;
+ };
+
+ // Interfaces
+ interface Component {
+ void setName(string newName);
+ };
+
+ interface AbstractReceiver extends Component {
+ idempotent ReceiverInfo getReceiverInfo();
+ };
+
+ interface Tuner {
+ TunerStatus configureTuner(TunerArgs args) throws ReceiverFailure, InvalidSetting;
+ idempotent TunerStatus status();
+ idempotent float setGain(float gain) throws ReceiverFailure, NotSupported, InvalidSetting;
+ idempotent bool setInversion(bool inverted) throws ReceiverFailure, NotSupported, InvalidSetting;
+ idempotent float setCenterFreq(float freq) throws ReceiverFailure, NotSupported, InvalidSetting;
+ idempotent float setBandwidth(float bw) throws ReceiverFailure, NotSupported, InvalidSetting;
+ idempotent void setInfo(string k, string v) throws ReceiverFailure, NotSupported, InvalidSetting;
+ };
+
+ interface Channel {
void start();
void stop();
- idempotent float setCenterFreq(float freq) throws NotSupported, InvalidSetting;
- idempotent float setBandwidth(float bw) throws NotSupported, InvalidSetting;
- idempotent int setPayloadBits(int bits) throws NotSupported, InvalidSetting;
- idempotent bool setComplex(bool complex) throws NotSupported, InvalidSetting;
- void removeChannel() throws NotSupported;
+ void destroyChannel() throws NotSupported;
+ idempotent bool active();
+ idempotent ChannelStatus status();
+ idempotent StreamInfo stream();
+ idempotent bool setComplex(bool complex) throws ReceiverFailure, NotSupported, InvalidSetting;
+ idempotent void setInfo(string k, string v) throws ReceiverFailure, NotSupported, InvalidSetting;
+ idempotent void setStreamInfo(string k, string v) throws ReceiverFailure, NotSupported, InvalidSetting;
};
sequence<Tuner*> TunerSeq;
sequence<Channel*> ChannelSeq;
-
- struct ChannelizerStatus {
- string uid;
- string signalName;
- };
- interface Channelizer extends Component {
+ interface Channelizer extends AbstractReceiver {
idempotent ChannelizerStatus status();
idempotent Tuner* getTuner();
idempotent ChannelSeq getChannels();
idempotent ChannelSeq getActiveChannels();
idempotent ChannelSeq getInactiveChannels();
- Channel* createChannel(float freq, float bw, int payloadBits, string address, int port) throws NotSupported;
+ Channel* createChannel(float freq, float bw, StrStrDict args) throws NotSupported;
};
sequence<Channelizer*> ChannelizerSeq;
interface Receiver extends AbstractReceiver {
idempotent ChannelizerSeq getInputs();
-// idempotent ChannelizerSeq getActiveInputs();
-// idempotent ChannelizerSeq getInactiveInputs();
- idempotent Channel* getChannelByID(string id) throws NotExist;
- idempotent Channelizer* getChannelizerByID(string id) throws NotExist;
+ idempotent Channel* getChannelByID(string id) throws NotExist;
+ idempotent Channelizer* getChannelizerByID(string id) throws NotExist;
+ idempotent void setInfo(string k, string v) throws ReceiverFailure, NotSupported, InvalidSetting;
};
-
};
-
-
+ module Booter {
+ dictionary<string, string> WaveformArgs;
+ exception WaveformRunningError {
+ string waveformClass;
+ float centerFrequencyHz;
+ };
+ exception SignalSourceError {string msg; };
+ interface WaveformBooter extends Frontend::Receiver, ControlPort {
+ string launchWaveform(string waveformClass, WaveformArgs args)
+ throws WaveformRunningError, SignalSourceError;
+ WaveformArgMap getDriverEnum();
+ WaveformArgMap getSourceInfo();
+ idempotent bool waveformRunning();
+ idempotent string getWaveformClass();
+ };
+ };
};
diff --git a/gnuradio-runtime/lib/gnuradio.ice b/gnuradio-runtime/lib/gnuradio.ice
index e17d91901b..731cbea956 100644
--- a/gnuradio-runtime/lib/gnuradio.ice
+++ b/gnuradio-runtime/lib/gnuradio.ice
@@ -88,67 +88,8 @@ interface ControlPort {
idempotent KnobMap get(KnobIDList knobs);
idempotent KnobPropMap properties(KnobIDList knobs);
void shutdown();
-
-// string subscribe(StreamReceiver* proxy, string streamName, int requestedPeriod, int RequestedSize);
-// idempotent void unsubscribe(string streamID);
-};
-
-struct FeedInfo {
- string protocol;
- string address;
- string iface;
- string port;
-};
-
-//TODO: convert this part to a Feed Info
-struct ReceiverInfo {
- string uid;
- string signalType;
- string signalName;
- string allocatableObjectID;
- string signalProtocol;
- string signalAddress;
- string signalInterface;
- string signalPort;
-};
-
-interface Component {
- void setName(string newName);
};
-module Frontend {
- interface AbstractReceiver extends Component {
- idempotent ReceiverInfo getReceiverInfo();
- };
-};
-
-module Booter {
- dictionary<string, string> WaveformArgs;
-
- exception WaveformRunningError {
- string waveformClass;
- float centerFrequencyHz;
- };
- exception SignalSourceError {string msg; };
-
- interface WaveformBooter extends Frontend::AbstractReceiver {
- string launchWaveform(string waveformClass, WaveformArgs args)
- throws WaveformRunningError, SignalSourceError;
-
-// string launchWaveformWithSession(string waveformClass, WaveformArgs args, IceGrid::Session* session)
-// throws WaveformRunningError;
- WaveformArgMap getDriverEnum();
- WaveformArgMap getSourceInfo();
- idempotent bool waveformRunning();
- idempotent string getWaveformClass();
- void shutdown();
- };
-};
-
-//interface Pingable {
-// bool ping();
-//};
-
};
#endif