ogma-core-1.12.0: Ogma: Helper tool to interoperate between Copilot and other languages.

Safe Haskell | None
Language | Haskell2010

Command.ROSApp

Description

Create Robot Operating System (ROS) applications that subscribe to obtain data and call Copilot when new values arrive.

It is the user's responsibility to modify the generated CopilotCC++ code to deal with the monitors they'd like to implement, and the data they must manipulate.

Synopsis

- command :: CommandOptions -> IO (Result ErrorCode)
- data CommandOptions = CommandOptions {
  - commandConditionExpr :: Maybe String
  - commandInputFile :: Maybe FilePath
  - commandTargetDir :: FilePath
  - commandTemplateDir :: Maybe FilePath
  - commandVariables :: Maybe FilePath
  - commandVariableDB :: Maybe FilePath
  - commandHandlers :: Maybe FilePath
  - commandFormat :: String
  - commandPropFormat :: String
  - commandPropVia :: Maybe String
  - commandExtraVars :: Maybe FilePath
  - commandTestingApps :: [Node]
  - commandTestingVars :: [String]
  }
- data Node = Node String String
- type ErrorCode = Int

# Documentation

command Source #

Arguments

:: CommandOptions | Options to the ROS backend.
-> IO (Result ErrorCode) |

Generate a new ROS application connected to Copilot.

data CommandOptions Source #

Options used to customize the conversion of specifications to ROS applications.

Constructors

CommandOptions |

Fields

- commandConditionExpr :: Maybe String

  Trigger condition.

- commandInputFile :: Maybe FilePath

  Input specification file.

- commandTargetDir :: FilePath

  Target directory where the application should be created.

- commandTemplateDir :: Maybe FilePath

  Directory where the template is to be found.

- commandVariables :: Maybe FilePath

  File containing a list of variables to make available to Copilot.

- commandVariableDB :: Maybe FilePath

  File containing a list of known variables with their types and the message IDs they can be obtained from.

- commandHandlers :: Maybe FilePath

  File containing a list of handlers used in the Copilot specification. The handlers are assumed to receive no arguments.

- commandFormat :: String

  Format of the input file.

- commandPropFormat :: String

  Format used for input properties.

- commandPropVia :: Maybe String

  Use external command to pre-process system properties.

- commandExtraVars :: Maybe FilePath

  File containing additional variables to make available to the template.

- commandTestingApps :: [Node]

  Additional applications to turn on during testing.

- commandTestingVars :: [String]

  Limited list of variables to use for testing.

data Node Source #

A package-qualified ROS 2 node name.

Constructors

Node String String |

#### Instances

Instances details

ToJSON Node Source # |
Instance details Defined in Command.ROSApp Methods toJSON :: Node -> Value Source # toEncoding :: Node -> Encoding Source # toJSONList :: [Node] -> Value Source # toEncodingList :: [Node] -> Encoding Source # omitField :: Node -> Bool Source #
Generic Node Source # |

Instance details

Defined in Command.ROSApp

Associated Types

type Rep Node |
Instance details Defined in Command.ROSApp type Rep Node = D1 ('MetaData "Node" "Command.ROSApp" "ogma-core-1.12.0-2Qe6AFCR00D8NtrO1nlmfy" 'False) (C1 ('MetaCons "Node" 'PrefixI 'True) (S1 ('MetaSel ('Just "nodePackage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "nodeName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))

Methods

from :: Node -> Rep Node x Source #

to :: Rep Node x -> Node Source #

type Rep Node Source # |
Instance details Defined in Command.ROSApp type Rep Node = D1 ('MetaData "Node" "Command.ROSApp" "ogma-core-1.12.0-2Qe6AFCR00D8NtrO1nlmfy" 'False) (C1 ('MetaCons "Node" 'PrefixI 'True) (S1 ('MetaSel ('Just "nodePackage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "nodeName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))

type ErrorCode = Int Source #

Encoding of reasons why the command can fail.