Main Page | Namespace List | Alphabetical List | Class List | Directories | File List | Class Members | File Members

UDPSynchronizedClient.cpp File Reference

#include "UDPSynchronizedClient.h"
#include "SpikeStreamSimulation.h"
#include <pthread.h>
#include <errno.h>
#include <math.h>

Go to the source code of this file.

Defines

#define MESSAGE_BUFFER_SIZE   1048576
#define SPIKE_BUFFER_SIZE   60000
#define STEP_COUNTER_MAX   32768
#define MAX_EXTERNAL_COMPUTE_TIME_US   500000

Functions

void * startThreadFunction (void *udpSyncClient)

Variables

pthread_mutex_t threadMutex = PTHREAD_MUTEX_INITIALIZER


Define Documentation

#define MAX_EXTERNAL_COMPUTE_TIME_US   500000
 

Maximum time that we will slow down to accommodate external device when no messages have been received.

Definition at line 54 of file UDPSynchronizedClient.cpp.

Referenced by UDPSynchronizedClient::getExternalComputeTime_us().

#define MESSAGE_BUFFER_SIZE   1048576
 

Size of the receive buffer used to unpack spikes from the network.

Definition at line 42 of file UDPSynchronizedClient.cpp.

#define SPIKE_BUFFER_SIZE   60000
 

Size of the array used to store received spikes. This has enough space for more than 5000 spikes, each of which takes 12 bytes to store.

Definition at line 47 of file UDPSynchronizedClient.cpp.

#define STEP_COUNTER_MAX   32768
 

Step counter is a 15 bit number whose max value is defined here.

Definition at line 50 of file UDPSynchronizedClient.cpp.

Referenced by UDPSynchronizedClient::run(), and UDPSynchronizedServer::sendSpikeData().


Function Documentation

void* startThreadFunction void *  udpSyncClient  ) 
 

Function that thread for this class calls when it starts running This function calls the run method of the class.

Definition at line 64 of file UDPSynchronizedClient.cpp.

Referenced by UDPSynchronizedClient::start().


Variable Documentation

pthread_mutex_t threadMutex = PTHREAD_MUTEX_INITIALIZER
 

Have to define mutex here because of define that is used to initialise it.

Definition at line 59 of file UDPSynchronizedClient.cpp.

Referenced by UDPSynchronizedClient::lockMutex(), UDPSynchronizedClient::run(), and UDPSynchronizedClient::unlockMutex().


Generated on Mon Sep 3 22:24:34 2007 for SpikeStream Simulation by  doxygen 1.4.4