OMNeT++ Simulation Library
6.0.3
|
#include <ccommbuffer.h>
Buffer for the communications layer of parallel simulation.
This is an abstract class which has different implementations for specific communication mechanisms. For example, the MPI implementation, cMPICommBuffer encapsulates MPI_Pack() and MPI_Unpack().
Public Member Functions | |
virtual | ~cCommBuffer () |
Buffer management | |
virtual bool | isBufferEmpty () const =0 |
virtual void | assertBufferEmpty ()=0 |
Pack basic types | |
virtual void | pack (char d)=0 |
virtual void | pack (unsigned char d)=0 |
virtual void | pack (bool d)=0 |
virtual void | pack (short d)=0 |
virtual void | pack (unsigned short d)=0 |
virtual void | pack (int d)=0 |
virtual void | pack (unsigned int d)=0 |
virtual void | pack (long d)=0 |
virtual void | pack (unsigned long d)=0 |
virtual void | pack (long long d)=0 |
virtual void | pack (unsigned long long d)=0 |
virtual void | pack (float d)=0 |
virtual void | pack (double d)=0 |
virtual void | pack (long double d)=0 |
virtual void | pack (const char *d)=0 |
virtual void | pack (const opp_string &d)=0 |
virtual void | pack (SimTime d)=0 |
Pack arrays of basic types | |
virtual void | pack (const char *d, int size)=0 |
virtual void | pack (const unsigned char *d, int size)=0 |
virtual void | pack (const bool *d, int size)=0 |
virtual void | pack (const short *d, int size)=0 |
virtual void | pack (const unsigned short *d, int size)=0 |
virtual void | pack (const int *d, int size)=0 |
virtual void | pack (const unsigned int *d, int size)=0 |
virtual void | pack (const long *d, int size)=0 |
virtual void | pack (const unsigned long *d, int size)=0 |
virtual void | pack (const long long *d, int size)=0 |
virtual void | pack (const unsigned long long *d, int size)=0 |
virtual void | pack (const float *d, int size)=0 |
virtual void | pack (const double *d, int size)=0 |
virtual void | pack (const long double *d, int size)=0 |
void | pack (char **d, int size) |
virtual void | pack (const char **d, int size)=0 |
virtual void | pack (const opp_string *d, int size)=0 |
virtual void | pack (const SimTime *d, int size)=0 |
Unpack basic types | |
virtual void | unpack (char &d)=0 |
virtual void | unpack (unsigned char &d)=0 |
virtual void | unpack (bool &d)=0 |
virtual void | unpack (short &d)=0 |
virtual void | unpack (unsigned short &d)=0 |
virtual void | unpack (int &d)=0 |
virtual void | unpack (unsigned int &d)=0 |
virtual void | unpack (long &d)=0 |
virtual void | unpack (unsigned long &d)=0 |
virtual void | unpack (long long &d)=0 |
virtual void | unpack (unsigned long long &d)=0 |
virtual void | unpack (float &d)=0 |
virtual void | unpack (double &d)=0 |
virtual void | unpack (long double &d)=0 |
void | unpack (char *&d) |
virtual void | unpack (const char *&d)=0 |
virtual void | unpack (opp_string &d)=0 |
virtual void | unpack (SimTime &d)=0 |
Unpack arrays of basic types | |
virtual void | unpack (char *d, int size)=0 |
virtual void | unpack (unsigned char *d, int size)=0 |
virtual void | unpack (bool *d, int size)=0 |
virtual void | unpack (short *d, int size)=0 |
virtual void | unpack (unsigned short *d, int size)=0 |
virtual void | unpack (int *d, int size)=0 |
virtual void | unpack (unsigned int *d, int size)=0 |
virtual void | unpack (long *d, int size)=0 |
virtual void | unpack (unsigned long *d, int size)=0 |
virtual void | unpack (long long *d, int size)=0 |
virtual void | unpack (unsigned long long *d, int size)=0 |
virtual void | unpack (float *d, int size)=0 |
virtual void | unpack (double *d, int size)=0 |
virtual void | unpack (long double *d, int size)=0 |
void | unpack (char **d, int size) |
virtual void | unpack (const char **d, int size)=0 |
virtual void | unpack (opp_string *d, int size)=0 |
virtual void | unpack (SimTime *d, int size)=0 |
Utility functions | |
bool | packFlag (bool flag) |
bool | checkFlag () |
virtual void | packObject (cObject *obj) |
virtual cObject * | unpackObject () |
Public Member Functions inherited from cObject | |
cObject () | |
cObject (const cObject &other)=default | |
virtual | ~cObject () |
virtual const char * | getClassName () const |
virtual const char * | getName () const |
bool | isName (const char *s) const |
virtual const char * | getFullName () const |
virtual std::string | getFullPath () const |
virtual std::string | getClassAndFullName () const |
virtual std::string | getClassAndFullPath () const |
const cObject * | getThisPtr () const |
virtual std::string | str () const |
virtual std::ostream & | printOn (std::ostream &os) const |
virtual cObject * | dup () const |
virtual void | parsimPack (cCommBuffer *buffer) const |
virtual void | parsimUnpack (cCommBuffer *buffer) |
virtual cObject * | getOwner () const |
virtual bool | isOwnedObject () const |
virtual bool | isSoftOwner () const |
virtual void | forEachChild (cVisitor *v) |
cObject * | findObject (const char *name, bool deep=true) |
virtual cClassDescriptor * | getDescriptor () const |
void | copyNotSupported () const |
Additional Inherited Members | |
Protected Member Functions inherited from cObject | |
virtual void | take (cOwnedObject *obj) |
virtual void | drop (cOwnedObject *obj) |
void | dropAndDelete (cOwnedObject *obj) |
|
inlinevirtual |
Virtual destructor
|
pure virtual |
Returns true if all data in buffer was used up during unpacking. Returns false if there was underflow (too much data unpacked) or still there are unpacked data in the buffer.
|
pure virtual |
Utility function. To be called after unpacking a communication buffer, it checks whether the buffer is empty. If it is not (i.e. an underflow or overflow occurred), an exception is thrown.
|
pure virtual |
Packs a character.
|
pure virtual |
Packs an unsigned character.
|
pure virtual |
Packs a bool.
|
pure virtual |
Packs a short int.
|
pure virtual |
Packs an unsigned short int.
|
pure virtual |
Packs an int.
|
pure virtual |
Packs an unsigned int.
|
pure virtual |
Packs a long int.
|
pure virtual |
Packs an unsigned long int.
|
pure virtual |
Packs a long long.
|
pure virtual |
Packs an unsigned long long.
|
pure virtual |
Packs a float.
|
pure virtual |
Packs a double.
|
pure virtual |
Packs a long double.
|
pure virtual |
Packs a string.
|
pure virtual |
Packs a string.
|
pure virtual |
Packs an array of chars.
|
pure virtual |
Packs an array of unsigned chars.
|
pure virtual |
Packs an array of bools.
|
pure virtual |
Packs an array of shorts.
|
pure virtual |
Packs an array of unsigned shorts.
|
pure virtual |
Packs an array of ints.
|
pure virtual |
Packs an array of unsigned ints.
|
pure virtual |
Packs an array of longs.
|
pure virtual |
Packs an array of unsigned longs.
|
pure virtual |
Packs an array of long long's.
|
pure virtual |
Packs an array of unsigned long long's.
|
pure virtual |
Packs an array of floats.
|
pure virtual |
Packs an array of doubles.
|
pure virtual |
Packs an array of long doubles.
|
inline |
|
pure virtual |
Packs an array of strings.
|
pure virtual |
Packs an array of opp_strings.
|
pure virtual |
Packs an array of SimTimes.
|
pure virtual |
Unpacks a char.
|
pure virtual |
Unpacks an unsigned char.
|
pure virtual |
Unpacks a bool.
|
pure virtual |
Unpacks a short.
|
pure virtual |
Unpacks an unsigned short.
|
pure virtual |
Unpacks an int.
|
pure virtual |
Unpacks an unsigned int.
|
pure virtual |
Unpacks a long.
|
pure virtual |
Unpacks an unsigned long.
|
pure virtual |
Unpacks a long long.
|
pure virtual |
Unpacks an unsigned long long.
|
pure virtual |
Unpacks a float.
|
pure virtual |
Unpacks a double.
|
pure virtual |
Unpacks a long double.
|
inline |
Unpacks a string – storage will be allocated for it via new char[].
References cCommBuffer::unpack().
Referenced by cCommBuffer::unpack().
|
pure virtual |
Unpacks a string – storage will be allocated for it via new char[].
|
pure virtual |
Unpacks an opp_string.
|
pure virtual |
Unpacks an array of chars.
|
pure virtual |
Unpacks an array of unsigned chars.
|
pure virtual |
Unpacks an array of bools.
|
pure virtual |
Unpacks an array of shorts.
|
pure virtual |
Unpacks an array of unsigned shorts.
|
pure virtual |
Unpacks an array of ints.
|
pure virtual |
Unpacks an array of unsigned ints.
|
pure virtual |
Unpacks an array of longs.
|
pure virtual |
Unpacks an array of unsigned longs.
|
pure virtual |
Unpacks an array of long long's.
|
pure virtual |
Unpacks an array of unsigned long long's.
|
pure virtual |
Unpacks an array of floats.
|
pure virtual |
Unpacks an array of doubles.
|
pure virtual |
Unpacks an array of long doubles.
|
inline |
Unpacks an array of strings – storage for strings will be allocated via new char[].
References cCommBuffer::unpack().
Referenced by cCommBuffer::unpack().
|
pure virtual |
Unpacks an array of strings – storage for strings will be allocated via new char[].
|
pure virtual |
Unpacks an array of opp_strings.
|
inline |
Stores and returns the given flag.
|
inline |
Unpacks and returns a bool flag stored by packFlag().
|
virtual |
Packs an object.
|
virtual |
Unpacks and returns an object.