Skip to content

Feat/schedule calendar indexed access#5

Open
EveGun wants to merge 19 commits intomasterfrom
feat/schedule-calendar-indexed-access
Open

Feat/schedule calendar indexed access#5
EveGun wants to merge 19 commits intomasterfrom
feat/schedule-calendar-indexed-access

Conversation

@EveGun
Copy link
Copy Markdown
Owner

@EveGun EveGun commented Mar 12, 2026

No description provided.

EveGun and others added 9 commits March 12, 2026 09:12
…n up schedule encode

Extract shared schedule/calendar decode logic into decodeScheduleCalendarValue
in asn1.ts, replacing ~440 lines of duplicated if-else chains across
decodeReadAccessResult, ReadProperty, and WritePropertyMultiple.

Fix indentation bug in decodeExceptionSchedule OBJECTIDENTIFIER branch.
Remove redundant scheduleValues/dateListValues aliases in WriteProperty.
Remove ambiguous isFullWeek heuristic — indexed writes now always treat
values as BACNetTimeValueEntry[] directly.
Add typeof number check in encodeEffectivePeriodPayload to correctly
reject plain number inputs for non-array-size writes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…perties

Add encode and decode support for reading and writing individual array
elements (arrayIndex != ARRAY_ALL) on WEEKLY_SCHEDULE, EXCEPTION_SCHEDULE,
EFFECTIVE_PERIOD and DATE_LIST. Also fix falsy-bug where arrayIndex 0 was
treated as ARRAY_ALL due to loose truthiness checks (|| vs ?? and
p.index !== undefined).

Refactor WriteProperty.encode to extract encodePropertyValuePayload so
WritePropertyMultiple can reuse the same logic without duplication.
Add closingTagNumber/openingTagNumber params to schedule decoder functions
to support both ReadProperty (tag 3) and ReadPropertyMultiple (tag 4/2)
contexts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@EveGun
Copy link
Copy Markdown
Owner Author

EveGun commented Mar 12, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c001117c2c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/lib/services/WriteProperty.ts Outdated
@EveGun
Copy link
Copy Markdown
Owner Author

EveGun commented Mar 12, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b1c8357640

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/lib/services/WritePropertyMultiple.ts Outdated
Comment thread src/lib/services/ReadProperty.ts
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