Coverage Report

Created: 2025-10-10 06:37

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/opendnp3/cpp/lib/src/gen/objects/Group43.cpp
Line
Count
Source
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 "Group43.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
// ------- Group43Var1 -------
44
45
3.97k
Group43Var1::Group43Var1() : status(0), value(0)
46
3.97k
{}
47
48
bool Group43Var1::Read(rseq_t& buffer, Group43Var1& output)
49
3.97k
{
50
3.97k
  return LittleEndian::read(buffer, output.status, output.value);
51
3.97k
}
52
53
bool Group43Var1::Write(const Group43Var1& arg, ser4cpp::wseq_t& buffer)
54
0
{
55
0
  return LittleEndian::write(buffer, arg.status, arg.value);
56
0
}
57
58
bool Group43Var1::ReadTarget(rseq_t& buff, AnalogCommandEvent& output)
59
3.97k
{
60
3.97k
  Group43Var1 value;
61
3.97k
  if(Read(buff, value))
62
3.97k
  {
63
3.97k
    output = AnalogCommandEventFactory::From(value.status, value.value);
64
3.97k
    return true;
65
3.97k
  }
66
0
  else
67
0
  {
68
0
    return false;
69
0
  }
70
3.97k
}
71
72
bool Group43Var1::WriteTarget(const AnalogCommandEvent& value, ser4cpp::wseq_t& buff)
73
0
{
74
0
  return Group43Var1::Write(ConvertGroup43Var1::Apply(value), buff);
75
0
}
76
77
// ------- Group43Var2 -------
78
79
2.89k
Group43Var2::Group43Var2() : status(0), value(0)
80
2.89k
{}
81
82
bool Group43Var2::Read(rseq_t& buffer, Group43Var2& output)
83
2.89k
{
84
2.89k
  return LittleEndian::read(buffer, output.status, output.value);
85
2.89k
}
86
87
bool Group43Var2::Write(const Group43Var2& arg, ser4cpp::wseq_t& buffer)
88
0
{
89
0
  return LittleEndian::write(buffer, arg.status, arg.value);
90
0
}
91
92
bool Group43Var2::ReadTarget(rseq_t& buff, AnalogCommandEvent& output)
93
2.89k
{
94
2.89k
  Group43Var2 value;
95
2.89k
  if(Read(buff, value))
96
2.89k
  {
97
2.89k
    output = AnalogCommandEventFactory::From(value.status, value.value);
98
2.89k
    return true;
99
2.89k
  }
100
0
  else
101
0
  {
102
0
    return false;
103
0
  }
104
2.89k
}
105
106
bool Group43Var2::WriteTarget(const AnalogCommandEvent& value, ser4cpp::wseq_t& buff)
107
0
{
108
0
  return Group43Var2::Write(ConvertGroup43Var2::Apply(value), buff);
109
0
}
110
111
// ------- Group43Var3 -------
112
113
1.41k
Group43Var3::Group43Var3() : status(0), value(0), time(0)
114
1.41k
{}
115
116
bool Group43Var3::Read(rseq_t& buffer, Group43Var3& output)
117
1.41k
{
118
1.41k
  return LittleEndian::read(buffer, output.status, output.value, output.time);
119
1.41k
}
120
121
bool Group43Var3::Write(const Group43Var3& arg, ser4cpp::wseq_t& buffer)
122
0
{
123
0
  return LittleEndian::write(buffer, arg.status, arg.value, arg.time);
124
0
}
125
126
bool Group43Var3::ReadTarget(rseq_t& buff, AnalogCommandEvent& output)
127
1.41k
{
128
1.41k
  Group43Var3 value;
129
1.41k
  if(Read(buff, value))
130
1.41k
  {
131
1.41k
    output = AnalogCommandEventFactory::From(value.status, value.value, value.time);
132
1.41k
    return true;
133
1.41k
  }
134
0
  else
135
0
  {
136
0
    return false;
137
0
  }
138
1.41k
}
139
140
bool Group43Var3::WriteTarget(const AnalogCommandEvent& value, ser4cpp::wseq_t& buff)
141
0
{
142
0
  return Group43Var3::Write(ConvertGroup43Var3::Apply(value), buff);
143
0
}
144
145
// ------- Group43Var4 -------
146
147
1.82k
Group43Var4::Group43Var4() : status(0), value(0), time(0)
148
1.82k
{}
149
150
bool Group43Var4::Read(rseq_t& buffer, Group43Var4& output)
151
1.82k
{
152
1.82k
  return LittleEndian::read(buffer, output.status, output.value, output.time);
153
1.82k
}
154
155
bool Group43Var4::Write(const Group43Var4& arg, ser4cpp::wseq_t& buffer)
156
0
{
157
0
  return LittleEndian::write(buffer, arg.status, arg.value, arg.time);
158
0
}
159
160
bool Group43Var4::ReadTarget(rseq_t& buff, AnalogCommandEvent& output)
161
1.82k
{
162
1.82k
  Group43Var4 value;
163
1.82k
  if(Read(buff, value))
164
1.82k
  {
165
1.82k
    output = AnalogCommandEventFactory::From(value.status, value.value, value.time);
166
1.82k
    return true;
167
1.82k
  }
168
0
  else
169
0
  {
170
0
    return false;
171
0
  }
172
1.82k
}
173
174
bool Group43Var4::WriteTarget(const AnalogCommandEvent& value, ser4cpp::wseq_t& buff)
175
0
{
176
0
  return Group43Var4::Write(ConvertGroup43Var4::Apply(value), buff);
177
0
}
178
179
// ------- Group43Var5 -------
180
181
2.97k
Group43Var5::Group43Var5() : status(0), value(0.0)
182
2.97k
{}
183
184
bool Group43Var5::Read(rseq_t& buffer, Group43Var5& output)
185
2.97k
{
186
2.97k
  return LittleEndian::read(buffer, output.status, output.value);
187
2.97k
}
188
189
bool Group43Var5::Write(const Group43Var5& arg, ser4cpp::wseq_t& buffer)
190
0
{
191
0
  return LittleEndian::write(buffer, arg.status, arg.value);
192
0
}
193
194
bool Group43Var5::ReadTarget(rseq_t& buff, AnalogCommandEvent& output)
195
2.97k
{
196
2.97k
  Group43Var5 value;
197
2.97k
  if(Read(buff, value))
198
2.97k
  {
199
2.97k
    output = AnalogCommandEventFactory::From(value.status, value.value);
200
2.97k
    return true;
201
2.97k
  }
202
0
  else
203
0
  {
204
0
    return false;
205
0
  }
206
2.97k
}
207
208
bool Group43Var5::WriteTarget(const AnalogCommandEvent& value, ser4cpp::wseq_t& buff)
209
0
{
210
0
  return Group43Var5::Write(ConvertGroup43Var5::Apply(value), buff);
211
0
}
212
213
// ------- Group43Var6 -------
214
215
1.71k
Group43Var6::Group43Var6() : status(0), value(0.0)
216
1.71k
{}
217
218
bool Group43Var6::Read(rseq_t& buffer, Group43Var6& output)
219
1.71k
{
220
1.71k
  return LittleEndian::read(buffer, output.status, output.value);
221
1.71k
}
222
223
bool Group43Var6::Write(const Group43Var6& arg, ser4cpp::wseq_t& buffer)
224
0
{
225
0
  return LittleEndian::write(buffer, arg.status, arg.value);
226
0
}
227
228
bool Group43Var6::ReadTarget(rseq_t& buff, AnalogCommandEvent& output)
229
1.71k
{
230
1.71k
  Group43Var6 value;
231
1.71k
  if(Read(buff, value))
232
1.71k
  {
233
1.71k
    output = AnalogCommandEventFactory::From(value.status, value.value);
234
1.71k
    return true;
235
1.71k
  }
236
0
  else
237
0
  {
238
0
    return false;
239
0
  }
240
1.71k
}
241
242
bool Group43Var6::WriteTarget(const AnalogCommandEvent& value, ser4cpp::wseq_t& buff)
243
0
{
244
0
  return Group43Var6::Write(ConvertGroup43Var6::Apply(value), buff);
245
0
}
246
247
// ------- Group43Var7 -------
248
249
1.37k
Group43Var7::Group43Var7() : status(0), value(0.0), time(0)
250
1.37k
{}
251
252
bool Group43Var7::Read(rseq_t& buffer, Group43Var7& output)
253
1.37k
{
254
1.37k
  return LittleEndian::read(buffer, output.status, output.value, output.time);
255
1.37k
}
256
257
bool Group43Var7::Write(const Group43Var7& arg, ser4cpp::wseq_t& buffer)
258
0
{
259
0
  return LittleEndian::write(buffer, arg.status, arg.value, arg.time);
260
0
}
261
262
bool Group43Var7::ReadTarget(rseq_t& buff, AnalogCommandEvent& output)
263
1.37k
{
264
1.37k
  Group43Var7 value;
265
1.37k
  if(Read(buff, value))
266
1.37k
  {
267
1.37k
    output = AnalogCommandEventFactory::From(value.status, value.value, value.time);
268
1.37k
    return true;
269
1.37k
  }
270
0
  else
271
0
  {
272
0
    return false;
273
0
  }
274
1.37k
}
275
276
bool Group43Var7::WriteTarget(const AnalogCommandEvent& value, ser4cpp::wseq_t& buff)
277
0
{
278
0
  return Group43Var7::Write(ConvertGroup43Var7::Apply(value), buff);
279
0
}
280
281
// ------- Group43Var8 -------
282
283
1.62k
Group43Var8::Group43Var8() : status(0), value(0.0), time(0)
284
1.62k
{}
285
286
bool Group43Var8::Read(rseq_t& buffer, Group43Var8& output)
287
1.62k
{
288
1.62k
  return LittleEndian::read(buffer, output.status, output.value, output.time);
289
1.62k
}
290
291
bool Group43Var8::Write(const Group43Var8& arg, ser4cpp::wseq_t& buffer)
292
0
{
293
0
  return LittleEndian::write(buffer, arg.status, arg.value, arg.time);
294
0
}
295
296
bool Group43Var8::ReadTarget(rseq_t& buff, AnalogCommandEvent& output)
297
1.62k
{
298
1.62k
  Group43Var8 value;
299
1.62k
  if(Read(buff, value))
300
1.62k
  {
301
1.62k
    output = AnalogCommandEventFactory::From(value.status, value.value, value.time);
302
1.62k
    return true;
303
1.62k
  }
304
0
  else
305
0
  {
306
0
    return false;
307
0
  }
308
1.62k
}
309
310
bool Group43Var8::WriteTarget(const AnalogCommandEvent& value, ser4cpp::wseq_t& buff)
311
0
{
312
0
  return Group43Var8::Write(ConvertGroup43Var8::Apply(value), buff);
313
0
}
314
315
316
}