CapabilitiesClientTest() :
     logger(joynr_logging::Logging::getInstance()->getLogger("TEST", "CapabilitiesClientTest")),
     runtime(NULL),
     settings(settingsFilename, QSettings::IniFormat),
     messagingSettings(settings)
 {
     messagingSettings.setMessagingPropertiesPersistenceFilename(messagingPropertiesPersistenceFileName);
     MessagingPropertiesPersistence storage(messagingSettings.getMessagingPropertiesPersistenceFilename());
     channelId = storage.getChannelId().toStdString();
     QSettings* settings = SettingsMerger::mergeSettings(settingsFilename);
     SettingsMerger::mergeSettings(libJoynrSettingsFilename, settings);
     runtime = new JoynrClusterControllerRuntime(NULL, settings);
 }
Esempio n. 2
0
    CapabilitiesClientTest() :
        runtime(nullptr),
        settings(settingsFilename),
        messagingSettings(settings)
    {
        messagingSettings.setMessagingPropertiesPersistenceFilename(messagingPropertiesPersistenceFileName);
        MessagingPropertiesPersistence storage(messagingSettings.getMessagingPropertiesPersistenceFilename());
        channelId = storage.getChannelId();
        Settings* settings = new Settings(settingsFilename);
        Settings libjoynrSettings{libJoynrSettingsFilename};
        Settings::merge(libjoynrSettings, *settings, false);

        runtime = new JoynrClusterControllerRuntime(nullptr, settings);
    }
Esempio n. 3
0
MqttReceiver::MqttReceiver(const MessagingSettings& settings)
        : channelCreatedSemaphore(new joynr::Semaphore(0)),
          isChannelCreated(false),
          channelIdForMqttTopic(),
          globalClusterControllerAddress(),
          receiverId(),
          settings(settings),
          mosquittoSubscriber(settings.getBrokerUrl(),
                              globalClusterControllerAddress,
                              channelCreatedSemaphore),
          mqttSettings()
{
    MessagingPropertiesPersistence persist(settings.getMessagingPropertiesPersistenceFilename());

    channelIdForMqttTopic = persist.getChannelId();
    std::string brokerUri =
            "tcp://" + settings.getBrokerUrl().getBrokerChannelsBaseUrl().getHost() + ":" +
            std::to_string(settings.getBrokerUrl().getBrokerChannelsBaseUrl().getPort());
    system::RoutingTypes::MqttAddress receiveMqttAddress(brokerUri, channelIdForMqttTopic);
    globalClusterControllerAddress = JsonSerializer::serialize(receiveMqttAddress);
    receiverId = persist.getReceiverId();

    mosquittoSubscriber.registerChannelId(channelIdForMqttTopic);
}