atom-1.0.13: An EDSL for embedded hard realtime applications.

Copyright(c) 2015 Chris Hodapp
Safe HaskellNone
LanguageHaskell98

Language.Atom.Example.Probes

Description

This demonstrates the usage of Atom's probe functionality. In this case, it simply uses printf to log a probe's value. Most POSIX systems should be able to build and run the generated C code.

Synopsis

Documentation

main :: IO () Source

Invoke the Atom compiler

probeStr :: (Name, Type) -> String Source

Generate a code comment about the given probe.

logProbe :: (String, UE) -> Atom () Source

Use action to call PROBE_PRINTF on a probe given as (name, value). This will work only on integer-valued probes.

example :: Atom () Source

Top-level rule

prePostCode :: [Name] -> [Name] -> [(Name, Type)] -> (String, String) Source

tickSecond :: Atom (V Word64) Source

Count up seconds of runtime, assuming our base rate is 1 millisecond: