#Go to build sample apps
SConscript('examples/SConscript')
-
-
-
-
######################################################################
resourcebroker_env.AppendUnique(CPPPATH = ['include'])
resourcebroker_env.AppendUnique(CPPPATH = ['../common/primitiveResource/include'])
-resourcebroker_env.AppendUnique(CPPPATH = ['../common/primitiveTimer/include'])
+resourcebroker_env.AppendUnique(CPPPATH = ['../common/expiryTimer/include'])
resourcebroker_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
-resourcebroker_env.PrependUnique(LIBS = ['service_common', 'oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'libcoap'])
+resourcebroker_env.PrependUnique(LIBS = ['service_common', 'ExpiryTimer', 'oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'libcoap'])
if target_os not in ['windows', 'winrt']:
BROKER_SRC_DIR + 'DeviceAssociation.cpp',
BROKER_SRC_DIR + 'DevicePresence.cpp',
BROKER_SRC_DIR + 'ResourcePresence.cpp',
- BROKER_SRC_DIR + 'ResourceBroker.cpp',
- BROKER_SRC_DIR + '../../common/primitiveTimer/src/PrimitiveTimer.cpp',
- BROKER_SRC_DIR + '../../common/primitiveTimer/src/PrimitiveTimer_Impl.cpp'
+ BROKER_SRC_DIR + 'ResourceBroker.cpp'
]
#include <condition_variable>
#include "BrokerTypes.h"
-#include "PrimitiveTimer.h"
+#include "ExpiryTimer.h"
namespace OIC
{
private:
std::unique_ptr<std::list<BrokerRequesterInfoPtr>> requesterList;
PrimitiveResourcePtr primitiveResource;
- PrimitiveTimer primitiveTimer;
+ ExpiryTimer expiryTimer;
BROKER_STATE state;
BROKER_MODE mode;
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#include "../include/ResourcePresence.h"
+#include "ResourcePresence.h"
#include <bits/atomic_base.h>
#include <bits/shared_ptr_base.h>
= std::unique_ptr<std::list<BrokerRequesterInfoPtr>>
(new std::list<BrokerRequesterInfoPtr>);
- timeoutHandle = primitiveTimer.requestTimer(SAFE_TIME, pTimeoutCB);
+ timeoutHandle = expiryTimer.requestTimer(SAFE_TIME, pTimeoutCB);
primitiveResource->requestGet(pGetCB);
void * ResourcePresence::pollingCB(unsigned int msg)
{
this->requestResourceState();
- timeoutHandle = primitiveTimer.requestTimer(SAFE_TIME,pTimeoutCB);
+ timeoutHandle = expiryTimer.requestTimer(SAFE_TIME,pTimeoutCB);
return NULL;
}
if(isWithinTime)
{
- primitiveTimer.cancelTimer(timeoutHandle);
+ expiryTimer.cancelTimer(timeoutHandle);
isWithinTime = true;
}
if(mode == BROKER_MODE::NON_PRESENCE_MODE)
{
// TODO set timer & request get
- primitiveTimer.requestTimer(SAFE_TIME,pPollingCB);
+ expiryTimer.requestTimer(SAFE_TIME,pPollingCB);
}
}