Skip to content

When is the remote Node initialized? #64

@Poikilos

Description

@Poikilos

I'm still getting the PR ready regarding #62 but I am back on the task and making progress again now. This is issue tangentially related to that issue since it involves being able to check if a node is ready to receive data (only should be blocked by openlcb if Uninitialized--or connection itself is not CanLink.State.Permitted but that is checked in the issue #62 pending PR code).

The whether there is LinkUp or LinkDown in RemoteNodeProcessor, the Node's state is set to Uninitialized.

It seems like the only other way a remote Node could be set to initialized is in LocalNodeProcessor if the givenNode argument of process is used, but that argument is never used, so it only ever processes self.node (the local Node). Therefore, I assume that localnodeprocessor.py has nothing to do with it, and there is perhaps a copy-paste error below (or something missing).

Is this intentional and is it set to Initialized later, or should it be Node.State.Initialized in the case of LinkUp at this phase?

(openlcb/remotenodeprocessor.py)

    def linkUpMessage(self, message, node) :
        # affects everybody
        node.state = Node.State.Uninitialized
        # don't clear out PIP, SNIP caches, they're probably still good

    def linkDownMessage(self, message, node) :
        # affects everybody
        node.state = Node.State.Uninitialized
        # don't clear out PIP, SNIP caches, they're probably still good

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions