Skip to content

float32 inconsistency #31

@abrown-RV

Description

@abrown-RV

in constraint.proto float range constraints are defined

message Constraint {
  FloatRangeConstraint float_range = 6;
}

but in device.yaml float32_range is used.

Simplest change is likely to just rename float range fields in constraint.proto to float32. That will bring it in line with param.proto where float32 is used extensively. It is however, a little inconsistent with protobuf itself, floats are 32 bit by definition and so in protobuf it is simply float (as opposed to 32 or 64 bit flavours of int). But that's a pretty big change to go back to just float everywhere for field names in param.proto

I also notice that the ConstraintType enum doesn't have 32s. Not even on the ints. Should that also be updated for consistency?

enum ConstraintType {
  UNDEFINED = 0;
  INT_RANGE = 2;
  FLOAT_RANGE = 4;
  INT_CHOICE = 5;
  STRING_CHOICE = 6;
  STRING_STRING_CHOICE = 7;
  ALARM_TABLE = 8;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions