int QueryRangeSensorCapabilities::WriteMessageBody(Packet& packet) const { UInt startPos = packet.GetWritePos(); UShort count = (UShort)mSensorList.size(); List::const_iterator sensor = mSensorList.begin(); packet.Write(count); while(sensor != mSensorList.end()) { packet.Write(sensor->GetSensorId()); //required packet.Write(sensor->GetPresenceVector()); //required sensor++; } return packet.GetWritePos() - startPos; }
int QueryStillImageSensorConfigurations::WriteMessageBody(Packet& packet) const { UInt startPos = packet.GetWritePos(); UShort count = (UShort)mSensorList.size(); List::const_iterator stillImageSensorConfigurations = mSensorList.begin(); packet.Write(count); while(stillImageSensorConfigurations != mSensorList.end()) { packet.Write(stillImageSensorConfigurations->GetSensorId()); //required packet.Write(stillImageSensorConfigurations->GetPresenceVector()); //required stillImageSensorConfigurations++; } return packet.GetWritePos() - startPos; }