Articles Forum Examples Download Open Source
Copyright(c) 2006 by Pocomatic Software. All rights reserved.
The Software Communications Architecture (SCA) is a component model for Software Defined Radio (SDR) applications defined by US Navy Joint Tactical Radio System (JTRS). The JTRS-SCA is based on OMG CORBA, and is effectively a CCM non-compliant poorman's version of lightweight CORBA component model.
Existing JTRS-SCA containers, such as the SCA reference implementation from CRC (Java) and the OSSIE from MPRG (C++), are all built as heavily engineered heavyweight ad-hoc solutions. This example shows that, using Pococapsule/C++, a JTRS-SCA container can easily be implemented, with minimum coding effort, as a simple domain-specific component model that can be transparently transformed into the PocoCapsule/C++'s core deployment model, using transformation templates or stylesheet file jtrs-sca-lite2poco.xsl.
This SDR waveform application example in form of JTRS-SCA is originated from the SCA reference implementation of CRC.
Note: PocoCapsule also supports and presents a non-CORBA version of this same SDR waveform application, that can be found in the ${POCOCAPSULE_DIR}/examples/basic-ioc/sdr directory. That non-CORBA version of this SDR waveform application is more straightforward and significantly slim than the CORBA version presented here. Therefore, if components of a waveform application are not distributed across multiple nodes, then, the simple POCO approach without CORBA would be a much better alternative.
The modeled SCA waveform application in this example consists of the following eight components (see srv.xml):
An AudioDevice: the node1-audio-device CORBA object, that has three "uses" ports and three "provides" ports.
An AudioEchoResource: the echo-resource CORBA object, that has two "uses" ports and one "provides" port.
An AudioChorusResource: the chorus-resource CORBA object, that has two "uses" ports and one "provides" port.
An AudioEffectController: the audio-effect-controller CORBA object, that has five "uses" ports.
A ModulationFMResource: the modulation-FM-resource CORBA object, that has two "uses" ports and one "provides" port.
A DemodulationFMResource: the demodulation-FM-resource CORBA object, that has two "uses" ports and one "provide" port.
A FMTransmitterReceiverAssemblyController: the FM-transmitter-receiver-assembly-controller CORBA object, that has five "uses" ports.
A LogImpl: the log-service CORBA object.
These components are implemented as CORBA objects (therefore, they can be distributed across different addressing spaces) that export themselves through an external OMG naming service. For simplicity and to focus on showing component wiring, the naming service is mocked using a internal map in this example (see bind_ns() in scahelper.C). JTRS-SCA components (objects) and their ports listed above are instantiated, activated, and binded to this naming service by the Pococapsule container, as described in the PocoCapsule CORBA application descriptor srv.xml. And then, they are wired up by Pococapsule following the description of a JTRS-SCA assembly descriptor sad.xml. The assembled JTRS-SCA waveform application is illustrated in the following diagram:

main.C: This is a mini container used to setup and assemble the example SCA waveform application. It is notable that this container itself neither contains code, nor links with application specific bean implementations.
CF.idl: This is a mini mocked version of JTRS-SCA core framework (CF) IDL module definition. It only includes those CF interfaces (e.g. CF::Resource and CF::Port, etc.) and methods that are needed by this example. Also, for demonstration purpose, a common Base interface with an attribute "name" is added to all interfaces.
simple.idl: This IDL module defines mocked push port component interfaces.
simpleImpl.h and sampleImpl.C: These files provide mocked implementations of the CF::Resource and push port.
scahelper.h and scahelper.C: These files implemented helper methods that are used by PocoCapsule container in assembling a SCA application.
jtrs-sca-lite.dtd: The XML document type definition of JTRS-SCA assembly descriptor.
jtrs-sca-lite2poco.xsl: The XSLT stylesheet that specifies the transformation from the JTRS-SCA assembly descriptor to the POCO IoC application descriptor.
srv.xml: A Pococapsule CORBA application descriptor that describes this example's CORBA objects (components and ports) setup.
sad.xml: A JTRS-SCA assembly descriptor that describes the wiring (connections) of components/ports in the JTRS-SCA waveform application.
setup.xml: The root descriptor that loads all needed libraries and then instantiates and wires (connects) the JTRS-SCA waveform application by importing their descriptor from srv.xml and sad.xml.
To build this example, the environment variable POCOCAPSULE_DIR should point to the PocoCapsule/C++ installed directory. Also, this example assumes an underneath ORB (e.g. VisiBroker/C++, TAO, etc.) is installed and its runtime and development environment (such as POCOCAPSULE_DIR, VBROKER_DIR or TAO_ROOT, etc. env variable) are set according to its product specification. Then, this example can be built by simply invoking gmake/make on linux/unix or nmake on windows.
· Before starting the application deployment container (i.e. the main executable), make sure the LD_LIBRARY_PATH (on linux and solaris) or the PATH (on windows) environment variable is set correctly to include the ${POCOCAPSULE_DIR}/lib directory and the ${VBROKREDIR}/lib (if VisiBroker is used) or the ${TAO_ROOT}/lib directory (if TAO is used).
· run this example by executing the main executable:
prompt> main
It will display following connection wirings assembled by the container:
[wire-00]: The AudioOut port of the node1 audio device is connected to the AudioIn port of the audio echo resource (connection-id: Node1AudioToEchoResource0) [wire-01]: The AudioOut port of the audio echo resource is connected to the AudioIn port of the audio chorus resource (connection-id: EchoResource0ToChorusResource0) [wire-02]: The AudioOut port of the audio chorus resource is connected to the AudioIn port of the node1 audio device (connection-id: ChorusResource0ToNode1Audio) [wire-03]: The AudioInControl port of the audio effect controller is connected to the node1 audio device (connection-id: InController0ToNode1AudioDevice) [wire-04]: The AudioOutControl port of the audio effect controller is connected to the node1 audio device (connection-id: OutController0ToNode1AudioDevice) [wire-05]: The LogPort port of the audio effect controller is connected to the log (connection-id: AudioEffectApplication0ToLog) [wire-06]: The LogPort port of the node1 audio device is connected to the log (connection-id: Node1AudioDevice0ToLog) [wire-07]: The LogPort port of the audio echo resource is connected to the log (connection-id: EchoResource0ToLog) [wire-08]: The LogPort port of the audio chorus resource is connected to the log (connection-id: ChorusResource0ToLog) [wire-09]: The AudioEchoControl port of the audio effect controller is connected to the audio echo resource (connection-id: AudioEffectController0ToEchoResource0) [wire-10]: The AudioChorusControl port of the audio effect controller is connected to the audio chorus resource (connection-id: AudioEffectController0ToChorusResource0) [wire-11]: The DoubleSeqOut port of the demodulation FM resource is connected to the AudioInRightDouble port of the node1 audio device (connection-id: DemodulationFMResourceTonode1AudioDevice) [wire-12]: The AudioOutLeftDouble port of the node1 audio device is connected to the DoubleSeqIn port of the demodulation FM resource (connection-id: node1AudioDeviceToDemodulationFMResource) [wire-13]: The LogPort port of the modulation FM resource is connected to the log (connection-id: ModulationFMTolog) [wire-14]: The LogPort port of the FM transmitter/receiver assembly controller is connected to the log (connection-id: FMTransmitterReceiverAssemblyControllerTolog) [wire-15]: The DoubleSeqOut port of the modulation FM resource is connected to the AudioInLeftDouble port of the node1 audio device (connection-id: ModulationFMTonode1AudioDevice) [wire-16]: The InputDeviceControl port of the FM transmitter/receiver assembly controller is connected to the node1 audio device (connection-id: FMTransmitterReceiverAssemblyControllerTonode1AudioDevice_1) [wire-17]: The ModulationFMControl port of the FM transmitter/receiver assembly controller is connected to the modulation FM resource (connection-id: FMTransmitterReceiverAssemblyControllerToModulationFM_49) [wire-18]: The LogPort port of the demodulation FM resource is connected to the log (connection-id: DemodulationFMResourceTolog) [wire-19]: The OutputDeviceControl port of the FM transmitter/receiver assembly controller is connected to the node1 audio device (connection-id: FMTransmitterReceiverAssemblyControllerTonode1AudioDevice_2) [wire-20]: The AudioOutLeftDouble port of the node1 audio device is connected to the DoubleSeqIn port of the modulation FM resource (connection-id: node1AudioDeviceToModulationFM) [wire-21]: The DemodulationFMControl port of the FM transmitter/receiver assembly controller is connected to the demodulation FM resource (connection-id: FMTransmitterReceiverAssemblyControllerToDemodulationFMResource)
It shows 22 SCA connections are wired up.