ocaml-opentelemetry/cstruct/Cstruct/HE/index.html
2026-04-06 19:57:49 +00:00

2 lines
5.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>HE (cstruct.Cstruct.HE)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../index.html">Index</a> &#x00BB; <a href="../../index.html">cstruct</a> &#x00BB; <a href="../index.html">Cstruct</a> &#x00BB; HE</nav><header class="odoc-preamble"><h1>Module <code><span>Cstruct.HE</span></code></h1><p>Get/set host-endian integers of various sizes. The second argument of those functions is the position relative to the current offset of the cstruct.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-get_uint16"><a href="#val-get_uint16" class="anchor"></a><code><span><span class="keyword">val</span> get_uint16 : <span><a href="../index.html#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>int <span class="arrow">&#45;&gt;</span></span> <a href="../index.html#type-uint16">uint16</a></span></code></div><div class="spec-doc"><p><code>get_uint16 cstr off</code> is the 16 bit long host-endian unsigned integer stored in <code>cstr</code> at offset <code>off</code>.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <code>Invalid_argument</code> <p>if the buffer is too small.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get_uint32"><a href="#val-get_uint32" class="anchor"></a><code><span><span class="keyword">val</span> get_uint32 : <span><a href="../index.html#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>int <span class="arrow">&#45;&gt;</span></span> <a href="../index.html#type-uint32">uint32</a></span></code></div><div class="spec-doc"><p><code>get_uint32 cstr off</code> is the 32 bit long host-endian unsigned integer stored in <code>cstr</code> at offset <code>off</code>.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <code>Invalid_argument</code> <p>if the buffer is too small.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get_uint64"><a href="#val-get_uint64" class="anchor"></a><code><span><span class="keyword">val</span> get_uint64 : <span><a href="../index.html#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>int <span class="arrow">&#45;&gt;</span></span> <a href="../index.html#type-uint64">uint64</a></span></code></div><div class="spec-doc"><p><code>get_uint64 cstr off</code> is the 64 bit long host-endian unsigned integer stored in <code>cstr</code> at offset <code>off</code>.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <code>Invalid_argument</code> <p>if the buffer is too small.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-set_uint16"><a href="#val-set_uint16" class="anchor"></a><code><span><span class="keyword">val</span> set_uint16 : <span><a href="../index.html#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>int <span class="arrow">&#45;&gt;</span></span> <span><a href="../index.html#type-uint16">uint16</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>set_uint16 cstr off i</code> writes the 16 bit long host-endian unsigned integer <code>i</code> at offset <code>off</code> of <code>cstr</code>.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <code>Invalid_argument</code> <p>if the buffer is too small.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-set_uint32"><a href="#val-set_uint32" class="anchor"></a><code><span><span class="keyword">val</span> set_uint32 : <span><a href="../index.html#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>int <span class="arrow">&#45;&gt;</span></span> <span><a href="../index.html#type-uint32">uint32</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>set_uint32 cstr off i</code> writes the 32 bit long host-endian unsigned integer <code>i</code> at offset <code>off</code> of <code>cstr</code>.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <code>Invalid_argument</code> <p>if the buffer is too small.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-set_uint64"><a href="#val-set_uint64" class="anchor"></a><code><span><span class="keyword">val</span> set_uint64 : <span><a href="../index.html#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>int <span class="arrow">&#45;&gt;</span></span> <span><a href="../index.html#type-uint64">uint64</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>set_uint64 cstr off i</code> writes the 64 bit long host-endian unsigned integer <code>i</code> at offset <code>off</code> of <code>cstr</code>.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <code>Invalid_argument</code> <p>if the buffer is too small.</p></li></ul></div></div></div></body></html>