You are not logged in. Click here to log in.

Application Lifecycle Management

Search In Project

Search inClear

@Range #17053/HEAD / v10
Tags:  not added yet

@Range

The @Range annotation is supporting an @In or an @Out field. If present, it defines a min/max range in which the value of the field is considered valid. It is up to the execution runtime to handle the range information. Violating a ranges might lead to execution abortion if it is a serious problem or just a warning message. Another use of the range information would be in component unit testing.

In the example below the latitude value can only be in the range of -90 to +90 degree. A value out of this range would probably break any equation that is using latitude. The range use above is similar to a pre-execution check.

Synopsis

@Range(min=<double>, max=<double>)
min - the minimum value, (default=Double.MIN)
max - the maximum value, (default=Double.MAX)

Type

Execution annotation

Scope

Field

Example


!  @Description("CSMLite Plant Component")
...
!  @Execute 
SUBROUTINE Plant
    
    USE, INTRINSIC :: ISO_C_BINDING
    IMPLICIT NONE

!  @Description("Daily maximum temperature in degrees Centigrade")
!  @Range(min=-50, max=55)
!  @In 
   REAL(C_FLOAT) :: TMAX
!  @Description("Day of Year")
!  @Range(min=1, max=366)
!  @In
   INTEGER(C_INT) :: DOY
!  @Description("Dynamic Control Variable")
!  @In
   CHARACTER(kind = C_CHAR, len = 5) : DYN
...
!  @Description("Leaf Area Index")
!  @Out
   REAL(C_FLOAT) :: LAI
...