diff --git a/README.md b/README.md
index 3de9b0d..09feeb9 100644
--- a/README.md
+++ b/README.md
@@ -146,14 +146,14 @@ $ doas pkg install databases/sqlite3 devel/git devel/pcre2 devel/pkgconf ftp/cur
Instead of `math/gnuplot`, you may want to install `math/gnuplot-lite` which
does not depend on X11 (but lacks raster graphic terminals).
-In order to generate the man pages and the User’s Guide, install Pygments and
-AsciiDoctor:
+Optionally, install Pygments and AsciiDoctor to generate the man pages and the
+User’s Guide:
```
$ doas pkg install devel/rubygem-pygments.rb textproc/rubygem-asciidoctor
```
-The Git repository has to be cloned recursively. Otherwise, your will need to
+The Git repository has to be cloned recursively. Otherwise, you will need to
download the sub-modules manually by executing `fetchvendor.sh`. Then, run the
Makefile:
diff --git a/adoc/dmfeed.adoc b/adoc/dmfeed.adoc
index bb6a95e..f541bb8 100644
--- a/adoc/dmfeed.adoc
+++ b/adoc/dmfeed.adoc
@@ -33,6 +33,9 @@ The feed id has to be a 36 characters long UUID with hyphens. News aggregators
use the id to identify the feed. Therefore, the id should not be reused among
different feeds. Run _dmuuid(1)_ to generate a valid UUID4.
+The time stamp of the feed in the updated element is set to the date and time of
+the last log message.
+
== OPTIONS
*--author*, *-A* _name_::
diff --git a/app/dmbeat.f90 b/app/dmbeat.f90
index 477bd8a..bb2cfeb 100644
--- a/app/dmbeat.f90
+++ b/app/dmbeat.f90
@@ -10,13 +10,13 @@ program dmbeat
character(len=*), parameter :: APP_NAME = 'dmbeat'
integer, parameter :: APP_MAJOR = 0
integer, parameter :: APP_MINOR = 9
- integer, parameter :: APP_PATCH = 1
+ integer, parameter :: APP_PATCH = 2
logical, parameter :: APP_RPC_DEFLATE = .true. !! Compress RPC data.
- integer, parameter :: HOST_LEN = 80
- integer, parameter :: USERNAME_LEN = 32
- integer, parameter :: PASSWORD_LEN = 32
+ integer, parameter :: HOST_LEN = 256 !! Max. length of host name.
+ integer, parameter :: USERNAME_LEN = 256 !! Max. length of user name.
+ integer, parameter :: PASSWORD_LEN = 256 !! Max. length of password.
type :: app_type
!! Application settings.
diff --git a/app/dmdb.f90 b/app/dmdb.f90
index ff14a97..f51c014 100644
--- a/app/dmdb.f90
+++ b/app/dmdb.f90
@@ -87,8 +87,7 @@ program dmdb
call run(app, db, mqueue, sem)
end block init_block
- if (dm_is_error(rc)) call halt(1)
- call halt(0)
+ call halt(rc)
contains
integer function read_args(app) result(rc)
!! Reads command-line arguments and settings from configuration file.
@@ -180,10 +179,14 @@ integer function read_config(app) result(rc)
call dm_config_close(config)
end function read_config
- subroutine halt(stat)
+ subroutine halt(error)
!! Cleans up and stops program.
- integer, intent(in) :: stat
- integer :: rc
+ integer, intent(in), optional :: error !! DMPACK error code.
+
+ integer :: rc, stat
+
+ stat = 0
+ if (present(error)) stat = min(1, error)
rc = dm_db_close(db)
rc = dm_mqueue_close(mqueue)
@@ -287,7 +290,7 @@ subroutine signal_handler(signum) bind(c)
select case (signum)
case default
call dm_log(LOG_INFO, 'exit on signal ' // dm_itoa(signum))
- call halt(0)
+ call halt(E_NONE)
end select
end subroutine signal_handler
end program dmdb
diff --git a/app/dmfeed.f90 b/app/dmfeed.f90
index cfabf95..a978cb2 100644
--- a/app/dmfeed.f90
+++ b/app/dmfeed.f90
@@ -11,7 +11,7 @@ program dmfeed
character(len=*), parameter :: APP_NAME = 'dmfeed'
integer, parameter :: APP_MAJOR = 0
integer, parameter :: APP_MINOR = 9
- integer, parameter :: APP_PATCH = 0
+ integer, parameter :: APP_PATCH = 1
integer, parameter :: APP_MAX_NENTRIES = 500 !! Maximum number of feed entries.
@@ -21,7 +21,7 @@ program dmfeed
character(len=FILE_PATH_LEN) :: config = ' ' !! Path to config file.
character(len=FILE_PATH_LEN) :: database = ' ' !! Path to log database.
character(len=FILE_PATH_LEN) :: output = ' ' !! Output path of Atom file (stdout if empty).
- character(len=NODE_ID_LEN) :: node = ' ' !! Node id.
+ character(len=NODE_ID_LEN) :: node = ' ' !! Optional node id.
integer :: minlevel = LOG_DEBUG !! Minimum log level
integer :: maxlevel = LOG_CRITICAL !! Maximum log level.
integer :: nentries = 50 !! Max. number of entries in feed.
@@ -165,10 +165,10 @@ integer function read_config(app) result(rc)
call dm_config_close(config)
end function read_config
- subroutine create_feed(app, stat)
+ subroutine create_feed(app, error)
!! Creates Atom XML feed from logs in database.
- type(app_type), intent(inout) :: app !! App type.
- integer, intent(out), optional :: stat !! Status.
+ type(app_type), intent(inout) :: app !! App type.
+ integer, intent(out), optional :: error !! Error code.
character(len=:), allocatable :: xml
integer :: rc
@@ -211,6 +211,7 @@ subroutine create_feed(app, stat)
end if
! Create Atom XML string.
+ app%atom%updated = logs(1)%timestamp
call dm_atom_from_logs(app%atom, logs, xml)
! Write to file.
@@ -225,7 +226,7 @@ subroutine create_feed(app, stat)
rc = E_NONE
end block feed_block
- if (present(stat)) stat = rc
+ if (present(error)) error = rc
rc = dm_db_close(db)
end subroutine create_feed
end program dmfeed
diff --git a/app/dmfs.f90 b/app/dmfs.f90
index d920b98..2af0020 100644
--- a/app/dmfs.f90
+++ b/app/dmfs.f90
@@ -10,7 +10,7 @@ program dmfs
character(len=*), parameter :: APP_NAME = 'dmfs'
integer, parameter :: APP_MAJOR = 0
integer, parameter :: APP_MINOR = 9
- integer, parameter :: APP_PATCH = 0
+ integer, parameter :: APP_PATCH = 1
character, parameter :: APP_CSV_SEPARATOR = ',' !! CSV separator character.
logical, parameter :: APP_MQ_BLOCKING = .true. !! Observation forwarding is blocking.
@@ -36,7 +36,7 @@ program dmfs
end type app_type
integer :: rc ! Return code.
- type(app_type) :: app ! App configuration.
+ type(app_type) :: app ! App settings.
! Initialise DMPACK.
call dm_init()
@@ -104,30 +104,9 @@ integer function output_observ(observ, type) result(rc)
end select
end function output_observ
- integer function write_observ(observ, unit, format) result(rc)
- !! Writes observation to file unit, in CSV or JSON Lines format.
- type(observ_type), intent(inout) :: observ !! Observation to write.
- integer, intent(in) :: unit !! File unit.
- integer, intent(in) :: format !! Output format (`FORMAT_CSV`, `FORMAT_JSONL`).
-
- rc = E_INVALID
-
- select case (format)
- case (FORMAT_CSV)
- ! CSV format.
- rc = dm_csv_write(observ, unit=unit, header=.false., &
- separator=APP_CSV_SEPARATOR)
- case (FORMAT_JSONL)
- ! JSON Lines format.
- rc = dm_json_write(observ, unit=unit)
- case default
- return
- end select
- end function write_observ
-
integer function read_args(app) result(rc)
!! Reads command-line arguments and settings from configuration file.
- type(app_type), intent(inout) :: app
+ type(app_type), intent(inout) :: app !! App settings.
type(arg_type) :: args(9)
rc = E_NONE
@@ -235,19 +214,152 @@ integer function read_config(app) result(rc)
call dm_config_close(config)
end function read_config
- subroutine run(app)
- !! Performs jobs in job list.
- type(app_type), intent(inout) :: app
+ integer function read_observ(observ, node_id, sensor_id, debug) result(rc)
+ !! Reads observation from file.
+ type(observ_type), target, intent(inout) :: observ !! Observation to read.
+ character(len=*), intent(in) :: node_id !! Node id of observation.
+ character(len=*), intent(in) :: sensor_id !! Sensor id of observation.
+ logical, intent(in), optional :: debug !! Output debug messages.
character(len=LOG_MESSAGE_LEN) :: message
- integer :: delay, i, j, njobs
- integer :: fu, rc, stat
+ integer :: delay, i, j, fu, stat
+ logical :: debug_
+ type(request_type), pointer :: request ! Next request to execute.
+ type(response_type), pointer :: response ! Single response in request.
+
+ debug_ = .true.
+ if (present(debug)) debug_ = debug
+
+ ! Initialise observation.
+ observ%id = dm_uuid4()
+ observ%node_id = node_id
+ observ%sensor_id = sensor_id
+ observ%timestamp = dm_time_now()
+
+ if (observ%nrequests == 0) then
+ if (debug_) call dm_log(LOG_DEBUG, 'no requests in observ ' // observ%name, observ=observ)
+ return
+ end if
+
+ ! Read files in requests sequentially.
+ req_loop: do i = 1, observ%nrequests
+ ! Get pointer to next request.
+ request => observ%requests(i)
+
+ ! Initialise request.
+ request%timestamp = dm_time_now()
+ request%error = E_IO
+
+ ! Check if file path passed as observation request exists.
+ if (.not. dm_file_exists(request%request)) then
+ call dm_log(LOG_ERROR, 'file ' // trim(request%request) // ' not found', &
+ observ=observ, error=request%error)
+ cycle req_loop
+ end if
+
+ ! Try to open file for reading.
+ open (action='read', file=trim(request%request), iostat=stat, newunit=fu)
+ if (stat == 0) request%error = E_NONE
+
+ if (dm_is_error(request%error)) then
+ call dm_log(LOG_ERROR, 'failed to open ' // trim(request%request), &
+ observ=observ, error=request%error)
+ cycle req_loop
+ end if
+
+ ! Read until the request pattern matches.
+ read_loop: do
+ rc = E_READ
+ request%response = ' '
+
+ read (fu, '(a)', iostat=stat) request%response
+ if (is_iostat_end(stat)) exit read_loop
+ if (stat /= 0) cycle read_loop
+
+ ! Try to extract the response values.
+ rc = dm_regex_request(request)
+
+ if (dm_is_error(rc)) then
+ call dm_log(LOG_WARNING, 'failed to match response', observ=observ, error=rc)
+ cycle read_loop
+ end if
+
+ ! Check responses.
+ do j = 1, request%nresponses
+ response => request%responses(j)
+ if (dm_is_ok(response%error)) cycle
+ call dm_log(LOG_WARNING, 'failed to read response ' // response%name, &
+ observ=observ, error=response%error)
+ end do
+
+ ! Cycle on error or exit on success.
+ if (dm_is_error(rc)) cycle read_loop
+ exit read_loop
+ end do read_loop
+
+ ! Close file.
+ close (fu)
- type(job_type), target :: job ! Next job to run.
- type(observ_type), pointer :: observ ! Next observation to perform.
- type(request_type), pointer :: request ! Next request to execute.
- type(response_type), pointer :: response ! Response in request.
+ ! Save response and return code.
+ request%response = dm_ascii_escape(request%response)
+ request%error = rc
+ ! Create log message and repeat.
+ if (dm_is_error(rc)) then
+ call dm_log(LOG_ERROR, 'failed to read from file ' // request%request, observ=observ, error=rc)
+ call dm_sleep(10) ! Wait grace period.
+ cycle req_loop
+ end if
+
+ if (debug) then ! Log only if needed.
+ call dm_log(LOG_DEBUG, 'finished request ' // dm_itoa(i) // ' of ' // &
+ dm_itoa(observ%nrequests), observ=observ)
+ end if
+
+ ! Wait the set delay time of the request.
+ delay = max(0, request%delay)
+ if (delay <= 0) cycle req_loop
+
+ if (debug) then ! Log only if needed.
+ write (message, '("next request of observ ", a, " in ", i0, " sec")') trim(observ%name), delay / 1000
+ call dm_log(LOG_DEBUG, message)
+ end if
+
+ call dm_usleep(delay * 1000)
+ end do req_loop
+ end function read_observ
+
+ integer function write_observ(observ, unit, format) result(rc)
+ !! Writes observation to file unit, in CSV or JSON Lines format.
+ type(observ_type), intent(inout) :: observ !! Observation to write.
+ integer, intent(in) :: unit !! File unit.
+ integer, intent(in) :: format !! Output format (`FORMAT_CSV`, `FORMAT_JSONL`).
+
+ rc = E_INVALID
+
+ select case (format)
+ case (FORMAT_CSV)
+ ! CSV format.
+ rc = dm_csv_write(observ, unit=unit, header=.false., &
+ separator=APP_CSV_SEPARATOR)
+ case (FORMAT_JSONL)
+ ! JSON Lines format.
+ rc = dm_json_write(observ, unit=unit)
+ case default
+ return
+ end select
+ end function write_observ
+
+ subroutine run(app)
+ !! Performs jobs in job list.
+ type(app_type), intent(inout) :: app !! App settings.
+
+ integer :: delay, njobs, rc
+ logical :: debug
+ type(job_type), target :: job ! Next job to run.
+ type(observ_type), pointer :: observ ! Observation of job.
+
+ debug = (app%debug .or. app%verbose)
call dm_log(LOG_INFO, 'started ' // app%name)
! Run until no jobs are left.
@@ -269,127 +381,25 @@ subroutine run(app)
cycle job_loop
end if
- observ_if: if (job%valid) then
- ! Get pointer to observation in job, so we don't have to write
- ! `job%observ` all the time.
+ if (job%valid) then
observ => job%observ
- call dm_log(LOG_DEBUG, 'starting observ ' // observ%name, observ=observ)
+ ! Read observation from file system.
+ call dm_log(LOG_DEBUG, 'starting observ ' // trim(observ%name) // ' for sensor ' // app%sensor, observ=observ)
+ rc = read_observ(observ, app%node, app%sensor, debug=debug)
- ! Initialise observation.
- observ%id = dm_uuid4()
- observ%node_id = app%node
- observ%sensor_id = app%sensor
- observ%timestamp = dm_time_now()
-
- if (observ%nrequests == 0) then
- call dm_log(LOG_DEBUG, 'no requests in observ ' // observ%name, observ=observ)
- exit observ_if
- end if
-
- ! Read files in requests sequentially.
- req_loop: do i = 1, observ%nrequests
- ! Get pointer to next request.
- request => observ%requests(i)
-
- ! Initialise request.
- request%timestamp = dm_time_now()
- request%error = E_IO
-
- ! Check if file path passed as request command exists.
- if (.not. dm_file_exists(request%request)) then
- call dm_log(LOG_ERROR, 'file ' // trim(request%request) // ' not found', &
- observ=observ, error=request%error)
- cycle req_loop
- end if
-
- ! Try to open file for reading.
- open (action='read', file=trim(request%request), iostat=stat, newunit=fu)
-
- if (stat == 0) request%error = E_NONE
-
- if (dm_is_error(request%error)) then
- call dm_log(LOG_ERROR, 'failed to open ' // trim(request%request), &
- observ=observ, error=request%error)
- cycle req_loop
- end if
-
- ! Read until the request pattern matches.
- read_loop: do
- ! Read from file.
- rc = E_READ
- request%response = ' '
-
- read (fu, '(a)', iostat=stat) request%response
-
- if (is_iostat_end(stat)) exit read_loop
- if (stat /= 0) cycle read_loop
-
- ! Try to extract the response values.
- rc = dm_regex_request(request)
-
- if (dm_is_error(rc)) then
- call dm_log(LOG_WARNING, 'failed to match response', observ=observ, error=rc)
- cycle read_loop
- end if
-
- ! Check responses.
- do j = 1, request%nresponses
- response => request%responses(j)
- if (dm_is_ok(response%error)) cycle
-
- call dm_log(LOG_WARNING, 'failed to read response ' // response%name, &
- observ=observ, error=response%error)
- end do
-
- ! Cycle on error or exit on success.
- if (dm_is_error(rc)) cycle read_loop
- exit read_loop
- end do read_loop
-
- ! Close file.
- close (fu)
-
- ! Save response and return code.
- request%response = dm_ascii_escape(request%response)
- request%error = rc
-
- ! Create log message and repeat.
- if (dm_is_error(rc)) then
- call dm_log(LOG_ERROR, 'failed to read from file ' // request%request, &
- observ=observ, error=rc)
- ! Wait grace period.
- call dm_sleep(10)
- cycle req_loop
- end if
-
- call dm_log(LOG_DEBUG, 'finished request ' // dm_itoa(i) // ' of ' // &
- dm_itoa(observ%nrequests), observ=observ)
-
- ! Wait the set delay time of the request.
- delay = max(0, request%delay)
- if (delay <= 0) cycle req_loop
-
- write (message, '("next request of observ ", a, " in ", i0, " sec")') &
- trim(observ%name), delay / 1000
- call dm_log(LOG_DEBUG, message)
- call dm_usleep(delay * 1000)
- end do req_loop
-
- ! Forward observation.
- call dm_log(LOG_DEBUG, 'finished observ ' // observ%name, observ=observ)
+ ! Forward observation via message queue.
+ call dm_log(LOG_DEBUG, 'finished observ ' // trim(observ%name) // ' for sensor ' // app%sensor, observ=observ)
rc = dm_mqueue_forward(observ, app%name, APP_MQ_BLOCKING)
! Output observation.
rc = output_observ(observ, app%output_type)
- end if observ_if
+ end if
- ! Wait the set delay time of the job (absolute).
+ ! Wait delay time of the job if set (absolute).
delay = max(0, job%delay)
if (delay <= 0) cycle job_loop
-
- write (message, '("next job in ", i0, " sec")') delay / 1000
- call dm_log(LOG_DEBUG, message)
+ call dm_log(LOG_DEBUG, 'next job in ' // dm_itoa(delay / 1000) // ' sec')
call dm_usleep(delay * 1000)
end do job_loop
end subroutine run
diff --git a/app/dmlua.f90 b/app/dmlua.f90
index 8bc7084..ea2d665 100644
--- a/app/dmlua.f90
+++ b/app/dmlua.f90
@@ -12,7 +12,7 @@ program dmlua
character(len=*), parameter :: APP_NAME = 'dmlua'
integer, parameter :: APP_MAJOR = 0
integer, parameter :: APP_MINOR = 9
- integer, parameter :: APP_PATCH = 0
+ integer, parameter :: APP_PATCH = 1
integer, parameter :: APP_PROC_LEN = 32 !! Max. length of Lua function name.
logical, parameter :: APP_MQ_BLOCKING = .true. !! Observation forwarding is blocking.
@@ -92,8 +92,7 @@ program dmlua
end block init_block
! Clean up and exit.
- if (dm_is_error(rc)) call halt(1)
- call halt(0)
+ call halt(rc)
contains
integer function read_args(app) result(rc)
!! Reads command-line arguments and settings from configuration file.
@@ -189,10 +188,14 @@ integer function read_config(app) result(rc)
call dm_config_close(config)
end function read_config
- subroutine halt(stat)
+ subroutine halt(error)
!! Cleans up and stops program.
- integer, intent(in) :: stat
- integer :: rc
+ integer, intent(in), optional :: error
+
+ integer :: rc, stat
+
+ stat = 0
+ if (present(error)) stat = min(1, error)
rc = dm_mqueue_close(mqueue)
rc = dm_mqueue_unlink(mqueue)
@@ -305,7 +308,7 @@ subroutine signal_handler(signum) bind(c)
select case (signum)
case default
call dm_log(LOG_INFO, 'exit on signal ' // dm_itoa(signum))
- call halt(0)
+ call halt(E_NONE)
end select
end subroutine signal_handler
end program dmlua
diff --git a/app/dmpipe.f90 b/app/dmpipe.f90
index a55f7d2..1183fc5 100644
--- a/app/dmpipe.f90
+++ b/app/dmpipe.f90
@@ -225,8 +225,7 @@ integer function write_observ(observ, unit, format) result(rc)
select case (format)
case (FORMAT_CSV)
- rc = dm_csv_write(observ, unit=unit, header=.false., &
- separator=APP_CSV_SEPARATOR)
+ rc = dm_csv_write(observ, unit=unit, header=.false., separator=APP_CSV_SEPARATOR)
case (FORMAT_JSONL)
rc = dm_json_write(observ, unit=unit)
case default
diff --git a/app/dmrecv.f90 b/app/dmrecv.f90
index 623e80e..4fd9076 100644
--- a/app/dmrecv.f90
+++ b/app/dmrecv.f90
@@ -23,7 +23,7 @@ program dmrecv
character(len=*), parameter :: APP_NAME = 'dmrecv'
integer, parameter :: APP_MAJOR = 0
integer, parameter :: APP_MINOR = 9
- integer, parameter :: APP_PATCH = 0
+ integer, parameter :: APP_PATCH = 1
logical, parameter :: APP_MQ_BLOCKING = .true. !! Observation forwarding is blocking.
@@ -82,8 +82,7 @@ program dmrecv
call run(app, mqueue)
end block init_block
- if (dm_is_error(rc)) call halt(1)
- call halt(0)
+ call halt(rc)
contains
integer function read_args(app) result(rc)
!! Reads command-line arguments and settings from configuration file.
@@ -215,13 +214,18 @@ integer function read_config(app) result(rc)
call dm_config_close(config)
end function read_config
- subroutine halt(stat)
+ subroutine halt(error)
!! Cleans up and stops program.
- integer, intent(in) :: stat !! Exit status.
- integer :: rc
+ integer, intent(in), optional :: error !! DMPACK error code
+
+ integer :: rc, stat
+
+ stat = 0
+ if (present(error)) stat = min(1, error)
rc = dm_mqueue_close(mqueue)
rc = dm_mqueue_unlink(mqueue)
+
call dm_stop(stat)
end subroutine halt
@@ -388,7 +392,7 @@ subroutine signal_handler(signum) bind(c)
select case (signum)
case default
call dm_log(LOG_INFO, 'exit on signal ' // dm_itoa(signum))
- call halt(0)
+ call halt(E_NONE)
end select
end subroutine signal_handler
end program dmrecv
diff --git a/app/dmreport.f90 b/app/dmreport.f90
index 3787a76..104b5fd 100644
--- a/app/dmreport.f90
+++ b/app/dmreport.f90
@@ -42,9 +42,8 @@ function html_footer() result(html)
character(len=:), allocatable :: html
html = H_FOOTER // H_HR // H_P // H_SMALL // &
- 'This report was generated ' // dm_html_time(dm_time_now()) // ' by ' // &
- APP_NAME // ' ' // dm_version_to_string(APP_MAJOR, APP_MINOR, APP_PATCH) // &
- ' (DMPACK ' // DM_VERSION_STRING // ')' // &
+ 'This report was generated ' // dm_html_time(dm_time_now(), human=.true.) // ' by ' // &
+ dm_version_to_string(APP_NAME, APP_MAJOR, APP_MINOR, APP_PATCH, library=.true.) // &
H_SMALL_END // H_P_END // H_FOOTER_END // dm_html_footer()
end function html_footer
diff --git a/app/dmserial.f90 b/app/dmserial.f90
index dc87ae4..f3c61f8 100644
--- a/app/dmserial.f90
+++ b/app/dmserial.f90
@@ -10,14 +10,14 @@ program dmserial
character(len=*), parameter :: APP_NAME = 'dmserial'
integer, parameter :: APP_MAJOR = 0
integer, parameter :: APP_MINOR = 9
- integer, parameter :: APP_PATCH = 0
+ integer, parameter :: APP_PATCH = 1
character, parameter :: APP_CSV_SEPARATOR = ',' !! CSV seperator character.
logical, parameter :: APP_MQ_BLOCKING = .true. !! Observation forwarding is blocking.
- integer, parameter :: OUTPUT_NONE = 0
- integer, parameter :: OUTPUT_STDOUT = 1
- integer, parameter :: OUTPUT_FILE = 2
+ integer, parameter :: OUTPUT_NONE = 0 !! No output.
+ integer, parameter :: OUTPUT_STDOUT = 1 !! Output to standard output.
+ integer, parameter :: OUTPUT_FILE = 2 !! Output to file.
type :: app_type
!! Application settings.
@@ -149,27 +149,6 @@ integer function output_observ(observ, type) result(rc)
end select
end function output_observ
- integer function write_observ(observ, unit, format) result(rc)
- !! Writes observation to file unit, in CSV or JSON Lines format.
- type(observ_type), intent(inout) :: observ
- integer, intent(in) :: unit
- integer, intent(in) :: format
-
- rc = E_INVALID
-
- select case (format)
- case (FORMAT_CSV)
- ! CSV format.
- rc = dm_csv_write(observ, unit=unit, header=.false., &
- separator=APP_CSV_SEPARATOR)
- case (FORMAT_JSONL)
- ! JSON Lines format.
- rc = dm_json_write(observ, unit=unit)
- case default
- return
- end select
- end function write_observ
-
integer function read_args(app) result(rc)
!! Reads command-line arguments and settings from configuration file.
type(app_type), intent(inout) :: app
@@ -336,21 +315,143 @@ integer function read_config(app) result(rc)
call dm_config_close(config)
end function read_config
+ integer function read_observ(tty, observ, debug) result(rc)
+ !! Sends requests sequentially to sensor and reads responses.
+ type(tty_type), intent(inout) :: tty !! TTY type.
+ type(observ_type), target, intent(inout) :: observ !! Observation to read.
+ logical, intent(in), optional :: debug !! Output debug messages.
+
+ character(len=REQUEST_REQUEST_LEN) :: raw_request ! Raw request (unescaped).
+ character(len=REQUEST_DELIMITER_LEN) :: raw_delimiter ! Raw delimiter (unescaped).
+ integer :: delay, i, j
+ logical :: debug_ ! Create debug messages only if necessary.
+ type(request_type), pointer :: request ! Next request to execute.
+ type(response_type), pointer :: response ! Single response in request.
+
+ debug_ = .true.
+ if (present(debug)) debug_ = debug
+
+ rc = E_EMPTY
+
+ observ%id = dm_uuid4()
+ observ%timestamp = dm_time_now()
+
+ if (observ%nrequests == 0) then
+ call dm_log(LOG_INFO, 'no requests in observ ' // observ%name, observ=observ)
+ observ%error = rc
+ return
+ end if
+
+ ! Read files in requests sequentially.
+ req_loop: do i = 1, observ%nrequests
+ request => observ%requests(i)
+
+ if (debug_) then
+ call dm_log(LOG_DEBUG, 'starting request ' // dm_itoa(i) // ' of ' // &
+ dm_itoa(observ%nrequests), observ=observ)
+ end if
+
+ ! Set raw values.
+ raw_request = dm_ascii_unescape(request%request)
+ raw_delimiter = dm_ascii_unescape(request%delimiter)
+
+ ! Set default error of responses.
+ rc = dm_request_set_response_error(request, E_INCOMPLETE)
+
+ ! Send request to sensor.
+ if (debug_) call dm_log(LOG_DEBUG, 'sending request: ' // raw_request, observ=observ)
+
+ request%response = ' '
+ request%timestamp = dm_time_now()
+
+ request%error = dm_tty_flush(tty, output=.false.)
+ request%error = dm_tty_write(tty, trim(raw_request))
+
+ if (dm_is_error(request%error)) then
+ call dm_log(LOG_ERROR, 'failed to write to TTY ' // app%tty, observ=observ, &
+ error=request%error)
+ cycle req_loop
+ end if
+
+ if (len_trim(raw_delimiter) == 0) then
+ if (debug_) call dm_log(LOG_DEBUG, 'no delimiter set in request ' // dm_itoa(i), observ=observ)
+ cycle req_loop
+ end if
+
+ ! Read raw sensor response from TTY.
+ request%error = dm_tty_read(tty, request%response, trim(raw_delimiter))
+
+ if (dm_is_error(request%error)) then
+ call dm_log(LOG_ERROR, 'failed to read from TTY ' // app%tty, &
+ observ=observ, error=request%error)
+ cycle req_loop
+ end if
+
+ if (debug_) call dm_log(LOG_DEBUG, 'received raw response: ' // request%response, observ=observ)
+
+ if (len_trim(request%pattern) == 0) then
+ if (debug_) call dm_log(LOG_DEBUG, 'no pattern in request ' // dm_itoa(i), observ=observ)
+ cycle req_loop
+ end if
+
+ ! Try to extract the response values if a regex pattern is given.
+ if (debug_) call dm_log(LOG_DEBUG, 'extracting response values', observ=observ)
+ request%error = dm_regex_request(request)
+
+ ! Unescape raw response.
+ request%response = dm_ascii_escape(request%response)
+
+ if (dm_is_error(request%error)) then
+ call dm_log(LOG_WARNING, 'response to request ' // dm_itoa(i) // ' does not match pattern', &
+ observ=observ, error=request%error)
+ cycle req_loop
+ end if
+
+ ! Check response groups for errors.
+ do j = 1, request%nresponses
+ response => request%responses(j)
+
+ if (dm_is_error(response%error)) then
+ call dm_log(LOG_WARNING, 'failed to extract response ' // trim(response%name) // &
+ ' to request ' // dm_itoa(i), observ=observ, error=response%error)
+ cycle
+ end if
+
+ if (debug_) then
+ call dm_log(LOG_DEBUG, 'extracted response ' // trim(response%name) // &
+ ' of request ' // dm_itoa(i), observ=observ)
+ end if
+ end do
+
+ if (debug_) then
+ call dm_log(LOG_DEBUG, 'finished request ' // dm_itoa(i) // ' of ' // &
+ dm_itoa(observ%nrequests), observ=observ)
+ end if
+
+ ! Wait the set delay time of the request.
+ delay = max(0, request%delay)
+ if (delay <= 0) cycle req_loop
+
+ if (debug_) then
+ call dm_log(LOG_DEBUG, 'next request of observ ' // trim(observ%name) // &
+ ' in ' // dm_itoa(delay / 1000) // ' sec')
+ end if
+
+ call dm_usleep(delay * 1000)
+ end do req_loop
+ end function read_observ
+
integer function run(app, tty) result(rc)
!! Performs jobs in job list.
- type(app_type), intent(inout) :: app
- type(tty_type), intent(inout) :: tty
-
- character(len=REQUEST_REQUEST_LEN) :: r_request ! Raw request (unescaped).
- character(len=REQUEST_DELIMITER_LEN) :: r_delimiter ! Raw delimiter (unescaped).
+ type(app_type), intent(inout) :: app !! App settings.
+ type(tty_type), intent(inout) :: tty !! TTY settings.
- integer :: delay, njobs
- integer :: i, j
+ integer :: delay, njobs
+ logical :: debug ! Create debug messages only if necessary.
+ type(job_type), target :: job ! Next job to run.
+ type(observ_type), pointer :: observ ! Next observation to perform.
- type(job_type), target :: job ! Next job to run.
- type(observ_type), pointer :: observ ! Next observation to perform.
- type(request_type), pointer :: request ! Next request to execute.
- type(response_type), pointer :: response ! Response in request.
+ debug = (app%debug .or. app%verbose)
call dm_log(LOG_INFO, 'started ' // app%name)
call dm_log(LOG_DEBUG, 'opening TTY ' // trim(app%tty) // ' to sensor ' // trim(app%sensor) // &
@@ -358,13 +459,13 @@ integer function run(app, tty) result(rc)
dm_upper(app%parity(1:1)) // dm_itoa(app%stop_bits) // ')')
! Open TTY/PTY.
- open_loop: do
+ do
rc = dm_tty_open(tty)
- if (dm_is_ok(rc)) exit open_loop
+ if (dm_is_ok(rc)) exit
call dm_log(LOG_ERROR, 'failed to open TTY ' // app%tty, error=rc)
call dm_log(LOG_DEBUG, 'trying to open TTY again in 5 sec', error=rc)
call dm_sleep(5)
- end do open_loop
+ end do
! Run until no jobs are left.
job_loop: do
@@ -373,12 +474,12 @@ integer function run(app, tty) result(rc)
if (njobs == 0) then
rc = E_NONE
- call dm_log(LOG_DEBUG, 'no jobs left')
+ if (debug) call dm_log(LOG_DEBUG, 'no jobs left')
exit job_loop
end if
! Get next job as deep copy.
- call dm_log(LOG_DEBUG, dm_itoa(njobs) // ' job(s) left in job queue')
+ if (debug) call dm_log(LOG_DEBUG, dm_itoa(njobs) // ' job(s) left in job queue')
rc = dm_job_list_next(app%jobs, job)
if (dm_is_error(rc)) then
@@ -386,126 +487,31 @@ integer function run(app, tty) result(rc)
cycle job_loop
end if
- observ_if: if (job%valid) then
+ if (job%valid) then
! Get pointer to job observation.
observ => job%observ
- call dm_log(LOG_DEBUG, 'starting observ ' // trim(observ%name) // &
- ' for sensor ' // app%sensor, observ=observ)
-
! Initialise observation.
- observ%id = dm_uuid4()
observ%node_id = app%node
observ%sensor_id = app%sensor
- observ%timestamp = dm_time_now()
observ%path = trim(app%tty)
- if (observ%nrequests == 0) then
- call dm_log(LOG_INFO, 'no requests in observ ' // observ%name, observ=observ)
- observ%error = E_EMPTY
- exit observ_if
- end if
+ ! Read observation from TTY.
+ call dm_log(LOG_DEBUG, 'starting observ ' // trim(observ%name) // ' for sensor ' // app%sensor, observ=observ)
+ rc = read_observ(tty, observ, debug=debug)
- ! Read files in requests sequentially.
- req_loop: do i = 1, observ%nrequests
- ! Get pointer to next request.
- request => observ%requests(i)
-
- call dm_log(LOG_DEBUG, 'starting request ' // dm_itoa(i) // ' of ' // &
- dm_itoa(observ%nrequests), observ=observ)
-
- ! Set raw values.
- r_request = dm_ascii_unescape(request%request)
- r_delimiter = dm_ascii_unescape(request%delimiter)
-
- ! Set default error of responses.
- rc = dm_request_set_response_error(request, E_INCOMPLETE)
-
- ! Send request to sensor.
- call dm_log(LOG_DEBUG, 'sending request: ' // r_request, observ=observ)
-
- request%response = ' '
- request%timestamp = dm_time_now()
-
- request%error = dm_tty_flush(tty, output=.false.)
- request%error = dm_tty_write(tty, trim(r_request))
-
- if (dm_is_error(request%error)) then
- call dm_log(LOG_ERROR, 'failed to write to TTY ' // app%tty, observ=observ, &
- error=request%error)
- cycle req_loop
- end if
-
- if (len_trim(r_delimiter) == 0) then
- call dm_log(LOG_DEBUG, 'no delimiter set in request ' // dm_itoa(i), observ=observ)
- cycle req_loop
- end if
-
- ! Read raw sensor response from TTY.
- request%error = dm_tty_read(tty, request%response, trim(r_delimiter))
-
- if (dm_is_error(request%error)) then
- call dm_log(LOG_ERROR, 'failed to read from TTY ' // app%tty, &
- observ=observ, error=request%error)
- cycle req_loop
- end if
-
- call dm_log(LOG_DEBUG, 'received raw response: ' // request%response, observ=observ)
-
- if (len_trim(request%pattern) == 0) then
- call dm_log(LOG_DEBUG, 'no pattern in request ' // dm_itoa(i), observ=observ)
- cycle req_loop
- end if
-
- ! Try to extract the response values if a regex pattern is given.
- call dm_log(LOG_DEBUG, 'extracting response values', observ=observ)
- request%error = dm_regex_request(request)
-
- ! Unescape raw response.
- request%response = dm_ascii_escape(request%response)
-
- if (dm_is_error(request%error)) then
- call dm_log(LOG_WARNING, 'response to request ' // dm_itoa(i) // ' does not match pattern', &
- observ=observ, error=request%error)
- cycle req_loop
- end if
-
- ! Check response groups for errors.
- do j = 1, request%nresponses
- response => request%responses(j)
-
- if (dm_is_error(response%error)) then
- call dm_log(LOG_WARNING, 'failed to extract response ' // trim(response%name) // &
- ' to request ' // dm_itoa(i), observ=observ, error=response%error)
- cycle
- end if
-
- call dm_log(LOG_DEBUG, 'extracted response ' // trim(response%name) // &
- ' of request ' // dm_itoa(i), observ=observ)
- end do
-
- call dm_log(LOG_DEBUG, 'finished request ' // dm_itoa(i) // ' of ' // &
- dm_itoa(observ%nrequests), observ=observ)
-
- ! Wait the set delay time of the request.
- delay = max(0, request%delay)
- if (delay <= 0) cycle req_loop
- call dm_log(LOG_DEBUG, 'next request of observ ' // trim(observ%name) // &
- ' in ' // dm_itoa(delay / 1000) // ' sec')
- call dm_usleep(delay * 1000)
- end do req_loop
-
- ! Forward and output observation.
- call dm_log(LOG_DEBUG, 'finished observ ' // trim(observ%name) // &
- ' for sensor ' // app%sensor, observ=observ)
+ ! Forward observation.
+ call dm_log(LOG_DEBUG, 'finished observ ' // trim(observ%name) // ' for sensor ' // app%sensor, observ=observ)
rc = dm_mqueue_forward(observ, app%name, blocking=APP_MQ_BLOCKING)
+
+ ! Output observation.
rc = output_observ(observ, app%output_type)
- end if observ_if
+ end if
! Wait the set delay time of the job (absolute).
delay = max(0, job%delay)
if (delay <= 0) cycle job_loop
- call dm_log(LOG_DEBUG, 'next job in ' // dm_itoa(delay / 1000) // ' sec')
+ if (debug) call dm_log(LOG_DEBUG, 'next job in ' // dm_itoa(delay / 1000) // ' sec')
call dm_usleep(delay * 1000)
end do job_loop
@@ -517,6 +523,27 @@ integer function run(app, tty) result(rc)
rc = E_NONE
end function run
+ integer function write_observ(observ, unit, format) result(rc)
+ !! Writes observation to file unit, in CSV or JSON Lines format.
+ type(observ_type), intent(inout) :: observ
+ integer, intent(in) :: unit
+ integer, intent(in) :: format
+
+ rc = E_INVALID
+
+ select case (format)
+ case (FORMAT_CSV)
+ ! CSV format.
+ rc = dm_csv_write(observ, unit=unit, header=.false., &
+ separator=APP_CSV_SEPARATOR)
+ case (FORMAT_JSONL)
+ ! JSON Lines format.
+ rc = dm_json_write(observ, unit=unit)
+ case default
+ return
+ end select
+ end function write_observ
+
subroutine signal_handler(signum) bind(c)
!! Default POSIX signal handler of the program.
use, intrinsic :: iso_c_binding, only: c_int
diff --git a/app/dmsync.f90 b/app/dmsync.f90
index c5d7196..cd21f5a 100644
--- a/app/dmsync.f90
+++ b/app/dmsync.f90
@@ -10,16 +10,16 @@ program dmsync
character(len=*), parameter :: APP_NAME = 'dmsync'
integer, parameter :: APP_MAJOR = 0
integer, parameter :: APP_MINOR = 9
- integer, parameter :: APP_PATCH = 0
+ integer, parameter :: APP_PATCH = 1
integer, parameter :: APP_DB_NATTEMPTS = 10 !! Max. number of database insert attempts.
integer, parameter :: APP_DB_TIMEOUT = DB_TIMEOUT_DEFAULT !! SQLite 3 busy timeout in mseconds.
integer, parameter :: APP_SYNC_LIMIT = 10 !! Max. number of records to sync at once.
logical, parameter :: APP_RPC_DEFLATE = .true. !! Compress RPC payload.
- integer, parameter :: HOST_LEN = 80
- integer, parameter :: USERNAME_LEN = 32
- integer, parameter :: PASSWORD_LEN = 32
+ integer, parameter :: HOST_LEN = 256 !! Max. length of host name.
+ integer, parameter :: USERNAME_LEN = 256 !! Max. length of user name.
+ integer, parameter :: PASSWORD_LEN = 256 !! Max. length of password.
type :: app_type
!! Global application settings.
@@ -110,7 +110,7 @@ program dmsync
rc = run(app, db, sem)
end block init_block
- call halt(min(1, rc))
+ call halt(error=rc)
contains
integer function read_args(app) result(rc)
!! Reads command-line arguments and settings from configuration file.
@@ -539,19 +539,19 @@ integer function run(app, db, sem) result(rc)
call dm_log(LOG_DEBUG, 'exiting ...')
end function run
- subroutine halt(stat)
+ subroutine halt(error)
!! Cleans up and stops program.
- integer, intent(in), optional :: stat !! Exit status.
+ integer, intent(in), optional :: error !! DMPACK error code.
- integer :: rc, stat_
+ integer :: rc, stat
- stat_ = 0
- if (present(stat)) stat_ = stat
+ stat = 0
+ if (present(error)) stat = min(1, error)
call dm_rpc_destroy()
if (app%ipc) rc = dm_sem_close(sem)
rc = dm_db_close(db)
- call dm_stop(stat_)
+ call dm_stop(stat)
end subroutine halt
subroutine signal_handler(signum) bind(c)
@@ -562,7 +562,7 @@ subroutine signal_handler(signum) bind(c)
select case (signum)
case default
call dm_log(LOG_INFO, 'exit on signal ' // dm_itoa(signum))
- call halt(0)
+ call halt(E_NONE)
end select
end subroutine signal_handler
end program dmsync
diff --git a/app/dmweb.f90 b/app/dmweb.f90
index ce2fbfd..e177760 100644
--- a/app/dmweb.f90
+++ b/app/dmweb.f90
@@ -37,7 +37,6 @@ program dmweb
! Program parameters.
character(len=*), parameter :: APP_BASE_PATH = '/dmpack' !! URI base path.
character(len=*), parameter :: APP_CSS_PATH = '/dmpack.min.css' !! Path to CSS file.
- character(len=*), parameter :: APP_JS_PATH = ' ' !! Path to optional JavaScript file.
character(len=*), parameter :: APP_TITLE = 'DMPACK' !! HTML title and heading.
integer, parameter :: APP_DB_TIMEOUT = DB_TIMEOUT_DEFAULT !! SQLite 3 busy timeout in mseconds.
integer, parameter :: APP_PLOT_TERM = PLOT_TERM_SVG !! Plotting backend.
@@ -1793,13 +1792,13 @@ function html_form_nodes(disabled) result(html)
H_DIV_COL // &
dm_html_label('X', for='x') // &
dm_html_input(HTML_INPUT_TYPE_TEXT, disabled=disabled_, id='x', name='x', &
- pattern='[\+\-\.0-9]+', placeholder='Enter node easting (optional)') // &
+ pattern='[\+\-\.0-9]+', placeholder='Enter node X or easting (optional)') // &
dm_html_label('Y', for='y') // &
dm_html_input(HTML_INPUT_TYPE_TEXT, disabled=disabled_, id='y', name='y', &
- pattern='[\+\-\.0-9]+', placeholder='Enter node northing (optional)') // &
+ pattern='[\+\-\.0-9]+', placeholder='Enter node Y or northing (optional)') // &
dm_html_label('Z', for='z') // &
dm_html_input(HTML_INPUT_TYPE_TEXT, disabled=disabled_, id='z', name='z', &
- pattern='[\+\-\.0-9]+', placeholder='Enter node altitude (optional)') // &
+ pattern='[\+\-\.0-9]+', placeholder='Enter node Z or altitude (optional)') // &
H_DIV_END // &
H_DIV_END // &
dm_html_input(HTML_INPUT_TYPE_SUBMIT, disabled=disabled_, name='submit', value='Submit') // &
@@ -2077,13 +2076,13 @@ function html_form_sensors(nodes, disabled) result(html)
H_DIV_COL // &
dm_html_label('X', for='x') // &
dm_html_input(HTML_INPUT_TYPE_TEXT, disabled=disabled_, id='x', name='x', &
- pattern='[\+\-\.0-9]+', placeholder='Enter sensor easting (optional)') // &
+ pattern='[\+\-\.0-9]+', placeholder='Enter sensor X or easting (optional)') // &
dm_html_label('Y', for='y') // &
dm_html_input(HTML_INPUT_TYPE_TEXT, disabled=disabled_, id='y', name='y', &
- pattern='[\+\-\.0-9]+', placeholder='Enter sensor northing (optional)') // &
+ pattern='[\+\-\.0-9]+', placeholder='Enter sensor Y or northing (optional)') // &
dm_html_label('Z', for='z') // &
dm_html_input(HTML_INPUT_TYPE_TEXT, disabled=disabled_, id='z', name='z', &
- pattern='[\+\-\.0-9]+', placeholder='Enter sensor altitude (optional)') // &
+ pattern='[\+\-\.0-9]+', placeholder='Enter sensor Z or altitude (optional)') // &
H_DIV_END // &
H_DIV_END // &
dm_html_input(HTML_INPUT_TYPE_SUBMIT, disabled=disabled_, name='submit', value='Submit') // &
@@ -2134,13 +2133,13 @@ function html_form_targets(disabled) result(html)
H_DIV_COL // & ! column 2
dm_html_label('X', for='x') // &
dm_html_input(HTML_INPUT_TYPE_TEXT, disabled=disabled_, id='x', name='x', &
- pattern='[\+\-\.0-9]+', placeholder='Enter target easting (optional)') // &
+ pattern='[\+\-\.0-9]+', placeholder='Enter target X or easting (optional)') // &
dm_html_label('Y', for='y') // &
dm_html_input(HTML_INPUT_TYPE_TEXT, disabled=disabled_, id='y', name='y', &
- pattern='[\+\-\.0-9]+', placeholder='Enter target northing (optional)') // &
+ pattern='[\+\-\.0-9]+', placeholder='Enter target Y or northing (optional)') // &
dm_html_label('Z', for='z') // &
dm_html_input(HTML_INPUT_TYPE_TEXT, disabled=disabled_, id='z', name='z', &
- pattern='[\+\-\.0-9]+', placeholder='Enter target altitude (optional)') // &
+ pattern='[\+\-\.0-9]+', placeholder='Enter target Z or altitude (optional)') // &
H_DIV_END // & ! end column 2
H_DIV_END // & ! end row 1
dm_html_input(HTML_INPUT_TYPE_SUBMIT, disabled=disabled_, name='submit', value='Submit') // &
@@ -2200,11 +2199,7 @@ subroutine html_footer()
' | Status' // &
H_SMALL_END // H_P_END
- if (len_trim(APP_JS_PATH) > 0) then
- call dm_cgi_out(dm_html_footer(CONTENT, APP_JS_PATH))
- else
- call dm_cgi_out(dm_html_footer(CONTENT))
- end if
+ call dm_cgi_out(dm_html_footer(CONTENT))
end subroutine html_footer
subroutine html_header(title)
diff --git a/guide/guide.adoc b/guide/guide.adoc
index f24627b..fa0913e 100644
--- a/guide/guide.adoc
+++ b/guide/guide.adoc
@@ -820,6 +820,9 @@ The feed id has to be a 36 characters long UUID with hyphens. News aggregators
use the id to identify the feed. Therefore, the id should not be reused among
different feeds. Run <> to generate a valid UUID4.
+The time stamp of the feed in the updated element is set to the date and time of
+the last log message.
+
If an XSLT style sheet is given, web browsers may be able to display the Atom
feed in HTML format. Set the option to the (relative) path of the public XSL on
the web server. An example style sheet `feed.xsl` is located in
@@ -4665,6 +4668,7 @@ require("libdmpack")
deg = 360.0
gon = deg2gon(deg)
print(gon)
+-- Output: 400.0
....
== Error Codes [[error-codes]]
diff --git a/guide/resources/images/beat.svg b/guide/resources/images/beat.svg
index 1202b24..34d1384 100644
--- a/guide/resources/images/beat.svg
+++ b/guide/resources/images/beat.svg
@@ -1,199 +1 @@
-
-
+
\ No newline at end of file
diff --git a/guide/resources/images/log.svg b/guide/resources/images/log.svg
index 6277e50..efb5f06 100644
--- a/guide/resources/images/log.svg
+++ b/guide/resources/images/log.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/guide/resources/images/observ.svg b/guide/resources/images/observ.svg
index 8d950c7..e5ac203 100644
--- a/guide/resources/images/observ.svg
+++ b/guide/resources/images/observ.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/man/dmfeed.1 b/man/dmfeed.1
index 40aa9f1..48635a0 100644
--- a/man/dmfeed.1
+++ b/man/dmfeed.1
@@ -2,12 +2,12 @@
.\" Title: dmfeed
.\" Author: Philipp Engel
.\" Generator: Asciidoctor 2.0.20
-.\" Date: 2024-02-16
+.\" Date: 2024-02-23
.\" Manual: User Commands
.\" Source: DMFEED
.\" Language: English
.\"
-.TH "DMFEED" "1" "2024-02-16" "DMFEED" "User Commands"
+.TH "DMFEED" "1" "2024-02-23" "DMFEED" "User Commands"
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.ss \n[.ss] 0
@@ -51,6 +51,9 @@ standard output or file.
The feed id has to be a 36 characters long UUID with hyphens. News aggregators
use the id to identify the feed. Therefore, the id should not be reused among
different feeds. Run \fIdmuuid(1)\fP to generate a valid UUID4.
+.sp
+The time stamp of the feed in the updated element is set to the date and time of
+the last log message.
.SH "OPTIONS"
.sp
\fB\-\-author\fP, \fB\-A\fP \fIname\fP
diff --git a/src/dm_atom.f90 b/src/dm_atom.f90
index c258fea..a679a43 100644
--- a/src/dm_atom.f90
+++ b/src/dm_atom.f90
@@ -51,14 +51,15 @@ module dm_atom
type, public :: atom_type
!! Atom feed attributes.
- character(len=256) :: alt = ' ' !! Alternate content link.
- character(len=256) :: author = ' ' !! Author name.
- character(len=256) :: email = ' ' !! Author e-mail.
- character(len=ATOM_ID_LEN) :: id = ' ' !! Feed id.
- character(len=256) :: title = ' ' !! Feed title.
- character(len=256) :: subtitle = ' ' !! Feed sub-title.
- character(len=512) :: url = ' ' !! Feed URL.
- character(len=512) :: xsl = ' ' !! Path or URL of XSLT style sheet.
+ character(len=256) :: alt = ' ' !! Alternate content link.
+ character(len=256) :: author = ' ' !! Author name.
+ character(len=256) :: email = ' ' !! Author e-mail.
+ character(len=ATOM_ID_LEN) :: id = ' ' !! Feed id.
+ character(len=TIME_LEN) :: updated = TIME_DEFAULT !! Feed time stamp.
+ character(len=256) :: title = ' ' !! Feed title.
+ character(len=256) :: subtitle = ' ' !! Feed sub-title.
+ character(len=512) :: url = ' ' !! Feed URL.
+ character(len=512) :: xsl = ' ' !! Path or URL of XSLT style sheet.
end type atom_type
interface atom_entry
@@ -87,7 +88,8 @@ subroutine dm_atom_from_logs(atom, logs, xml)
type(log_type), intent(inout) :: logs(:) !! Log array.
character(len=:), allocatable, intent(out) :: xml !! Returned Atom XML string.
- integer :: i, m, n
+ integer :: alt_len, author_len, email_len
+ integer :: i
! Feed header.
xml = A_XML
@@ -125,28 +127,32 @@ subroutine dm_atom_from_logs(atom, logs, xml)
if (len_trim(atom%id) > 0) then
xml = xml // dm_html_encode(atom%id) // A_ID_END
else
- xml = xml // dm_uuid4_hyphenize(UUID_DEFAULT) // A_ID_END
+ xml = xml // ATOM_ID_DEFAULT // A_ID_END
end if
! Feed timestamp
- xml = xml // A_UPDATED // dm_time_strip_useconds(dm_time_now()) // A_UPDATED_END
+ if (len_trim(atom%updated) == 0 .or. atom%updated == TIME_DEFAULT) then
+ atom%updated = dm_time_now()
+ end if
+
+ xml = xml // A_UPDATED // dm_time_strip_useconds(atom%updated) // A_UPDATED_END
! Feed author
- m = len_trim(atom%author)
- n = len_trim(atom%email)
+ author_len = len_trim(atom%author)
+ email_len = len_trim(atom%email)
- if (m > 0 .or. n > 0) then
+ if (author_len > 0 .or. email_len > 0) then
xml = xml // A_AUTHOR
- if (m > 0) xml = xml // A_NAME // dm_html_encode(atom%author) // A_NAME_END
- if (n > 0) xml = xml // A_EMAIL // dm_html_encode(atom%email) // A_EMAIL_END
+ if (author_len > 0) xml = xml // A_NAME // dm_html_encode(atom%author) // A_NAME_END
+ if (email_len > 0) xml = xml // A_EMAIL // dm_html_encode(atom%email) // A_EMAIL_END
xml = xml // A_AUTHOR_END
end if
! Feed entries.
- m = len_trim(atom%alt)
+ alt_len = len_trim(atom%alt)
do i = 1, size(logs)
- if (m > 0) then
+ if (alt_len > 0) then
xml = xml // atom_entry(logs(i), alt=trim(atom%alt) // trim(logs(i)%id))
else
xml = xml // atom_entry(logs(i))
diff --git a/src/dm_cgi_router.f90 b/src/dm_cgi_router.f90
index e926404..ce45ae6 100644
--- a/src/dm_cgi_router.f90
+++ b/src/dm_cgi_router.f90
@@ -7,8 +7,6 @@ module dm_cgi_router
use :: dm_cgi
use :: dm_error
use :: dm_hash_table
- use :: dm_html
- use :: dm_http
implicit none (type, external)
private
@@ -78,6 +76,7 @@ subroutine dm_cgi_router_dispatch(router, env, http_status)
!! Searches the router hash table for path in CGI environment variable
!! `PATH_INFO`, and calls the associated subroutine of the route. If no
!! route has been found, `HTTP_NOT_FOUND` is returned in `http_status`.
+ use :: dm_http
type(cgi_router_type), intent(inout) :: router !! Router type.
type(cgi_env_type), intent(inout) :: env !! CGI environment variables.
integer, intent(out) :: http_status !! Optional status.
diff --git a/src/dm_geocom.f90 b/src/dm_geocom.f90
index 4f1e090..9065fe6 100644
--- a/src/dm_geocom.f90
+++ b/src/dm_geocom.f90
@@ -23,69 +23,6 @@ module dm_geocom
!!
!! call geocom%close()
!! ```
- !!
- !! ## API
- !!
- !! | GeoCOM API | DMPACK API |
- !! |-----------------------------|---------------------------------|
- !! | `AUT_ChangeFace` | `change_face` |
- !! | `AUT_FineAdjust` | `fine_adjust` |
- !! | `AUT_GetFineAdjustMode` | `get_fine_adjust_mode` |
- !! | `AUT_GetSearchArea` | `get_search_area` |
- !! | `AUT_MakePositioning` | `set_position` |
- !! | `BAP_GetATRSetting` | `get_atr_setting` |
- !! | `BAP_GetMeasPrg` | `get_measurement_program` |
- !! | `BAP_GetPrismDef` | `get_prism_definition` |
- !! | `BAP_GetRedATRFov` | `get_reduced_atr_fov` |
- !! | `BAP_GetUserPrismDef` | `get_user_prism_definition` |
- !! | `BMM_BeepAlarm` | `beep_alarm` |
- !! | `BMM_BeepNormal` | `beep_normal` |
- !! | `COM_GetBinaryAvailable` | `get_binary_mode` |
- !! | `COM_GetDoublePrecision` | `get_double_precision` |
- !! | `COM_NullProc` | `null` |
- !! | `COM_SwitchOffTPS` | `switch_off` |
- !! | `COM_SwitchOffTPS` | `switch_on` |
- !! | `CSV_CheckPower` | `get_power` |
- !! | `CSV_GetDateTimeCentiSec` | `get_date_time_centi` |
- !! | `CSV_GetDateTime` | `get_date_time` |
- !! | `CSV_GetDeviceConfig` | `get_device_config` |
- !! | `CSV_GetInstrumentName` | `get_instrument_name` |
- !! | `CSV_GetInstrumentNo` | `get_instrument_number` |
- !! | `CSV_GetIntTemp` | `get_internal_temperature` |
- !! | `CSV_GetReflectorlessClass` | `get_reflectorless_class` |
- !! | `EDM_GetEglIntensity` | `get_egl_intensity` |
- !! | `FTR_AbortDownload` | `abort_download` |
- !! | `FTR_AbortList` | `abort_list` |
- !! | `FTR_Delete` | `delete` |
- !! | `FTR_Download` | `download` |
- !! | `IMG_GetTccConfig` | `get_image_config` |
- !! | `IMG_TakeTccImage` | `take_image` |
- !! | `IOS_BeepOff` | `beep_off` |
- !! | `IOS_BeepOn` | `beep_on` |
- !! | `MOT_ReadLockStatus` | `get_lock_status` |
- !! | `SUP_GetConfig` | `get_config` |
- !! | `TMC_DoMeasure` | `do_measure` |
- !! | `TMC_GeoPpm` | `get_geometric_ppm` |
- !! | `TMC_GetAngSwitch` | `get_angular_correction_status` |
- !! | `TMC_GetAngle1` | `get_angle_complete` |
- !! | `TMC_GetAngle5` | `get_angle` |
- !! | `TMC_GetAtmCorr` | `get_atmospheric_correction` |
- !! | `TMC_GetAtmPpm` | `get_atmospheric_ppm` |
- !! | `TMC_GetCoordinate` | `get_coordinate` |
- !! | `TMC_GetEdmMode` | `get_edm_mode` |
- !! | `TMC_GetFace` | `get_face` |
- !! | `TMC_GetFullMeas` | `get_full_measurement` |
- !! | `TMC_GetHeight` | `get_height` |
- !! | `TMC_GetInclineSwitch` | `get_incline_correction` |
- !! | `TMC_GetPrismCorr` | `get_prism_constant` |
- !! | `TMC_GetPrismType` | `get_prism_type` |
- !! | `TMC_GetPrismType2` | `get_prism_type_v2` |
- !! | `TMC_GetQuickDist` | `get_quick_distance` |
- !! | `TMC_GetRefractiveMethod` | `get_refraction_mode` |
- !! | `TMC_GetSignal` | `get_signal` |
- !! | `TMC_IfDataAzeCorrError` | `get_atr_error` |
- !! | `TMC_IfDataIncCorrError` | `get_inclination_error` |
- !!
use :: dm_error
use :: dm_geocom_api
use :: dm_geocom_error
@@ -220,7 +157,7 @@ integer function geocom_beep_alarm(this) result(grc)
class(geocom_class), intent(inout) :: this !! GeoCOM object.
type(request_type) :: request
- call dm_geocom_api_request_beep_alarm(request)
+ call dm_geocom_api_beep_alarm(request)
call this%send(request)
grc = this%grc
end function geocom_beep_alarm
@@ -232,7 +169,7 @@ integer function geocom_beep_normal(this) result(grc)
class(geocom_class), intent(inout) :: this !! GeoCOM object.
type(request_type) :: request
- call dm_geocom_api_request_beep_normal(request)
+ call dm_geocom_api_beep_normal(request)
call this%send(request)
grc = this%grc
end function geocom_beep_normal
@@ -244,7 +181,7 @@ integer function geocom_beep_off(this) result(grc)
class(geocom_class), intent(inout) :: this !! GeoCOM object.
type(request_type) :: request
- call dm_geocom_api_request_beep_off(request)
+ call dm_geocom_api_beep_off(request)
call this%send(request)
grc = this%grc
end function geocom_beep_off
@@ -265,7 +202,7 @@ integer function geocom_beep_on(this, intensity) result(grc)
intensity_ = GEOCOM_IOS_BEEP_STDINTENS
if (present(intensity)) intensity_ = max(0, min(intensity, GEOCOM_IOS_BEEP_STDINTENS))
- call dm_geocom_api_request_beep_on(request, intensity_)
+ call dm_geocom_api_beep_on(request, intensity_)
call this%send(request)
grc = this%grc
end function geocom_beep_on
diff --git a/src/dm_geocom_api.f90 b/src/dm_geocom_api.f90
index 5119b5e..f91f477 100644
--- a/src/dm_geocom_api.f90
+++ b/src/dm_geocom_api.f90
@@ -2,7 +2,7 @@
! Licence: ISC
module dm_geocom_api
!! Parameters, types, and procedures for GeoCOM protocol handling. The
- !! routines in this module only prepare requests and responses of GeoCOM
+ !! routines in this module only prepare requests and responses for GeoCOM
!! API calls.
!!
!! The GeoCOM API is divided into the following sub-systems:
@@ -20,6 +20,128 @@ module dm_geocom_api
!! * `TMC` – Theodolite Measurement and Calculation
!!
!! All GeoCOM parameters start with prefix `GEOCOM_`.
+ !!
+ !! ## API
+ !!
+ !! | GeoCOM API | DMPACK API |
+ !! |-----------------------------|-----------------------------------------------|
+ !! | `AUS_GetUserAtrState` | `dm_geocom_api_get_user_atr_mode` |
+ !! | `AUS_GetUserLockState` | `dm_geocom_api_get_user_lock_mode` |
+ !! | `AUS_SetUserAtrState` | `dm_geocom_api_set_user_atr_mode` |
+ !! | `AUS_SetUserLockState` | `dm_geocom_api_set_user_lock_mode` |
+ !! | `AUT_ChangeFace` | `dm_geocom_api_change_face` |
+ !! | `AUT_FineAdjust` | `dm_geocom_api_fine_adjust` |
+ !! | `AUT_GetFineAdjustMode` | `dm_geocom_api_get_fine_adjust_mode` |
+ !! | `AUT_GetSearchArea` | `dm_geocom_api_get_search_area` |
+ !! | `AUT_GetUserSpiral` | `dm_geocom_api_get_user_spiral` |
+ !! | `AUT_LockIn` | `dm_geocom_api_lock_in` |
+ !! | `AUT_MakePositioning` | `dm_geocom_api_set_position` |
+ !! | `AUT_PS_EnableRange` | `dm_geocom_api_ps_enable_range` |
+ !! | `AUT_PS_SearchNext` | `dm_geocom_api_ps_search_next` |
+ !! | `AUT_PS_SearchWindow` | `dm_geocom_api_ps_search_window` |
+ !! | `AUT_PS_SetRange` | `dm_geocom_api_ps_set_range` |
+ !! | `AUT_ReadTimeout` | `dm_geocom_api_get_timeout` |
+ !! | `AUT_ReadTol` | `dm_geocom_api_get_tolerance` |
+ !! | `AUT_Search` | `dm_geocom_api_get_search` |
+ !! | `AUT_SetFineAdjustMode` | `dm_geocom_api_set_fine_adjust_mode` |
+ !! | `AUT_SetSearchArea` | `dm_geocom_api_set_search_area` |
+ !! | `AUT_SetTimeout` | `dm_geocom_api_set_positioning_timeout` |
+ !! | `AUT_SetTol` | `dm_geocom_api_set_tolerance` |
+ !! | `AUT_SetUserSpiral` | `dm_geocom_api_set_user_spiral` |
+ !! | `BAP_GetATRSetting` | `dm_geocom_api_get_atr_setting` |
+ !! | `BAP_GetMeasPrg` | `dm_geocom_api_get_measurement_program` |
+ !! | `BAP_GetPrismDef` | `dm_geocom_api_get_prism_definition` |
+ !! | `BAP_GetRedATRFov` | `dm_geocom_api_get_reduced_atr_fov` |
+ !! | `BAP_GetTargetType` | `dm_geocom_api_get_target_type` |
+ !! | `BAP_GetUserPrismDef` | `dm_geocom_api_get_user_prism_definition` |
+ !! | `BAP_SearchTarget` | `dm_geocom_api_search_target` |
+ !! | `BAP_SetATRSetting` | `dm_geocom_api_set_atr_mode` |
+ !! | `BAP_SetAtmCorr` | `dm_geocom_api_set_atmospheric_correction` |
+ !! | `BAP_SetAtmPpm` | `dm_geocom_api_set_atmospheric_ppm` |
+ !! | `BAP_SetMeasPrg` | `dm_geocom_api_set_measurement_program` |
+ !! | `BAP_SetPrismType2` | `dm_geocom_api_set_prism_type_v2` |
+ !! | `BAP_SetPrismType` | `dm_geocom_api_set_prism_type` |
+ !! | `BAP_SetRedATRFov` | `dm_geocom_api_set_reduced_atr_fov` |
+ !! | `BAP_SetTargetType` | `dm_geocom_api_set_target_type` |
+ !! | `BAP_SetUserPrismDef` | `dm_geocom_api_set_user_prism_definition` |
+ !! | `BMM_BeepAlarm` | `dm_geocom_api_beep_alarm` |
+ !! | `BMM_BeepNormal` | `dm_geocom_api_beep_normal` |
+ !! | `COM_GetBinaryAvailable` | `dm_geocom_api_get_binary_mode` |
+ !! | `COM_GetDoublePrecision` | `dm_geocom_api_get_double_precision` |
+ !! | `COM_GetSWVersion` | `dm_geocom_api_get_geocom_version` |
+ !! | `COM_NullProc` | `dm_geocom_api_null` |
+ !! | `COM_SetBinaryAvailable` | `dm_geocom_api_set_binary_mode` |
+ !! | `COM_SetDoublePrecision` | `dm_geocom_api_set_double_precision` |
+ !! | `COM_SwitchOffTPS` | `dm_geocom_api_switch_off` |
+ !! | `COM_SwitchOffTPS` | `dm_geocom_api_switch_on` |
+ !! | `CSV_CheckPower` | `dm_geocom_api_get_power` |
+ !! | `CSV_GetDateTimeCentiSec` | `dm_geocom_api_get_date_time_centi` |
+ !! | `CSV_GetDateTime` | `dm_geocom_api_get_date_time` |
+ !! | `CSV_GetDeviceConfig` | `dm_geocom_api_get_device_config` |
+ !! | `CSV_GetInstrumentName` | `dm_geocom_api_get_instrument_name` |
+ !! | `CSV_GetInstrumentNo` | `dm_geocom_api_get_instrument_number` |
+ !! | `CSV_GetIntTemp` | `dm_geocom_api_get_internal_temperature` |
+ !! | `CSV_GetReflectorlessClass` | `dm_geocom_api_get_reflectorless_class` |
+ !! | `CSV_GetSWVersion` | `dm_geocom_api_get_software_version` |
+ !! | `CSV_SetDateTime` | `dm_geocom_api_set_date_time` |
+ !! | `EDM_GetEglIntensity` | `dm_geocom_api_get_egl_intensity` |
+ !! | `EDM_Laserpointer` | `dm_geocom_api_set_laser_pointer` |
+ !! | `EDM_SetEglIntensity` | `dm_geocom_api_set_egl_intensity` |
+ !! | `FTR_AbortDownload` | `dm_geocom_api_abort_download` |
+ !! | `FTR_AbortList` | `dm_geocom_api_abort_list` |
+ !! | `FTR_Delete` | `dm_geocom_api_delete` |
+ !! | `FTR_Download` | `dm_geocom_api_download` |
+ !! | `FTR_List` | `dm_geocom_api_list` |
+ !! | `FTR_SetupDownload` | `dm_geocom_api_setup_download` |
+ !! | `FTR_SetupList` | `dm_geocom_api_setup_list` |
+ !! | `IMG_GetTccConfig` | `dm_geocom_api_get_image_config` |
+ !! | `IMG_SetTccConfig` | `dm_geocom_api_set_image_config` |
+ !! | `IMG_TakeTccImage` | `dm_geocom_api_take_image` |
+ !! | `IOS_BeepOff` | `dm_geocom_api_beep_off` |
+ !! | `IOS_BeepOn` | `dm_geocom_api_beep_on` |
+ !! | `MOT_ReadLockStatus` | `dm_geocom_api_get_lock_status` |
+ !! | `MOT_SetVelocity` | `dm_geocom_api_set_velocity` |
+ !! | `MOT_StartController` | `dm_geocom_api_start_controller` |
+ !! | `MOT_StopController` | `dm_geocom_api_stop_controller` |
+ !! | `SUP_GetConfig` | `dm_geocom_api_get_config` |
+ !! | `SUP_SetConfig` | `dm_geocom_api_set_config` |
+ !! | `TMC_DoMeasure` | `dm_geocom_api_do_measure` |
+ !! | `TMC_GeoPpm` | `dm_geocom_api_get_geometric_ppm` |
+ !! | `TMC_GetAngSwitch` | `dm_geocom_api_get_angular_correction_status` |
+ !! | `TMC_GetAngle1` | `dm_geocom_api_get_angle_complete` |
+ !! | `TMC_GetAngle5` | `dm_geocom_api_get_angle` |
+ !! | `TMC_GetAtmCorr` | `dm_geocom_api_get_atmospheric_correction` |
+ !! | `TMC_GetAtmPpm` | `dm_geocom_api_get_atmospheric_ppm` |
+ !! | `TMC_GetCoordinate` | `dm_geocom_api_get_coordinate` |
+ !! | `TMC_GetEdmMode` | `dm_geocom_api_get_edm_mode` |
+ !! | `TMC_GetFace` | `dm_geocom_api_get_face` |
+ !! | `TMC_GetFullMeas` | `dm_geocom_api_get_full_measurement` |
+ !! | `TMC_GetHeight` | `dm_geocom_api_get_height` |
+ !! | `TMC_GetInclineSwitch` | `dm_geocom_api_get_inclination_correction` |
+ !! | `TMC_GetPrismCorr` | `dm_geocom_api_get_prism_constant` |
+ !! | `TMC_GetPrismType2` | `dm_geocom_api_get_prism_type_v2` |
+ !! | `TMC_GetPrismType` | `dm_geocom_api_get_prism_type` |
+ !! | `TMC_GetQuickDist` | `dm_geocom_api_get_quick_distance` |
+ !! | `TMC_GetRefractiveMethod` | `dm_geocom_api_get_refraction_mode` |
+ !! | `TMC_GetSignal` | `dm_geocom_api_get_signal` |
+ !! | `TMC_GetSimpleCoord` | `dm_geocom_api_get_simple_coordinates` |
+ !! | `TMC_GetSimpleMea` | `dm_geocom_api_get_simple_measurement` |
+ !! | `TMC_GetSlopeDistCorr` | `dm_geocom_api_get_slope_distance_correction` |
+ !! | `TMC_GetStation` | `dm_geocom_api_get_station` |
+ !! | `TMC_IfDataAzeCorrError` | `dm_geocom_api_get_atr_error` |
+ !! | `TMC_IfDataIncCorrError` | `dm_geocom_api_get_inclination_error` |
+ !! | `TMC_QuickDist` | `dm_geocom_api_get_quick_distance` |
+ !! | `TMC_SetAngSwitch` | `dm_geocom_api_set_angle_correction` |
+ !! | `TMC_SetEdmMode` | `dm_geocom_api_set_edm_mode` |
+ !! | `TMC_SetGeoPpm` | `dm_geocom_api_set_geometric_ppm` |
+ !! | `TMC_SetHandDist` | `dm_geocom_api_set_distance` |
+ !! | `TMC_SetHeight` | `dm_geocom_api_set_height` |
+ !! | `TMC_SetInclineSwitch` | `dm_geocom_api_set_inclination_correction` |
+ !! | `TMC_SetOrientation` | `dm_geocom_api_set_orientation` |
+ !! | `TMC_SetPrismCorr` | `dm_geocom_api_set_prism_constant` |
+ !! | `TMC_SetRefractiveMethod` | `dm_geocom_api_set_refraction_mode` |
+ !! | `TMC_SetStation` | `dm_geocom_api_set_station` |
+ !!
use :: dm_geocom_error
use :: dm_kind
use :: dm_request
@@ -40,18 +162,18 @@ module dm_geocom_api
! AUT - AUTOMATION.
! **************************************************************************
! AUT_POSMODE: Position precision.
- integer, parameter, public :: GEOCOM_AUT_NORMAL = 0 !! Fast positioning mode.
- integer, parameter, public :: GEOCOM_AUT_PRECISE = 1 !! Exact positioning mode.
- integer, parameter, public :: GEOCOM_AUT_FAST = 2 !! For TM30/TS30.
+ integer, parameter, public :: GEOCOM_AUT_NORMAL = 0 !! Fast positioning mode.
+ integer, parameter, public :: GEOCOM_AUT_PRECISE = 1 !! Exact positioning mode.
+ integer, parameter, public :: GEOCOM_AUT_FAST = 2 !! For TM30/TS30.
! AUT_ADJMODE: Fine-adjust position mode.
- integer, parameter, public :: GEOCOM_AUT_NORM_MODE = 0 !! Angle tolerance.
- integer, parameter, public :: GEOCOM_AUT_POINT_MODE = 1 !! Point tolerance.
- integer, parameter, public :: GEOCOM_AUT_DEFINE_MODE = 2 !! System independent positioning tolerance.
+ integer, parameter, public :: GEOCOM_AUT_NORM_MODE = 0 !! Angle tolerance.
+ integer, parameter, public :: GEOCOM_AUT_POINT_MODE = 1 !! Point tolerance.
+ integer, parameter, public :: GEOCOM_AUT_DEFINE_MODE = 2 !! System independent positioning tolerance.
! AUT_ATRMODE: Automatic target recognition mode.
- integer, parameter, public :: GEOCOM_AUT_POSITION = 0 !! Positioning to Hz and V angle.
- integer, parameter, public :: GEOCOM_AUT_TARGET = 1 !! Positioning to a target in the env. of the Hz V angle.
+ integer, parameter, public :: GEOCOM_AUT_POSITION = 0 !! Positioning to Hz and V angle.
+ integer, parameter, public :: GEOCOM_AUT_TARGET = 1 !! Positioning to a target in the env. of the Hz V angle.
integer, parameter, public :: GEOCOM_AUT_CLOCKWISE = 1 !! Direction close-wise.
integer, parameter, public :: GEOCOM_AUT_ANTICLOCKWISE = -1 !! Direction counter clock-wise.
@@ -303,122 +425,122 @@ module dm_geocom_api
! Public procedures.
public :: dm_geocom_api_request
- public :: dm_geocom_api_request_abort_download
- public :: dm_geocom_api_request_abort_list
- public :: dm_geocom_api_request_beep_alarm
- public :: dm_geocom_api_request_beep_normal
- public :: dm_geocom_api_request_beep_off
- public :: dm_geocom_api_request_beep_on
- public :: dm_geocom_api_request_change_face
- public :: dm_geocom_api_request_delete
- public :: dm_geocom_api_request_do_measure
- public :: dm_geocom_api_request_download
- public :: dm_geocom_api_request_fine_adjust
- public :: dm_geocom_api_request_get_angle
- public :: dm_geocom_api_request_get_angle_complete
- public :: dm_geocom_api_request_get_angle_distance
- public :: dm_geocom_api_request_get_angular_correction_status
- public :: dm_geocom_api_request_get_atmospheric_correction
- public :: dm_geocom_api_request_get_atmospheric_ppm
- public :: dm_geocom_api_request_get_atr_error
- public :: dm_geocom_api_request_get_atr_setting
- public :: dm_geocom_api_request_get_binary_mode
- public :: dm_geocom_api_request_get_config
- public :: dm_geocom_api_request_get_coordinate
- public :: dm_geocom_api_request_get_date_time
- public :: dm_geocom_api_request_get_date_time_centi
- public :: dm_geocom_api_request_get_device_config
- public :: dm_geocom_api_request_get_double_precision
- public :: dm_geocom_api_request_get_edm_mode
- public :: dm_geocom_api_request_get_egl_intensity
- public :: dm_geocom_api_request_get_face
- public :: dm_geocom_api_request_get_fine_adjust_mode
- public :: dm_geocom_api_request_get_full_measurement
- public :: dm_geocom_api_request_get_geometric_ppm
- public :: dm_geocom_api_request_get_height
- public :: dm_geocom_api_request_get_image_config
- public :: dm_geocom_api_request_get_incline_correction
- public :: dm_geocom_api_request_get_inclination_error
- public :: dm_geocom_api_request_get_instrument_name
- public :: dm_geocom_api_request_get_instrument_number
- public :: dm_geocom_api_request_get_internal_temperature
- public :: dm_geocom_api_request_get_lock_status
- public :: dm_geocom_api_request_get_measurement_program
- public :: dm_geocom_api_request_get_power
- public :: dm_geocom_api_request_get_prism_constant
- public :: dm_geocom_api_request_get_prism_definition
- public :: dm_geocom_api_request_get_prism_type
- public :: dm_geocom_api_request_get_prism_type_v2
- public :: dm_geocom_api_request_get_quick_distance
- public :: dm_geocom_api_request_get_reduced_atr_fov
- public :: dm_geocom_api_request_get_reflectorless_class
- public :: dm_geocom_api_request_get_refraction_mode
- public :: dm_geocom_api_request_get_search_area
- public :: dm_geocom_api_request_get_signal
- public :: dm_geocom_api_request_get_simple_coordinates
- ! public :: dm_geocom_api_request_get_simple_meta
- ! public :: dm_geocom_api_request_get_slope_distance_correction
- ! public :: dm_geocom_api_request_get_software_version
- ! public :: dm_geocom_api_request_get_software_version_v2
- ! public :: dm_geocom_api_request_get_station
- ! public :: dm_geocom_api_request_get_target_type
- ! public :: dm_geocom_api_request_get_timeout
- ! public :: dm_geocom_api_request_get_tolerance
- ! public :: dm_geocom_api_request_get_user_atr_mode
- ! public :: dm_geocom_api_request_get_user_local_mode
- ! public :: dm_geocom_api_request_get_user_prism_definition
- public :: dm_geocom_api_request_get_user_spiral
- public :: dm_geocom_api_request_list
- public :: dm_geocom_api_request_lock_in
- public :: dm_geocom_api_request_null
- ! public :: dm_geocom_api_request_ps_enable_range
- ! public :: dm_geocom_api_request_ps_search_next
- ! public :: dm_geocom_api_request_ps_search_window
- ! public :: dm_geocom_api_request_ps_set_range
- ! public :: dm_geocom_api_request_search
- ! public :: dm_geocom_api_request_search_target
- ! public :: dm_geocom_api_request_set_angle_correction
- ! public :: dm_geocom_api_request_set_atmospheric_correction
- ! public :: dm_geocom_api_request_set_atmospheric_ppm
- ! public :: dm_geocom_api_request_set_atr_setting
- ! public :: dm_geocom_api_request_set_binary_mode
- ! public :: dm_geocom_api_request_set_config
- ! public :: dm_geocom_api_request_set_date_time
- public :: dm_geocom_api_request_set_distance
- ! public :: dm_geocom_api_request_set_double_precision
- ! public :: dm_geocom_api_request_set_edm_mode
- ! public :: dm_geocom_api_request_set_egl_intensity
- ! public :: dm_geocom_api_request_set_fine_adjust_mode
- ! public :: dm_geocom_api_request_set_geometric_ppm
- ! public :: dm_geocom_api_request_set_height
- ! public :: dm_geocom_api_request_set_image_config
- ! public :: dm_geocom_api_request_set_incline_correction
- public :: dm_geocom_api_request_set_laser_pointer
- public :: dm_geocom_api_request_set_measurement_program
- public :: dm_geocom_api_request_set_orientation
- public :: dm_geocom_api_request_set_position
- public :: dm_geocom_api_request_set_positioning_timeout
- public :: dm_geocom_api_request_set_prism_constant
- public :: dm_geocom_api_request_set_prism_type
- public :: dm_geocom_api_request_set_prism_type_v2
- public :: dm_geocom_api_request_set_reduced_atr_fov
- public :: dm_geocom_api_request_set_refraction_mode
- public :: dm_geocom_api_request_set_search_area
- public :: dm_geocom_api_request_set_station
- public :: dm_geocom_api_request_set_target_type
- public :: dm_geocom_api_request_set_tolerance
- public :: dm_geocom_api_request_set_user_atr_mode
- public :: dm_geocom_api_request_set_user_lock_mode
- public :: dm_geocom_api_request_set_user_prism_definition
- public :: dm_geocom_api_request_set_user_spiral
- public :: dm_geocom_api_request_set_velocity
- public :: dm_geocom_api_request_setup_download
- public :: dm_geocom_api_request_setup_list
- public :: dm_geocom_api_request_start_controller
- public :: dm_geocom_api_request_stop_controller
- public :: dm_geocom_api_request_switch_off
- public :: dm_geocom_api_request_switch_on
- public :: dm_geocom_api_request_take_image
+
+ public :: dm_geocom_api_abort_download
+ public :: dm_geocom_api_abort_list
+ public :: dm_geocom_api_beep_alarm
+ public :: dm_geocom_api_beep_normal
+ public :: dm_geocom_api_beep_off
+ public :: dm_geocom_api_beep_on
+ public :: dm_geocom_api_change_face
+ public :: dm_geocom_api_delete
+ public :: dm_geocom_api_do_measure
+ public :: dm_geocom_api_download
+ public :: dm_geocom_api_fine_adjust
+ public :: dm_geocom_api_get_angle
+ public :: dm_geocom_api_get_angle_complete
+ public :: dm_geocom_api_get_angular_correction_status
+ public :: dm_geocom_api_get_atmospheric_correction
+ public :: dm_geocom_api_get_atmospheric_ppm
+ public :: dm_geocom_api_get_atr_error
+ public :: dm_geocom_api_get_atr_setting
+ public :: dm_geocom_api_get_binary_mode
+ public :: dm_geocom_api_get_config
+ public :: dm_geocom_api_get_coordinate
+ public :: dm_geocom_api_get_date_time
+ public :: dm_geocom_api_get_date_time_centi
+ public :: dm_geocom_api_get_device_config
+ public :: dm_geocom_api_get_double_precision
+ public :: dm_geocom_api_get_edm_mode
+ public :: dm_geocom_api_get_egl_intensity
+ public :: dm_geocom_api_get_face
+ public :: dm_geocom_api_get_fine_adjust_mode
+ public :: dm_geocom_api_get_full_measurement
+ public :: dm_geocom_api_get_geocom_version
+ public :: dm_geocom_api_get_geometric_ppm
+ public :: dm_geocom_api_get_height
+ public :: dm_geocom_api_get_image_config
+ public :: dm_geocom_api_get_inclination_correction
+ public :: dm_geocom_api_get_inclination_error
+ public :: dm_geocom_api_get_instrument_name
+ public :: dm_geocom_api_get_instrument_number
+ public :: dm_geocom_api_get_internal_temperature
+ public :: dm_geocom_api_get_lock_status
+ public :: dm_geocom_api_get_measurement_program
+ public :: dm_geocom_api_get_power
+ public :: dm_geocom_api_get_prism_constant
+ public :: dm_geocom_api_get_prism_definition
+ public :: dm_geocom_api_get_prism_type
+ public :: dm_geocom_api_get_prism_type_v2
+ public :: dm_geocom_api_get_quick_distance
+ public :: dm_geocom_api_get_reduced_atr_fov
+ public :: dm_geocom_api_get_reflectorless_class
+ public :: dm_geocom_api_get_refraction_mode
+ public :: dm_geocom_api_get_search_area
+ public :: dm_geocom_api_get_signal
+ public :: dm_geocom_api_get_simple_coordinates
+ public :: dm_geocom_api_get_simple_measurement
+ public :: dm_geocom_api_get_slope_distance_correction
+ public :: dm_geocom_api_get_software_version
+ public :: dm_geocom_api_get_station
+ public :: dm_geocom_api_get_target_type
+ public :: dm_geocom_api_get_timeout
+ public :: dm_geocom_api_get_tolerance
+ public :: dm_geocom_api_get_user_atr_mode
+ public :: dm_geocom_api_get_user_lock_mode
+ public :: dm_geocom_api_get_user_prism_definition
+ public :: dm_geocom_api_get_user_spiral
+ public :: dm_geocom_api_list
+ public :: dm_geocom_api_lock_in
+ public :: dm_geocom_api_null
+ public :: dm_geocom_api_ps_enable_range
+ public :: dm_geocom_api_ps_search_next
+ public :: dm_geocom_api_ps_search_window
+ public :: dm_geocom_api_ps_set_range
+ public :: dm_geocom_api_search
+ public :: dm_geocom_api_search_target
+ public :: dm_geocom_api_set_angle_correction
+ public :: dm_geocom_api_set_atmospheric_correction
+ public :: dm_geocom_api_set_atmospheric_ppm
+ public :: dm_geocom_api_set_atr_mode
+ public :: dm_geocom_api_set_binary_mode
+ public :: dm_geocom_api_set_config
+ public :: dm_geocom_api_set_date_time
+ public :: dm_geocom_api_set_distance
+ public :: dm_geocom_api_set_double_precision
+ public :: dm_geocom_api_set_edm_mode
+ public :: dm_geocom_api_set_egl_intensity
+ public :: dm_geocom_api_set_fine_adjust_mode
+ public :: dm_geocom_api_set_geometric_ppm
+ public :: dm_geocom_api_set_height
+ public :: dm_geocom_api_set_image_config
+ public :: dm_geocom_api_set_inclination_correction
+ public :: dm_geocom_api_set_laser_pointer
+ public :: dm_geocom_api_set_measurement_program
+ public :: dm_geocom_api_set_orientation
+ public :: dm_geocom_api_set_position
+ public :: dm_geocom_api_set_positioning_timeout
+ public :: dm_geocom_api_set_prism_constant
+ public :: dm_geocom_api_set_prism_type
+ public :: dm_geocom_api_set_prism_type_v2
+ public :: dm_geocom_api_set_reduced_atr_fov
+ public :: dm_geocom_api_set_refraction_mode
+ public :: dm_geocom_api_set_search_area
+ public :: dm_geocom_api_set_station
+ public :: dm_geocom_api_set_target_type
+ public :: dm_geocom_api_set_tolerance
+ public :: dm_geocom_api_set_user_atr_mode
+ public :: dm_geocom_api_set_user_lock_mode
+ public :: dm_geocom_api_set_user_prism_definition
+ public :: dm_geocom_api_set_user_spiral
+ public :: dm_geocom_api_set_velocity
+ public :: dm_geocom_api_setup_download
+ public :: dm_geocom_api_setup_list
+ public :: dm_geocom_api_start_controller
+ public :: dm_geocom_api_stop_controller
+ public :: dm_geocom_api_switch_off
+ public :: dm_geocom_api_switch_on
+ public :: dm_geocom_api_take_image
contains
! **************************************************************************
! PUBLIC PROCEDURES.
@@ -460,7 +582,7 @@ end subroutine dm_geocom_api_request
! **************************************************************************
! PUBLIC GEOCOM REQUEST PREPARATION PROCEDURES.
! **************************************************************************
- pure subroutine dm_geocom_api_request_abort_download(request)
+ pure subroutine dm_geocom_api_abort_download(request)
!! Request of `FTR_AbortDownload` procedure. Creates request to abort
!! or end the file download command.
!!
@@ -479,9 +601,9 @@ pure subroutine dm_geocom_api_request_abort_download(request)
type(request_type), intent(out) :: request !! Prepared request.
call dm_geocom_api_request(request, REQCODE, pattern=GEOCOM_GRC_PATTERN, responses=GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_abort_download
+ end subroutine dm_geocom_api_abort_download
- pure subroutine dm_geocom_api_request_abort_list(request)
+ pure subroutine dm_geocom_api_abort_list(request)
!! Request of `FTR_AbortList` procedure. Creates request to aborts or
!! end the file list command.
!!
@@ -500,9 +622,9 @@ pure subroutine dm_geocom_api_request_abort_list(request)
type(request_type), intent(out) :: request !! Prepared request.
call dm_geocom_api_request(request, REQCODE, pattern=GEOCOM_GRC_PATTERN, responses=GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_abort_list
+ end subroutine dm_geocom_api_abort_list
- pure subroutine dm_geocom_api_request_beep_alarm(request)
+ pure subroutine dm_geocom_api_beep_alarm(request)
!! Request of `BMM_BeepAlarm` procedure. Creates request to output an
!! alarm signal (triple beep).
!!
@@ -521,9 +643,9 @@ pure subroutine dm_geocom_api_request_beep_alarm(request)
type(request_type), intent(out) :: request !! Prepared request.
call dm_geocom_api_request(request, REQCODE, pattern=GEOCOM_GRC_PATTERN, responses=GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_beep_alarm
+ end subroutine dm_geocom_api_beep_alarm
- pure subroutine dm_geocom_api_request_beep_normal(request)
+ pure subroutine dm_geocom_api_beep_normal(request)
!! Request of `BMM_BeepNormal` procedure. Creates request to output an
!! alarm signal (single beep).
!!
@@ -542,9 +664,9 @@ pure subroutine dm_geocom_api_request_beep_normal(request)
type(request_type), intent(out) :: request !! Prepared request.
call dm_geocom_api_request(request, REQCODE, pattern=GEOCOM_GRC_PATTERN, responses=GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_beep_normal
+ end subroutine dm_geocom_api_beep_normal
- pure subroutine dm_geocom_api_request_beep_off(request)
+ pure subroutine dm_geocom_api_beep_off(request)
!! Request of `IOS_BeepOff` procedure. Creates request to stop an
!! active beep signal.
!!
@@ -563,9 +685,9 @@ pure subroutine dm_geocom_api_request_beep_off(request)
type(request_type), intent(out) :: request !! Prepared request.
call dm_geocom_api_request(request, REQCODE, pattern=GEOCOM_GRC_PATTERN, responses=GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_beep_off
+ end subroutine dm_geocom_api_beep_off
- pure subroutine dm_geocom_api_request_beep_on(request, intensity)
+ pure subroutine dm_geocom_api_beep_on(request, intensity)
!! Request of `IOS_BeepOn` procedure. Creates request for continuous
!! beep signal of given intensity.
!!
@@ -588,20 +710,20 @@ pure subroutine dm_geocom_api_request_beep_on(request, intensity)
write (args, '(i0)') intensity
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_beep_on
+ end subroutine dm_geocom_api_beep_on
- pure subroutine dm_geocom_api_request_change_face(request, pos_mode, atr_mode)
+ pure subroutine dm_geocom_api_change_face(request, pos_mode, atr_mode)
!! Request of `AUT_ChangeFace` procedure. Creates request for turning
!! the telescope to the other face.
!!
- !! If `pos_mode` is `GEOCOM_AUT_NORMAL`, uses the current value of the
+ !! If `pos_mode` is AUT_NORMAL`, uses the current value of the
!! compensator. For positioning distances > 25 gon, this mode might tend
- !! to inaccuracy. If set to `GEOCOM_AUT_PRECISE`, tries to measure the
- !! exact inclination of the target. Tends to long position time.
+ !! to inaccuracy. If set to `AUT_PRECISE`, tries to measure the exact
+ !! inclination of the target. Tends to long position time.
!!
- !! If `atr_mode` is `GEOCOM_AUT_POSITION`, uses conventional position
- !! to other face. If set to `GEOCOM_AUT_TARGET`, tries to position into
- !! a target in the destination area. This mode requires activated ATR.
+ !! If `atr_mode` is `AUT_POSITION`, uses conventional position to other
+ !! face. If set to `AUT_TARGET`, tries to position into a target in the
+ !! destination area. This mode requires activated ATR.
!!
!! The instrument returns the following responses:
!!
@@ -623,9 +745,9 @@ pure subroutine dm_geocom_api_request_change_face(request, pos_mode, atr_mode)
write (args, '(i0, ",", i0, ",0")') pos_mode, atr_mode
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_change_face
+ end subroutine dm_geocom_api_change_face
- pure subroutine dm_geocom_api_request_delete(request, device_type, file_type, day, month, year, file_name)
+ pure subroutine dm_geocom_api_delete(request, device_type, file_type, day, month, year, file_name)
!! Request of `FTR_Delete` procedure. Creates request for deleting one
!! or more files.
!!
@@ -649,16 +771,15 @@ pure subroutine dm_geocom_api_request_delete(request, device_type, file_type, da
type(request_type), intent(out) :: request !! Prepared request.
integer, intent(in) :: device_type !! Internal memory or memory card (`FTR_DEVICETYPE`).
integer, intent(in) :: file_type !! Type of file (`FTR_FILETYPE`).
- integer, intent(in) :: day !! Day.
- integer, intent(in) :: month !! Month.
- integer, intent(in) :: year !! Year.
+ integer, intent(in) :: day !! Day (`DD`).
+ integer, intent(in) :: month !! Month (`MM`).
+ integer, intent(in) :: year !! Year (`YY`).
character(len=*), intent(in) :: file_name !! Name of file to delete.
character(len=80) :: args
type(response_type) :: responses(2)
- ! TODO: byte instead of integer
- write (args, '(5(i0, ","), a)') device_type, file_type, day, month, year, file_name
+ write (args, '(2(i0, ","), 3(z2.2, ","), a)') device_type, file_type, day, month, year, file_name
responses = [ &
response_type('grc', type=RESPONSE_TYPE_INT32), &
@@ -666,34 +787,33 @@ pure subroutine dm_geocom_api_request_delete(request, device_type, file_type, da
]
call dm_geocom_api_request(request, REQCODE, args, PATTERN, responses)
- end subroutine dm_geocom_api_request_delete
+ end subroutine dm_geocom_api_delete
- pure subroutine dm_geocom_api_request_do_measure(request, prog, mode)
+ pure subroutine dm_geocom_api_do_measure(request, prog, mode)
!! Request of `TMC_DoMeasure` procedure. Creates request for trying a
!! distance measurement. This command does not return any values.
!!
!! The argument `prog` (`TMC_MEASURE_PRG`) may be one of the following
!! TMC measurement modes:
!!
- !! * `GEOCOM_TMC_STOP`
- !! * `GEOCOM_TMC_DEF_DIST`
- !! * `GEOCOM_TMC_CLEAR`
- !! * `GEOCOM_TMC_SIGNAL`
- !! * `GEOCOM_TMC_DO_MEASURE`
- !! * `GEOCOM_TMC_RTRK_DIST`
- !! * `GEOCOM_TMC_RED_TRK_DIST`
- !! * `GEOCOM_TMC_FREQUENCY`
+ !! * `TMC_STOP`
+ !! * `TMC_DEF_DIST`
+ !! * `TMC_CLEAR`
+ !! * `TMC_SIGNAL`
+ !! * `TMC_DO_MEASURE`
+ !! * `TMC_RTRK_DIST`
+ !! * `TMC_RED_TRK_DIST`
+ !! * `TMC_FREQUENCY`
!!
!! The argument `mode` (`TMC_INCLINE_PRG`) may be one of the following
!! inclination measurement modes:
!!
- !! * `GEOCOM_TMC_MEA_INC`
- !! * `GEOCOM_TMC_AUTO_INC`
- !! * `GEOCOM_TMC_PLANE_INC`
+ !! * `TMC_MEA_INC`
+ !! * `TMC_AUTO_INC`
+ !! * `TMC_PLANE_INC`
!!
!! If a distance measurement is performed in measurement program
- !! `GEOCOM_TMC_DEF_DIST`, the distance sensor will work with the set
- !! EDM mode.
+ !! `TMC_DEF_DIST`, the distance sensor will work with the set EDM mode.
!!
!! The instrument returns the following responses:
!!
@@ -715,9 +835,9 @@ pure subroutine dm_geocom_api_request_do_measure(request, prog, mode)
write (args, '(i0, ",", i0)') prog, mode
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_do_measure
+ end subroutine dm_geocom_api_do_measure
- pure subroutine dm_geocom_api_request_download(request, block_number)
+ pure subroutine dm_geocom_api_download(request, block_number)
!! Request of `FTR_Download` procedure. Creates request to get a
!! single block of data. The `FTR_SetupDownload` command has to be
!! called first.
@@ -759,9 +879,9 @@ pure subroutine dm_geocom_api_request_download(request, block_number)
]
call dm_geocom_api_request(request, REQCODE, args, PATTERN, responses, mode=MODE)
- end subroutine dm_geocom_api_request_download
+ end subroutine dm_geocom_api_download
- pure subroutine dm_geocom_api_request_fine_adjust(request, search_hz, search_v)
+ pure subroutine dm_geocom_api_fine_adjust(request, search_hz, search_v)
!! Request of `AUT_FineAdjust` procedure. Creates request for
!! automatic target positioning.
!!
@@ -803,9 +923,9 @@ pure subroutine dm_geocom_api_request_fine_adjust(request, search_hz, search_v)
write (args, '(2(f0.12, ","), "0")') search_hz, search_v
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_fine_adjust
+ end subroutine dm_geocom_api_fine_adjust
- pure subroutine dm_geocom_api_request_get_angle(request, mode)
+ pure subroutine dm_geocom_api_get_angle(request, mode)
!! Request of `TMC_GetAngle5` procedure. Creates request for returning
!! a simple angle measurement.
!!
@@ -841,9 +961,9 @@ pure subroutine dm_geocom_api_request_get_angle(request, mode)
]
call dm_geocom_api_request(request, REQCODE, args, PATTERN, responses)
- end subroutine dm_geocom_api_request_get_angle
+ end subroutine dm_geocom_api_get_angle
- pure subroutine dm_geocom_api_request_get_angle_complete(request, mode)
+ pure subroutine dm_geocom_api_get_angle_complete(request, mode)
!! Request of `TMC_GetAngle1` procedure. Creates request for returning
!! a complete angle measurement.
!!
@@ -896,57 +1016,9 @@ pure subroutine dm_geocom_api_request_get_angle_complete(request, mode)
]
call dm_geocom_api_request(request, REQCODE, args, PATTERN, responses)
- end subroutine dm_geocom_api_request_get_angle_complete
-
- pure subroutine dm_geocom_api_request_get_angle_distance(request, wait_time, mode)
- !! Request of `TMC_GetSimpleMea` procedure. Creates request for
- !! returning angle and distance.
- !!
- !! This command does not start a new distance measurement. A distance
- !! measurement has to be started in advance. If a distance measurement
- !! is valid the function ignores `wait_time` and returns the results. If
- !! no valid distance measurement is available and the distance
- !! measurement unit is not activated (by `TMC_DoMeasure` before the
- !! `TMC_GetSimpleMea` API call), the angle measurement result is
- !! returned after the wait time.
- !!
- !! The instrument returns the following responses:
- !!
- !! * `grc` – GeoCOM return code.
- !! * `hz` – Horizontal angle [rad].
- !! * `v` – Vertical angle [rad].
- !! * `sdist` – Slope distance [m].
- !!
- !! | Property | Values |
- !! |----------------|--------------------------------------------------|
- !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
- !! | ASCII request | `%R1Q,2108:,` |
- !! | ASCII response | `%R1P,0,0:,,,` |
- !!
- integer, parameter :: REQCODE = 2108
- character(len=*), parameter :: PATTERN = &
- '(?\d+),(?[-\d\.]+),(?[-\d\.]+),(?[-\d\.]+)'
-
- type(request_type), intent(out) :: request !! Prepared request.
- integer, intent(in) :: wait_time !! Delay to wait for the distance measurement to finish [ms].
- integer, intent(in) :: mode !! Angle measurement mode (`TMC_HZ_V_ANG`).
-
- character(len=80) :: args
- type(response_type) :: responses(4)
-
- write (args, '(i0, ",", i0)') wait_time, mode
-
- responses = [ &
- response_type('grc', unit=' ', type=RESPONSE_TYPE_INT32), &
- response_type('hz', unit='rad', type=RESPONSE_TYPE_REAL64), &
- response_type('v', unit='rad', type=RESPONSE_TYPE_REAL64), &
- response_type('sdist', unit='m', type=RESPONSE_TYPE_REAL64) &
- ]
-
- call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_angle_distance
+ end subroutine dm_geocom_api_get_angle_complete
- pure subroutine dm_geocom_api_request_get_angular_correction_status(request)
+ pure subroutine dm_geocom_api_get_angular_correction_status(request)
!! Request of `TMC_GetAngSwitch` procedure. Creates request for
!! getting the angular correction status.
!!
@@ -980,9 +1052,9 @@ pure subroutine dm_geocom_api_request_get_angular_correction_status(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_angular_correction_status
+ end subroutine dm_geocom_api_get_angular_correction_status
- pure subroutine dm_geocom_api_request_get_atmospheric_correction(request)
+ pure subroutine dm_geocom_api_get_atmospheric_correction(request)
!! Request of `TMC_GetAtmCorr` procedure. Creates request for getting
!! the atmospheric correction parameters.
!!
@@ -1016,9 +1088,9 @@ pure subroutine dm_geocom_api_request_get_atmospheric_correction(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_atmospheric_correction
+ end subroutine dm_geocom_api_get_atmospheric_correction
- pure subroutine dm_geocom_api_request_get_atmospheric_ppm(request)
+ pure subroutine dm_geocom_api_get_atmospheric_ppm(request)
!! Request of `TMC_GetAtmPpm` procedure. Creates request for getting
!! the atmospheric ppm correction factor.
!!
@@ -1045,9 +1117,9 @@ pure subroutine dm_geocom_api_request_get_atmospheric_ppm(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_atmospheric_ppm
+ end subroutine dm_geocom_api_get_atmospheric_ppm
- pure subroutine dm_geocom_api_request_get_atr_error(request)
+ pure subroutine dm_geocom_api_get_atr_error(request)
!! Request of `TMC_IfDataAzeCorrError` procedure. Creates request for
!! getting the ATR error status.
!!
@@ -1074,9 +1146,9 @@ pure subroutine dm_geocom_api_request_get_atr_error(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_atr_error
+ end subroutine dm_geocom_api_get_atr_error
- pure subroutine dm_geocom_api_request_get_atr_setting(request)
+ pure subroutine dm_geocom_api_get_atr_setting(request)
!! Request of `BAP_GetATRSetting` procedure. Creates request for
!! getting the current ATR Low-Vis mode.
!!
@@ -1103,9 +1175,9 @@ pure subroutine dm_geocom_api_request_get_atr_setting(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_atr_setting
+ end subroutine dm_geocom_api_get_atr_setting
- pure subroutine dm_geocom_api_request_get_binary_mode(request)
+ pure subroutine dm_geocom_api_get_binary_mode(request)
!! Request of `COM_GetBinaryAvailable` procedure. Creates request for
!! getting the binary attribute of the server.
!!
@@ -1132,9 +1204,9 @@ pure subroutine dm_geocom_api_request_get_binary_mode(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_binary_mode
+ end subroutine dm_geocom_api_get_binary_mode
- pure subroutine dm_geocom_api_request_get_config(request)
+ pure subroutine dm_geocom_api_get_config(request)
!! Request of `SUP_GetConfig` procedure. Creates request for getting
!! the power management configuration status. The power timeout
!! specifies the time after which the device switches into the mode
@@ -1165,9 +1237,9 @@ pure subroutine dm_geocom_api_request_get_config(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_config
+ end subroutine dm_geocom_api_get_config
- pure subroutine dm_geocom_api_request_get_coordinate(request, mode, wait_time)
+ pure subroutine dm_geocom_api_get_coordinate(request, mode, wait_time)
!! Request of `TMC_GetCoordinate` procedure. Creates request for
!! getting the coordinates of a measured point.
!!
@@ -1225,9 +1297,9 @@ pure subroutine dm_geocom_api_request_get_coordinate(request, mode, wait_time)
]
call dm_geocom_api_request(request, REQCODE, args, PATTERN, responses)
- end subroutine dm_geocom_api_request_get_coordinate
+ end subroutine dm_geocom_api_get_coordinate
- pure subroutine dm_geocom_api_request_get_date_time(request)
+ pure subroutine dm_geocom_api_get_date_time(request)
!! Request of `CSV_GetDateTime` procedure. Creates request for getting
!! the current date and time of the instrument. A possible response may
!! look like `%R1P,0,0:0,1996,'07','19','10','13','2f'`.
@@ -1267,9 +1339,9 @@ pure subroutine dm_geocom_api_request_get_date_time(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_date_time
+ end subroutine dm_geocom_api_get_date_time
- pure subroutine dm_geocom_api_request_get_date_time_centi(request)
+ pure subroutine dm_geocom_api_get_date_time_centi(request)
!! Request of `CSV_GetDateTimeCentiSec` procedure. Creates request for
!! getting the current date and time of the instrument, including
!! centiseconds.
@@ -1311,9 +1383,9 @@ pure subroutine dm_geocom_api_request_get_date_time_centi(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_date_time_centi
+ end subroutine dm_geocom_api_get_date_time_centi
- pure subroutine dm_geocom_api_request_get_device_config(request)
+ pure subroutine dm_geocom_api_get_device_config(request)
!! Request of `CSV_GetDeviceConfig` procedure. Creates request for
!! getting the instrument configuration.
!!
@@ -1342,9 +1414,9 @@ pure subroutine dm_geocom_api_request_get_device_config(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_device_config
+ end subroutine dm_geocom_api_get_device_config
- pure subroutine dm_geocom_api_request_get_double_precision(request)
+ pure subroutine dm_geocom_api_get_double_precision(request)
!! Request of `COM_GetDoublePrecision` procedure. Creates request for
!! getting the double precision setting – the number of digits to the
!! right of the decimal point – when double floating-point values are
@@ -1373,9 +1445,9 @@ pure subroutine dm_geocom_api_request_get_double_precision(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_double_precision
+ end subroutine dm_geocom_api_get_double_precision
- pure subroutine dm_geocom_api_request_get_edm_mode(request)
+ pure subroutine dm_geocom_api_get_edm_mode(request)
!! Request of `TMC_GetEdmMode` procedure. Creates request for getting
!! the EDM measurement mode.
!!
@@ -1402,9 +1474,9 @@ pure subroutine dm_geocom_api_request_get_edm_mode(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_edm_mode
+ end subroutine dm_geocom_api_get_edm_mode
- pure subroutine dm_geocom_api_request_get_egl_intensity(request)
+ pure subroutine dm_geocom_api_get_egl_intensity(request)
!! Request of `EDM_GetEglIntensity` procedure. Creates request for
!! getting the value of the intensity of the electronic guide light
!! (EGL).
@@ -1432,9 +1504,9 @@ pure subroutine dm_geocom_api_request_get_egl_intensity(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_egl_intensity
+ end subroutine dm_geocom_api_get_egl_intensity
- pure subroutine dm_geocom_api_request_get_face(request)
+ pure subroutine dm_geocom_api_get_face(request)
!! Request of `TMC_GetFace` procedure. Creates request for getting the
!! face of the current telescope position.
!!
@@ -1461,9 +1533,9 @@ pure subroutine dm_geocom_api_request_get_face(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_face
+ end subroutine dm_geocom_api_get_face
- pure subroutine dm_geocom_api_request_get_fine_adjust_mode(request)
+ pure subroutine dm_geocom_api_get_fine_adjust_mode(request)
!! Request of `AUT_GetFineAdjustMode` procedure. Creates request for
!! getting the fine adjustment positioning mode.
!!
@@ -1490,9 +1562,9 @@ pure subroutine dm_geocom_api_request_get_fine_adjust_mode(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_fine_adjust_mode
+ end subroutine dm_geocom_api_get_fine_adjust_mode
- pure subroutine dm_geocom_api_request_get_full_measurement(request, wait_time, mode)
+ pure subroutine dm_geocom_api_get_full_measurement(request, wait_time, mode)
!! Request of `TMC_GetFullMeas` procedure. Creates request to query
!! angle, inclination, and distance measurement values.
!!
@@ -1550,9 +1622,42 @@ pure subroutine dm_geocom_api_request_get_full_measurement(request, wait_time, m
]
call dm_geocom_api_request(request, REQCODE, args, PATTERN, responses)
- end subroutine dm_geocom_api_request_get_full_measurement
+ end subroutine dm_geocom_api_get_full_measurement
+
+ pure subroutine dm_geocom_api_get_geocom_version(request)
+ !! Request of `COM_GetSWVersion` procedure. Creates request for getting
+ !! the GeoCOM server software version.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !! * `gcrel` – GeoCOM software release.
+ !! * `gcver` – GeoCOM software version.
+ !! * `gcsub` – GeoCOM software sub-version.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,110:` |
+ !! | ASCII response | `%R1P,0,0:,,,` |
+ !!
+ integer, parameter :: REQCODE = 110
+ character(len=*), parameter :: PATTERN = '(?\d+),(?\d+),(?\d+),(?\d+)'
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ type(response_type) :: responses(4)
+
+ responses = [ &
+ response_type('grc', type=RESPONSE_TYPE_INT32), &
+ response_type('gcrel', type=RESPONSE_TYPE_INT32), &
+ response_type('gcver', type=RESPONSE_TYPE_INT32), &
+ response_type('gcsub', type=RESPONSE_TYPE_INT32) &
+ ]
- pure subroutine dm_geocom_api_request_get_geometric_ppm(request)
+ call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
+ end subroutine dm_geocom_api_get_geocom_version
+
+ pure subroutine dm_geocom_api_get_geometric_ppm(request)
!! Request of `TMC_GeoPpm` procedure. Creates request for getting the
!! geometric ppm correction factor.
!!
@@ -1562,14 +1667,14 @@ pure subroutine dm_geocom_api_request_get_geometric_ppm(request)
!! * `geomauto` – Geometric ppm calculation on/off [bool].
!! * `scalefcm` – Scale factor on central meridian.
!! * `offsetcm` – Offset from central meridian [m].
- !! * `hredppm` – Height above reference ppm value [ppm].
- !! * `indippm` – Individual ppm value [ppm].
+ !! * `ppmhred` – Height above reference ppm value [ppm].
+ !! * `ppmindi` – Individual ppm value [ppm].
!!
!! | Property | Values |
!! |----------------|-----------------------------------------------------------------------|
!! | Instruments | TPS1200, TM30/TS30, TS16 |
!! | ASCII request | `%R1Q,2154:` |
- !! | ASCII response | `%R1P,0,0:,,,,,` |
+ !! | ASCII response | `%R1P,0,0:,,,,,` |
!!
integer, parameter :: REQCODE = 2154
character(len=*), parameter :: PATTERN = &
@@ -1584,14 +1689,14 @@ pure subroutine dm_geocom_api_request_get_geometric_ppm(request)
response_type('geomauto', unit=' ', type=RESPONSE_TYPE_LOGICAL), & ! State of geometric ppm calculation [bool].
response_type('scalefcm', unit=' ', type=RESPONSE_TYPE_REAL64), & ! Scale factor on central meridian.
response_type('offsetcm', unit='m', type=RESPONSE_TYPE_REAL64), & ! Offset from central meridian [m].
- response_type('hredppm', unit='ppm', type=RESPONSE_TYPE_REAL64), & ! Height above reference ppm value [ppm].
- response_type('indippm', unit='ppm', type=RESPONSE_TYPE_REAL64) & ! Individual ppm value [ppm].
+ response_type('ppmhred', unit='ppm', type=RESPONSE_TYPE_REAL64), & ! Height above reference ppm value [ppm].
+ response_type('ppmindi', unit='ppm', type=RESPONSE_TYPE_REAL64) & ! Individual ppm value [ppm].
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_geometric_ppm
+ end subroutine dm_geocom_api_get_geometric_ppm
- pure subroutine dm_geocom_api_request_get_height(request)
+ pure subroutine dm_geocom_api_get_height(request)
!! Request of `TMC_GetHeight` procedure. Creates request for getting
!! the current reflector height.
!!
@@ -1618,9 +1723,9 @@ pure subroutine dm_geocom_api_request_get_height(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_height
+ end subroutine dm_geocom_api_get_height
- pure subroutine dm_geocom_api_request_get_image_config(request, mem_type)
+ pure subroutine dm_geocom_api_get_image_config(request, mem_type)
!! Request of `IMG_GetTccConfig` procedure. Creates request to read
!! the current image configuration. The response `subfunc` is a binary
!! combination of the following settings:
@@ -1665,9 +1770,9 @@ pure subroutine dm_geocom_api_request_get_image_config(request, mem_type)
]
call dm_geocom_api_request(request, REQCODE, args, PATTERN, responses)
- end subroutine dm_geocom_api_request_get_image_config
+ end subroutine dm_geocom_api_get_image_config
- pure subroutine dm_geocom_api_request_get_incline_correction(request)
+ pure subroutine dm_geocom_api_get_inclination_correction(request)
!! Request of `TMC_GetInclineSwitch` procedure. Creates request for
!! getting the dual-axis compensator status.
!!
@@ -1694,9 +1799,9 @@ pure subroutine dm_geocom_api_request_get_incline_correction(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_incline_correction
+ end subroutine dm_geocom_api_get_inclination_correction
- pure subroutine dm_geocom_api_request_get_inclination_error(request)
+ pure subroutine dm_geocom_api_get_inclination_error(request)
!! Request of `TMC_IfDataIncCorrError` procedure. Creates request for
!! getting the inclination error status.
!!
@@ -1723,9 +1828,9 @@ pure subroutine dm_geocom_api_request_get_inclination_error(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_inclination_error
+ end subroutine dm_geocom_api_get_inclination_error
- pure subroutine dm_geocom_api_request_get_instrument_name(request)
+ pure subroutine dm_geocom_api_get_instrument_name(request)
!! Request of `CSV_GetInstrumentName` procedure. Creates request for
!! getting the Leica-specific instrument name.
!!
@@ -1752,9 +1857,9 @@ pure subroutine dm_geocom_api_request_get_instrument_name(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_instrument_name
+ end subroutine dm_geocom_api_get_instrument_name
- pure subroutine dm_geocom_api_request_get_instrument_number(request)
+ pure subroutine dm_geocom_api_get_instrument_number(request)
!! Request of `CSV_GetInstrumentNo` procedure. Creates request for
!! getting the factory defined instrument number.
!!
@@ -1781,9 +1886,9 @@ pure subroutine dm_geocom_api_request_get_instrument_number(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_instrument_number
+ end subroutine dm_geocom_api_get_instrument_number
- pure subroutine dm_geocom_api_request_get_internal_temperature(request)
+ pure subroutine dm_geocom_api_get_internal_temperature(request)
!! Request of `CSV_GetIntTemp` procedure. Creates request for getting
!! the internal temperature of the instrument, measured on the
!! mainboard side.
@@ -1811,9 +1916,9 @@ pure subroutine dm_geocom_api_request_get_internal_temperature(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_internal_temperature
+ end subroutine dm_geocom_api_get_internal_temperature
- pure subroutine dm_geocom_api_request_get_lock_status(request)
+ pure subroutine dm_geocom_api_get_lock_status(request)
!! Request of `MOT_ReadLockStatus` procedure. Creates request for
!! returning the condition of the Lock-In control.
!!
@@ -1840,9 +1945,9 @@ pure subroutine dm_geocom_api_request_get_lock_status(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_lock_status
+ end subroutine dm_geocom_api_get_lock_status
- pure subroutine dm_geocom_api_request_get_measurement_program(request)
+ pure subroutine dm_geocom_api_get_measurement_program(request)
!! Request of `BAP_GetMeasPrg` procedure. Creates request for getting
!! the distance measurement program of the instrument.
!!
@@ -1869,9 +1974,9 @@ pure subroutine dm_geocom_api_request_get_measurement_program(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_measurement_program
+ end subroutine dm_geocom_api_get_measurement_program
- pure subroutine dm_geocom_api_request_get_power(request)
+ pure subroutine dm_geocom_api_get_power(request)
!! Request of `CSV_CheckPower` procedure. Creates request for checking
!! the available power.
!!
@@ -1902,9 +2007,9 @@ pure subroutine dm_geocom_api_request_get_power(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_power
+ end subroutine dm_geocom_api_get_power
- pure subroutine dm_geocom_api_request_get_prism_constant(request)
+ pure subroutine dm_geocom_api_get_prism_constant(request)
!! Request of `TMC_GetPrismCorr` procedure. Creates request for
!! getting the prism constant.
!!
@@ -1931,9 +2036,9 @@ pure subroutine dm_geocom_api_request_get_prism_constant(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_prism_constant
+ end subroutine dm_geocom_api_get_prism_constant
- pure subroutine dm_geocom_api_request_get_prism_definition(request, type)
+ pure subroutine dm_geocom_api_get_prism_definition(request, type)
!! Request of `BAP_GetPrismDef` procedure. Creates request for getting
!! the default prism definition.
!!
@@ -1969,9 +2074,9 @@ pure subroutine dm_geocom_api_request_get_prism_definition(request, type)
]
call dm_geocom_api_request(request, REQCODE, args, PATTERN, responses)
- end subroutine dm_geocom_api_request_get_prism_definition
+ end subroutine dm_geocom_api_get_prism_definition
- pure subroutine dm_geocom_api_request_get_prism_type(request)
+ pure subroutine dm_geocom_api_get_prism_type(request)
!! Request of `TMC_GetPrismType` procedure. Creates request for
!! getting the default prism type.
!!
@@ -1998,9 +2103,9 @@ pure subroutine dm_geocom_api_request_get_prism_type(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_prism_type
+ end subroutine dm_geocom_api_get_prism_type
- pure subroutine dm_geocom_api_request_get_prism_type_v2(request)
+ pure subroutine dm_geocom_api_get_prism_type_v2(request)
!! Request of `TMC_GetPrismType2` procedure. Creates request for
!! getting the default or user prism type.
!!
@@ -2027,9 +2132,9 @@ pure subroutine dm_geocom_api_request_get_prism_type_v2(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_prism_type_v2
+ end subroutine dm_geocom_api_get_prism_type_v2
- pure subroutine dm_geocom_api_request_get_quick_distance(request)
+ pure subroutine dm_geocom_api_get_quick_distance(request)
!! Request of `TMC_QuickDist` procedure. Creates request for returning
!! the slope distance and both angles.
!!
@@ -2066,9 +2171,9 @@ pure subroutine dm_geocom_api_request_get_quick_distance(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_quick_distance
+ end subroutine dm_geocom_api_get_quick_distance
- pure subroutine dm_geocom_api_request_get_reduced_atr_fov(request)
+ pure subroutine dm_geocom_api_get_reduced_atr_fov(request)
!! Request of `BAP_GetRedATRFov` procedure. Creates request for
!! getting the reduced ATR field of view.
!!
@@ -2095,9 +2200,9 @@ pure subroutine dm_geocom_api_request_get_reduced_atr_fov(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_reduced_atr_fov
+ end subroutine dm_geocom_api_get_reduced_atr_fov
- pure subroutine dm_geocom_api_request_get_reflectorless_class(request)
+ pure subroutine dm_geocom_api_get_reflectorless_class(request)
!! Request of `CSV_GetReflectorlessClass` procedure. Creates request
!! for getting the RL type.
!!
@@ -2127,9 +2232,9 @@ pure subroutine dm_geocom_api_request_get_reflectorless_class(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_reflectorless_class
+ end subroutine dm_geocom_api_get_reflectorless_class
- pure subroutine dm_geocom_api_request_get_refraction_mode(request)
+ pure subroutine dm_geocom_api_get_refraction_mode(request)
!! Request of `TMC_GetRefractiveMethod` procedure. Creates request for
!! getting the refraction model.
!!
@@ -2159,9 +2264,9 @@ pure subroutine dm_geocom_api_request_get_refraction_mode(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_refraction_mode
+ end subroutine dm_geocom_api_get_refraction_mode
- pure subroutine dm_geocom_api_request_get_search_area(request)
+ pure subroutine dm_geocom_api_get_search_area(request)
!! Request of `AUT_GetSearchArea` procedure. Creates request for
!! getting the dimensions of the Power Search window.
!!
@@ -2201,9 +2306,9 @@ pure subroutine dm_geocom_api_request_get_search_area(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_search_area
+ end subroutine dm_geocom_api_get_search_area
- pure subroutine dm_geocom_api_request_get_signal(request)
+ pure subroutine dm_geocom_api_get_signal(request)
!! Request of `TMC_GetSignal` procedure. Creates request for
!! getting the EDM signal intensity.
!!
@@ -2239,9 +2344,9 @@ pure subroutine dm_geocom_api_request_get_signal(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_signal
+ end subroutine dm_geocom_api_get_signal
- pure subroutine dm_geocom_api_request_get_simple_coordinates(request, wait_time, prog)
+ pure subroutine dm_geocom_api_get_simple_coordinates(request, wait_time, mode)
!! Request of `TMC_GetSimpleCoord` procedure. Creates request for
!! returning cartesian coordinates.
!!
@@ -2249,7 +2354,7 @@ pure subroutine dm_geocom_api_request_get_simple_coordinates(request, wait_time,
!! distance is set. The argument `wait_time` sets the maximum time to
!! wait for a valid distance. Without a valid distance, the coordinates
!! are set to 0.0, and an error is returned. The coordinate calculation
- !! requires inclination results. The argument `prog` sets the
+ !! requires inclination results. The argument `mode` sets the
!! inclination measurement mode (`TMC_INCLINE_PRG`).
!!
!! The instrument returns the following responses:
@@ -2262,7 +2367,7 @@ pure subroutine dm_geocom_api_request_get_simple_coordinates(request, wait_time,
!! | Property | Values |
!! |----------------|--------------------------------------------------|
!! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
- !! | ASCII request | `%R1Q,2116:,` |
+ !! | ASCII request | `%R1Q,2116:,` |
!! | ASCII response | `%R1P,0,0:,,,` |
!!
integer, parameter :: REQCODE = 2116
@@ -2271,12 +2376,12 @@ pure subroutine dm_geocom_api_request_get_simple_coordinates(request, wait_time,
type(request_type), intent(out) :: request !! Prepared request.
integer, intent(in) :: wait_time !! Delay to wait for the distance measurement to finish [ms].
- integer, intent(in) :: prog !! Inclination measurement mode (`TMC_INCLINE_PRG`).
+ integer, intent(in) :: mode !! Inclination measurement mode (`TMC_INCLINE_PRG`).
character(len=80) :: args
type(response_type) :: responses(4)
- write (args, '(i0, ",", i0)') wait_time, prog
+ write (args, '(i0, ",", i0)') wait_time, mode
responses = [ &
response_type('grc', unit=' ', type=RESPONSE_TYPE_INT32), &
@@ -2286,20 +2391,312 @@ pure subroutine dm_geocom_api_request_get_simple_coordinates(request, wait_time,
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_simple_coordinates
-
- ! pure subroutine dm_geocom_api_request_get_simple_meta(wait_time, only_angle, slope_dist, mode)
- ! pure subroutine dm_geocom_api_request_get_slope_distance_correction(ppm_corr, prism_corr)
- ! pure subroutine dm_geocom_api_request_get_software_version(release, version, subversion)
- ! pure subroutine dm_geocom_api_request_get_software_version_v2(release, version, subversion)
- ! pure subroutine dm_geocom_api_request_get_station(station)
- ! pure subroutine dm_geocom_api_request_get_target_type(type)
- ! pure subroutine dm_geocom_api_request_get_timeout(hz, v)
- ! pure subroutine dm_geocom_api_request_get_tolerance(hz, v)
- ! pure subroutine dm_geocom_api_request_get_user_atr_mode(mode)
- ! pure subroutine dm_geocom_api_request_get_user_local_mode(mode)
-
- pure subroutine dm_geocom_api_request_get_user_prism_definition(request, name)
+ end subroutine dm_geocom_api_get_simple_coordinates
+
+ pure subroutine dm_geocom_api_get_simple_measurement(request, wait_time, mode)
+ !! Request of `TMC_GetSimpleMea` procedure. Creates request for
+ !! returning the values of the angle and distance measurement.
+ !!
+ !! The API function returns the angles and distance measurement data.
+ !! The argument `wait_time` sets the maximum time to wait for a valid
+ !! distance. If a distance is available, the wait time is ignored.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !! * `hz` – Horizontal angle [rad].
+ !! * `v` – Vertical angle [rad].
+ !! * `sdist` – Slope distance [m].
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,2108:,` |
+ !! | ASCII response | `%R1P,0,0:,,,` |
+ !!
+ integer, parameter :: REQCODE = 2108
+ character(len=*), parameter :: PATTERN = '(?\d+),(?[-\d\.]+),(?[-\d\.]+),(?[-\d\.]+)'
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ integer, intent(in) :: wait_time !! Delay to wait for the distance measurement to finish [ms].
+ integer, intent(in) :: mode !! Inclination measurement mode (`TMC_INCLINE_PRG`).
+
+ character(len=80) :: args
+ type(response_type) :: responses(4)
+
+ write (args, '(i0, ",", i0)') wait_time, mode
+
+ responses = [ &
+ response_type('grc', unit=' ', type=RESPONSE_TYPE_INT32), &
+ response_type('hz', unit='rad', type=RESPONSE_TYPE_REAL64), &
+ response_type('v', unit='rad', type=RESPONSE_TYPE_REAL64), &
+ response_type('sdist', unit='m', type=RESPONSE_TYPE_REAL64) &
+ ]
+
+ call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
+ end subroutine dm_geocom_api_get_simple_measurement
+
+ pure subroutine dm_geocom_api_get_slope_distance_correction(request)
+ !! Request of `TMC_GetSlopeDistCorr` procedure. Creates request for
+ !! getting the total ppm and prism correction.
+ !!
+ !! The function returns the total ppm value (atmospheric ppm +
+ !! geometric ppm) plus the current prism constant.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !! * `ppmcor` – Total ppm correction factor [ppm].
+ !! * `reflcor` – Correction factor if the reflector [m].
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,2126:` |
+ !! | ASCII response | `%R1P,0,0:,,` |
+ !!
+ integer, parameter :: REQCODE = 2126
+ character(len=*), parameter :: PATTERN = '(?\d+),(?[-\d\.]+),(?[-\d\.]+)'
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ type(response_type) :: responses(3)
+
+ responses = [ &
+ response_type('grc', unit=' ', type=RESPONSE_TYPE_INT32), &
+ response_type('ppmcor', unit='ppm', type=RESPONSE_TYPE_REAL64), &
+ response_type('reflcor', unit='m', type=RESPONSE_TYPE_REAL64) &
+ ]
+
+ call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
+ end subroutine dm_geocom_api_get_slope_distance_correction
+
+ pure subroutine dm_geocom_api_get_software_version(request)
+ !! Request of `CSV_GetSWVersion` procedure. Creates request for getting
+ !! the system software version of the instrument.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !! * `swrel` – Software release.
+ !! * `swver` – Software version.
+ !! * `swsub` – Software sub-version.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,5034:` |
+ !! | ASCII response | `%R1P,0,0:,,,` |
+ !!
+ integer, parameter :: REQCODE = 5034
+ character(len=*), parameter :: PATTERN = '(?\d+),(?\d+),(?\d+),(?\d+)'
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ type(response_type) :: responses(4)
+
+ responses = [ &
+ response_type('grc', type=RESPONSE_TYPE_INT32), &
+ response_type('swrel', type=RESPONSE_TYPE_INT32), &
+ response_type('swver', type=RESPONSE_TYPE_INT32), &
+ response_type('swsub', type=RESPONSE_TYPE_INT32) &
+ ]
+
+ call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
+ end subroutine dm_geocom_api_get_software_version
+
+ pure subroutine dm_geocom_api_get_station(request)
+ !! Request of `TMC_GetStation` procedure. Creates request for getting
+ !! the station coordinates of the instrument.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !! * `east0` – Station easting coordinate [m].
+ !! * `north0` – Station northing coordinate [m].
+ !! * `height0` – Station height coordinate [m].
+ !! * `heighti` – Instrument height [m].
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,2009:` |
+ !! | ASCII response | `%R1P,0,0:,,,` |
+ !!
+ integer, parameter :: REQCODE = 2009
+ character(len=*), parameter :: PATTERN = &
+ '(?\d+),(?[-\d\.]+),(?[-\d\.]+),(?[-\d\.]+),(?[-\d\.]+)'
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ type(response_type) :: responses(5)
+
+ responses = [ &
+ response_type('grc', unit=' ', type=RESPONSE_TYPE_INT32), &
+ response_type('east0', unit='m', type=RESPONSE_TYPE_REAL64), &
+ response_type('north0', unit='m', type=RESPONSE_TYPE_REAL64), &
+ response_type('height0', unit='m', type=RESPONSE_TYPE_REAL64), &
+ response_type('heighti', unit='m', type=RESPONSE_TYPE_REAL64) &
+ ]
+
+ call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
+ end subroutine dm_geocom_api_get_station
+
+ pure subroutine dm_geocom_api_get_target_type(request)
+ !! Request of `BAP_GetTargetType` procedure. Creates request for
+ !! getting the EDM type.
+ !!
+ !! The function returns the current EDM type (`BAP_TARGET_TYPE`) for
+ !! distance measurements: reflector (IR) or reflectorless (RL).
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !! * `tgttype` – Target type (`BAP_TARGET_TYPE`).
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,17022:` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 17022
+ character(len=*), parameter :: PATTERN = '(?\d+),(?\d+)'
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ type(response_type) :: responses(2)
+
+ responses = [ &
+ response_type('grc', type=RESPONSE_TYPE_INT32), &
+ response_type('tgttype', type=RESPONSE_TYPE_INT32) &
+ ]
+
+ call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
+ end subroutine dm_geocom_api_get_target_type
+
+ pure subroutine dm_geocom_api_get_timeout(request)
+ !! Request of `AUT_ReadTimeout` procedure. Creates request for getting
+ !! the timeout for positioning.
+ !!
+ !! The function returns the maximum time to perform positioning.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !! * `timehz` – Positioning timeout in Hz [sec].
+ !! * `timev` – Positioning timeout in V [sec].
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,9012:` |
+ !! | ASCII response | `%R1P,0,0:,` |
+ !!
+ integer, parameter :: REQCODE = 9012
+ character(len=*), parameter :: PATTERN = '(?\d+),(?[-\d\.]+),(?[-\d\.]+)'
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ type(response_type) :: responses(3)
+
+ responses = [ &
+ response_type('grc', unit=' ', type=RESPONSE_TYPE_INT32), &
+ response_type('timehz', unit='s', type=RESPONSE_TYPE_REAL64), &
+ response_type('timev', unit='s', type=RESPONSE_TYPE_REAL64) &
+ ]
+
+ call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
+ end subroutine dm_geocom_api_get_timeout
+
+ pure subroutine dm_geocom_api_get_tolerance(request)
+ !! Request of `AUT_ReadTol` procedure. Creates request for getting the
+ !! positioning tolerances.
+ !!
+ !! The function returns the positioning tolerances of the Hz and V
+ !! instrument axis.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !! * `tolhz` – Positioning tolerance in Hz [rad].
+ !! * `tolv` – Positioning tolerance in V [rad].
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,9008:` |
+ !! | ASCII response | `%R1P,0,0:,` |
+ !!
+ integer, parameter :: REQCODE = 9008
+ character(len=*), parameter :: PATTERN = '(?\d+),(?[-\d\.]+),(?[-\d\.]+)'
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ type(response_type) :: responses(3)
+
+ responses = [ &
+ response_type('grc', unit=' ', type=RESPONSE_TYPE_INT32), &
+ response_type('tolhz', unit='rad', type=RESPONSE_TYPE_REAL64), &
+ response_type('tolv', unit='rad', type=RESPONSE_TYPE_REAL64) &
+ ]
+
+ call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
+ end subroutine dm_geocom_api_get_tolerance
+
+ pure subroutine dm_geocom_api_get_user_atr_mode(request)
+ !! Request of `AUS_GetUserAtrState` procedure. Creates request for
+ !! getting the status of the ATR mode.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !! * `atr` – ATR mode is enabled [bool].
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,18006:` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 18006
+ character(len=*), parameter :: PATTERN = '(?\d+),(?\d+)'
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ type(response_type) :: responses(2)
+
+ responses = [ &
+ response_type('grc', type=RESPONSE_TYPE_INT32), &
+ response_type('atr', type=RESPONSE_TYPE_LOGICAL) &
+ ]
+
+ call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
+ end subroutine dm_geocom_api_get_user_atr_mode
+
+ pure subroutine dm_geocom_api_get_user_lock_mode(request)
+ !! Request of `AUS_GetUserLockState` procedure. Creates request for
+ !! getting the status of the LOCK mode.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !! * `lock` – LOCK mode is enabled [bool].
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,18008:` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 18006
+ character(len=*), parameter :: PATTERN = '(?\d+),(?\d+)'
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ type(response_type) :: responses(2)
+
+ responses = [ &
+ response_type('grc', type=RESPONSE_TYPE_INT32), &
+ response_type('lock', type=RESPONSE_TYPE_LOGICAL) &
+ ]
+
+ call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
+ end subroutine dm_geocom_api_get_user_lock_mode
+
+ pure subroutine dm_geocom_api_get_user_prism_definition(request, name)
!! Request of `BAP_GetUserPrismDef` procedure. Creates request for
!! getting the user prism definition.
!!
@@ -2332,9 +2729,9 @@ pure subroutine dm_geocom_api_request_get_user_prism_definition(request, name)
]
call dm_geocom_api_request(request, REQCODE, name, PATTERN, responses)
- end subroutine dm_geocom_api_request_get_user_prism_definition
+ end subroutine dm_geocom_api_get_user_prism_definition
- pure subroutine dm_geocom_api_request_get_user_spiral(request)
+ pure subroutine dm_geocom_api_get_user_spiral(request)
!! Request of `AUT_GetUserSpiral` procedure. Creates request for
!! getting the user-defined search spiral.
!!
@@ -2367,9 +2764,9 @@ pure subroutine dm_geocom_api_request_get_user_spiral(request)
]
call dm_geocom_api_request(request, REQCODE, pattern=PATTERN, responses=responses)
- end subroutine dm_geocom_api_request_get_user_spiral
+ end subroutine dm_geocom_api_get_user_spiral
- pure subroutine dm_geocom_api_request_list(request, next)
+ pure subroutine dm_geocom_api_list(request, next)
!! Request of `FTR_List` procedure. Creates request for listing file
!! information.
!!
@@ -2421,9 +2818,9 @@ pure subroutine dm_geocom_api_request_list(request, next)
]
call dm_geocom_api_request(request, REQCODE, args, PATTERN, responses)
- end subroutine dm_geocom_api_request_list
+ end subroutine dm_geocom_api_list
- pure subroutine dm_geocom_api_request_lock_in(request)
+ pure subroutine dm_geocom_api_lock_in(request)
!! Request of `AUT_LockIn` procedure. Creates request for starting the
!! target tracking.
!!
@@ -2446,9 +2843,9 @@ pure subroutine dm_geocom_api_request_lock_in(request)
type(request_type), intent(out) :: request !! Prepared request.
call dm_geocom_api_request(request, REQCODE, pattern=GEOCOM_GRC_PATTERN, responses=GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_lock_in
+ end subroutine dm_geocom_api_lock_in
- pure subroutine dm_geocom_api_request_null(request)
+ pure subroutine dm_geocom_api_null(request)
!! Request of `COM_NullProc` procedure. Creates request for checking
!! the communication.
!!
@@ -2467,27 +2864,391 @@ pure subroutine dm_geocom_api_request_null(request)
type(request_type), intent(out) :: request !! Prepared request.
call dm_geocom_api_request(request, REQCODE, pattern=GEOCOM_GRC_PATTERN, responses=GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_null
-
- ! pure subroutine dm_geocom_api_request_ps_enable_range(enable)
- ! pure subroutine dm_geocom_api_request_ps_search_next(direction, swing)
- ! pure subroutine dm_geocom_api_request_ps_search_window()
- ! pure subroutine dm_geocom_api_request_ps_set_range(min_dist, max_dist)
- ! pure subroutine dm_geocom_api_request_search(hz, v)
- ! pure subroutine dm_geocom_api_request_search_target()
- ! pure subroutine dm_geocom_api_request_set_angle_correction(incline, stand_axis, collimation, tilt_axis)
- ! pure subroutine dm_geocom_api_request_set_atmospheric_correction(atmos)
- ! pure subroutine dm_geocom_api_request_set_atmospheric_ppm(ppm)
- ! pure subroutine dm_geocom_api_request_set_atr_setting(setting)
- ! pure subroutine dm_geocom_api_request_set_binary_mode(available)
- ! pure subroutine dm_geocom_api_request_set_config(auto_power, timeout)
- ! pure subroutine dm_geocom_api_request_set_date_time(dt)
-
- pure subroutine dm_geocom_api_request_set_distance(request, slope_dist, height_offset, mode)
- !! Request of `TMC_SetHandDist` procedure. Creates request for
- !! setting the slope distance and height offset.
+ end subroutine dm_geocom_api_null
+
+ pure subroutine dm_geocom_api_ps_enable_range(request, enabled)
+ !! Request of `AUT_PS_EnableRange` procedure. Creates request for
+ !! enabling the PowerSearch window and range.
!!
- !! The function is used to set the manually measured slope distance and
+ !! The function enabled or disables the predefined PowerSearch window
+ !! including the PowerSearch range limits set by API call
+ !! `AUT_PS_SetRange` (requires GeoCOM robotic licence). If `enabled` is
+ !! `.false.`, the default range is set to ≤ 400 m.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,9048:` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 9048
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ logical, intent(in) :: enabled !! Enable PowerSearch.
+
+ character(len=80) :: args
+
+ write (args, '(i1)') dm_btoi(enabled)
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_ps_enable_range
+
+ pure subroutine dm_geocom_api_ps_search_next(request, direction, swing)
+ !! Request of `AUT_PS_SearchNext` procedure. Creates request for
+ !! searching for the next target
+ !!
+ !! The function executes the 360° default PowerSearch and searches for
+ !! the next targets. A previously defined PowerSearch window
+ !! (`AUT_SetSearchArea`) is not taken into account. Use API call
+ !! `AUT_PS_SearchWindow` first.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,9051:,` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 9051
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ integer, intent(in) :: direction !! Searching direction (`1` for clockwise, `-1` for counter-clockwise).
+ logical, intent(in) :: swing !! Searching starts –10 gon to the given direction.
+
+ character(len=80) :: args
+
+ write (args, '(i0, ",", i1)') direction, dm_btoi(swing)
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_ps_search_next
+
+ pure subroutine dm_geocom_api_ps_search_window(request)
+ !! Request of `AUT_PS_SearchWindow` procedure. Creates request for
+ !! starting PowerSearch.
+ !!
+ !! The function starts PowerSearch in the window defined by API calls
+ !! `AUT_SetSearchArea` and `AUT_PS_SetRange` (requires GeoCOM robotic
+ !! licence).
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,9052:` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 9052
+
+ type(request_type), intent(out) :: request !! Prepared request.
+
+ call dm_geocom_api_request(request, REQCODE, pattern=GEOCOM_GRC_PATTERN, responses=GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_ps_search_window
+
+ pure subroutine dm_geocom_api_ps_set_range(request, min_dist, max_dist)
+ !! Request of `AUT_PS_SetRange` procedure. Creates request for setting
+ !! the PowerSearch range.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,9047:,` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 9047
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ integer, intent(in) :: min_dist !! Min. distance to prism (≥ 0) [m].
+ integer, intent(in) :: max_dist !! Max. distance to prism (≤ 400, ≥ `min_dist` + 10) [m].
+
+ character(len=80) :: args
+
+ write (args, '(i0, ",", i0)') min_dist, max_dist
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_ps_set_range
+
+ pure subroutine dm_geocom_api_search(request, search_hz, search_v)
+ !! Request of `AUT_Search` procedure. Creates request for performing an
+ !! automatic target search.
+ !!
+ !! The function performs an automatic target search within the given
+ !! search area (requires GeoCOM robotic licence). The search is
+ !! terminated once the prism appears in the field of view of the ATR
+ !! sensor. If no prism is found in the specified area, the instrument
+ !! turns back into the initial position. For an exact positioning onto
+ !! the prism centre, use the fine-adjust API call afterwards
+ !! (`AUT_FineAdjust`).
+ !!
+ !! If the search range of the API function `AUT_FineAdjust` is
+ !! expanded, target search and fine positioning are done in one step.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,9029:,,0` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 9029
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ real(kind=r8), intent(in) :: search_hz !! Horizontal search region [rad].
+ real(kind=r8), intent(in) :: search_v !! Vertical search region [rad].
+
+ character(len=80) :: args
+
+ write (args, '(f0.12, ",", f0.12, ",0")') search_hz, search_v
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_search
+
+ pure subroutine dm_geocom_api_search_target(request)
+ !! Request of `BAP_SearchTarget` procedure. Creates request for
+ !! searching a target.
+ !!
+ !! The function searches for a target in the ATR search window.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,17020:0` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 17020
+
+ type(request_type), intent(out) :: request !! Prepared request.
+
+ call dm_geocom_api_request(request, REQCODE, pattern=GEOCOM_GRC_PATTERN, responses=GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_search_target
+
+ pure subroutine dm_geocom_api_set_angle_correction(request, incline, stand_axis, collimation, tilt_axis)
+ !! Request of `TMC_SetAngSwitch` procedure. Creates request for
+ !! turning angle corrections on or off.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,2016:,,,` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 2016
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ logical, intent(in) :: incline !! Enable inclination correction.
+ logical, intent(in) :: stand_axis !! Enable standard axis correction.
+ logical, intent(in) :: collimation !! Enable collimation correction.
+ logical, intent(in) :: tilt_axis !! Enable tilt axis correction.
+
+ character(len=80) :: args
+
+ write (args, '(3(i1, ","), i1)') dm_btoi(incline), dm_btoi(stand_axis), dm_btoi(collimation), dm_btoi(tilt_axis)
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_set_angle_correction
+
+ pure subroutine dm_geocom_api_set_atmospheric_correction(request, lambda, pressure, dry_temp, wet_temp)
+ !! Request of `BAP_SetAtmCorr` procedure. Creates request for setting
+ !! the atmospheric correction parameters.
+ !!
+ !! The argument `lambda` should be queried with API call `TMC_GetAtmCorr`.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|-------------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,2028:,,,` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 2028
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ real(kind=r8), intent(in) :: lambda !! Wave-length of EDM transmitter [m].
+ real(kind=r8), intent(in) :: pressure !! Atmospheric pressure [mbar].
+ real(kind=r8), intent(in) :: dry_temp !! Dry temperature [°C].
+ real(kind=r8), intent(in) :: wet_temp !! Wet temperature [°C].
+
+ character(len=80) :: args
+
+ write (args, '(4(f0.12, ","), f0.12)') lambda, pressure, dry_temp, wet_temp
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_set_atmospheric_correction
+
+ pure subroutine dm_geocom_api_set_atmospheric_ppm(request, ppm)
+ !! Request of `BAP_SetAtmPpm` procedure. Creates request for setting
+ !! the atmospheric ppm correction factor.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,2148:` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 2148
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ real(kind=r8), intent(in) :: ppm !! Atmospheric ppm correction factor.
+
+ character(len=80) :: args
+
+ write (args, '(f0.12)') ppm
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_set_atmospheric_ppm
+
+ pure subroutine dm_geocom_api_set_atr_mode(request, atr_mode)
+ !! Request of `BAP_SetATRSetting` procedure. Creates request for
+ !! setting the ATR low-vis mode.
+ !!
+ !! The argument `atr_mode` (`BAP_ATRSETTING`) must be one of the
+ !! following:
+ !!
+ !! * `BAP_ATRSET_NORMAL` – No special flags or modes.
+ !! * `BAP_ATRSET_LOWVIS_ON` – ATR low-vis mode on.
+ !! * `BAP_ATRSET_LOWVIS_AON` – ATR low-vis mode always on.
+ !! * `BAP_ATRSET_SRANGE_ON` – ATR high-reflectivity mode on.
+ !! * `BAP_ATRSET_SRANGE_AON` – ATR high-reflectivity mode always on.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,17035:` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 17035
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ integer, intent(in) :: atr_mode !! ATR low-vis mode (`BAP_ATRSETTING`).
+
+ character(len=80) :: args
+
+ write (args, '(i0)') atr_mode
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_set_atr_mode
+
+ pure subroutine dm_geocom_api_set_binary_mode(request, enabled)
+ !! Request of `COM_SetBinaryAvailable` procedure. Creates request for
+ !! setting the binary attribute of the server.
+ !!
+ !! The function set the ability of the GeoCOM server to handle binary
+ !! communication (not supported by DMPACK).
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,114:` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 114
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ logical, intent(in) :: enabled !! Enable binary communication.
+
+ character(len=80) :: args
+
+ write (args, '(i1)') dm_btoi(enabled)
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_set_binary_mode
+
+ pure subroutine dm_geocom_api_set_config(request, auto_power, timeout)
+ !! Request of `SUP_SetConfig` procedure. Creates request for setting
+ !! the power management configuration.
+ !!
+ !! The argument `timeout` sets the duration after which the instrument
+ !! switches into the mode `auto_power` (`SUP_AUTO_POWER`) when no user
+ !! activity occured (key press, GeoCOM communication). The value must
+ !! be between 60,000 m/s (1 min) and 6,000,000 m/s (100 min).
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,14002:,,` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 14002
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ integer, intent(in) :: auto_power !! Power-off mode (`SUP_AUTO_POWER`).
+ integer, intent(in) :: timeout !! Timeout [ms].
+
+ character(len=80) :: args
+
+ write (args, '("0", 2(",", i0))') auto_power, timeout
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_set_config
+
+ pure subroutine dm_geocom_api_set_date_time(request, year, month, day, hour, minute, second)
+ !! Request of `CSV_SetDateTime` procedure. Creates request for
+ !! setting the date and time of the instrument.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|------------------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,5007:,,,,,` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 5007
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ integer, intent(in) :: year !! Year (`YYYY`).
+ integer, intent(in) :: month !! Month (`MM`).
+ integer, intent(in) :: day !! Day of month (`DD`).
+ integer, intent(in) :: hour !! Hour (`hh`).
+ integer, intent(in) :: minute !! Minute (`mm`).
+ integer, intent(in) :: second !! Second (`ss`).
+
+ character(len=80) :: args
+
+ write (args, '(i0, 5(",", z2.2))') year, month, day, hour, minute, second
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_set_date_time
+
+ pure subroutine dm_geocom_api_set_distance(request, slope_dist, height_offset, mode)
+ !! Request of `TMC_SetHandDist` procedure. Creates request for
+ !! setting the slope distance and height offset.
+ !!
+ !! The function is used to set the manually measured slope distance and
!! height offset for a following measurement. Additionally, an
!! inclination and an angle measurement are started to determine the
!! coordinates of the target. The vertical angle is corrected to π/2 or
@@ -2522,18 +3283,251 @@ pure subroutine dm_geocom_api_request_set_distance(request, slope_dist, height_o
write (args, '(2(f0.12, ","), i0)') slope_dist, height_offset, mode
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_distance
-
- ! pure subroutine dm_geocom_api_request_set_double_precision(ndigits)
- ! pure subroutine dm_geocom_api_request_set_edm_mode(mode)
- ! pure subroutine dm_geocom_api_request_set_egl_intensity(intensity)
- ! pure subroutine dm_geocom_api_request_set_fine_adjust_mode(mode)
- ! pure subroutine dm_geocom_api_request_set_geometric_ppm(automatic, scale_factor, offset, height, individual)
- ! pure subroutine dm_geocom_api_request_set_height(height)
- ! pure subroutine dm_geocom_api_request_set_image_config(mem_type, parameters)
- ! pure subroutine dm_geocom_api_request_set_incline_correction(mode)
-
- pure subroutine dm_geocom_api_request_set_laser_pointer(request, enabled)
+ end subroutine dm_geocom_api_set_distance
+
+ pure subroutine dm_geocom_api_set_double_precision(request, ndigits)
+ !! Request of `COM_SetDoublePrecision` procedure. Creates request for
+ !! setting the double precision.
+ !!
+ !! The function sets the precision – the number of digits right of the
+ !! decimal – when double floating-point values are transmitted. The
+ !! default precision is 15 digits. The setting is only valid for the
+ !! ASCII transmission mode. Trailing zeroes will not be sent by the
+ !! instrument. For example, if `ndigits` is set to 3 and the exact
+ !! value is 1.99975, the resulting value will be 2.0.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,107:` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 107
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ integer, intent(in) :: ndigits !! Number of digits right to the comma.
+
+ character(len=80) :: args
+
+ write (args, '(i0)') ndigits
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_set_double_precision
+
+ pure subroutine dm_geocom_api_set_edm_mode(request, edm_mode)
+ !! Request of `TMC_SetEdmMode` procedure. Creates request for setting
+ !! the EDM measurement mode.
+ !!
+ !! The mode (`EDM_MODE`) set by this function is used by
+ !! `TMC_DoMeasure(TMC_DEF_DIST)`.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,2020:` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 2020
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ integer, intent(in) :: edm_mode !! EDM measurement mode (`EDM_MODE`).
+
+ character(len=80) :: args
+
+ write (args, '(i0)') edm_mode
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_set_edm_mode
+
+ pure subroutine dm_geocom_api_set_egl_intensity(request, intensity)
+ !! Request of `EDM_SetEglIntensity` procedure. Creates request for
+ !! setting the intensity of the electronic guide light.
+ !!
+ !! The argument `intensity` (`EDM_EGLINTENSITY_TYPE`) must be one of
+ !! the following:
+ !!
+ !! * `EDM_EGLINTEN_OFF`
+ !! * `EDM_EGLINTEN_LOW`
+ !! * `EDM_EGLINTEN_MID`
+ !! * `EDM_EGLINTEN_HIGH`
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,1059:` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 1059
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ integer, intent(in) :: intensity !! EGL intensity (`EDM_EGLINTENSITY_TYPE`).
+
+ character(len=80) :: args
+
+ write (args, '(i0)') intensity
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_set_egl_intensity
+
+ pure subroutine dm_geocom_api_set_fine_adjust_mode(request, mode)
+ !! Request of `AUT_SetFineAdjustMode` procedure. Creates request for
+ !! setting the fine adjust positioning mode.
+ !!
+ !! The function sets the positioning tolerances relating to angle
+ !! accuracy or point accuracy for the fine adjust (requires GeoCOM
+ !! robotic licence). If a target is near or held by hand, it is
+ !! recommended to set the adjust mode to `AUT_POINT_MODE`.
+ !!
+ !! The argument `mode` has to be either `AUT_NORM_MODE` or
+ !! `AUT_POINT_MODE`.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,9031:` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 9031
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ integer, intent(in) :: mode !! Fine adjust positioning mode (`AUT_ADJMODE`).
+
+ character(len=80) :: args
+
+ write (args, '(i0)') mode
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_set_fine_adjust_mode
+
+ pure subroutine dm_geocom_api_set_geometric_ppm(request, enabled, scale_factor, offset, ppm_height, ppm_individual)
+ !! Request of `TMC_SetGeoPpm` procedure. Creates request for setting the
+ !! geometric ppm correction factor.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|-----------------------------------------------------------------------------|
+ !! | Instruments | TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,2153:,,,,` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 2153
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ logical, intent(in) :: enabled !! Enable geometric ppm calculation.
+ real(kind=r8), intent(in) :: scale_factor !! Scale factor on central meridian.
+ real(kind=r8), intent(in) :: offset !! Offset from central meridian [m].
+ real(kind=r8), intent(in) :: ppm_height !! Ppm value due to height above reference.
+ real(kind=r8), intent(in) :: ppm_individual !! Individual ppm value.
+
+ character(len=80) :: args
+
+ write (args, '(i1, 4(",", f0.12))') dm_btoi(enabled), scale_factor, offset, ppm_height, ppm_individual
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_set_geometric_ppm
+
+ pure subroutine dm_geocom_api_set_height(request, height)
+ !! Request of `TMC_SetHeight` procedure. Creates request for setting a
+ !! new reflector height.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,2012:` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 2012
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ real(kind=r8), intent(in) :: height !! Reflector height.
+
+ character(len=80) :: args
+
+ write (args, '(f0.12)') height
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_set_height
+
+ pure subroutine dm_geocom_api_set_image_config(request, mem_type, image_number, quality, sub_function, prefix)
+ !! Request of `IMG_SetTccConfig` procedure. Creates request for setting
+ !! the image configuration.
+ !!
+ !! The argument `sub_function` may be a binary combination of the
+ !! following settings:
+ !!
+ !! * `1` – Test image.
+ !! * `2` – Automatic exposure-time selection.
+ !! * `3` – Two-times sub-sampling.
+ !! * `4` – Four-times sub-sampling.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------------------------------|
+ !! | Instruments | TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,23401:,,,,` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 23401
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ integer, intent(in) :: mem_type !! Memory device type (`IMG_MEM_TYPE`).
+ integer, intent(in) :: image_number !! Actual image number.
+ integer, intent(in) :: quality !! JPEG compression factor (0 – 100).
+ integer, intent(in) :: sub_function !! Additional sub-functions to call.
+ character(len=*), intent(in) :: prefix !! File name prefix.
+
+ character(len=80) :: args
+
+ write (args, '(4(i0, ","), a)') mem_type, image_number, quality, sub_function, trim(prefix)
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_set_image_config
+
+ pure subroutine dm_geocom_api_set_inclination_correction(request, enabled)
+ !! Request of `TMC_SetInclineSwitch` procedure. Creates request for turning
+ !! the dual-axis compensator on or off.
+ !!
+ !! The instrument returns the following responses:
+ !!
+ !! * `grc` – GeoCOM return code.
+ !!
+ !! | Property | Values |
+ !! |----------------|--------------------------------------------------|
+ !! | Instruments | TPS1100, TPS1200, TM30/TS30, TS16 |
+ !! | ASCII request | `%R1Q,2006:` |
+ !! | ASCII response | `%R1P,0,0:` |
+ !!
+ integer, parameter :: REQCODE = 2006
+
+ type(request_type), intent(out) :: request !! Prepared request.
+ logical, intent(in) :: enabled !! Enable dual-axis compensator.
+
+ character(len=80) :: args
+
+ write (args, '(i1)') dm_btoi(enabled)
+ call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
+ end subroutine dm_geocom_api_set_inclination_correction
+
+ pure subroutine dm_geocom_api_set_laser_pointer(request, enabled)
!! Request of `EDM_Laserpointer` procedure. Creates request for turning
!! the laser pointer on or off.
!!
@@ -2559,9 +3553,9 @@ pure subroutine dm_geocom_api_request_set_laser_pointer(request, enabled)
write (args, '(i1)') dm_btoi(enabled)
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_laser_pointer
+ end subroutine dm_geocom_api_set_laser_pointer
- pure subroutine dm_geocom_api_request_set_measurement_program(request, prog)
+ pure subroutine dm_geocom_api_set_measurement_program(request, prog)
!! Request of `BAP_SetMeasPrg` procedure. Creates request for setting
!! the distance measurement program.
!!
@@ -2589,9 +3583,9 @@ pure subroutine dm_geocom_api_request_set_measurement_program(request, prog)
write (args, '(i0)') prog
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_measurement_program
+ end subroutine dm_geocom_api_set_measurement_program
- pure subroutine dm_geocom_api_request_set_orientation(request, hz)
+ pure subroutine dm_geocom_api_set_orientation(request, hz)
!! Request of `TMC_SetOrientation` procedure. Creates request for
!! orientating the instrument in horizontal direction.
!!
@@ -2620,20 +3614,20 @@ pure subroutine dm_geocom_api_request_set_orientation(request, hz)
write (args, '(f0.12)') hz
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_orientation
+ end subroutine dm_geocom_api_set_orientation
- pure subroutine dm_geocom_api_request_set_position(request, hz, v, pos_mode, atr_mode)
+ pure subroutine dm_geocom_api_set_position(request, hz, v, pos_mode, atr_mode)
!! Request of `AUT_MakePositioning` procedure. Creates request for
!! turning the telescope to a specified position.
!!
- !! If `pos_mode` is `GEOCOM_AUT_NORMAL`, uses the current value of the
+ !! If `pos_mode` is `AUT_NORMAL`, uses the current value of the
!! compensator. For positioning distances > 25 gon, this mode might tend
- !! to inaccuracy. If set to `GEOCOM_AUT_PRECISE`, tries to measure the
- !! exact inclination of the target. Tends to long position time.
+ !! to inaccuracy. If set to `AUT_PRECISE`, tries to measure the exact
+ !! inclination of the target. Tends to long position time.
!!
- !! If `atr_mode` is `GEOCOM_AUT_POSITION`, uses conventional position
- !! to other face. If set to `GEOCOM_AUT_TARGET`, tries to position into
- !! a target in the destination area. This mode requires activated ATR.
+ !! If `atr_mode` is `AUT_POSITION`, uses conventional position to other
+ !! face. If set to `AUT_TARGET`, tries to position into a target in the
+ !! destination area. This mode requires activated ATR.
!!
!! The instrument returns the following responses:
!!
@@ -2657,9 +3651,9 @@ pure subroutine dm_geocom_api_request_set_position(request, hz, v, pos_mode, atr
write (args, '(2(f0.12, ","), 2(i0, ","), "0")') hz, v, pos_mode, atr_mode
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_position
+ end subroutine dm_geocom_api_set_position
- pure subroutine dm_geocom_api_request_set_positioning_timeout(request, hz, v)
+ pure subroutine dm_geocom_api_set_positioning_timeout(request, hz, v)
!! Request of `AUT_SetTimeout` procedure. Creates request for setting
!! the timeout for positioning.
!!
@@ -2687,9 +3681,9 @@ pure subroutine dm_geocom_api_request_set_positioning_timeout(request, hz, v)
write (args, '(f0.12, ",", f0.12)') hz, v
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_positioning_timeout
+ end subroutine dm_geocom_api_set_positioning_timeout
- pure subroutine dm_geocom_api_request_set_prism_constant(request, prism_corr)
+ pure subroutine dm_geocom_api_set_prism_constant(request, prism_corr)
!! Request of `TMC_SetPrismCorr` procedure. Creates request for
!! setting the prism constant. The API function `BAP_SetPrismType`
!! overwrites this setting.
@@ -2713,9 +3707,9 @@ pure subroutine dm_geocom_api_request_set_prism_constant(request, prism_corr)
write (args, '(f0.12)') prism_corr
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_prism_constant
+ end subroutine dm_geocom_api_set_prism_constant
- pure subroutine dm_geocom_api_request_set_prism_type(request, prism_type)
+ pure subroutine dm_geocom_api_set_prism_type(request, prism_type)
!! Request of `BAP_SetPrismType` procedure. Creates request for
!! setting the default prism type.
!!
@@ -2742,9 +3736,9 @@ pure subroutine dm_geocom_api_request_set_prism_type(request, prism_type)
write (args, '(i0)') prism_type
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_prism_type
+ end subroutine dm_geocom_api_set_prism_type
- pure subroutine dm_geocom_api_request_set_prism_type_v2(request, prism_type, prism_name)
+ pure subroutine dm_geocom_api_set_prism_type_v2(request, prism_type, prism_name)
!! Request of `BAP_SetPrismType2` procedure. Creates request for
!! setting the default or user prism type.
!!
@@ -2773,9 +3767,9 @@ pure subroutine dm_geocom_api_request_set_prism_type_v2(request, prism_type, pri
write (args, '(i0, ",", a)') prism_type, prism_name
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_prism_type_v2
+ end subroutine dm_geocom_api_set_prism_type_v2
- pure subroutine dm_geocom_api_request_set_reduced_atr_fov(request, reduced)
+ pure subroutine dm_geocom_api_set_reduced_atr_fov(request, reduced)
!! Request of `BAP_SetRedATRFov` procedure. Creates request for
!! setting the reduced ATR field of view.
!!
@@ -2801,9 +3795,9 @@ pure subroutine dm_geocom_api_request_set_reduced_atr_fov(request, reduced)
write (args, '(i1)') dm_btoi(reduced)
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_reduced_atr_fov
+ end subroutine dm_geocom_api_set_reduced_atr_fov
- pure subroutine dm_geocom_api_request_set_refraction_mode(request, mode)
+ pure subroutine dm_geocom_api_set_refraction_mode(request, mode)
!! Request of `TMC_SetRefractiveMethod` procedure. Creates request for
!! setting the refraction model.
!!
@@ -2829,9 +3823,9 @@ pure subroutine dm_geocom_api_request_set_refraction_mode(request, mode)
write (args, '(i0)') mode
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_refraction_mode
+ end subroutine dm_geocom_api_set_refraction_mode
- pure subroutine dm_geocom_api_request_set_search_area(request, center_hz, center_v, range_hz, range_v, enabled)
+ pure subroutine dm_geocom_api_set_search_area(request, center_hz, center_v, range_hz, range_v, enabled)
!! Request of `AUT_SetSearchArea` procedure. Creates request for
!! setting the PowerSearch window.
!!
@@ -2863,9 +3857,9 @@ pure subroutine dm_geocom_api_request_set_search_area(request, center_hz, center
write (args, '(4(f0.12, ","), i1)') center_hz, center_v, range_hz, range_v, dm_btoi(enabled)
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_search_area
+ end subroutine dm_geocom_api_set_search_area
- pure subroutine dm_geocom_api_request_set_station(request, easting, northing, height, instr_height)
+ pure subroutine dm_geocom_api_set_station(request, easting, northing, height, instr_height)
!! Request of `TMC_SetStation` procedure. Creates request for setting
!! the station coordinates of the instrument.
!!
@@ -2891,9 +3885,9 @@ pure subroutine dm_geocom_api_request_set_station(request, easting, northing, he
write (args, '(3(f0.12, ","), f0.12)') easting, northing, height, instr_height
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_station
+ end subroutine dm_geocom_api_set_station
- pure subroutine dm_geocom_api_request_set_target_type(request, target_type)
+ pure subroutine dm_geocom_api_set_target_type(request, target_type)
!! Request of `BAP_SetTargetType` procedure. Creates request for
!! setting the EDM type.
!!
@@ -2924,9 +3918,9 @@ pure subroutine dm_geocom_api_request_set_target_type(request, target_type)
write (args, '(i0)') target_type
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_target_type
+ end subroutine dm_geocom_api_set_target_type
- pure subroutine dm_geocom_api_request_set_tolerance(request, hz, v)
+ pure subroutine dm_geocom_api_set_tolerance(request, hz, v)
!! Request of `AUT_SetTol` procedure. Creates request for setting
!! the positioning tolerances.
!!
@@ -2959,9 +3953,9 @@ pure subroutine dm_geocom_api_request_set_tolerance(request, hz, v)
write (args, '(f0.12, ",", f0.12)') hz, v
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_tolerance
+ end subroutine dm_geocom_api_set_tolerance
- pure subroutine dm_geocom_api_request_set_user_atr_mode(request, enabled)
+ pure subroutine dm_geocom_api_set_user_atr_mode(request, enabled)
!! Request of `AUS_SetUserAtrState` procedure. Creates request for
!! setting the status of the ATR mode.
!!
@@ -2990,9 +3984,9 @@ pure subroutine dm_geocom_api_request_set_user_atr_mode(request, enabled)
write (args, '(i1)') dm_btoi(enabled)
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_user_atr_mode
+ end subroutine dm_geocom_api_set_user_atr_mode
- pure subroutine dm_geocom_api_request_set_user_lock_mode(request, enabled)
+ pure subroutine dm_geocom_api_set_user_lock_mode(request, enabled)
!! Request of `AUS_SetUserLockState` procedure. Creates request for
!! setting the status of the LOCK mode.
!!
@@ -3022,9 +4016,9 @@ pure subroutine dm_geocom_api_request_set_user_lock_mode(request, enabled)
write (args, '(i1)') dm_btoi(enabled)
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_user_lock_mode
+ end subroutine dm_geocom_api_set_user_lock_mode
- pure subroutine dm_geocom_api_request_set_user_prism_definition(request, prism_name, prism_const, prism_type, creator)
+ pure subroutine dm_geocom_api_set_user_prism_definition(request, prism_name, prism_const, prism_type, creator)
!! Request of `BAP_SetUserPrismDef` procedure. Creates request for
!! setting a user prism definition.
!!
@@ -3050,9 +4044,9 @@ pure subroutine dm_geocom_api_request_set_user_prism_definition(request, prism_n
write (args, '(a, ",", f0.12, ",", i0, ",", a)') prism_name, prism_const, prism_type, creator
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_user_prism_definition
+ end subroutine dm_geocom_api_set_user_prism_definition
- pure subroutine dm_geocom_api_request_set_user_spiral(request, hz, v)
+ pure subroutine dm_geocom_api_set_user_spiral(request, hz, v)
!! Request of `AUT_SetUserSpiral` procedure. Creates request for
!! setting the ATR search window.
!!
@@ -3079,9 +4073,9 @@ pure subroutine dm_geocom_api_request_set_user_spiral(request, hz, v)
write (args, '(f0.12, ",", f0.12)') hz, v
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_user_spiral
+ end subroutine dm_geocom_api_set_user_spiral
- pure subroutine dm_geocom_api_request_set_velocity(request, omega_hz, omega_v)
+ pure subroutine dm_geocom_api_set_velocity(request, omega_hz, omega_v)
!! Request of `MOT_SetVelocity` procedure. Creates request for
!! driving the instrument with constant speed.
!!
@@ -3114,9 +4108,9 @@ pure subroutine dm_geocom_api_request_set_velocity(request, omega_hz, omega_v)
write (args, '(f0.12, ",", f0.12)') omega_hz, omega_v
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_set_velocity
+ end subroutine dm_geocom_api_set_velocity
- pure subroutine dm_geocom_api_request_setup_download(request, device_type, file_type, file_name, block_size)
+ pure subroutine dm_geocom_api_setup_download(request, device_type, file_type, file_name, block_size)
!! Request of `FTR_SetupDownload` procedure. Creates request for
!! setting up a file download.
!!
@@ -3163,9 +4157,9 @@ pure subroutine dm_geocom_api_request_setup_download(request, device_type, file_
write (args, '(2(i0, ","), a, ",", i0)') device_type, file_type, file_name, block_size
call dm_geocom_api_request(request, REQCODE, args, PATTERN, responses)
- end subroutine dm_geocom_api_request_setup_download
+ end subroutine dm_geocom_api_setup_download
- pure subroutine dm_geocom_api_request_setup_list(request, device_type, file_type, search_path)
+ pure subroutine dm_geocom_api_setup_list(request, device_type, file_type, search_path)
!! Request of `FTR_SetupList` procedure. Creates request for
!! setting up file listing.
!!
@@ -3193,9 +4187,9 @@ pure subroutine dm_geocom_api_request_setup_list(request, device_type, file_type
write (args, '(2(i0, ","), a)') device_type, file_type, search_path
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_setup_list
+ end subroutine dm_geocom_api_setup_list
- pure subroutine dm_geocom_api_request_start_controller(request, start_mode)
+ pure subroutine dm_geocom_api_start_controller(request, start_mode)
!! Request of `MOT_StartController` procedure. Creates request for
!! starting the motor controller.
!!
@@ -3230,9 +4224,9 @@ pure subroutine dm_geocom_api_request_start_controller(request, start_mode)
write (args, '(i0)') start_mode
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_start_controller
+ end subroutine dm_geocom_api_start_controller
- pure subroutine dm_geocom_api_request_stop_controller(request, stop_mode)
+ pure subroutine dm_geocom_api_stop_controller(request, stop_mode)
!! Request of `MOT_StartController` procedure. Creates request for
!! stopping the motor controller.
!!
@@ -3262,9 +4256,9 @@ pure subroutine dm_geocom_api_request_stop_controller(request, stop_mode)
write (args, '(i0)') stop_mode
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_stop_controller
+ end subroutine dm_geocom_api_stop_controller
- pure subroutine dm_geocom_api_request_switch_off(request, mode)
+ pure subroutine dm_geocom_api_switch_off(request, mode)
!! Request of `COM_SwitchOffTPS` procedure. Creates request for
!! turning the instrument off.
!!
@@ -3292,9 +4286,9 @@ pure subroutine dm_geocom_api_request_switch_off(request, mode)
write (args, '(i0)') mode
call dm_geocom_api_request(request, REQCODE, args, GEOCOM_GRC_PATTERN, GEOCOM_GRC_RESPONSES)
- end subroutine dm_geocom_api_request_switch_off
+ end subroutine dm_geocom_api_switch_off
- pure subroutine dm_geocom_api_request_switch_on(request, mode)
+ pure subroutine dm_geocom_api_switch_on(request, mode)
!! Request of `COM_SwitchOnTPS` procedure. Creates request for turning
!! the instrument on.
!!
@@ -3322,9 +4316,9 @@ pure subroutine dm_geocom_api_request_switch_on(request, mode)
write (args, '(i0)') mode
call dm_geocom_api_request(request, REQCODE, args)
- end subroutine dm_geocom_api_request_switch_on
+ end subroutine dm_geocom_api_switch_on
- pure subroutine dm_geocom_api_request_take_image(request, mem_type)
+ pure subroutine dm_geocom_api_take_image(request, mem_type)
!! Request of `IMG_TakeTccImage` procedure. Creates request for
!! capturing a telescope image.
!!
@@ -3360,5 +4354,5 @@ pure subroutine dm_geocom_api_request_take_image(request, mem_type)
write (args, '(i0)') mem_type
call dm_geocom_api_request(request, REQCODE, args, PATTERN, responses)
- end subroutine dm_geocom_api_request_take_image
+ end subroutine dm_geocom_api_take_image
end module dm_geocom_api
diff --git a/src/dm_lua_geocom.f90 b/src/dm_lua_geocom.f90
index 4c940bd..8b0334a 100644
--- a/src/dm_lua_geocom.f90
+++ b/src/dm_lua_geocom.f90
@@ -201,7 +201,7 @@ function lua_geocom_beep_alarm(ptr) bind(c) result(n)
type(request_type) :: request
lua = lua_state_type(ptr)
- call dm_geocom_api_request_beep_alarm(request)
+ call dm_geocom_api_beep_alarm(request)
call dm_lua_from(lua, request)
n = 1
end function lua_geocom_beep_alarm
diff --git a/src/dm_nml.f90 b/src/dm_nml.f90
index c206390..a737e52 100644
--- a/src/dm_nml.f90
+++ b/src/dm_nml.f90
@@ -3,7 +3,6 @@
module dm_nml
!! Fortran 95 Namelist import/export of DMPACK derived types.
use :: dm_error
- use :: dm_file
use :: dm_kind
implicit none (type, external)
private
diff --git a/test/dmtestlua.f90 b/test/dmtestlua.f90
index f61da88..e55de57 100644
--- a/test/dmtestlua.f90
+++ b/test/dmtestlua.f90
@@ -396,7 +396,7 @@ logical function test08() result(stat)
if (.not. dm_lua_is_function(lua)) exit test_block
print *, 'Pushing request onto Lua stack ...'
- call dm_geocom_api_request_beep_alarm(request1)
+ call dm_geocom_api_beep_alarm(request1)
call dm_lua_from(lua, request1)
print *, 'Calling Lua function ' // FUNC_NAME // '() ...'
@@ -474,7 +474,7 @@ logical function test09() result(stat)
if (dm_is_error(rc)) return
print *, 'Validating request ...'
- call dm_geocom_api_request_beep_alarm(request2)
+ call dm_geocom_api_beep_alarm(request2)
if (.not. (request1 == request2)) return
stat = TEST_PASSED