Skip to content

Commit

Permalink
Changed from needs conversion to conversion required.
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Sobel committed May 7, 2014
1 parent 280b69e commit 21b5197
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion agent/adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Adapter::Adapter(const string& device,
const unsigned int port,
int aLegacyTimeout)
: Connector(server, port, aLegacyTimeout), mDeviceName(device), mRunning(true),
mDupCheck(false), mAutoAvailable(false), mIgnoreTimestamps(false), mRelativeTime(false), mNeedsConversion(true),
mDupCheck(false), mAutoAvailable(false), mIgnoreTimestamps(false), mRelativeTime(false), mConversionRequired(true),
mBaseTime(0), mBaseOffset(0), mParseTime(false), mGatheringAsset(false), mReconnectInterval(10 * 1000)
{
}
Expand Down
6 changes: 3 additions & 3 deletions agent/adapter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class Adapter : public Connector, public threaded_object
void setRelativeTime(bool aFlag) { mRelativeTime = aFlag; }
bool getrelativeTime() { return mRelativeTime; }

void setNeedsConversion(bool aFlag) { mNeedsConversion = aFlag; }
bool needsConversion() const { return mNeedsConversion; }
void setConversionRequired(bool aFlag) { mConversionRequired = aFlag; }
bool conversionRequired() const { return mConversionRequired; }

uint64_t getBaseTime() { return mBaseTime; }
uint64_t getBaseOffset() { return mBaseOffset; }
Expand Down Expand Up @@ -120,7 +120,7 @@ class Adapter : public Connector, public threaded_object
bool mAutoAvailable;
bool mIgnoreTimestamps;
bool mRelativeTime;
bool mNeedsConversion;
bool mConversionRequired;

// For relative times
uint64_t mBaseTime;
Expand Down
2 changes: 1 addition & 1 deletion agent/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ void AgentConfiguration::loadAdapters(dlib::config_reader::kernel_1a &aReader,
adp->setAutoAvailable(get_bool_with_default(adapter, "AutoAvailable", adp->isAutoAvailable()));
adp->setIgnoreTimestamps(get_bool_with_default(adapter, "IgnoreTimestamps", aIgnoreTimestamps ||
adp->isIgnoringTimestamps()));
adp->setNeedsConversion(get_bool_with_default(adapter, "ConversionRequired", aConversionRequired));
adp->setConversionRequired(get_bool_with_default(adapter, "ConversionRequired", aConversionRequired));
adp->setRealTime(get_bool_with_default(adapter, "RealTime", false));
adp->setRelativeTime(get_bool_with_default(adapter, "RelativeTime", false));
adp->setReconnectInterval(reconnectInterval);
Expand Down
2 changes: 1 addition & 1 deletion agent/data_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void DataItem::setDataSource(Adapter *aSource)
{
if (mDataSource != aSource)
mDataSource = aSource;
if (!mDataSource->needsConversion())
if (!mDataSource->conversionRequired())
{
mConversionRequired = false;
mConversionDetermined = true;
Expand Down
2 changes: 1 addition & 1 deletion test/data_item_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ void DataItemTest::testConversion()
DataItem item5(attributes4);

Adapter a("", "", 0);
a.setNeedsConversion(false);
a.setConversionRequired(false);

item5.setDataSource(&a);
CPPUNIT_ASSERT(!item5.conversionRequired());
Expand Down

0 comments on commit 21b5197

Please sign in to comment.