Skip to content

Commit

Permalink
Minor updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
interkosmos committed Dec 8, 2024
1 parent 26ee8f6 commit 9a7ace6
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 48 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ POSIX semaphores.
* client status messages (heartbeats)
* distributed logging
* Leica GeoCOM API for Fortran
* camera access (V4L, RTSP)
* camera access (V4L2, RTSP)
* time series plotting
* Lua scripting
* MQTT and XMPP connectivity
Expand Down
34 changes: 18 additions & 16 deletions guide/guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,11 @@ $ sudo apt-get install gcc gfortran git make pkg-config
The third-party dependencies have to be installed with development headers:

....
$ sudo apt-get install --no-install-recommends libblas-dev liblapack-dev \
curl libcurl4 libcurl4-openssl-dev libfcgi-bin libfcgi-dev libmodbus5 \
libmodbus-dev libhdf5-103-1 libhdf5-dev lua5.4 liblua5.4 liblua5.4-dev \
libpcre2-8-0 libpcre2-dev sqlite3 libsqlite3-0 libsqlite3-dev libstrophe0 \
libstrophe-dev zlib1g zlib1g-dev libzstd1 libzstd-dev ffmpeg graphicsmagick \
gnuplot
$ sudo apt-get install --no-install-recommends curl ffmpeg gnuplot graphicsmagick \
libblas-dev libcurl4 libcurl4-openssl-dev libfcgi-bin libfcgi-dev libhdf5-103-1 \
libhdf5-dev liblapack-dev liblua5.4 liblua5.4-dev libmodbus5 libmodbus-dev \
libpcre2-8-0 libpcre2-dev libsqlite3-0 libsqlite3-dev libstrophe0 libstrophe-dev \
libzstd1 libzstd-dev lua5.4 sqlite3 zlib1g zlib1g-dev
....

Instead of package `gnuplot`, you may prefer the no-X11 flavour `gnuplot-nox` if
Expand Down Expand Up @@ -337,7 +336,7 @@ Or, to install to directory `/opt`, run:
$ sudo make install PREFIX=/opt
....

Path `/opt/bin` must be added to the global `PATH` environment variable to run
Path `/opt/bin/` must be added to the global `PATH` environment variable to run
DMPACK programs from the command-line.

[NOTE]
Expand Down Expand Up @@ -400,7 +399,7 @@ First, install the build and run-time dependencies:

....
$ doas pkg install archivers/zstd comms/libmodbus databases/sqlite3 devel/git \
devel/pcre2 devel/pkgconf ftp/curl graphics/GraphicMagick lang/gcc \
devel/pcre2 devel/pkgconf ftp/curl graphics/GraphicsMagick lang/gcc \
lang/lua54 math/gnuplot math/lapack multimedia/ffmpeg net-im/libstrophe \
science/hdf5 www/fcgi
....
Expand Down Expand Up @@ -2776,6 +2775,9 @@ for MariaDB, MySQL, MS SQL Server, PostgreSQL, and SQLite. For Windows only.
(GPLv2)
link:https://www.phpliteadmin.org/[phpLiteAdmin]:: A web front-end for SQLite
database administration written in PHP. (GPLv3)
link:https://sqlitestudio.pl/[SQLiteStudio]:: A free, open source, and
multi-platform SQLite database manager written in C++ that is based on the Qt
framework. (GPLv3)
link:https://github.com/coleifer/sqlite-web[SQLite Web]:: A web-based SQLite
database browser in Python. (MIT)

Expand Down Expand Up @@ -3223,7 +3225,7 @@ target_id = "target-1"
observs = {
-- List of sensor commands to be send to the DKRF400.
{
-- 1) Start the sensor by sending a single carriage return.
-- (1) Start the sensor by sending a single carriage return.
name = "start", -- Observation name (required).
target_id = target_id, -- Target id (required).
receivers = { }, -- List of receivers (up to 16).
Expand All @@ -3238,9 +3240,9 @@ observs = {
}
},
{
-- 2) Stop "Meter Mode". The sensor response will be ignored if no delimiter
-- is set (as the DKRF400 does not always return a response to the
-- command).
-- (2) Stop "Meter Mode". The sensor response will be ignored if no delimiter
-- is set (as the DKRF400 does not always return a response to the
-- command).
name = "stop", -- Observation name (required).
target_id = target_id, -- Target id (required).
receivers = { }, -- List of receivers (up to 16).
Expand All @@ -3255,7 +3257,7 @@ observs = {
}
},
{
-- 3) Perform single measurement.
-- (3) Perform single measurement.
name = "meter", -- Observation name (required).
target_id = target_id, -- Target id (required).
receivers = { "dmdb" }, -- List of receivers (up to 16).
Expand Down Expand Up @@ -3296,21 +3298,21 @@ dmserial = {
rts = true, -- TTY Request To Send (RTS) enabled.
jobs = { -- List of jobs to perform.
{
-- 1) Start sensor.
-- (1) Start sensor.
disabled = false, -- Skip job.
onetime = true, -- Run job only once.
observation = observs[1], -- Observation to perform.
delay = 2000 -- Delay in msec to wait afterwards.
},
{
-- 2) Stop "Meter Mode".
-- (2) Stop "Meter Mode".
disabled = false, -- Skip job.
onetime = true, -- Run job only once.
observation = observs[2], -- Observation to perform.
delay = 2000 -- Delay in msec to wait afterwards.
},
{
-- 3) Measure values.
-- (3) Measure values.
disabled = false, -- Skip job.
onetime = false, -- Run job only once.
observation = observs[3], -- Observation to perform.
Expand Down
2 changes: 1 addition & 1 deletion src/dm_ansi.f90
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module dm_ansi
!! print '(2a)', ANSI_CLEAR_SCREEN, 'Hello, World!'
!! ```
!!
!! The foreground colour may be changed through routine
!! The foreground colour can be changed through routine
!! `dm_ansi_color()`.
!!
!! You may want to disable ANSI colour output depending on whether
Expand Down
5 changes: 3 additions & 2 deletions src/dm_arg.f90
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ module dm_arg
!! `ARG_TYPE_LOGICAL`. The command-line arguments `--help`/-`h` and
!! `--version`/`-v` are processed automatically by function `dm_arg_read()`.
!!
!! Additionally, you can pass a callback routine that outputs the version
!! string to `dm_arg_read()`.
!! Additionally, you can pass a callback routine to `dm_arg_read()` that
!! outputs the version string.
use :: dm_ascii
use :: dm_error
use :: dm_file
Expand Down Expand Up @@ -59,6 +59,7 @@ module dm_arg

abstract interface
subroutine dm_arg_version_callback()
!! Callback routine that outputs the version information.
end subroutine dm_arg_version_callback
end interface

Expand Down
6 changes: 3 additions & 3 deletions src/dm_camera.f90
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
! Author: Philipp Engel
! Licence: ISC
module dm_camera
!! Module for taking still images from RTSP video streams and USB webcams,
!! using FFmpeg.
!! Module for taking still images from RTSP video streams and USB webcams
!! (V4L2), using FFmpeg.
!!
!! On Linux, install the packages `ffmpeg` and `v4l-utils`:
!!
Expand All @@ -22,7 +22,7 @@ module dm_camera
!!
!! The following example captures an image from an attached USB webcam at
!! `/dev/video0` and adds a timestamp in ISO 8601 format to it using
!! GraphicMagick:
!! GraphicsMagick:
!!
!! ```fortran
!! character(len=*), parameter :: IMAGE_PATH = '/tmp/image.jpg'
Expand Down
43 changes: 23 additions & 20 deletions src/dm_csv.f90
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,9 @@ function dm_csv_header_observ(separator) result(header)
character, intent(in), optional :: separator !! CSV separator.
character(len=:), allocatable :: header !! CSV header string.

character :: s
integer :: i, j
character :: s
character(len=:), allocatable :: ai, aj
integer :: i, j

s = CSV_SEPARATOR
if (present(separator)) s = separator
Expand All @@ -248,28 +249,30 @@ function dm_csv_header_observ(separator) result(header)
end do

do i = 1, OBSERV_MAX_NREQUESTS
ai = dm_itoa(i)
header = header // s // &
'requests(' // dm_itoa(i) // ').name' // s // &
'requests(' // dm_itoa(i) // ').timestamp' // s // &
'requests(' // dm_itoa(i) // ').request' // s // &
'requests(' // dm_itoa(i) // ').response' // s // &
'requests(' // dm_itoa(i) // ').delimiter' // s // &
'requests(' // dm_itoa(i) // ').pattern' // s // &
'requests(' // dm_itoa(i) // ').delay' // s // &
'requests(' // dm_itoa(i) // ').error' // s // &
'requests(' // dm_itoa(i) // ').mode' // s // &
'requests(' // dm_itoa(i) // ').retries' // s // &
'requests(' // dm_itoa(i) // ').state' // s // &
'requests(' // dm_itoa(i) // ').timeout' // s // &
'requests(' // dm_itoa(i) // ').nresponses'
'requests(' // ai // ').name' // s // &
'requests(' // ai // ').timestamp' // s // &
'requests(' // ai // ').request' // s // &
'requests(' // ai // ').response' // s // &
'requests(' // ai // ').delimiter' // s // &
'requests(' // ai // ').pattern' // s // &
'requests(' // ai // ').delay' // s // &
'requests(' // ai // ').error' // s // &
'requests(' // ai // ').mode' // s // &
'requests(' // ai // ').retries' // s // &
'requests(' // ai // ').state' // s // &
'requests(' // ai // ').timeout' // s // &
'requests(' // ai // ').nresponses'

do j = 1, REQUEST_MAX_NRESPONSES
aj = dm_itoa(j)
header = header // s // &
'requests(' // dm_itoa(i) // ').responses(' // dm_itoa(j) // ').name' // s // &
'requests(' // dm_itoa(i) // ').responses(' // dm_itoa(j) // ').unit' // s // &
'requests(' // dm_itoa(i) // ').responses(' // dm_itoa(j) // ').type' // s // &
'requests(' // dm_itoa(i) // ').responses(' // dm_itoa(j) // ').error' // s // &
'requests(' // dm_itoa(i) // ').responses(' // dm_itoa(j) // ').value'
'requests(' // ai // ').responses(' // aj // ').name' // s // &
'requests(' // ai // ').responses(' // aj // ').unit' // s // &
'requests(' // ai // ').responses(' // aj // ').type' // s // &
'requests(' // ai // ').responses(' // aj // ').error' // s // &
'requests(' // ai // ').responses(' // aj // ').value'
end do
end do
end function dm_csv_header_observ
Expand Down
2 changes: 1 addition & 1 deletion src/dm_gm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ end function dm_gm_get_mime
integer function gm_identify(path, format, output) result(rc)
!! Identifies image with GraphicsMagick and returns result in `output`.
!!
!! * [GraphicMagick format characters](http://www.graphicsmagick.org/GraphicsMagick.html#details-format)
!! * [GraphicsMagick format characters](http://www.graphicsmagick.org/GraphicsMagick.html#details-format)
use :: dm_kind
use :: dm_pipe

Expand Down
8 changes: 4 additions & 4 deletions src/dm_logger.f90
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ module dm_logger
contains
private
! Private methods.
procedure :: fail => logger_fail
procedure :: log_args => logger_log_args
procedure :: log_type => logger_log_type
procedure :: send => logger_send
procedure :: fail => logger_fail
procedure :: log_args => logger_log_args
procedure :: log_type => logger_log_type
procedure :: send => logger_send
! Public methods.
procedure, public :: configure => logger_configure
procedure, public :: get_name => logger_get_name
Expand Down

0 comments on commit 9a7ace6

Please sign in to comment.