Skip to content

Commit 8cf9d01

Browse files
committed
docs: Update to reflect the HAL API changes.
1 parent 32e34b7 commit 8cf9d01

48 files changed

Lines changed: 1379 additions & 1407 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/src/code/code-notes.adoc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ emcioStatus.tool.pocketPrepped::
12691269

12701270
emcioStatus.tool.toolInSpindle::
12711271
Tool number of the tool currently installed in the spindle.
1272-
Exported on the HAL pin +iocontrol.0.tool-number+ (s32).
1272+
Exported on the HAL pin +iocontrol.0.tool-number+ (sint).
12731273

12741274
emcioStatus.tool.toolTable[]::
12751275
An array of +CANON_TOOL_TABLE+ structures, +CANON_POCKETS_MAX+ long.

‎docs/src/common/glossary.adoc‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Feedrate Override::
161161
anything else that requires the feed rate to be "tweaked".
162162

163163
Floating Point Number::
164-
A number that has a decimal point. (12.300) In HAL it is known as float.
164+
A number that has a decimal point. (12.300) In HAL it is known as real.
165165

166166
G-code::
167167
(((G-code))) The generic term used to refer to the most
@@ -321,7 +321,7 @@ Servo Loop::
321321

322322
Signed Integer::
323323
(((Signed Integer))) A whole number that can have a positive or negative sign.
324-
In HAL it is usually a <<sub:hal-s32,s32>>, but could be also a <<sub:hal-s64,s64>>.
324+
In HAL it is a <<sub:hal-sint,sint>>.
325325

326326
Spindle::
327327
(((spindle))) The part of a machine tool that spins
@@ -364,7 +364,7 @@ Units::
364364

365365
Unsigned Integer::
366366
(((Unsigned Integer))) A whole number that has no sign.
367-
In HAL it is usually a <<sub:hal-u32,u32>> but could be also a <<sub:hal-u64,u64>>.
367+
In HAL it is a <<sub:hal-uint,uint>>.
368368

369369
World Coordinates::
370370
(((world coordinates))) This is the absolute

‎docs/src/config/core-components.adoc‎

Lines changed: 98 additions & 98 deletions
Large diffs are not rendered by default.

‎docs/src/config/ini-homing.adoc‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -382,17 +382,17 @@ Example: Synced joints 0,1 using negative sequence (-1) for synchronized homing
382382
[source,hal]
383383
----
384384
loadrt mux2 names=home_sequence_mux
385-
loadrt conv_float_s32 names=home_sequence_s32
385+
loadrt conv_real_sint names=home_sequence_sint
386386
setp home_sequence_mux.in0 -1
387387
setp home_sequence_mux.in1 1
388388
addf home_sequence_mux servo-thread
389-
addf home_sequence_s32 servo-thread
389+
addf home_sequence_sint servo-thread
390390
...
391391
net home_seq_float <= home_sequence_mux.out
392-
net home_seq_float => home_sequence_s32.in
393-
net home_seq_s32 <= home_sequence_s32.out
394-
net home_seq_s32 => ini.0.home_sequence
395-
net home_seq_s32 => ini.1.home_sequence
392+
net home_seq_float => home_sequence_sint.in
393+
net home_seq_sint <= home_sequence_sint.out
394+
net home_seq_sint => ini.0.home_sequence
395+
net home_seq_sint => ini.1.home_sequence
396396
...
397397
# allow_jjog: pin created by a virtual panel or hardware switch
398398
net hsequence_select <= allow_jjog

‎docs/src/config/mtconnect.adoc‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ curl http://localhost:5000/assets
6464

6565
Loaded from a HAL file, the component exposes pins you can link:
6666

67-
* `mtconnect-agent.enable` (bit, in) - gate polling and publishing.
68-
* `mtconnect-agent.active` (bit, out) - TRUE while polling and serving.
69-
* `mtconnect-agent.connected` (bit, out) - TRUE while the MQTT broker link is up.
70-
* `mtconnect-agent.heartbeat` (u32, out) - increments each poll.
67+
* `mtconnect-agent.enable` (bool, in) - gate polling and publishing.
68+
* `mtconnect-agent.active` (bool, out) - TRUE while polling and serving.
69+
* `mtconnect-agent.connected` (bool, out) - TRUE while the MQTT broker link is up.
70+
* `mtconnect-agent.heartbeat` (uint, out) - increments each poll.
7171

7272
== Exposing custom HAL pins
7373

‎docs/src/config/python-hal-interface.adoc‎

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ The old defined constants are still supported for backwards compatibility.
5555
.Example:
5656
[source,python]
5757
----
58-
# Old (deprecated) style:
59-
comp.newpin("in-a", hal.HAL_FLOAT, hal.HAL_IN)
60-
61-
# New style:
6258
comp.newpin("in-a", hal.Type.REAL, hal.Dir.IN)
6359
----
6460

@@ -71,22 +67,22 @@ The `hal.Type` enum is used to specify the type of pin, parameter and signal:
7167
* `hal.Type.UINT` - An unsigned quantity with range 0...+2^64^-1
7268
* `hal.Type.REAL` - A floating point quantity of range &#177;1.80×10^308^
7369
* `hal.Type.PORT` - An opaque quantity representing a communication channel (pins only)
74-
* `hal.Type.S32` - A signed quantity with range -2^31^...+2^31^-1 (see notes below)
75-
* `hal.Type.U32` - An unsigned quantity with range 0...+2^32^-1 (see notes below)
7670

7771
There are aliases in the `hal.Type` enum for all types with the `HAL_` prefix (e.g. `hal.Type.HAL_BOOL`, etc.).
7872

7973
[NOTE]
8074
====
81-
The constants previously used (`hal.HAL_BIT`, `hal.HAL_FLOAT`, etc.) are still available.
75+
The constants previously used (`hal.HAL_BIT`, `hal.HAL_FLOAT`, etc.) are deprecated and emit a warning.
8276
You should upgrade your code to use the enumerated types with the new names instead.
83-
====
8477
85-
[IMPORTANT]
86-
====
87-
The 32-bit types will soon be replaced by 64-bit types.
88-
The names will remain for some time, but they will map to the larger type automatically.
89-
The `S32` and `U32` names will then no longer be unique and the range will be larger.
78+
[source,python]
79+
----
80+
# Old (deprecated) style:
81+
comp.newpin("in-a", hal.HAL_FLOAT, hal.HAL_IN)
82+
83+
# New style:
84+
comp.newpin("in-a", hal.Type.REAL, hal.Dir.IN)
85+
----
9086
====
9187

9288
==== HAL direction
@@ -105,7 +101,10 @@ Also the direction enums are available with the `HAL_` prefix (like `hal.Dir.HAL
105101
==== Old style HAL constants (deprecated)
106102

107103
Old style constants (deprecated):
108-
`hal.HAL_BIT`, `hal.HAL_S32`, `hal.HAL_U32`, `hal.HAL_S64`, `hal.HAL_U64`, `hal.HAL_FLOAT`, `hal.HAL_PORT`.
104+
`hal.HAL_BOOL`, `hal.HAL_SINT`, `hal.HAL_UINT`, `hal.HAL_REAL`, `hal.HAL_PORT`.
105+
106+
Deprecated constants:
107+
`hal.HAL_BIT`, `hal.HAL_S64`, `hal.HAL_U64`, `hal.HAL_FLOAT`.
109108

110109
Old style deprecated pin direction constants (deprecated):
111110
`hal.HAL_IN`, `hal.HAL_OUT`, `hal.HAL_IO`.
@@ -271,8 +270,8 @@ Textual representations are case insensitive.
271270
.Example:
272271
[source,python]
273272
----
274-
hal.set_p("mycomp.0.bit", True)
275-
hal.set_p("mycomp.0.float", 99.99)
273+
hal.set_p("mycomp.0.bool", True)
274+
hal.set_p("mycomp.0.real", 99.99)
276275
----
277276

278277
hal.set_s(_name_:string, _value_:mixed)::
@@ -429,12 +428,10 @@ Each data sample may contain up to twenty (20) values.
429428
The type of the values in a sample must be configured and specified in a type string.
430429
anchor:type-string[]The type string consists of the following characters (case insensitive):
431430

432-
* `b` - Boolean
433-
* `s` - Signed 32-bit
434-
* `u` - Unsigned 32-bit
435-
* `l` - Signed 64-bit
436-
* `k` - Unsigned 64-bit
437-
* `f` - Floating point (real)
431+
* `b` - Boolean (bool)
432+
* `s`, `l` - Signed 64-bit (sint)
433+
* `u`, `k` - Unsigned 64-bit (uint)
434+
* `f`, `r` - Floating point (real)
438435

439436
Two components are available, 'streamer' and 'sampler'.
440437
The 'streamer' component writes a set of pins from non-real-time data pushed into a stream.
@@ -576,7 +573,7 @@ result = hal.query.pin("my.pin.name")
576573
result = {
577574
"haltype" : "pin",
578575
"name" : "my.pin.name",
579-
"type" : hal.Type.<BOOL,REAL,SINT,UINT,PORT,S32,U32>,
576+
"type" : hal.Type.<BOOL,REAL,SINT,UINT,PORT>,
580577
"dir" : hal.Dir.<IN,OUT,IO>,
581578
"value" : <bool, int or float>,
582579
"alias" : "alias.name"|None,
@@ -597,7 +594,7 @@ result = hal.query.param("my.param.name")
597594
result = {
598595
"haltype" : "parameter",
599596
"name" : "my.param.name",
600-
"type" : hal.Type.<BOOL,REAL,SINT,UINT,S32,U32>,
597+
"type" : hal.Type.<BOOL,REAL,SINT,UINT>,
601598
"dir" : hal.Dir.<RO,WR>,
602599
"value" : <bool, int or float>,
603600
"alias" : "alias.name"|None,
@@ -617,7 +614,7 @@ result = hal.query.signal("my.signal.name")
617614
result = {
618615
"haltype" : "signal",
619616
"name" : "my.signal.name",
620-
"type" : hal.Type.<BOOL,REAL,SINT,UINT,PORT,S32,U32>,
617+
"type" : hal.Type.<BOOL,REAL,SINT,UINT,PORT>,
621618
"value" : <bool, int or float>,
622619
"writers" : <int>,
623620
"readers" : <int>,

0 commit comments

Comments
 (0)