Skip to content

Fix the TIME and VERSION type ids, and add UINT64 and INT32 - #172

Merged
michaelarnauts merged 1 commit into
masterfrom
fix-pdo-type-ids
Oct 20, 2026
Merged

michaelarnauts merged 1 commit into
masterfrom
fix-pdo-type-ids

Conversation

@michaelarnauts

Copy link
Copy Markdown
Owner

The PDO/property type ids run from 0 to 11. TYPE_CN_TIME and TYPE_CN_VERSION were defined as 0x10 and 0x11, but they are 10 and 11 (0x0A and 0x0B), as the type table in docs/PROTOCOL-PDO.md already says. The bridge answers a subscription with type 0x10/0x11 with empty data. Nothing in the library subscribes with these types, so nothing was broken in practice.

Also adds the two numeric types that were missing:

  • TYPE_CN_UINT64 = 0x04 (8 bytes, unsigned)
  • TYPE_CN_INT32 = 0x07 (4 bytes, signed)

Both are added to NUMERIC_PROPERTY_TYPES, so they can be decoded and encoded, and to the type table in docs/PROTOCOL-PDO.md.

Tests: a test that pins the type ids 0–11, and UINT64/INT32 cases in the encode, out-of-range, property decode and sensor signedness tests.

🤖 Generated with Claude Code

TYPE_CN_TIME and TYPE_CN_VERSION were 0x10 and 0x11, but the type ids are
10 and 11 (0x0A and 0x0B), as the type table in PROTOCOL-PDO.md already says.
Also add the two missing numeric types: 4 (CN_UINT64) and 7 (CN_INT32).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michaelarnauts
michaelarnauts merged commit 4437e6e into master Oct 20, 2026
4 checks passed
@michaelarnauts
michaelarnauts deleted the fix-pdo-type-ids branch October 20, 2026 12:22
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