MAPL_RecordAlarmIsRinging Function

public function MAPL_RecordAlarmIsRinging(META, unusable, MODE, RC)

Arguments

Type IntentOptional Attributes Name
type(MAPL_MetaComp), intent(inout) :: META
class(KeywordEnforcer), intent(in), optional :: unusable
integer, intent(in), optional :: MODE
integer, intent(out), optional :: RC

Return Value logical


Calls

proc~~mapl_recordalarmisringing~~CallsGraph proc~mapl_recordalarmisringing MAPL_RecordAlarmIsRinging ESMF_AlarmIsRinging ESMF_AlarmIsRinging proc~mapl_recordalarmisringing->ESMF_AlarmIsRinging proc~mapl_return MAPL_Return proc~mapl_recordalarmisringing->proc~mapl_return proc~mapl_verify MAPL_Verify proc~mapl_recordalarmisringing->proc~mapl_verify at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Source Code

   logical function MAPL_RecordAlarmIsRinging(META, unusable, MODE, RC)

      ! !ARGUMENTS:

      type (MAPL_MetaComp), intent(inout) :: META
      class (KeywordEnforcer), optional, intent(in) :: unusable
      integer, optional,    intent(in   ) :: MODE  ! Writing file mode: disk or ram
      integer, optional,    intent(  out) :: RC     ! Error code:
      ! = 0 all is well
      ! otherwise, error
      !EOPI

      ! LOCAL VARIABLES

      character(len=ESMF_MAXSTR)                  :: IAm
      integer                                     :: status

      integer                                     :: I
      integer                                     :: mode_
      logical                                     :: modePresent
      !=============================================================================

      !  Begin...

      _UNUSED_DUMMY(unusable)
      Iam = "MAPL_RecordIsAlarmRinging"

      MAPL_RecordAlarmIsRinging  = .false.
      if (present(MODE)) then
         mode_ = mode
         modePresent = .true.
      else
         mode_ = MAPL_Write2Disk
         modePresent = .false.
      end if

      ! ------------------
      if (associated(META%RECORD)) then

         RECORDLOOP: DO I = 1, size(META%RECORD%ALARM)
            if ( ESMF_AlarmIsRinging(META%RECORD%ALARM(I), RC=status) ) then
               _VERIFY(status)
               if (.not. modePresent) then
                  MAPL_RecordAlarmIsRinging = .true.
                  exit RECORDLOOP
               end if
               if (META%RECORD%FILETYPE(I) == mode_) then
                  MAPL_RecordAlarmIsRinging = .true.
                  exit RECORDLOOP
               end if
            end if
         end DO RECORDLOOP
      end if
      _RETURN(ESMF_SUCCESS)
   end function MAPL_RecordAlarmIsRinging