a class to control communication with the Rex experimental control system More...
#include <Psycho/StimListener.H>
Public Member Functions | |
StimListenerDML (unsigned char exitcode= '0', const unsigned char[]="1\0") | |
constructor | |
virtual | ~StimListenerDML () |
destructor | |
bool | sendMessage (const unsigned char *msg) |
send a message back to the host using a UDP packet | |
bool | listen () |
listen for codes, which are UDP packets, usually 2-4 bytes long | |
void | setHostName (const std::string hostname) |
set the host name | |
void | start () |
get our component going and do pre-listening stuff | |
void | stop () |
clean things up | |
const char * | jobType () const |
return the job name |
a class to control communication with the Rex experimental control system
A derived class of StimulusListener to support comunication with the Rex experimental control system, which is a standard tool in electrophysiology labs. This system is designed to recieve UPD packets from Rex that indicate the stimulus to be drawn. The packets contain 1 byte for the stimulus primitive type (e.g. circle), and several bytes for the stimulus parameters (e.g. size, color).
Definition at line 130 of file StimListener.H.
StimListenerDML::StimListenerDML | ( | unsigned char | exitcode = '0' , |
|
const unsigned | char[] = "1\0" | |||
) |
constructor
StimListenerDML::~StimListenerDML | ( | ) | [virtual] |
destructor
Definition at line 125 of file StimListener.C.
const char * StimListenerDML::jobType | ( | ) | const [virtual] |
bool StimListenerDML::listen | ( | ) | [virtual] |
listen for codes, which are UDP packets, usually 2-4 bytes long
Implements StimListener.
Definition at line 243 of file StimListener.C.
References StimListener::addData(), and StimListener::pushEvent().
bool StimListenerDML::sendMessage | ( | const unsigned char * | msg | ) | [virtual] |
send a message back to the host using a UDP packet
Implements StimListener.
Definition at line 211 of file StimListener.C.
References StimListener::pushEvent().
void StimListenerDML::setHostName | ( | const std::string | hostname | ) |
set the host name
If set the listener will only accept packets from a specific host. Additionally, messages will be sent specifically to this host. If no host is set packets will be accepted by anyone, and status messages will be sent back to the last sender (Not gaurnteed on all systems). In most cases the host should be set to avoid problems with some systems not supplying the packet senders address and erroring on sendMessage() and sendOK()
Definition at line 310 of file StimListener.C.
References StimListener::pushEvent(), and sformat().
void StimListenerDML::start | ( | ) | [virtual] |
get our component going and do pre-listening stuff
Reimplemented from StimListener.
Definition at line 133 of file StimListener.C.
References StimListener::pushEvent(), and sformat().
void StimListenerDML::stop | ( | ) | [virtual] |