public writePacketBody ( byte body, int blen, bool sim, bool roiInPkt, int roiLen ) : int | ||
body | byte | The packet body data. /// /// |
blen | int | The number of bytes in the packet body. /// /// |
sim | bool | Simulation mode flag. If true nothing is written to the bit /// stream, but the number of bytes that would be written is returned. /// /// |
roiInPkt | bool | Whether or not this packet contains ROI information /// /// |
roiLen | int | Number of byte to read in packet body to get all the ROI /// information /// /// |
Résultat | int |
public override int writePacketBody(byte[] body, int blen, bool sim, bool roiInPkt, int roiLen)
{
int len = blen;
// If not in simulation mode write the data
if (!sim)
{
// Write the body bytes
len = blen;
if (MaxAvailableBytes < len)
{
len = MaxAvailableBytes;
}
if (blen > 0)
{
out_Renamed.Write(body, 0, len);
}
// Update data length
ndata += len;
// Deal with ROI information
if (roiInPkt)
{
offLastROIPkt += lenLastNoROI + roiLen;
lenLastNoROI = len - roiLen;
}
else
{
lenLastNoROI += len;
}
}
return len;
}