Main Menu

All times are in GMT -8 (DST) :: The time is now 3:00 am.

Login or Register
Create an account and register your LMI products to gain access to useful resources.

Register Account

Login

Sub Menu

Knowledge Base
Article Data
Article Ref
7250-TPSK-7091
Date Created
Thu, 6th Nov 2014
Date Modified
Thu, 6th Nov 2014

   Checking if Buddy is assigned through SDK (Gocator firmware 3.x)

Question 

How do I check if a Buddy is assigned through the SDK?

Answer 

The correct way to check if a Buddy sensor is currently assigned is to get the sensor handle of the Buddy and then get the serial number of the handle. The Buddy is NOT assigned if the serial number is 0. If the Buddy is assigned the serial number is the serial number of the physical sensor.

//retrive buddy sensor handle
buddySensor = Go2System_BuddySensor(system);
//obtain buddy sensor serial number
sensorID = Go2Sensor_Id(buddySensor);
if (sensorID > 0)
{
    //buddy is assigned!
}