/// Radio device keying driver.
///
-class KeyingOutput : public ::FreeDV::Base {
+class KeyingOutput : public ::FreeDV::IODevice {
protected:
/// Create an radio keying output device instance.
/// \param name Name of the driver. This is expected to be a single
/// Key or un-key the transmitter.
/// \param value If true, key the transmitter. If false, un-key.
virtual void key(bool value) = 0;
-
- /// Return the amount of bytes ready to write.
- ///
- virtual std::size_t ready() = 0;
};
/// Softmodem driver.
namespace FreeDV {
KeyingOutput::KeyingOutput(const char * name, const char * parameters)
- : Base(name, parameters)
+ : IODevice(name, parameters)
{
}
KeyingSink(const char *);
virtual ~KeyingSink();
+ /// Return file descriptors for poll()
+ /// \param array The address of an array that will be written
+ /// with a sequence of file descriptors.
+ /// \param space The maximum number of file descriptors that may be
+ /// stored in the array.
+ /// \return The number of file descriptors written to the array.
+ int poll_fds(PollType *, int);
+
/// If the value is true, transmit. Otherwise receive.
///
void key(bool value);
std::cerr << "keying: RECEIVE" << std::endl;
}
+ int
+ KeyingSink::poll_fds(PollType *, int)
+ {
+ return 0;
+ }
+
std::size_t
KeyingSink::ready()
{