/src/connectedhomeip/src/app/clusters/scenes-server/ExtensionFieldSets.h
Line | Count | Source (jump to first uncovered line) |
1 | | /** |
2 | | * |
3 | | * Copyright (c) 2023 Project CHIP Authors |
4 | | * |
5 | | * Licensed under the Apache License, Version 2.0 (the "License"); |
6 | | * you may not use this file except in compliance with the License. |
7 | | * You may obtain a copy of the License at |
8 | | * |
9 | | * http://www.apache.org/licenses/LICENSE-2.0 |
10 | | * |
11 | | * Unless required by applicable law or agreed to in writing, software |
12 | | * distributed under the License is distributed on an "AS IS" BASIS, |
13 | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
14 | | * See the License for the specific language governing permissions and |
15 | | * limitations under the License. |
16 | | */ |
17 | | |
18 | | #pragma once |
19 | | |
20 | | #include <lib/core/CHIPError.h> |
21 | | #include <lib/core/TLV.h> |
22 | | |
23 | | namespace chip { |
24 | | namespace scenes { |
25 | | |
26 | | static constexpr uint8_t kInvalidPosition = 0xff; |
27 | | static constexpr uint8_t kMaxClustersPerScene = CHIP_CONFIG_SCENES_MAX_CLUSTERS_PER_SCENE; |
28 | | static constexpr uint8_t kMaxFieldBytesPerCluster = CHIP_CONFIG_SCENES_MAX_EXTENSION_FIELDSET_SIZE_PER_CLUSTER; |
29 | | |
30 | | /// @brief A way to serialize and deserialize all cluster attribute data for a scene. |
31 | | class ExtensionFieldSets |
32 | | { |
33 | | public: |
34 | 0 | ExtensionFieldSets(){}; |
35 | 0 | virtual ~ExtensionFieldSets() = default; |
36 | | |
37 | | virtual CHIP_ERROR Serialize(TLV::TLVWriter & writer) const = 0; |
38 | | virtual CHIP_ERROR Deserialize(TLV::TLVReader & reader) = 0; |
39 | | virtual void Clear() = 0; |
40 | | virtual bool IsEmpty() const = 0; |
41 | | /// @brief Gets a count of how many initialized fields sets are in the object |
42 | | /// @return The number of initialized field sets the object |
43 | | /// @note Field set refers to extension field sets, from the scene cluster (see 1.4.6.2 ExtensionFieldSet in Matter Application |
44 | | /// Clusters) |
45 | | virtual uint8_t GetFieldSetCount() const = 0; |
46 | | }; |
47 | | } // namespace scenes |
48 | | } // namespace chip |