Closed cfreire closed 1 year ago
@cfreire thanks for your interest. this is a good question in my mind as well.
Since we already have a config file, why not put all arguments into it?
The reason I finally decide to keep the current format is,
Now you may ask why then device_id
is still in the config file, that is because MODBUS RTU relies on host's serial port, which can only be occupied by one process at a moment for communication, basically we cannot run two modpoll
commands on the same serial port, so it has to be defined in one modbus config file for all devices connected to one serial port.
Hope this clarifies. Shaodong
Many thanks @gavinying for your kindly replay.
Well honestly, I'm writing an OPC UA Server that poll's about 100 devices, and uses your modpoll
to initially verify the connection and values. Afterwards the config.csv
file, goes into a poll directory with the rest 99 config files. I think it's easy to maintain 100 different config files, than a big one.
So for me it's better to add all connection data to the config001.csv
, rather a separate into connection_location + poll_data
I perfectly understand your reasons for not doing so and agree with them. Just different purposes!
As Raymond Hettinger once said in a Python conference "We never know what will be the future utilization for our software". He claims to have written a flight simulator in AWK. Again, many thanks for your work and contribution.
Glad to see modpoll
tool helps in such a different way! Always welcome forking for your own needs, happy hacking!
I think it would a benefit to add
ip addr
andport
to device line in config file (.csv)example: sm101.csv
This will allow to simple call
$ modpoll -f sm101.csv
. The main objective is to record on the .csv file the device origin for easy polling multiple devices. Many thanks again cf