Giter Site home page Giter Site logo

mbaddeley / contikipy Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 8.0 203 KB

Automated cooja simulations, log parsing, and plotting with python.

License: GNU General Public License v3.0

Python 98.64% Shell 1.36%
python contiki contiki-os simulation cooja plotting parser

contikipy's Introduction

ContikiPy - Automated Cooja Simulations, Log Parsing, and Plotting with Python.

Intro

This repo hosts the source code for ContikiPy, a suite of Python scripts for automated simulation running in cooja, as well as log parsing and plotting.

About

ContikiPy is a pet project that began as an attempt to try and make the task of getting information and results out of the Contiki logs a bit easier. There has been no formal design as such, just a bunch of things that seemed like a good idea to try and do.

Current YAML configurations are set up for my own experiments (based on Contiki-NG logging), but they should provide a good template for making your own.

Development

I work with Contiki a fair amount so I'm constantly trying to improve usability, but if you have a pull request / any suggestions then feel free to contribute!

Getting Started

Running ContikiPy

You can run ContikiPy through the following command, where you replace "my-config-file-xx" with your own YAML configuration:

  • ./contikipy.py --conf="my-config-file-xx.yaml" --runcooja=1 --parse=1 --comp=1

A full list of commands is available through:

  • ./contikipy.py --help

Options

The three main options are as follows:

  • runcooja - run simulations according to the YAML config
  • parse - parse simulation logs according to the YAML config and output plots
  • comp - compare plots according to the YAML config

Adding New Plots

  1. In the yaml config:
  • Add the name of your plot to 'plot:' in your yaml simulation.
  1. In cplogparser.py:
  • Add your plot to 'atomic_function_map' in plot_data() in cplogparser.py.
  • Map your plot name to the plot function name.
  • Add your plot to 'atomic_dict_map' in plot_data in cplogparser.
  • Map your plot name to the required data sets.
  • Write your plot function. It will take in a list of pandas dataframes (that you have previously mapped to this function) which you can use for generating your plot.

contikipy's People

Contributors

mbaddeley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.