Gocator API

- Home
- Categories
- Types
- Files

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

## Description

Represents a data/health receiver.

Inherits kObject.

## Public Member Functions
kStatus | GoReceiver_Close (GoReceiver receiver)
| Closes the data connection. More...
kStatus | GoReceiver_Construct (GoReceiver *receiver, kAlloc allocator)
| Constructs a GoReceiver object. More...
kBool | GoReceiver_IsOpen (GoReceiver receiver)
| Reports whether the receiver object has been opened. More...
kStatus | GoReceiver_Open (GoReceiver receiver, kIpAddress address, k32u port)
| Opens a data connection to the specified sensor IP address and port. More...
kStatus | GoReceiver_SetBuffers (GoReceiver receiver, kSSize socketSize, kSSize clientSize)
| Sets the size of buffers used for receiving data. More...
kStatus | GoReceiver_SetCancelHandler (GoReceiver receiver, kCallbackFx function, kPointer context)
| Sets an I/O cancellation query handler for this receiver object. More...
kStatus | GoReceiver_SetMessageHandler (GoReceiver receiver, GoReceiverMessageFx function, kPointer context)
| Sets a callback function that can be used to receive notifications when data is available to be read. More...

## Member Function Documentation

kStatus GoReceiver_Close | ( | GoReceiver | receiver | ) |

Closes the data connection.

Parameters

  receiver | Receiver object.

Returns
  Operation status.

kStatus GoReceiver_Construct | ( | GoReceiver * | receiver,
|  | kAlloc | allocator
| ) |  |

Constructs a GoReceiver object.

Parameters

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

Returns
  Operation status.

kBool GoReceiver_IsOpen | ( | GoReceiver | receiver | ) |

Reports whether the receiver object has been opened.

Parameters

  receiver | Receiver object.

Returns
  kTRUE if open; kFALSE otherwise.

kStatus GoReceiver_Open | ( | GoReceiver | receiver,
|  | kIpAddress | address,
|  | k32u | port
| ) |  |

Opens a data connection to the specified sensor IP address and port.

Parameters

  receiver | Receiver object.
  address | Sensor IP address.
  port | Sensor data port.

Returns
  Operation status.

kStatus GoReceiver_SetBuffers | ( | GoReceiver | receiver,
|  | kSSize | socketSize,
|  | kSSize | clientSize
| ) |  |

Sets the size of buffers used for receiving data.

Call this function before calling GoReceiver_Open.

Parameters

  receiver | Receiver object.
  socketSize | Size of the read buffer used by the underlying operating system socket (-1 to leave unchanged).
  clientSize | Size of the read buffer used by the receiver object (-1 to leave unchanged).

Returns
  Operation status.

kStatus GoReceiver_SetCancelHandler | ( | GoReceiver | receiver,
|  | kCallbackFx | function,
|  | kPointer | context
| ) |  |

Sets an I/O cancellation query handler for this receiver object.

The I/O cancellation query handler will be polled periodically when I/O is blocked for a non-negligible amount of time. If the cancellation handler returns kERROR_ABORT, ongoing communication will be terminated.

Parameters

  receiver | Receiver object.
  function | I/O cancellation callback function (or kNULL to unregister).
  context | Context argument for callback (function receiver).

Returns
  Operation status.

kStatus GoReceiver_SetMessageHandler | ( | GoReceiver | receiver,
|  | GoReceiverMessageFx | function,
|  | kPointer | context
| ) |  |

Sets a callback function that can be used to receive notifications when data is available to be read.

Parameters

  receiver | Receiver object.
  function | Data callback function (or kNULL to unregister).
  context | Context argument for callback (function receiver).

Returns
  Operation status.

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

- Internal/GoReceiver.h