pjkundert / cpppo

Communications Protocol Python Parser and Originator -- EtherNet/IP CIP
https://hardconsulting.com/products/6-cpppo-enip-api
Other
332 stars 109 forks source link

Support for JSON-Encoded result for enip_client command ? #26

Closed onimsha closed 7 years ago

onimsha commented 7 years ago

Is it possible to have an option that is encoding the output under JSON format? Currently it's printing all the tags line by line, i think it will be nice to able to format it into json string.

pjkundert commented 7 years ago

I presume you're talking about the command-line interface, which just performs the I/O, and then prints and/or logs the results?

Since the request data is coming back in Python 'dict' form, it should be easy to implement this as an optional output format. Care to give it a try?

I've taken an initial crack at something, in branch feature-printing-json...

onimsha commented 7 years ago

Sure, i will give a try, using that branch.