Coverage Report

Created: 2026-03-15 06:44

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/opendnp3/cpp/lib/src/decoder/Decoder.cpp
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
#include "opendnp3/decoder/Decoder.h"
21
22
#include "decoder/DecoderImpl.h"
23
24
namespace opendnp3
25
{
26
27
6.90k
Decoder::Decoder(IDecoderCallbacks& callbacks, const Logger& logger) : impl(new DecoderImpl(callbacks, logger)) {}
28
29
void Decoder::DecodeLPDU(const Buffer& data)
30
6.90k
{
31
6.90k
    ser4cpp::rseq_t rseqData(data.data, data.length);
32
6.90k
    impl->DecodeLPDU(rseqData);
33
6.90k
}
34
35
void Decoder::DecodeTPDU(const Buffer& data)
36
0
{
37
0
    ser4cpp::rseq_t rseqData(data.data, data.length);
38
0
    impl->DecodeTPDU(rseqData);
39
0
}
40
41
void Decoder::DecodeAPDU(const Buffer& data)
42
0
{
43
0
    ser4cpp::rseq_t rseqData(data.data, data.length);
44
0
    impl->DecodeAPDU(rseqData);
45
0
}
46
47
Decoder::~Decoder()
48
6.90k
{
49
6.90k
    delete impl;
50
6.90k
}
51
52
} // namespace opendnp3