aboutsummaryrefslogtreecommitdiff
path: root/assets/manual/man/man3advtrains
diff options
context:
space:
mode:
authorY. Wang <yw05@forksworld.de>2022-08-11 19:07:42 +0200
committerY. Wang <yw05@forksworld.de>2022-08-11 19:55:30 +0200
commitb4ac74c41911ee7771e88da91208c1eb16c4b752 (patch)
treeb2d9678b8c09260f28ca8ccd1b66f27ca0ae4a96 /assets/manual/man/man3advtrains
parentbdcd24f6f78ed62f43b418a5bb50553001b5a6ec (diff)
downloadadvtrains-b4ac74c41911ee7771e88da91208c1eb16c4b752.tar.gz
advtrains-b4ac74c41911ee7771e88da91208c1eb16c4b752.tar.bz2
advtrains-b4ac74c41911ee7771e88da91208c1eb16c4b752.zip
Reformat manual pages
Diffstat (limited to 'assets/manual/man/man3advtrains')
-rw-r--r--assets/manual/man/man3advtrains/rwt_add.3advtrains.md13
-rw-r--r--assets/manual/man/man3advtrains/rwt_copy.3advtrains.md15
-rw-r--r--assets/manual/man/man3advtrains/rwt_last_rpt.3advtrains.md11
-rw-r--r--assets/manual/man/man3advtrains/rwt_now.3advtrains.md9
-rw-r--r--assets/manual/man/man3advtrains/speed_lessp.3advtrains.md11
-rw-r--r--assets/manual/man/man3advtrains/speed_set_restriction.3advtrains.md13
6 files changed, 45 insertions, 27 deletions
diff --git a/assets/manual/man/man3advtrains/rwt_add.3advtrains.md b/assets/manual/man/man3advtrains/rwt_add.3advtrains.md
index ec73e9c..de4cf37 100644
--- a/assets/manual/man/man3advtrains/rwt_add.3advtrains.md
+++ b/assets/manual/man/man3advtrains/rwt_add.3advtrains.md
@@ -1,20 +1,23 @@
-% RWT_ADD(3ADVTRAINS) | Advtrains Developer's Manual
+---
+title: 'rwt_add(3advtrains)'
+manual: 'Advtrains Developer''s Manual'
+---
-# NAME
+# Name
`add`, `diff`, `sub` - Add or subtract railway time objects
-# SYNOPSIS
+# Synopsis
* `add(t1, t2)`
* `diff(t1, t2)`
* `sub(t1, t2)`
-# DESCRIPTION
+# Description
* `add()` returns the result of adding `t1` and `t2`.
* `diff()` returns the result of subtracting `t1` from `t2`.
* `sub()` returns the result of subtracting `t2` from `t1`.
-# RETURN VALUE
+# Return Value
`add()` and `sub()` return their results as tables. `diff()` returns its result as a number.
diff --git a/assets/manual/man/man3advtrains/rwt_copy.3advtrains.md b/assets/manual/man/man3advtrains/rwt_copy.3advtrains.md
index 99dfaf1..1d2ba28 100644
--- a/assets/manual/man/man3advtrains/rwt_copy.3advtrains.md
+++ b/assets/manual/man/man3advtrains/rwt_copy.3advtrains.md
@@ -1,9 +1,12 @@
-% RWT_COPY(3ADVTRAINS) | Advtrains Developer's Manual
+---
+title: 'rwt_copy(3advtrains)'
+manual: 'Advtrains Developer''s Manual'
+---
-# NAME
+# Name
`copy`, `new`, `to_table`, `to_secs`, `to_string` - Create and copy railway time objects
-# SYNOPSIS
+# Synopsis
* `copy(obj)`
* `new(cycles, minutes, seconds)`
@@ -11,18 +14,18 @@
* `to_secs(obj [, cycles])`
* `to_string(obj [, no_cycles])`
-# DESCRIPTION
+# Description
* `copy()` returns a copy of `obj`.
* `new()` creates a new railway time object with the given number of cycles, minutes, and seconds.
* `to_table()`, `to_secs()`, and `to_string()` convert `obj` to a table, number, or string, respectively. If `cycles` is passed to `to_secs()`, that value is used as the number of cycles. If `no_cycles` is passed to `to_string()`, the number of cycles is set to zero.
-# RETURN VALUE
+# Return Value
* `copy()` returns the copy that is created. If `obj` is a table, the returned value is not identical to `obj`.
* `new()` returns the newly created object as a table.
* `to_table()`, `to_secs()`, `to_string()` returns the conveerted object.
-# NOTES
+# Notes
`to_table()` returns `obj` if it is a table.
diff --git a/assets/manual/man/man3advtrains/rwt_last_rpt.3advtrains.md b/assets/manual/man/man3advtrains/rwt_last_rpt.3advtrains.md
index 0336820..db5bad5 100644
--- a/assets/manual/man/man3advtrains/rwt_last_rpt.3advtrains.md
+++ b/assets/manual/man/man3advtrains/rwt_last_rpt.3advtrains.md
@@ -1,16 +1,19 @@
-% RWT_LAST_RPT(3ADVTRAINS) | Advtrains Developer's Manual
+---
+title: 'rwt_last_rpt(3advtrains)'
+manual: 'Advtrains Developer''s Manual'
+---
-# NAME
+# Name
`last_rpt`, `next_rpt`, `time_from_last_rpt`, `time_to_next_rpt` - Calculate time for repeating events
-# SYNOPSIS
+# Synopsis
* `last_rpt(time, interval, offset)`
* `next_rpt(time, interval, offset)`
* `time_from_last_rpt(interval, offset)`
* `time_to_next_rpt(interval, offset)`
-# DESCRIPTOIN
+# Description
The functions described in this page calculates the time or time difference related to events scheduled to repeat with the given interval and at the given offset, in relation to the given time. Whether and when the event actually takes place is not relevant to the API.
* `last_rpt()` returns the time at which the event was expected to occur the last time
diff --git a/assets/manual/man/man3advtrains/rwt_now.3advtrains.md b/assets/manual/man/man3advtrains/rwt_now.3advtrains.md
index 0843b1f..0f52258 100644
--- a/assets/manual/man/man3advtrains/rwt_now.3advtrains.md
+++ b/assets/manual/man/man3advtrains/rwt_now.3advtrains.md
@@ -1,7 +1,10 @@
-% RWT_NOW(3ADVTRAINS) | Advtrains Developer's Manual
+---
+title: 'rwt_now(3advtrains)'
+manual: 'Advtrains Developer''s Manual'
+---
-# NAME
+# Name
`now` - Get the current railway time
-# DESCRIPTION
+# Description
`now()` returns the current railway time as a table.
diff --git a/assets/manual/man/man3advtrains/speed_lessp.3advtrains.md b/assets/manual/man/man3advtrains/speed_lessp.3advtrains.md
index 5bc61e7..af1319f 100644
--- a/assets/manual/man/man3advtrains/speed_lessp.3advtrains.md
+++ b/assets/manual/man/man3advtrains/speed_lessp.3advtrains.md
@@ -1,9 +1,12 @@
-% SPEED_LESSP(3ADVTRAINS) | Advtrains Developer's Manual
+---
+title: 'speed_lessp(3advtrains)'
+manual: 'Advtrains Developer''s Manual'
+---
-# NAME
+# Name
`lessp`, `greaterp`, `equalp`, `not_lessp`, `not_greaterp`, `not_equalp`, `min`, `max` - Speed limit comparison functions
-# SYNOPSIS
+# Synopsis
* `lessp(a, b)`
* `greaterp(a, b)`
@@ -13,7 +16,7 @@
* `min(a, b)`
* `max(a, b)`
-# DESCRIPTION
+# Description
`lessp()`, `greaterp()`, `equalp()`, `not_lessp()`, `not_greaterp()`, and `not_equalp()` are predicate functions that returns, respectively,
* Whether `a` is more strict than `b`
diff --git a/assets/manual/man/man3advtrains/speed_set_restriction.3advtrains.md b/assets/manual/man/man3advtrains/speed_set_restriction.3advtrains.md
index 1df5358..1a3bd80 100644
--- a/assets/manual/man/man3advtrains/speed_set_restriction.3advtrains.md
+++ b/assets/manual/man/man3advtrains/speed_set_restriction.3advtrains.md
@@ -1,17 +1,20 @@
-% SPEED_SET_RESTRICTION(3ADVTRAINS) | Advtrains Developer's Manual
+---
+title: 'speed_set_restriction(3advtrains)'
+manual: 'Advtrains Developer''s Manual'
+---
-# NAME
+# Name
`set_restriction`, `merge_aspect` - Apply speed limits to trains
-# SYNOPSIS
+# Synopsis
* `set_restriction(train, type, val)`
* `merge_aspect(train, asp)`
-# DESCRIPTION
+# Description
`set_restriction()` sets the speed restriction of the given type of the given train to `val` and updates train object correspondingly.
`merge_aspect()` sets the speed restriction of the given train based on the value of the signal aspect.
-# RETURN VALUE
+# Return Value
`set_restriction()` and `merge_aspect()` do not return any value.