| 340 | } |
| 341 | |
| 342 | DDS::UInt64 |
| 343 | ConfigStoreImpl::get_uint64(const char* key, |
| 344 | DDS::UInt64 value) |
| 345 | { |
| 346 | const ConfigPair cp(key, ""); |
| 347 | DDS::UInt64 retval = value; |
| 348 | DCPS::InternalDataReader<ConfigPair>::SampleSequence samples; |
| 349 | DCPS::InternalSampleInfoSequence infos; |
| 350 | config_reader_->read_instance(samples, infos, DDS::LENGTH_UNLIMITED, cp, |
| 351 | DDS::ANY_SAMPLE_STATE, DDS::ANY_VIEW_STATE, DDS::ALIVE_INSTANCE_STATE); |
| 352 | for (size_t idx = 0; idx != samples.size(); ++idx) { |
| 353 | const ConfigPair& sample = samples[idx]; |
| 354 | const DDS::SampleInfo& info = infos[idx]; |
| 355 | if (info.valid_data) { |
| 356 | DDS::UInt64 x = 0; |
| 357 | if (DCPS::convertToInteger(sample.value(), x)) { |
| 358 | retval = x; |
| 359 | } else { |
| 360 | retval = value; |
| 361 | if (log_level >= LogLevel::Warning) { |
| 362 | ACE_ERROR((LM_WARNING, |
| 363 | "(%P|%t) WARNING: ConfigStoreImpl::get_uint64: " |
| 364 | "failed to parse uint64 for %C=%C\n", |
| 365 | sample.key().c_str(), sample.value().c_str())); |
| 366 | } |
| 367 | } |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | if (debug_logging) { |
| 372 | ACE_DEBUG((LM_DEBUG, "(%P|%t) %C: ConfigStoreImpl::get_int64: %C=%Q\n", |
| 373 | CONFIG_DEBUG_LOGGING, |
| 374 | cp.key().c_str(), |
| 375 | retval)); |
| 376 | |
| 377 | } |
| 378 | |
| 379 | return retval; |
| 380 | } |
| 381 | |
| 382 | void |
| 383 | ConfigStoreImpl::set_float64(const char* key, |
no test coverage detected