Matter SDK Coverage Report
Current view: top level - data-model-providers/codedriven/endpoint - EndpointInterface.h (source / functions) Coverage Total Hit
Test: SHA:2a48c1efeab1c0f76f3adb3a0940b0f7de706453 Lines: 100.0 % 1 1
Test Date: 2026-01-31 08:14:20 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/shared/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          309 :     virtual ~EndpointInterface() = default;
      41              : 
      42              :     using SemanticTag = Clusters::Globals::Structs::SemanticTagStruct::Type;
      43              : 
      44              :     virtual CHIP_ERROR DeviceTypes(ReadOnlyBufferBuilder<DataModel::DeviceTypeEntry> & out) const = 0;
      45              : 
      46              :     virtual CHIP_ERROR ClientClusters(ReadOnlyBufferBuilder<ClusterId> & out) const = 0;
      47              : 
      48              : /**
      49              :  * An implementation of the EndpointInterface MUST ensure that the underlying
      50              :  * data returned here remains valid for the lifetime of the implementation instance.
      51              :  * This is a non-owning view of the unique endpoint ID data.
      52              :  */
      53              : #if CHIP_CONFIG_USE_ENDPOINT_UNIQUE_ID
      54              :     virtual CharSpan EndpointUniqueID() const = 0;
      55              : #endif
      56              : };
      57              : 
      58              : } // namespace app
      59              : } // namespace chip
        

Generated by: LCOV version 2.0-1