TMFirstAlarm Code Example
long session_handle;
unsigned char state_buffer[15360];
short result;
/* session_handle set from a call to TMExtendedStartSession */
...
/* attempt to find the first alarming device on 1-Wire network */
result = TMFirstAlarm(session_handle, state_buffer);
if (result == 1)
{
/* alarming device ROM number found, call TMRom to get number */
...
}
else
{
/* no alarming device on 1-Wire network at this time or error */
...
}
/* close the session with a call to TMEndSession */
...