MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / get_uint64

Method get_uint64

dds/DCPS/ConfigStoreImpl.cpp:342–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340}
341
342DDS::UInt64
343ConfigStoreImpl::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
382void
383ConfigStoreImpl::set_float64(const char* key,

Callers 1

TESTFunction · 0.80

Calls 5

convertToIntegerFunction · 0.85
read_instanceMethod · 0.45
sizeMethod · 0.45
valueMethod · 0.45
keyMethod · 0.45

Tested by

no test coverage detected