Project

General

Profile

Feature #4190

osmo_tdef: Add fields min_val,max_val and enforce those

Added by pespin 14 days ago. Updated 2 days ago.

Status:
Feedback
Priority:
Normal
Assignee:
Category:
libosmocore
Target version:
-
Start date:
09/05/2019
Due date:
% Done:

90%

Spec Reference:

Description

Specs sometimes provide the valid range for some timers.
The idea is to be able to specify during configuration of the osmo_tdef the range of valid values that a given timer can take.

min_val and max_val, same as for val, are considered to be in units specified in the "unit" field.

Example: { .T=3193, .default_val=5, .unit=OSMO_TDEF_MS, .min_val=2, .max_val=300, .desc="Force to STANDBY on expiry timer (s)"},

T3193 is a timer whose default value is 5ms, and can be changed through API or VTY to any value between 2ms and 300ms.

.default_val being valid inside range is checked during osmo_tdefs_reset(), and if fails, osmo_panic() is called.

History

#1 Updated by pespin 2 days ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 90

https://gerrit.osmocom.org/c/libosmocore/+/15546 tdef: Introduce min_val and max_val fields

Once merged the ticket can be closed.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)