-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclass_bms_device.tex
179 lines (165 loc) · 8.89 KB
/
class_bms_device.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
\hypertarget{class_bms_device}{}\section{Bms\+Device Class Reference}
\label{class_bms_device}\index{Bms\+Device@{Bms\+Device}}
{\ttfamily \#include $<$Bms\+Device.\+h$>$}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item
\hyperlink{class_bms_device_aba102aa7de2c504017d67bc6c24dae39}{Bms\+Device} (byte device\+\_\+address)
\item
double \hyperlink{class_bms_device_ac61154d9b8cc11061dcc7d0243ed955f}{get\+Temperature} (byte temperature\+To\+Read) const
\item
double \hyperlink{class_bms_device_a8b11a6a96bc0634e14bb7847b448bab6}{get\+Gpai\+Vbatt} (bool dev) const
\item
int \hyperlink{class_bms_device_a0bdebab046f8337914ba88fdd20da1bd}{get\+Cell\+Voltage} (byte cell\+Number) const
\item
byte $\ast$ \hyperlink{class_bms_device_ad72700d4da6cc7d6ef52e76091ab9d9a}{get\+Status} () const
\item
void \hyperlink{class_bms_device_af711c0fbff46642d525c63a668cb7a2d}{set\+Status} (byte value) const
\item
void \hyperlink{class_bms_device_a99aeb3676c9732e8a22d8561b5dde254}{clear\+Alerts} () const
\item
void \hyperlink{class_bms_device_a20e255789e1b0d8d16059c8ab1ac32dd}{clear\+Faults} () const
\item
byte $\ast$ \hyperlink{class_bms_device_ae21dd2360edf7b3f21e2086315ddecfb}{read\+Register} (byte reg\+Address, byte length) const
\item
void \hyperlink{class_bms_device_a7c37cd79623465ddee0f1b4d6be0e86c}{write\+Register} (byte reg\+Address, byte reg\+Data) const
\end{DoxyCompactItemize}
\subsection{Detailed Description}
Copyright 2016 -\/ 2017 Race\+Up Team Unipd
Licensed under the Apache License, Version 2.\+0 (the \char`\"{}\+License\char`\"{}); you may not use this file except in compliance with the License. You may obtain a copy of the License at
\href{http://www.apache.org/licenses/LICENSE-2.0}{\tt http\+://www.\+apache.\+org/licenses/\+L\+I\+C\+E\+N\+S\+E-\/2.\+0}
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \char`\"{}\+A\+S I\+S\char`\"{} B\+A\+S\+IS, W\+I\+T\+H\+O\+UT W\+A\+R\+R\+A\+N\+T\+I\+ES OR C\+O\+N\+D\+I\+T\+I\+O\+NS OF A\+NY K\+I\+ND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Manages a B\+MS device
\subsection{Constructor \& Destructor Documentation}
\index{Bms\+Device@{Bms\+Device}!Bms\+Device@{Bms\+Device}}
\index{Bms\+Device@{Bms\+Device}!Bms\+Device@{Bms\+Device}}
\subsubsection[{\texorpdfstring{Bms\+Device(byte device\+\_\+address)}{BmsDevice(byte device_address)}}]{\setlength{\rightskip}{0pt plus 5cm}Bms\+Device\+::\+Bms\+Device (
\begin{DoxyParamCaption}
\item[{byte}]{device\+\_\+address}
\end{DoxyParamCaption}
)}\hypertarget{class_bms_device_aba102aa7de2c504017d67bc6c24dae39}{}\label{class_bms_device_aba102aa7de2c504017d67bc6c24dae39}
New bms device
\begin{DoxyParams}{Parameters}
{\em device\+\_\+address} & byte device\+\_\+address \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
new bms device
\end{DoxyReturn}
\subsection{Member Function Documentation}
\index{Bms\+Device@{Bms\+Device}!clear\+Alerts@{clear\+Alerts}}
\index{clear\+Alerts@{clear\+Alerts}!Bms\+Device@{Bms\+Device}}
\subsubsection[{\texorpdfstring{clear\+Alerts() const }{clearAlerts() const }}]{\setlength{\rightskip}{0pt plus 5cm}void Bms\+Device\+::clear\+Alerts (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}\hypertarget{class_bms_device_a99aeb3676c9732e8a22d8561b5dde254}{}\label{class_bms_device_a99aeb3676c9732e8a22d8561b5dde254}
Send alert on behalf of this bms \index{Bms\+Device@{Bms\+Device}!clear\+Faults@{clear\+Faults}}
\index{clear\+Faults@{clear\+Faults}!Bms\+Device@{Bms\+Device}}
\subsubsection[{\texorpdfstring{clear\+Faults() const }{clearFaults() const }}]{\setlength{\rightskip}{0pt plus 5cm}void Bms\+Device\+::clear\+Faults (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}\hypertarget{class_bms_device_a20e255789e1b0d8d16059c8ab1ac32dd}{}\label{class_bms_device_a20e255789e1b0d8d16059c8ab1ac32dd}
Send fault on behalf of this device \index{Bms\+Device@{Bms\+Device}!get\+Cell\+Voltage@{get\+Cell\+Voltage}}
\index{get\+Cell\+Voltage@{get\+Cell\+Voltage}!Bms\+Device@{Bms\+Device}}
\subsubsection[{\texorpdfstring{get\+Cell\+Voltage(byte cell\+Number) const }{getCellVoltage(byte cellNumber) const }}]{\setlength{\rightskip}{0pt plus 5cm}int Bms\+Device\+::get\+Cell\+Voltage (
\begin{DoxyParamCaption}
\item[{byte}]{cell\+Number}
\end{DoxyParamCaption}
) const}\hypertarget{class_bms_device_a0bdebab046f8337914ba88fdd20da1bd}{}\label{class_bms_device_a0bdebab046f8337914ba88fdd20da1bd}
Return cell voltage
\begin{DoxyParams}{Parameters}
{\em cell\+Number} & cell number \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
cell voltage of cell in device
\end{DoxyReturn}
\index{Bms\+Device@{Bms\+Device}!get\+Gpai\+Vbatt@{get\+Gpai\+Vbatt}}
\index{get\+Gpai\+Vbatt@{get\+Gpai\+Vbatt}!Bms\+Device@{Bms\+Device}}
\subsubsection[{\texorpdfstring{get\+Gpai\+Vbatt(bool dev) const }{getGpaiVbatt(bool dev) const }}]{\setlength{\rightskip}{0pt plus 5cm}double Bms\+Device\+::get\+Gpai\+Vbatt (
\begin{DoxyParamCaption}
\item[{bool}]{dev}
\end{DoxyParamCaption}
) const}\hypertarget{class_bms_device_a8b11a6a96bc0634e14bb7847b448bab6}{}\label{class_bms_device_a8b11a6a96bc0634e14bb7847b448bab6}
T\+O\+DO\+: W\+TF??
\begin{DoxyParams}{Parameters}
{\em dev} & T\+O\+DO\+: W\+TF?? \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
T\+O\+DO\+: W\+TF??
\end{DoxyReturn}
\index{Bms\+Device@{Bms\+Device}!get\+Status@{get\+Status}}
\index{get\+Status@{get\+Status}!Bms\+Device@{Bms\+Device}}
\subsubsection[{\texorpdfstring{get\+Status() const }{getStatus() const }}]{\setlength{\rightskip}{0pt plus 5cm}byte $\ast$ Bms\+Device\+::get\+Status (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}\hypertarget{class_bms_device_ad72700d4da6cc7d6ef52e76091ab9d9a}{}\label{class_bms_device_ad72700d4da6cc7d6ef52e76091ab9d9a}
Read status \begin{DoxyReturn}{Returns}
device status
\end{DoxyReturn}
\index{Bms\+Device@{Bms\+Device}!get\+Temperature@{get\+Temperature}}
\index{get\+Temperature@{get\+Temperature}!Bms\+Device@{Bms\+Device}}
\subsubsection[{\texorpdfstring{get\+Temperature(byte temperature\+To\+Read) const }{getTemperature(byte temperatureToRead) const }}]{\setlength{\rightskip}{0pt plus 5cm}double Bms\+Device\+::get\+Temperature (
\begin{DoxyParamCaption}
\item[{byte}]{temperature\+To\+Read}
\end{DoxyParamCaption}
) const}\hypertarget{class_bms_device_ac61154d9b8cc11061dcc7d0243ed955f}{}\label{class_bms_device_ac61154d9b8cc11061dcc7d0243ed955f}
\begin{DoxyParams}{Parameters}
{\em temperature\+To\+Read} & which temperature to read \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
temperature of device
\end{DoxyReturn}
\index{Bms\+Device@{Bms\+Device}!read\+Register@{read\+Register}}
\index{read\+Register@{read\+Register}!Bms\+Device@{Bms\+Device}}
\subsubsection[{\texorpdfstring{read\+Register(byte reg\+Address, byte length) const }{readRegister(byte regAddress, byte length) const }}]{\setlength{\rightskip}{0pt plus 5cm}byte $\ast$ Bms\+Device\+::read\+Register (
\begin{DoxyParamCaption}
\item[{byte}]{reg\+Address, }
\item[{byte}]{length}
\end{DoxyParamCaption}
) const}\hypertarget{class_bms_device_ae21dd2360edf7b3f21e2086315ddecfb}{}\label{class_bms_device_ae21dd2360edf7b3f21e2086315ddecfb}
Read data read from registers
\begin{DoxyParams}{Parameters}
{\em reg\+Address} & registry address \\
\hline
{\em length} & length to read \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
data read from registers
\end{DoxyReturn}
\index{Bms\+Device@{Bms\+Device}!set\+Status@{set\+Status}}
\index{set\+Status@{set\+Status}!Bms\+Device@{Bms\+Device}}
\subsubsection[{\texorpdfstring{set\+Status(byte value) const }{setStatus(byte value) const }}]{\setlength{\rightskip}{0pt plus 5cm}void Bms\+Device\+::set\+Status (
\begin{DoxyParamCaption}
\item[{byte}]{value}
\end{DoxyParamCaption}
) const}\hypertarget{class_bms_device_af711c0fbff46642d525c63a668cb7a2d}{}\label{class_bms_device_af711c0fbff46642d525c63a668cb7a2d}
Write status
\begin{DoxyParams}{Parameters}
{\em value} & value to write \\
\hline
\end{DoxyParams}
\index{Bms\+Device@{Bms\+Device}!write\+Register@{write\+Register}}
\index{write\+Register@{write\+Register}!Bms\+Device@{Bms\+Device}}
\subsubsection[{\texorpdfstring{write\+Register(byte reg\+Address, byte reg\+Data) const }{writeRegister(byte regAddress, byte regData) const }}]{\setlength{\rightskip}{0pt plus 5cm}void Bms\+Device\+::write\+Register (
\begin{DoxyParamCaption}
\item[{byte}]{reg\+Address, }
\item[{byte}]{reg\+Data}
\end{DoxyParamCaption}
) const}\hypertarget{class_bms_device_a7c37cd79623465ddee0f1b4d6be0e86c}{}\label{class_bms_device_a7c37cd79623465ddee0f1b4d6be0e86c}
Write a bms\+Device device property
\begin{DoxyParams}{Parameters}
{\em reg\+Address} & registry address \\
\hline
{\em reg\+Data} & registry data \\
\hline
\end{DoxyParams}
The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item
src/\+Bms/Bms\+Device.\+h\item
src/\+Bms/Bms\+Device.\+cpp\end{DoxyCompactItemize}