INET Framework for OMNeT++/OMNEST
inet::FieldsChunk Class Reference

This is a base class for classes that represent data using various fields. More...

#include <FieldsChunk.h>

Inheritance diagram for inet::FieldsChunk:
inet::Chunk inet::IPrintableObject inet::IRegionTaggedObject inet::AckingMacHeader inet::AcknowledgeHeader inet::aodv::AodvControlPacket inet::ApplicationPacket inet::ApskPhyHeader inet::ArpPacket inet::bgp::BgpHeader inet::BMacHeaderBase inet::BpduBase inet::CrcHeader inet::CsmaCaMacHeader inet::CsmaCaMacTrailer inet::DestinationL3AddressHeader inet::DestinationMacAddressHeader inet::DestinationPortHeader inet::DhcpMessage inet::DsdvHello inet::dymo::DymoPacket inet::EchoPacket inet::EigrpMessage inet::EtherAppReq inet::EtherAppResp inet::EthernetControlFrameBase inet::EthernetFcs inet::EthernetMacAddressFields inet::EthernetPadding inet::EthernetTypeOrLengthField inet::FcsHeader inet::FragmentNumberHeader inet::GenericAppMsg inet::GpsrBeacon inet::GptpBase inet::HopLimitHeader inet::IcmpHeader inet::Icmpv6Header inet::ieee80211::Ieee80211MacHeader inet::ieee80211::Ieee80211MacTrailer inet::ieee80211::Ieee80211MgmtFrame inet::ieee80211::Ieee80211MpduSubframeHeader inet::ieee80211::Ieee80211MsduSubframeHeader inet::Ieee802154MacHeader inet::Ieee8021aeTagEpdHeader inet::Ieee8021aeTagTpidHeader inet::Ieee8021qTagEpdHeader inet::Ieee8021qTagTpidHeader inet::Ieee8021rTagEpdHeader inet::Ieee8021rTagTpidHeader inet::Ieee8022LlcHeader inet::Ieee8022SnapHeader inet::Ieee802EpdHeader inet::IgmpMessage inet::LdpPacket inet::LinkStateMsg inet::LMacHeaderBase inet::MobilityHeader inet::MplsHeader inet::NetworkHeaderBase inet::ospf::OspfPacketBase inet::physicallayer::EthernetPhyHeaderBase inet::physicallayer::Ieee80211PhyHeader inet::physicallayer::Ieee80211PhyPreamble inet::PimPacket inet::PppHeader inet::PppTrailer inet::ProtocolHeader inet::RipPacket inet::RsvpMessage inet::rtp::RtcpPacket inet::rtp::RtpHeader inet::rtp::RtpMpegHeader inet::SequenceNumberHeader inet::ShortcutMacHeader inet::ShortcutPhyHeader inet::SimpleVoipPacket inet::SubpacketLengthHeader inet::TransportHeaderBase inet::TransportPseudoHeader inet::UnitDiskPhyHeader inet::XMacHeaderBase

Public Member Functions

Constructors, destructors and duplication related functions
 FieldsChunk ()
 
 FieldsChunk (const FieldsChunk &other)
 
virtual ~FieldsChunk ()
 
virtual void parsimPack (cCommBuffer *buffer) const override
 
virtual void parsimUnpack (cCommBuffer *buffer) override
 
virtual void handleChange () override
 
Overridden chunk functions
virtual ChunkType getChunkType () const override
 Returns the type of this chunk as an enum member. More...
 
virtual bool containsSameData (const Chunk &other) const override
 Returns true if the two chunks represent the same binary data. More...
 
virtual b getChunkLength () const override
 Returns the length of data represented by this chunk. More...
 
virtual void setChunkLength (b chunkLength)
 
virtual void addChunkLength (b chunkLength)
 
virtual std::ostream & printFieldsToStream (std::ostream &stream, int level, int evFlags=0) const override
 Prints an optinally formatted human readable string representation of the feilds of this chunk to the given stream. More...
 
- Public Member Functions inherited from inet::Chunk
 Chunk ()
 
 Chunk (const Chunk &other)
 
virtual const Ptr< ChunkdupShared () const
 Returns a mutable copy of this chunk in a shared pointer. More...
 
virtual void forEachChild (cVisitor *v) override
 
virtual bool isMutable () const
 
virtual bool isImmutable () const
 
virtual void markImmutable ()
 
void markMutableIfExclusivelyOwned ()
 
virtual bool isComplete () const
 
virtual bool isIncomplete () const
 
virtual void markIncomplete ()
 
virtual bool isCorrect () const
 
virtual bool isIncorrect () const
 
virtual void markIncorrect ()
 
virtual bool isProperlyRepresented () const
 
virtual bool isImproperlyRepresented () const
 
virtual void markImproperlyRepresented ()
 
virtual void moveIterator (Iterator &iterator, b length) const
 
virtual void seekIterator (Iterator &iterator, b position) const
 
virtual bool canInsertAtFront (const Ptr< const Chunk > &chunk) const
 Returns true if this chunk is capable of representing the result. More...
 
virtual bool canInsertAtBack (const Ptr< const Chunk > &chunk) const
 Returns true if this chunk is capable of representing the result. More...
 
virtual bool canInsertAt (const Ptr< const Chunk > &chunk, b offset) const
 Returns true if this chunk is capable of representing the result. More...
 
void insertAtFront (const Ptr< const Chunk > &chunk)
 Inserts the provided chunk at the beginning of this chunk. More...
 
void insertAtBack (const Ptr< const Chunk > &chunk)
 Inserts the provided chunk at the end of this chunk. More...
 
void insertAt (const Ptr< const Chunk > &chunk, b offset)
 Inserts the provided chunk into this chunk. More...
 
virtual bool canRemoveAtFront (b length) const
 Returns true if this chunk is capable of representing the result. More...
 
virtual bool canRemoveAtBack (b length) const
 Returns true if this chunk is capable of representing the result. More...
 
virtual bool canRemoveAt (b offset, b length) const
 Returns true if this chunk is capable of representing the result. More...
 
void removeAtFront (b length)
 Removes the requested part from the beginning of this chunk. More...
 
void removeAtBack (b length)
 Removes the requested part from the end of this chunk. More...
 
void removeAt (b offset, b length)
 Removes the requested part from this chunk. More...
 
int getChunkId () const
 Returns the sequentially assigned id. More...
 
virtual bool isEmpty () const
 Returns true if this chunk contains no data. More...
 
const Ptr< Chunksimplify () const
 Returns the simplified representation of this chunk eliminating all potential redundancies. More...
 
const Ptr< Chunkpeek (const Iterator &iterator, b length=unspecifiedLength, int flags=0) const
 Returns the designated part of the data represented by this chunk in its default representation. More...
 
template<typename T >
bool has (const Iterator &iterator, b length=unspecifiedLength) const
 Returns whether if the designated part of the data is available in the requested representation. More...
 
template<typename T >
const Ptr< Tpeek (const Iterator &iterator, b length=unspecifiedLength, int flags=0) const
 Returns the designated part of the data represented by this chunk in the requested representation. More...
 
virtual SharingRegionTagSetgetRegionTags () override
 Returns all region tags. More...
 
int getNumTags () const
 Returns the number of chunk tags. More...
 
const Ptr< const TagBasegetTag (int index) const
 Returns the chunk tag at the given index. More...
 
void clearTags (b offset=b(0), b length=b(-1))
 Clears the set of chunk tags in the given region. More...
 
void copyTags (const Chunk &source, b sourceOffset=b(0), b offset=b(0), b length=b(-1))
 Copies the set of chunk tags from the source region to the provided region. More...
 
template<typename T >
const Ptr< const TfindTag (b offset=b(0), b length=b(-1)) const
 Returns the chunk tag for the provided type and range, or returns nullptr if no such chunk tag is found. More...
 
template<typename T >
const Ptr< const TgetTag (b offset=b(0), b length=b(-1)) const
 Returns the chunk tag for the provided type and range, or throws an exception if no such chunk tag is found. More...
 
template<typename T >
void mapAllTags (b offset, b length, std::function< void(b, b, const Ptr< const T > &)> f) const
 Maps all tags in the provided range to to the function. More...
 
template<typename T >
void mapAllTagsForUpdate (b offset, b length, std::function< void(b, b, const Ptr< T > &)> f)
 Maps all tags in the provided range to to the function. More...
 
template<typename T >
std::vector< SharingRegionTagSet::RegionTag< const T > > getAllTags (b offset=b(0), b length=b(-1)) const
 Returns all chunk tags for the provided type and range in a detached vector of region tags. More...
 
template<typename T >
std::vector< SharingRegionTagSet::RegionTag< T > > getAllTagsForUpdate (b offset=b(0), b length=b(-1))
 Returns all chunk tags for the provided type and range in a detached vector of region tags. More...
 
template<typename T >
const Ptr< TaddTag (b offset=b(0), b length=b(-1))
 Returns a newly added chunk tag for the provided type and range, or throws an exception if such a chunk tag is already present. More...
 
template<typename T >
const Ptr< TaddTagIfAbsent (b offset=b(0), b length=b(-1))
 Returns a newly added chunk tag for the provided type and range if absent, or returns the chunk tag that is already present. More...
 
template<typename T >
std::vector< SharingRegionTagSet::RegionTag< T > > addTagsWhereAbsent (b offset=b(0), b length=b(-1))
 Returns the newly added chunk tags for the provided type and range where the tag is absent. More...
 
template<typename T >
const Ptr< TremoveTag (b offset, b length)
 Removes the chunk tag for the provided type and range, or throws an exception if no such chunk tag is found. More...
 
template<typename T >
const Ptr< TremoveTagIfPresent (b offset, b length)
 Removes the chunk tag for the provided type and range if present, or returns nullptr if no such chunk tag is found. More...
 
template<typename T >
std::vector< SharingRegionTagSet::RegionTag< T > > removeTagsWherePresent (b offset, b length)
 Removes and returns all chunk tags for the provided type and range. More...
 
virtual std::ostream & printToStream (std::ostream &stream, int level, int evFlags=0) const override
 Prints an optinally formatted human readable string representation of the data present in this chunk to the given stream. More...
 
virtual std::string str () const override
 Returns a human readable string representation of the data present in this chunk. More...
 
- Public Member Functions inherited from inet::IPrintableObject
virtual ~IPrintableObject ()
 
virtual std::string printToString () const
 
virtual std::string printToString (int level, int evFlags=0) const
 
virtual std::string getInfoStringRepresentation (int evFlags=0) const
 
virtual std::string getDetailStringRepresentation (int evFlags=0) const
 
virtual std::string getDebugStringRepresentation (int evFlags=0) const
 
virtual std::string getTraceStringRepresentation (int evFlags=0) const
 
virtual std::string getCompleteStringRepresentation (int evFlags=0) const
 

Protected Attributes

b chunkLength
 
const std::vector< uint8_t > * serializedBytes
 The serialized representation of this chunk or nullptr if not available. More...
 
- Protected Attributes inherited from inet::Chunk
int id
 The id is automatically assigned sequentially during construction. More...
 
int flags
 The boolean chunk flags are merged into a single integer. More...
 
SharingRegionTagSet regionTags
 The set of region tags attached to the data represented by this chunk. More...
 
const typedef Ptr< Chunk >(* PeekConverter )(const Ptr< Chunk > &chunk, const Chunk::Iterator &iterator, b length, int flags)
 

Friends

class Chunk
 
class FieldsChunkSerializer
 

Field accessor functions

const std::vector< uint8_t > * getSerializedBytes () const
 
void setSerializedBytes (const std::vector< uint8_t > *bytes) const
 
virtual const Ptr< ChunkpeekUnchecked (PeekPredicate predicate, PeekConverter converter, const Iterator &iterator, b length, int flags) const override
 
static const Ptr< ChunkconvertChunk (const std::type_info &typeInfo, const Ptr< Chunk > &chunk, b offset, b length, int flags)
 

Additional Inherited Members

- Public Types inherited from inet::Chunk
enum  ChunkType {
  CT_EMPTY, CT_BITCOUNT, CT_BITS, CT_BYTECOUNT,
  CT_BYTES, CT_SLICE, CT_ENCRYPTED, CT_CPACKET,
  CT_SEQUENCE, CT_FIELDS
}
 This enum is used to avoid std::dynamic_cast and dynamicPtrCast. More...
 
enum  PeekFlag {
  PF_ALLOW_NULLPTR = (1 << 0), PF_ALLOW_EMPTY = (1 << 1), PF_ALLOW_INCOMPLETE = (1 << 2), PF_ALLOW_INCORRECT = (1 << 3),
  PF_ALLOW_IMPROPERLY_REPRESENTED = (1 << 4), PF_ALLOW_SERIALIZATION = (1 << 5), PF_ALLOW_ALL = -1
}
 This enum specifies bitmasks for the flags argument of various peek functions. More...
 
- Public Types inherited from inet::IPrintableObject
enum  PrintLevel {
  PRINT_LEVEL_TRACE, PRINT_LEVEL_DEBUG, PRINT_LEVEL_DETAIL, PRINT_LEVEL_INFO,
  PRINT_LEVEL_COMPLETE = INT_MIN
}
 
enum  PrintFlag { PRINT_FLAG_FORMATTED = (1 << 0), PRINT_FLAG_MULTILINE = (1 << 1) }
 
- Static Public Member Functions inherited from inet::Chunk
static void serialize (MemoryOutputStream &stream, const Ptr< const Chunk > &chunk, b offset=b(0), b length=b(-1))
 Serializes a chunk into the given stream. More...
 
static const Ptr< Chunkdeserialize (MemoryInputStream &stream, const std::type_info &typeInfo)
 Deserializes a chunk from the given stream. More...
 
- Static Public Attributes inherited from inet::Chunk
static const b unspecifiedLength = b(-std::numeric_limits<int64_t>::max())
 
static bool enableImplicitChunkSerialization = false
 Peeking some part into a chunk that requires automatic serialization will throw an exception when implicit chunk serialization is disabled. More...
 
static int nextId = 0
 
- Protected Types inherited from inet::Chunk
enum  ChunkFlag { CF_IMMUTABLE = (1 << 0), CF_INCOMPLETE = (1 << 1), CF_INCORRECT = (1 << 2), CF_IMPROPERLY_REPRESENTED = (1 << 3) }
 This enum specifies bitmasks for the flags field of Chunk. More...
 
typedef bool(* PeekPredicate) (const Ptr< Chunk > &)
 
- Protected Member Functions inherited from inet::Chunk
int getBinDumpNumLines () const
 
int getHexDumpNumLines () const
 
const char * getBinDumpLine (int index)
 
const char * getHexDumpLine (int index)
 
const SharingRegionTagSet::RegionTag< TagBase > & _getTag (int index) const
 
void checkMutable () const
 
virtual void doInsertAtFront (const Ptr< const Chunk > &chunk)
 
virtual void doInsertAtBack (const Ptr< const Chunk > &chunk)
 
virtual void doInsertAt (const Ptr< const Chunk > &chunk, b offset)
 
virtual void doRemoveAtFront (b length)
 
virtual void doRemoveAtBack (b length)
 
virtual void doRemoveAt (b offset, b length)
 
template<typename T >
const Ptr< TpeekConverted (const Iterator &iterator, b length, int flags) const
 
template<typename T >
const Ptr< TcheckPeekResult (const Ptr< T > &chunk, int flags) const
 
- Static Protected Member Functions inherited from inet::Chunk
static const Ptr< ChunkconvertChunk (const std::type_info &typeInfo, const Ptr< Chunk > &chunk, b offset, b length, int flags)
 Creates a new chunk of the given type that represents the designated part of the provided chunk. More...
 

Detailed Description

This is a base class for classes that represent data using various fields.

These classes are most often generated by the omnetpp message compiler.

Constructor & Destructor Documentation

◆ FieldsChunk() [1/2]

inet::FieldsChunk::FieldsChunk ( )
15  :
16  Chunk(),
17  chunkLength(b(-1)),
18  serializedBytes(nullptr)
19 {
20 }

◆ FieldsChunk() [2/2]

inet::FieldsChunk::FieldsChunk ( const FieldsChunk other)
22  :
23  Chunk(other),
24  chunkLength(other.chunkLength),
25  serializedBytes(other.serializedBytes != nullptr ? new std::vector<uint8_t>(*other.serializedBytes) : nullptr)
26 {
27 }

◆ ~FieldsChunk()

inet::FieldsChunk::~FieldsChunk ( )
virtual
30 {
31  delete serializedBytes;
32 }

Member Function Documentation

◆ addChunkLength()

virtual void inet::FieldsChunk::addChunkLength ( b  chunkLength)
inlinevirtual

◆ containsSameData()

bool inet::FieldsChunk::containsSameData ( const Chunk other) const
overridevirtual

Returns true if the two chunks represent the same binary data.

The two chunks are compared without serialization, and the method is allowed to return false if the result cannot be determined correctly. Tags and other metadata are ignored in the comparison.

Reimplemented from inet::Chunk.

58 {
59  if (&other == this)
60  return true;
61  else if (!Chunk::containsSameData(other))
62  return false;
63  else {
64  // KLUDGE should we generate this method from the MSG compiler?
65  // this implementation returns false if it cannot determine the result correctly
66  auto thisDescriptor = getDescriptor();
67  auto otherDescriptor = other.getDescriptor();
68  if (thisDescriptor != otherDescriptor)
69  return false;
70  auto thisVoidPtr = toAnyPtr(this);
71  auto otherVoidPtr = toAnyPtr(static_cast<const FieldsChunk *>(&other));
72  for (int field = 0; field < thisDescriptor->getFieldCount(); field++) {
73  auto declaredOn = thisDescriptor->getFieldDeclaredOn(field);
74  if (!strcmp(declaredOn, "omnetpp::cObject") || !strcmp(declaredOn, "inet::Chunk") || !strcmp(declaredOn, "inet::FieldsChunk"))
75  continue;
76  auto flags = thisDescriptor->getFieldTypeFlags(field);
77  if ((flags & cClassDescriptor::FD_ISARRAY) || (flags & cClassDescriptor::FD_ISCOMPOUND) || (flags & cClassDescriptor::FD_ISPOINTER))
78  return false;
79  auto thisValue = thisDescriptor->getFieldValueAsString(thisVoidPtr, field, 0);
80  auto otherValue = otherDescriptor->getFieldValueAsString(otherVoidPtr, field, 0);
81  if (thisValue != otherValue)
82  return false;
83  }
84  return true;
85  }
86 }

◆ convertChunk()

static const Ptr<Chunk> inet::FieldsChunk::convertChunk ( const std::type_info &  typeInfo,
const Ptr< Chunk > &  chunk,
b  offset,
b  length,
int  flags 
)
inlinestaticprotected
44  {
45  return Chunk::convertChunk(typeInfo, chunk, offset, length, flags);
46  }

◆ getChunkLength()

◆ getChunkType()

virtual ChunkType inet::FieldsChunk::getChunkType ( ) const
inlineoverridevirtual

Returns the type of this chunk as an enum member.

This can be used to avoid expensive std::dynamic_cast and dynamicPtrCast operators.

Implements inet::Chunk.

63 { return CT_FIELDS; }

◆ getSerializedBytes()

const std::vector<uint8_t>* inet::FieldsChunk::getSerializedBytes ( ) const
inlineprotected
38 { return serializedBytes; }

◆ handleChange()

◆ parsimPack()

void inet::FieldsChunk::parsimPack ( cCommBuffer *  buffer) const
overridevirtual

Reimplemented from inet::Chunk.

35 {
36  Chunk::parsimPack(buffer);
37  buffer->pack(chunkLength.get());
38 }

◆ parsimUnpack()

void inet::FieldsChunk::parsimUnpack ( cCommBuffer *  buffer)
overridevirtual

Reimplemented from inet::Chunk.

41 {
42  Chunk::parsimUnpack(buffer);
43  int64_t l;
44  buffer->unpack(l);
45  chunkLength = b(l);
46  delete serializedBytes;
47  serializedBytes = nullptr;
48 }

◆ peekUnchecked()

const Ptr< Chunk > inet::FieldsChunk::peekUnchecked ( PeekPredicate  predicate,
PeekConverter  converter,
const Iterator iterator,
b  length,
int  flags 
) const
overrideprotectedvirtual

Implements inet::Chunk.

89 {
91  CHUNK_CHECK_USAGE(b(0) <= iterator.getPosition() && iterator.getPosition() <= chunkLength, "iterator is out of range");
92  // 1. peeking an empty part returns nullptr
93  if (length == b(0) || (iterator.getPosition() == chunkLength && length < b(0))) {
94  if (predicate == nullptr || predicate(nullptr))
96  }
97  // 2. peeking the whole part returns this chunk
98  if (iterator.getPosition() == b(0) && (-length >= chunkLength || length == chunkLength)) {
99  auto result = const_cast<FieldsChunk *>(this)->shared_from_this();
100  if (predicate == nullptr || predicate(result))
101  return result;
102  }
103  // 3. peeking a part from the beginning without conversion returns an incomplete copy of this chunk
104  if (predicate != nullptr && predicate(const_cast<FieldsChunk *>(this)->shared_from_this()) && iterator.getPosition() == b(0)) {
105  auto copy = staticPtrCast<FieldsChunk>(dupShared());
106  copy->setChunkLength(length);
107  copy->regionTags.copyTags(regionTags, iterator.getPosition(), b(0), length);
108  copy->markIncomplete();
109  return copy;
110  }
111  // 4. peeking without conversion returns a SliceChunk
112  if (converter == nullptr)
113  return peekConverted<SliceChunk>(iterator, length, flags);
114  // 5. peeking with conversion
115  return converter(const_cast<FieldsChunk *>(this)->shared_from_this(), iterator, length, flags);
116 }

◆ printFieldsToStream()

std::ostream & inet::FieldsChunk::printFieldsToStream ( std::ostream &  stream,
int  level,
int  evFlags = 0 
) const
overridevirtual

Prints an optinally formatted human readable string representation of the feilds of this chunk to the given stream.

Reimplemented from inet::Chunk.

119 {
120  auto className = getClassName();
121  auto descriptor = getDescriptor();
122  // TODO make this more sophisticated, e.g. add properties to fields to control what is printed
123  if (level <= PRINT_LEVEL_DETAIL)
124  for (int i = 0; i < descriptor->getFieldCount(); i++)
125  if (!descriptor->getFieldIsArray(i) && !strcmp(className, descriptor->getFieldDeclaredOn(i)))
126  stream << ", " << EV_BOLD << descriptor->getFieldName(i) << EV_NORMAL << " = " << descriptor->getFieldValueAsString(toAnyPtr(this), i, 0);
127  return stream;
128 }

◆ setChunkLength()

◆ setSerializedBytes()

void inet::FieldsChunk::setSerializedBytes ( const std::vector< uint8_t > *  bytes) const
inlineprotected
39 { CHUNK_CHECK_IMPLEMENTATION(B(bytes->size()) == chunkLength); this->serializedBytes = bytes; }

Friends And Related Function Documentation

◆ Chunk

friend class Chunk
friend

◆ FieldsChunkSerializer

friend class FieldsChunkSerializer
friend

Member Data Documentation

◆ chunkLength

b inet::FieldsChunk::chunkLength
protected

◆ serializedBytes

const std::vector<uint8_t>* inet::FieldsChunk::serializedBytes
mutableprotected

The serialized representation of this chunk or nullptr if not available.

When a chunk is serialized, the result is stored here for fast subsequent serializations. Moreover, if a chunk is created by deserialization, then the original bytes are also stored here. The serialized representation is deleted if a chunk is modified.

Referenced by handleChange(), parsimUnpack(), and ~FieldsChunk().


The documentation for this class was generated from the following files:
CHUNK_CHECK_IMPLEMENTATION
#define CHUNK_CHECK_IMPLEMENTATION(condition)
Definition: Chunk.h:29
inet::IPrintableObject::PRINT_LEVEL_DETAIL
@ PRINT_LEVEL_DETAIL
Definition: IPrintableObject.h:24
inet::Chunk::containsSameData
virtual bool containsSameData(const Chunk &other) const
Returns true if the two chunks represent the same binary data.
Definition: Chunk.h:619
inet::FieldsChunk::Chunk
friend class Chunk
Definition: FieldsChunk.h:21
inet::FieldsChunk::FieldsChunk
FieldsChunk()
Definition: FieldsChunk.cc:15
inet::FieldsChunk::handleChange
virtual void handleChange() override
Definition: FieldsChunk.cc:50
inet::FieldsChunk::chunkLength
b chunkLength
Definition: FieldsChunk.h:25
inet::Chunk::handleChange
virtual void handleChange()
Definition: Chunk.cc:53
inet::FieldsChunk::serializedBytes
const std::vector< uint8_t > * serializedBytes
The serialized representation of this chunk or nullptr if not available.
Definition: FieldsChunk.h:33
inet::units::units::B
intscale< b, 1, 8 > B
Definition: Units.h:1168
inet::Chunk::regionTags
SharingRegionTagSet regionTags
The set of region tags attached to the data represented by this chunk.
Definition: Chunk.h:356
CHUNK_CHECK_USAGE
#define CHUNK_CHECK_USAGE(condition, format,...)
Definition: Chunk.h:42
inet::FieldsChunk::getChunkLength
virtual b getChunkLength() const override
Returns the length of data represented by this chunk.
Definition: FieldsChunk.h:67
inet::Chunk::dupShared
virtual const Ptr< Chunk > dupShared() const
Returns a mutable copy of this chunk in a shared pointer.
Definition: Chunk.h:437
inet::Chunk::parsimPack
virtual void parsimPack(cCommBuffer *buffer) const override
Definition: Chunk.cc:39
inet::Chunk::convertChunk
static const Ptr< Chunk > convertChunk(const std::type_info &typeInfo, const Ptr< Chunk > &chunk, b offset, b length, int flags)
Creates a new chunk of the given type that represents the designated part of the provided chunk.
Definition: Chunk.cc:117
inet::units::values::b
value< int64_t, units::b > b
Definition: Units.h:1241
EV_NORMAL
#define EV_NORMAL
Definition: INETDefs.h:102
omnetpp::toAnyPtr
any_ptr toAnyPtr(const inet::ClockTime *p)
Definition: common/ClockTime.h:351
inet::Chunk::flags
int flags
The boolean chunk flags are merged into a single integer.
Definition: Chunk.h:352
inet::units::value::get
const value_type & get() const
Definition: Units.h:108
EV_BOLD
#define EV_BOLD
Definition: INETDefs.h:103
inet::EmptyChunk::getEmptyChunk
static const Ptr< Chunk > getEmptyChunk(int flags)
Definition: EmptyChunk.h:48
inet::Chunk::CT_FIELDS
@ CT_FIELDS
Definition: Chunk.h:271
inet::Chunk::parsimUnpack
virtual void parsimUnpack(cCommBuffer *buffer) override
Definition: Chunk.cc:46
copy
MIT License free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to copy
Definition: LICENSE.txt:8