owAlarmQuery (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All devices with 1-Wire

Firmware version:

2.80 / 1.00.00


This function will query for alerted devices found with owAlarmSearch.

 

Input:

None.

 

Returns: INT

1


A device was found.

0


No device found.

-1


1-Wire not supported on target.

 

Declaration:

FUNCTION owAlarmQuery : INT;

 

 


Example:

 

 

INCLUDE rtcu.inc
 
PROGRAM test;
 
BEGIN
  // Search for One-Wire device with alarm condition
  owAlarmSearch();
  // Query for a device that is alerting.
  IF owAlarmQuery() = 0 THEN
    DebugMsg(message:="No alarm!");
  ELSE
     // Get ID of device
    DebugMsg(message:="Alarm on device: " + owAlarmGetID());
     ...
  END_IF;
END;
 
END_PROGRAM;