Can anyone please provide links to tutorials or documentation on how to write Assets (Wires) to be deployed in the ESF Admin. (I am using a Eurotech edge computing device.)
I have successfully written and deployed a Java API (ConfigurableComponent) as a Bundle. I can see that it is Active. I just need help with how to write a Java API that becomes an Asset
Thanks.
I'm not familiarized with ESF, but as Kura is similar and compatible, let me provide you an answer based on that.
At least in Kura, there is only one available Asset which is not expected to be replaced or extended (org.eclipse.kura.wire.WireAsset
). What you can do is create a Driver with a different configuration for the Assets variables. In most cases this is the best option and more than enough to create any additional connection.
The creation of a Driver is quite complicated to be summarized here but I suggest you to use the following references:
In general terms, once you have created a configurable component, you must implement the Driver class in the component. Don't forget to define it in the OSGI-INF XML file. Use the S7 example for this.
The definition of your Asset can be modified by returning a Channel Descriptor in the Driver method getChannelDescriptor
where you describe the variables as in this example on S7 descriptor.