You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is needed for flag fields where users want to pack more information into the most significant bits. For instance, consider the following flag enum:
classDataRate(IntFlagProperties, s('label'), s('slug', case_fold=True)):
DAILY=2**1, 'Daily', 'daily'HOURLY=2**2, 'Hourly', 'hourly'HIGH_RATE=2**3, 'High Rate', 'high'# bits 4-16 are reserved for daily data rate in seconds# bits 17-27 are reserved for hourly data rate in seconds# bits 28-32 are reserved for high rate data rate in seconds
This flag qualifies rates into categories, but for each category a higher resolution period in seconds can be packed into the msbs. EnumField would only see the three flags and use a SmallPositiveInteger for this field. The user should be able to override this behavior with something like EnumField(DataRate, bit_length=32) to force EnumField to pick PositiveIntegerField instead.
The text was updated successfully, but these errors were encountered:
This is needed for flag fields where users want to pack more information into the most significant bits. For instance, consider the following flag enum:
This flag qualifies rates into categories, but for each category a higher resolution period in seconds can be packed into the msbs. EnumField would only see the three flags and use a SmallPositiveInteger for this field. The user should be able to override this behavior with something like EnumField(DataRate, bit_length=32) to force EnumField to pick PositiveIntegerField instead.
The text was updated successfully, but these errors were encountered: