Git Product home page Git Product logo

oscilloscope-terminal-interface's Introduction

Oscilloscope-Terminal-Interface

File Structure

Overview

The server is a console-based application:

It is a multithreaded application with three threads running:

  • Wave-Generation Thread: Generates the square wave for channel one and provides end-points to access different parts of the wave (e.g. start, stop points, xref etc.). It also creates an (simulated) internal memory represented by json files (storing 1320 points), storing wave information beyond the range of the array storing 120 points.
  • Data Streaming Thread:- Streams the square wave voltage data via a UDP socket to the client.
  • Main Thread: The main server logic. Accepts commands from the client via a TCP socket and uses regex to recognize command pattern to separate the types of commands and then detect individual commands via conditional statements. Uses state machines to manage states of different properties (e.g. Channel, Mode etc.) and handles any condition of mutually exclusive states.

The Client is a GUI-based, multithreaded application (though the main thread does not have a GUI):

The client has two GUI windows, the first window shown above is where the commands are entered, to interact with the SCPI server. The first time the application is opened, and the user enters a command, the user is prompted with a popup window requesting for a username and the protocol.

Based on the chosen protocol (S (short) or L (long)) the user then is supposed to stick to the chosen protocol when entering the commands. The second Window is the live-data-streaming window which shows the wave-generated via the Wave-Generation thread on the server side, in real time, transmitted via udp-socket, broadcasting the voltage data of the square-wave.

The window also shows the selected channel and the Mode, with the wave-data always saying chan1, because other channels aren’t connected (technically not been coded to generate wave). The channel and Mode info might not be accurate if the client was closed while the server was running and the server is not in the default state when the client is re-opened (however, as soon as the chan or mode is changed again, it will update on the second window).

The user is also provided with a menu system which lets the user do almost everything that he/she could do with the command line.

You can read the full documentation Here

oscilloscope-terminal-interface's People

Contributors

doctor-foxling 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.