Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. DCI modification using protocol

DCI modification using protocol

Scheduled Pinned Locked Moved Support
4 Posts 2 Posters 13.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    M
    Mongi
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi!

      Currently, the only way to lock node's DCI list is to issue CMD_GET_NODE_DCI_LIST, because when I was writing this, I was thinking only about GUI client, which usually need to display current DCI list immediately. Our current intention is to remove all exclusive locks for configuration and replace it with change notifications - this is already done for some parts of server configuration, like use management. Why receiving full DCI list is a problem? You can just ignore it if you don't need it. And for end of list - you don't have to wait a timeout to detect a list end - each NXCP message has a flags field, and in many list responses flag "END OF SEQUENCE" (0x0008) is used to indicate end of list. In case of DCI list, at the end you will get empty message with this flag set.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • M
        M
        Mongi
        wrote on last edited by
        #3

        Receiving full list is not a problem unless there are some "end of list" marker. I was confused with CMD_OBJECT_LIST_END and expected to find something similar about node list. Thanks for the tip with "END OF SEQUENCE" flag, seems to work now.

        Does all lists sent by server ends with "END OF SEQUENCE" flag or there are exceptions?

        1 Reply Last reply
        0
        • V
          V
          Victor Kirhenshtein
          wrote on last edited by
          #4

          Currently it's a mix. End of sequence flag was introduced later during protocol development, so some lists uses special message, and some uses this flag.

          Best regards,
          Victor

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          Powered by NodeBB Contributors
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups