repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
less debug logging by default
[deb_libcec.git]
/
src
/
lib
/
adapter
/
Pulse-Eight
/
USBCECAdapterMessageQueue.h
diff --git
a/src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.h
b/src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.h
index 6e325a797b2a1def96ede1def99e494da439f9cb..7e01436372250ec30ae63c7911f87343e6bdc82b 100644
(file)
--- a/
src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.h
+++ b/
src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.h
@@
-33,7
+33,9
@@
#include "lib/platform/threads/threads.h"
#include "lib/platform/util/buffer.h"
#include "lib/platform/threads/threads.h"
#include "lib/platform/util/buffer.h"
+#include "lib/platform/util/timeutils.h"
#include <map>
#include <map>
+#include "USBCECAdapterMessage.h"
namespace CEC
{
namespace CEC
{
@@
-82,6
+84,7
@@
namespace CEC
* @return True when it's a response, false otherwise.
*/
bool IsResponse(const CCECAdapterMessage &msg);
* @return True when it's a response, false otherwise.
*/
bool IsResponse(const CCECAdapterMessage &msg);
+ bool IsResponseOld(const CCECAdapterMessage &msg);
/*!
* @return The command that was sent in human readable form.
/*!
* @return The command that was sent in human readable form.
@@
-114,6
+117,13
@@
namespace CEC
*/
void Signal(void);
*/
void Signal(void);
+ bool ProvidesExtendedResponse(void);
+
+ /*!
+ * @return True when a fire and forget packet timed out or succeeded, false otherwise
+ */
+ bool TimedOutOrSucceeded(void) const;
+
CCECAdapterMessageQueue * m_queue;
CCECAdapterMessage * m_message; /**< the message that was sent */
uint8_t m_iPacketsLeft; /**< the amount of acks that we're waiting on */
CCECAdapterMessageQueue * m_queue;
CCECAdapterMessage * m_message; /**< the message that was sent */
uint8_t m_iPacketsLeft; /**< the amount of acks that we're waiting on */
@@
-121,6
+131,7
@@
namespace CEC
bool m_bWaiting; /**< true while a thread is waiting or when it hasn't started waiting yet */
PLATFORM::CCondition<bool> m_condition; /**< the condition to wait on */
PLATFORM::CMutex m_mutex; /**< mutex for changes to this class */
bool m_bWaiting; /**< true while a thread is waiting or when it hasn't started waiting yet */
PLATFORM::CCondition<bool> m_condition; /**< the condition to wait on */
PLATFORM::CMutex m_mutex; /**< mutex for changes to this class */
+ PLATFORM::CTimeout m_queueTimeout; /**< ack timeout for fire and forget commands */
};
class CCECAdapterMessageQueue : public PLATFORM::CThread
};
class CCECAdapterMessageQueue : public PLATFORM::CThread
@@
-162,8
+173,12
@@
namespace CEC
*/
bool Write(CCECAdapterMessage *msg);
*/
bool Write(CCECAdapterMessage *msg);
+ bool ProvidesExtendedResponse(void);
+
virtual void *Process(void);
virtual void *Process(void);
+ void CheckTimedOutMessages(void);
+
private:
CUSBCECAdapterCommunication * m_com; /**< the communication handler */
PLATFORM::CMutex m_mutex; /**< mutex for changes to this class */
private:
CUSBCECAdapterCommunication * m_com; /**< the communication handler */
PLATFORM::CMutex m_mutex; /**< mutex for changes to this class */