StimListenerDML Class Reference

a class to control communication with the Rex experimental control system More...

#include <Psycho/StimListener.H>

Inheritance diagram for StimListenerDML:
Inheritance graph
[legend]
Collaboration diagram for StimListenerDML:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

StimListenerDML::StimListenerDML ( unsigned char  exitcode = '0',
const unsigned  char[] = "1\0" 
)

constructor

StimListenerDML::~StimListenerDML (  )  [virtual]

destructor

Definition at line 125 of file StimListener.C.


Member Function Documentation

const char * StimListenerDML::jobType (  )  const [virtual]

return the job name

Reimplemented from StimListener.

Definition at line 338 of file StimListener.C.

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]

clean things up

Reimplemented from StimListener.

Definition at line 194 of file StimListener.C.


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:25:56 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3