aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2023-08-09 13:59:56 +0200
committerGitHub <noreply@github.com>2023-08-09 13:59:56 +0200
commitcb7e62bcf70a487f0d297dd09ec9abc351a6191d (patch)
tree0e65b9c88483f9b488809572e8bc71f69b98bdc8
parent1224aa3206a460eb20b5f6cf3928d493660490f4 (diff)
parentc2290b277ba58969096d4af04b79974043dde629 (diff)
downloadmmbtools-doc-cb7e62bcf70a487f0d297dd09ec9abc351a6191d.tar.gz
mmbtools-doc-cb7e62bcf70a487f0d297dd09ec9abc351a6191d.tar.bz2
mmbtools-doc-cb7e62bcf70a487f0d297dd09ec9abc351a6191d.zip
Merge pull request #11 from colisee/master
Miscellaneous improvements
-rw-r--r--.github/workflows/build-pdf.yml10
-rw-r--r--Makefile3
-rw-r--r--README.md10
-rw-r--r--appendix.tex10
-rw-r--r--mmbtools.tex5
-rw-r--r--systemenvironments.tex20
6 files changed, 35 insertions, 23 deletions
diff --git a/.github/workflows/build-pdf.yml b/.github/workflows/build-pdf.yml
index fd71b4b..036a55c 100644
--- a/.github/workflows/build-pdf.yml
+++ b/.github/workflows/build-pdf.yml
@@ -3,6 +3,10 @@ on:
push:
branches:
- 'master'
+ paths-ignore:
+ - 'README.md'
+ - 'Makefile'
+ - 'LICENSE.txt'
workflow_dispatch:
jobs:
@@ -44,10 +48,10 @@ jobs:
# Commit mmbtools.pdf
- name: commit-pdf
run: |
- git config user.name github-actions
- git config user.email github-actions@github.com
+ git config user.name "Open Digital Radio"
+ git config user.email github@opendigitalradio.org
git add -f mmbtools.pdf
- git commit -m "generated"
+ git commit -m "generated by github action build-pdf"
working-directory: gh-pages
- name: push-pdf
diff --git a/Makefile b/Makefile
index 6ba128f..bcf134a 100644
--- a/Makefile
+++ b/Makefile
@@ -33,5 +33,4 @@ vc.tex: .git/logs/HEAD
\\gdef\\GITAuthorName{%an}" >> vc.tex
clean:
- rm -f *.aux $(latexfile).{pdf,out,toc,log,bbl,blg}
-
+ rm -f *.aux $(latexfile).{pdf,out,toc,log,bbl,blg} vc.tex
diff --git a/README.md b/README.md
index 386dc5b..ebc4d3b 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,16 @@ global perspective.
It also complements the opendigitalradio.org wiki.
+How to build locally
+--------------------
+
+The pdf document will always be created automatically by the github repository upon a push.
+However, it can be interesting to create the pdf on your host, in order to check the outcome of your changes prior to pushing them to the repository.
+
+On your debian-based host:
+1. Install the packages: `make texlive texlive-fonts-extra texlive-latex-extra texlive-science cm-super`
+1. Run the following command: `make clean && make`
+
Latest Version
--------------
diff --git a/appendix.tex b/appendix.tex
index 02da04e..e7f6dcf 100644
--- a/appendix.tex
+++ b/appendix.tex
@@ -9,7 +9,7 @@ The three formats are called \emph{framed}, \emph{streamed} and \emph{raw}.
The \emph{framed} format is used for saving a finite ETI stream into a file. Each frame does not contain any padding, and the
format can be described as follows:
-\begin{lstlisting}
+\begin{lstlisting}[language=C]
uint32_t nbFrames
// for each frame
uint16_t frameSize
@@ -18,7 +18,7 @@ uint32_t nbFrames
When streaming data, in which case the number of frames is not known in advance, the \emph{streamed} format can be used.
This format is identical to the first one except for the missing \texttt{nbFrames}.
-\begin{lstlisting}
+\begin{lstlisting}[language=C]
// for each frame
uint16_t frameSize
uint8_t data[frameSize]
@@ -26,7 +26,7 @@ This format is identical to the first one except for the missing \texttt{nbFrame
The \emph{raw} format corresponds to ETI(NI), where each frame has a constant size of 6144 Bytes. The padding in this
case is necessary.
-\begin{lstlisting}
+\begin{lstlisting}[language=C]
// for each frame
uint8_t data[6144]
\end{lstlisting}
@@ -40,7 +40,7 @@ In order to select the format, the following syntax for the \texttt{-O} option i
ODR defined and uses two additional EDI TAGs, whose content is described here.
ODR-AudioEnc inserts audio level metadata into the ``ODRa'' TAG. The TAG item is in the following format:
-\begin{lstlisting}
+\begin{lstlisting}[language=C]
TAG Name="ODRa" [4 bytes]
Length=4 [4 bytes]
Left Audio Level [signed 16-bit integer]
@@ -49,7 +49,7 @@ ODR-AudioEnc inserts audio level metadata into the ``ODRa'' TAG. The TAG item is
The second EDI TAG ``ODRv'' contains version and uptime information for the EDI source.
-\begin{lstlisting}
+\begin{lstlisting}[language=C]
TAG Name="ODRv" [4 bytes]
Length=N+4 [4 bytes]
Version [String of N bytes, UTF-8 encoded, not zero terminated]
diff --git a/mmbtools.tex b/mmbtools.tex
index 6ff8924..0fe6b1d 100644
--- a/mmbtools.tex
+++ b/mmbtools.tex
@@ -109,11 +109,10 @@ Open-Source Software-Defined \dabplus Tools}
\begin{document}
\lstset{
-language=C, % Code langugage
-basicstyle=\ttfamily, % Code font, Examples: \footnotesize, \ttfamily
+basicstyle=\ttfamily,columns=flexible, % Code font, Examples: \footnotesize, \ttfamily
keywordstyle=\color{OliveGreen}, % Keywords font ('*' = uppercase)
commentstyle=\color{gray}, % Comments font
-numbers=left, % Line nums position
+numbers=none, % Line nums position
numberstyle=\tiny, % Line-numbers fonts
stepnumber=1, % Step between two line-numbers
numbersep=5pt, % How far are line-numbers from code
diff --git a/systemenvironments.tex b/systemenvironments.tex
index 6a2355f..f51c549 100644
--- a/systemenvironments.tex
+++ b/systemenvironments.tex
@@ -230,7 +230,7 @@ configuration of the launcher within the xymon client needs to be extended.
Create a new file named \verb+odrmux.cfg+ in
\verb+/usr/lib/xymon/client/etc/clientlaunch.d+ containing the following lines:
-\begin{verbatim}
+\begin{lstlisting}
#
# Test odrmux checks the state and the statistics
# of the ODR-DabMux service.
@@ -240,7 +240,7 @@ Create a new file named \verb+odrmux.cfg+ in
CMD $XYMONCLIENTHOME/ext/retodrs.pl
LOGFILE $XYMONCLIENTLOGS/retodrs.plog
INTERVAL 5m
-\end{verbatim}
+\end{lstlisting}
After a restart of the xymon client, the script \verb+retodrs.pl+ will
be invoked once every 5 minutes.
@@ -254,9 +254,9 @@ alerting can be limited to a subset of the sub-channels by adding a tag to the
hosts-entry in the configuration file \verb+/usr/lib/xymon/server/etc/hosts.cfg+.
The additional tag is:
-\begin{verbatim}
+\begin{lstlisting}
ODR:select(<SubChannelName0>;<SubChannelName1>;...)
-\end{verbatim}
+\end{lstlisting}
The sub-channels not named will still be shown, but no alerts will be generated
for those sub-channels. This is visible as the green/yellow/red icons are
@@ -276,16 +276,16 @@ a so-called \textit{Round Robin Database}. This is accomplished by adding a file
named \verb+odr.cfg+ in \verb+/usr/lib/xymon/server/etc/xymonserver.d+
containing the following lines:
-\begin{verbatim}
+\begin{lstlisting}
TEST2RRD+=",odr_mux=devmon"
GRAPHS+=",odr_mux::1"
-\end{verbatim}
+\end{lstlisting}
The next step is to define the layout of the graph.
Create a file named \verb+graphs.odr.cfg+ in
\verb+/usr/lib/xymon/server/etc/graphs.d+ containing the following lines:
-\begin{verbatim}
+\begin{lstlisting}
#
# Graphs to show the statistics collected from an
# Opendigitalradio DabMux server.
@@ -307,7 +307,7 @@ Create a file named \verb+graphs.odr.cfg+ in
GPRINT:or@RRDIDX@:MAX:Max \: %5.1lf %s
GPRINT:or@RRDIDX@:AVERAGE:Avg \: %5.1lf %s
GPRINT:or@RRDIDX@:LAST:Cur \: %5.1lf %s\n
-\end{verbatim}
+\end{lstlisting}
\subsection{Real-time Scheduling}
@@ -344,14 +344,14 @@ protection has to be put in place to make sure the audio data cannot be altered
by third parties. Usually, some form of VPN is set up for this case.
{ \footnotesize
-\begin{verbatim}
+\begin{lstlisting}
#USRP1
SUBSYSTEMS=="usb", ATTRS{idVendor}=="fffe", ATTRS{idProduct}=="0002", MODE:="0666"
#B100
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2500", ATTRS{idProduct}=="0002", MODE:="0666"
#B200
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2500", ATTRS{idProduct}=="0020", MODE:="0666"
-\end{verbatim}
+\end{lstlisting}
}
% vim: spl=en spell tw=80 et