DbcSignal.cpp
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2018 New Eagle
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of New Eagle nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 
36 
37 namespace NewEagle
38 {
40  uint8_t dlc,
41  double gain,
42  double offset,
43  uint8_t startBit,
44  ByteOrder endianness,
45  uint8_t length,
46  SignType sign,
47  std::string name,
48  MultiplexerMode multiplexerMode)
49  {
50  _dlc = dlc;
51  _gain = gain;
52  _offset = offset;
53  _startBit = startBit;
54  _endianness = endianness;
55  _length = length;
56  _sign = sign;
57  _name = name;
58  _multiplexerMode = multiplexerMode;
59  }
60 
62  uint8_t dlc,
63  double gain,
64  double offset,
65  uint8_t startBit,
66  ByteOrder endianness,
67  uint8_t length,
68  SignType sign,
69  std::string name,
70  MultiplexerMode multiplexerMode,
71  int32_t multiplexerSwitch)
72  {
73  _dlc = dlc;
74  _gain = gain;
75  _offset = offset;
76  _startBit = startBit;
77  _endianness = endianness;
78  _length = length;
79  _sign = sign;
80  _name = name;
81  _multiplexerMode = multiplexerMode;
82  _multiplexerSwitch = multiplexerSwitch;
83  }
84 
86  {
87  }
88 
89  uint8_t DbcSignal::GetDlc() const
90  {
91  return _dlc;
92  }
93 
94  double DbcSignal::GetResult() const
95  {
96  return _result;
97  }
98 
99  double DbcSignal::GetGain() const
100  {
101  return _gain;
102  }
103 
104  double DbcSignal::GetOffset() const
105  {
106  return _offset;
107  }
108 
109  uint8_t DbcSignal::GetStartBit() const
110  {
111  return _startBit;
112  }
113 
115  {
116  return _endianness;
117  }
118 
119  uint8_t DbcSignal::GetLength() const
120  {
121  return _length;
122  }
123 
125  {
126  return _sign;
127  }
128 
129  std::string DbcSignal::GetName() const
130  {
131  return _name;
132  }
133 
134  void DbcSignal::SetResult(double result)
135  {
136  _result = result;
137  }
138 
140  {
141  _comment = comment;
142  }
143 
144  void DbcSignal::SetInitialValue(double value)
145  {
146  _initialValue = value;
147  }
149  {
150  return _initialValue;
151  }
152 
154  {
155  _type = type;
156  }
157 
159  {
160  return _type;
161  }
162 
164  {
165  return _multiplexerMode;
166  }
167 
168  int32_t DbcSignal::GetMultiplexerSwitch() const
169  {
170  return _multiplexerSwitch;
171  }
172 }
NewEagle::DbcSignal::SetInitialValue
void SetInitialValue(double value)
Definition: DbcSignal.cpp:176
NewEagle::DbcSignal::SetComment
void SetComment(NewEagle::DbcSignalComment comment)
Definition: DbcSignal.cpp:171
NewEagle::DataType
DataType
Definition: DbcSignal.h:95
NewEagle::DbcSignal::GetMultiplexerMode
MultiplexerMode GetMultiplexerMode() const
Definition: DbcSignal.cpp:195
NewEagle::DbcSignal::_result
double _result
Definition: DbcSignal.h:156
NewEagle::DbcSignal::_length
uint8_t _length
Definition: DbcSignal.h:161
NewEagle::DbcSignal::_type
DataType _type
Definition: DbcSignal.h:166
NewEagle::DbcSignalComment
Definition: DbcSignal.h:76
NewEagle::DbcSignal::_endianness
ByteOrder _endianness
Definition: DbcSignal.h:160
NewEagle::DbcSignal::GetDlc
uint8_t GetDlc() const
Definition: DbcSignal.cpp:121
NewEagle
Definition: Dbc.h:45
NewEagle::DbcSignal::DbcSignal
DbcSignal(uint8_t dlc, double gain, double offset, uint8_t startBit, ByteOrder endianness, uint8_t length, SignType sign, std::string name, MultiplexerMode multiplexerMode)
Definition: DbcSignal.cpp:71
DbcSignal.h
NewEagle::DbcSignal::GetResult
double GetResult() const
Definition: DbcSignal.cpp:126
NewEagle::MultiplexerMode
MultiplexerMode
Definition: DbcSignal.h:102
NewEagle::ByteOrder
ByteOrder
Definition: DbcSignal.h:89
NewEagle::DbcSignal::GetName
std::string GetName() const
Definition: DbcSignal.cpp:161
NewEagle::SignType
SignType
Definition: DbcSignal.h:83
NewEagle::DbcSignal::_dlc
uint8_t _dlc
Definition: DbcSignal.h:155
NewEagle::DbcSignal::GetDataType
DataType GetDataType()
Definition: DbcSignal.cpp:190
NewEagle::DbcSignal::SetDataType
void SetDataType(DataType type)
Definition: DbcSignal.cpp:185
NewEagle::DbcSignal::GetOffset
double GetOffset() const
Definition: DbcSignal.cpp:136
NewEagle::DbcSignal::_sign
SignType _sign
Definition: DbcSignal.h:162
NewEagle::DbcSignal::GetGain
double GetGain() const
Definition: DbcSignal.cpp:131
NewEagle::DbcSignal::_initialValue
double _initialValue
Definition: DbcSignal.h:165
NewEagle::DbcSignal::_multiplexerSwitch
int32_t _multiplexerSwitch
Definition: DbcSignal.h:168
NewEagle::DbcSignal::_multiplexerMode
MultiplexerMode _multiplexerMode
Definition: DbcSignal.h:167
NewEagle::DbcSignal::GetStartBit
uint8_t GetStartBit() const
Definition: DbcSignal.cpp:141
NewEagle::DbcSignal::~DbcSignal
~DbcSignal()
Definition: DbcSignal.cpp:117
NewEagle::DbcSignal::GetSign
SignType GetSign() const
Definition: DbcSignal.cpp:156
NewEagle::DbcSignal::GetEndianness
ByteOrder GetEndianness() const
Definition: DbcSignal.cpp:146
NewEagle::DbcSignal::GetLength
uint8_t GetLength() const
Definition: DbcSignal.cpp:151
NewEagle::DbcSignal::SetResult
void SetResult(double result)
Definition: DbcSignal.cpp:166
NewEagle::DbcSignal::_gain
double _gain
Definition: DbcSignal.h:157
NewEagle::DbcSignal::_offset
double _offset
Definition: DbcSignal.h:158
NewEagle::DbcSignal::_comment
NewEagle::DbcSignalComment _comment
Definition: DbcSignal.h:164
NewEagle::DbcSignal::_name
std::string _name
Definition: DbcSignal.h:163
NewEagle::DbcSignal::_startBit
uint8_t _startBit
Definition: DbcSignal.h:159
NewEagle::DbcSignal::GetInitialValue
double GetInitialValue()
Definition: DbcSignal.cpp:180
NewEagle::DbcSignal::GetMultiplexerSwitch
int32_t GetMultiplexerSwitch() const
Definition: DbcSignal.cpp:200


can_dbc_parser
Author(s): Ryan Borchert
autogenerated on Sat Apr 9 2022 02:34:32