TMTouchReset Code Example

long session_handle;
short result;
char result_str[80];

/* session_handle set from a call to TMExtendedStartSession */
...

/* reset the 1-Wire network and provide a string to represent the result */
result = TMTouchReset(session_handle);

switch(result)
{
    case 0: sprintf(result_str,"No device on 1-Wire network");
               break;
       case 1: sprintf(result_str,"Device on 1-Wire network"); 
            break;
       case 2: sprintf(result_str,"Alarming device on 1-Wire 
            network"); 
            break;
       case 3: sprintf(result_str,"1-Wire network shorted"); 
            break;
       case 4: sprintf(result_str,"1-Wire network not setup"); 
            break;
       case 5: sprintf(result_str,"TMTouchReset not supported"); 
            break;
       default: sprintf(result_str,"unknown result"); 
            break;
};

/* close the session with a call to TMEndSession */
...