Skip to content

Build options from per-point-type factories - #67

Merged
jadamcrain merged 1 commit into
mainfrom
option-factories
Oct 14, 2026
Merged

jadamcrain merged 1 commit into
mainfrom
option-factories

Conversation

@jadamcrain

Copy link
Copy Markdown
Member

Item 7 of #59.

Factories

  • PointOptions builds the options that several kinds of point repeat:
    • the events generated for the count-limited tests
    • the events' class
    • the default event variation
    • the points kept at only one width (only16Bit / only32Bit)
    • for outputs: the installed points, the uninstalled index, the points per request and the changeable status flags
  • ClassOptions.EventClass builds each event class's options.
  • TimeSyncOptions.TimedEvents builds the with-time and relative-time options of binary and double-bit inputs.
  • BinaryOutputOptions builds one set of CROB fields, which the primary and alternate commands and the control code points share.

Renamed keys

These keys differed only by accident, and now follow one pattern:

Before After
control.* binaryOutput.*, like analogOutput.* and supports.binaryOutput.* (ControlOptions is now BinaryOutputOptions)
binaryInput.numBinaryEventsGenerated, doubleBitInput.numDoubleBitEventsGenerated, counter.numCounterEventsGenerated <group>.numEventsGenerated
binaryInput.binaryEventsClass, doubleBitInput.doubleBitEventsClass, counter.counterEventsClass, analogInput.analogInputEventsClass <group>.eventsClass
control.maxControlPointsInSingleRequest, analogOutput.maxAnalogOutputsInSingleRequest binaryOutput.maxPointsInSingleRequest, analogOutput.maxPointsInSingleRequest
supports.doubleBit*, supports.analog* (e.g. supports.disable.analog, supports.analogChangeEvents) supports.doubleBitInput*, supports.analogInput*, matching the input groups
supports.analogEventsQueuedPerPoint supports.analogInputEventsQueuedPerPoint
event.buffer.maxDoubleBitBinaryInputEvents event.buffer.maxDoubleBitInputEvents

A configuration file with an old key now gets an unknown-option error. stepfunc/dnp3's conformance configuration will be updated to match.

Unchanged

The options' defaults, bounds and allowed values are unchanged, and so is their order in the written configuration file.

I compared a before/after dump with the renamed keys mapped back to their old names. It covered:

  • every option
  • both revisions' trees
  • every procedure's -describe output
  • the disabled lists
  • Revision.validate

It ran at each subset level, with a device profile, every boolean option on, and every boolean option off. The only differences are in option descriptions that now read the same for each kind:

  • "binary output points" where it said "control points"
  • "counter events" where it said "binary counter events"
  • the frozen counters' width options, which now spell out what they mean

- PointOptions builds the options that several kinds of point repeat:
  the events generated for the count-limited tests, the events' class,
  the default event variation, the points kept at one width only, and
  the outputs' installed points, uninstalled index, points per request
  and changeable status flags.
- ClassOptions.EventClass builds each event class's options,
  TimeSyncOptions.TimedEvents the with-time and relative-time options
  of binary and double-bit inputs, and BinaryOutputOptions one set of
  CROB fields for the primary and alternate commands and the control
  code points.
- Keys that differed only by accident follow one pattern:
  - control.* is binaryOutput.*, like analogOutput.* and
    supports.binaryOutput.*; ControlOptions is BinaryOutputOptions
  - <group>.numEventsGenerated and <group>.eventsClass for binary,
    double-bit and analog inputs and counters
  - maxPointsInSingleRequest for binary and analog outputs
  - supports.doubleBitInput* and supports.analogInput*, like the input
    groups, and supports.analogInputEventsQueuedPerPoint
  - event.buffer.maxDoubleBitInputEvents
- Descriptions of the same thing read the same for each kind.

The options' defaults, bounds and order in the written configuration
file are unchanged, and so is every procedure's steps.

Part of #59.
@jadamcrain
jadamcrain merged commit 917b42f into main Oct 14, 2026
5 checks passed
@jadamcrain
jadamcrain deleted the option-factories branch October 14, 2026 22:24
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