Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Asset configuration with table
Asset configuration with table [message #1810176] Fri, 02 August 2019 09:49 Go to next message
Pedro de Arquer is currently offline Pedro de ArquerFriend
Messages: 34
Registered: December 2018
Member
Hi,

I'm creating a wire to process incoming variables and map their name and value, so I need a specific configuration for each variable (for example, its assetName, original variableName, newName, and conversionFactor). To provide such information to the asset I've added a configuration field for a JSON where such configuration is listed. However, I think it would be much easier, robust and readable a table whose columns could be configured to ensure data is inserted and correct.

Is there a way to do this in wires configuration? Or anywhere in Kura besides Drivers?

Regards,

Pedro
Re: Asset configuration with table [message #1810179 is a reply to message #1810176] Fri, 02 August 2019 09:59 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
Hi,
could you please detail a little bit more your request?

It is not clear to me.

Best regards,
Matteo
Re: Asset configuration with table [message #1810180 is a reply to message #1810179] Fri, 02 August 2019 10:11 Go to previous messageGo to next message
Pedro de Arquer is currently offline Pedro de ArquerFriend
Messages: 34
Registered: December 2018
Member
Hi,

Of course.

Consider I need to process the variables read from a device in order to, for example, translate their format, generate alerts, etc. In this case i'm trying to rename the variable and scale the value to a different unit right before sending it to somewhere. For such conversion I need to define a set of fields for each variable. An example of those fields could be:

- asset: asset where the variable was read from
- originalName: name of the variable
- newName: new name of the variable
- factor: value to scale the variable

For example, with the following configuration:

- asset: asset1
- originalName: channel1
- newName: name1
- factor: 0.001

The WireRecord (simplified form):
[assetName=asset1, channel1=12345678]

Would become
[assetName=asset1, name1=1234.5678]


To be able to configure this for multiple variables, I need to provide the wire component with an array of sub-configurations. I'm currently doing this with a JSON string that the component must verify and map each time the configuration is updated. I think a table (with configurable columns and format validation) would be a great approach. Is there a way to create a table interface in the wire component configurations? If not, is there a better alternative to the JSON without such table?

Regards,

Pedro

[Updated on: Fri, 02 August 2019 10:15]

Report message to a moderator

Re: Asset configuration with table [message #1810183 is a reply to message #1810180] Fri, 02 August 2019 10:27 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
Maybe you can use a script filter component to do so.

I believe it's not as simple as you'd like. But should work.
Re: Asset configuration with table [message #1810252 is a reply to message #1810183] Tue, 06 August 2019 07:31 Go to previous messageGo to next message
Pedro de Arquer is currently offline Pedro de ArquerFriend
Messages: 34
Registered: December 2018
Member
Could you explain your suggestion better? Or is there any example to emulate in the Kura source?
Re: Asset configuration with table [message #1810253 is a reply to message #1810252] Tue, 06 August 2019 07:32 Go to previous message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
http://eclipse.github.io/kura/wires/1-kura-wires-script-filter.html
Previous Topic:H2db-server connection problem
Next Topic:Wire Graph thread blocked
Goto Forum:
  


Current Time: Sat May 04 00:13:55 GMT 2024

Powered by FUDForum. Page generated in 0.03893 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top