int ReportVisualSensorCapabilities::WriteMessageBody(Packet& packet) const { unsigned int startPos = packet.GetWritePos(); UShort count = (UShort)mSensorList.size(); List::const_iterator sensor = mSensorList.begin(); packet.Write(count); while(sensor != mSensorList.end()) { sensor->WriteMessageBody(packet); sensor++; } return packet.GetWritePos() - startPos; }
int SetAnalogVideoSensorConfigurations::WriteMessageBody(Packet& packet) const { UInt startPos = packet.GetWritePos(); Byte requestId = mRequestId; UShort count = (UShort)mSensorList.size(); List::const_iterator sensor = mSensorList.begin(); packet.Write(requestId); packet.Write(count); while(sensor != mSensorList.end()) { sensor->WriteMessageBody(packet); sensor++; } return packet.GetWritePos() - startPos; }