Giter VIP home page Giter VIP logo

cfe_sntp's Introduction

SNTP Application

This application hosts a SNTP server inside of cFE that responds to requests at the standard UDP port (123). The cFE-based server defaults to providing CFE TIME in UTC format, which may differ from the native system clock time.

It is based on the FreeRTOS coreSNTP library, which has been extended to provide limited server support.

The tools directory contains standalone client and server implementations for testing. Execute with '-h' for usage information, or run without arguments to use default settings. These can be built independently using cmake;

mkdir tools/build
cd tools/build
cmake ..
make

Example Client Tests

The following commands query a [S]NTP server without changing the system time. They can be run from any system capable of reaching the cFE system at the standart port 123. Wireshark can be used to troubleshoot any network connectivity issues.

  • sntp -d localhost
    • Can be installed on debian-based systems with sudo apt install sntp
    • This client typically results in 3 NTP queries to the server.
  • ./sntp_test_client
    • This tool can be built in the 'tools' directory using the instructions above and connects to localhost by default. Run with '-h' for additional options.
    • A corresponding test server is also available to test functionality of this client without cfe.

cfe_sntp's People

Contributors

ana-gt avatar andrewmatic avatar arielswalker avatar astrogeco avatar avan989 avatar cdknightnasa avatar davidedell avatar dmknutsen avatar jphickey avatar skliper avatar smgee avatar swhart115 avatar thnkslprpt avatar yammajamma avatar zanzaben avatar

Watchers

 avatar  avatar

cfe_sntp's Issues

Let sntp app die gracefully if UDP port cannot be accessed

Issue:
When running cfe in single-host mode, such as:

./core-cpu1

this app fails because the SNTP/UDP port (123) cannot be bind due to root permissions issues. The user can get around this by just running the command above with sudo in front. However, for users who do NOT have this option, we should enable this app to fail at initialization gracefully.

Current status:
When you run ./core-cpu1 with a non-root user, your terminal will be spammed with the same line saying that the binding process failed.

Fix:
We add one line in the initialization function that checks if the binding function finished successfully. If that didn't happen, then the initialization function now returns a CFE_ERROR code, which allow the App to shutdown nicely.

Hotfix:
While fixing the above, we noticed that the function for binding the port was not using the argument port. Fixed it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.