summaryrefslogtreecommitdiff
path: root/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h
diff options
context:
space:
mode:
authorAleksandar Donchev <Aleksander.Donchev@partner.bmw.de>2017-11-27 15:39:53 +0100
committerJacqueline Molz <Jacqueline.Molz@bmw.de>2018-02-13 12:48:36 +0100
commitd6481481d86408a5b1c74162012167ed57ac6ee9 (patch)
tree6713f2695103494b2b4fe445fb95f9fe2b629041 /AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h
parent34207d94acb8914c4f45b64c2362c645251a53ec (diff)
downloadaudiomanager-d6481481d86408a5b1c74162012167ed57ac6ee9.tar.gz
Cmake parameters for real-time scheduler's priority and policy and throw runtime error if read fails.
Signed-off-by: Christian Linke <christian.linke@bmw.de> Change-Id: I6a7a2c424bc8fac62c76a66545a231c518edb2e1
Diffstat (limited to 'AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h')
-rw-r--r--AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h b/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h
index 269e5da..6cda2b3 100644
--- a/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h
+++ b/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h
@@ -101,10 +101,7 @@ namespace am
UNIX, INET
};
CAmSamplePlugin(CAmSocketHandler *mySocketHandler, sockType_e socketType);
- virtual ~CAmSamplePlugin()
- {
- }
- ;
+ virtual ~CAmSamplePlugin(){ shutdown(mSocket, SHUT_RDWR); }
void connectSocket(const pollfd pollfd, const sh_pollHandle_t handle, void* userData);
virtual void receiveData(const pollfd pollfd, const sh_pollHandle_t handle, void* userData);
virtual bool dispatchData(const sh_pollHandle_t handle, void* userData);
@@ -113,11 +110,12 @@ namespace am
TAmShPollFired<CAmSamplePlugin> receiveFiredCB;
TAmShPollDispatch<CAmSamplePlugin> sampleDispatchCB;
TAmShPollCheck<CAmSamplePlugin> sampleCheckCB;
-
+ bool isSocketOpened() { return mSocket>-1; }
protected:
CAmSocketHandler *mSocketHandler;
sh_pollHandle_t mConnecthandle, mReceiveHandle;
std::queue<std::string> msgList;
+ int mSocket;
};
class CAmTimerSockethandlerController: public MockIAmTimerCb
@@ -242,11 +240,11 @@ namespace am
std::vector<CAmTimerStressTest2*> mTimers;
public:
CAmSamplePluginStressTest(CAmSocketHandler *mySocketHandler, sockType_e socketType);
- ~CAmSamplePluginStressTest();
+ virtual ~CAmSamplePluginStressTest();
- virtual void receiveData(const pollfd pollfd, const sh_pollHandle_t handle, void* userData);
- virtual bool dispatchData(const sh_pollHandle_t handle, void* userData);
- virtual bool check(const sh_pollHandle_t handle, void* userData);
+ void receiveData(const pollfd pollfd, const sh_pollHandle_t handle, void* userData) final;
+ bool dispatchData(const sh_pollHandle_t handle, void* userData) final;
+ bool check(const sh_pollHandle_t handle, void* userData) final;
std::vector<CAmTimerStressTest2*> & getTimers() { return mTimers; }
};