Cpp
From LinuxMCE wiki
To create your C++ project, run DCEGen, which will be in /usr/pluto/bin on Linux or \pluto\bin on Windows. Add a -d [device template id] parameter. Your device template id is shown after the description input box.
DCEGen will create a project in a folder with the same name as your device template. Look at the header and you will see data members for all the your data, with _get() and _set() functions. There are also members functions to call to fire an event. Lastly, there will be command stubs in the .cpp file for you to implement your commands. By default, they just write the command out to the console.
Compile your project. DCEGen will have created both a gcc Makefile and a Visual Studio .NET 2003 project file.
Next, go into the LinuxMCE Admin Website and add an instance of this new device to your installation. Here you can specify the values for the data parameters your device needs.
You will need to restart DCERouter so it reloads the device configuration. If you used LinuxMCE's kick-start cd or installer, DCERouter will run automatically every time you reboot. When DCERouter is running on your Core, just run run your compiled project with the paramters -d [device id] -r [ip address of the core or dce router].
Your device will connect to the router--you can see this in the router's logs. You can send your new device commands with the ***MessageSend*** utility.
Now you can add your own implementation to make the device do whatever you want. To see some of our DCE Devices, chose Download from the menu, go to the 'Source Code' section, under Manufacturer LinuxMCE, category DCE Devices.
