Gocator API

- Home
- Categories
- Types
- Files

All Classes Files Functions Variables Typedefs Macros Groups Pages
Public Member Functions
GoDiscovery Class Reference
GoSdk/Internal

## 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

  discovery | Receives constructed discovery object.
  allocator | Memory allocator (or kNULL for default)

Returns
  Operation status.

kStatus GoDiscovery_Enumerate | ( | GoDiscovery | discovery,
|  | kArrayList | infoList
| ) |  |

Enumerates sensors present in the network.

Parameters

  discovery | Discovery object.
  infoList | List 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

  discovery | Discovery object.
  deviceId | Sensor device identifier (serial number).
  address | Receives 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

  discovery | Discovery object.
  deviceId | Sensor device identifier (serial number).
  address | New 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

  discovery | Discovery object.
  function | Enumeration callback function (or kNULL to unregister).
  receiver | Receiver 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

  discovery | Discovery object.
  period | Enumeration period, in microseconds.

Returns
  Operation status.

kStatus GoDiscovery_StartEnum | ( | GoDiscovery | discovery,
|  | kBool | waitFirst
| ) |  |

Starts periodic background discovery enumeration.

Parameters

  discovery | Discovery object.
  waitFirst | kTRUE to block until first enumeration cycle is completed; kFALSE otherwise.

Returns
  Operation status.

kStatus GoDiscovery_StopEnum | ( | GoDiscovery | discovery | ) |

Stops periodic background discovery enumeration.

Parameters

  discovery | Discovery object.

Returns
  Operation status.

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

- Internal/GoDiscovery.h