Modify Device Extension Point Destination for placing new device type into custom category

Hi,

I have been battling with this for awhile. I have been working on a device driver module, and I can add the device type no problem to the OPCUA page and can add devices through that page. I am currently working in 7.9 (I know it is approaching end of life, but that is what our client wants).

I have been looking at the extension point system and the example and what I would like to do is create something like a Record Action Table in a our own added Category in the configuration tab that only adds new instances of our devices. I previously was able to do this, but when I did I was unable to get my module registered with the device manager. This seemed to stem from the fact that I was not creating a corresponding DeviceSettingsRecord corresponding to my own SettingsRecord instances.

I’d recommend you abandon this idea and work within the confines of the device/driver system.

You would have to re-create a lot of complicated functionality that the ExtensionPointPage does to link main and sub-records together and I wouldn’t even know where to start providing guidance on that.

Okay, I actually have one idea that might work.

Create your own subclass of ExtensionPointPage, using DeviceSettingsRecord as the base type.

Then you’d return your own custom ExtensionPointManager implementation from ExtensionPointPage::getExtensionPointManager that only knows about your driver’s DriverType.

Excellent. That was along the lines of what I was thinking. I’m glad to know that at least I was on the right track. I also figured that what I was asking would end up being complicated.

As always thank you for your quick response.

If this works, you might even be able to get your driver to not show up in the regular flow to add a device by returning an empty list from AbstractDriverModuleHook::getDriverTypes, if you’re using it as a base for your module hook.

That would be the hope. I will let you know where I get. Thank you for your help.

Actually that may not work out… I don’t think you’re driver instances will ever get started.

Our end design goal is to be able to add some sort of import functionality specifically for our devices. My thought was that if we had a page specific to our devices that we could add a new button to import a csv file which would add new instances of our device without having to try to recreate the entire OPCUA Devices page.

I suspect you can make a top-level config page to do so, as long as you create both settings records for each instance.

Well, after some fiddling I was able to get the gateway to make a duplicate of the devices page under its own heading with only my new driver listed and my driver not being listed under the OPCUA devices section.

When I create a new device it gives me a device configuration page and identical to the one that I had listed under the OPCUA devices and will create the corresponding records.

What it doesn’t do is actually list my created devices on the gateway, it is just creating the records.

Yeah, because by not registering your DriverType the DeviceManager can’t instantiate, start, and bookkeep your device instances. That’s why I was saying it won’t work out after all…

What if my Module hook implements the DriverManager instead of using the ExtensionPointManger?

Would I be able to use its registerDriverType method to have my devices get listed? Or not easily?

Currently I haven’t filled out any methods there but I am implementing the DriverManager and my created devices are showing up on my devices in the status tab, just not on the page where I actually create my new device instances.