Changeset 156:95ed8ff21d92 in finroc_plugins_tcp


Ignore:
Timestamp:
14.05.2017 13:31:41 (22 months ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
17.03
Phase:
public
Message:

Makes connectors to be sent to finstruct on initial structure exchange and sends info on handles (stamp width) to connection partner

File:
1 edited

Legend:

Unmodified
Added
Removed
  • internal/tConnection.cpp

    r155 r156  
    121121    stream1 << cGREET_MESSAGE; 
    122122    stream1.WriteShort(network_transport::generic_protocol::cPROTOCOL_VERSION_MAJOR); 
    123     uint32_t flags = connection->flags | ((network_transport::generic_protocol::cPROTOCOL_VERSION_MINOR & 0xFFFFFF) << 8) | (connection->peer.par_debug_tcp.Get() ? 0 : (static_cast<uint>(tConnectionFlag::NO_DEBUG))); 
     123    uint32_t flags = connection->flags | (core::internal::tFrameworkElementRegister::cSTAMP_BIT_WIDTH << 8) | ((network_transport::generic_protocol::cPROTOCOL_VERSION_MINOR & 0xFFFF) << 16) | (connection->peer.par_debug_tcp.Get() ? 0 : (static_cast<uint>(tConnectionFlag::NO_DEBUG))); 
    124124    tConnectionInitMessage::Serialize(true, false, stream2, connection->peer.GetPeerInfo().uuid, connection->peer.GetPeerInfo().peer_type, 
    125125                                      connection->peer.GetPeerInfo().name, tStructureExchange::SHARED_PORTS, flags, connection->socket->remote_endpoint().address()); 
     
    228228        bool primary_connection = connection->flags & static_cast<uint>(tConnectionFlag::PRIMARY_CONNECTION); 
    229229        bool express_only_connection = (connection->flags & static_cast<uint>(tConnectionFlag::EXPRESS_DATA)) && (!primary_connection); 
    230         rrlib::serialization::tSerializationInfo input_info(std::min<uint>(network_transport::generic_protocol::cPROTOCOL_VERSION_MINOR, static_cast<uint>(message.Get<4>()) >> 8), 
     230        rrlib::serialization::tSerializationInfo input_info(std::min<uint>(network_transport::generic_protocol::cPROTOCOL_VERSION_MINOR, static_cast<uint>(message.Get<4>()) >> 16), 
    231231            rrlib::serialization::tRegisterEntryEncoding::UID, 
    232232            static_cast<int>(message.Get<3>()) | (java_partner ? network_transport::runtime_info::cJAVA_CLIENT : 0) | (connection->flags & static_cast<uint>(tConnectionFlag::NO_DEBUG) ? 0 : network_transport::runtime_info::cDEBUG_PROTOCOL)); 
     
    502502        { 
    503503          stream.WriteInt(framework_element_buffer[i]->GetHandle()); 
    504           network_transport::runtime_info::tLocalFrameworkElementInfo::Serialize(stream, *framework_element_buffer[i]); 
     504          network_transport::runtime_info::tLocalFrameworkElementInfo::Serialize(stream, *framework_element_buffer[i], connection->GetRemoteRuntime()->GetDesiredStructureInfo() == tStructureExchange::FINSTRUCT); 
    505505          FINROC_LOG_PRINT(DEBUG_VERBOSE_2, "Serializing ", *framework_element_buffer[i]); 
    506506        } 
Note: See TracChangeset for help on using the changeset viewer.