| 806 | } |
| 807 | |
| 808 | FACE::MESSAGE_INSTANCE_GUID |
| 809 | create_message_instance_guid(const OpenDDS::DCPS::GUID_t& pub, const CORBA::LongLong& orig_seq) |
| 810 | { |
| 811 | OpenDDS::DCPS::GuidConverter writer(pub); |
| 812 | |
| 813 | FACE::MESSAGE_INSTANCE_GUID message_instance_guid; |
| 814 | FACE::LongLong mig_low; |
| 815 | FACE::LongLong masked_seq; |
| 816 | |
| 817 | //Until MESSAGE_INSTANCE_GUID becomes 128 bit GUID, use checksum to represent Prefix |
| 818 | const FACE::UnsignedLong prefix_representation = ACE::crc32(&pub, sizeof(pub)); |
| 819 | masked_seq = orig_seq >> 32; |
| 820 | |
| 821 | if (masked_seq) { |
| 822 | ACE_DEBUG((LM_WARNING, "(%P|%t) WARNING: create_message_instance_guid - seq does not fit in FACE::Long, truncating high bits to fit\n")); |
| 823 | } |
| 824 | mig_low = orig_seq & 0xFFFFFFFF; |
| 825 | message_instance_guid = (((FACE::LongLong) prefix_representation) << 32 ) | ((FACE::LongLong) mig_low); |
| 826 | /* |
| 827 | //TODO: This is initial work toward defining how a 128 bit guid could be created |
| 828 | //in the future for a Message Instance Guid when supported. |
| 829 | // 13 byte prefix contains identifying pieces of guid |
| 830 | // 3 byte seq - truncated sequence from the sample |
| 831 | typedef CORBA::Octet MsgInstGuidPrefix_t[13]; |
| 832 | typedef CORBA::Octet MsgInstGuidSeq_t[3]; |
| 833 | MsgInstGuidPrefix_t migPrefix; |
| 834 | MsgInstGuidSeq_t migSeq; |
| 835 | ACE_OS::memcpy(&migPrefix[0], &pub.guidPrefix[2], 10); |
| 836 | ACE_OS::memcpy(&migPrefix[10], &pub.entityId.entityKey[0], 3); |
| 837 | masked_seq = orig_seq >> 24; |
| 838 | |
| 839 | if (masked_seq) { |
| 840 | ACE_DEBUG((LM_WARNING, "(%P|%t) WARNING: create_message_instance_guid - seq does not fit in 3 bytes, truncating high bits to fit\n")); |
| 841 | } |
| 842 | FACE::LongLong masked = orig_seq & 0xFFFFFF; |
| 843 | |
| 844 | #ifdef ACE_BIG_ENDIAN |
| 845 | masked <<= 8 * (sizeof(FACE::LongLong)-3); |
| 846 | #endif |
| 847 | ACE_OS::memcpy(&migSeq[0], &masked, 3); |
| 848 | */ |
| 849 | return message_instance_guid; |
| 850 | } |
| 851 | |
| 852 | void populate_header_received(const FACE::CONNECTION_ID_TYPE& connection_id, |
| 853 | const DDS::DomainParticipant_var part, |
no outgoing calls
no test coverage detected