# LLRP_SConnection Struct Reference

Structure of an LLRP connection instance. More...

`#include <ltkc_connection.h>`

List of all members.

## Public Attributes

int | fd
const char * | pConnectErrorStr
const LLRP_tSTypeRegistry * | pTypeRegistry
LLRP_tSMessage * | pInputQueue
unsigned int | nBufferSize
struct {
unsigned char * pBuffer
unsigned int nBuffer
int bFrameValid
LLRP_tSFrameExtract FrameExtract
LLRP_tSErrorDetails ErrorDetails
} | Recv
struct {
unsigned char * pBuffer
unsigned int nBuffer
LLRP_tSErrorDetails ErrorDetails
} | Send

## Detailed Description

Structure of an LLRP connection instance.

An LLRP connection consists of:

- A file descriptor (fd) likely, but not necessarily, a socket
- An input queue of messages already received. Used to hold asynchronous messages while awaiting a response.
- Receiver state.
  - The receive buffer and count
  - Whether a frame is valid. Valid means that the receive buffer holds a frame and the MessageLength, MessageType, ProtocolVersion, and MessageID are valid (usable). Not valid with a nBuffer greater than 0 means that a frame is being received. Sometimes we want to look at the frame after it has been (or attempted to be) decoded.
  - Top-level frame variables: tSFrameExtract
  - Details of the last receiver error, including I/O errors, end-of-file (EOF), timeout, or decode errors.
- Send state
  - The send buffer and count
  - Details of the last send error, including I/O errors, or encode errors.

## Member Data Documentation

int LLRP_SConnection::bFrameValid

Valid boolean. TRUE means the buffer and frame summary variables are valid (usable). This is always FALSE mid receive

LLRP_tSErrorDetails LLRP_SConnection::ErrorDetails

Details of last I/O or decoder error.

Details of last I/O or encoder error.

int LLRP_SConnection::fd

The file descriptor, probably a socket

LLRP_tSFrameExtract LLRP_SConnection::FrameExtract

Frame summary variables. Derived by LLRP_FrameExtract()

unsigned int LLRP_SConnection::nBuffer

Count of bytes currently in buffer

Count of bytes currently in buffer (from last send)

unsigned int LLRP_SConnection::nBufferSize

Size of the send/recv buffers, below, specified at construct() time

unsigned char* LLRP_SConnection::pBuffer

The buffer. Contains incomming frame.

The buffer. Contains outgoing frame.

const char* LLRP_SConnection::pConnectErrorStr

Error message if openConnectionToReader() or close...() fail

LLRP_tSMessage* LLRP_SConnection::pInputQueue

Head of queue of messages already received. Probably events. the queue is a one-way, NULL terminated linked list.

const LLRP_tSTypeRegistry* LLRP_SConnection::pTypeRegistry

The registry to consult for message/parameter types during decode.

struct { ... } LLRP_SConnection::Recv

Receive state

struct { ... } LLRP_SConnection::Send

Send state

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

- ltkc_win32/inc/ltkc_connection.h