LCOV - code coverage report
Current view: top level - server/entity_manager - client_entity.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 1 1
Test Date: 2026-08-12 11:05:07 Functions: 50.0 % 2 1

            Line data    Source code
       1              : /**
       2              :  * Copyright (c) 2025 Huawei Technologies Co., Ltd.
       3              :  * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
       4              :  * CANN Open Software License Agreement Version 2.0 (the "License").
       5              :  * Please refer to the License for details. You may not use this file except in compliance with the License.
       6              :  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
       7              :  * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
       8              :  * See LICENSE in the root of the software repository for the full text of the License.
       9              :  */
      10              : 
      11              : #ifndef DGW_CLIENT_ENTITY_H
      12              : #define DGW_CLIENT_ENTITY_H
      13              : 
      14              : #include "simple_entity.h"
      15              : 
      16              : namespace dgw {
      17              : class ClientEntity : public SimpleEntity {
      18              : public:
      19              :     explicit ClientEntity(const EntityMaterial& material, const uint32_t resIndex);
      20           30 :     virtual ~ClientEntity() = default;
      21              :     ClientEntity(const ClientEntity&) = delete;
      22              :     ClientEntity(const ClientEntity&&) = delete;
      23              :     ClientEntity& operator=(const ClientEntity&) = delete;
      24              :     ClientEntity& operator=(ClientEntity&&) = delete;
      25              : 
      26              :     FsmStatus DoDequeueMbuf(void** mbufPtr) const override;
      27              :     FsmStatus ResetSrcState() override;
      28              :     void ResetSrcSubState() override;
      29              :     bool IsDataPeeked() const override;
      30              : 
      31              : protected:
      32              :     FsmStatus DoDequeue() override;
      33              :     Mbuf* PrepareMbufToPush(DataObjPtr dataObj) const override;
      34              :     FsmStatus DoSendData(Mbuf* const mbuf) override;
      35              :     void DoClientDequeue();
      36              :     FsmStatus FillMbufWithDeque(const uint64_t deqLen, Mbuf* const mbuf) const;
      37              :     FsmStatus DoClientEnqueue(Mbuf* const mbuf);
      38              :     FsmStatus DoEnqueueMbuf(Mbuf* const mbuf) const;
      39              :     void InvokeDequeThread();
      40              :     void InvokeEnqueThread(Mbuf* const mbuf);
      41              : 
      42              :     AsyncDataState asyncDataState_;
      43              : };
      44              : } // namespace dgw
      45              : #endif
        

Generated by: LCOV version 2.0-1