Gocator API
 All Classes Files Functions Variables Typedefs Macros Groups Pages
GoDiscovery Class Reference

Description

Represents a discovery client.

Inherits kObject.

Public Member Functions

kStatus GoDiscovery_Construct (GoDiscovery *discovery, kAlloc allocator)
 Constructs a GoDiscovery object. More...
 
kStatus GoDiscovery_Enumerate (GoDiscovery discovery, kArrayList infoList)
 Enumerates sensors present in the network. More...
 
kStatus GoDiscovery_GetAddress (GoDiscovery discovery, k32u deviceId, GoAddressInfo *address)
 Retrieves a sensor's network address settings. More...
 
kStatus GoDiscovery_SetAddress (GoDiscovery discovery, k32u deviceId, const GoAddressInfo *address)
 Configures a sensor's network address settings. More...
 
kStatus GoDiscovery_SetEnumHandler (GoDiscovery discovery, GoDiscoveryEnumFx function, kPointer receiver)
 Sets the enumeration callback to be used when background updates are enabled via StartEnum. More...
 
kStatus GoDiscovery_SetEnumPeriod (GoDiscovery discovery, k64u period)
 Sets the enumeration period that will be used when background updates are enabled via StartEnum. More...
 
kStatus GoDiscovery_StartEnum (GoDiscovery discovery, kBool waitFirst)
 Starts periodic background discovery enumeration. More...
 
kStatus GoDiscovery_StopEnum (GoDiscovery discovery)
 Stops periodic background discovery enumeration. More...
 

Member Function Documentation

kStatus GoDiscovery_Construct ( GoDiscovery discovery,
kAlloc  allocator 
)

Constructs a GoDiscovery object.

Parameters
discoveryReceives constructed discovery object.
allocatorMemory allocator (or kNULL for default)
Returns
Operation status.
kStatus GoDiscovery_Enumerate ( GoDiscovery  discovery,
kArrayList  infoList 
)

Enumerates sensors present in the network.

Parameters
discoveryDiscovery object.
infoListList to be populated with sensor descriptors (kArrayList<GoDiscoveryInfo>).
Returns
Operation status.
kStatus GoDiscovery_GetAddress ( GoDiscovery  discovery,
k32u  deviceId,
GoAddressInfo address 
)

Retrieves a sensor's network address settings.

This function uses UDP broadcasts; the sensor and can be on a different subnet than the client.

Parameters
discoveryDiscovery object.
deviceIdSensor device identifier (serial number).
addressReceives address information.
Returns
Operation status.
kStatus GoDiscovery_SetAddress ( GoDiscovery  discovery,
k32u  deviceId,
const GoAddressInfo address 
)

Configures a sensor's network address settings.

This function uses UDP broadcasts; the sensor and can be on a different subnet than the client.

The sensor will automatically reboot if the address is successfully changed.

Parameters
discoveryDiscovery object.
deviceIdSensor device identifier (serial number).
addressNew address information.
Returns
Operation status.
kStatus GoDiscovery_SetEnumHandler ( GoDiscovery  discovery,
GoDiscoveryEnumFx  function,
kPointer  receiver 
)

Sets the enumeration callback to be used when background updates are enabled via StartEnum.

Parameters
discoveryDiscovery object.
functionEnumeration callback function (or kNULL to unregister).
receiverReceiver argument for callback.
Returns
Operation status.
kStatus GoDiscovery_SetEnumPeriod ( GoDiscovery  discovery,
k64u  period 
)

Sets the enumeration period that will be used when background updates are enabled via StartEnum.

Parameters
discoveryDiscovery object.
periodEnumeration period, in microseconds.
Returns
Operation status.
kStatus GoDiscovery_StartEnum ( GoDiscovery  discovery,
kBool  waitFirst 
)

Starts periodic background discovery enumeration.

Parameters
discoveryDiscovery object.
waitFirstkTRUE to block until first enumeration cycle is completed; kFALSE otherwise.
Returns
Operation status.
kStatus GoDiscovery_StopEnum ( GoDiscovery  discovery)

Stops periodic background discovery enumeration.

Parameters
discoveryDiscovery object.
Returns
Operation status.

The documentation for this class was generated from the following file: