Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions python/lorawan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ uv run lorawan-wot decode examples/dragino-lht65n.td.json 0B450A8C02DD010A1E --f
# }
```

For a `ports` layout, don't forget to pass the frame port:

For a `ports` layout, don't forget to pass the frame port with `--fport`, as in
the example above; without it the interpreter cannot select the right field set.
Comment on lines +95 to +96

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added as comment there


### Use it from Python

Expand Down Expand Up @@ -126,7 +126,7 @@ schema into a starter Thing Description.
uv run lorawan-wot generate external/device-payload-schema/schemas/devices/makerfabs/ath20.yaml -o examples/devices/makerfabs/ath20.td.json
```

This is how to generat a bundled [device catalog](#device-catalog).
This is how the bundled [device catalog](#device-catalog) is generated.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.



## Generate a ChirpStack / TTN JavaScript codec
Expand Down Expand Up @@ -236,6 +236,7 @@ For `tlv`/`ctv` you may declare the tag fields at Thing level with
| `lorav:length` | Byte length for `bytes`/`string`/`hex` (`-1` = consume rest) | `length` |
| `lorav:unece` | UN/CEFACT unit code | `unece` |
| `lorav:enum` | Map raw integers to labels | `values` |
| `lorav:validRange` | Plausibility range `[min, max]`; decoded values outside it are flagged | `valid_range` |
| `lorav:slot` | Order of a property within its group (multi-field TLV / flagged / match) | field order |
| `lorav:presenceField` | Name of the bit-flags property that gates this property | `flagged.field` |
| `lorav:presenceBit` | Bit index in `presenceField` that must be set for this property to appear | `flagged.groups[*].bit` |
Expand Down
2 changes: 1 addition & 1 deletion python/lorawan/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ select = ["E", "F", "I", "B", "C4", "UP", "N", "W"]
testpaths = ["tests"]

[project.urls]
Source = "https://github.com/eclipse-thingweb/td-tools/tree/main/node/python/lorawan"
Source = "https://github.com/eclipse-thingweb/td-tools/tree/main/python/lorawan"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in #96 as well

1 change: 1 addition & 0 deletions python/lorawan/vocab/context.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"guard": "lorav:guard",
"unece": "lorav:unece",
"enum": "lorav:enum",
"validRange": "lorav:validRange",

"devEUI": "lorav:devEUI",
"joinEUI": "lorav:joinEUI",
Expand Down
4 changes: 4 additions & 0 deletions python/lorawan/vocab/ontology.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ lorav:enum a owl:DatatypeProperty ;
rdfs:label "enumeration" ;
rdfs:comment "Mapping from raw integer values to labels." .

lorav:validRange a owl:DatatypeProperty ;
rdfs:label "valid range" ;
rdfs:comment "Plausibility range [min, max]; the interpreter flags decoded values outside it." .

# --- Grouping / conditional-presence terms -----------------------------------

lorav:slot a owl:DatatypeProperty ;
Expand Down
Loading