Skip to content

Him support2 - #554

Closed
UlfBj wants to merge 10 commits into
COVESA:masterfrom
UlfBj:him-support2
Closed

Him support2#554
UlfBj wants to merge 10 commits into
COVESA:masterfrom
UlfBj:him-support2

Conversation

@UlfBj

@UlfBj UlfBj commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Ulf Bjorkengren and others added 10 commits December 19, 2023 15:52
Signed-off-by: Ulf Bjorkengren <ulfbjorkengren@geotab.com>
Signed-off-by: Ulf Bjorkengren <ulfbjn@gmail.com>
… type support

Adds support for the three HIM (Hierarchical Information Model,
https://github.com/COVESA/hierarchical_information_model) profiles in
addition to the existing VSS/'vehicle-data' rule set:

- 'vehicle-data' (default): branch/sensor/actuator/attribute/struct/property,
  identical to the pre-existing behavior.
- 'data': branch/ro/rw/struct/property (HIM Data Rule Set).
- 'service': branch/procedure/iostruct/symlink/attribute/struct/property
  (HIM Service Rule Set), including the 'Input'/'Output' iostruct naming
  rule, the mandatory procedure->attribute 'Version' parent/child relation,
  and the iostruct->property/symlink parent/child relation.

Selected via a new top-level '--profile' option (vspec --profile
<vehicle-data|data|service> export ...), defaulting to 'vehicle-data' so
existing invocations are unaffected.

Implementation:
- model.py: new 'Profile' enum, 'PROFILE_ALLOWED_TYPES' map, and a
  'active_profile' global (mirroring the existing dynamic_units/
  dynamic_quantities pattern) checked by a new NodeType field validator.
  Adds VSSDataRo/VSSDataRw/VSSDataProcedure/VSSDataIostruct/VSSDataSymlink
  node data classes and wires them into TYPE_CLASS_MAP.
- main.py: extends get_invalid_node_msgs() parent/child structural checks
  for the new node types.
- cli.py/cli_options.py: new global '--profile' option, applied once in
  the root 'cli' group so all exporters inherit it without per-exporter
  changes.

Also fixes a pre-existing bug where TYPE_CLASS_MAP mapped
NodeType.ACTUATOR to VSSDataSensor instead of VSSDataActuator (harmless
today since both classes were identical, but now that per-type
validators exist this could otherwise silently apply the wrong ones).
…rofile

- tests/vspec/test_profiles/: end-to-end CLI tests (via subprocess, matching
  existing test conventions) covering:
  - default profile == 'vehicle-data' (no regression, byte-identical JSON output)
  - happy path JSON export for each of the three profiles
  - rejection of a node type from the wrong profile (sensor/actuator under
    'data', ro/rw under 'vehicle-data', procedure/iostruct/symlink under
    'vehicle-data')
  - 'service' profile structural rules: iostruct must be named
    Input/Output, symlink must have an iostruct parent
  - --profile CLI choice validation (accepts the three valid names,
    rejects an invalid one)
- docs/vspec_arch.md: new 'HIM Profiles' section explaining the three
  profiles, their allowed node types, and the additional service-profile
  structural rules; also lists '--profile' among the toplevel-only options.
- README.md: short 'HIM Profiles' usage blurb under 'Usage', linking to
  the vspec_arch.md section.
…sessions

Captures the background, implementation pointers, deliberate scope
limitations, and verification approach for the 'him-support' branch's
--profile feature, so future AI coding agent sessions (or humans) working
in this repo have durable context without needing to re-derive it.
@UlfBj UlfBj closed this Aug 13, 2026
@UlfBj
UlfBj deleted the him-support2 branch August 13, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant