-
Notifications
You must be signed in to change notification settings - Fork 507
gPTP: ClockServos, BMCA and HotStandby #1032
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
base: master
Are you sure you want to change the base?
gPTP: ClockServos, BMCA and HotStandby #1032
Conversation
…into develop_gptp
# Conflicts: # .cproject
# Conflicts: # src/inet/clock/base/ClockBase.cc
Adding Jumping Clock description.
Finished BMCA
…tas showcase (still working)
# Conflicts: # showcases/tsn/timesynchronization/gptp/doc/index.rst # src/inet/clock/base/ClockBase.cc # src/inet/clock/base/ClockBase.h # src/inet/linklayer/ieee8021as/Gptp.ned
Wow! Thank you for this pull request! It looks really good, and I'm pleasantly surprised how much you could pick up from the architecture and the code without a comprehensive documentation. This really is a huge pull request and it definitely goes in the right direction. It's going to take some effort from both sides to include this in INET, which we clearly want to do. For the following two weeks I'll be quite busy with preparing my TSN presentation for the WFCS 2025 IEEE conference on factory automation in Rostock. I'll come back to this PR after that. |
That's a nice coincidence, as we will also have a WiP paper presentation at WFCS on Wednesday based on this implementation. |
Oh, it's good to know! We are coming back home on Wednesday evening, but let's meet if possible! I'll keep in mind that you are going to have a presentation. |
This pull requests extends the gPTP implementation with clock servos, BMCA and hot standby.
gPTP bugfixes
The gPTP implementation had some bugs, which are fixed in this PR
ClockServos
They only Servo-like clock existed in INET was the
SettableClock
.Now there is a
ServoClock
base class, which provides thejumpClockTo
function, which was the name suggest jumps to a specified clock time.Additionally, there is the
adjustClockTo
function, which is implemented by the actual servo classes to smoothly adjust the clock to the provided time.Curretnly the following implementations exist:
InstantServoClock
: Previously theSettableClock
, allows to specify if the clock only jumps or also estimates and adjusts the drift rate. I have replaced all instances of SettableClock in INET I could find with this new clock.PiServoClock
: Implements a PI-Servo=> See showcases for more details
BMCA
Extended the gPTP implementation with the Best Master Clock Algorithm
=> See showcases for more details
HotStandby
Extended the MutliDomainGptp with an actual Hot Standby implementation that allows to automatically select a new time domain if one time domain goes offline. This can be enabled and disabled using a parameter.
This is based on the IEEE 802.1ASdm amendment, but uses a simplified version, which does not yet smoothly adjust when switching between two time domains.
This also fixes #1019
=> See showcases for more details
Showcases
I tried to update all showcases using the new implementation and compared the results of the old and new implementation.
When using the
InstantServoClock
the existing showcases provided the same results.I've split the gPTP showcase into 3 showcases, a basic, a bmca and a hotstandby showcase.
The images for these showcases can be found in this repository:
https://github.com/haug-den-lucas/media
Further notes
Even though I've worked quite a bit with INET now, I am not fully aware which further side effects these changes might have.
As mentioned above, I checked all existing showcases if they are still valid and checked for all instances of the SettableClock if these simulations still provide the same results.
However, this is quite a big pull request and I'm happy to discuss the changes and further work on it to make merging possible.
The .cproject .oppbuildspecs etc. were not edited my me manually but by my OMNeT++ installation, if required I can remove the changes of these files, I am not exactly aware what the effect of these changes are.
I've extended the .clang-format file so other IDEs reformatting produces the same results as the OMNeT++ IDE