/**************************************************************************

	Synapse.h												   JJS 10/01/95
	
		part of CONICAL, the Computational Neuroscience Class Library
	
	A synapse is a channel whose conductance depends on the concentration
	of neurotransmitter in the synaptic cleft, which in turn depends on
	the presynaptic membrane potential.  This class defines a member
	variable "Lconc" which is the concentration of ligand (i.e. neuro-
	transmitter) in the cleft.  Its value should be updated in the Step(dt)
	method.  In this class, Lconc takes the shape of a square pulse, with
	amplitude 1 and ending pulseTime after V drops below Vthresh.

	This class also defines a Vthresh variable, which may be used (by
	derived classes) as the threshold voltage for neurotransmitter release,
	and pulseTime, which defines the duration of a transmitter pulse.  The
	exact use and meaning of these variables may vary.

	Requires:
		Channel			-- base class
		
**************************************************************************/

#ifndef SYNAPSE_H
#define SYNAPSE_H

#include "Channel.h"

class Synapse : public Channel
{
  public:

	Synapse( VSink *pTo, VSource *pComp, real pMaxG=0.1 )		// constructor
	: Channel( pTo, pComp, pMaxG ), t(0), Lconc(0), Vthresh(0), pulseTime(1) {}
	
	virtual void Step( const real dt );		// update L

	// public variables
	
	real Lconc;			// concentration of ligand (neurotransmitter)
	real Vthresh;		// presynaptic V threshold for transmitter release
	real pulseTime;		// duration of a transmitter pulse

  protected:

	real t;				// time since itsComp->GetV() > Vthresh
};

#endif
