Ros.Core.RosBinary
Description
Binary serialization deserialization utilities for types used in ROS messages. This module is used by generated code for .msg types.
- class RosBinary a where
- getAscii :: Get Char
- putAscii :: Char -> Put
- putUnit :: Put
- getUnit :: Get ()
- putList :: RosBinary a => [a] -> Put
- getList :: RosBinary a => Get [a]
- putFixedList :: RosBinary a => [a] -> Put
- getFixedList :: RosBinary a => Int -> Get [a]
- getInt32 :: Get Int
- putInt32 :: Int -> Put
- getFixed :: forall a. Storable a => Int -> Get (Vector a)
- putFixed :: (Storable a, RosBinary a) => Vector a -> Put
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
Serialize a value to a ByteString.
Deserialize a value from a ByteString.
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.
Instances
putFixedList :: RosBinary a => [a] -> Put
getFixedList :: RosBinary a => Int -> Get [a]