In order to getting started with your own DevicePlugin it is reccommended to walk trough following tutorials to understand how the mechanism works:
This tutorial shows you how to open, edit, build and load the first plugin.
This plugin demonstrates the usage of events and actions.
This device demonstrates the usage of states and params.
This device demonstrates how a writable state works.
The plugin shows you how to use the NetworkManager and how asynchronous actions work
The plugin shows you how to use the CoAP lib