<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-cbc/+/22407">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">manual: Document cbc-apitool.py<br><br>Change-Id: I2a65e7a582c8bb72d80731fb6e77a796ae4f9b4c<br>---<br>A doc/manuals/chapters/cbc-apitool.adoc<br>M doc/manuals/osmocbc-usermanual.adoc<br>2 files changed, 81 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/07/22407/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/doc/manuals/chapters/cbc-apitool.adoc b/doc/manuals/chapters/cbc-apitool.adoc</span><br><span>new file mode 100644</span><br><span>index 0000000..145d845</span><br><span>--- /dev/null</span><br><span>+++ b/doc/manuals/chapters/cbc-apitool.adoc</span><br><span>@@ -0,0 +1,79 @@</span><br><span style="color: hsl(120, 100%, 40%);">+[[apitool]]</span><br><span style="color: hsl(120, 100%, 40%);">+== `cbc-apitool.py`</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+`cbc-apitool.py` is a very simple/basic python3 script that can be used</span><br><span style="color: hsl(120, 100%, 40%);">+to demonstrate the use of the ECBE REST interface (<<ecbe>>) from the</span><br><span style="color: hsl(120, 100%, 40%);">+command line.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+It uses the python3 standard librariy `requests` in order to issue ECBE</span><br><span style="color: hsl(120, 100%, 40%);">+API request over HTTP towards osmo-cbc.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+`cbc-apitool.py` has a couple of sub-commands, each of which offer</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+=== Common options</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+*-h, --help*::</span><br><span style="color: hsl(120, 100%, 40%);">+        Print a short help message about the supported common options.</span><br><span style="color: hsl(120, 100%, 40%);">+*-H, --host HOST*::</span><br><span style="color: hsl(120, 100%, 40%);">+        Remote host name/IP to which to connect (typically your ECBE</span><br><span style="color: hsl(120, 100%, 40%);">+        bind address of osmo-cbc). Default: 127.0.0.1.</span><br><span style="color: hsl(120, 100%, 40%);">+*-p, --port PORT*::</span><br><span style="color: hsl(120, 100%, 40%);">+        Remote TCP port number to which to connect (typically your ECBE</span><br><span style="color: hsl(120, 100%, 40%);">+        bind address of osmo-cbc). Default: 12345</span><br><span style="color: hsl(120, 100%, 40%);">+*-v, --verbose*::</span><br><span style="color: hsl(120, 100%, 40%);">+        Print some more verbose information like the HTTP requests</span><br><span style="color: hsl(120, 100%, 40%);">+        and responses during execution.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+=== `create-cbs`: Creating a new CBS message</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+You can create a new CBS message using `cbc-apitool create-cbs`.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+==== `create-cbs` Options</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+*-h, --help*::</span><br><span style="color: hsl(120, 100%, 40%);">+        Print a short help message about the supported create-cbs options.</span><br><span style="color: hsl(120, 100%, 40%);">+*--msg-id MSG_ID*::</span><br><span style="color: hsl(120, 100%, 40%);">+        Specify the message ID of the to-be-created CBS</span><br><span style="color: hsl(120, 100%, 40%);">+        message. Range: 0..65535</span><br><span style="color: hsl(120, 100%, 40%);">+*--msg-code MSG_CODE*::</span><br><span style="color: hsl(120, 100%, 40%);">+        Specify the message code (part of the serial number). Range:</span><br><span style="color: hsl(120, 100%, 40%);">+        0..1023. Default: 768</span><br><span style="color: hsl(120, 100%, 40%);">+*--update-nr UPDATE_NR*::</span><br><span style="color: hsl(120, 100%, 40%);">+        Specify the update number (part of the serial number). Range:</span><br><span style="color: hsl(120, 100%, 40%);">+        0..15.  Default: 0</span><br><span style="color: hsl(120, 100%, 40%);">+*--repetition-period REPETITION_PERIOD*::</span><br><span style="color: hsl(120, 100%, 40%);">+        How frequently this message shall be repeated (in number of CBCH</span><br><span style="color: hsl(120, 100%, 40%);">+        slots).  Default: 5</span><br><span style="color: hsl(120, 100%, 40%);">+*--num-of-bcast NUM_OF_BCAST*::</span><br><span style="color: hsl(120, 100%, 40%);">+        Number of times this message shall be broadcast (Default: 999).</span><br><span style="color: hsl(120, 100%, 40%);">+*--payload-data-utf8 PAYLOAD_DATA_UTF8*::</span><br><span style="color: hsl(120, 100%, 40%);">+        Payload data (typically text message) in UTF8 encoding.  Will be</span><br><span style="color: hsl(120, 100%, 40%);">+        transcoded to 7bit GSM alphabet internally.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+==== `create-etws` Options</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+*-h, --help*::</span><br><span style="color: hsl(120, 100%, 40%);">+        Print a short help message about the supported create-cbs options.</span><br><span style="color: hsl(120, 100%, 40%);">+*--msg-id MSG_ID*::</span><br><span style="color: hsl(120, 100%, 40%);">+        Specify the message ID of the to-be-created CBS</span><br><span style="color: hsl(120, 100%, 40%);">+        message. Range: 0..65535</span><br><span style="color: hsl(120, 100%, 40%);">+*--msg-code MSG_CODE*::</span><br><span style="color: hsl(120, 100%, 40%);">+        Specify the message code (part of the serial number). Range:</span><br><span style="color: hsl(120, 100%, 40%);">+        0..1023. Default: 768</span><br><span style="color: hsl(120, 100%, 40%);">+*--update-nr UPDATE_NR*::</span><br><span style="color: hsl(120, 100%, 40%);">+        Specify the update number (part of the serial number). Range:</span><br><span style="color: hsl(120, 100%, 40%);">+        0..15.  Default: 0</span><br><span style="color: hsl(120, 100%, 40%);">+*--repetition-period REPETITION_PERIOD*::</span><br><span style="color: hsl(120, 100%, 40%);">+        How frequently this message shall be repeated (in number of CBCH</span><br><span style="color: hsl(120, 100%, 40%);">+        slots).  Default: 5</span><br><span style="color: hsl(120, 100%, 40%);">+*--num-of-bcast NUM_OF_BCAST*::</span><br><span style="color: hsl(120, 100%, 40%);">+        Number of times this message shall be broadcast (Default: 999).</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+==== `delete` Options</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+*--msg-id MSG_ID*::</span><br><span style="color: hsl(120, 100%, 40%);">+        Specify the message ID of the to-be-created CBS</span><br><span style="color: hsl(120, 100%, 40%);">+        message. Range: 0..65535</span><br><span>diff --git a/doc/manuals/osmocbc-usermanual.adoc b/doc/manuals/osmocbc-usermanual.adoc</span><br><span>index e08586d..31406dd 100644</span><br><span>--- a/doc/manuals/osmocbc-usermanual.adoc</span><br><span>+++ b/doc/manuals/osmocbc-usermanual.adoc</span><br><span>@@ -18,6 +18,8 @@</span><br><span> </span><br><span> include::{srcdir}/chapters/ecbe-rest-interface.adoc[]</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+include::{srcdir}/chapters/cbc-apitool.adoc[]</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> include::./common/chapters/counters-overview.adoc[]</span><br><span> </span><br><span> include::{srcdir}/chapters/counters.adoc[]</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-cbc/+/22407">change 22407</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-cbc/+/22407"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-cbc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I2a65e7a582c8bb72d80731fb6e77a796ae4f9b4c </div>
<div style="display:none"> Gerrit-Change-Number: 22407 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>