Gocator API
GoSystem Class Reference

Description

Represents a system of Gocator devices.

During construction, a GoSystem object uses Gocator Discovery Protocol to locate devices (if the autodiscovery capability is selected). Subsequently, the list of detected devices can be accessed using GoSystem_SensorCount and GoSystem_SensorAt.

Immediately after construction, all sensor objects are in the online state. This state indicates that a sensor has been detected, but that the client has not yet established a control connection to the sensor. The only sensor functions than can be used in this state are GoSensor_State, GoSensor_Address, and GoSensor_SetAddress.

Because Gocator Discovery Protocol works across subnets, but Gocator Control Protocol does not, it is possible for a sensor to be successfully detected but for subsequent connection attempts to fail. In this case, the GoSensor_SetAddress function can be used to reconfigure the sensor to operate on the same subnet as the client.

If the client and device are configured to operate on the same subnet, the GoSystem_Connect or GoSensor_Connect functions can be used to establish control connections.

Note that GoSystem and other system API objects such as GoSensor and GoSetup are not thread safe. They should not be accessed concurrently by multiple threads, without the proper use of synchronization techninques such as mutexes and event loops. A typical example of this is when one thread polls GoSensor_State(), while another calls functions such as GoSensor_Connect() or GoSystem_Refresh(). Without proper locking, this code will result in undefined behavior such as invalid values being returned, or even program crash.

Message objects such as GoUniformProfileMsg do not access shared system resources and can be accessed concurrently with system API objects.

See also
GoSystem_Construct, GoSystem_Connect, GoSensor_State, GoSensor_Address, GoSensor_SetAddress.
Inheritance diagram for GoSystem:
Inheritance graph

Public Member Functions

kStatus GoSystem_AddMultiplexBank (GoSystem system, GoMultiplexBank *bank)
 Adds a multiplex bank with a unique ID to the system. More...
 
kStatus GoSystem_AddSensor (GoSystem system, const GoAddressInfo *addressInfo, const GoPortInfo *portInfo, GoSensor *sensor)
 Adds a sensor by passing a custom address and port info, this doesnt require discovery. More...
 
kStatus GoSystem_Cancel (GoSystem system)
 Aborts ongoing sensor communication. More...
 
kStatus GoSystem_ClearData (GoSystem system)
 Clears any buffered data messages. More...
 
kStatus GoSystem_ClearHealth (GoSystem system)
 Clears any buffered health messages. More...
 
kStatus GoSystem_ClearMultiplexBanks (GoSystem system)
 Removes all multiplex banks. More...
 
kStatus GoSystem_Connect (GoSystem system)
 Establishes control connections to all sensors. More...
 
kStatus GoSystem_Construct (GoSystem *system, kAlloc allocator)
 Constructs a GoSystem object. More...
 
kStatus GoSystem_ConstructEx (GoSystem *system, kAlloc allocator)
 Constructs a GoSystem object. More...
 
kSize GoSystem_DataCapacity (GoSystem system)
 Reports that maximum amount of memory that can be used to buffer received data messages. More...
 
kStatus GoSystem_Disconnect (GoSystem system)
 Terminates control connections to all sensors. More...
 
kBool GoSystem_DiscoveryCompatibilityEnabled (GoSystem system)
 Returns whether or not compatibility mode is enabled. More...
 
kStatus GoSystem_EnableData (GoSystem system, kBool enable)
 Establishes data connections to all connected sensors currently in the ready or running states. More...
 
kStatus GoSystem_EnableDiscoveryCompatibility (GoSystem system, kBool enable)
 Enable or disable compatibility mode for the discovery service. More...
 
kStatus GoSystem_EnablePtp (GoSystem system)
 Enable PTP on the system. More...
 
kStatus GoSystem_Encoder (GoSystem system, k64s *encoder)
 Gets the current encoder value from the sensor network. More...
 
kStatus GoSystem_FindSensorById (GoSystem system, k32u id, GoSensor *sensor)
 Gets the sensor object with the specified device id (serial number). More...
 
kStatus GoSystem_FindSensorByIpAddress (GoSystem system, const kIpAddress *address, GoSensor *sensor)
 Gets the sensor object with the specified IP address. More...
 
kBool GoSystem_HasChanges (GoSystem system)
 Reports whether the system has changes that require a refresh. More...
 
kStatus GoSystem_LockState (GoSystem system)
 Lock the system state to ensure thread safety while reading/modifying the GoSystem class's list of sensors. More...
 
k64f GoSystem_MaxBankExposureDuration (GoSystem system, GoMultiplexBank bank)
 Gets the maximum sensor exposure duration in the given multiplex bank. More...
 
k64f GoSystem_MaxMinimumMultiplexPeriod (GoSystem system)
 Returns the maximum value of all multiplexed sensor's minimum multiplexing periods. More...
 
GoMultiplexBank GoSystem_MultiplexBankAt (GoSystem system, kSize index)
 Gets a multiplex bank corresponding to the given index. More...
 
kSize GoSystem_MultiplexBankCount (GoSystem system)
 Gets the current multiplex bank count. More...
 
kVersion GoSystem_ProtocolVersion ()
 Reports the Gocator Protocol version implemented by this library. More...
 
kStatus GoSystem_ReceiveData (GoSystem system, GoDataSet *data, k64u timeout)
 Receives a set of sensor data messages. More...
 
kStatus GoSystem_ReceiveHealth (GoSystem system, GoDataSet *data, k64u timeout)
 Receives a set of sensor health messages. More...
 
kStatus GoSystem_Refresh (GoSystem system)
 Updates client state to reflect any changes that have occurred in the sensor network. More...
 
kStatus GoSystem_RemoveMultiplexBank (GoSystem system, kSize index)
 Removes a multiplex bank at the given index. More...
 
kStatus GoSystem_Reset (GoSystem system, kBool wait)
 Reboots all connected sensors. More...
 
kStatus GoSystem_ScheduledStart (GoSystem system, k64s value)
 Starts all sensors that are currently in the ready state at a scheduled value. More...
 
kVersion GoSystem_SdkVersion ()
 Reports the Gocator firmware version that was built alongside this library. More...
 
GoSensor GoSystem_SensorAt (GoSystem system, kSize index)
 Gets the sensor object at the specified index. More...
 
kSize GoSystem_SensorCount (GoSystem system)
 Gets the number of sensors in the system. More...
 
kStatus GoSystem_SetAllDiscoveryInterface (GoSystem system, kBool enable)
 Enable or disable running the Gocator Discovery Protocol over all the host interfaces. More...
 
kStatus GoSystem_SetDataCapacity (GoSystem system, kSize capacity)
 Sets the maximum amount of memory that can be used to buffer received data messages. More...
 
kStatus GoSystem_SetDataHandler (GoSystem system, GoDataFx function, kPointer receiver)
 Sets a callback function that can be used to receive sensor data messages asynchronously. More...
 
kStatus GoSystem_SetHealthHandler (GoSystem system, GoDataFx function, kPointer receiver)
 Sets a callback function that can be used to receive sensor health messages asynchronously. More...
 
kStatus GoSystem_SetOneDiscoveryInterface (GoSystem system, kIpAddress *address, kBool enable)
 Enable or disable running the Gocator Discovery Protocol over the specified host interface with the given address. More...
 
kStatus GoSystem_Start (GoSystem system)
 Starts all sensors that are currently in the ready state. More...
 
kStatus GoSystem_StartAlignment (GoSystem system)
 Performs alignment for sensors in the ready state. More...
 
kStatus GoSystem_StartDiscovery (GoSystem system)
 Start running the Gocator Discovery Protocol to discover sensors. More...
 
kStatus GoSystem_StartExposureAutoSet (GoSystem system)
 Performs exposure auto set for sensors in the ready state. More...
 
kStatus GoSystem_Stop (GoSystem system)
 Stops all connected sensors. More...
 
kStatus GoSystem_Timestamp (GoSystem system, k64u *time)
 Gets the current time stamp from the sensor network. More...
 
kStatus GoSystem_UnlockState (GoSystem system)
 Unlock the system state to allow other threads to read/modify the GoSystem class's list of sensors. More...
 
kStatus GoSystem_UpdateAllMultiplexParameters (GoSystem system, k64f period)
 Automatically update the single multiplexing delay and period configuration for all sensors contained in all defined multiplex banks. More...
 
kStatus GoSystem_UpdateMultiplexDelay (GoSystem system)
 Automatically update the multiplexing single delay configuration for all sensors contained in all defined multiplex banks. More...
 
kStatus GoSystem_UpdateMultiplexPeriod (GoSystem system, k64f period)
 Automatically update the multiplexing single period configuration for all sensors contained in all defined multiplex banks. More...
 

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