Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

now sending the correct, buffer based offset of pixels, rather than t…

…he file-based offset
  • Loading branch information...
commit ed91b88b348f6edf24c51f3687b16b0774e19383 1 parent 2d7181d
@boxerab authored
View
2  .cproject
@@ -16,7 +16,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.macosx.exe.debug.379603297" name="Debug" parent="cdt.managedbuild.config.gnu.macosx.exe.debug" postbuildStep="" prebuildStep="">
+ <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.macosx.exe.debug.379603297" name="Debug" parent="cdt.managedbuild.config.gnu.macosx.exe.debug" postbuildStep="" prebuildStep="../src/Protocol/stream.sh">
<folderInfo id="cdt.managedbuild.config.gnu.macosx.exe.debug.379603297." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.base.1347527939" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.32963254" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
View
11 Debug/makefile
@@ -42,7 +42,10 @@ endif
# Add inputs and outputs from these tool invocations to the build variables
# All Target
-all: DicomStream
+all: pre-build main-build
+
+# Main-build Target
+main-build: DicomStream
# Tool invocations
DicomStream: $(OBJS) $(USER_OBJS)
@@ -57,7 +60,11 @@ clean:
-$(RM) $(OBJS)$(C++_DEPS)$(C_DEPS)$(CC_DEPS)$(CPP_DEPS)$(EXECUTABLES)$(CXX_DEPS)$(C_UPPER_DEPS) DicomStream
-@echo ' '
+pre-build:
+ -../src/Protocol/stream.sh
+ -@echo ' '
+
.PHONY: all clean dependents
-.SECONDARY:
+.SECONDARY: main-build pre-build
-include ../makefile.targets
View
11 README
@@ -29,16 +29,23 @@ D) Install libeio
ToDo:
+- flesh out installation guide
- in a branch, trim down Imebra to bare essentials, to avoid code bloat
- implement UID string => UID number code
- increment file refcount when calling open, readahead, prefetch, etc. so that file is not
closed while these operations are in progress
- add prefetch using custom EIO, and fadvise(SEQUENTIAL....)
+ a) open all files
+ b) on open, do readahead if parser doesn't exist
+ c) on readahead, do fadvise using first fragment offset as offset
+ d) on fadvise, exit
+
- fix error handling, check for leaks, decide when to close connection with client
-- handle EFIN, etc.
+- handle FIN, etc.
- c# client
- handle message for change of primary index (stacking)
-
+- implement weighted round-robin strategy on queue of frame groups
+- add Pantheios logging framework - replace printf statements
View
63 src/DicomStream.cpp
@@ -236,6 +236,7 @@ int DicomStream::sendfile_cb_(eio_req *req)
}
printf("[server] sent pixels %d\n", req->result);
+ data->frameInfo->offset += req->result;
if ( ((unsigned int)req->result) < data->size)
{
@@ -249,9 +250,9 @@ int DicomStream::sendfile_cb_(eio_req *req)
delete data;
//trigger write on next fragment
- if (frameGroupIterators.find(cli->fd) != frameGroupIterators.end())
+ if (queueInfoMap.find(cli->fd) != queueInfoMap.end())
{
- queue<FrameGroupIterator*>* frameQueue = frameGroupIterators[cli->fd];
+ queue<FrameGroupIterator*>* frameQueue = &queueInfoMap[cli->fd]->frameGroupQueue;
//move front iterator to done state if it does not have a next fragment
frameQueue->front()->completeNext();
@@ -285,10 +286,10 @@ void DicomStream::write_cb_(struct ev_loop *loop, struct ev_io *w, int revents)
if (revents & EV_WRITE)
{
- if (frameGroupIterators.find(cli->fd) != frameGroupIterators.end())
+ if (queueInfoMap.find(cli->fd) != queueInfoMap.end())
{
// queue must not be empty, because we do not trigger a write on an empty queue
- queue<FrameGroupIterator*>* frameQueue = frameGroupIterators[cli->fd];
+ queue<FrameGroupIterator*>* frameQueue = &queueInfoMap[cli->fd]->frameGroupQueue;
//frame info cannot be null, because we do not trigger a write on an
// uninitialized or completed FrameGroupIterator
@@ -299,12 +300,13 @@ void DicomStream::write_cb_(struct ev_loop *loop, struct ev_io *w, int revents)
if (!frameInfo->sentFrameHeader)
{
Protocol::FrameResponse frameResponse;
- frameResponse.mutable_framerequest()->Swap(&frameInfo->frameRequest);
+ frameResponse.set_instanceuidnumber(0);
+ frameResponse.set_framenumber(0);
DicomPixels* parser = fileInfo->parser;
if (parser)
{
- frameResponse.mutable_frameheader()->set_totalbytes(frameInfo->totalBytes);
+ frameResponse.mutable_frameheader()->set_totalbytes(frameInfo->size);
frameResponse.mutable_frameheader()->set_imagesizex(parser->getimageSizeX());
frameResponse.mutable_frameheader()->set_imagesizey(parser->getimageSizeY());
frameResponse.mutable_frameheader()->set_depth((Protocol::FrameHeader_bitDepth)parser->getdepth());
@@ -321,7 +323,7 @@ void DicomStream::write_cb_(struct ev_loop *loop, struct ev_io *w, int revents)
bool needsAnotherWrite = false;
try
{
- printf("[server] sending frame header: totalBytes : %d\n",frameInfo->totalBytes);
+ printf("[server] sending frame header: totalBytes : %d\n",frameInfo->size);
needsAnotherWrite = !messageFramers[cli->fd]->write(&frameResponse);
}
catch (EAgainException& ee)
@@ -349,7 +351,19 @@ void DicomStream::write_cb_(struct ev_loop *loop, struct ev_io *w, int revents)
//2. write fragment header and trigger fragment sendfile
// next must return true, since we do not trigger write on completed FrameGroupIterator??
- if (messageFramers[cli->fd]->IsWriteInProgress() || frameQueue->front()->next(currentFragment))
+ Protocol::FrameFragmentHeader& currentFragment = queueInfoMap[cli->fd]->currentFragment;
+ TFrameFragment frameFragment;
+ bool needsWrite = messageFramers[cli->fd]->IsWriteInProgress();
+ if (!needsWrite)
+ {
+ needsWrite = frameQueue->front()->next(frameFragment);
+ if (needsWrite)
+ {
+ currentFragment.set_offset(frameInfo->offset);
+ currentFragment.set_size(frameFragment.size);
+ }
+ }
+ if (needsWrite)
{
bool needsAnotherWrite = false;
try
@@ -379,8 +393,9 @@ void DicomStream::write_cb_(struct ev_loop *loop, struct ev_io *w, int revents)
TEio* data = new TEio();
data->cli = cli;
data->fileInfo = fileInfo;
- data->offset = currentFragment.offset();
- data->size = currentFragment.size();
+ data->frameInfo = frameInfo;
+ data->offset = frameFragment.offset;
+ data->size = frameFragment.size;
//3. trigger eio sendfile on fragment
printf("[server] sending pixels: offset %d, size %d\n", currentFragment.offset(), currentFragment.size());
eio_sendfile (data->cli->fd, data->fileInfo->fd, data->offset, data->size, 0, sendfile_cb, (void*)data);
@@ -457,17 +472,18 @@ void DicomStream::cleanup(TClient* cli)
deleteMessageFramer(cli->fd);
//delete client queue
- if (frameGroupIterators.find(cli->fd) != frameGroupIterators.end())
+ if (queueInfoMap.find(cli->fd) != queueInfoMap.end())
{
- queue<FrameGroupIterator*>* frameQueue = frameGroupIterators[cli->fd];
+ TQueueInfo* queueInfo = queueInfoMap[cli->fd];
+ queue<FrameGroupIterator*>* frameQueue = &queueInfo->frameGroupQueue;
while(!frameQueue->empty())
{
delete frameQueue->front();
frameQueue->pop();
}
- delete frameQueue;
- frameGroupIterators.erase(cli->fd);
+ delete queueInfo;
+ queueInfoMap.erase(cli->fd);
}
@@ -491,9 +507,9 @@ void DicomStream::cleanup(string fileName)
void DicomStream::triggerNextEvent(TClient* cli)
{
- if (frameGroupIterators.find(cli->fd) == frameGroupIterators.end())
+ if (queueInfoMap.find(cli->fd) == queueInfoMap.end())
return;
- queue<FrameGroupIterator*>* frameQueue = frameGroupIterators[cli->fd];
+ queue<FrameGroupIterator*>* frameQueue = &queueInfoMap[cli->fd]->frameGroupQueue;
if (frameQueue->empty())
return;
FrameIterator* frameIter = frameQueue->front()->currentIterator();
@@ -580,14 +596,15 @@ void DicomStream::processIncomingMessage(DicomStream::TClient* cli, MessageFram
{
//queue new iterator
queue<FrameGroupIterator*>* frameQueue = NULL;
- if (frameGroupIterators.find(cli->fd) == frameGroupIterators.end())
+ if (queueInfoMap.find(cli->fd) == queueInfoMap.end())
{
- frameQueue = new queue<FrameGroupIterator*>();
- frameGroupIterators[cli->fd] = frameQueue;
+ TQueueInfo* queueInfo = new TQueueInfo();
+ queueInfoMap[cli->fd] = queueInfo;
+ frameQueue = &queueInfo->frameGroupQueue;
}
else
{
- frameQueue = frameGroupIterators[cli->fd];
+ frameQueue = &queueInfoMap[cli->fd]->frameGroupQueue;
}
FrameGroupIterator* frameIter = new FrameGroupIterator(itms, 0);
@@ -615,7 +632,7 @@ void DicomStream::clientTestRead_()
MessageFramer* framer = new MessageFramer(clientFd);
Protocol::FrameResponse* frameResponse;
- Protocol::FrameFragment* frameFragment;
+ Protocol::FrameFragmentHeader* frameFragment;
int totalBytes = -1;
int totalCount = 0;
@@ -641,9 +658,9 @@ void DicomStream::clientTestRead_()
totalBytes = frameResponse->frameheader().totalbytes();
printf("[client] received frame header: total bytes: %d\n",totalBytes);
break;
- case MessageFramer::FrameFragment:
+ case MessageFramer::FrameFragmentHeader:
{
- frameFragment = (Protocol::FrameFragment*)wrapper.message;
+ frameFragment = (Protocol::FrameFragmentHeader*)wrapper.message;
unsigned int size = frameFragment->size();
unsigned int offset = frameFragment->offset();
printf("[client] fragment header: offset %d, size %d\n",offset, size);
View
10 src/DicomStream.h
@@ -40,6 +40,12 @@ class DicomStream : public IFileRefCounter {
DicomStream();
virtual ~DicomStream();
+ struct TQueueInfo
+ {
+ queue<FrameGroupIterator*> frameGroupQueue;
+ Protocol::FrameFragmentHeader currentFragment;
+ };
+
struct TFadvise
{
TFadvise(int fd, off_t offset, off_t len, int advice) : fd(fd), offset(offset), len(len), advice(advice)
@@ -91,6 +97,7 @@ class DicomStream : public IFileRefCounter {
{
TClient* cli;
TFileInfo* fileInfo;
+ TFrameInfo* frameInfo;
unsigned int offset;
unsigned int size;
};
@@ -114,7 +121,7 @@ class DicomStream : public IFileRefCounter {
void processIncomingMessage(DicomStream::TClient* cli, MessageFramer::MessageWrapper msg);
// parsing
- map<int, queue<FrameGroupIterator*>* > frameGroupIterators; //key is client fd
+ map<int, TQueueInfo* > queueInfoMap; //key is client fd
map<string, TFileInfo*> fileInfo; // key is file name
ParseListenManager listenManager;
void triggerNextEvent(TClient* cli);
@@ -131,7 +138,6 @@ class DicomStream : public IFileRefCounter {
int setNonBlock(int fd);
int setCork(int clientFd, bool cork);
- Protocol::FrameFragment currentFragment;
static void write_cb(struct ev_loop *loop, struct ev_io *w, int revents);
static void read_cb(struct ev_loop *loop, struct ev_io *w, int revents);
static void accept_cb(struct ev_loop *loop, struct ev_io *w, int revents);
View
22 src/Iterators/FragmentIterator.h
@@ -12,25 +12,31 @@
#include <string>
#include "../Protocol/stream.pb.h"
+struct TFrameFragment
+{
+ size_t offset;
+ size_t size; //size of fragment
+};
+
class FragmentIterator {
private:
- bool done;
- size_t offset;
+ size_t offsetBase;
+ size_t offsetIncrement;
size_t size;
size_t chunk;
- size_t offsetIncrement;
+
public:
- FragmentIterator(size_t offset, size_t size, size_t chunk) : offset(offset), size(size), chunk(chunk), offsetIncrement(0)
+ FragmentIterator(size_t offset, size_t size, size_t chunk) : offsetBase(offset), offsetIncrement(0), size(size), chunk(chunk)
{
}
FragmentIterator* copy()
{
- return new FragmentIterator(offset, size, chunk);
+ return new FragmentIterator(offsetBase, size, chunk);
}
- bool next( Protocol::FrameFragment& fragment)
+ bool next( TFrameFragment& fragment)
{
if (offsetIncrement == size)
return false;
@@ -39,8 +45,8 @@ class FragmentIterator {
block = size;
else
block = min(chunk, size-offsetIncrement);
- fragment.set_offset( offset + offsetIncrement);
- fragment.set_size(block);
+ fragment.offset = offsetBase + offsetIncrement;
+ fragment.size = block;
offsetIncrement += block;
return true;
}
View
7 src/Iterators/FrameGroupIterator.h
@@ -18,7 +18,7 @@ using namespace std;
#include "../Dicom/ParseListenManager.h"
//iterator for either a series of single frame images, or a single multi-frame image
-typedef UpDownIterator<Protocol::FrameFragment, FrameIterator> tFrameGroupIterator;
+typedef UpDownIterator<TFrameFragment, FrameIterator> tFrameGroupIterator;
@@ -29,12 +29,7 @@ class FrameGroupIterator : public tFrameGroupIterator, RefCounter{
// series of images
FrameGroupIterator(vector<FrameIterator*>* childIters, size_t primaryInd) : tFrameGroupIterator(childIters, primaryInd)
{
-
- }
- virtual ~FrameGroupIterator()
- {
}
-
private:
void finish()
{
View
11 src/Iterators/FrameIterator.h
@@ -18,14 +18,15 @@
#include "../Dicom/ParseListenManager.h"
// iterator for image frame
-typedef SequentialIterator<Protocol::FrameFragment, FragmentIterator> tFrameIterator;
+typedef SequentialIterator<TFrameFragment, FragmentIterator> tFrameIterator;
struct TFrameInfo
{
- TFrameInfo() : totalBytes(0), sentFrameHeader(false){}
+ TFrameInfo() : offset(0), size(0), sentFrameHeader(false){}
string fileName;
Protocol::FrameRequest frameRequest;
- int totalBytes;
+ int offset;
+ int size;
bool sentFrameHeader;
};
@@ -71,11 +72,11 @@ class FrameIterator : public tFrameIterator, public RefCounter, public IParseLis
}
setChildIterators(childIters);
- frameInfo.totalBytes = frameFragments[0]->totalBytes;
+ frameInfo.size = frameFragments[0]->totalBytes;
}
-
}
+
TFrameInfo* getFrameInfo()
{
return &frameInfo;
View
2  src/Iterators/SequentialIterator.h
@@ -42,7 +42,7 @@ template <typename Data, typename Iterator> class SequentialIterator {
position = 0;
}
- bool next(Data& item)
+ virtual bool next(Data& item)
{
if (!isValid())
return false;
View
10 src/Protocol/MessageFramer.h
@@ -35,7 +35,7 @@ class MessageFramer {
None,
FrameGroupRequest,
FrameResponse,
- FrameFragment
+ FrameFragmentHeader
};
struct MessageWrapper
@@ -59,9 +59,9 @@ class MessageFramer {
{
return write(FrameResponse, frameResponse);
}
- bool write(Protocol::FrameFragment* frameFragment)
+ bool write(Protocol::FrameFragmentHeader* frameFragment)
{
- return write(FrameFragment, frameFragment);
+ return write(FrameFragmentHeader, frameFragment);
}
bool IsReadInProgress()
{
@@ -180,8 +180,8 @@ class MessageFramer {
case FrameResponse:
msg = new Protocol::FrameResponse();
break;
- case FrameFragment:
- msg = new Protocol::FrameFragment();
+ case FrameFragmentHeader:
+ msg = new Protocol::FrameFragmentHeader();
break;
default:
printf("MessageFramer: unidentified message\n");
View
221 src/Protocol/stream.pb.cc
@@ -32,9 +32,9 @@ const ::google::protobuf::EnumDescriptor* FrameHeader_bitDepth_descriptor_ = NUL
const ::google::protobuf::Descriptor* FrameResponse_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
FrameResponse_reflection_ = NULL;
-const ::google::protobuf::Descriptor* FrameFragment_descriptor_ = NULL;
+const ::google::protobuf::Descriptor* FrameFragmentHeader_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
- FrameFragment_reflection_ = NULL;
+ FrameFragmentHeader_reflection_ = NULL;
} // namespace
@@ -115,8 +115,9 @@ void protobuf_AssignDesc_stream_2eproto() {
sizeof(FrameHeader));
FrameHeader_bitDepth_descriptor_ = FrameHeader_descriptor_->enum_type(0);
FrameResponse_descriptor_ = file->message_type(3);
- static const int FrameResponse_offsets_[2] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FrameResponse, framerequest_),
+ static const int FrameResponse_offsets_[3] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FrameResponse, instanceuidnumber_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FrameResponse, framenumber_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FrameResponse, frameheader_),
};
FrameResponse_reflection_ =
@@ -130,22 +131,22 @@ void protobuf_AssignDesc_stream_2eproto() {
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(FrameResponse));
- FrameFragment_descriptor_ = file->message_type(4);
- static const int FrameFragment_offsets_[2] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FrameFragment, offset_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FrameFragment, size_),
+ FrameFragmentHeader_descriptor_ = file->message_type(4);
+ static const int FrameFragmentHeader_offsets_[2] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FrameFragmentHeader, offset_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FrameFragmentHeader, size_),
};
- FrameFragment_reflection_ =
+ FrameFragmentHeader_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
- FrameFragment_descriptor_,
- FrameFragment::default_instance_,
- FrameFragment_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FrameFragment, _has_bits_[0]),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FrameFragment, _unknown_fields_),
+ FrameFragmentHeader_descriptor_,
+ FrameFragmentHeader::default_instance_,
+ FrameFragmentHeader_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FrameFragmentHeader, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FrameFragmentHeader, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
- sizeof(FrameFragment));
+ sizeof(FrameFragmentHeader));
}
namespace {
@@ -167,7 +168,7 @@ void protobuf_RegisterTypes(const ::std::string&) {
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
FrameResponse_descriptor_, &FrameResponse::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- FrameFragment_descriptor_, &FrameFragment::default_instance());
+ FrameFragmentHeader_descriptor_, &FrameFragmentHeader::default_instance());
}
} // namespace
@@ -181,8 +182,8 @@ void protobuf_ShutdownFile_stream_2eproto() {
delete FrameHeader_reflection_;
delete FrameResponse::default_instance_;
delete FrameResponse_reflection_;
- delete FrameFragment::default_instance_;
- delete FrameFragment_reflection_;
+ delete FrameFragmentHeader::default_instance_;
+ delete FrameFragmentHeader_reflection_;
}
void protobuf_AddDesc_stream_2eproto() {
@@ -215,23 +216,23 @@ void protobuf_AddDesc_stream_2eproto() {
" \002(\r\022\022\n\nstoredBits\030\013 \002(\r\022\017\n\007highBit\030\014 \002("
"\r\"\\\n\010bitDepth\022\013\n\007depthU8\020\000\022\013\n\007depthS8\020\001\022"
"\014\n\010depthU16\020\002\022\014\n\010depthS16\020\003\022\014\n\010depthU32\020"
- "\004\022\014\n\010depthS32\020\005\"i\n\rFrameResponse\022,\n\014fram"
- "eRequest\030\001 \002(\0132\026.Protocol.FrameRequest\022*"
- "\n\013frameHeader\030\002 \002(\0132\025.Protocol.FrameHead"
- "er\"-\n\rFrameFragment\022\016\n\006offset\030\001 \002(\r\022\014\n\004s"
- "ize\030\002 \002(\r", 1089);
+ "\004\022\014\n\010depthS32\020\005\"k\n\rFrameResponse\022\031\n\021inst"
+ "anceUidNumber\030\001 \002(\r\022\023\n\013frameNumber\030\002 \002(\r"
+ "\022*\n\013frameHeader\030\003 \002(\0132\025.Protocol.FrameHe"
+ "ader\"3\n\023FrameFragmentHeader\022\016\n\006offset\030\001 "
+ "\002(\r\022\014\n\004size\030\002 \002(\r", 1097);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"stream.proto", &protobuf_RegisterTypes);
FrameRequest::default_instance_ = new FrameRequest();
FrameGroupRequest::default_instance_ = new FrameGroupRequest();
FrameHeader::default_instance_ = new FrameHeader();
FrameResponse::default_instance_ = new FrameResponse();
- FrameFragment::default_instance_ = new FrameFragment();
+ FrameFragmentHeader::default_instance_ = new FrameFragmentHeader();
FrameRequest::default_instance_->InitAsDefaultInstance();
FrameGroupRequest::default_instance_->InitAsDefaultInstance();
FrameHeader::default_instance_->InitAsDefaultInstance();
FrameResponse::default_instance_->InitAsDefaultInstance();
- FrameFragment::default_instance_->InitAsDefaultInstance();
+ FrameFragmentHeader::default_instance_->InitAsDefaultInstance();
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_stream_2eproto);
}
@@ -1916,7 +1917,8 @@ ::google::protobuf::Metadata FrameHeader::GetMetadata() const {
// ===================================================================
#ifndef _MSC_VER
-const int FrameResponse::kFrameRequestFieldNumber;
+const int FrameResponse::kInstanceUidNumberFieldNumber;
+const int FrameResponse::kFrameNumberFieldNumber;
const int FrameResponse::kFrameHeaderFieldNumber;
#endif // !_MSC_VER
@@ -1926,7 +1928,6 @@ FrameResponse::FrameResponse()
}
void FrameResponse::InitAsDefaultInstance() {
- framerequest_ = const_cast< ::Protocol::FrameRequest*>(&::Protocol::FrameRequest::default_instance());
frameheader_ = const_cast< ::Protocol::FrameHeader*>(&::Protocol::FrameHeader::default_instance());
}
@@ -1938,7 +1939,8 @@ FrameResponse::FrameResponse(const FrameResponse& from)
void FrameResponse::SharedCtor() {
_cached_size_ = 0;
- framerequest_ = NULL;
+ instanceuidnumber_ = 0u;
+ framenumber_ = 0u;
frameheader_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
@@ -1949,7 +1951,6 @@ FrameResponse::~FrameResponse() {
void FrameResponse::SharedDtor() {
if (this != default_instance_) {
- delete framerequest_;
delete frameheader_;
}
}
@@ -1976,9 +1977,8 @@ FrameResponse* FrameResponse::New() const {
void FrameResponse::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (has_framerequest()) {
- if (framerequest_ != NULL) framerequest_->::Protocol::FrameRequest::Clear();
- }
+ instanceuidnumber_ = 0u;
+ framenumber_ = 0u;
if (has_frameheader()) {
if (frameheader_ != NULL) frameheader_->::Protocol::FrameHeader::Clear();
}
@@ -1993,22 +1993,40 @@ bool FrameResponse::MergePartialFromCodedStream(
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // required .Protocol.FrameRequest frameRequest = 1;
+ // required uint32 instanceUidNumber = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, mutable_framerequest()));
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
+ input, &instanceuidnumber_)));
+ set_has_instanceuidnumber();
} else {
goto handle_uninterpreted;
}
- if (input->ExpectTag(18)) goto parse_frameHeader;
+ if (input->ExpectTag(16)) goto parse_frameNumber;
break;
}
- // required .Protocol.FrameHeader frameHeader = 2;
+ // required uint32 frameNumber = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
+ parse_frameNumber:
+ DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+ ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
+ input, &framenumber_)));
+ set_has_framenumber();
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectTag(26)) goto parse_frameHeader;
+ break;
+ }
+
+ // required .Protocol.FrameHeader frameHeader = 3;
+ case 3: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_frameHeader:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
@@ -2038,16 +2056,20 @@ bool FrameResponse::MergePartialFromCodedStream(
void FrameResponse::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
- // required .Protocol.FrameRequest frameRequest = 1;
- if (has_framerequest()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->framerequest(), output);
+ // required uint32 instanceUidNumber = 1;
+ if (has_instanceuidnumber()) {
+ ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->instanceuidnumber(), output);
}
- // required .Protocol.FrameHeader frameHeader = 2;
+ // required uint32 frameNumber = 2;
+ if (has_framenumber()) {
+ ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->framenumber(), output);
+ }
+
+ // required .Protocol.FrameHeader frameHeader = 3;
if (has_frameheader()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 2, this->frameheader(), output);
+ 3, this->frameheader(), output);
}
if (!unknown_fields().empty()) {
@@ -2058,18 +2080,21 @@ void FrameResponse::SerializeWithCachedSizes(
::google::protobuf::uint8* FrameResponse::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
- // required .Protocol.FrameRequest frameRequest = 1;
- if (has_framerequest()) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteMessageNoVirtualToArray(
- 1, this->framerequest(), target);
+ // required uint32 instanceUidNumber = 1;
+ if (has_instanceuidnumber()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->instanceuidnumber(), target);
+ }
+
+ // required uint32 frameNumber = 2;
+ if (has_framenumber()) {
+ target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->framenumber(), target);
}
- // required .Protocol.FrameHeader frameHeader = 2;
+ // required .Protocol.FrameHeader frameHeader = 3;
if (has_frameheader()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
- 2, this->frameheader(), target);
+ 3, this->frameheader(), target);
}
if (!unknown_fields().empty()) {
@@ -2083,14 +2108,21 @@ int FrameResponse::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // required .Protocol.FrameRequest frameRequest = 1;
- if (has_framerequest()) {
+ // required uint32 instanceUidNumber = 1;
+ if (has_instanceuidnumber()) {
total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
- this->framerequest());
+ ::google::protobuf::internal::WireFormatLite::UInt32Size(
+ this->instanceuidnumber());
+ }
+
+ // required uint32 frameNumber = 2;
+ if (has_framenumber()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::UInt32Size(
+ this->framenumber());
}
- // required .Protocol.FrameHeader frameHeader = 2;
+ // required .Protocol.FrameHeader frameHeader = 3;
if (has_frameheader()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
@@ -2124,8 +2156,11 @@ void FrameResponse::MergeFrom(const ::google::protobuf::Message& from) {
void FrameResponse::MergeFrom(const FrameResponse& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from.has_framerequest()) {
- mutable_framerequest()->::Protocol::FrameRequest::MergeFrom(from.framerequest());
+ if (from.has_instanceuidnumber()) {
+ set_instanceuidnumber(from.instanceuidnumber());
+ }
+ if (from.has_framenumber()) {
+ set_framenumber(from.framenumber());
}
if (from.has_frameheader()) {
mutable_frameheader()->::Protocol::FrameHeader::MergeFrom(from.frameheader());
@@ -2147,11 +2182,8 @@ void FrameResponse::CopyFrom(const FrameResponse& from) {
}
bool FrameResponse::IsInitialized() const {
- if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
+ if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
- if (has_framerequest()) {
- if (!this->framerequest().IsInitialized()) return false;
- }
if (has_frameheader()) {
if (!this->frameheader().IsInitialized()) return false;
}
@@ -2160,7 +2192,8 @@ bool FrameResponse::IsInitialized() const {
void FrameResponse::Swap(FrameResponse* other) {
if (other != this) {
- std::swap(framerequest_, other->framerequest_);
+ std::swap(instanceuidnumber_, other->instanceuidnumber_);
+ std::swap(framenumber_, other->framenumber_);
std::swap(frameheader_, other->frameheader_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
@@ -2180,61 +2213,61 @@ ::google::protobuf::Metadata FrameResponse::GetMetadata() const {
// ===================================================================
#ifndef _MSC_VER
-const int FrameFragment::kOffsetFieldNumber;
-const int FrameFragment::kSizeFieldNumber;
+const int FrameFragmentHeader::kOffsetFieldNumber;
+const int FrameFragmentHeader::kSizeFieldNumber;
#endif // !_MSC_VER
-FrameFragment::FrameFragment()
+FrameFragmentHeader::FrameFragmentHeader()
: ::google::protobuf::Message() {
SharedCtor();
}
-void FrameFragment::InitAsDefaultInstance() {
+void FrameFragmentHeader::InitAsDefaultInstance() {
}
-FrameFragment::FrameFragment(const FrameFragment& from)
+FrameFragmentHeader::FrameFragmentHeader(const FrameFragmentHeader& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
-void FrameFragment::SharedCtor() {
+void FrameFragmentHeader::SharedCtor() {
_cached_size_ = 0;
offset_ = 0u;
size_ = 0u;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
-FrameFragment::~FrameFragment() {
+FrameFragmentHeader::~FrameFragmentHeader() {
SharedDtor();
}
-void FrameFragment::SharedDtor() {
+void FrameFragmentHeader::SharedDtor() {
if (this != default_instance_) {
}
}
-void FrameFragment::SetCachedSize(int size) const {
+void FrameFragmentHeader::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
-const ::google::protobuf::Descriptor* FrameFragment::descriptor() {
+const ::google::protobuf::Descriptor* FrameFragmentHeader::descriptor() {
protobuf_AssignDescriptorsOnce();
- return FrameFragment_descriptor_;
+ return FrameFragmentHeader_descriptor_;
}
-const FrameFragment& FrameFragment::default_instance() {
+const FrameFragmentHeader& FrameFragmentHeader::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_stream_2eproto(); return *default_instance_;
}
-FrameFragment* FrameFragment::default_instance_ = NULL;
+FrameFragmentHeader* FrameFragmentHeader::default_instance_ = NULL;
-FrameFragment* FrameFragment::New() const {
- return new FrameFragment;
+FrameFragmentHeader* FrameFragmentHeader::New() const {
+ return new FrameFragmentHeader;
}
-void FrameFragment::Clear() {
+void FrameFragmentHeader::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
offset_ = 0u;
size_ = 0u;
@@ -2243,7 +2276,7 @@ void FrameFragment::Clear() {
mutable_unknown_fields()->Clear();
}
-bool FrameFragment::MergePartialFromCodedStream(
+bool FrameFragmentHeader::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
@@ -2296,7 +2329,7 @@ bool FrameFragment::MergePartialFromCodedStream(
#undef DO_
}
-void FrameFragment::SerializeWithCachedSizes(
+void FrameFragmentHeader::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// required uint32 offset = 1;
if (has_offset()) {
@@ -2314,7 +2347,7 @@ void FrameFragment::SerializeWithCachedSizes(
}
}
-::google::protobuf::uint8* FrameFragment::SerializeWithCachedSizesToArray(
+::google::protobuf::uint8* FrameFragmentHeader::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// required uint32 offset = 1;
if (has_offset()) {
@@ -2333,7 +2366,7 @@ ::google::protobuf::uint8* FrameFragment::SerializeWithCachedSizesToArray(
return target;
}
-int FrameFragment::ByteSize() const {
+int FrameFragmentHeader::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
@@ -2363,10 +2396,10 @@ int FrameFragment::ByteSize() const {
return total_size;
}
-void FrameFragment::MergeFrom(const ::google::protobuf::Message& from) {
+void FrameFragmentHeader::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
- const FrameFragment* source =
- ::google::protobuf::internal::dynamic_cast_if_available<const FrameFragment*>(
+ const FrameFragmentHeader* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const FrameFragmentHeader*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
@@ -2375,7 +2408,7 @@ void FrameFragment::MergeFrom(const ::google::protobuf::Message& from) {
}
}
-void FrameFragment::MergeFrom(const FrameFragment& from) {
+void FrameFragmentHeader::MergeFrom(const FrameFragmentHeader& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_offset()) {
@@ -2388,25 +2421,25 @@ void FrameFragment::MergeFrom(const FrameFragment& from) {
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
-void FrameFragment::CopyFrom(const ::google::protobuf::Message& from) {
+void FrameFragmentHeader::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
-void FrameFragment::CopyFrom(const FrameFragment& from) {
+void FrameFragmentHeader::CopyFrom(const FrameFragmentHeader& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
-bool FrameFragment::IsInitialized() const {
+bool FrameFragmentHeader::IsInitialized() const {
if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
return true;
}
-void FrameFragment::Swap(FrameFragment* other) {
+void FrameFragmentHeader::Swap(FrameFragmentHeader* other) {
if (other != this) {
std::swap(offset_, other->offset_);
std::swap(size_, other->size_);
@@ -2416,11 +2449,11 @@ void FrameFragment::Swap(FrameFragment* other) {
}
}
-::google::protobuf::Metadata FrameFragment::GetMetadata() const {
+::google::protobuf::Metadata FrameFragmentHeader::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
- metadata.descriptor = FrameFragment_descriptor_;
- metadata.reflection = FrameFragment_reflection_;
+ metadata.descriptor = FrameFragmentHeader_descriptor_;
+ metadata.reflection = FrameFragmentHeader_reflection_;
return metadata;
}
View
146 src/Protocol/stream.pb.h
@@ -36,7 +36,7 @@ class FrameRequest;
class FrameGroupRequest;
class FrameHeader;
class FrameResponse;
-class FrameFragment;
+class FrameFragmentHeader;
enum FrameGroupRequest_RequestType {
FrameGroupRequest_RequestType_Fetch = 0,
@@ -720,36 +720,45 @@ class FrameResponse : public ::google::protobuf::Message {
// accessors -------------------------------------------------------
- // required .Protocol.FrameRequest frameRequest = 1;
- inline bool has_framerequest() const;
- inline void clear_framerequest();
- static const int kFrameRequestFieldNumber = 1;
- inline const ::Protocol::FrameRequest& framerequest() const;
- inline ::Protocol::FrameRequest* mutable_framerequest();
- inline ::Protocol::FrameRequest* release_framerequest();
+ // required uint32 instanceUidNumber = 1;
+ inline bool has_instanceuidnumber() const;
+ inline void clear_instanceuidnumber();
+ static const int kInstanceUidNumberFieldNumber = 1;
+ inline ::google::protobuf::uint32 instanceuidnumber() const;
+ inline void set_instanceuidnumber(::google::protobuf::uint32 value);
- // required .Protocol.FrameHeader frameHeader = 2;
+ // required uint32 frameNumber = 2;
+ inline bool has_framenumber() const;
+ inline void clear_framenumber();
+ static const int kFrameNumberFieldNumber = 2;
+ inline ::google::protobuf::uint32 framenumber() const;
+ inline void set_framenumber(::google::protobuf::uint32 value);
+
+ // required .Protocol.FrameHeader frameHeader = 3;
inline bool has_frameheader() const;
inline void clear_frameheader();
- static const int kFrameHeaderFieldNumber = 2;
+ static const int kFrameHeaderFieldNumber = 3;
inline const ::Protocol::FrameHeader& frameheader() const;
inline ::Protocol::FrameHeader* mutable_frameheader();
inline ::Protocol::FrameHeader* release_frameheader();
// @@protoc_insertion_point(class_scope:Protocol.FrameResponse)
private:
- inline void set_has_framerequest();
- inline void clear_has_framerequest();
+ inline void set_has_instanceuidnumber();
+ inline void clear_has_instanceuidnumber();
+ inline void set_has_framenumber();
+ inline void clear_has_framenumber();
inline void set_has_frameheader();
inline void clear_has_frameheader();
::google::protobuf::UnknownFieldSet _unknown_fields_;
- ::Protocol::FrameRequest* framerequest_;
+ ::google::protobuf::uint32 instanceuidnumber_;
+ ::google::protobuf::uint32 framenumber_;
::Protocol::FrameHeader* frameheader_;
mutable int _cached_size_;
- ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
+ ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
friend void protobuf_AddDesc_stream_2eproto();
friend void protobuf_AssignDesc_stream_2eproto();
@@ -760,14 +769,14 @@ class FrameResponse : public ::google::protobuf::Message {
};
// -------------------------------------------------------------------
-class FrameFragment : public ::google::protobuf::Message {
+class FrameFragmentHeader : public ::google::protobuf::Message {
public:
- FrameFragment();
- virtual ~FrameFragment();
+ FrameFragmentHeader();
+ virtual ~FrameFragmentHeader();
- FrameFragment(const FrameFragment& from);
+ FrameFragmentHeader(const FrameFragmentHeader& from);
- inline FrameFragment& operator=(const FrameFragment& from) {
+ inline FrameFragmentHeader& operator=(const FrameFragmentHeader& from) {
CopyFrom(from);
return *this;
}
@@ -781,17 +790,17 @@ class FrameFragment : public ::google::protobuf::Message {
}
static const ::google::protobuf::Descriptor* descriptor();
- static const FrameFragment& default_instance();
+ static const FrameFragmentHeader& default_instance();
- void Swap(FrameFragment* other);
+ void Swap(FrameFragmentHeader* other);
// implements Message ----------------------------------------------
- FrameFragment* New() const;
+ FrameFragmentHeader* New() const;
void CopyFrom(const ::google::protobuf::Message& from);
void MergeFrom(const ::google::protobuf::Message& from);
- void CopyFrom(const FrameFragment& from);
- void MergeFrom(const FrameFragment& from);
+ void CopyFrom(const FrameFragmentHeader& from);
+ void MergeFrom(const FrameFragmentHeader& from);
void Clear();
bool IsInitialized() const;
@@ -828,7 +837,7 @@ class FrameFragment : public ::google::protobuf::Message {
inline ::google::protobuf::uint32 size() const;
inline void set_size(::google::protobuf::uint32 value);
- // @@protoc_insertion_point(class_scope:Protocol.FrameFragment)
+ // @@protoc_insertion_point(class_scope:Protocol.FrameFragmentHeader)
private:
inline void set_has_offset();
inline void clear_has_offset();
@@ -848,7 +857,7 @@ class FrameFragment : public ::google::protobuf::Message {
friend void protobuf_ShutdownFile_stream_2eproto();
void InitAsDefaultInstance();
- static FrameFragment* default_instance_;
+ static FrameFragmentHeader* default_instance_;
};
// ===================================================================
@@ -1619,44 +1628,59 @@ inline void FrameHeader::set_highbit(::google::protobuf::uint32 value) {
// FrameResponse
-// required .Protocol.FrameRequest frameRequest = 1;
-inline bool FrameResponse::has_framerequest() const {
+// required uint32 instanceUidNumber = 1;
+inline bool FrameResponse::has_instanceuidnumber() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
-inline void FrameResponse::set_has_framerequest() {
+inline void FrameResponse::set_has_instanceuidnumber() {
_has_bits_[0] |= 0x00000001u;
}
-inline void FrameResponse::clear_has_framerequest() {
+inline void FrameResponse::clear_has_instanceuidnumber() {
_has_bits_[0] &= ~0x00000001u;
}
-inline void FrameResponse::clear_framerequest() {
- if (framerequest_ != NULL) framerequest_->::Protocol::FrameRequest::Clear();
- clear_has_framerequest();
+inline void FrameResponse::clear_instanceuidnumber() {
+ instanceuidnumber_ = 0u;
+ clear_has_instanceuidnumber();
}
-inline const ::Protocol::FrameRequest& FrameResponse::framerequest() const {
- return framerequest_ != NULL ? *framerequest_ : *default_instance_->framerequest_;
+inline ::google::protobuf::uint32 FrameResponse::instanceuidnumber() const {
+ return instanceuidnumber_;
}
-inline ::Protocol::FrameRequest* FrameResponse::mutable_framerequest() {
- set_has_framerequest();
- if (framerequest_ == NULL) framerequest_ = new ::Protocol::FrameRequest;
- return framerequest_;
+inline void FrameResponse::set_instanceuidnumber(::google::protobuf::uint32 value) {
+ set_has_instanceuidnumber();
+ instanceuidnumber_ = value;
}
-inline ::Protocol::FrameRequest* FrameResponse::release_framerequest() {
- clear_has_framerequest();
- ::Protocol::FrameRequest* temp = framerequest_;
- framerequest_ = NULL;
- return temp;
+
+// required uint32 frameNumber = 2;
+inline bool FrameResponse::has_framenumber() const {
+ return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void FrameResponse::set_has_framenumber() {
+ _has_bits_[0] |= 0x00000002u;
+}
+inline void FrameResponse::clear_has_framenumber() {
+ _has_bits_[0] &= ~0x00000002u;
+}
+inline void FrameResponse::clear_framenumber() {
+ framenumber_ = 0u;
+ clear_has_framenumber();
+}
+inline ::google::protobuf::uint32 FrameResponse::framenumber() const {
+ return framenumber_;
+}
+inline void FrameResponse::set_framenumber(::google::protobuf::uint32 value) {
+ set_has_framenumber();
+ framenumber_ = value;
}
-// required .Protocol.FrameHeader frameHeader = 2;
+// required .Protocol.FrameHeader frameHeader = 3;
inline bool FrameResponse::has_frameheader() const {
- return (_has_bits_[0] & 0x00000002u) != 0;
+ return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void FrameResponse::set_has_frameheader() {
- _has_bits_[0] |= 0x00000002u;
+ _has_bits_[0] |= 0x00000004u;
}
inline void FrameResponse::clear_has_frameheader() {
- _has_bits_[0] &= ~0x00000002u;
+ _has_bits_[0] &= ~0x00000004u;
}
inline void FrameResponse::clear_frameheader() {
if (frameheader_ != NULL) frameheader_->::Protocol::FrameHeader::Clear();
@@ -1679,48 +1703,48 @@ inline ::Protocol::FrameHeader* FrameResponse::release_frameheader() {
// -------------------------------------------------------------------
-// FrameFragment
+// FrameFragmentHeader
// required uint32 offset = 1;
-inline bool FrameFragment::has_offset() const {
+inline bool FrameFragmentHeader::has_offset() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
-inline void FrameFragment::set_has_offset() {
+inline void FrameFragmentHeader::set_has_offset() {
_has_bits_[0] |= 0x00000001u;
}
-inline void FrameFragment::clear_has_offset() {
+inline void FrameFragmentHeader::clear_has_offset() {
_has_bits_[0] &= ~0x00000001u;
}
-inline void FrameFragment::clear_offset() {
+inline void FrameFragmentHeader::clear_offset() {
offset_ = 0u;
clear_has_offset();
}
-inline ::google::protobuf::uint32 FrameFragment::offset() const {
+inline ::google::protobuf::uint32 FrameFragmentHeader::offset() const {
return offset_;
}
-inline void FrameFragment::set_offset(::google::protobuf::uint32 value) {
+inline void FrameFragmentHeader::set_offset(::google::protobuf::uint32 value) {
set_has_offset();
offset_ = value;
}
// required uint32 size = 2;
-inline bool FrameFragment::has_size() const {
+inline bool FrameFragmentHeader::has_size() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
-inline void FrameFragment::set_has_size() {
+inline void FrameFragmentHeader::set_has_size() {
_has_bits_[0] |= 0x00000002u;
}
-inline void FrameFragment::clear_has_size() {
+inline void FrameFragmentHeader::clear_has_size() {
_has_bits_[0] &= ~0x00000002u;
}
-inline void FrameFragment::clear_size() {
+inline void FrameFragmentHeader::clear_size() {
size_ = 0u;
clear_has_size();
}
-inline ::google::protobuf::uint32 FrameFragment::size() const {
+inline ::google::protobuf::uint32 FrameFragmentHeader::size() const {
return size_;
}
-inline void FrameFragment::set_size(::google::protobuf::uint32 value) {
+inline void FrameFragmentHeader::set_size(::google::protobuf::uint32 value) {
set_has_size();
size_ = value;
}
View
9 src/Protocol/stream.proto
@@ -87,14 +87,13 @@ message FrameHeader
// one FrameResponse is sent, followed by many FrameFragments
message FrameResponse
{
-
- required FrameRequest frameRequest=1;
- required FrameHeader frameHeader=2;
-
+ required uint32 instanceUidNumber=1; // used to avoid passing instance uid every time
+ required uint32 frameNumber=2; // for multiframe
+ required FrameHeader frameHeader=3;
};
// raw pixels are streamed after FrameFragment
-message FrameFragment
+message FrameFragmentHeader
{
required uint32 offset=1;
required uint32 size=2;
Please sign in to comment.
Something went wrong with that request. Please try again.