Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [kura-dev] Kura Driver and pre-filling asset with channels

Hi Benjamin,

In short, you cannot easily do what you want. In theory, you could sub-class the Asset class and implement the channel automation you describe. However, transferring this logic to the web UI would be difficult. The UI currently has no way of specifying anything other than the default Asset implementation. We have discussed several approaches to speed up the creation of channels, but all approaches have drawbacks. 

The release of Kura v3.2.0 will allow you to download a Wire Graph, which would include the Assets and Channels, and apply it to another instance of ESF. I understand this isn't exactly what you are asking for, but it would provide a way to apply "known Wire Graphs" to a specific scenario (i.e. SensorTag). 

Regards,
--Dave

On 3/12/18, 11:21 AM, "kura-dev-bounces@xxxxxxxxxxx on behalf of Benjamin Cabé" <kura-dev-bounces@xxxxxxxxxxx on behalf of benjamin.cabe@xxxxxxxxxxxxxxxxxxxxxx> wrote:

    Is it possible to create a Driver that would instantiate assets with Channels already created and pre-configured?
    E.g one could imagine a SensorTag driver that would allow to create a SensorTag Asset with all the channels corresponding to the "capabilities" of the SensorTag already created with default names and relevant datatypes, and maybe have them disabled by default?
    I think there are many scenarios where, either because the channels are by nature very static (e.g we already know the available channels for a SensorTag), or because they can be discovered using the underlying protocol, this could be helpful, and I an not sure it is possible today?
    
    I couldn’t find any obvious way to do this in the API but maybe I missed something. I guess another option would be to tap into configadmin to automagically create the configuration properties corresponding to the desired channels, but it sounds a bit hackish (if even possible).
    
    Thanks in advance,
    Benjamin -
    


Back to the top