Oscillatord aims at disciplining an oscillator to an external reference. It is responsible for fetching oscillator and reference data and pass them to a disciplining algorithm, and apply the decision of the algorithm regarding the oscillator.
It can be used to discipline the Atomic Reference Time Card from Orolia
Oscillatord can either be used to discipline and/or monitor a oscillatord a GNSS external reference.
For now only the following oscillators are supported:
Orolia's mRO50
Microsemi's SA3X
Microsemi's SA5X
cmake
libjson-c-dev
pps-tools
libsystemd for tests
This program is built using cmake:
mkdir build
cd build
cmake ..
make
sudo make install
For test purposes, it is easier to compile the executable and run it from a terminal: in project's root directory
make -C build
sudo ./build/src/oscillatord example_configurations/oscillatord_default.conf
The oscillatord daemon, takes input from a PHC clock, reporting once per second, the phase error between an oscillator and a reference GNSS receiver. For an example of such a device, please see the ptp_ocp kernel driver.
The phase error read is then used as an input to the disciplining-minipod library which will compute a setpoint, used by oscillatord to control an oscillator and discipline it to the 1PPS from a GNSS receiver. Oscillatord also sets PHC'stime at start up, using Output from a GNSS receiver.
To communicate with GNSS receiver's serial it uses ubloxcfg. This library handles the serial connection to the GNSS receiver and parses Ublox messages.
oscillatord uses a config file, for which examples are provided in the example_configurations/ directory.
So to invoke oscillatord, one can, for example do:
oscillatord /etc/oscillatord.conf
Super user rights may be required to access the devices.
The daemon can be terminated with a SIGINT (Ctrl+C) or a SIGTERM.
The configuration file is a succession of lines of the form:
key=value
Any unsupported key will be ignored and thus can be used as a comment, but using '#' at the start of a comment line is a good practice. No blank character must be added before or after the '=' sign, or they will be considered as part of, respectively, the key or the value.
:warning: At least monitoring or disciplining should be set to true for program to work.
check default config for description and default values of parameters
Oscillatord ask for GNSS receiver to perform a SurveyIn so that it may enter Time mode.
During SurveyIn the gnss receiver tries to estimate its position with a certain accuracy (9m default set in our config)
Once it has reached the specified accuracy it will switch to TIME mode which will improve timing performance
Please see Ublox F9T Interface Description for further details
ART Integration tests check wether art card handled by ptp_ocp driver works by interacting will all its devices Integration tests can be run to test the behaviour an ART Card. they are located in tests/art_integration_testsuite. Integration test do the following:
mkdir build
cmake -D BUILD_TESTS=true ..
make
mkdir build
cmake -D BUILD_UTILS=true ..
make
This program write default factory data into ART card's eeprom:
art-eeprom-format -p PATH -s SERIAL_NUMBER
This program allows user to R/W disciplining parameters from/to a config file such as art_calibration.conf to/from EEPROM file of the ART Card.
Reading from disciplining parameters from the EEPROM into a config file allows user to modify the disciplining parameters inside the config file before writing the updated parameters into the EEPROM in order to increase/decrease the number of ctrl_load_nodes and ctrl_drift_coeffs (which must be ctrl_nodes_length at all time) Resetting temperature table will only reset temperature table and not modify the rest of the EEPROM
art_disciplining_manager [-p eeprom_path | -m mro50_path] [-w calibration.conf -r -f -o output_file_path -t -h]
This program allows user to R/W temperature table from/to a text file such as relative_temp_table.txt to/from EEPROM file of the ART Card.
art_temperature_table_manager -m eeprom_path [-w input_file | -r -o output_file_path | -h]
art_monitoring_client program offers a simple interface to test and interact with monitoring socket inside oscillatord
Program allows to fetch data sent by the monitoring socket as well as perform the different actions oscillatord can respond to coming from a socket client:
art_monitoring_client -a address -p port [-r request]
.
├── example_configurations : per oscillator type configuration examples
├── gnss_config : GNSS default config file as output by libubloxcfg
├── src : main oscillatord source code
│ └── oscillators : oscillator implementations
├── systemd : systemd service file
└── tests : code of the oscillator simulator and integration tests
└── art_integration_testsuite : Integration tests for the ART card
└── lib_osc_sim_stubs : code of the lib_osc_sim_stubs library
└── utils : Programs used to configure ART card EEPROM