Skip to content

RFI: Adding a new device map to a running TCP Server #146

@ejrfisher

Description

@ejrfisher

Less of an Issue more of a question regarding the possibility to update a running Server objects deviceMap

From my understanding each Server uses a deviceMap object to map ModbusUnitID(s) to appropriate handlers with .addEndpoint().

Is there any way to have a running modbusServer with lets say an existing deviceMap of modbusUnitId = 1 and its respective handler and then update the deviceMap with another endpoint mapping modbusUnitId = 2 and its respective handlers?

Or is there a way to non-destructively create a new Server Object that replaces the currently running Server?

Currently if I try using two Server objects, I get a bind error (makes a lot of sense)
If I try to update the DeviceMap and then shutdown the running Server and create a new Server Object I get
2024-08-05 20:29:38 error: RESPONSE_TIMEOUT
when I try to read/write any value from the first deviceMap (i.e. modbusUnitId = 1)
The second deviceMap endpoint where modbusUnitId=2 works just fine.

Just wondering if you could share any insight. Happy to provide any and all information.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions