TMFamilySearchSetup Overview roup

The TMFamilySearchSetup API call sets the ROM buffer and search status to attempt to find a certain 1-Wire device family type. This does not effect the 1-Wire network in any way, it just sets the search algorithm up to find a certain 1-Wire device family type the next time a search function is called (i.e. TMNext or TMNextAlarm). This function will be successful if the port requested to do this on is valid. This function sets up the search to find a certain type on the next call only if there is one available. If there is not one available, TMNext or TMNextAlarm may still find a device of a different type. The normal sequence to search for a particular family type is as follows:

1) Call TMFamilySearchSetup with the desired family type

2) Call TMNext or TMNextAlarm

3) if step 2 is successful then check the family code using TMRom to see if the correct type was found.

4) if step 2 is not successful or the incorrect family code was found in step 3 then no devices of that type were on the 1-Wire network at the time of the search.

short far pascal TMFamilySearchSetup(

long session_handle,     // session handle for the desired 1-Wire network
void far *state_buffer,  // state buffer provided for the 1-Wire network session
short family_type        // 1-Wire device family type to search for

For a description of the above types, see the TMEX Type Descriptions.



Specifies the session handle returned from the API function TMExtendedStartSession that specifies the desired 1-Wire network port. This parameter is required by most TMEX API functions.


Specifies a pointer to a memory location that TMEX keeps all of the state information for the 1-Wire networks. This parameter is required by most TMEX API functions.


Specifies the family type to search for on the next search function call. Each 1-Wire device type has an associated family type number.

Return Value

1 => search setup to find family_type

<0 => TMEX Network Error Return Code

Code Example

See Also

TMNext, TMSkipFamily, TMRom, TMNextAlarm