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

Ros.Core.RosBinary

Description

Binary serialization deserialization utilities for types used in ROS messages. This module is used by generated code for .msg types.

Synopsis

Documentation

class RosBinary a where

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.

Methods

put :: a -> Put

Serialize a value to a ByteString.

get :: Get a

Deserialize a value from a ByteString.

putMsg :: Word32 -> a -> Put

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

getList :: RosBinary a => Get [a]

putFixedList :: RosBinary a => [a] -> Put

getFixedList :: RosBinary a => Int -> Get [a]

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

putFixed :: (Storable a, RosBinary a) => Vector a -> Put