Manually integrated Jim's changes from integrate2_jim branch

Signed-off-by: Jim Wilson <jywilson99@hotmail.com>
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2016-02-19 16:59:46 +01:00
committed by Julian Oes
parent a1a615b907
commit caa94d58a6
14 changed files with 117 additions and 74 deletions
@@ -40,7 +40,7 @@
#define LOG_TAG "uORBKraitFastRpcChannel.cpp"
uORB::KraitFastRpcChannel uORB::KraitFastRpcChannel::_Instance;
uORB::KraitFastRpcChannel *uORB::KraitFastRpcChannel::_InstancePtr = nullptr;
static void DumpData(uint8_t *buffer, int32_t length, int32_t num_topics);
@@ -55,8 +55,12 @@ public:
*/
static uORB::KraitFastRpcChannel *GetInstance()
{
return &(_Instance);
}
if (_InstancePtr == nullptr)
{
_InstancePtr = new uORB::KraitFastRpcChannel();
}
return _InstancePtr;
}
/**
* @brief Interface to notify the remote entity of interest of a
@@ -119,7 +123,7 @@ public:
void Stop();
private: // data members
static uORB::KraitFastRpcChannel _Instance;
static uORB::KraitFastRpcChannel *_InstancePtr;
uORBCommunicator::IChannelRxHandler *_RxHandler;
pthread_t _RecvThread;
bool _ThreadStarted;