dmdbctl - command-line interface to DMPACK observation databases
dmdbctl --help
dmdbctl --version
dmdbctl --database file --id id [--create|--read|--update|--delete type] [--name name] [--meta meta] [--node id] [--type sensor] [--sn sn] [--state n] [--x x] [--y y] [--z z] [--lon lon] [--lat lat] [--alt alt] [--verbose]
The dmdbctl utility program performs create, read, update, or delete operations on the observation database:
- Create
-
Add nodes, sensors, and targets to the database.
- Read
-
Read nodes, sensors, and targets from database. Print the records to standard output.
- Update
-
Update nodes, sensors, and targets in the database.
- Delete
-
Delete nodes, sensors, and targets from the database.
Only nodes, sensors, and targets are supported. All data attributes are passed through command-line arguments.
- --alt, -A alt
-
Altitude of node, sensor, or target in metres.
- --create, -C [node|sensor|target]
-
Create database record (node, sensor, or target).
- --database, -d file
-
Path to SQLite observation database.
- --delete, -D [node|sensor|target]
-
Delete database record (node, sensor, or target).
- --help, -h
-
Output available command-line arguments and quit.
- --id, -I id
-
ID of node, sensor, or target.
- --lat, -L lat
-
Latitude of node, sensor, or target in degrees (decimal).
- --lon, -G lon
-
Longitude node, sensor, or target in degrees (decimal).
- --meta, -M meta
-
Meta description of node, sensor, or target.
- --name, -n name
-
Name of node, sensor, or target.
- --node, -N id
-
ID of the node the sensor is attached to.
- --read, -R [node|sensor|target]
-
Read database record (node, sensor, or target).
- --sn, -Q sn
-
Serial number of sensor.
- --state, -S n
-
Target state.
- --type, -t sensor
-
Sensor type, for example,
none
,fs
,process
, ortps
. - --update, -U [node|sensor|target]
-
Update database record (node, sensor, or target).
- --verbose, -V
-
Print additional log messages to stderr.
- --version, -v
-
Output version information and quit.
- --x, -X x
-
Node, sensor, or target x, usually in metres. May be in local or global coordinate system.
- --y, -Y z
-
Node, sensor, or target z, usually in metres. May be in local or global coordinate system.
- --z, -Z z
-
Node, sensor, or target z, usually in metres. May be in local or global coordinate system.
- 0
-
Success. Database operation finished without error.
- 1
-
Failure. Database operation failed.
Add a new node of id dummy-node
to the database:
$ dmdbctl --database observ.sqlite --create node --id dummy-node --name "Dummy Node"
Delete target dummy-target
from database:
$ dmdbctl --database observ.sqlite --delete target --id dummy-target
Update the meta description of sensor dummy-sensor
:
$ dmdbctl --database observ.sqlite --update sensor --id dummy-sensor --meta "in service"
Project web site: https://www.dabamos.de/