Skip to content

Multiple Emulated PDs from a single Python instance #235

@HaydosR

Description

@HaydosR

I have an OSDP network with a CP and upto 40 PDs attached. I've noticed that whilst a PD will communicate just fine when there are less than 10~20 devices connected, as the number of PDs increases the reliability of my PD deteriorates (I suspect memory issues and the overhead of checking and discarding the sheer volume of messages not destined for PD).

To aid in my debugging of the PD, I would like to emulate X many PDs from a single Python script, talking via a USB->RS485 adaptor. This will generate a sufficiently 'chatty' bus that I can use to debug with.

I've made an attempt to spawn a single Serial connection, that I then pass to each PD which is constructed as per example code. Each PD is then passed to a new thread which runs a loop. From what I can see though, as the first PD reads buffered data from the CP it will either act on the packet or discard the packet, rather than leaving that payload available for the next PD to attempt to use / acknowledge.

Is there an example for how multiple PDs can be registered to the same serial connection?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions