Giter VIP home page Giter VIP logo

can_validator's Introduction

I just finished up a little tool that will hopefully be useful managing traffic on the vehicle's CAN bus. Sometime on Saturday or otherwise, add the specs for the CAN messages that your module needs to use here.

The format* should be pretty self explanatory (but feel free to ask questions). Then run:

./check.py --validate_spec example_can_spec.txt

to make sure than the changes you made are A+, consistent, and valid*. Down the road, we can run MiniMon to listen over UART and produce a CSV log of all CAN messages on the bus.

./check.py --check_log example_can_spec.txt example_minimon_log.csv

will validate the spec, produce a summarized log output, and check that what we see in the log matches the spec-defined bus behavior. Code and examples found here.


  • What is actually being checked when you 'validate' the spec? A few things:
  • Messages don't have repeated symbolic names or conflicting IDs
  • Defined data fields do not overlap and fit within the CAN frame data field
  • Data field values and symbols are 1:1 (one data value doesn't map to two symbols)
  • Specified CAN ID fits within the CAN frame data field
  • And a few other sanitary things

** What is actually being done/checked/produced when I compare the log against the defined spec?

  • Frequency constraints are met (e.g. is the heartbeat being sent out atleast every 1 second?)
  • Consecutive, repeated messages are compressed into 'message blocks' with start and end times. This dramatically improves readability of the log
  • IDs and data fields are converted to their human-readable symbols (as defined in the spec!)

*There are a few features that the spec validator accepts, but aren't in the example spec file (e.g. range of data thresholds, float data values, etc.). A full demonstration of the format can now be found in opel_gt_can_spec.txt.

can_validator's People

Contributors

blakizen avatar ericponce avatar nsrango avatar skoppula avatar

Watchers

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