Coverage Report

Created: 2024-02-08 06:10

/src/opendnp3/cpp/lib/src/gen/objects/Group1.cpp
Line
Count
Source (jump to first uncovered line)
1
//
2
//  _   _         ______    _ _ _   _             _ _ _
3
// | \ | |       |  ____|  | (_) | (_)           | | | |
4
// |  \| | ___   | |__   __| |_| |_ _ _ __   __ _| | | |
5
// | . ` |/ _ \  |  __| / _` | | __| | '_ \ / _` | | | |
6
// | |\  | (_) | | |___| (_| | | |_| | | | | (_| |_|_|_|
7
// |_| \_|\___/  |______\__,_|_|\__|_|_| |_|\__, (_|_|_)
8
//                                           __/ |
9
//                                          |___/
10
// 
11
// This file is auto-generated. Do not edit manually
12
// 
13
// Copyright 2013-2022 Step Function I/O, LLC
14
// 
15
// Licensed to Green Energy Corp (www.greenenergycorp.com) and Step Function I/O
16
// LLC (https://stepfunc.io) under one or more contributor license agreements.
17
// See the NOTICE file distributed with this work for additional information
18
// regarding copyright ownership. Green Energy Corp and Step Function I/O LLC license
19
// this file to you under the Apache License, Version 2.0 (the "License"); you
20
// may not use this file except in compliance with the License. You may obtain
21
// a copy of the License at:
22
// 
23
//   http://www.apache.org/licenses/LICENSE-2.0
24
// 
25
// Unless required by applicable law or agreed to in writing, software
26
// distributed under the License is distributed on an "AS IS" BASIS,
27
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28
// See the License for the specific language governing permissions and
29
// limitations under the License.
30
//
31
32
#include "Group1.h"
33
34
#include "app/parsing/DNPTimeParsing.h"
35
#include <ser4cpp/serialization/LittleEndian.h>
36
#include "app/MeasurementFactory.h"
37
#include "app/WriteConversions.h"
38
39
using namespace ser4cpp;
40
41
namespace opendnp3 {
42
43
// ------- Group1Var2 -------
44
45
Group1Var2::Group1Var2() : flags(0)
46
7.90k
{}
47
48
bool Group1Var2::Read(rseq_t& buffer, Group1Var2& output)
49
5.35k
{
50
5.35k
  return LittleEndian::read(buffer, output.flags);
51
5.35k
}
52
53
bool Group1Var2::Write(const Group1Var2& arg, ser4cpp::wseq_t& buffer)
54
2.55k
{
55
2.55k
  return LittleEndian::write(buffer, arg.flags);
56
2.55k
}
57
58
bool Group1Var2::ReadTarget(rseq_t& buff, Binary& output)
59
5.35k
{
60
5.35k
  Group1Var2 value;
61
5.35k
  if(Read(buff, value))
62
5.35k
  {
63
5.35k
    output = BinaryFactory::From(value.flags);
64
5.35k
    return true;
65
5.35k
  }
66
0
  else
67
0
  {
68
0
    return false;
69
0
  }
70
5.35k
}
71
72
bool Group1Var2::WriteTarget(const Binary& value, ser4cpp::wseq_t& buff)
73
2.55k
{
74
2.55k
  return Group1Var2::Write(ConvertGroup1Var2::Apply(value), buff);
75
2.55k
}
76
77
78
}