当前位置: 首页>>代码示例>>C++>>正文


C++ JoynrClusterControllerRuntime类代码示例

本文整理汇总了C++中JoynrClusterControllerRuntime的典型用法代码示例。如果您正苦于以下问题:C++ JoynrClusterControllerRuntime类的具体用法?C++ JoynrClusterControllerRuntime怎么用?C++ JoynrClusterControllerRuntime使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了JoynrClusterControllerRuntime类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

 ~JoynrClusterControllerRuntimeTest(){
     if (runtime) {
         runtime->deleteChannel();
         runtime->stopMessaging();
         delete runtime;
     }
 }
开发者ID:zabela,项目名称:joynr,代码行数:7,代码来源:JoynrClusterControllerRuntimeTest.cpp

示例2: startMessagingDoesNotThrow

void JoynrClusterControllerRuntimeTest::startMessagingDoesNotThrow() {
    EXPECT_CALL(*mockHttpMessageReceiver, startReceiveQueue())
            .Times(1);
    EXPECT_CALL(*mockHttpMessageReceiver, stopReceiveQueue())
            .Times(1);

    ASSERT_TRUE(runtime != nullptr);
    runtime->startMessaging();
    runtime->stopMessaging();
}
开发者ID:zabela,项目名称:joynr,代码行数:10,代码来源:JoynrClusterControllerRuntimeTest.cpp

示例3: QCoreApplication

JoynrClusterControllerRuntime* JoynrClusterControllerRuntime::create(Settings* settings)
{
    // Only allow one QCoreApplication instance
    static int argc = 0;
    static char* argv[] = {nullptr};
    static QCoreApplication* coreApplication =
            (QCoreApplication::instance() == nullptr) ? new QCoreApplication(argc, argv) : nullptr;

    JoynrClusterControllerRuntime* runtime =
            new JoynrClusterControllerRuntime(coreApplication, settings);
    runtime->start();
    return runtime;
}
开发者ID:zabela,项目名称:joynr,代码行数:13,代码来源:JoynrClusterControllerRuntime.cpp

示例4: SystemServicesRoutingTest

    SystemServicesRoutingTest() :
            settingsFilename("test-resources/SystemServicesRoutingTest.settings"),
            settings(new QSettings(settingsFilename, QSettings::IniFormat)),
            routingDomain(),
            routingProviderParticipantId(),
            runtime(NULL),
            mockMessageReceiver(new MockMessageReceiver()),
            mockMessageSender(new MockMessageSender()),
            discoveryQos(),
            routingProxyBuilder(NULL),
            routingProxy(NULL)
    {
        SystemServicesSettings systemSettings(*settings);
        systemSettings.printSettings();
        routingDomain = TypeUtil::toStd(systemSettings.getDomain());
        routingProviderParticipantId = systemSettings.getCcRoutingProviderParticipantId();
        
        discoveryQos.setCacheMaxAge(1000);
        discoveryQos.setArbitrationStrategy(DiscoveryQos::ArbitrationStrategy::FIXED_PARTICIPANT);
        discoveryQos.addCustomParameter("fixedParticipantId", TypeUtil::toStd(routingProviderParticipantId));
        discoveryQos.setDiscoveryTimeout(50);

        QString channelId("SystemServicesRoutingTest.ChannelId");
        EXPECT_CALL(*(dynamic_cast<MockMessageReceiver*>(mockMessageReceiver)), getReceiveChannelId())
                .WillRepeatedly(::testing::ReturnRefOfCopy(channelId));

        //runtime can only be created, after MockMessageReceiver has been told to return
        //a channelId for getReceiveChannelId.
        runtime = new JoynrClusterControllerRuntime(NULL, settings, mockMessageReceiver, mockMessageSender);
        // routing provider is normally registered in JoynrClusterControllerRuntime::create
        runtime->registerRoutingProvider();
    }
开发者ID:HSchroeder,项目名称:joynr,代码行数:32,代码来源:SystemServicesRoutingTest.cpp

示例5: main

int main(int argc, char* argv[])
{
    // init a logger
    Logger logger("Runtime");

    // Check the usage
    std::string programName(argv[0]);
    if (argc == 1) {
        JOYNR_LOG_INFO(logger, "USAGE: No settings provided. Starting with default settings.");
        JOYNR_LOG_INFO(logger, "USAGE: {}  <file.settings>...", programName);
    }

    // Object that holds all the settings
    Settings settings;

    // Merge all the settings files into the settings object
    for (int i = 1; i < argc; i++) {

        std::string settingsFileName(argv[i]);

        // Read the settings file
        JOYNR_LOG_INFO(logger, "Loading settings file: {}", settingsFileName);
        Settings currentSettings(settingsFileName);

        // Check for errors
        if (!currentSettings.isLoaded()) {
            JOYNR_LOG_FATAL(logger, "Settings file \"{}\" doesn't exist.", settingsFileName);
            return 1;
        }

        // Merge
        Settings::merge(currentSettings, settings, true);
    }

    // create the cluster controller runtime
    JoynrClusterControllerRuntime* clusterControllerRuntime =
            JoynrClusterControllerRuntime::create(&settings);

    // run the cluster controller forever
    clusterControllerRuntime->runForever();
}
开发者ID:zabela,项目名称:joynr,代码行数:41,代码来源:StartClusterController.cpp

示例6: LibJoynrRuntimeTest

    LibJoynrRuntimeTest() :
            settingsFilename("test-resources/integrationtest.settings"),
            temporarylibjoynrSettingsFilename("test-resouces/LibJoynrRuntimeTest.libjoynr.settings"),
            settings(settingsFilename),
            mockMessageReceiver(new MockMessageReceiver()),
            mockMessageSender(new MockMessageSender()),
            ccRuntime(NULL),
            runtime(NULL),
            routingProxyBuilder(NULL),
            routingProxy(NULL),
            mockTestProviderQos(
                std::vector<joynr::types::CustomParameter>(), // custom provider parameters
                1,                                      // version
                1,                                      // priority
                joynr::types::ProviderScope::LOCAL,     // visibilitiy scope
                false                                   // supports on change subscriptions
            ),
            mockTestProvider(),
            discoveryProxyBuilder(NULL),
            discoveryProxy(NULL)
    {
        std::string channelId("LibJoynrRuntimeTest.ChannelId");

        //runtime can only be created, after MockMessageReceiver has been told to return
        //a channelId for getReceiveChannelId.
        EXPECT_CALL(*mockMessageReceiver, getReceiveChannelId())
                .WillRepeatedly(::testing::ReturnRefOfCopy(channelId));

        ccRuntime = new JoynrClusterControllerRuntime(
                    NULL,
                    new Settings(settingsFilename),
                    mockMessageReceiver,
                    mockMessageSender
        );
        // routing provider is normally registered in JoynrClusterControllerRuntime::create
        ccRuntime->registerRoutingProvider();
        // discovery provider is normally registered in JoynrClusterControllerRuntime::create
        ccRuntime->registerDiscoveryProvider();
    }
开发者ID:icyerasor,项目名称:joynr,代码行数:39,代码来源:LibJoynrRuntimeTest.cpp

示例7:

 ~SystemServicesRoutingTest(){
     runtime->deleteChannel();
     runtime->stopMessaging();
     delete runtime;
     delete settings;
     QFile::remove(settingsFilename);
 }
开发者ID:HSchroeder,项目名称:joynr,代码行数:7,代码来源:SystemServicesRoutingTest.cpp

示例8: TearDown

    void TearDown() {
        bool deleteChannel = true;
        runtime1->stop(deleteChannel);
        runtime2->stop(deleteChannel);

        // Delete the persisted participant ids so that each test uses different participant ids
        std::remove(LibjoynrSettings::DEFAULT_PARTICIPANT_IDS_PERSISTENCE_FILENAME().c_str());
    }
开发者ID:icyerasor,项目名称:joynr,代码行数:8,代码来源:End2EndSubscriptionTest.cpp

示例9: TearDown

    // Tears down the test fixture.
    void TearDown(){
        bool deleteChannel = true;
        runtime->stop(deleteChannel);

        // Remove participant id persistence file
        std::remove(LibjoynrSettings::DEFAULT_PARTICIPANT_IDS_PERSISTENCE_FILENAME().c_str());
        std::this_thread::sleep_for(std::chrono::milliseconds(550));
    }
开发者ID:icyerasor,项目名称:joynr,代码行数:9,代码来源:End2EndSSLTest.cpp

示例10: TearDown

    // Tears down the test fixture.
    void TearDown(){
        bool deleteChannel = true;
        runtime->stop(deleteChannel);

        // Remove participant id persistence file
        QFile::remove(LibjoynrSettings::DEFAULT_PARTICIPANT_IDS_PERSISTENCE_FILENAME());
        QThreadSleep::msleep(550);
    }
开发者ID:HSchroeder,项目名称:joynr,代码行数:9,代码来源:End2EndSSLTest.cpp

示例11: TearDown

 void TearDown() {
     bool deleteChannel = true;
     runtime->stop(deleteChannel);
 }
开发者ID:HSchroeder,项目名称:joynr,代码行数:4,代码来源:CapabilitiesClientTest.cpp

示例12: SetUp

 void SetUp() {
     runtime->start();
 }
开发者ID:HSchroeder,项目名称:joynr,代码行数:3,代码来源:CapabilitiesClientTest.cpp

示例13:

 ~LibJoynrRuntimeTest() {
     ccRuntime->deleteChannel();
     ccRuntime->stopMessaging();
     delete ccRuntime;
 }
开发者ID:icyerasor,项目名称:joynr,代码行数:5,代码来源:LibJoynrRuntimeTest.cpp

示例14: SetUp

 void SetUp() {
     runtime1->start();
     runtime2->start();
 }
开发者ID:icyerasor,项目名称:joynr,代码行数:4,代码来源:End2EndSubscriptionTest.cpp


注:本文中的JoynrClusterControllerRuntime类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。