Matter SDK Coverage Report
Current view: top level - data-model-providers/codedriven/endpoint - EndpointInterface.h (source / functions) Coverage Total Hit
Test: SHA:48cc3057d373f5189d8404fd2bac3595e32b29b9 Lines: 100.0 % 1 1
Test Date: 2025-09-06 07:10:37 Functions: 50.0 % 2 1

            Line data    Source code
       1              : /*
       2              :  *    Copyright (c) 2025 Project CHIP Authors
       3              :  *    All rights reserved.
       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              : #pragma once
      18              : 
      19              : #include <app/data-model-provider/MetadataTypes.h>
      20              : #include <app/server-cluster/ServerClusterInterface.h>
      21              : #include <clusters/Descriptor/Structs.h>
      22              : #include <lib/core/DataModelTypes.h>
      23              : #include <lib/support/ReadOnlyBuffer.h>
      24              : 
      25              : namespace chip {
      26              : namespace app {
      27              : 
      28              : /**
      29              :  * @brief Defines the interface for an object that can provide information about a Matter endpoint.
      30              :  *
      31              :  * This interface is used describe the structure and capabilities of an endpoint, including its device
      32              :  * types, client clusters, server clusters, and semantic tags.
      33              :  *
      34              :  * Implementations of this interface are responsible for providing instances of ServerClusterInterface
      35              :  * for each server cluster they expose.
      36              :  */
      37              : class EndpointInterface
      38              : {
      39              : public:
      40          312 :     virtual ~EndpointInterface() = default;
      41              : 
      42              :     using SemanticTag = Clusters::Descriptor::Structs::SemanticTagStruct::Type;
      43              : 
      44              :     virtual CHIP_ERROR SemanticTags(ReadOnlyBufferBuilder<SemanticTag> & out) const = 0;
      45              : 
      46              :     virtual CHIP_ERROR DeviceTypes(ReadOnlyBufferBuilder<DataModel::DeviceTypeEntry> & out) const = 0;
      47              : 
      48              :     virtual CHIP_ERROR ClientClusters(ReadOnlyBufferBuilder<ClusterId> & out) const = 0;
      49              : 
      50              :     /**
      51              :      * @brief Populates the provided buffer with pointers to all ServerClusterInterface instances
      52              :      *        hosted on this endpoint. The returned pointers shall be valid as long as the
      53              :      *        EndpointInterface instance is valid.
      54              :      *
      55              :      * @param[out] out The buffer to fill with ServerClusterInterface pointers.
      56              :      * @return CHIP_NO_ERROR on success or CHIP_ERROR_NO_MEMORY if the buffer is too small.
      57              :      */
      58              : };
      59              : 
      60              : } // namespace app
      61              : } // namespace chip
        

Generated by: LCOV version 2.0-1