Standard Interfaces

Basic description

The StandardInterfaces library assists in rapid component development by providing a list of common interfaces for radio development. The interfaces are written in the Interface Description Language (IDL), and the port implementations are implemented in C++. Python bindings are also available.

C++ Code Example

// MyComponent.h

#include "standardinterfaces/complexShort_u.h"
#include "standardinterfaces/realChar_p.h"

class MyComponent_i : public virtual Resource_impl
{
  public:
    // ...

  private:
    // list components provides and uses ports
    standardInterfaces_i::realChar_p *bitsInPort;
    standardInterfaces_i::complexShort_u *symbolsOutPort;
    standardInterfaces::MetaData *metadata;
};

And here is an example of the resulting source file

// MyComponent.cpp

// Constructor
MyComponent_i::MyComponent_i() {
    // Create the ports
    bitsInPort = new standardInterfaces_i::realChar_p("bitsIn");
    symbolsOutPort = new standardInterfaces_i::complexShort_u("symbolsOut");
}

// Worker method
void MyComponent_i::ProcessData()
{
    PortTypes::CharSequence * bits_in;
    PortTypes::ShortSequence I_out, Q_out;

    while (continue_processing) {
        // Get data from port
        bitsInPort->getData(bits_in, metadata);
        
        // Process data here...
        unsigned int N = bits_in->length();
        I_out.length(N);
        Q_out.length(N);
        for (unsigned int i=0; i<N; i++) {
            I_out[i] = (*bits_in)[i];
            Q_out[i] = 0;
        }
        
        // Release input port
        bitsInPort->bufferEmptied();

        // Push output data
        symbolsOutPort->(I_out, Q_out, *metadata);
}

Note that the MetaData object is optional. If the component does not use the MetaData interface the components would invoke the pushPacket() and getData() methods without the last argument. The figure below depicts the flow of data through the ports between components.

example_complexShortMetaData.png

complexShort interface with MetaData

Radio Meta Data

The table below describes the meta data associated with each CORBA packet.

NameDescriptionType/Range
mod_scheme Scheme used to modulate the data UNKNOWN, PSK, DPSK, PAM, FSK, QAM
M Number of symbols in mod_scheme constellation unsigned long int
sampling_frequency Frequency (Hz) at which the data are sampled float
carrier_frequency Frequency (Hz) for which the signal is modulated float
signal_bandwidth Bandwidth (Hz) of the signal float
signal_strength Nominal strength of signal (dB) float
eom End-of-message flag boolean

Installation

$ ./reconf
$ ./configure
$ make
# make install

If installing the libraries for the first time you will also need to link the libraries by running the following command with root permissions

# /sbin/ldconfig

Software Build Dependencies

Usage

Status and History

References


Generated on Fri Sep 5 04:00:34 2008 for Standard Interfaces by  doxygen 1.5.4