Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions
rosbridge_library.capabilities.fragmentation.Fragmentation Class Reference
Inheritance diagram for rosbridge_library.capabilities.fragmentation.Fragmentation:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def fragment

Public Attributes

 fragmentation_seed

Static Public Attributes

int fragmentation_seed = 0

Private Member Functions

def _create_fragment
def _fragment_generator

Detailed Description

The Fragmentation capability doesn't define any incoming operation
handlers, but provides methods to fragment outgoing messages 

Definition at line 37 of file fragmentation.py.


Constructor & Destructor Documentation

Abstract class constructor.  All capabilities require a handle to
the containing protocol.

Keyword arguments:
protocol -- the protocol instance for this capability instance

Reimplemented from rosbridge_library.capability.Capability.

Definition at line 43 of file fragmentation.py.


Member Function Documentation

def rosbridge_library.capabilities.fragmentation.Fragmentation._create_fragment (   self,
  fragment,
  num,
  total,
  mid 
) [private]
Given a string fragment of the original message, creates
the appropriate fragment message 

Definition at line 97 of file fragmentation.py.

def rosbridge_library.capabilities.fragmentation.Fragmentation._fragment_generator (   self,
  msg,
  size,
  mid 
) [private]
Returns a generator of fragment messages 

Definition at line 88 of file fragmentation.py.

def rosbridge_library.capabilities.fragmentation.Fragmentation.fragment (   self,
  message,
  fragment_size,
  mid = None 
)
Serializes the provided message, then splits the serialized
message according to fragment_size, then sends the fragments.

If the size of the message is less than the fragment size, then
the original message is returned rather than a single fragment

Since fragmentation is typically only used for very large messages,
this method returns a generator for fragments rather than a list

Keyword Arguments
message       -- the message dict object to be fragmented
fragment_size -- the max size for the fragments
mid           -- (optional) if provided, the fragment messages
will be given this id.  Otherwise an id will be auto-generated.

Returns a generator of message dict objects representing the fragments

Definition at line 47 of file fragmentation.py.


Member Data Documentation

Definition at line 41 of file fragmentation.py.

Definition at line 63 of file fragmentation.py.


The documentation for this class was generated from the following file:


rosbridge_library
Author(s): Jonathan Mace
autogenerated on Mon Oct 6 2014 06:58:09