| 994 | |
| 995 | #ifndef OPENDDS_SAFETY_PROFILE |
| 996 | DDS::DynamicData_ptr RecorderImpl::get_dynamic_data(const RawDataSample& sample) |
| 997 | { |
| 998 | const Encoding enc(sample.encoding_kind_, sample.header_.byte_order_ ? ENDIAN_LITTLE : ENDIAN_BIG); |
| 999 | const DynamicTypeByPubId::const_iterator dt_found = dt_map_.find(sample.publication_id_); |
| 1000 | if (dt_found == dt_map_.end()) { |
| 1001 | if (log_level >= LogLevel::Error) { |
| 1002 | ACE_ERROR((LM_ERROR, "(%P|%t) ERROR: RecorderImpl::get_dynamic_data: " |
| 1003 | "failed to find GUID: %C in DynamicTypeByPubId.\n", LogGuid(sample.publication_id_).c_str())); |
| 1004 | } |
| 1005 | return 0; |
| 1006 | } |
| 1007 | |
| 1008 | DDS::DynamicType_var dt = dt_found->second; |
| 1009 | XTypes::DynamicDataXcdrReadImpl* dd = new XTypes::DynamicDataXcdrReadImpl(sample.sample_.get(), enc, dt); |
| 1010 | DDS::DynamicData_var dd_var = dd; |
| 1011 | if (!dd->check_xcdr1_mutable(dt)) { |
| 1012 | if (log_level >= LogLevel::Notice) { |
| 1013 | ACE_ERROR((LM_NOTICE, "(%P|%t) NOTICE: RecorderImpl::get_dynamic_data: " |
| 1014 | "Encountered unsupported combination of XCDR1 encoding and mutable extensibility.\n")); |
| 1015 | } |
| 1016 | return 0; |
| 1017 | } |
| 1018 | return dd_var._retn(); |
| 1019 | } |
| 1020 | #endif |
| 1021 | |
| 1022 | } // namespace DCPS |