ottowayi / pycomm3

A Python Ethernet/IP library for communicating with Allen-Bradley PLCs.
MIT License
397 stars 88 forks source link

[Feature] Request path with multiple classes and instances #297

Closed YuG0rd closed 11 months ago

YuG0rd commented 1 year ago

In some cases, it is required to send a request path that contains several class identifiers. I have made the required changes so the existing methods will support it without requiring any changes. It might be better to have an option to send tuples of classes and instances but that will require additional changes that I wasn't sure you will want. Let me know if any additional information or help is required.

Btw, sorry for not targeting the develop branch like the documentation says, I cannot find this branch.

Example of using after update:

res = cip_connection.generic_message(service=0x4c, class_code=[0x68, 0x6c], instance=[0x0, 0x123], connected=False, unconnected_send=True, route_path="bp/0")