Skip to main content



      Home
Home » Eclipse Projects » Kura » How to get AssetName by ChannelName (ChannelRecord)
How to get AssetName by ChannelName (ChannelRecord) [message #1832789] Fri, 25 September 2020 02:58 Go to next message
Eclipse UserFriend
Hi all,

I have created a bundle that iterates over all assets and channels using AssetService and starts the listeners for all channels. This bundle should handle all events of the channels.
When an event is triggered (onChannelEvent(ChannelEvenet event)), I only get the channel configuration from the ChannelRecord, but I also need information about the AssetName and DriverName. Does Kura offer a function to find out the AssetName based on the ChannelName?
Re: How to get AssetName by ChannelName (ChannelRecord) [message #1832792 is a reply to message #1832789] Fri, 25 September 2020 04:21 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
we don't have such feature at the moment. You have to track it when you proceed registering the listener.

Best regards
Re: How to get AssetName by ChannelName (ChannelRecord) [message #1832793 is a reply to message #1832792] Fri, 25 September 2020 04:51 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for your reply. When i activate the listener for a channel in the Kura UI, and wire it with the H2DBStore, how does kura handle this? The assetName is stored in the database. Is it a internal function?
Re: How to get AssetName by ChannelName (ChannelRecord) [message #1832794 is a reply to message #1832793] Fri, 25 September 2020 04:55 Go to previous messageGo to next message
Eclipse UserFriend
The message coming out of the asset contains also a reference to the name of the asset itself. That is the reason why you are seeing it in the downstream database
Re: How to get AssetName by ChannelName (ChannelRecord) [message #1832799 is a reply to message #1832794] Fri, 25 September 2020 06:28 Go to previous messageGo to next message
Eclipse UserFriend
Another idea: If I activate the listener via the Ui and connect the assets with the WireGraph to the MQTT-publisher, will there be any information about the asset?
Re: How to get AssetName by ChannelName (ChannelRecord) [message #1832800 is a reply to message #1832799] Fri, 25 September 2020 06:29 Go to previous messageGo to next message
Eclipse UserFriend
The information will be in the message in the wires. Then it depends on the publisher that you'll use.
Re: How to get AssetName by ChannelName (ChannelRecord) [message #1833100 is a reply to message #1832800] Fri, 02 October 2020 05:00 Go to previous message
Eclipse UserFriend
The asset name is the same as kura.service.pid. So I used the method assetService.getAssetPid(Asset) and got the asset name! This was my solution to my question.
Previous Topic:WireAsset does not start reading
Next Topic:How to add new logging as a text file and not using kura.log
Goto Forum:
  


Current Time: Fri Jul 04 07:38:14 EDT 2025

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

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

Back to the top