Yate
|
A group of analog lines. More...
#include <yatesig.h>
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 |
ObjList & | lines () |
AnalogLineGroup * | fxo () |
bool | slave () |
bool | appendLine (AnalogLine *line, bool destructOnFail=true) |
void | removeLine (unsigned int cic) |
void | removeLine (AnalogLine *line) |
AnalogLine * | findLine (unsigned int cic) |
AnalogLine * | findLine (const String &address) |
virtual AnalogLineEvent * | getEvent (const Time &when) |
Protected Member Functions | |
virtual void | destroyed () |
Protected Attributes | |
ObjList | m_lines |
A group of analog lines.
This class is an analog line container. It may contain another group when used to monitor analog lines
AnalogLineGroup | ( | AnalogLine::Type | type, |
const char * | name, | ||
bool | slave = false |
||
) |
Constructor. Construct an analog line group owning single lines
type | Line type as enumeration |
name | Name of this component |
slave | True 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)
name | Name of this component |
fxo | The FXO group |
virtual ~AnalogLineGroup | ( | ) | [virtual] |
Destructor
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
line | The line to append |
destructOnFail | Destroy line if failed to append. Defaults to true |
virtual void destroyed | ( | ) | [protected, virtual] |
Remove all lines. Release object
Reimplemented from SignallingCircuitGroup.
AnalogLine* findLine | ( | unsigned int | cic | ) |
Find a line by its circuit
cic | The signalling circuit's code used by the line |
AnalogLine* findLine | ( | const String & | address | ) |
Find a line by its address
address | The address of the line |
AnalogLineGroup* fxo | ( | ) | [inline] |
Get the group holding the FXO lines if present
virtual AnalogLineEvent* getEvent | ( | const Time & | when | ) | [virtual] |
Iterate through the line list to get an event
when | The current time |
Get the analog lines belonging to this group
void removeLine | ( | unsigned int | cic | ) |
Remove a line from the list and destruct it
cic | The signalling circuit's code used by the line |
void removeLine | ( | AnalogLine * | line | ) |
Remove a line from the list without destroying it
line | The line to be removed |
bool slave | ( | ) | [inline] |
Check if this is an FXO group owned by an FXS one
AnalogLine::Type type | ( | ) | const [inline] |
Get this group's type