GCC Code Coverage Report


Directory: ./
File: pdserv-1.1.0/src/msrproto/Parameter.h
Date: 2024-12-01 04:08:21
Exec Total Coverage
Lines: 0 1 0.0%
Branches: 0 0 -%

Line Branch Exec Source
1 /*****************************************************************************
2 *
3 * $Id$
4 *
5 * Copyright 2010 Richard Hacker (lerichi at gmx dot net)
6 *
7 * This file is part of the pdserv library.
8 *
9 * The pdserv library is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License as published
11 * by the Free Software Foundation, either version 3 of the License, or (at
12 * your option) any later version.
13 *
14 * The pdserv library is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 * License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with the pdserv library. If not, see <http://www.gnu.org/licenses/>.
21 *
22 *****************************************************************************/
23
24 #ifndef MSRPARAMETER_H
25 #define MSRPARAMETER_H
26
27 #include <string>
28 #include <vector>
29 #include "Variable.h"
30
31 namespace PdServ {
32 class Parameter;
33 class DataType;
34 }
35
36 namespace MsrProto {
37
38 class Session;
39 class XmlElement;
40 class ostream;
41
42 class Parameter: public Variable {
43 public:
44 Parameter(const PdServ::Parameter *p, size_t index,
45 const PdServ::DataType& dtype,
46 const PdServ::DataType::DimType& dim,
47 size_t offset, Parameter *parent);
48
49 void setXmlAttributes(XmlElement&, const char *buf,
50 struct timespec const& ts, bool shortReply,
51 bool hex, size_t precision) const;
52
53 int setHexValue(const Session *,
54 const char *str, size_t startindex, size_t &count) const;
55 int setDoubleValue(const Session *,
56 const char *, size_t startindex, size_t &count) const;
57
58 const PdServ::Parameter * const mainParam;
59
60 private:
61 const bool dependent;
62
63 int setElements(std::istream& is,
64 const PdServ::DataType& dtype,
65 const PdServ::DataType::DimType& dim,
66 char *&buf, size_t& count) const;
67 };
68
69 }
70
71 #endif //MSRPARAMETER_H
72