Giter Club home page Giter Club logo

leo-status's Introduction

leo-status

leo-status is a tool for monitoring a Leo Bodnar GPSDO. It exposes a HTTP endpoint with the GPSDO status and config.

The GPSDOs supported are:

Platform Tested Status
MacOS 14.1.2 Tested Working
Windows 11 Tested Working
Ubuntu 22.04 Tested Working

Please see the openapi.yaml for an example of the data returned.

Structure

This project is broken into two parts:

  • leo-status-driver, a library which can be used to interface with a Leo Bodnar GPSDO.
  • leo-status, a command line application which reports the status of a connected Leo Bodnar GPSDO, using the leo-status-driver library.

Prerequisites

Ensure you have both libusb and libudev installed:

Debian based systems:

sudo apt-get install libudev-dev libusb-1.0.0-dev

Usage

Quick start:

cargo run -- --interval 1s --http-host 0.0.0.0:8080

Status Endpoint

Access the /status endpoint

curl localhost:8080/status | jq

Which returns

{
  "loss_count": 1,
  "sat_lock": false,
  "pll_lock": true,
  "locked": false
}

Config Endpoint

Access the /config endpoint

curl localhost:8080/config | jq

Which returns

{
  "output1": true,
  "output2": true,
  "level": 8,
  "pll_params": {
    "fin": 4296875,
    "n3": 30,
    "n2_hs": 10,
    "n2_ls": 3840,
    "n1_hs": 11,
    "nc1_ls": 10,
    "nc2_ls": 20,
    "skew": 0,
    "bw": 15,
    "f3": 143229,
    "fosc": 5500000000
  },
  "fout1": 50000000,
  "fout2": 25000000
}

Further information

For more usage advice, issue the --help command.

Usage: leo-status [OPTIONS] --interval <INTERVAL> --http-host <HTTP_HOST>

Options:
      --interval <INTERVAL>            Interval to poll the GPSDO for status
      --serial-number <SERIAL_NUMBER>  Serial number of the Leo Bodnar GPSDO device to use, if not specified any Leo Bodnar GPSDO connected will be used
      --stdout                         Print status of GPSDO to the console in JSON format
      --http-host <HTTP_HOST>          HTTP host to listen on
  -h, --help                           Print help
  -V, --version                        Print version

Disclaimer

Please note that this program has no guarantees, nor does it have any endorsement or relation to the Leo Bodnar company. You use this program at your own risk, and the author nor Leo Bodnar company are responsible for it's operation (or the lack thereof).

Please ensure you familiarise yourself with the LICENSE for further details.

leo-status's People

Contributors

becomer00t avatar dependabot[bot] avatar

Watchers

 avatar

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.