Yate
Public Member Functions | Protected Member Functions | Protected Attributes
AnalogLineGroup Class Reference

A group of analog lines. More...

#include <yatesig.h>

Inheritance diagram for AnalogLineGroup:
SignallingCircuitGroup SignallingComponent Mutex RefObject DebugEnabler Lockable GenObject

List of all members.

Public Member Functions

 AnalogLineGroup (AnalogLine::Type type, const char *name, bool slave=false)
 AnalogLineGroup (const char *name, AnalogLineGroup *fxo)
virtual ~AnalogLineGroup ()
AnalogLine::Type type () const
ObjListlines ()
AnalogLineGroupfxo ()
bool slave ()
bool appendLine (AnalogLine *line, bool destructOnFail=true)
void removeLine (unsigned int cic)
void removeLine (AnalogLine *line)
AnalogLinefindLine (unsigned int cic)
AnalogLinefindLine (const String &address)
virtual AnalogLineEventgetEvent (const Time &when)

Protected Member Functions

virtual void destroyed ()

Protected Attributes

ObjList m_lines

Detailed Description

A group of analog lines.

This class is an analog line container. It may contain another group when used to monitor analog lines


Constructor & Destructor Documentation

AnalogLineGroup ( AnalogLine::Type  type,
const char *  name,
bool  slave = false 
)

Constructor. Construct an analog line group owning single lines

Parameters:
typeLine type as enumeration
nameName of this component
slaveTrue if this is an FXO group owned by an FXS one. Ignored if type is not FXO
AnalogLineGroup ( const char *  name,
AnalogLineGroup fxo 
)

Constructor. Construct an FXS analog line group owning another group of FXO analog lines. The fxo group is owned by this component and will be destructed if invalid (not FXO type)

Parameters:
nameName of this component
fxoThe FXO group
virtual ~AnalogLineGroup ( ) [virtual]

Destructor


Member Function Documentation

bool appendLine ( AnalogLine line,
bool  destructOnFail = true 
)

Append a line to this group. Line must have the same type as this group and must be owned by this group

Parameters:
lineThe line to append
destructOnFailDestroy line if failed to append. Defaults to true
Returns:
True on success
virtual void destroyed ( ) [protected, virtual]

Remove all lines. Release object

Reimplemented from SignallingCircuitGroup.

AnalogLine* findLine ( unsigned int  cic)

Find a line by its circuit

Parameters:
cicThe signalling circuit's code used by the line
Returns:
AnalogLine pointer or 0 if not found
AnalogLine* findLine ( const String address)

Find a line by its address

Parameters:
addressThe address of the line
Returns:
AnalogLine pointer or 0 if not found
AnalogLineGroup* fxo ( ) [inline]

Get the group holding the FXO lines if present

Returns:
The group holding the FXO lines or 0
virtual AnalogLineEvent* getEvent ( const Time when) [virtual]

Iterate through the line list to get an event

Parameters:
whenThe current time
Returns:
AnalogLineEvent pointer or 0 if no events
ObjList& lines ( ) [inline]

Get the analog lines belonging to this group

Returns:
The group's lines list
void removeLine ( unsigned int  cic)

Remove a line from the list and destruct it

Parameters:
cicThe signalling circuit's code used by the line
void removeLine ( AnalogLine line)

Remove a line from the list without destroying it

Parameters:
lineThe line to be removed
bool slave ( ) [inline]

Check if this is an FXO group owned by an FXS one

Returns:
True if this is an FXO group owned by an FXS one
AnalogLine::Type type ( ) const [inline]

Get this group's type

Returns:
The group's type

Member Data Documentation

ObjList m_lines [protected]

The analog lines belonging to this group


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