Esempio n. 1
0
IpcMessageObjSize ExProcessIdsOfFrag::packObjIntoMessage(
     IpcMessageBufferPtr buffer)
{
  IpcMessageObjSize result = packBaseClassIntoMessage(buffer);
#pragma nowarn(1506)   // warning elimination 
  Int32 np = processIds_.entries();
#pragma warn(1506)  // warning elimination 

  // pack fragment id and number of entries
  str_cpy_all(buffer, (const char *) &spare_, sizeof(spare_));
  result += sizeof(spare_);
  buffer += sizeof(spare_);
  str_cpy_all(buffer, (const char *) &fragmentId_, sizeof(fragmentId_));
  result += sizeof(fragmentId_);
  buffer += sizeof(fragmentId_);
  str_cpy_all(buffer, (const char *) &np, sizeof(np));
  result += sizeof(np);
  buffer += sizeof(np);

  // pack each process id, as an IpcMessageObj
  for (CollIndex i = 0; i < (CollIndex) np; i++)
    {
      alignSizeForNextObj(result);
      alignBufferForNextObj(buffer);
      IpcMessageObjSize pidsize =
	processIds_[i].packDependentObjIntoMessage(buffer);
      result += pidsize;
      buffer += pidsize;
    }

  return result;
}
Esempio n. 2
0
IpcMessageObjSize 
ExSMDownloadInfo::packObjIntoMessage(IpcMessageBufferPtr buffer)
{
  IpcMessageObjSize size = packBaseClassIntoMessage(buffer);
  size += packIntoBuffer(buffer, smQueryID_);
  size += packIntoBuffer(buffer, smTraceLevel_);
  size += packIntoBuffer(buffer, flags_);
  size += packCharStarIntoBuffer(buffer, smTraceFilePrefix_);
  return size;
}
Esempio n. 3
0
IpcMessageObjSize ExMsgFragment::packObjIntoMessage(IpcMessageBufferPtr buffer)
{
  // See description of packed format in packedLength() method

  IpcMessageBufferPtr start = buffer;

  // Pack the base class
  packBaseClassIntoMessage(buffer);
  alignBufferForNextObj(buffer);

  // Pack the fixed length fields
  str_cpy_all(buffer, (const char *) &f_, sizeof(f_));
  buffer += sizeof(f_);
  alignBufferForNextObj(buffer);

  // Pack the query ID
  if (f_.queryId_ != NULL)
  {
    str_cpy_all(buffer, f_.queryId_, f_.queryIdLen_);
    buffer += f_.queryIdLen_;
    alignBufferForNextObj(buffer);
  }

  // Pack the user name
  if (f_.userName_ != NULL)
  {
    str_cpy_all(buffer, f_.userName_, f_.userNameLen_);
    buffer += f_.userNameLen_;
    alignBufferForNextObj(buffer);
  }

  // Pack the fragment itself
  if (f_.compressedLength_ > 0 && f_.compressedLength_ < f_.fragmentLength_)
  {
    size_t cmprSize = str_compress(buffer,fragment_,f_.fragmentLength_);
    ex_assert(cmprSize == f_.compressedLength_,
              "Error during compress a fragment for download");
    buffer += f_.compressedLength_;

  }
  else
  {
#pragma nowarn(1506)   // warning elimination 
    str_cpy_all(buffer,fragment_,f_.fragmentLength_);
#pragma warn(1506)  // warning elimination 
    buffer += f_.fragmentLength_;
  }

  alignBufferForNextObj(buffer);

  // Pack the fragment key (is an IpcMessageObj itself)
  buffer += key_.packDependentObjIntoMessage(buffer);

  return (IpcMessageObjSize) (buffer - start);
}
Esempio n. 4
0
IpcMessageObjSize 
ExMsgTimeoutData::packObjIntoMessage(IpcMessageBufferPtr buffer)
{
  IpcMessageBufferPtr start = buffer;

  packBaseClassIntoMessage(buffer);

  timeoutData_->packIntoBuffer(buffer);  // increment the pointer "buffer"

  return (IpcMessageObjSize) (buffer - start);
}
Esempio n. 5
0
IpcMessageObjSize ExMsgResourceInfo::packObjIntoMessage(
     IpcMessageBufferPtr buffer)
{
  IpcMessageBufferPtr start = buffer;

  packBaseClassIntoMessage(buffer);

  str_cpy_all(buffer,(char *) &totalNameLength_, sizeof(totalNameLength_));
  buffer += sizeof(totalNameLength_);
  str_cpy_all(buffer,(char *) &spare_, sizeof(spare_));
  buffer += sizeof(spare_);
  buffer += sfo_->ipcPackObjIntoMessage(buffer);

  return (IpcMessageObjSize) (buffer - start);
}
Esempio n. 6
0
IpcMessageObjSize TupMsgBuffer::packObjIntoMessage(IpcMessageBufferPtr buffer)
{
  // move the IpcMessageObj data members into the buffer
  IpcMessageObjSize result = packBaseClassIntoMessage(buffer);

  // convert all pointers in the buffer to offsets
  theBuffer_->drivePack();

  // now move the SqlBuffer
  str_cpy_all(buffer,(char *) theBuffer_, theBuffer_->get_buffer_size());

  result += theBuffer_->get_buffer_size();

  return result;
}
Esempio n. 7
0
IpcMessageObjSize CmpMessageObj::packMyself(IpcMessageBufferPtr& buffer)
{
  IpcMessageObjSize size = packBaseClassIntoMessage(buffer);
  size += packIntoBuffer(buffer,(ID)id_);
  return size;
}