Skip to content

Disallow duplicate phase entries #998

@Kronos3

Description

@Kronos3

We should disallow duplicate entries of the same phase number in component instance specifiers.

For example:

instance rateGroupDriver: Svc.RateGroupDriver base id FixedBaseIds.NO_DICTIONARY \
  {
    phase Fpp.ToCpp.Phases.configConstants """
    // The reference topology divides the incoming clock signal 10Hz
    Svc::RateGroupDriver::DividerSet rateGroupDivisors{{{1, 0}, {10, 0}, {100, 0}}};
    """

    phase Fpp.ToCpp.Phases.configConstants """
    // Rate group driver needs a divisor list
    rateGroupDriver.configure(rateGroupDivisors);
    """
  }

This was a bug I had where I had duplicate entries of configConstants, the second entry should have been configComponents. It made it to C++ and gave be an odd (which wasn't very odd once I saw this typo) error about rateGroupDivisors being undefined. I think it would be reasonable to catch this at FPP-time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs ccb inputNeeds input from F Prime Change Control Board (CCB)specIssues related to the FPP language specification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions