GithubHelp home page GithubHelp logo

rigellee / ipip Goto Github PK

View Code? Open in Web Editor NEW

This project forked from keke046/ipip

1.0 0.0 0.0 1.96 MB

very simple but high performance realtime signal monitor for python and matlab

License: Apache License 2.0

CMake 6.57% C++ 59.17% HTML 34.26%

ipip's Introduction

ipip: Realtime Signal Monitor

中文README

ipip is a high performance, real-time signal monitor.

You can interact with ipip within only one line of code in python or matlab.

Preview

Python Code:

import requests, json, time, math

url = 'http://127.0.0.1:1132'
sess = requests.Session()

while True:
    tm = time.time()
    sess.post(url, data=json.dumps({
        # The time keyword must be present in the data
        'time': tm,
        'fig1': {
            'sin': math.sin(tm),
            'cos': math.cos(tm),
        },
        'fig2': {
            'tan': math.tan(tm),
        },
        'fig3': {
            # plot heatmap
            'data': [math.sin(tm), math.cos(tm), math.sin(tm * 2), math.cos(tm * 2)]
        }
    }))
    time.sleep(0.01)

MATLAB Code:

url='http://127.0.0:1132';
while true
    time = now * 60 * 60 * 24;
    data = struct(...
        % The time keyword must be present in the data
        'time', time,...
        'fig1', struct(...
            'sin', sin(time),...
            'cos', cos(time)...
        )...,
        'fig2', struct('tan', tan(time)),...
        % plot heatmap
        'fig3', struct('data', [sin(time) cos(time) sin(time*2) cos(time*2)]),...
    );
    webwrite(url, data);
    pause(0.01);
end

Hint: JSON values of type null can be recognised by IPIP. ipip will not add data points for values of NULL. This is useful for data that sometimes needs to be output and sometimes does not need to be output.

Binaries

Please see the Release Page. Just in the rightside of the filelist.

Run

ipip #run on port 1132

Build

git clone https://github.com/KEKE046/ipip.git
cd ipip
git submodule init
git submodule update
mkdir build && cd build
cmake --build . --config Release
sudo cmake --install . # In windows, you needn't execute this command. you can find the executable file in folder build/bin

Issues

If you want any new features or have found any bugs, please put them in the issue.

ipip's People

Contributors

keke046 avatar jeremyguo avatar

Stargazers

Wenwei Li 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.