AttCS3310 Relacs Plugins  0.9.8
Public Member Functions | List of all members
CS3310NIDIO Class Reference

#include <cs3310nidio.h>

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

Public Member Functions

 CS3310NIDIO (const string &device)
 
 CS3310NIDIO (NIDIO *nidio)
 
 CS3310NIDIO (void)
 
virtual ~CS3310NIDIO (void)
 
virtual int open (const string &device) override
 
virtual int open (NIDIO &nidio) override
 
virtual int open (Device &device) override
 
virtual bool isOpen (void) const
 
virtual void close (void)
 
virtual const Optionssettings (void) const
 
virtual int lines (void) const
 
virtual double minLevel (void) const
 
virtual double maxLevel (void) const
 
virtual void levels (vector< double > &l) const
 
virtual int attenuate (int di, double &decibel)
 
virtual int testAttenuate (int di, double &decibel)
 
int setZeroCrossing (bool enable=true)
 
int setMute (bool mute=true)
 
int calibrate (void)
 
- Public Member Functions inherited from Attenuator
 Attenuator (void)
 
 Attenuator (const string &deviceclass)
 
virtual ~Attenuator (void)
 
virtual int mute (int di)
 
virtual int testMute (int di)
 

Additional Inherited Members

- Static Public Attributes inherited from Attenuator
static const double MuteAttenuationLevel
 
static const int Underflow
 
static const int Overflow
 
- Protected Member Functions inherited from Attenuator
void setInfo (void)
 

Detailed Description

[Attenuator] Control the cs3310 attenuator via the nieseries/nidio software timed digital IO

Author
Jan Benda
Version
1.1
Note
This plugin is as obsolete as the plugins from the nieseries plugin set.
Technicals by Hartmut Schuetze

Module for the programming of the CS 3310 attenuator chip, connected to the parallel port. this connection has the great advantage that one can use the status bit and several data bits to supply the necessary signals to the chip. First, the CS-signal (Pin 14 SPP, Pin 2 chip) has to be set low to adress the chip. Then, the data are presented at the D0 Pin (dataport 0 / pin 2 of the SPP, Pin 3 on the chip), and are strobed via the SCLK-Signal (Pin 1 SPP, Pin 6 chip) into the chip. repeat this for all the bits we want to transfer. After this, we wait a little before we reset the CS-signal back to high. Attention: the strobe bit and the status bit 1 are inverted at the SPP!. The timing we use here could perhaps be faster, but the 2 meters of parallel cable make the signal flanks look really sloppy, then.. nevertheless, these signals are recognised by the chip from their rising slopes (rising flank, not level triggering), so this should be no problem... anyway, we have time enough. The MUTE-signal mutes the chip (.. who would have guessed...?), but without changing the set attenuation. it is active when Pin 8 is LOW. Additionally, if you leave MUTE\ low for more than 2 ms, the CS 3310 recalibrates itself. :-) The ZCEN-signal means zero crossing detection enable, and does exactly this. If it is set, the chip waits for the next zero crossing of the signal before changing to the new attenuation. This reduces clicking (for you HiFi-proffesionals out there...), and is a really elegant feature. If there are no zero crossing, the setting changes are forced after 18 ms.

Constructor & Destructor Documentation

CS3310NIDIO ( const string &  device)

References CS3310NIDIO::open().

CS3310NIDIO ( NIDIO *  nidio)

References CS3310NIDIO::open().

CS3310NIDIO ( void  )
~CS3310NIDIO ( void  )
virtual

Member Function Documentation

int open ( const string &  device)
overridevirtual

Reimplemented from Attenuator.

References CS3310NIDIO::open().

Referenced by CS3310NIDIO::CS3310NIDIO(), and CS3310NIDIO::open().

int open ( NIDIO &  nidio)
overridevirtual
int open ( Device device)
overridevirtual

Reimplemented from Attenuator.

References CS3310NIDIO::open().

bool isOpen ( void  ) const
virtual
void close ( void  )
virtual

Implements Attenuator.

References CS3310NIDIO::isOpen().

const Options & settings ( void  ) const
virtual

Returns the current settings of the attenuator.

int lines ( void  ) const
virtual

Returns the number of output lines the attenuator device supports.

Implements Attenuator.

double minLevel ( void  ) const
virtual

Returns the minimum possible attenuation level in decibel. This number can be negative, indicating amplification.

Implements Attenuator.

double maxLevel ( void  ) const
virtual

Returns the maximum possible attenuation level in decibel.

Implements Attenuator.

void levels ( vector< double > &  l) const
virtual

Returns in l all possible attenuation levels sorted by increasing attenuation levels (highest last).

Implements Attenuator.

int attenuate ( int  di,
double &  decibel 
)
virtual
int testAttenuate ( int  di,
double &  decibel 
)
virtual
int setZeroCrossing ( bool  enable = true)

References CS3310NIDIO::isOpen().

int setMute ( bool  mute = true)

References CS3310NIDIO::isOpen().

int calibrate ( void  )

References CS3310NIDIO::isOpen().


The documentation for this class was generated from the following files: