-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review configuration interface #115
Comments
Need more details David.... |
Andrew, please take a look now. |
Thanks. .cfg file sounds like a good idea. |
Duplicate of #253 |
If we put the default configuration from daemon_cl in a file called lets say gPTP.cfg, we would have something like below. The idea would be starting the daemon using the file as another option, as for instance: daemon_cl eth0 -f gPTP.cfg. Default command line parameterssintonize = true PHY Ingress/Egress delay in nanosecondstx_phy_time = 184 |
The same idea used inside the avtp_pipeline was used here. We are now adding the possibility to use a configuration (ini) file to configure the internal variables of gptp. Currently the following was added: - 3rd party ini file parser; - Class with callback to the parser - some options were added as an example to the gptp_cfg.ini file - all the current options are parsed inside linux/daemon_cl.cpp and printed out during init. Still missing: - use the options from the file inside gPTP Also, the linux daemon_cl.cpp was indented since there were several indenting problems on the file.
Current configuration interface is done through switches upon gPTP initialization. Improve the current one to support more parameters.
Here the current configuration switches we have:
./daemon_cl [-S] [-P] [-M ] [-A ] [-G ] [-R <priority 1>]
-S start syntonization
-P pulse per second
-M save/restore state
-A initial accelerated sync count
-G group id for shared memory
-R <priority 1> priority 1 value
-T force master
-L force slave
We could embed that on a gPTP.cfg and read this file on its initialization. Eventually we will need more parameters, as for instance the phy delay, which currently has to be manually set on a define (and hence recompile the gPTP). Code below:
linux/src/linux_hal_generic.cpp:52:#define TX_PHY_TIME 184
linux/src/linux_hal_generic.cpp:53:#define RX_PHY_TIME 382
linux/src/linux_hal_generic.cpp:55://#define TX_PHY_TIME 8000
linux/src/linux_hal_generic.cpp:56://#define RX_PHY_TIME 8000
The text was updated successfully, but these errors were encountered: