owAlarmGetFamily (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All devices with 1-Wire

Firmware version:

2.80 / 1.00.00


This function returns the family code of the device previously found with owAlarmSearch.

 

Input:

None.

 

Returns: INT

> 0


1-Wire family code.

-1


1-Wire not supported on target.

-2


Device not found.

 

Declaration:

FUNCTION owAlarmGetFamily : INT;

 

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
BEGIN
  ...
  // Query for a device that is alerting.
  IF owAlarmSearch() < 1 THEN
    DebugMsg(message:="No alarm!");
  ELSE
     // Get ID of device
    DebugMsg(message:="Alarm on device: " + owAlarmGetID());
     // Get Family of device
    DebugMsg(message:="Device family: " + owAlarmGetFamily());
     ...
  END_IF;
END;
 
END_PROGRAM;