Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libcbor: src/cbor/floats_ctrls.c 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" />
<link href="customdoxygen.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">libcbor
   &#160;<span id="projectnumber">0.5.0</span>
   </div>
   <div id="projectbrief">libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</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_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_cb565ba51d82ea933604984cbab6233d.html">cbor</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">floats_ctrls.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="floats__ctrls_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2014-2017 Pavel Kalvoda &lt;me@pavelkalvoda.com&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * libcbor is free software; you can redistribute it and/or modify</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * it under the terms of the MIT license. See LICENSE for details.</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="floats__ctrls_8h.html">floats_ctrls.h</a>&quot;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;assert.h&quot;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;math.h&gt;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#a05778dc7349be636d47440f758ec96a6">   12</a></span>&#160;<a class="code" href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7">cbor_float_width</a> <a class="code" href="floats__ctrls_8c.html#a05778dc7349be636d47440f758ec96a6">cbor_float_get_width</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item)</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;{</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    assert(<a class="code" href="common_8c.html#a983dec76e934c49ed6979226f9db4386">cbor_isa_float_ctrl</a>(item));</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;    <span class="keywordflow">return</span> item-&gt;<a class="code" href="structcbor__item__t.html#a7d97fa5cdf027ca0499c37ec19acf843">metadata</a>.<a class="code" href="unioncbor__item__metadata.html#a456a58064b25bc6563df665bed5c122d">float_ctrl_metadata</a>.<a class="code" href="struct__cbor__float__ctrl__metadata.html#a19a1c5e96c662dd4781f0172052b194c">width</a>;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;}</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#a9d15faa0a33797ce0b8a1a66d5773d88">   18</a></span>&#160;uint8_t <a class="code" href="floats__ctrls_8c.html#a9d15faa0a33797ce0b8a1a66d5773d88">cbor_ctrl_value</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item)</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;{</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    assert(<a class="code" href="common_8c.html#a983dec76e934c49ed6979226f9db4386">cbor_isa_float_ctrl</a>(item));</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    assert(<a class="code" href="floats__ctrls_8c.html#a05778dc7349be636d47440f758ec96a6">cbor_float_get_width</a>(item) == <a class="code" href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7ac3c49d03756f116648957c5d996f48b4">CBOR_FLOAT_0</a>);</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    <span class="keywordflow">return</span> item-&gt;<a class="code" href="structcbor__item__t.html#a7d97fa5cdf027ca0499c37ec19acf843">metadata</a>.<a class="code" href="unioncbor__item__metadata.html#a456a58064b25bc6563df665bed5c122d">float_ctrl_metadata</a>.<a class="code" href="struct__cbor__float__ctrl__metadata.html#aeeb531a44e6502b5f1bd2aece6dffaa2">ctrl</a>;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;}</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#a2b304df65e44de17064bc3de154522fa">   25</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="floats__ctrls_8c.html#a2b304df65e44de17064bc3de154522fa">cbor_float_ctrl_is_ctrl</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item)</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;{</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    assert(<a class="code" href="common_8c.html#a983dec76e934c49ed6979226f9db4386">cbor_isa_float_ctrl</a>(item));</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="floats__ctrls_8c.html#a05778dc7349be636d47440f758ec96a6">cbor_float_get_width</a>(item) == <a class="code" href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7ac3c49d03756f116648957c5d996f48b4">CBOR_FLOAT_0</a>;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;}</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#aa85d79e0f060173a9dccdada2e551cf9">   31</a></span>&#160;<span class="keywordtype">float</span> <a class="code" href="floats__ctrls_8c.html#aa85d79e0f060173a9dccdada2e551cf9">cbor_float_get_float2</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item)</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;{</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    assert(<a class="code" href="common_8c.html#a4dde28c548375aa954f1cad15b3739aa">cbor_is_float</a>(item));</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    assert(<a class="code" href="floats__ctrls_8c.html#a05778dc7349be636d47440f758ec96a6">cbor_float_get_width</a>(item) == <a class="code" href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a6a044cc40003cef84432fe92780514e5">CBOR_FLOAT_16</a>);</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keywordflow">return</span> *(<span class="keywordtype">float</span> *) item-&gt;<a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a>;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;}</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#ad504d3d291810b0c39fc498be0bd2639">   38</a></span>&#160;<span class="keywordtype">float</span> <a class="code" href="floats__ctrls_8c.html#ad504d3d291810b0c39fc498be0bd2639">cbor_float_get_float4</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item)</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;{</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    assert(<a class="code" href="common_8c.html#a4dde28c548375aa954f1cad15b3739aa">cbor_is_float</a>(item));</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    assert(<a class="code" href="floats__ctrls_8c.html#a05778dc7349be636d47440f758ec96a6">cbor_float_get_width</a>(item) == <a class="code" href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a0b2ba87d2508e98e5f6fee7bf8beedd4">CBOR_FLOAT_32</a>);</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keywordflow">return</span> *(<span class="keywordtype">float</span> *) item-&gt;<a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a>;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;}</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#a2f215940998d05730b23b7e0e7ad8ebe">   45</a></span>&#160;<span class="keywordtype">double</span> <a class="code" href="floats__ctrls_8c.html#a2f215940998d05730b23b7e0e7ad8ebe">cbor_float_get_float8</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item)</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;{</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    assert(<a class="code" href="common_8c.html#a4dde28c548375aa954f1cad15b3739aa">cbor_is_float</a>(item));</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    assert(<a class="code" href="floats__ctrls_8c.html#a05778dc7349be636d47440f758ec96a6">cbor_float_get_width</a>(item) == <a class="code" href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a792f18e66a6da153eb4f40a8f894c653">CBOR_FLOAT_64</a>);</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keywordflow">return</span> *(<span class="keywordtype">double</span> *) item-&gt;<a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a>;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;}</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#ad8316cf8b830431ef9ce9562ae679563">   52</a></span>&#160;<span class="keywordtype">double</span> <a class="code" href="floats__ctrls_8c.html#ad8316cf8b830431ef9ce9562ae679563">cbor_float_get_float</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> * item)</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;{</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    assert(<a class="code" href="common_8c.html#a4dde28c548375aa954f1cad15b3739aa">cbor_is_float</a>(item));</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keywordflow">switch</span>(<a class="code" href="floats__ctrls_8c.html#a05778dc7349be636d47440f758ec96a6">cbor_float_get_width</a>(item)) {</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7ac3c49d03756f116648957c5d996f48b4">CBOR_FLOAT_0</a>: <span class="keywordflow">return</span> NAN;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a6a044cc40003cef84432fe92780514e5">CBOR_FLOAT_16</a>: <span class="keywordflow">return</span> <a class="code" href="floats__ctrls_8c.html#aa85d79e0f060173a9dccdada2e551cf9">cbor_float_get_float2</a>(item);</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a0b2ba87d2508e98e5f6fee7bf8beedd4">CBOR_FLOAT_32</a>: <span class="keywordflow">return</span> <a class="code" href="floats__ctrls_8c.html#ad504d3d291810b0c39fc498be0bd2639">cbor_float_get_float4</a>(item);</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="keywordflow">case</span> <a class="code" href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a792f18e66a6da153eb4f40a8f894c653">CBOR_FLOAT_64</a>: <span class="keywordflow">return</span> <a class="code" href="floats__ctrls_8c.html#a2f215940998d05730b23b7e0e7ad8ebe">cbor_float_get_float8</a>(item);</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    }</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <span class="keywordflow">return</span> NAN; <span class="comment">/* Compiler complaints */</span></div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;}</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#aa3d3e746446ef643037a4f8838aa5753">   64</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="floats__ctrls_8c.html#aa3d3e746446ef643037a4f8838aa5753">cbor_set_float2</a>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item, <span class="keywordtype">float</span> value)</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;{</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    assert(<a class="code" href="common_8c.html#a4dde28c548375aa954f1cad15b3739aa">cbor_is_float</a>(item));</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    assert(<a class="code" href="floats__ctrls_8c.html#a05778dc7349be636d47440f758ec96a6">cbor_float_get_width</a>(item) == <a class="code" href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a6a044cc40003cef84432fe92780514e5">CBOR_FLOAT_16</a>);</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    *((<span class="keywordtype">float</span> *) item-&gt;<a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a>) = value;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;}</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#a5fe450a0edad9c7f1a888000f74a1085">   71</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="floats__ctrls_8c.html#a5fe450a0edad9c7f1a888000f74a1085">cbor_set_float4</a>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item, <span class="keywordtype">float</span> value)</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;{</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    assert(<a class="code" href="common_8c.html#a4dde28c548375aa954f1cad15b3739aa">cbor_is_float</a>(item));</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    assert(<a class="code" href="floats__ctrls_8c.html#a05778dc7349be636d47440f758ec96a6">cbor_float_get_width</a>(item) == <a class="code" href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a0b2ba87d2508e98e5f6fee7bf8beedd4">CBOR_FLOAT_32</a>);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    *((<span class="keywordtype">float</span> *) item-&gt;<a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a>) = value;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;}</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#a62a2ed2815d844fd54474f30ebbd0f6f">   78</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="floats__ctrls_8c.html#a62a2ed2815d844fd54474f30ebbd0f6f">cbor_set_float8</a>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item, <span class="keywordtype">double</span> value)</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;{</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    assert(<a class="code" href="common_8c.html#a4dde28c548375aa954f1cad15b3739aa">cbor_is_float</a>(item));</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    assert(<a class="code" href="floats__ctrls_8c.html#a05778dc7349be636d47440f758ec96a6">cbor_float_get_width</a>(item) == <a class="code" href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a792f18e66a6da153eb4f40a8f894c653">CBOR_FLOAT_64</a>);</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    *((<span class="keywordtype">double</span> *) item-&gt;<a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a>) = value;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;}</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#a5f5d397684bc2118f36d720c61318e7d">   85</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="floats__ctrls_8c.html#a5f5d397684bc2118f36d720c61318e7d">cbor_set_ctrl</a>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item, uint8_t value)</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;{</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    assert(<a class="code" href="common_8c.html#a983dec76e934c49ed6979226f9db4386">cbor_isa_float_ctrl</a>(item));</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    assert(<a class="code" href="floats__ctrls_8c.html#a05778dc7349be636d47440f758ec96a6">cbor_float_get_width</a>(item) == <a class="code" href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7ac3c49d03756f116648957c5d996f48b4">CBOR_FLOAT_0</a>);</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    item-&gt;<a class="code" href="structcbor__item__t.html#a7d97fa5cdf027ca0499c37ec19acf843">metadata</a>.<a class="code" href="unioncbor__item__metadata.html#a456a58064b25bc6563df665bed5c122d">float_ctrl_metadata</a>.<a class="code" href="struct__cbor__float__ctrl__metadata.html#aeeb531a44e6502b5f1bd2aece6dffaa2">ctrl</a> = value;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;}</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#ac0c984ec79209ad710dd960ca9566f16">   92</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="floats__ctrls_8c.html#ac0c984ec79209ad710dd960ca9566f16">cbor_ctrl_is_bool</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item)</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;{</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    assert(<a class="code" href="common_8c.html#a5618a3689e31829f4f84da008e20798e">cbor_is_bool</a>(item));</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keywordflow">return</span> item-&gt;<a class="code" href="structcbor__item__t.html#a7d97fa5cdf027ca0499c37ec19acf843">metadata</a>.<a class="code" href="unioncbor__item__metadata.html#a456a58064b25bc6563df665bed5c122d">float_ctrl_metadata</a>.<a class="code" href="struct__cbor__float__ctrl__metadata.html#aeeb531a44e6502b5f1bd2aece6dffaa2">ctrl</a> == <a class="code" href="data_8h.html#a6454b577999b479ac2585af7c204ae3baf4f149be1611cec155482645ff2be8de">CBOR_CTRL_TRUE</a>;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;}</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#a6154cefb44f9df7685a5f80d0a1e7379">   98</a></span>&#160;<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="floats__ctrls_8c.html#a6154cefb44f9df7685a5f80d0a1e7379">cbor_new_ctrl</a>()</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;{</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="common_8h.html#a07a781e9212fad361b0f59f7fc921057">_CBOR_MALLOC</a>(<span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a>));</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    *item = (<a class="code" href="data_8h.html#afdaa4bcbbdd295d719e39ce0b5519419">cbor_item_t</a>) {</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        .<a class="code" href="structcbor__item__t.html#a6743a75cf89e1b455ddf3198ff98842a">type</a> = <a class="code" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a1276dcc4ac56df5fd7e0270344a6e57d">CBOR_TYPE_FLOAT_CTRL</a>,</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        .data = NULL,</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        .refcount = 1,</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        .metadata = {.float_ctrl_metadata = {.width = <a class="code" href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7ac3c49d03756f116648957c5d996f48b4">CBOR_FLOAT_0</a>, .ctrl = <a class="code" href="data_8h.html#a6454b577999b479ac2585af7c204ae3bac8748342f8c8e6468de589a86cf736cc">CBOR_CTRL_NONE</a>}}</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    };</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;}</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#a1b332d66de1b49f202b257dc1d245c30">  110</a></span>&#160;<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="floats__ctrls_8c.html#a1b332d66de1b49f202b257dc1d245c30">cbor_new_float2</a>()</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;{</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="common_8h.html#a07a781e9212fad361b0f59f7fc921057">_CBOR_MALLOC</a>(<span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a>) + 4);</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    *item = (<a class="code" href="data_8h.html#afdaa4bcbbdd295d719e39ce0b5519419">cbor_item_t</a>) {</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        .<a class="code" href="structcbor__item__t.html#a6743a75cf89e1b455ddf3198ff98842a">type</a> = <a class="code" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a1276dcc4ac56df5fd7e0270344a6e57d">CBOR_TYPE_FLOAT_CTRL</a>,</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        .data = (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *) item + <span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a>),</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        .<a class="code" href="structcbor__item__t.html#a6bb24fe655f086c6aa9a66d427e09cca">refcount</a> = 1,</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        .metadata = {.float_ctrl_metadata = {.width = <a class="code" href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a6a044cc40003cef84432fe92780514e5">CBOR_FLOAT_16</a>}}</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    };</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;}</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#af5b06827916da81a32a1d68dd0727bb1">  122</a></span>&#160;<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="floats__ctrls_8c.html#af5b06827916da81a32a1d68dd0727bb1">cbor_new_float4</a>()</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;{</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="common_8h.html#a07a781e9212fad361b0f59f7fc921057">_CBOR_MALLOC</a>(<span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a>) + 4);</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    *item = (<a class="code" href="data_8h.html#afdaa4bcbbdd295d719e39ce0b5519419">cbor_item_t</a>) {</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        .<a class="code" href="structcbor__item__t.html#a6743a75cf89e1b455ddf3198ff98842a">type</a> = <a class="code" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a1276dcc4ac56df5fd7e0270344a6e57d">CBOR_TYPE_FLOAT_CTRL</a>,</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        .data = (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *) item + <span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a>),</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        .<a class="code" href="structcbor__item__t.html#a6bb24fe655f086c6aa9a66d427e09cca">refcount</a> = 1,</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        .metadata = {.float_ctrl_metadata = {.width = <a class="code" href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a0b2ba87d2508e98e5f6fee7bf8beedd4">CBOR_FLOAT_32</a>}}</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    };</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;}</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div><div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#a128574918683dbe68c7dd5256e4f6bf3">  134</a></span>&#160;<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="floats__ctrls_8c.html#a128574918683dbe68c7dd5256e4f6bf3">cbor_new_float8</a>()</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;{</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="common_8h.html#a07a781e9212fad361b0f59f7fc921057">_CBOR_MALLOC</a>(<span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a>) + 8);</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    *item = (<a class="code" href="data_8h.html#afdaa4bcbbdd295d719e39ce0b5519419">cbor_item_t</a>) {</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        .<a class="code" href="structcbor__item__t.html#a6743a75cf89e1b455ddf3198ff98842a">type</a> = <a class="code" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a1276dcc4ac56df5fd7e0270344a6e57d">CBOR_TYPE_FLOAT_CTRL</a>,</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        .data = (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *) item + <span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a>),</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        .<a class="code" href="structcbor__item__t.html#a6bb24fe655f086c6aa9a66d427e09cca">refcount</a> = 1,</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;        .metadata = {.float_ctrl_metadata = {.width = <a class="code" href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a792f18e66a6da153eb4f40a8f894c653">CBOR_FLOAT_64</a>}}</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    };</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;}</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#a480b38bd08feb75b1bc705850595b4ee">  146</a></span>&#160;<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="floats__ctrls_8c.html#a480b38bd08feb75b1bc705850595b4ee">cbor_new_null</a>()</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;{</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="floats__ctrls_8c.html#a6154cefb44f9df7685a5f80d0a1e7379">cbor_new_ctrl</a>();</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <a class="code" href="floats__ctrls_8c.html#a5f5d397684bc2118f36d720c61318e7d">cbor_set_ctrl</a>(item, <a class="code" href="data_8h.html#a6454b577999b479ac2585af7c204ae3ba64e142780db46497df37d5cfb40ef8fd">CBOR_CTRL_NULL</a>);</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;}</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#a7d40d18664a72a266ce98030d30a7377">  153</a></span>&#160;<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="floats__ctrls_8c.html#a7d40d18664a72a266ce98030d30a7377">cbor_new_undef</a>()</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;{</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="floats__ctrls_8c.html#a6154cefb44f9df7685a5f80d0a1e7379">cbor_new_ctrl</a>();</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    <a class="code" href="floats__ctrls_8c.html#a5f5d397684bc2118f36d720c61318e7d">cbor_set_ctrl</a>(item, <a class="code" href="data_8h.html#a6454b577999b479ac2585af7c204ae3ba5354f70478e0acf68bf1682229b05b6d">CBOR_CTRL_UNDEF</a>);</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;}</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#a5218f8557e64441e9085f6b9478bfd06">  160</a></span>&#160;<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="floats__ctrls_8c.html#a5218f8557e64441e9085f6b9478bfd06">cbor_build_bool</a>(<span class="keywordtype">bool</span> value)</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;{</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="floats__ctrls_8c.html#af31b0a42b2dd7f29efe42385bd4a58f1">cbor_build_ctrl</a>(value ? <a class="code" href="data_8h.html#a6454b577999b479ac2585af7c204ae3baf4f149be1611cec155482645ff2be8de">CBOR_CTRL_TRUE</a> : <a class="code" href="data_8h.html#a6454b577999b479ac2585af7c204ae3babbcec81d7145fdf31329e07a0bb064bd">CBOR_CTRL_FALSE</a>);</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;}</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#a9884b85abd0c0637a4377168d034260f">  165</a></span>&#160;<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="floats__ctrls_8c.html#a9884b85abd0c0637a4377168d034260f">cbor_build_float2</a>(<span class="keywordtype">float</span> value)</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;{</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="floats__ctrls_8c.html#a1b332d66de1b49f202b257dc1d245c30">cbor_new_float2</a>();</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    <a class="code" href="floats__ctrls_8c.html#aa3d3e746446ef643037a4f8838aa5753">cbor_set_float2</a>(item, value);</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;}</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div><div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#a1e3e9757ac809b6df56f1095a87bfdad">  172</a></span>&#160;<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="floats__ctrls_8c.html#a1e3e9757ac809b6df56f1095a87bfdad">cbor_build_float4</a>(<span class="keywordtype">float</span> value)</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;{</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="floats__ctrls_8c.html#af5b06827916da81a32a1d68dd0727bb1">cbor_new_float4</a>();</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    <a class="code" href="floats__ctrls_8c.html#a5fe450a0edad9c7f1a888000f74a1085">cbor_set_float4</a>(item, value);</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;}</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div><div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#aad0e4103cf703b5c3e856956f5a2fb96">  179</a></span>&#160;<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="floats__ctrls_8c.html#aad0e4103cf703b5c3e856956f5a2fb96">cbor_build_float8</a>(<span class="keywordtype">double</span> value)</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;{</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="floats__ctrls_8c.html#a128574918683dbe68c7dd5256e4f6bf3">cbor_new_float8</a>();</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    <a class="code" href="floats__ctrls_8c.html#a62a2ed2815d844fd54474f30ebbd0f6f">cbor_set_float8</a>(item, value);</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;}</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="floats__ctrls_8h.html#af31b0a42b2dd7f29efe42385bd4a58f1">  186</a></span>&#160;<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="floats__ctrls_8c.html#af31b0a42b2dd7f29efe42385bd4a58f1">cbor_build_ctrl</a>(uint8_t  value)</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;{</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="floats__ctrls_8c.html#a6154cefb44f9df7685a5f80d0a1e7379">cbor_new_ctrl</a>();</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    <a class="code" href="floats__ctrls_8c.html#a5f5d397684bc2118f36d720c61318e7d">cbor_set_ctrl</a>(item, value);</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;}</div><div class="ttc" id="data_8h_html_afdaa4bcbbdd295d719e39ce0b5519419"><div class="ttname"><a href="data_8h.html#afdaa4bcbbdd295d719e39ce0b5519419">cbor_item_t</a></div><div class="ttdeci">struct cbor_item_t cbor_item_t</div><div class="ttdoc">The item handle. </div></div>
<div class="ttc" id="floats__ctrls_8c_html_a5fe450a0edad9c7f1a888000f74a1085"><div class="ttname"><a href="floats__ctrls_8c.html#a5fe450a0edad9c7f1a888000f74a1085">cbor_set_float4</a></div><div class="ttdeci">void cbor_set_float4(cbor_item_t *item, float value)</div><div class="ttdoc">Assigns a float value. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00071">floats_ctrls.c:71</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_aa3d3e746446ef643037a4f8838aa5753"><div class="ttname"><a href="floats__ctrls_8c.html#aa3d3e746446ef643037a4f8838aa5753">cbor_set_float2</a></div><div class="ttdeci">void cbor_set_float2(cbor_item_t *item, float value)</div><div class="ttdoc">Assigns a float value. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00064">floats_ctrls.c:64</a></div></div>
<div class="ttc" id="unioncbor__item__metadata_html_a456a58064b25bc6563df665bed5c122d"><div class="ttname"><a href="unioncbor__item__metadata.html#a456a58064b25bc6563df665bed5c122d">cbor_item_metadata::float_ctrl_metadata</a></div><div class="ttdeci">struct _cbor_float_ctrl_metadata float_ctrl_metadata</div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00145">data.h:145</a></div></div>
<div class="ttc" id="data_8h_html_a6454b577999b479ac2585af7c204ae3baf4f149be1611cec155482645ff2be8de"><div class="ttname"><a href="data_8h.html#a6454b577999b479ac2585af7c204ae3baf4f149be1611cec155482645ff2be8de">CBOR_CTRL_TRUE</a></div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00071">data.h:71</a></div></div>
<div class="ttc" id="data_8h_html_a6454b577999b479ac2585af7c204ae3ba64e142780db46497df37d5cfb40ef8fd"><div class="ttname"><a href="data_8h.html#a6454b577999b479ac2585af7c204ae3ba64e142780db46497df37d5cfb40ef8fd">CBOR_CTRL_NULL</a></div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00072">data.h:72</a></div></div>
<div class="ttc" id="data_8h_html_ac80d3ecbbdc88d96a7396ac986ee47e7"><div class="ttname"><a href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7">cbor_float_width</a></div><div class="ttdeci">cbor_float_width</div><div class="ttdoc">Possible widths of CBOR_TYPE_FLOAT_CTRL items. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00054">data.h:54</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_ad8316cf8b830431ef9ce9562ae679563"><div class="ttname"><a href="floats__ctrls_8c.html#ad8316cf8b830431ef9ce9562ae679563">cbor_float_get_float</a></div><div class="ttdeci">double cbor_float_get_float(const cbor_item_t *item)</div><div class="ttdoc">Get the float value represented as double. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00052">floats_ctrls.c:52</a></div></div>
<div class="ttc" id="structcbor__item__t_html_a7d97fa5cdf027ca0499c37ec19acf843"><div class="ttname"><a href="structcbor__item__t.html#a7d97fa5cdf027ca0499c37ec19acf843">cbor_item_t::metadata</a></div><div class="ttdeci">union cbor_item_metadata metadata</div><div class="ttdoc">Discriminated by type. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00151">data.h:151</a></div></div>
<div class="ttc" id="data_8h_html_ac80d3ecbbdc88d96a7396ac986ee47e7ac3c49d03756f116648957c5d996f48b4"><div class="ttname"><a href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7ac3c49d03756f116648957c5d996f48b4">CBOR_FLOAT_0</a></div><div class="ttdoc">Internal use - ctrl and special values. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00055">data.h:55</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_a9884b85abd0c0637a4377168d034260f"><div class="ttname"><a href="floats__ctrls_8c.html#a9884b85abd0c0637a4377168d034260f">cbor_build_float2</a></div><div class="ttdeci">cbor_item_t * cbor_build_float2(float value)</div><div class="ttdoc">Constructs a new float. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00165">floats_ctrls.c:165</a></div></div>
<div class="ttc" id="data_8h_html_a6454b577999b479ac2585af7c204ae3bac8748342f8c8e6468de589a86cf736cc"><div class="ttname"><a href="data_8h.html#a6454b577999b479ac2585af7c204ae3bac8748342f8c8e6468de589a86cf736cc">CBOR_CTRL_NONE</a></div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00069">data.h:69</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_a7d40d18664a72a266ce98030d30a7377"><div class="ttname"><a href="floats__ctrls_8c.html#a7d40d18664a72a266ce98030d30a7377">cbor_new_undef</a></div><div class="ttdeci">cbor_item_t * cbor_new_undef()</div><div class="ttdoc">Constructs new under ctrl item. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00153">floats_ctrls.c:153</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_af31b0a42b2dd7f29efe42385bd4a58f1"><div class="ttname"><a href="floats__ctrls_8c.html#af31b0a42b2dd7f29efe42385bd4a58f1">cbor_build_ctrl</a></div><div class="ttdeci">cbor_item_t * cbor_build_ctrl(uint8_t value)</div><div class="ttdoc">Constructs a ctrl item. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00186">floats_ctrls.c:186</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_a5218f8557e64441e9085f6b9478bfd06"><div class="ttname"><a href="floats__ctrls_8c.html#a5218f8557e64441e9085f6b9478bfd06">cbor_build_bool</a></div><div class="ttdeci">cbor_item_t * cbor_build_bool(bool value)</div><div class="ttdoc">Constructs new boolean ctrl item. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00160">floats_ctrls.c:160</a></div></div>
<div class="ttc" id="data_8h_html_a6454b577999b479ac2585af7c204ae3ba5354f70478e0acf68bf1682229b05b6d"><div class="ttname"><a href="data_8h.html#a6454b577999b479ac2585af7c204ae3ba5354f70478e0acf68bf1682229b05b6d">CBOR_CTRL_UNDEF</a></div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00073">data.h:73</a></div></div>
<div class="ttc" id="floats__ctrls_8h_html"><div class="ttname"><a href="floats__ctrls_8h.html">floats_ctrls.h</a></div></div>
<div class="ttc" id="structcbor__item__t_html_a6743a75cf89e1b455ddf3198ff98842a"><div class="ttname"><a href="structcbor__item__t.html#a6743a75cf89e1b455ddf3198ff98842a">cbor_item_t::type</a></div><div class="ttdeci">cbor_type type</div><div class="ttdoc">Major type discriminator. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00155">data.h:155</a></div></div>
<div class="ttc" id="data_8h_html_a3a931b40fc31b51cccfd1bc3dc5fc5d6a1276dcc4ac56df5fd7e0270344a6e57d"><div class="ttname"><a href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a1276dcc4ac56df5fd7e0270344a6e57d">CBOR_TYPE_FLOAT_CTRL</a></div><div class="ttdoc">7 - decimals and special values (true, false, nil, ...) </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00032">data.h:32</a></div></div>
<div class="ttc" id="common_8h_html_a07a781e9212fad361b0f59f7fc921057"><div class="ttname"><a href="common_8h.html#a07a781e9212fad361b0f59f7fc921057">_CBOR_MALLOC</a></div><div class="ttdeci">#define _CBOR_MALLOC</div><div class="ttdef"><b>Definition:</b> <a href="common_8h_source.html#l00084">common.h:84</a></div></div>
<div class="ttc" id="structcbor__item__t_html_a6bb24fe655f086c6aa9a66d427e09cca"><div class="ttname"><a href="structcbor__item__t.html#a6bb24fe655f086c6aa9a66d427e09cca">cbor_item_t::refcount</a></div><div class="ttdeci">size_t refcount</div><div class="ttdoc">Reference count - initialize to 0. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00153">data.h:153</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_a5f5d397684bc2118f36d720c61318e7d"><div class="ttname"><a href="floats__ctrls_8c.html#a5f5d397684bc2118f36d720c61318e7d">cbor_set_ctrl</a></div><div class="ttdeci">void cbor_set_ctrl(cbor_item_t *item, uint8_t value)</div><div class="ttdoc">Assign a control value. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00085">floats_ctrls.c:85</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_a1e3e9757ac809b6df56f1095a87bfdad"><div class="ttname"><a href="floats__ctrls_8c.html#a1e3e9757ac809b6df56f1095a87bfdad">cbor_build_float4</a></div><div class="ttdeci">cbor_item_t * cbor_build_float4(float value)</div><div class="ttdoc">Constructs a new float. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00172">floats_ctrls.c:172</a></div></div>
<div class="ttc" id="data_8h_html_ac80d3ecbbdc88d96a7396ac986ee47e7a792f18e66a6da153eb4f40a8f894c653"><div class="ttname"><a href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a792f18e66a6da153eb4f40a8f894c653">CBOR_FLOAT_64</a></div><div class="ttdoc">Double. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00058">data.h:58</a></div></div>
<div class="ttc" id="data_8h_html_ac80d3ecbbdc88d96a7396ac986ee47e7a6a044cc40003cef84432fe92780514e5"><div class="ttname"><a href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a6a044cc40003cef84432fe92780514e5">CBOR_FLOAT_16</a></div><div class="ttdoc">Half float. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00056">data.h:56</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_a6154cefb44f9df7685a5f80d0a1e7379"><div class="ttname"><a href="floats__ctrls_8c.html#a6154cefb44f9df7685a5f80d0a1e7379">cbor_new_ctrl</a></div><div class="ttdeci">cbor_item_t * cbor_new_ctrl()</div><div class="ttdoc">Constructs a new ctrl item. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00098">floats_ctrls.c:98</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_af5b06827916da81a32a1d68dd0727bb1"><div class="ttname"><a href="floats__ctrls_8c.html#af5b06827916da81a32a1d68dd0727bb1">cbor_new_float4</a></div><div class="ttdeci">cbor_item_t * cbor_new_float4()</div><div class="ttdoc">Constructs a new float item. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00122">floats_ctrls.c:122</a></div></div>
<div class="ttc" id="common_8c_html_a4dde28c548375aa954f1cad15b3739aa"><div class="ttname"><a href="common_8c.html#a4dde28c548375aa954f1cad15b3739aa">cbor_is_float</a></div><div class="ttdeci">bool cbor_is_float(const cbor_item_t *item)</div><div class="ttdoc">Is the item an a floating point number? </div><div class="ttdef"><b>Definition:</b> <a href="common_8c_source.html#l00087">common.c:87</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_ad504d3d291810b0c39fc498be0bd2639"><div class="ttname"><a href="floats__ctrls_8c.html#ad504d3d291810b0c39fc498be0bd2639">cbor_float_get_float4</a></div><div class="ttdeci">float cbor_float_get_float4(const cbor_item_t *item)</div><div class="ttdoc">Get a single precision float. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00038">floats_ctrls.c:38</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_a9d15faa0a33797ce0b8a1a66d5773d88"><div class="ttname"><a href="floats__ctrls_8c.html#a9d15faa0a33797ce0b8a1a66d5773d88">cbor_ctrl_value</a></div><div class="ttdeci">uint8_t cbor_ctrl_value(const cbor_item_t *item)</div><div class="ttdoc">Reads the control value. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00018">floats_ctrls.c:18</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_a128574918683dbe68c7dd5256e4f6bf3"><div class="ttname"><a href="floats__ctrls_8c.html#a128574918683dbe68c7dd5256e4f6bf3">cbor_new_float8</a></div><div class="ttdeci">cbor_item_t * cbor_new_float8()</div><div class="ttdoc">Constructs a new float item. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00134">floats_ctrls.c:134</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_a05778dc7349be636d47440f758ec96a6"><div class="ttname"><a href="floats__ctrls_8c.html#a05778dc7349be636d47440f758ec96a6">cbor_float_get_width</a></div><div class="ttdeci">cbor_float_width cbor_float_get_width(const cbor_item_t *item)</div><div class="ttdoc">Get the float width. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00012">floats_ctrls.c:12</a></div></div>
<div class="ttc" id="common_8c_html_a983dec76e934c49ed6979226f9db4386"><div class="ttname"><a href="common_8c.html#a983dec76e934c49ed6979226f9db4386">cbor_isa_float_ctrl</a></div><div class="ttdeci">bool cbor_isa_float_ctrl(const cbor_item_t *item)</div><div class="ttdoc">Does the item have the appropriate major type? </div><div class="ttdef"><b>Definition:</b> <a href="common_8c_source.html#l00053">common.c:53</a></div></div>
<div class="ttc" id="struct__cbor__float__ctrl__metadata_html_aeeb531a44e6502b5f1bd2aece6dffaa2"><div class="ttname"><a href="struct__cbor__float__ctrl__metadata.html#aeeb531a44e6502b5f1bd2aece6dffaa2">_cbor_float_ctrl_metadata::ctrl</a></div><div class="ttdeci">uint8_t ctrl</div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00122">data.h:122</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_a62a2ed2815d844fd54474f30ebbd0f6f"><div class="ttname"><a href="floats__ctrls_8c.html#a62a2ed2815d844fd54474f30ebbd0f6f">cbor_set_float8</a></div><div class="ttdeci">void cbor_set_float8(cbor_item_t *item, double value)</div><div class="ttdoc">Assigns a float value. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00078">floats_ctrls.c:78</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_aa85d79e0f060173a9dccdada2e551cf9"><div class="ttname"><a href="floats__ctrls_8c.html#aa85d79e0f060173a9dccdada2e551cf9">cbor_float_get_float2</a></div><div class="ttdeci">float cbor_float_get_float2(const cbor_item_t *item)</div><div class="ttdoc">Get a half precision float. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00031">floats_ctrls.c:31</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_aad0e4103cf703b5c3e856956f5a2fb96"><div class="ttname"><a href="floats__ctrls_8c.html#aad0e4103cf703b5c3e856956f5a2fb96">cbor_build_float8</a></div><div class="ttdeci">cbor_item_t * cbor_build_float8(double value)</div><div class="ttdoc">Constructs a new float. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00179">floats_ctrls.c:179</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_a480b38bd08feb75b1bc705850595b4ee"><div class="ttname"><a href="floats__ctrls_8c.html#a480b38bd08feb75b1bc705850595b4ee">cbor_new_null</a></div><div class="ttdeci">cbor_item_t * cbor_new_null()</div><div class="ttdoc">Constructs new null ctrl item. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00146">floats_ctrls.c:146</a></div></div>
<div class="ttc" id="struct__cbor__float__ctrl__metadata_html_a19a1c5e96c662dd4781f0172052b194c"><div class="ttname"><a href="struct__cbor__float__ctrl__metadata.html#a19a1c5e96c662dd4781f0172052b194c">_cbor_float_ctrl_metadata::width</a></div><div class="ttdeci">cbor_float_width width</div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00121">data.h:121</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_a2f215940998d05730b23b7e0e7ad8ebe"><div class="ttname"><a href="floats__ctrls_8c.html#a2f215940998d05730b23b7e0e7ad8ebe">cbor_float_get_float8</a></div><div class="ttdeci">double cbor_float_get_float8(const cbor_item_t *item)</div><div class="ttdoc">Get a double precision float. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00045">floats_ctrls.c:45</a></div></div>
<div class="ttc" id="common_8c_html_a5618a3689e31829f4f84da008e20798e"><div class="ttname"><a href="common_8c.html#a5618a3689e31829f4f84da008e20798e">cbor_is_bool</a></div><div class="ttdeci">bool cbor_is_bool(const cbor_item_t *item)</div><div class="ttdoc">Is the item an a boolean? </div><div class="ttdef"><b>Definition:</b> <a href="common_8c_source.html#l00071">common.c:71</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_a1b332d66de1b49f202b257dc1d245c30"><div class="ttname"><a href="floats__ctrls_8c.html#a1b332d66de1b49f202b257dc1d245c30">cbor_new_float2</a></div><div class="ttdeci">cbor_item_t * cbor_new_float2()</div><div class="ttdoc">Constructs a new float item. </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00110">floats_ctrls.c:110</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_ac0c984ec79209ad710dd960ca9566f16"><div class="ttname"><a href="floats__ctrls_8c.html#ac0c984ec79209ad710dd960ca9566f16">cbor_ctrl_is_bool</a></div><div class="ttdeci">bool cbor_ctrl_is_bool(const cbor_item_t *item)</div><div class="ttdoc">Is this ctrl item a boolean? </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00092">floats_ctrls.c:92</a></div></div>
<div class="ttc" id="structcbor__item__t_html_a5c6dde1dbef5aad748c49786352eef44"><div class="ttname"><a href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">cbor_item_t::data</a></div><div class="ttdeci">unsigned char * data</div><div class="ttdoc">Raw data block - interpretation depends on metadata. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00157">data.h:157</a></div></div>
<div class="ttc" id="floats__ctrls_8c_html_a2b304df65e44de17064bc3de154522fa"><div class="ttname"><a href="floats__ctrls_8c.html#a2b304df65e44de17064bc3de154522fa">cbor_float_ctrl_is_ctrl</a></div><div class="ttdeci">bool cbor_float_ctrl_is_ctrl(const cbor_item_t *item)</div><div class="ttdoc">Is this a ctrl value? </div><div class="ttdef"><b>Definition:</b> <a href="floats__ctrls_8c_source.html#l00025">floats_ctrls.c:25</a></div></div>
<div class="ttc" id="data_8h_html_a6454b577999b479ac2585af7c204ae3babbcec81d7145fdf31329e07a0bb064bd"><div class="ttname"><a href="data_8h.html#a6454b577999b479ac2585af7c204ae3babbcec81d7145fdf31329e07a0bb064bd">CBOR_CTRL_FALSE</a></div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00070">data.h:70</a></div></div>
<div class="ttc" id="structcbor__item__t_html"><div class="ttname"><a href="structcbor__item__t.html">cbor_item_t</a></div><div class="ttdoc">The item handle. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00149">data.h:149</a></div></div>
<div class="ttc" id="data_8h_html_ac80d3ecbbdc88d96a7396ac986ee47e7a0b2ba87d2508e98e5f6fee7bf8beedd4"><div class="ttname"><a href="data_8h.html#ac80d3ecbbdc88d96a7396ac986ee47e7a0b2ba87d2508e98e5f6fee7bf8beedd4">CBOR_FLOAT_32</a></div><div class="ttdoc">Single float. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00057">data.h:57</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Feb 6 2017 00:26:19 for libcbor by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.12
</small></address>
</body>
</html>