Public Member Functions | |
def | __init__ (self, protocol) |
def | fragment (self, message, fragment_size, mid=None) |
Public Member Functions inherited from rosbridge_library.capability.Capability | |
def | __init__ (self, protocol) |
def | basic_type_check (self, msg, types_info) |
def | finish (self) |
def | handle_message (self, message) |
Public Attributes | |
fragmentation_seed | |
Public Attributes inherited from rosbridge_library.capability.Capability | |
protocol | |
Static Public Attributes | |
int | fragmentation_seed = 0 |
Private Member Functions | |
def | _create_fragment (self, fragment, num, total, mid) |
def | _fragment_generator (self, msg, size, mid) |
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.
def rosbridge_library.capabilities.fragmentation.Fragmentation.__init__ | ( | self, | |
protocol | |||
) |
Definition at line 43 of file fragmentation.py.
|
private |
Given a string fragment of the original message, creates the appropriate fragment message
Definition at line 97 of file fragmentation.py.
|
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.
|
static |
Definition at line 41 of file fragmentation.py.
rosbridge_library.capabilities.fragmentation.Fragmentation.fragmentation_seed |
Definition at line 68 of file fragmentation.py.