Skip to content

Commit d900fef

Browse files
committed
cm: communication: add communication interface
This patch adds a new communication interface to the cm module with API needed for storage state module. Signed-off-by: Mykhailo Lohvynenko <[email protected]>
1 parent ab1767a commit d900fef

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Copyright (C) 2025 EPAM Systems, Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#ifndef AOS_CM_COMMUNICATION_HPP_
8+
#define AOS_CM_COMMUNICATION_HPP_
9+
10+
#include "aos/common/cloudprotocol/state.hpp"
11+
#include "aos/common/types.hpp"
12+
13+
namespace aos::cm::communication {
14+
15+
/** @addtogroup cm Communication Manager
16+
* @{
17+
*/
18+
19+
/**
20+
* Communication interface.
21+
*/
22+
class CommunicationItf {
23+
public:
24+
/**
25+
* Sends instances new state.
26+
*
27+
* @param newState new state to send.
28+
* @return Error.
29+
*/
30+
virtual Error SendInstanceNewState(const cloudprotocol::NewState& newState) = 0;
31+
32+
/**
33+
* Sends instances update state.
34+
*
35+
* @param updateState update state to send.
36+
* @return Error.
37+
*/
38+
virtual Error SendInstanceStateRequest(const cloudprotocol::StateRequest& stateRequest) = 0;
39+
40+
/**
41+
* Destructor.
42+
*/
43+
virtual ~CommunicationItf() = default;
44+
};
45+
46+
} // namespace aos::cm::communication
47+
48+
#endif

0 commit comments

Comments
 (0)