Skip to content

docs(cli): clarify constants.ts comment wording #335

Description

@groupsky

Current Comment

From packages/cli/src/discovery/constants.ts:9:

/**
 * Standard parity modes ordered from most to least common
 * during discovery scans (most devices use 'none').
 */
export const STANDARD_PARITY: readonly Parity[] = ['none', 'even', 'odd']

Issue

The phrase "during discovery scans" is slightly awkward and could be misinterpreted as:

  • "How often we see these values during scanning" (runtime statistics)
  • "The order we should try these during scanning" (search strategy)

The actual intent is: "In real-world Modbus deployments, 'none' is the most common parity setting."

Proposal

Simplify to:

/**
 * Standard parity modes ordered from most to least common in Modbus deployments.
 * Most devices use 'none' parity.
 */
export const STANDARD_PARITY: readonly Parity[] = ['none', 'even', 'odd']

Benefits

  • Clearer intent
  • Removes ambiguous "during discovery scans" phrase
  • More concise

Related

PR #332 - added parity filter feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions