drumstick  1.1.2
TimerId Class Reference

ALSA Timer identifier container. More...

#include <alsatimer.h>

Public Member Functions

 TimerId ()
 Constructor.
 
 TimerId (const TimerId &other)
 Copy constructor. More...
 
 TimerId (const snd_timer_id_t *other)
 Constructor. More...
 
 TimerId (int cls, int scls, int card, int dev, int sdev)
 Constructor. More...
 
virtual ~TimerId ()
 Destructor.
 
TimerIdclone ()
 Copy the object. More...
 
TimerIdoperator= (const TimerId &other)
 Assignment operator. More...
 
int getSizeOfInfo () const
 Gets the size of the ALSA timer ID object. More...
 
void setClass (int devclass)
 Set the class identifier. More...
 
int getClass ()
 Gets the class identifier. More...
 
void setSlaveClass (int devsclass)
 Sets the Slave class. More...
 
int getSlaveClass ()
 Gets the slave class. More...
 
void setCard (int card)
 Sets the card number. More...
 
int getCard ()
 Gets the card number. More...
 
void setDevice (int device)
 Sets the device number. More...
 
int getDevice ()
 Gets the device number. More...
 
void setSubdevice (int subdevice)
 Sets the subdevice number. More...
 
int getSubdevice ()
 Gets the subdevice number. More...
 

Detailed Description

ALSA Timer identifier container.

This class provides an unique identifier for a Timer.

Examples:
sysinfo.cpp.

Definition at line 78 of file alsatimer.h.

Constructor & Destructor Documentation

◆ TimerId() [1/3]

TimerId ( const TimerId other)

Copy constructor.

Parameters
otherExisting TimerId object reference

Definition at line 255 of file alsatimer.cpp.

References TimerId::getCard(), TimerId::getDevice(), TimerId::getSubdevice(), TimerId::setCard(), TimerId::setDevice(), and TimerId::setSubdevice().

◆ TimerId() [2/3]

TimerId ( const snd_timer_id_t *  other)

Constructor.

Parameters
otherALSA timer ID object pointer

Definition at line 239 of file alsatimer.cpp.

References TimerId::getCard(), TimerId::getDevice(), TimerId::getSubdevice(), TimerId::setCard(), TimerId::setDevice(), and TimerId::setSubdevice().

◆ TimerId() [3/3]

TimerId ( int  cls,
int  scls,
int  card,
int  dev,
int  sdev 
)

Constructor.

Parameters
clsClass
sclsSubclass
cardCard
devDevice
sdevSubdevice

Definition at line 275 of file alsatimer.cpp.

References TimerId::setCard(), TimerId::setClass(), TimerId::setDevice(), TimerId::setSlaveClass(), and TimerId::setSubdevice().

Member Function Documentation

◆ clone()

TimerId * clone ( )

Copy the object.

Returns
Pointer to the new object

Definition at line 298 of file alsatimer.cpp.

References TimerId::TimerId().

◆ getCard()

int getCard ( )

Gets the card number.

Returns
Card number

Definition at line 383 of file alsatimer.cpp.

Referenced by TimerId::operator=(), and TimerId::TimerId().

◆ getClass()

int getClass ( )

Gets the class identifier.

Returns
Class identifier
See also
setClass()

Definition at line 343 of file alsatimer.cpp.

Referenced by TimerQuery::readTimers().

◆ getDevice()

int getDevice ( )

Gets the device number.

Returns
Device number

Definition at line 403 of file alsatimer.cpp.

Referenced by TimerId::operator=(), and TimerId::TimerId().

◆ getSizeOfInfo()

int getSizeOfInfo ( ) const

Gets the size of the ALSA timer ID object.

Returns
Size of the ALSA object

Definition at line 433 of file alsatimer.cpp.

◆ getSlaveClass()

int getSlaveClass ( )

Gets the slave class.

Returns
Slave class

Definition at line 363 of file alsatimer.cpp.

◆ getSubdevice()

int getSubdevice ( )

Gets the subdevice number.

Returns
Subdevice number

Definition at line 423 of file alsatimer.cpp.

Referenced by TimerId::operator=(), and TimerId::TimerId().

◆ operator=()

TimerId & operator= ( const TimerId other)

Assignment operator.

Parameters
otherExisting TimerId object reference
Returns
This object

Definition at line 309 of file alsatimer.cpp.

References TimerId::getCard(), TimerId::getDevice(), TimerId::getSubdevice(), TimerId::setCard(), TimerId::setDevice(), and TimerId::setSubdevice().

◆ setCard()

void setCard ( int  card)

Sets the card number.

Parameters
cardCard number

Definition at line 373 of file alsatimer.cpp.

Referenced by TimerId::operator=(), and TimerId::TimerId().

◆ setClass()

void setClass ( int  devclass)

Set the class identifier.

Existing classes:

  • SND_TIMER_CLASS_SLAVE: slave timer
  • SND_TIMER_CLASS_GLOBAL: global timer
  • SND_TIMER_CLASS_CARD: card timer
  • SND_TIMER_CLASS_PCM: PCM timer
Parameters
devclassClass identifier.

Definition at line 332 of file alsatimer.cpp.

Referenced by TimerId::TimerId().

◆ setDevice()

void setDevice ( int  device)

Sets the device number.

Parameters
deviceDevice number

Definition at line 393 of file alsatimer.cpp.

Referenced by TimerId::operator=(), and TimerId::TimerId().

◆ setSlaveClass()

void setSlaveClass ( int  devsclass)

Sets the Slave class.

Parameters
devsclassSlave class

Definition at line 353 of file alsatimer.cpp.

Referenced by TimerId::TimerId().

◆ setSubdevice()

void setSubdevice ( int  subdevice)

Sets the subdevice number.

Parameters
subdeviceSubdevice number

Definition at line 413 of file alsatimer.cpp.

Referenced by TimerId::operator=(), and TimerId::TimerId().


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