Hello Everybody,
I am trying to implement a new device, just a simple meter, connected via Modbus TCP.
Because I basically only have to copy the code from another, already implemented meter and change the register from which the data gets pulled is should be relatively straight forward.
But my code, which is mostly just copied from other meters gets a lot of errors I can´t explain. Even if the exact code works in another component.
I have imported all the necessary components and created the Bnd OSGi project from the template provided in openEMS.
In addition I have a few interessting quirks in Eclipse right now.
For example I have 38 errors in my code, but the Problems tab shows 0 erros.
When crating a new project the templates from openEMS are only availabe sometimes (I could find a systemetic).
This makes me belive that the problem is somewhere deeper than just my code beeing false.
I reloaded the workspace and cleaned all projects a few times. I even reinstalled java and eclipse. But that didn´t help.
Sadly, I can´t give you acces to my code, but here are a few examples of the erros a get:
(my code next to the code I copied)
My constructor:
Here is my code ext to the code which I copied
The Error message I get in line 57:
The constructor AbstractOpenemsModbusComponent(OpenemsComponent.ChannelId[], SymmetricMeter.ChannelId[], AsymmetricMeter.ChannelId[], MeterSentronPac4200.ChannelId[]) is undefined
Another example when pulling the data via modbus
Error messages:
Line 94: Exception OpenemsException is not compatible with throws clause in AbstractOpenemsModbusComponent.defineModbusProtocol()
Line 96: The constructor ModbusProtocol(AbstractOpenemsModbusComponent, Task…) refers to the missing type OpenemsException
Line 100: The method m(T) in the type AbstractOpenemsModbusComponent is not applicable for the arguments (AsymmetricMeter.ChannelId, FloatDoublewordElement,
ElementToChannelConverter)
I would really appreciate any input.
Best Regards
Tobi