aboutsummaryrefslogtreecommitdiff
path: root/assets/manual/man
diff options
context:
space:
mode:
Diffstat (limited to 'assets/manual/man')
-rw-r--r--assets/manual/man/man3advtrains/speed_lessp.3advtrains.md26
-rw-r--r--assets/manual/man/man3advtrains/speed_set_restriction.3advtrains.md17
-rw-r--r--assets/manual/man/man7advtrains/speed.7advtrains.md18
3 files changed, 61 insertions, 0 deletions
diff --git a/assets/manual/man/man3advtrains/speed_lessp.3advtrains.md b/assets/manual/man/man3advtrains/speed_lessp.3advtrains.md
new file mode 100644
index 0000000..5bc61e7
--- /dev/null
+++ b/assets/manual/man/man3advtrains/speed_lessp.3advtrains.md
@@ -0,0 +1,26 @@
+% SPEED_LESSP(3ADVTRAINS) | Advtrains Developer's Manual
+
+# NAME
+`lessp`, `greaterp`, `equalp`, `not_lessp`, `not_greaterp`, `not_equalp`, `min`, `max` - Speed limit comparison functions
+
+# SYNOPSIS
+
+* `lessp(a, b)`
+* `greaterp(a, b)`
+* `equalp(a, b)`
+* `not_lessp(a, b)`
+* `not_greaterp(a, b)`
+* `min(a, b)`
+* `max(a, b)`
+
+# DESCRIPTION
+`lessp()`, `greaterp()`, `equalp()`, `not_lessp()`, `not_greaterp()`, and `not_equalp()` are predicate functions that returns, respectively,
+
+* Whether `a` is more strict than `b`
+* Whether `a` is less strict than `b`
+* Whether `a` and `b` indicate the same speed limit
+* Whether `a` is not more strict than `b`
+* Whether `a` is nor less strict than `b`
+* Whether `a` and `b` do not indicate the same speed limit
+
+`min()` returns the speed limit that is more strict. `max()` returns the speed limit that is less strict.
diff --git a/assets/manual/man/man3advtrains/speed_set_restriction.3advtrains.md b/assets/manual/man/man3advtrains/speed_set_restriction.3advtrains.md
new file mode 100644
index 0000000..1df5358
--- /dev/null
+++ b/assets/manual/man/man3advtrains/speed_set_restriction.3advtrains.md
@@ -0,0 +1,17 @@
+% SPEED_SET_RESTRICTION(3ADVTRAINS) | Advtrains Developer's Manual
+
+# NAME
+`set_restriction`, `merge_aspect` - Apply speed limits to trains
+
+# SYNOPSIS
+
+* `set_restriction(train, type, val)`
+* `merge_aspect(train, asp)`
+
+# 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
+`set_restriction()` and `merge_aspect()` do not return any value.
diff --git a/assets/manual/man/man7advtrains/speed.7advtrains.md b/assets/manual/man/man7advtrains/speed.7advtrains.md
new file mode 100644
index 0000000..bf8ed08
--- /dev/null
+++ b/assets/manual/man/man7advtrains/speed.7advtrains.md
@@ -0,0 +1,18 @@
+% SPEED(7ADVTRAINS) | Advtrains Developer's Manual
+
+# NAME
+`speed` - Advtrains speed limit library
+
+# DESCRIPTION
+The speed library allows the manipulation of speed limits, which can be represented with
+
+* A non-negative number, which stands for a regular speed limit in m/s, or
+* -1 or `nil`, which lifts the speed restriction
+
+The use of other values (in particular, nan and infinity) may result in undefined behavior.
+
+This library is available as `advtrains.speed`.
+
+# NOTES
+
+The meaning of `nil` for the speed limit library differs from its meaning in signal aspect tables, where `nil` keeps the current speed limit.