/src/connectedhomeip/examples/energy-management-app/energy-management-common/energy-evse/include/EnergyEvseManager.h
Line | Count | Source |
1 | | /* |
2 | | * |
3 | | * Copyright (c) 2023-2024 Project CHIP Authors |
4 | | * All rights reserved. |
5 | | * |
6 | | * Licensed under the Apache License, Version 2.0 (the "License"); |
7 | | * you may not use this file except in compliance with the License. |
8 | | * You may obtain a copy of the License at |
9 | | * |
10 | | * http://www.apache.org/licenses/LICENSE-2.0 |
11 | | * |
12 | | * Unless required by applicable law or agreed to in writing, software |
13 | | * distributed under the License is distributed on an "AS IS" BASIS, |
14 | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
15 | | * See the License for the specific language governing permissions and |
16 | | * limitations under the License. |
17 | | */ |
18 | | |
19 | | #pragma once |
20 | | |
21 | | #include <EnergyEvseDelegateImpl.h> |
22 | | #include <app/clusters/energy-evse-server/energy-evse-server.h> |
23 | | #include <app/util/af-types.h> |
24 | | #include <lib/core/CHIPError.h> |
25 | | |
26 | | namespace chip { |
27 | | namespace app { |
28 | | namespace Clusters { |
29 | | namespace EnergyEvse { |
30 | | |
31 | | class EnergyEvseManager : public Instance |
32 | | { |
33 | | public: |
34 | | EnergyEvseManager(EndpointId aEndpointId, EnergyEvseDelegate & aDelegate, Feature aFeature, OptionalAttributes aOptionalAttrs, |
35 | | OptionalCommands aOptionalCmds) : |
36 | 1 | EnergyEvse::Instance(aEndpointId, aDelegate, aFeature, aOptionalAttrs, aOptionalCmds) |
37 | 1 | { |
38 | 1 | mDelegate = &aDelegate; |
39 | 1 | } |
40 | | |
41 | | // Delete copy constructor and assignment operator. |
42 | | EnergyEvseManager(const EnergyEvseManager &) = delete; |
43 | | EnergyEvseManager(const EnergyEvseManager &&) = delete; |
44 | | EnergyEvseManager & operator=(const EnergyEvseManager &) = delete; |
45 | | |
46 | | CHIP_ERROR Init(); |
47 | | void Shutdown(); |
48 | | |
49 | | CHIP_ERROR LoadPersistentAttributes(); |
50 | | |
51 | 1 | EnergyEvseDelegate * GetDelegate() { return mDelegate; }; |
52 | | |
53 | | private: |
54 | | EnergyEvseDelegate * mDelegate; |
55 | | }; |
56 | | |
57 | | } // namespace EnergyEvse |
58 | | } // namespace Clusters |
59 | | } // namespace app |
60 | | } // namespace chip |