Skip to content

COR-6538: update marker and record example - #247

Open
tungntEmotiv wants to merge 3 commits into
COR-1866from
COR-6538
Open

tungntEmotiv wants to merge 3 commits into
COR-1866from
COR-6538

Conversation

@tungntEmotiv

Copy link
Copy Markdown
Contributor

The PR to update

  • for marker and record example
  • create a class for session to can reuse between subscribe and record example

Now the branch is checked out from COR-6536. after the COR-6536 is merged i will change the destination to COR-1866

Please help to review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Failed subscription requests can block data retrieval for existing streams, while session-setup failures can leave callers marked connected with a closed client, preventing retries.

2 open issues
What changed in this PR

This PR separates headset session setup from stream subscription in the MATLAB/Octave SDK, allowing recording and marker operations to reuse the same session without subscribing to data.

Changes:

  • Adds reusable session setup and public record/marker functions.
  • Tracks recording state in the shared context and exposes internal record/marker helpers.
  • Adds a keyboard-controlled recording example and updates the subscription example and documentation.
File Description
octave/​README.md Documents session setup and record/marker workflows.
octave/​internal/​CortexRecord.m Implements record creation and stopping.
octave/​internal/​CortexMarker.m Implements marker injection and interval updates.
octave/​internal/​CortexManager.m Lazily provides record and marker helpers.
octave/​internal/​CortexHeadset.m Clears recording state when a session closes; updates comments.
octave/​internal/​CortexContext.m Stores recording status and record ID.
octave/​functions/​cortexSubscribe.m Subscribes streams using an existing session.
octave/​functions/​cortexSession.m Creates or reuses a headset session.
octave/​functions/​cortexRecord.m Exposes record start/stop operations.
octave/​functions/​cortexMarker.m Exposes marker operations and options.
octave/​functions/​cortexDisconnect.m Handles close errors and clears recording fields.
octave/​functions/​cortexConnect.m Initializes public recording fields.
octave/​examples/​subscribeAndPlot.m Creates a session before subscribing.
octave/​examples/​recordAndMarker.m Demonstrates keyboard-controlled recording and markers.

Review effort: Balanced

Comment thread octave/functions/cortexSession.m Resolved
Comment thread octave/functions/cortexSubscribe.m Resolved
Base automatically changed from COR-6536 to COR-1866 November 4, 2026 08:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The session-reuse path can reuse a closed session ID, while interruptible keyboard callbacks can process actions out of order and discard markers.

3 open issues
2 resolved since last review

Review effort: Balanced

Comment thread octave/functions/cortexSession.m Resolved
Comment thread octave/examples/recordAndMarker.m Resolved
Comment thread octave/README.md Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the session, recording, and marker API changes.

No open issues 🎉

3 resolved since last review

Review effort: Balanced

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.

2 participants