copilot-language-4.6.1: A Haskell-embedded DSL for monitoring hard real-time distributed systems.

Safe Haskell | Safe
Language | Haskell2010

Copilot.Language.Operators.Extern

Description

Primitives to build streams connected to external variables.

Synopsis

- extern :: Typed a => String -> Maybe [a] -> Stream a
- externB :: String -> Maybe [Bool] -> Stream Bool
- externW8 :: String -> Maybe [Word8] -> Stream Word8
- externW16 :: String -> Maybe [Word16] -> Stream Word16
- externW32 :: String -> Maybe [Word32] -> Stream Word32
- externW64 :: String -> Maybe [Word64] -> Stream Word64
- externI8 :: String -> Maybe [Int8] -> Stream Int8
- externI16 :: String -> Maybe [Int16] -> Stream Int16
- externI32 :: String -> Maybe [Int32] -> Stream Int32
- externI64 :: String -> Maybe [Int64] -> Stream Int64
- externF :: String -> Maybe [Float] -> Stream Float
- externD :: String -> Maybe [Double] -> Stream Double

# Documentation

extern Source #

Arguments

:: Typed a |
=> String | Name of the global variable to make accessible.
-> Maybe [a] | Values to be used exclusively for testing/simulation.
-> Stream a |

Create a stream populated by an external global variable.

The Copilot compiler does not check that the type is correct. If the list given as second argument does not constrain the type of the values carried by the stream, this primitive stream building function will match any stream of any type, which is potentially dangerous if the global variable mentioned has a different type. We rely on the compiler used with the generated code to detect type errors of this kind.

externB Source #

Arguments

:: String | Name of the global variable to make accessible.
-> Maybe [Bool] | Values to be used exclusively for testing/simulation.
-> Stream Bool |

Create a stream carrying values of type Bool, populated by an external global variable.

externW8 Source #

Arguments

:: String | Name of the global variable to make accessible.
-> Maybe [Word8] | Values to be used exclusively for testing/simulation.
-> Stream Word8 |

Create a stream carrying values of type Word8, populated by an external global variable.

externW16 Source #

Arguments

:: String | Name of the global variable to make accessible.
-> Maybe [Word16] | Values to be used exclusively for testing/simulation.
-> Stream Word16 |

Create a stream carrying values of type Word16, populated by an external global variable.

externW32 Source #

Arguments

:: String | Name of the global variable to make accessible.
-> Maybe [Word32] | Values to be used exclusively for testing/simulation.
-> Stream Word32 |

Create a stream carrying values of type Word32, populated by an external global variable.

externW64 Source #

Arguments

:: String | Name of the global variable to make accessible.
-> Maybe [Word64] | Values to be used exclusively for testing/simulation.
-> Stream Word64 |

Create a stream carrying values of type Word64, populated by an external global variable.

externI8 Source #

Arguments

:: String | Name of the global variable to make accessible.
-> Maybe [Int8] | Values to be used exclusively for testing/simulation.
-> Stream Int8 |

Create a stream carrying values of type Int8, populated by an external global variable.

externI16 Source #

Arguments

:: String | Name of the global variable to make accessible.
-> Maybe [Int16] | Values to be used exclusively for testing/simulation.
-> Stream Int16 |

Create a stream carrying values of type Int16, populated by an external global variable.

externI32 Source #

Arguments

:: String | Name of the global variable to make accessible.
-> Maybe [Int32] | Values to be used exclusively for testing/simulation.
-> Stream Int32 |

Create a stream carrying values of type Int32, populated by an external global variable.

externI64 Source #

Arguments

:: String | Name of the global variable to make accessible.
-> Maybe [Int64] | Values to be used exclusively for testing/simulation.
-> Stream Int64 |

Create a stream carrying values of type Int64, populated by an external global variable.

externF Source #

Arguments

:: String | Name of the global variable to make accessible.
-> Maybe [Float] | Values to be used exclusively for testing/simulation.
-> Stream Float |

Create a stream carrying values of type Float, populated by an external global variable.

externD Source #

Arguments

:: String | Name of the global variable to make accessible.
-> Maybe [Double] | Values to be used exclusively for testing/simulation.
-> Stream Double |

Create a stream carrying values of type Double, populated by an external global variable.