-
Notifications
You must be signed in to change notification settings - Fork 163
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
[Feature Request] Timestamp support #928
Comments
Hi @go2sh, I will let the team know of your request. Best, Jason Carroll |
Yes I think so too. In the beginning ( 10 years ago ), FreeRTOS+TCP had a simple support for time-stamps. But as we made the source code safer, and as time-stamps were rarely used, we decided to remove the support. Also: none of the platforms that I used had hardware support for timestamps at that time. I could not find two CPU's with a clock / osc that would agree about the time, the differences were too big. Now that FreeRTOS+TCP dev/IPv6_integration is getting in a stable state, it is good to think about this extension.
Very good. The option should not change the existing behaviour, or the size of code when the option is not selected. @jasonpcarroll wrote:
Let's wait for that. I am enthusiastic and looking forward to the new options. PS. One of my specialties (beside +TCP) is audio distribution and audio limiting. That is also why I looked at timestamping. |
Nowadays there are plenty of MCUs that provide timestamps one way or another and since we are working with Realtime OS, I think it makes sense to support them. 1588 has been around for decades, TSN ( as in time sensitive networking ) is on the horizon ( which I'm not very familiar with ), IIOT is pushing deeper and deeper into the low level stuff like sensors and actuators. In my humble opinion, all these factors will continue to increase the need for timestamp support. Just my 2 cents... Great discussion |
Is your feature request related to a problem? Please describe.
For certain protocols and applications its good to know, when a packet arrived in a device. (like PTP) MACs and Phys have HW support to track the time up to a nanosecond level. Software timestamping based on a system timer is also possible. Using HW timestamps allows devices to sync up there time up to nanosecond accuracy, but stack support is needed in order to implement the protocol to pass the timestamps from the MAC/Phy to the requesting socket.
Describe the solution you'd like
Everything is an opt-in solution. The NetworkBuffer would be extended with a timestamp field to allow the HW or SW timestamp to be passed from the MAC to the socket. For RX the timestamp would be passed with the received packet. For TX the timestamp would be passed back with the transmitted packet. A way to receive the timestamp from the socket would be needed. I would go for the linux way and implement a recvmsg handler, which would allow to receive packets with the timestamp attached.
Describe alternatives you've considered
None
Additional context
This is part of a series of extensions, I created for FreeRTOS-TCP-Plus to enhance time sensitive networking support. A working prototype is on the way. The last enhancement I would like to add I VLAN support. But this is way more difficult, then time stamping or priority queues.
The text was updated successfully, but these errors were encountered: