RequestBase.h
Go to the documentation of this file.
1 #pragma once
2 
4 {
5  /**
6  * @class RequestBase
7  * @ingroup Library-ethercat
8  * @brief Brief description of class RequestBase.
9  *
10  * Detailed description of class RequestBase.
11  */
13  {
14  public:
15  virtual ~RequestBase() = default;
16  /*!
17  * \brief Check whether this request has been processed.
18  * \retval true if this request has been processed
19  * \retval false if this request is yet to be processed
20  */
21  bool
22  isProcessed() const
23  {
24  return requestProcessed;
25  }
26 
27  /*!
28  * \brief Signal that this request has been processed.
29  *
30  * To be used by the request handler.
31  */
32  void
34  {
35  requestProcessed = true;
36  }
37 
38  /*!
39  * \brief Check whether this request has been processed.
40  * \retval true if this request has been processed
41  * \retval false if this request is yet to be processed
42  */
43  bool
44  hasFailed() const
45  {
46  return requestFailed;
47  }
48 
49  /*!
50  * \brief Signal that this request has failed.
51  *
52  * To be used by the request handler.
53  */
54  void
56  {
57  requestFailed = true;
58  }
59 
60  private:
61  bool requestProcessed = false;
62  bool requestFailed = false;
63  };
64 } // namespace armarx::control::ethercat
armarx::control::ethercat::RequestBase::~RequestBase
virtual ~RequestBase()=default
armarx::control::ethercat
Definition: Bus.cpp:24
armarx::control::ethercat::RequestBase::hasFailed
bool hasFailed() const
Check whether this request has been processed.
Definition: RequestBase.h:44
armarx::control::ethercat::RequestBase::setProcessed
void setProcessed()
Signal that this request has been processed.
Definition: RequestBase.h:33
armarx::control::ethercat::RequestBase::isProcessed
bool isProcessed() const
Check whether this request has been processed.
Definition: RequestBase.h:22
armarx::control::ethercat::RequestBase
Brief description of class RequestBase.
Definition: RequestBase.h:12
armarx::control::ethercat::RequestBase::setFailed
void setFailed()
Signal that this request has failed.
Definition: RequestBase.h:55