Changing Address Space at runtime
Posted: 23 Apr 2014, 11:01
Hello,
I'd like to add / remove Nodes during runtime when my physical device infrastructure changes (e. g. when a subdevice is connected or disconnected). Is it possible to change the address space structure without re-establishing the whole server-client connection? Actually, I'm managing an internal linked list with refernces to all my nodes (as OpcUa_BaseNode* ). For testing purposes, I've tried to iterate over the list and call UaServer_RemoveNode() on every node, then rebuilding the whole address space (like CustomProvider_CreateAddressSpace() in the examples), but I sometimes get segfaults then.
Is there any cleanup method I'm missing to call or any pointers I've to zeroize before I can rebuild the address space or single nodes? Which are the necessary steps to remove a single node from the address space and clear it properly, and to add a new node and append it to the address space? Or is it necessary to close all connections and re-initialize the whole stack when the infrastructure changes?
Furthermore, if it's possible to change the address space dynamically, is there any possibility to notify the changes to connected clients?
Edit: I'm using the Linux Ansi C SDK.
Thanks a lot in advance for your help.
best regards,
Felix
I'd like to add / remove Nodes during runtime when my physical device infrastructure changes (e. g. when a subdevice is connected or disconnected). Is it possible to change the address space structure without re-establishing the whole server-client connection? Actually, I'm managing an internal linked list with refernces to all my nodes (as OpcUa_BaseNode* ). For testing purposes, I've tried to iterate over the list and call UaServer_RemoveNode() on every node, then rebuilding the whole address space (like CustomProvider_CreateAddressSpace() in the examples), but I sometimes get segfaults then.
Is there any cleanup method I'm missing to call or any pointers I've to zeroize before I can rebuild the address space or single nodes? Which are the necessary steps to remove a single node from the address space and clear it properly, and to add a new node and append it to the address space? Or is it necessary to close all connections and re-initialize the whole stack when the infrastructure changes?
Furthermore, if it's possible to change the address space dynamically, is there any possibility to notify the changes to connected clients?
Edit: I'm using the Linux Ansi C SDK.
Thanks a lot in advance for your help.
best regards,
Felix