LCOV - code coverage report
Current view: top level - vnsw/agent/kstate - forwarding_class_kstate.cc (source / functions) Hit Total Coverage
Test: OpenSDN C/C++ coverage (all TARGET_SET jobs) Lines: 0 36 0.0 %
Date: 2026-11-09 02:10:49 Functions: 0 4 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
       3             :  * Copyright Contributors to the OpenSDN project
       4             :  */
       5             : 
       6             : #include "kstate.h"
       7             : #include "forwarding_class_kstate.h"
       8             : 
       9           0 : ForwardingClassKState::ForwardingClassKState(
      10             :         KForwardingClassResp *obj, const std::string &resp_ctx,
      11           0 :         vr_fc_map_req &req, int id) : KState(resp_ctx, obj) {
      12           0 :     std::vector<int16_t> l;
      13           0 :     l.push_back(id);
      14           0 :     req.set_fmr_id(l);
      15           0 :     if (id >= 0) {
      16           0 :         req.set_h_op(sandesh_op::GET);
      17             :     } else {
      18           0 :         req.set_h_op(sandesh_op::DUMP);
      19           0 :         l.clear(); l.push_back(-1);
      20           0 :         req.set_fmr_id(l);
      21           0 :         req.set_fmr_marker(-1);
      22             :     }
      23           0 : }
      24             : 
      25           0 : void ForwardingClassKState::SendNextRequest() {
      26           0 :     vr_fc_map_req req;
      27           0 :     req.set_h_op(sandesh_op::DUMP);
      28           0 :     int16_t id = boost::any_cast<int16_t>(more_context_);
      29           0 :     req.set_fmr_marker(id);
      30           0 :     EncodeAndSend(req);
      31           0 : }
      32             : 
      33           0 : void ForwardingClassKState::Handler() {
      34           0 :     KForwardingClassResp *resp = static_cast<KForwardingClassResp *>(response_object_);
      35           0 :     if (resp) {
      36           0 :         if (MoreData()) {
      37           0 :             SendResponse();
      38           0 :             SendNextRequest();
      39             :         } else {
      40           0 :             resp->set_context(response_context_);
      41           0 :             resp->Response();
      42           0 :             more_context_ = boost::any();
      43             :         }
      44             :     }
      45           0 : }
      46             : 
      47           0 : void ForwardingClassKState::SendResponse() {
      48           0 :     KForwardingClassResp *resp = static_cast<KForwardingClassResp *>(response_object_);
      49           0 :     resp->set_context(response_context_);
      50           0 :     resp->set_more(true);
      51           0 :     resp->Response();
      52           0 :     response_object_ = new KForwardingClassResp();
      53           0 : }

Generated by: LCOV version 1.14