![]() |
![]() |
#include <IOPool/Streamer/interface/ConsRegMessage.h>
Public Member Functions | |
uint32 | bufferSize () const |
ConsRegRequestBuilder (void *buf, uint32 bufSize, std::string const &consumerName, std::string const &consumerPriority, std::string const &requestParameterSet) | |
These classes are used to build and view the registration requests and replies that are exchanged between individual event consumers and the event server. | |
uint32 | size () const |
Returns the size of the consumer registration request. | |
uint8 * | startAddress () |
Private Attributes | |
uint8 * | buf_ |
uint32 | bufSize_ |
15-Aug-2006 - KAB - Initial Implementation
Definition at line 18 of file ConsRegMessage.h.
ConsRegRequestBuilder::ConsRegRequestBuilder | ( | void * | buf, | |
uint32 | bufSize, | |||
std::string const & | consumerName, | |||
std::string const & | consumerPriority, | |||
std::string const & | requestParamSet | |||
) |
These classes are used to build and view the registration requests and replies that are exchanged between individual event consumers and the event server.
15-Aug-2006 - KAB - Initial Implementation Constructor for the consumer registration request builder.
Definition at line 16 of file ConsRegMessage.cc.
References buf_, bufSize_, Header::CONS_REG_REQUEST, convert(), and len.
00019 : 00020 buf_((uint8*)buf),bufSize_(bufSize) 00021 { 00022 uint8* bufPtr; 00023 uint32 len; 00024 00025 // update the buffer pointer to just beyond the header 00026 bufPtr = buf_ + sizeof(Header); 00027 //std::cout << "bufPtr = 0x" << hex << ((uint32) bufPtr) << dec << std::endl; 00028 //std::cout << "buf_ = 0x" << hex << ((uint32) buf_) << dec << std::endl; 00029 //std::cout << "bufSize_ = " << bufSize_ << std::endl; 00030 assert(((uint32) (bufPtr - buf_)) <= bufSize_); 00031 00032 // copy the consumer name into the message 00033 len = consumerName.length(); 00034 assert(((uint32) (bufPtr + len + sizeof(uint32) - buf_)) <= bufSize_); 00035 convert(len, bufPtr); 00036 bufPtr += sizeof(uint32); 00037 consumerName.copy((char *) bufPtr, len); 00038 bufPtr += len; 00039 00040 // copy the consumer priority into the message 00041 len = consumerPriority.length(); 00042 assert(((uint32) (bufPtr + len + sizeof(uint32) - buf_)) <= bufSize_); 00043 convert(len, bufPtr); 00044 bufPtr += sizeof(uint32); 00045 consumerPriority.copy((char *) bufPtr, len); 00046 bufPtr += len; 00047 00048 // copy the request parameter set into the message 00049 len = requestParamSet.length(); 00050 assert(((uint32) (bufPtr + len + sizeof(uint32) - buf_)) <= bufSize_); 00051 convert(len, bufPtr); 00052 bufPtr += sizeof(uint32); 00053 requestParamSet.copy((char *) bufPtr, len); 00054 bufPtr += len; 00055 00056 // create the message header now that we now the full size 00057 //std::cout << "bufPtr = 0x" << hex << ((uint32) bufPtr) << dec << std::endl; 00058 //std::cout << "buf_ = 0x" << hex << ((uint32) buf_) << dec << std::endl; 00059 new (buf_) Header(Header::CONS_REG_REQUEST, (bufPtr - buf_)); 00060 }
uint32 ConsRegRequestBuilder::bufferSize | ( | ) | const [inline] |
Returns the size of the consumer registration request.
Definition at line 65 of file ConsRegMessage.cc.
References buf_, and HeaderView::size().
Referenced by edm::DQMHttpSource::registerWithDQMEventServer(), stor::DataProcessManager::registerWithDQMSM(), edm::EventStreamHttpReader::registerWithEventServer(), edm::OnlineHttpReader::registerWithEventServer(), and stor::DataProcessManager::registerWithSM().
00066 { 00067 HeaderView hview(buf_); 00068 return hview.size(); 00069 }
uint8* ConsRegRequestBuilder::startAddress | ( | ) | [inline] |
Definition at line 27 of file ConsRegMessage.h.
References buf_.
Referenced by edm::DQMHttpSource::registerWithDQMEventServer(), stor::DataProcessManager::registerWithDQMSM(), edm::EventStreamHttpReader::registerWithEventServer(), edm::OnlineHttpReader::registerWithEventServer(), and stor::DataProcessManager::registerWithSM().
00027 { return buf_; }
uint8* ConsRegRequestBuilder::buf_ [private] |
Definition at line 31 of file ConsRegMessage.h.
Referenced by ConsRegRequestBuilder(), size(), and startAddress().
uint32 ConsRegRequestBuilder::bufSize_ [private] |
Definition at line 32 of file ConsRegMessage.h.
Referenced by bufferSize(), and ConsRegRequestBuilder().