110 lines
41 KiB
HTML
110 lines
41 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.16"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>B15F: drv/plottyfile.cpp Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">B15F
|
|
</div>
|
|
<div id="projectbrief">Board 15 Famulus Edition</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.16 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_587c94d866dbb2f408f78cf41f9b2f8d.html">drv</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">plottyfile.cpp</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#include "plottyfile.h"</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>  </div><div class="line"><a name="l00003"></a><span class="lineno"><a class="line" href="classPlottyFile.html#ae091e6eaaca16302f17572ac7dec6f7c"> 3</a></span> <span class="keywordtype">void</span> <a class="code" href="classPlottyFile.html#ae091e6eaaca16302f17572ac7dec6f7c">PlottyFile::addDot</a>(<a class="code" href="classDot.html">Dot</a>& dot)</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> {</div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>  dots.push_back(dot);</div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> }</div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>  </div><div class="line"><a name="l00008"></a><span class="lineno"><a class="line" href="classPlottyFile.html#a80e4b45219b4e9571992edfc28a28568"> 8</a></span> <span class="keywordtype">void</span> <a class="code" href="classPlottyFile.html#ae091e6eaaca16302f17572ac7dec6f7c">PlottyFile::addDot</a>(<a class="code" href="classDot.html">Dot</a> dot)</div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> {</div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>  dots.push_back(dot);</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> }</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>  </div><div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="classPlottyFile.html#a4e5ab1ebb012a5cc1a3d6458a4cd512f"> 13</a></span> <span class="keywordtype">void</span> <a class="code" href="classPlottyFile.html#a4e5ab1ebb012a5cc1a3d6458a4cd512f">PlottyFile::setFunctionType</a>(FunctionType function_type)</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> {</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  this->function_type = function_type;</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> }</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>  </div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="classPlottyFile.html#a1953ee0d9a87b7353c16139584e9c2ae"> 18</a></span> <span class="keywordtype">void</span> <a class="code" href="classPlottyFile.html#a1953ee0d9a87b7353c16139584e9c2ae">PlottyFile::setQuadrant</a>(uint8_t quadrant)</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> {</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  <span class="keywordflow">if</span>(quadrant < 1 || quadrant > 4)</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  <span class="keywordflow">throw</span> std::range_error(<span class="stringliteral">"Ungueltiger Quadrant"</span>);</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  this->quadrant = quadrant;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> }</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  </div><div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="classPlottyFile.html#a80c2c2e97a454566f9c1f2c51e1d7f3e"> 25</a></span> <span class="keywordtype">void</span> <a class="code" href="classPlottyFile.html#a80c2c2e97a454566f9c1f2c51e1d7f3e">PlottyFile::setRefX</a>(uint16_t ref_x)</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> {</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  this->ref_x = ref_x;</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> }</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  </div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="classPlottyFile.html#a3a371228ddcc007e97eebe7cc04dffc2"> 30</a></span> <span class="keywordtype">void</span> <a class="code" href="classPlottyFile.html#a3a371228ddcc007e97eebe7cc04dffc2">PlottyFile::setRefY</a>(uint16_t ref_y)</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> {</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  this->ref_y = ref_y;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> }</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  </div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classPlottyFile.html#aa676414793becb975506f48d6e949dd0"> 35</a></span> <span class="keywordtype">void</span> <a class="code" href="classPlottyFile.html#aa676414793becb975506f48d6e949dd0">PlottyFile::setParaFirstCurve</a>(uint16_t para_first)</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> {</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  this->para_first = para_first;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> }</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  </div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classPlottyFile.html#a6caebd31e04e2e7081cc007047350355"> 40</a></span> <span class="keywordtype">void</span> <a class="code" href="classPlottyFile.html#a6caebd31e04e2e7081cc007047350355">PlottyFile::setParaStepWidth</a>(uint16_t para_stepwidth)</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> {</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  this->para_stepwidth = para_stepwidth;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> }</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  </div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classPlottyFile.html#ab8d35a841ca9c325fca671cf34e03527"> 45</a></span> <span class="keywordtype">void</span> <a class="code" href="classPlottyFile.html#ab8d35a841ca9c325fca671cf34e03527">PlottyFile::setUnitX</a>(std::string unit_x)</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> {</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  this->unit_x = unit_x;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> }</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  </div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classPlottyFile.html#aa0449c290265d55d6223b19cf0a88b0a"> 50</a></span> <span class="keywordtype">void</span> <a class="code" href="classPlottyFile.html#aa0449c290265d55d6223b19cf0a88b0a">PlottyFile::setDescX</a>(std::string desc_x)</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> {</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  this->desc_x = desc_x;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> }</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  </div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classPlottyFile.html#abb18c814f435926f741f7ceb310f3059"> 55</a></span> <span class="keywordtype">void</span> <a class="code" href="classPlottyFile.html#abb18c814f435926f741f7ceb310f3059">PlottyFile::setUnitY</a>(std::string unit_y)</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> {</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  this->unit_y = unit_y;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> }</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  </div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="classPlottyFile.html#a38a3a4dfc76bc70523727584bf01d590"> 60</a></span> <span class="keywordtype">void</span> <a class="code" href="classPlottyFile.html#a38a3a4dfc76bc70523727584bf01d590">PlottyFile::setDescY</a>(std::string desc_y)</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> {</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  this->desc_y = desc_y;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> }</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  </div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classPlottyFile.html#abbac84109a1e0958a4ca5c270fac0986"> 65</a></span> <span class="keywordtype">void</span> <a class="code" href="classPlottyFile.html#abbac84109a1e0958a4ca5c270fac0986">PlottyFile::setUnitPara</a>(std::string unit_para)</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> {</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  this->unit_para = unit_para;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> }</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  </div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="classPlottyFile.html#a431904143c3c1164a2e8b8cfec3c77ab"> 70</a></span> <span class="keywordtype">void</span> <a class="code" href="classPlottyFile.html#a431904143c3c1164a2e8b8cfec3c77ab">PlottyFile::setDescPara</a>(std::string desc_para)</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> {</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  this->desc_para = desc_para;</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> }</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  </div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="classPlottyFile.html#a88bb7d8350ed5fbc7a40e8d903c94bdb"> 75</a></span> FunctionType <a class="code" href="classPlottyFile.html#a88bb7d8350ed5fbc7a40e8d903c94bdb">PlottyFile::getFunctionType</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="keyword"></span>{</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">return</span> function_type;</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> }</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  </div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="classPlottyFile.html#a54e94e80061a27614f2d4d63697d3376"> 80</a></span> uint8_t <a class="code" href="classPlottyFile.html#a54e94e80061a27614f2d4d63697d3376">PlottyFile::getQuadrant</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="keyword"></span>{</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keywordflow">return</span> quadrant;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> }</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  </div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="classPlottyFile.html#a7dd84b9f0826f3220fc6b5a4f1ce9890"> 85</a></span> uint16_t <a class="code" href="classPlottyFile.html#a7dd84b9f0826f3220fc6b5a4f1ce9890">PlottyFile::getRefX</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="keyword"></span>{</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="keywordflow">return</span> ref_x;</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span> }</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  </div><div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="classPlottyFile.html#ae6650c61a3b1a610ce716253418bd7f2"> 90</a></span> uint16_t <a class="code" href="classPlottyFile.html#ae6650c61a3b1a610ce716253418bd7f2">PlottyFile::getRefY</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="keyword"></span>{</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="keywordflow">return</span> ref_y;</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span> }</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  </div><div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="classPlottyFile.html#a40828c93d66fe80166c4f603d5bdfa48"> 95</a></span> uint16_t <a class="code" href="classPlottyFile.html#a40828c93d66fe80166c4f603d5bdfa48">PlottyFile::getParaFirstCurve</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="keyword"></span>{</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keywordflow">return</span> para_first;</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span> }</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  </div><div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="classPlottyFile.html#a9da23f2bb8e6eb1837fc992ffd4057db"> 100</a></span> uint16_t <a class="code" href="classPlottyFile.html#a9da23f2bb8e6eb1837fc992ffd4057db">PlottyFile::getParaStepWidth</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="keyword"></span>{</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="keywordflow">return</span> para_stepwidth;</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span> }</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  </div><div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="classPlottyFile.html#af952ac5e2c40896acaf6a86063874fe3"> 105</a></span> std::string <a class="code" href="classPlottyFile.html#af952ac5e2c40896acaf6a86063874fe3">PlottyFile::getUnitX</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span> <span class="keyword"></span>{</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="keywordflow">return</span> unit_x;</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span> }</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  </div><div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="classPlottyFile.html#a9cf7baa569be308c2cf6e07cadded09d"> 110</a></span> std::string <a class="code" href="classPlottyFile.html#a9cf7baa569be308c2cf6e07cadded09d">PlottyFile::getDescX</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="keyword"></span>{</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="keywordflow">return</span> desc_x;</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span> }</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  </div><div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="classPlottyFile.html#a746b96036872dbece204e9739f3413b6"> 115</a></span> std::string <a class="code" href="classPlottyFile.html#a746b96036872dbece204e9739f3413b6">PlottyFile::getUnitY</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="keyword"></span>{</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keywordflow">return</span> unit_y;</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span> }</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  </div><div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="classPlottyFile.html#ab4a847fd71a804182f211233e194df45"> 120</a></span> std::string <a class="code" href="classPlottyFile.html#ab4a847fd71a804182f211233e194df45">PlottyFile::getDescY</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="keyword"></span>{</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="keywordflow">return</span> desc_y;</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span> }</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  </div><div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="classPlottyFile.html#abcda4139adf8c5ab8a93b13b84ac097c"> 125</a></span> std::string <a class="code" href="classPlottyFile.html#abcda4139adf8c5ab8a93b13b84ac097c">PlottyFile::getUnitPara</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span> <span class="keyword"></span>{</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keywordflow">return</span> unit_para;</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span> }</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  </div><div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="classPlottyFile.html#a536967daae3b382a5d6575f55450e198"> 130</a></span> std::string <a class="code" href="classPlottyFile.html#a536967daae3b382a5d6575f55450e198">PlottyFile::getDescPara</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="keyword"></span>{</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keywordflow">return</span> desc_para;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span> }</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  </div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span> <span class="keywordtype">void</span> PlottyFile::prepStr(std::string& str, uint8_t len)</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span> {</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="keywordflow">if</span>(str.length() > len)</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">"Zu grosser String."</span>);</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  </div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keywordflow">if</span>(str.length() != len)</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  str += <span class="charliteral">'\n'</span>;</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  </div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="keywordflow">while</span>(str.length() < len)</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  str += <span class="charliteral">'\0'</span>;</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span> }</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  </div><div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="classPlottyFile.html#a82c348e7fade2edcbc907e7c2bc2e305"> 147</a></span> <span class="keywordtype">void</span> <a class="code" href="classPlottyFile.html#a82c348e7fade2edcbc907e7c2bc2e305">PlottyFile::writeToFile</a>(std::string filename)</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span> {</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="keywordflow">if</span>(dots.empty())</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="keywordflow">throw</span> std::length_error(<span class="stringliteral">"Es wurden keine Punkte gespeichert."</span>);</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  </div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  prepStr(unit_x, STR_LEN_SHORT);</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  prepStr(desc_x, STR_LEN_LARGE);</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  prepStr(unit_y, STR_LEN_SHORT);</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  prepStr(desc_y, STR_LEN_LARGE);</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  prepStr(unit_para, STR_LEN_SHORT);</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  prepStr(desc_para, STR_LEN_LARGE);</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  </div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  std::ofstream file(filename);</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  </div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  <span class="comment">// write file header</span></div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  file.write(reinterpret_cast<char*>(&command), 1);</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  file.write(head.c_str(), head.length());</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  file.write(filetype.c_str(), filetype.length());</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  file.write(reinterpret_cast<char*>(&version), 2);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  file.write(reinterpret_cast<char*>(&subversion), 2);</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  file.put(static_cast<uint8_t>(function_type));</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  file.write(reinterpret_cast<char*>(&quadrant), 1);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  file.write(reinterpret_cast<char*>(&ref_x), 2);</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  file.write(reinterpret_cast<char*>(&ref_y), 2);</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  file.write(reinterpret_cast<char*>(&para_first), 2);</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  file.write(reinterpret_cast<char*>(&para_stepwidth), 2);</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  file.write(unit_x.c_str(), unit_x.length());</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  file.write(desc_x.c_str(), desc_x.length());</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  file.write(unit_y.c_str(), unit_y.length());</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  file.write(desc_y.c_str(), desc_y.length());</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  file.write(unit_para.c_str(), unit_para.length());</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  file.write(desc_para.c_str(), desc_para.length());</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  file.write(reinterpret_cast<const char*>(&eof), 1);</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  </div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="comment">// make sure header size is 256 Byte</span></div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keywordflow">while</span>(file.tellp() < 256)</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  file.put(0);</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  </div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keywordflow">for</span>(<a class="code" href="classDot.html">Dot</a>& dot : dots)</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  {</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  file.put((dot.getX() >> 8) | (static_cast<uint8_t>(dot.getCurve()) << 2));</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  file.put(dot.getX() & 0xFF);</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  file.put(dot.getY() >> 8);</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  file.put(dot.getY() & 0xFF);</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  }</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  </div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  file.close();</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span> }</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  </div><div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="classPlottyFile.html#a08a115ef10458cadfe76077d623313df"> 196</a></span> <span class="keywordtype">void</span> <a class="code" href="classPlottyFile.html#a08a115ef10458cadfe76077d623313df">PlottyFile::startPlotty</a>(std::string filename)</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span> {</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="keywordtype">int</span> code = system((<span class="stringliteral">"plotty --in "</span> + filename).c_str());</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <span class="keywordflow">if</span>(code)</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">"Fehler beim Aufruf von plotty"</span>);</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span> }</div></div><!-- fragment --></div><!-- contents -->
|
|
<div class="ttc" id="aclassPlottyFile_html_a6caebd31e04e2e7081cc007047350355"><div class="ttname"><a href="classPlottyFile.html#a6caebd31e04e2e7081cc007047350355">PlottyFile::setParaStepWidth</a></div><div class="ttdeci">void setParaStepWidth(uint16_t para_stepwidth)</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00040">plottyfile.cpp:40</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_a54e94e80061a27614f2d4d63697d3376"><div class="ttname"><a href="classPlottyFile.html#a54e94e80061a27614f2d4d63697d3376">PlottyFile::getQuadrant</a></div><div class="ttdeci">uint8_t getQuadrant(void) const</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00080">plottyfile.cpp:80</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_a08a115ef10458cadfe76077d623313df"><div class="ttname"><a href="classPlottyFile.html#a08a115ef10458cadfe76077d623313df">PlottyFile::startPlotty</a></div><div class="ttdeci">void startPlotty(std::string filename)</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00196">plottyfile.cpp:196</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_a82c348e7fade2edcbc907e7c2bc2e305"><div class="ttname"><a href="classPlottyFile.html#a82c348e7fade2edcbc907e7c2bc2e305">PlottyFile::writeToFile</a></div><div class="ttdeci">void writeToFile(std::string filename)</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00147">plottyfile.cpp:147</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_ab8d35a841ca9c325fca671cf34e03527"><div class="ttname"><a href="classPlottyFile.html#ab8d35a841ca9c325fca671cf34e03527">PlottyFile::setUnitX</a></div><div class="ttdeci">void setUnitX(std::string unit_x)</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00045">plottyfile.cpp:45</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_abbac84109a1e0958a4ca5c270fac0986"><div class="ttname"><a href="classPlottyFile.html#abbac84109a1e0958a4ca5c270fac0986">PlottyFile::setUnitPara</a></div><div class="ttdeci">void setUnitPara(std::string unit_para)</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00065">plottyfile.cpp:65</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_a38a3a4dfc76bc70523727584bf01d590"><div class="ttname"><a href="classPlottyFile.html#a38a3a4dfc76bc70523727584bf01d590">PlottyFile::setDescY</a></div><div class="ttdeci">void setDescY(std::string desc_y)</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00060">plottyfile.cpp:60</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_a1953ee0d9a87b7353c16139584e9c2ae"><div class="ttname"><a href="classPlottyFile.html#a1953ee0d9a87b7353c16139584e9c2ae">PlottyFile::setQuadrant</a></div><div class="ttdeci">void setQuadrant(uint8_t quadrant)</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00018">plottyfile.cpp:18</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_ab4a847fd71a804182f211233e194df45"><div class="ttname"><a href="classPlottyFile.html#ab4a847fd71a804182f211233e194df45">PlottyFile::getDescY</a></div><div class="ttdeci">std::string getDescY(void) const</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00120">plottyfile.cpp:120</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_a3a371228ddcc007e97eebe7cc04dffc2"><div class="ttname"><a href="classPlottyFile.html#a3a371228ddcc007e97eebe7cc04dffc2">PlottyFile::setRefY</a></div><div class="ttdeci">void setRefY(uint16_t ref_y)</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00030">plottyfile.cpp:30</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_a9cf7baa569be308c2cf6e07cadded09d"><div class="ttname"><a href="classPlottyFile.html#a9cf7baa569be308c2cf6e07cadded09d">PlottyFile::getDescX</a></div><div class="ttdeci">std::string getDescX(void) const</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00110">plottyfile.cpp:110</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_a4e5ab1ebb012a5cc1a3d6458a4cd512f"><div class="ttname"><a href="classPlottyFile.html#a4e5ab1ebb012a5cc1a3d6458a4cd512f">PlottyFile::setFunctionType</a></div><div class="ttdeci">void setFunctionType(FunctionType function_type)</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00013">plottyfile.cpp:13</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_aa0449c290265d55d6223b19cf0a88b0a"><div class="ttname"><a href="classPlottyFile.html#aa0449c290265d55d6223b19cf0a88b0a">PlottyFile::setDescX</a></div><div class="ttdeci">void setDescX(std::string desc_x)</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00050">plottyfile.cpp:50</a></div></div>
|
|
<div class="ttc" id="aclassDot_html"><div class="ttname"><a href="classDot.html">Dot</a></div><div class="ttdef"><b>Definition:</b> <a href="dot_8h_source.html#l00012">dot.h:12</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_a80c2c2e97a454566f9c1f2c51e1d7f3e"><div class="ttname"><a href="classPlottyFile.html#a80c2c2e97a454566f9c1f2c51e1d7f3e">PlottyFile::setRefX</a></div><div class="ttdeci">void setRefX(uint16_t ref_x)</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00025">plottyfile.cpp:25</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_abb18c814f435926f741f7ceb310f3059"><div class="ttname"><a href="classPlottyFile.html#abb18c814f435926f741f7ceb310f3059">PlottyFile::setUnitY</a></div><div class="ttdeci">void setUnitY(std::string unit_y)</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00055">plottyfile.cpp:55</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_ae091e6eaaca16302f17572ac7dec6f7c"><div class="ttname"><a href="classPlottyFile.html#ae091e6eaaca16302f17572ac7dec6f7c">PlottyFile::addDot</a></div><div class="ttdeci">void addDot(Dot &dot)</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00003">plottyfile.cpp:3</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_a431904143c3c1164a2e8b8cfec3c77ab"><div class="ttname"><a href="classPlottyFile.html#a431904143c3c1164a2e8b8cfec3c77ab">PlottyFile::setDescPara</a></div><div class="ttdeci">void setDescPara(std::string desc_para)</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00070">plottyfile.cpp:70</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_a9da23f2bb8e6eb1837fc992ffd4057db"><div class="ttname"><a href="classPlottyFile.html#a9da23f2bb8e6eb1837fc992ffd4057db">PlottyFile::getParaStepWidth</a></div><div class="ttdeci">uint16_t getParaStepWidth(void) const</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00100">plottyfile.cpp:100</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_a536967daae3b382a5d6575f55450e198"><div class="ttname"><a href="classPlottyFile.html#a536967daae3b382a5d6575f55450e198">PlottyFile::getDescPara</a></div><div class="ttdeci">std::string getDescPara(void) const</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00130">plottyfile.cpp:130</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_aa676414793becb975506f48d6e949dd0"><div class="ttname"><a href="classPlottyFile.html#aa676414793becb975506f48d6e949dd0">PlottyFile::setParaFirstCurve</a></div><div class="ttdeci">void setParaFirstCurve(uint16_t para_first)</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00035">plottyfile.cpp:35</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_a746b96036872dbece204e9739f3413b6"><div class="ttname"><a href="classPlottyFile.html#a746b96036872dbece204e9739f3413b6">PlottyFile::getUnitY</a></div><div class="ttdeci">std::string getUnitY(void) const</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00115">plottyfile.cpp:115</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_a40828c93d66fe80166c4f603d5bdfa48"><div class="ttname"><a href="classPlottyFile.html#a40828c93d66fe80166c4f603d5bdfa48">PlottyFile::getParaFirstCurve</a></div><div class="ttdeci">uint16_t getParaFirstCurve(void) const</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00095">plottyfile.cpp:95</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_a7dd84b9f0826f3220fc6b5a4f1ce9890"><div class="ttname"><a href="classPlottyFile.html#a7dd84b9f0826f3220fc6b5a4f1ce9890">PlottyFile::getRefX</a></div><div class="ttdeci">uint16_t getRefX(void) const</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00085">plottyfile.cpp:85</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_abcda4139adf8c5ab8a93b13b84ac097c"><div class="ttname"><a href="classPlottyFile.html#abcda4139adf8c5ab8a93b13b84ac097c">PlottyFile::getUnitPara</a></div><div class="ttdeci">std::string getUnitPara(void) const</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00125">plottyfile.cpp:125</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_a88bb7d8350ed5fbc7a40e8d903c94bdb"><div class="ttname"><a href="classPlottyFile.html#a88bb7d8350ed5fbc7a40e8d903c94bdb">PlottyFile::getFunctionType</a></div><div class="ttdeci">FunctionType getFunctionType(void) const</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00075">plottyfile.cpp:75</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_ae6650c61a3b1a610ce716253418bd7f2"><div class="ttname"><a href="classPlottyFile.html#ae6650c61a3b1a610ce716253418bd7f2">PlottyFile::getRefY</a></div><div class="ttdeci">uint16_t getRefY(void) const</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00090">plottyfile.cpp:90</a></div></div>
|
|
<div class="ttc" id="aclassPlottyFile_html_af952ac5e2c40896acaf6a86063874fe3"><div class="ttname"><a href="classPlottyFile.html#af952ac5e2c40896acaf6a86063874fe3">PlottyFile::getUnitX</a></div><div class="ttdeci">std::string getUnitX(void) const</div><div class="ttdef"><b>Definition:</b> <a href="plottyfile_8cpp_source.html#l00105">plottyfile.cpp:105</a></div></div>
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Tue Dec 3 2019 07:42:51 for B15F by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.16
|
|
</small></address>
|
|
</body>
|
|
</html>
|