OSC-receive.c File Reference

#include "OSC-common.h"
#include "OSC-timetag.h"
#include "OSC-address-space.h"
#include "NetworkReturnAddress.h"
#include "OSC-receive.h"
#include "OSC-priority-queue.h"
#include "OSC-string-help.h"
#include "OSC-drop.h"
#include "OSC-dispatch.h"
#include <string.h>
#include "OSC-internal-messages.h"

Classes

struct  OSCPacketBuffer_struct
struct  queuedDataStruct

Defines

#define NOT_DISPATCHED_YET   ((callbackList) -1)
#define MIN_REASONABLE_RCV_BUFSIZE   128

Typedefs

typedef struct queuedDataStruct queuedData

Functions

static Boolean InitPackets (int receiveBufferSize, int clientAddrSize, int numReceiveBuffers)
static Boolean InitQueuedData (int numQueuedObjects)
static queuedDataAllocQD (void)
static void FreeQD (queuedData *qd)
static void CallWholeCallbackList (callbackList l, int argLength, void *args, OSCTimeTag when, NetworkReturnAddressPtr returnAddr)
static void InsertBundleOrMessage (char *buf, int n, OSCPacketBuffer packet, OSCTimeTag enclosingTimeTag)
static void ParseBundle (queuedData *qd)
static Boolean ParseMessage (queuedData *qd)
static void PacketAddRef (OSCPacketBuffer packet)
static void PacketRemoveRef (OSCPacketBuffer packet)
Boolean OSCInitReceive (struct OSCReceiveMemoryTuner *t)
char * OSCPacketBufferGetBuffer (OSCPacketBuffer p)
int * OSCPacketBufferGetSize (OSCPacketBuffer p)
int OSCGetReceiveBufferSize (void)
NetworkReturnAddressPtr OSCPacketBufferGetClientAddr (OSCPacketBuffer p)
OSCPacketBuffer OSCAllocPacketBuffer (void)
void OSCFreePacket (OSCPacketBuffer p)
void OSCAcceptPacket (OSCPacketBuffer packet)
Boolean OSCBeProductiveWhileWaiting (void)
Boolean OSCInvokeMessagesThatAreReady (OSCTimeTag now)
void OSCInvokeAllMessagesThatAreReady (OSCTimeTag now)
Boolean OSCSendInternalMessage (char *address, int arglen, void *args)
Boolean OSCSendInternalMessageWithRSVP (char *address, int arglen, void *args, NetworkReturnAddressPtr returnAddr)
Boolean OSCScheduleInternalMessages (OSCTimeTag when, int numMessages, char **addresses, int *arglens, void **args)

Variables

struct {
   OSCQueue   TheQueue
   OSCTimeTag   lastTimeTag
   Boolean   timePassed
   int   recvBufSize
   void *(*   InitTimeMalloc )(int numBytes)
   void *(*   RealTimeMemoryAllocator )(int numBytes)
globals
static struct
OSCPacketBuffer_struct
freePackets
static queuedDatafreeQDList

Define Documentation

#define NOT_DISPATCHED_YET   ((callbackList) -1)

#define MIN_REASONABLE_RCV_BUFSIZE   128

Referenced by InitPackets().


Typedef Documentation

typedef struct queuedDataStruct queuedData


Function Documentation

static Boolean InitPackets ( int  receiveBufferSize,
int  clientAddrSize,
int  numReceiveBuffers 
) [static]

static Boolean InitQueuedData ( int  numQueuedObjects  )  [static]

References FALSE, globals, queuedDataStruct::nextFree, and TRUE.

Referenced by OSCInitReceive().

static queuedData * AllocQD ( void   )  [static]

static void FreeQD ( queuedData qd  )  [static]

static void CallWholeCallbackList ( callbackList  l,
int  argLength,
void *  args,
OSCTimeTag  when,
NetworkReturnAddressPtr  returnAddr 
) [static]

static void InsertBundleOrMessage ( char *  buf,
int  n,
OSCPacketBuffer  packet,
OSCTimeTag  enclosingTimeTag 
) [static]

static void ParseBundle ( queuedData qd  )  [static]

static Boolean ParseMessage ( queuedData qd  )  [static]

static void PacketAddRef ( OSCPacketBuffer  packet  )  [static]

static void PacketRemoveRef ( OSCPacketBuffer  packet  )  [static]

Boolean OSCInitReceive ( struct OSCReceiveMemoryTuner t  ) 

char* OSCPacketBufferGetBuffer ( OSCPacketBuffer  p  ) 

References OSCPacketBuffer_struct::buf.

Referenced by receiveOSCPacket().

int* OSCPacketBufferGetSize ( OSCPacketBuffer  p  ) 

References OSCPacketBuffer_struct::n.

Referenced by receiveOSCPacket().

int OSCGetReceiveBufferSize ( void   ) 

References globals.

Referenced by OSCScheduleInternalMessages(), and receiveOSCPacket().

NetworkReturnAddressPtr OSCPacketBufferGetClientAddr ( OSCPacketBuffer  p  ) 

OSCPacketBuffer OSCAllocPacketBuffer ( void   ) 

void OSCFreePacket ( OSCPacketBuffer  p  ) 

void OSCAcceptPacket ( OSCPacketBuffer  packet  ) 

Boolean OSCBeProductiveWhileWaiting ( void   ) 

Boolean OSCInvokeMessagesThatAreReady ( OSCTimeTag  now  ) 

void OSCInvokeAllMessagesThatAreReady ( OSCTimeTag  now  ) 

Boolean OSCSendInternalMessage ( char *  address,
int  arglen,
void *  args 
)

Boolean OSCSendInternalMessageWithRSVP ( char *  address,
int  arglen,
void *  args,
NetworkReturnAddressPtr  returnAddr 
)

Boolean OSCScheduleInternalMessages ( OSCTimeTag  when,
int  numMessages,
char **  addresses,
int *  arglens,
void **  args 
)


Variable Documentation

Boolean timePassed

void*(* InitTimeMalloc)(int numBytes)

void*(* RealTimeMemoryAllocator)(int numBytes)

struct { ... } globals


Generated on Thu Sep 17 23:14:16 2009 for CSL by  doxygen 1.5.8