You can write DCE devices in one of two languages.
C++, which means you use DCEGen.
Ruby, which means you use GSD.
You specify which one you wish to use, when you create the new device template.
The purpose of the device template, is to define what it is, what commands and events the device can emit and accept, and any information the plug and play plugin can use to determine how to detect the device. There are plenty of links to allow the creation of new Manufacturers, device categories, command and event categories, and new events and commands, as needed..but please, only do this if an appropriate group does not exist.
Once this device template has been created, it can be checked into sqlCVS. Once it has been checked in and approved in sqlCVS, you can run DCEGen (if it is C++), or start writing the Device Template in the Edit Ruby Codes section of the device template. If you choose the latter, you should check in your code changes via sqlCVS.
If it is a C++ device, then DCEGen should be run from src/DCEGen of your source code checkout, followed by sql2cpp from src/sql2cpp to generate the needed constants. These packages can be installed via apt as pluto-dcegen and pluto-sql2cpp respectively, and since they are installed in /usr/pluto/bin, you'll need to use the full path to refer to them.
DCEgen will create a full C++ project, with all the scaffolding needed, you fill in the blanks of each command method with code to deal with the commands. For events, you'd have to spawn a thread, and emit events within it.
There are plenty of example devices in both the Ruby and C++ realm, that can help you. Hopefully this should give you enough to start digging for info.
-Thom