From 0370d477d343e1b42cd2ec98c9f102b5c1a27817 Mon Sep 17 00:00:00 2001 From: Peguen <73380451+Peguen@users.noreply.github.com> Date: Thu, 4 Apr 2024 13:57:18 +0200 Subject: [PATCH] Removed GetDefaultConfig(). --- .../src/config/ecal_config_initializer.cpp | 89 ------------------- 1 file changed, 89 deletions(-) diff --git a/ecal/core/src/config/ecal_config_initializer.cpp b/ecal/core/src/config/ecal_config_initializer.cpp index fcf50e905a..b6fec459d7 100644 --- a/ecal/core/src/config/ecal_config_initializer.cpp +++ b/ecal/core/src/config/ecal_config_initializer.cpp @@ -94,95 +94,6 @@ namespace eCAL { namespace Config { - eCALConfig GetDefaultConfig(eCALConfig& config) - { - // transport layer options - auto& transportLayerOptions = config.transport_layer_options; - transportLayerOptions.network_enabled = NET_ENABLED; - transportLayerOptions.drop_out_of_order_messages = EXP_DROP_OUT_OF_ORDER_MESSAGES; - - auto& multicastOptions = transportLayerOptions.mc_options; - multicastOptions.config_version = NET_UDP_MULTICAST_CONFIG_VERSION; - multicastOptions.group = std::string(NET_UDP_MULTICAST_GROUP); - multicastOptions.mask = std::string(NET_UDP_MULTICAST_MASK); - multicastOptions.port = NET_UDP_MULTICAST_PORT; - multicastOptions.ttl = NET_UDP_MULTICAST_TTL; - multicastOptions.recbuf = NET_UDP_MULTICAST_RCVBUF; - multicastOptions.sndbuf = NET_UDP_MULTICAST_SNDBUF; - multicastOptions.join_all_interfaces = NET_UDP_MULTICAST_JOIN_ALL_IF_ENABLED; - multicastOptions.bandwidth_max_udp = NET_BANDWIDTH_MAX_UDP; - multicastOptions.npcap_enabled = NET_NPCAP_ENABLED; - - auto& tcpPubSubOptions = transportLayerOptions.tcp_options; - tcpPubSubOptions.num_executor_reader = NET_TCP_PUBSUB_NUM_EXECUTOR_READER; - tcpPubSubOptions.num_executor_writer = NET_TCP_PUBSUB_NUM_EXECUTOR_WRITER; - tcpPubSubOptions.max_reconnections = NET_TCP_PUBSUB_MAX_RECONNECTIONS; - - auto& shmOptions = transportLayerOptions.shm_options; - shmOptions.host_group_name = NET_HOST_GROUP_NAME; - shmOptions.memfile_minsize = PUB_MEMFILE_MINSIZE; - shmOptions.memfile_reserve = PUB_MEMFILE_RESERVE; - shmOptions.memfile_ack_timeout = PUB_MEMFILE_ACK_TO; - shmOptions.memfile_buffer_count = PUB_MEMFILE_BUF_COUNT; - shmOptions.drop_out_of_order_messages = EXP_DROP_OUT_OF_ORDER_MESSAGES; - shmOptions.memfile_zero_copy = PUB_MEMFILE_ZERO_COPY; - - // registration options - auto& registrationOptions = config.registration_options; - registrationOptions = RegistrationOptions(CMN_REGISTRATION_TO, CMN_REGISTRATION_REFRESH); - registrationOptions.share_tdesc = PUB_SHARE_TDESC; - registrationOptions.share_ttype = PUB_SHARE_TTYPE; - - // monitoring options - auto& monitoringOptions = config.monitoring_options; - monitoringOptions.monitoring_mode = EXP_MONITORING_MODE; - monitoringOptions.monitoring_timeout = MON_TIMEOUT; - monitoringOptions.network_monitoring = EXP_NETWORK_MONITORING_ENABLED; - monitoringOptions.filter_excl = MON_FILTER_EXCL; - monitoringOptions.filter_incl = MON_FILTER_INCL; - monitoringOptions.filter_log_con = MON_LOG_FILTER_CON; - monitoringOptions.filter_log_file = MON_LOG_FILTER_FILE; - monitoringOptions.filter_log_udp = MON_LOG_FILTER_UDP; - - // auto& udpMonitoringOptions = monitoringOptions.udp_options; - // TODO: Nothing here yet - - auto& shmMonitoringOptions = monitoringOptions.shm_options; - shmMonitoringOptions.shm_monitoring_domain = std::string(EXP_SHM_MONITORING_DOMAIN); - shmMonitoringOptions.shm_monitoring_queue_size = EXP_SHM_MONITORING_QUEUE_SIZE; - - // receiving options - auto& receivingOptions = config.receiving_options; - receivingOptions.shm_recv_enabled = NET_SHM_REC_ENABLED; - receivingOptions.tcp_recv_enabled = NET_TCP_REC_ENABLED; - receivingOptions.udp_mc_recv_enabled = NET_UDP_MC_REC_ENABLED; - - // publisher options - auto& publisherOptions = config.publisher_options; - publisherOptions.use_shm = PUB_USE_SHM; - publisherOptions.use_tcp = PUB_USE_TCP; - publisherOptions.use_udp_mc = PUB_USE_UDP_MC; - - // timesync options - auto& timesyncOptions = config.timesync_options; - timesyncOptions.timesync_module = TIME_SYNC_MODULE; - - // service options - auto& serviceOptions = config.service_options; - serviceOptions.protocol_v0 = SERVICE_PROTOCOL_V0; - serviceOptions.protocol_v1 = SERVICE_PROTOCOL_V1; - - // sys options - auto& sysOptions = config.application_options.sys_options; - sysOptions.filter_excl = SYS_FILTER_EXCL; - - // process options - auto& processOptions = config.application_options.process_options; - processOptions.terminal_emulator = PROCESS_TERMINAL_EMULATOR; - - return config; - }; - eCALConfig GetIniConfig(eCALConfig& config) { CConfig iniConfig;