We are quite happy how the current openSCADA protocol (NGP – Next Generation Protocol) turned out. It support quite some features – encryption, compression, callbacks – but to implement it properly with a low level language as C, is pretty challenging. Since most of its complexity is not needed on resource constrained devices anyway, we decided to create a protocol which fills this gap.
openSCADA on small devices
Together with two other open source projects (4DIAC and eTrice) we created a new protocol which is targeted for small embedded style devices. The use case is: to bring in data from these devices into openSCADA with the least possible impact in the performance of these embedded devices, as well as ease of implementation. That means, some features which can be found in the NET or NGP protocol, are just not there. The handshake will be limited to a minimum, callbacks are out of the question, for all operations it will be assumed that the device supports a notion of registers and so on. For devices which support it, browsing the item list/tree will be available.
Seamless openSCADA integration
The SFP protocol will be accessible like the protocol implementation, which means you connect – for instance via the OSTC – to “da:sfp://<ip>:<port>” and you are good to go. At first, we will only support DA via SFP, HD is not really useful on devices which are mostly concerned with data acquisition, AE is maybe something which could come in the future (some PLCs have native support for alarms), but it is out of scope for now.
In our discussions about the feature set we quickly realized, that we could talk days about the included features and its merits, but as experience shows, the better way is to start with some ideas in mind and flesh out the protocol during implementation.
That means we already have the basics of an implementation ready.
The library is available in project “libopenscada-sfp-server” (in the 1.2 branch) on openSCADA git, GitHub and Bitbucket. In addition we will make regular copies to Ubuntu Launchpad which will land in the openSCADA PPA with the daily build.
No fixed API yet
Since the implementation is still ongoing, there is also no specification for the protocol ready and the API is not finished. One goal is to have a lightweight C API which can easily be used to create own implementations. The current implementation uses libevent to allow easy portability, but if one would need to implement the server on smaller devices with a unique TCP stack, it will be possible to use the C API as well, only that the network communication has to be implemented again.