Hello.
I'm writing my own client to connect and operate with NetXMS using it's protocol. It was quite successful until I faced creation of DCI's.
The problem is that to create DCI of an object, you need to create DCI(you get just new ID) and then modify it's content. When I tried to modify it, I've go error RCC_OUT_OF_STATE_REQUEST. According to session.cpp and ClientSession::ModifyNodeDCI I need to lock the object DCI list somehow. Some hard search resulted the only command able to lock this DCI list of object is CMD_GET_NODE_DCI_LIST(and CMD_UNLOCK_NODE_DCI_LIST to unlock). But it has two disadvantages:
1) It gives you all of DCI within selected object
2) This list of DCI doesn't finish with any "LIST_END" command, like object list is closed by CMD_OBJECT_LIST_END. So, we have to wait for a timeout in order to figure out that server finished list sending. (Moreover, there is command CMD_NODE_DCI_LIST_END in protocol reference but it's totally missing in source code )
 )
So, is there more straightforward way to create/modify new DCI without waiting for full DCI list (or without this list at all)?
If it's the only way for now, could you please implement some possibility in protocol to simply lock and unlock object DCI list for current session?
			I'm writing my own client to connect and operate with NetXMS using it's protocol. It was quite successful until I faced creation of DCI's.
The problem is that to create DCI of an object, you need to create DCI(you get just new ID) and then modify it's content. When I tried to modify it, I've go error RCC_OUT_OF_STATE_REQUEST. According to session.cpp and ClientSession::ModifyNodeDCI I need to lock the object DCI list somehow. Some hard search resulted the only command able to lock this DCI list of object is CMD_GET_NODE_DCI_LIST(and CMD_UNLOCK_NODE_DCI_LIST to unlock). But it has two disadvantages:
1) It gives you all of DCI within selected object
2) This list of DCI doesn't finish with any "LIST_END" command, like object list is closed by CMD_OBJECT_LIST_END. So, we have to wait for a timeout in order to figure out that server finished list sending. (Moreover, there is command CMD_NODE_DCI_LIST_END in protocol reference but it's totally missing in source code
 )
 )So, is there more straightforward way to create/modify new DCI without waiting for full DCI list (or without this list at all)?
If it's the only way for now, could you please implement some possibility in protocol to simply lock and unlock object DCI list for current session?