def _createExchangeBroker(self, exchangeCtx):
     exchangeBroker = createExchangeBroker(exchangeCtx)
     exchangeBroker.setVehiclesInfoExchange(
         vehicle.VehiclesExchangeBlock(
             EpicRandomVehicleInfoComponent(),
             positionComposer=broker.BiDirectionComposer(),
             idsComposers=(vehicle.TeamsSortedIDsComposer(),
                           vehicle.TeamsCorrelationIDsComposer()),
             statsComposers=None))
     exchangeBroker.setVehiclesStatsExchange(
         vehicle.VehiclesExchangeBlock(
             DynamicVehicleStatsComponent(),
             positionComposer=broker.BiDirectionComposer(),
             idsComposers=None,
             statsComposers=(vehicle.TotalStatsComposer(), )))
     exchangeBroker.setVehicleStatusExchange(
         vehicle.VehicleStatusComponent(
             idsComposers=(vehicle.TeamsSortedIDsComposer(),
                           vehicle.TeamsCorrelationIDsComposer()),
             statsComposers=(vehicle.TotalStatsComposer(), )))
     return exchangeBroker
示例#2
0
 def _createExchangeBroker(self, exchangeCtx):
     exchangeBroker = createExchangeBroker(exchangeCtx)
     exchangeBroker.setVehiclesInfoExchange(
         vehicle.VehiclesExchangeBlock(
             RankedVehicleInfoComponent(),
             positionComposer=broker.BiDirectionComposer(),
             idsComposers=(vehicle.TeamsSortedIDsComposer(
                 sortKey=vos_collections.RankSortKey),
                           vehicle.TeamsCorrelationIDsComposer()),
             statsComposers=None))
     exchangeBroker.setVehiclesStatsExchange(
         vehicle.VehiclesExchangeBlock(
             VehicleFragsComponent(),
             positionComposer=broker.BiDirectionComposer(),
             idsComposers=None,
             statsComposers=(vehicle.TotalStatsComposer(), )))
     exchangeBroker.setVehicleStatusExchange(
         vehicle.VehicleStatusComponent(
             idsComposers=(vehicle.TeamsSortedIDsComposer(
                 sortKey=vos_collections.RankSortKey),
                           vehicle.TeamsCorrelationIDsComposer()),
             statsComposers=(vehicle.TotalStatsComposer(), )))
     return exchangeBroker