#include "DCPS/DdsDcps_pch.h"
#include "DataSampleHeader.h"
#include "Serializer.h"
#include "GuidConverter.h"
#include "dds/DCPS/transport/framework/ReceivedDataSample.h"
#include "dds/DdsDcpsGuidTypeSupportImpl.h"
#include "dds/DCPS/SafetyProfileStreams.h"
#include <cstdio>
#include "DataSampleHeader.inl"
Include dependency graph for DataSampleHeader.cpp:
Go to the source code of this file.
Namespaces | |
namespace | OpenDDS |
namespace | OpenDDS::DCPS |
Functions | |
bool | mb_copy (char &dest, const ACE_Message_Block &mb, size_t offset, bool) |
template<typename T> | |
bool | mb_copy (T &dest, const ACE_Message_Block &mb, size_t offset, bool swap) |
template<typename T> | |
bool | mb_peek (T &dest, const ACE_Message_Block &mb, size_t offset, bool swap) |
bool | OpenDDS::DCPS::operator<< (ACE_Message_Block &, const DataSampleHeader &value) |
Marshal/Insertion into a buffer. | |
const char * | OpenDDS::DCPS::to_string (const MessageId value) |
const char * | OpenDDS::DCPS::to_string (const SubMessageId value) |
OPENDDS_STRING | OpenDDS::DCPS::to_string (const DataSampleHeader &value) |
std::ostream & | OpenDDS::DCPS::operator<< (std::ostream &str, const MessageId value) |
Message Id enumeration insertion onto an ostream. | |
std::ostream & | OpenDDS::DCPS::operator<< (std::ostream &os, const SubMessageId rhs) |
Sub-Message Id enumeration insertion onto an ostream. | |
OpenDDS_Dcps_Export std::ostream & | OpenDDS::DCPS::operator<< (std::ostream &str, const DataSampleHeader &value) |
Message header insertion onto an ostream. | |
Variables | |
ACE_Message_Block * | p_ |
bool @2::mb_copy | ( | T & | dest, | |
const ACE_Message_Block & | mb, | |||
size_t | offset, | |||
bool | swap | |||
) | [static] |
Definition at line 35 of file DataSampleHeader.cpp.
References OpenDDS::DCPS::Serializer::buffer_read().
00036 { 00037 ACE_Message_Block* temp = mb.duplicate(); 00038 if (!temp) { // couldn't allocate 00039 return false; 00040 } 00041 AMB_Releaser r(temp); 00042 temp->rd_ptr(offset); 00043 if (temp->total_length() < sizeof(T)) { 00044 return false; 00045 } 00046 OpenDDS::DCPS::Serializer ser(temp, swap); 00047 ser.buffer_read(reinterpret_cast<char*>(&dest), sizeof(T), swap); 00048 return true; 00049 }
bool @2::mb_copy | ( | char & | dest, | |
const ACE_Message_Block & | mb, | |||
size_t | offset, | |||
bool | ||||
) | [static] |
bool @2::mb_peek | ( | T & | dest, | |
const ACE_Message_Block & | mb, | |||
size_t | offset, | |||
bool | swap | |||
) | [static] |
Definition at line 55 of file DataSampleHeader.cpp.
References mb_copy().
Referenced by OpenDDS::DCPS::DataSampleHeader::partial().
00056 { 00057 for (const ACE_Message_Block* iter = &mb; iter; iter = iter->cont()) { 00058 const size_t len = iter->length(); 00059 if (len > offset) { 00060 return mb_copy(dest, *iter, offset, swap); 00061 } 00062 offset -= len; 00063 } 00064 return false; 00065 }
ACE_Message_Block* p_ |
Definition at line 25 of file DataSampleHeader.cpp.