roshask-0.2.1: Haskell support for the ROS robotics framework.

Safe HaskellNone



Binary serialization/deserialization utilities for types used in ROS messages. This module is used by generated code for .msg types. NOTE: The native byte ordering of the host is used to support the common scenario of same-machine transport.



class RosBinary a where Source

A type class for binary serialization of ROS messages. Very like the standard Data.Binary type class, but with different, more compact, instances for base types and an extra class method for dealing with message headers.

Minimal complete definition

put, get


put :: a -> Put Source

Serialize a value to a ByteString.

get :: Get a Source

Deserialize a value from a ByteString.

putMsg :: Word32 -> a -> Put Source

Serialize a ROS message given a sequence number. This number may be used by message types with headers. The default implementation ignores the sequence number.

putList :: RosBinary a => [a] -> Put Source

getFixed :: forall a. Storable a => Int -> Get (Vector a) Source