SSP21-CPP
IStack.h
Go to the documentation of this file.
1 #ifndef SSP21_ISTACK_H
2 #define SSP21_ISTACK_H
3 
4 /** @file
5  * @brief Interface ssp21::IStack.
6  */
7 
8 #include "ILowerLayer.h"
9 #include "IUpperLayer.h"
10 
11 namespace ssp21
12 {
13 
14 /**
15  * A stack provides both lower/upper layers and can be bound to provided lower/upper layers
16  */
17 class IStack
18 {
19 public:
20  virtual ~IStack() = default;
21 
22  /**
23  * @brief Retrieve the @ref ILowerLayer of the stack.
24  * @return Lower layer of the stack
25  *
26  * The user @ref IUpperLayer should interact with this layer.
27  */
28  virtual ILowerLayer& get_lower() = 0;
29 
30  /**
31  * @brief Retrieve the @ref IUpperLayer of the stack.
32  * @return Upper layer of the stack
33  *
34  * The user @ref ILowerLayer should interact with this layer.
35  */
36  virtual IUpperLayer& get_upper() = 0;
37 
38  /**
39  * @brief Bind the user layers to the protocol stack.
40  * @param lower Lower layer to bind
41  * @param upper Upper layer to bind
42  */
43  virtual void bind(ILowerLayer& lower, IUpperLayer& upper) = 0;
44 };
45 
46 }
47 
48 #endif
SSP21-cpp main namespace.
Definition: BufferTypes.h:12
Interface ssp21::ILowerLayer.
virtual IUpperLayer & get_upper()=0
Retrieve the IUpperLayer of the stack.
virtual ILowerLayer & get_lower()=0
Retrieve the ILowerLayer of the stack.
virtual void bind(ILowerLayer &lower, IUpperLayer &upper)=0
Bind the user layers to the protocol stack.
Interface ssp21::IUpperLayer.
Performs asynchronous RX/TX operations on behalf of an ILowerLayer.
Definition: IUpperLayer.h:17
Performs asynchronous RX/TX operations on behalf of an IUpperLayer.
Definition: ILowerLayer.h:19