#include <UDPSynchronizedServer.h>
Public Member Functions | |
| UDPSynchronizedServer (DBInterface *devDBInter, unsigned int neurGrpWidth) | |
| ~UDPSynchronizedServer () | |
| bool | closeDevice () |
| bool | openSocket (string addr, int pt) |
| bool | sendSpikeData () |
| void | setNeuronVector (vector< unsigned int > *neurVectPtr, unsigned int startNeurID) |
Private Member Functions | |
| UDPSynchronizedServer (const UDPSynchronizedServer &) | |
| UDPSynchronizedServer | operator= (const UDPSynchronizedServer &) |
| bool | simulationSynchronizationDelay () |
Private Attributes | |
| DBInterface * | deviceDBInterface |
| int | socketHandle |
| sockaddr_in | socketAddress |
| bool | socketOpen |
| unsigned int | neuronGrpWidth |
| unsigned int | startNeuronID |
| vector< unsigned int > * | neuronVectorPtr |
Definition at line 39 of file UDPSynchronizedServer.h.
|
||||||||||||
|
Constructor. Definition at line 39 of file UDPSynchronizedServer.cpp. References deviceDBInterface, neuronGrpWidth, and socketOpen. |
|
|
Destructor. Definition at line 52 of file UDPSynchronizedServer.cpp. References closeDevice(). |
|
|
Declare copy constructor private so it cannot be used inadvertently. |
|
|
Closes the socket. Definition at line 67 of file UDPSynchronizedServer.cpp. References socketHandle, and socketOpen. Referenced by DeviceManager::closeDevice(), and ~UDPSynchronizedServer(). |
|
||||||||||||
|
Opens the UDP socket. Adapted from: http://ntrg.cs.tcd.ie/undergrad/4ba2/multicast/antony/index.html. Definition at line 76 of file UDPSynchronizedServer.cpp. References socketAddress, socketHandle, socketOpen, and SpikeStreamSimulation::systemError(). Referenced by DeviceManager::loadDeviceInformation(). |
|
|
Declare assignment private so it cannot be used. |
|
|
Sends spike data to the receiving socket. Definition at line 97 of file UDPSynchronizedServer.cpp. References SimulationClock::getTimeStep(), neuronGrpWidth, neuronVectorPtr, SpikeStreamSimulation::simulationClock, simulationSynchronizationDelay(), socketAddress, socketHandle, socketOpen, startNeuronID, STEP_COUNTER_MAX, and SpikeStreamSimulation::systemError(). Referenced by DeviceManager::updateDevice(). |
|
||||||||||||
|
Passes a reference to the neuron vector in SpikeStreamSimulation to this class. This contains the ids of the currently firing neurons. Definition at line 179 of file UDPSynchronizedServer.cpp. References neuronVectorPtr, and startNeuronID. Referenced by DeviceManager::setNeuronVector(). |
|
|
Returns true if there is 1 or more entries in the synchronization delay database These entries indicate that another task is delaying itself to synchronize up with an external device. Definition at line 188 of file UDPSynchronizedServer.cpp. References deviceDBInterface, and SpikeStreamSimulation::systemError(). Referenced by sendSpikeData(). |
|
|
Reference to database handling class. Definition at line 53 of file UDPSynchronizedServer.h. Referenced by simulationSynchronizationDelay(), and UDPSynchronizedServer(). |
|
|
Width neuron group. Definition at line 65 of file UDPSynchronizedServer.h. Referenced by sendSpikeData(), and UDPSynchronizedServer(). |
|
|
Vector of currently firing neurons. Definition at line 71 of file UDPSynchronizedServer.h. Referenced by sendSpikeData(), and setNeuronVector(). |
|
|
Address of the socket. Definition at line 59 of file UDPSynchronizedServer.h. Referenced by openSocket(), and sendSpikeData(). |
|
|
Integer used to access the socket. Definition at line 56 of file UDPSynchronizedServer.h. Referenced by closeDevice(), openSocket(), and sendSpikeData(). |
|
|
Records whether socket is open. Definition at line 62 of file UDPSynchronizedServer.h. Referenced by closeDevice(), openSocket(), sendSpikeData(), and UDPSynchronizedServer(). |
|
|
First ID in neuron group. Definition at line 68 of file UDPSynchronizedServer.h. Referenced by sendSpikeData(), and setNeuronVector(). |
1.4.4