Coverage Report

Created: 2026-02-14 06:19

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/opendnp3/cpp/lib/src/outstation/ReadHandler.h
Line
Count
Source
1
/*
2
 * Copyright 2013-2022 Step Function I/O, LLC
3
 *
4
 * Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O
5
 * LLC (https://stepfunc.io) under one or more contributor license agreements.
6
 * See the NOTICE file distributed with this work for additional information
7
 * regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license
8
 * this file to you under the Apache License, Version 2.0 (the "License"); you
9
 * may not use this file except in compliance with the License. You may obtain
10
 * a copy of the License at:
11
 *
12
 * http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing, software
15
 * distributed under the License is distributed on an "AS IS" BASIS,
16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
 * See the License for the specific language governing permissions and
18
 * limitations under the License.
19
 */
20
#ifndef OPENDNP3_READHANDLER_H
21
#define OPENDNP3_READHANDLER_H
22
23
#include "app/parsing/IAPDUHandler.h"
24
#include "outstation/IEventSelector.h"
25
#include "outstation/IStaticSelector.h"
26
27
#include "opendnp3/logging/Logger.h"
28
#include "opendnp3/outstation/StaticTypeBitfield.h"
29
30
namespace opendnp3
31
{
32
33
class ReadHandler final : public IAPDUHandler
34
{
35
public:
36
    ReadHandler(IStaticSelector& staticSelector, IEventSelector& eventSelector);
37
38
    bool IsAllowed(uint32_t headerCount, GroupVariation gv, QualifierCode qc) override final
39
95.8k
    {
40
95.8k
        return true;
41
95.8k
    }
42
43
private:
44
    IINField ProcessHeader(const AllObjectsHeader& header) override;
45
46
    IINField ProcessHeader(const RangeHeader& header) override;
47
48
    IINField ProcessHeader(const CountHeader& header) override;
49
50
    IINField ProcessHeader(const PrefixHeader& header, const ICollection<uint16_t>& indices) override;
51
52
    IStaticSelector* pStaticSelector;
53
    IEventSelector* pEventSelector;
54
};
55
56
} // namespace opendnp3
57
58
#endif