To access object via the google protobuf format, some preparations need to be done.
The generic bundle ...wrapper.protobuf contains the common elements to receive and decode object sends via the protobuf protocol
Addtionally, a bundle must be provided that contains information about the object type, that is send.
In the following, we will give an example of the usage. We show how to integrate data from the Debs Grand Challenge 2012 (http://www.csw.inf.fu-berlin.de/debs2012/grandchallenge.html)
The following code block, shows how to integrate a protobuf source. Here a tcp server is opened on port 9999 that can handle objects of the type
The schema corresponds to the definition of this point with the google protobuf description, which can be found in the following:
This format needs to be transformed into a java class with the google protobuf tools (see https://code.google.com/p/protobuf/)
The resulting class is CManufacturingMessages.
This generated class must be placed in new osgi bundle (or must be accessable somehow).
To register this type a declarative service of the type IProtobufDatatypeProvider must be defined.
With the implementing class, that wrappes the generated file.