Skip to content

Commit

Permalink
chore: fix off-by-one error with jinja loop index (#539)
Browse files Browse the repository at this point in the history
Fixed off-by-one error in Event message_type. According to the protocol
the Least significant bit is set to 0 (Request), 1 (Response) and
increments for each Event.

Message Type value for MembersView should end in 02, PartitionsView ->
03, MemberGroupsView -> 04

Instead it is off by 1 since the jinja loop.index starts at 1 not 0
  • Loading branch information
pmcgleenon authored Dec 18, 2024
1 parent 1dadf81 commit c8190d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion md/documentation-template.j2
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@ Header only response message, no message body exist.
{% for event in method.events %}

##### {{ event.name }}
**Message Type:** {{ "0x%02x%02x%02x"|format(service.id, method.id, 2 + loop.index) }}
**Message Type:** {{ "0x%02x%02x%02x"|format(service.id, method.id, 1 + loop.index) }}

| Name | Type | Nullable | Description | Available Since |
| ---- | ---- | -------- | ----------- | --------------- |
Expand Down

0 comments on commit c8190d0

Please sign in to comment.