TMStrongAlarmAccess Code Example
long session_handle;
unsigned char state_buffer[15360];
short result;
/* session_handle set from a call to TMExtendedStartSession */
...
/* the internal 8-byte ROM buffer contains a valid ROM that is going to be selected to do a device specific operation */
...
/* verify the device is alarming and access it */
result = TMStrongAlarmAccess(session_handle, state_buffer);
if (result == 1)
{
/* device on 1-Wire network and alarming and accessed, ready for
memory operation */
...
}
else
{
/* device not on 1-Wire network or not alarming or error */
...
}
/* close the session with a call to TMEndSession */
...