- bool SetSettingLogicalAddressMask(uint16_t iMask);
- bool GetSettingLogicalAddressMask(uint16_t &iMask);
-
- bool SetSettingPhysicalAddress(uint16_t iPhysicalAddress);
- bool GetSettingPhysicalAddress(uint16_t &iPhysicalAddress);
-
- bool SetSettingCECVersion(cec_version version);
- bool GetSettingCECVersion(cec_version &version);
+ private:
+ /*!
+ * @brief Clear all input bytes.
+ * @param iTimeout Timeout when anything was received.
+ */
+ void ClearInputBytes(uint32_t iTimeout = 1000);
+
+ /*!
+ * @brief Change the current CEC line timeout.
+ * @param iTimeout The new timeout.
+ * @return True when acked by the controller, false otherwise.
+ */
+ bool SetLineTimeout(uint8_t iTimeout);
+
+ /*!
+ * @brief Send a command to the controller and wait for an ack.
+ * @param msgCode The command to send.
+ * @param params The parameters to the command.
+ * @param bIsRetry True when this command is being retried, false otherwise.
+ * @return The message. Delete when done with it.
+ */
+ CCECAdapterMessage *SendCommand(cec_adapter_messagecode msgCode, CCECAdapterMessage ¶ms, bool bIsRetry = false);
+
+ /*!
+ * @brief Change the "initialised" status.
+ * @param bSetTo The new value.
+ */
+ void SetInitialised(bool bSetTo = true);
+
+ /*!
+ * @return True when initialised, false otherwise.
+ */
+ bool IsInitialised(void);
+
+ /*!
+ * @brief Pings the adapter, checks the firmware version and sets controlled mode.
+ * @param iTimeoutMs The timeout after which this fails if no proper data was received.
+ * @return True when the checks passed, false otherwise.
+ */
+ bool CheckAdapter(uint32_t iTimeoutMs = 10000);