-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | ROS message parser, render, TH -- -- Please see README.md @package rosmsg @version 0.5.0.0 -- | ROS message MD5 recurrent hash. Replace user types by it's MD5 and -- take hash of result. module Robotics.ROS.Msg.MD5 -- | After finalizing a context, using md5Finalize, a new type is returned -- to prevent 're-finalizing' the structure. data MD5Digest :: * -- | Compute MD5 for given message with user type hashes -- -- Recursively generate MD5 for subtype. Have to build up dependency -- representation for subtype in order to generate MD5. computeMD5 :: [(Text, MD5Digest)] -> Text -> MD5Digest -- | Common used data types. module Robotics.ROS.Msg.Types -- | ROS message field is a variable or constant declaration data FieldDefinition -- | Variable field name and type Variable :: Field -> FieldDefinition -- | Constant field name, type and value Constant :: Field -> Text -> FieldDefinition -- | A variant type describing the simple types that may be included in a -- ROS message. data SimpleType RBool :: SimpleType RByte :: SimpleType RChar :: SimpleType RInt8 :: SimpleType RUInt8 :: SimpleType RInt16 :: SimpleType RUInt16 :: SimpleType RInt32 :: SimpleType RUInt32 :: SimpleType RInt64 :: SimpleType RUInt64 :: SimpleType RFloat32 :: SimpleType RFloat64 :: SimpleType RString :: SimpleType RTime :: SimpleType RDuration :: SimpleType -- | A variant type describing the types that may be included in a ROS -- message. data FieldType Simple :: SimpleType -> FieldType Custom :: Text -> FieldType Array :: FieldType -> FieldType FixedArray :: Int -> FieldType -> FieldType -- | ROS message is a list of fields type MsgDefinition = [FieldDefinition] -- | Field name is text encoded type FieldName = Text -- | Field is a pair of name - value type Field = (FieldType, FieldName) -- | ROSDuration is a tuple of (seconds, nanoseconds) type ROSDuration = (Int32, Int32) -- | ROSTime is a tuple of (seconds, nanoseconds) type ROSTime = (Word32, Word32) instance GHC.Classes.Eq Robotics.ROS.Msg.Types.FieldDefinition instance GHC.Show.Show Robotics.ROS.Msg.Types.FieldDefinition instance GHC.Classes.Eq Robotics.ROS.Msg.Types.FieldType instance GHC.Show.Show Robotics.ROS.Msg.Types.FieldType instance GHC.Classes.Eq Robotics.ROS.Msg.Types.SimpleType instance GHC.Enum.Enum Robotics.ROS.Msg.Types.SimpleType instance GHC.Show.Show Robotics.ROS.Msg.Types.SimpleType -- | Parser components for the ROS message description language -- (msg files). See http://wiki.ros.org/msg for -- reference. module Robotics.ROS.Msg.Parser -- | The result of a parse. data Result r :: * -> * -- | The parse failed. The Text is the input that had not yet been -- consumed when the failure occurred. The -- [String] is a list of contexts in which the -- error occurred. The String is the message describing the error, -- if any. Fail :: Text -> [String] -> String -> Result r -- | The parse succeeded. The Text is the input that had not yet -- been consumed (if any) when the parse succeeded. Done :: Text -> r -> Result r -- | Run a parser and return its result. parse :: Parser a -> Text -> Result a -- | The ROS message language parser rosmsg :: Parser MsgDefinition -- | The ROS message language builder from abstract message definition. module Robotics.ROS.Msg.Render -- | Create lazy text builder from message definition -- -- Render formal ROS message definition according to: -- --
-- >>> [rosmsgFrom|/opt/ros/jade/share/std_msgs/msg/Byte.msg|] -- "[Variable (Simple RByte,\"data\")]" ---- --
-- >>> [rosmsgFrom|/opt/ros/jade/share/geometry_msgs/msg/Polygon.msg|] -- "[Variable (Array (Custom \"Point32\"),\"points\")]" --module Robotics.ROS.Msg -- | Haskell native type for ROS message language described data structure. -- Serialization guaranted by Binary super class. And no more is -- needed for transfer over socket. class Binary a => Message a -- | Get message type string, e.g. std_msgs/Char getType :: Message a => a -> Text -- | Get message source getSource :: Message a => a -> Text -- | Get recurrent MD5 of message source getDigest :: Message a => a -> MD5Digest -- | Sometime ROS messages have a special Header field. It used -- for tracking package sequence, time stamping and frame tagging. -- Headers is frequently field. The Stamped type class lifts -- header fields on the top of message and abstracting of type. class Message a => Stamped a -- | Get sequence number getSequence :: Stamped a => a -> Word32 -- | Set sequence number setSequence :: Stamped a => Word32 -> a -> a -- | Get timestamp of message getStamp :: Stamped a => a -> ROSTime -- | Get frame of message getFrame :: Stamped a => a -> ByteString -- | A type for fixed arrays in ROS messages newtype ROSFixedArray (n :: Nat) a ROSFixedArray :: Array a -> ROSFixedArray a [unFixedArray] :: ROSFixedArray a -> Array a -- | A type for arrays in ROS messages newtype ROSArray a ROSArray :: Array a -> ROSArray a [unArray] :: ROSArray a -> Array a -- | ROSDuration is a tuple of (seconds, nanoseconds) type ROSDuration = (Int32, Int32) -- | ROSTime is a tuple of (seconds, nanoseconds) type ROSTime = (Word32, Word32) -- | Template Haskell driven code generator from ROS message language to -- Haskell native representation. module Robotics.ROS.Msg.TH -- | QQ for data type and instances generation from ROS message declaration rosmsg :: QuasiQuoter -- | Generate ROS message declarations from .msg file rosmsgFrom :: QuasiQuoter