Getting started with dccl

Asked by Jake Quenzer

I've been trying to get familiar with the DCCL library to include it's functionality in a project. In trying to follow the structure presented in dccl_simple.cpp, I've run into an immediate problem:

goby::acomms::DCCLCodec dccl;

yields an error in which I am told that DCCLCodec() is private. Looking at dccl.h, it appears that the first listing of "private" should instead be "protected"?

Question information

Language:
English Edit question
Status:
Solved
For:
Goby Edit question
Assignee:
No assignee Edit question
Solved by:
Jake Quenzer
Solved:
Last query:
Last reply:
Revision history for this message
toby schneider (tes) said :
#1

Are you using Goby version 1 or 2?

In version 1, the code you have written would work fine as goby::acomms::DCCLCodec is a normal class.

In version 2, DCCLCodec is a singleton class (see http://en.wikipedia.org/wiki/Singleton_pattern), so rather than instantiating it, you get a pointer by calling DCCLCodec::get(). The code for "dccl_simple" included with version 2 shows this:

*****************
    goby::acomms::DCCLCodec* dccl = goby::acomms::DCCLCodec::get();
*****************

See http://bazaar.launchpad.net/~goby-dev/goby/2.0/view/head:/share/examples/acomms/dccl/dccl_simple/dccl_simple.cpp

I suspect you're looking at the version 1 "dccl_simple" example but trying to use the version 2 code.

Revision history for this message
Jake Quenzer (jakeq) said :
#2

Ah yes, it seems that I accidentally stumbled into the Goby v1 pages in my initial hunt for information. Thank you for the re-direct.