[libcamera-devel,2/3] libcamera: ipa_proxy: Document ProxyState
diff mbox series

Message ID 20210413122534.342138-3-kieran.bingham@ideasonboard.com
State Accepted
Headers show
Series
  • Documentation cleanup
Related show

Commit Message

Kieran Bingham April 13, 2021, 12:25 p.m. UTC
The documentation for the ProxyState and tracking variable was not added
when the IPA was extended with a state machine.

Add it.

Fixes: 70238ceca5b2 ("utils: ipc: proxy: Track IPA with a state machine")
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 src/libcamera/ipa_proxy.cpp | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

Comments

Laurent Pinchart April 13, 2021, 5:45 p.m. UTC | #1
Hi Kieran,

Thank you for the patch.

On Tue, Apr 13, 2021 at 01:25:33PM +0100, Kieran Bingham wrote:
> The documentation for the ProxyState and tracking variable was not added
> when the IPA was extended with a state machine.
> 
> Add it.
> 
> Fixes: 70238ceca5b2 ("utils: ipc: proxy: Track IPA with a state machine")
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
>  src/libcamera/ipa_proxy.cpp | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp
> index ec4c2cc823c2..8608b0c92a87 100644
> --- a/src/libcamera/ipa_proxy.cpp
> +++ b/src/libcamera/ipa_proxy.cpp
> @@ -32,6 +32,18 @@ LOG_DEFINE_CATEGORY(IPAProxy)
>   * Isolate IPA into separate process.
>   */
>  
> +/**
> + * \enum IPAProxy::ProxyState
> + * \brief Identifies the available operational states of the proxy
> + *
> + * \var IPAProxy::ProxyStopped
> + * \brief The proxy is not active and only synchronous operations are permitted
> + * \var IPAProxy::ProxyStopping
> + * \brief No new tasks can be submitted to the proxy, however existing events can be completed

With a line wrap here,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> + * \var IPAProxy::ProxyRunning
> + * \brief The Proxy is active and asynchronous tasks may be queued
> + */
> +
>  /**
>   * \brief Construct an IPAProxy instance
>   * \param[in] ipam The IPA module
> @@ -213,4 +225,15 @@ std::string IPAProxy::resolvePath(const std::string &file) const
>   * construction.
>   */
>  
> +/**
> + * \var IPAProxy::state_
> + * \brief Current state of the IPAProxy
> + *
> + * The IPAProxy can be Running, Stopped, or Stopping.
> + *
> + * This state provides a means to ensure that asynchronous methods are only
> + * called while the proxy is running, and prevent new tasks being submitted
> + * while still enabling events to complete when the IPAProxy is stopping.
> + */
> +
>  } /* namespace libcamera */

Patch
diff mbox series

diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp
index ec4c2cc823c2..8608b0c92a87 100644
--- a/src/libcamera/ipa_proxy.cpp
+++ b/src/libcamera/ipa_proxy.cpp
@@ -32,6 +32,18 @@  LOG_DEFINE_CATEGORY(IPAProxy)
  * Isolate IPA into separate process.
  */
 
+/**
+ * \enum IPAProxy::ProxyState
+ * \brief Identifies the available operational states of the proxy
+ *
+ * \var IPAProxy::ProxyStopped
+ * \brief The proxy is not active and only synchronous operations are permitted
+ * \var IPAProxy::ProxyStopping
+ * \brief No new tasks can be submitted to the proxy, however existing events can be completed
+ * \var IPAProxy::ProxyRunning
+ * \brief The Proxy is active and asynchronous tasks may be queued
+ */
+
 /**
  * \brief Construct an IPAProxy instance
  * \param[in] ipam The IPA module
@@ -213,4 +225,15 @@  std::string IPAProxy::resolvePath(const std::string &file) const
  * construction.
  */
 
+/**
+ * \var IPAProxy::state_
+ * \brief Current state of the IPAProxy
+ *
+ * The IPAProxy can be Running, Stopped, or Stopping.
+ *
+ * This state provides a means to ensure that asynchronous methods are only
+ * called while the proxy is running, and prevent new tasks being submitted
+ * while still enabling events to complete when the IPAProxy is stopping.
+ */
+
 } /* namespace libcamera */