MADARA  3.2.3
Fragmentation.h File Reference
#include <map>
#include <string>
#include <string.h>
#include "madara/utility/StdInt.h"
#include "madara/MadaraExport.h"
#include "madara/transport/MessageHeader.h"

Go to the source code of this file.

Classes

class  madara::transport::FragmentMessageHeader
 Defines a fragmentation header which allows for multi-part messages that are only applied once all fragments are received. More...
 

Namespaces

 madara
 Copyright (c) 2015 Carnegie Mellon University.
 
 madara::transport
 Provides the network transport layer for knowledge bases to communicate within and across agents.
 

Macros

#define FRAGMENTATION_MADARA_ID   "KFRG1.3"
 

Typedefs

typedef std::map< uint64_t, FragmentMap > madara::transport::ClockFragmentMap
 Map of clocks to fragments. More...
 
typedef std::map< uint32_t, const char * > madara::transport::FragmentMap
 Map of fragment identifiers to fragments. More...
 
typedef std::map< std::string, ClockFragmentMap > madara::transport::OriginatorFragmentMap
 Map of originator to a map of clocks to fragments. More...
 

Functions

MADARA_EXPORT char * madara::transport::add_fragment (const char *originator, uint64_t clock, uint32_t update_number, const char *fragment, uint32_t queue_length, OriginatorFragmentMap &map, bool clear=true)
 Adds a fragment to an originator fragment map and returns the aggregate message if the message is complete. More...
 
MADARA_EXPORT char * madara::transport::defrag (FragmentMap &map)
 Pieces together a fragment map into a single buffer. More...
 
MADARA_EXPORT void madara::transport::delete_fragments (FragmentMap &map)
 Deletes fragments within a fragment map and clears the map. More...
 
MADARA_EXPORT bool madara::transport::exists (const char *originator, uint64_t clock, uint32_t update_number, OriginatorFragmentMap &map)
 Checks if a fragment already exists within a fragment map. More...
 
MADARA_EXPORT void madara::transport::frag (const char *source, uint32_t fragment_size, FragmentMap &map)
 Breaks a large packet into smaller packets. More...
 
MADARA_EXPORT bool madara::transport::is_complete (const char *originator, uint64_t clock, OriginatorFragmentMap &map)
 Breaks a large packet into smaller packets. More...
 

Detailed Description

Author
James Edmondson jedmo.nosp@m.ndso.nosp@m.n@gma.nosp@m.il.c.nosp@m.om

This file contains the message header used by transports to piece together fragments of a large knowledge update and helpers classes for transports that want to handle fragmented updates

Definition in file Fragmentation.h.

Macro Definition Documentation

#define FRAGMENTATION_MADARA_ID   "KFRG1.3"

Definition at line 24 of file Fragmentation.h.