Changeset 115:fd7b0e5ec9ea in finroc_plugins_data_ports
- Timestamp:
- 08.06.2017 02:34:37 (4 years ago)
- Branch:
- 17.03
- Phase:
- public
- Rebase:
- 34346233396662386532633930663564396239663366666437323665613063346363616438636638
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
optimized/tCheapCopyPort.cpp
r114 r115 384 384 tUnusedManagerPointer unused_manager(tGlobalBufferPools::Instance().GetUnusedBuffer(cheaply_copyable_type_index).release()); 385 385 CopyCurrentValueToManager(*unused_manager, tStrategy::NEVER_PULL); 386 common::tPublishOperation<tCheapCopyPort, tPublishingDataGlobalBuffer> data(unused_manager); 387 tCheapCopyPort& target_port = static_cast<tCheapCopyPort&>(connector.Destination()); 388 common::tPublishOperation<tCheapCopyPort, tPublishingDataGlobalBuffer>::Receive<tChangeStatus::CHANGED_INITIAL>(data, target_port, *this); 386 if (typeid(connector) == typeid(common::tConversionConnector)) 387 { 388 static_cast<common::tConversionConnector&>(connector).Publish(unused_manager->GetObject(), tChangeStatus::CHANGED_INITIAL); 389 } 390 else 391 { 392 common::tPublishOperation<tCheapCopyPort, tPublishingDataGlobalBuffer> data(unused_manager); 393 tCheapCopyPort& target_port = static_cast<tCheapCopyPort&>(connector.Destination()); 394 common::tPublishOperation<tCheapCopyPort, tPublishingDataGlobalBuffer>::Receive<tChangeStatus::CHANGED_INITIAL>(data, target_port, *this); 395 } 389 396 } 390 397 -
optimized/tSingleThreadedCheapCopyPortGeneric.cpp
r114 r115 162 162 void tSingleThreadedCheapCopyPortGeneric::InitialPushTo(core::tConnector& connector) 163 163 { 164 common::tPublishOperation<tSingleThreadedCheapCopyPortGeneric, tPublishingData> data(current_value); 165 tSingleThreadedCheapCopyPortGeneric& target_port = static_cast<tSingleThreadedCheapCopyPortGeneric&>(connector.Destination()); 166 common::tPublishOperation<tSingleThreadedCheapCopyPortGeneric, tPublishingData>::Receive<tChangeStatus::CHANGED_INITIAL>(data, target_port, *this); 164 if (typeid(connector) == typeid(common::tConversionConnector)) 165 { 166 static_cast<common::tConversionConnector&>(connector).Publish(*current_value.data, tChangeStatus::CHANGED_INITIAL); 167 } 168 else 169 { 170 common::tPublishOperation<tSingleThreadedCheapCopyPortGeneric, tPublishingData> data(current_value); 171 tSingleThreadedCheapCopyPortGeneric& target_port = static_cast<tSingleThreadedCheapCopyPortGeneric&>(connector.Destination()); 172 common::tPublishOperation<tSingleThreadedCheapCopyPortGeneric, tPublishingData>::Receive<tChangeStatus::CHANGED_INITIAL>(data, target_port, *this); 173 } 167 174 } 168 175 -
standard/tStandardPort.cpp
r114 r115 272 272 assert(IsReady()); 273 273 274 common::tPublishOperation<tStandardPort, tPublishingData> data(manager, 1000); 275 tStandardPort& target_port = static_cast<tStandardPort&>(connector.Destination()); 276 common::tPublishOperation<tStandardPort, tPublishingData>::Receive<tChangeStatus::CHANGED_INITIAL>(data, target_port, *this); 274 if (typeid(connector) == typeid(common::tConversionConnector)) 275 { 276 static_cast<common::tConversionConnector&>(connector).Publish(manager->GetObject(), tChangeStatus::CHANGED_INITIAL); 277 } 278 else 279 { 280 common::tPublishOperation<tStandardPort, tPublishingData> data(manager, 1000); 281 tStandardPort& target_port = static_cast<tStandardPort&>(connector.Destination()); 282 common::tPublishOperation<tStandardPort, tPublishingData>::Receive<tChangeStatus::CHANGED_INITIAL>(data, target_port, *this); 283 } 277 284 } 278 285
Note: See TracChangeset
for help on using the changeset viewer.