Network sync

NodeCanvas Forums Support Network sync

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12457
    rayfoundry
    Participant

    Hi there,

    I’m using a custom network layer to synchronize state from a ‘master’ application running a FSM to a ‘slave’ application on another device. Both apps are using the same FSM to streamline development. I’m able to sync the current active ‘state’ of the FSM to the slave with no problem. I’m using FSMOwner.TriggerState to set the correct FSM state directly on the slave. Because it’s the same codebase, the normal transitions are still active on the slave however. Is there a good way to prevent the FSM from following transitions? I would prefer to not have to remove any transitions from the FSM in the codebranch for the slave devices.

    Many Thanks in advance,
    Daniel

    #12459
    Gavalakis
    Keymaster

    Hello Daniel,

    Hmm. Considering I understood correctly, maybe you could instead of removing transitions, disable the FSMOwner altogether in the slave devices and as such any TriggerState calls will result in nothing being triggered since the FSM is not Running.
    Let me know if that would work for what you are after.

    Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

    #12470
    rayfoundry
    Participant

    Hi Gavalakis,

    the use-case is to be able to trigger state of the FSM actively but beeing able to disable the defined transitions for each state of the FSM.

    I already thought about including a boolean flag on each transition which needs to be true for following the transition. This would work where I have defined cinditions, but wouldn’t help with “OnFinished” transitions – which would then trigger to early on the master device.

    Is there a way to remove transitions from a state in code at runtime?

    #12494
    Gavalakis
    Keymaster

    Hello again,

    Yes, it is quite possible to remove transitions or otherwise alter the graph in runtime.
    Here is an example code to remove all transitions from a graph assigned to a GraphOwner:

    Let me know if that works for you.
    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.