|
Yate
|
Group of data circuits used by signalling. More...
#include <yatesig.h>
Public Types | |
| enum | Strategy { Other = 0, Increment = 0x0001, Decrement = 0x0002, Lowest = 0x0003, Highest = 0x0004, Random = 0x0005, OnlyEven = 0x1000, OnlyOdd = 0x2000, Fallback = 0x4000 } |
Public Member Functions | |
| SignallingCircuitGroup (unsigned int base=0, int strategy=Increment, const char *name="circgroup") | |
| virtual | ~SignallingCircuitGroup () |
| unsigned int | count () const |
| unsigned int | base () const |
| unsigned int | last () const |
| int | strategy () const |
| void | setStrategy (int strategy) |
| ObjList & | circuits () |
| void | getCicList (String &dest) |
| bool | insert (SignallingCircuit *circuit) |
| void | remove (SignallingCircuit *circuit) |
| SignallingCircuitSpan * | buildSpan (const String &name, unsigned int start=0, NamedList *params=0) |
| bool | insertSpan (SignallingCircuitSpan *span) |
| void | insertRange (SignallingCircuitSpan *span, const char *name, int strategy=-1) |
| void | insertRange (const String &range, const char *name, int strategy=-1) |
| void | removeSpan (SignallingCircuitSpan *span, bool delCics=true, bool delSpan=false) |
| void | removeSpanCircuits (SignallingCircuitSpan *span) |
| SignallingCircuit * | find (unsigned int cic, bool local=false) |
| SignallingCircuitRange * | findRange (const char *name) |
| SignallingCircuit::Status | status (unsigned int cic) |
| bool | status (unsigned int cic, SignallingCircuit::Status newStat, bool sync=false) |
| SignallingCircuit * | reserve (int checkLock=-1, int strategy=-1, SignallingCircuitRange *range=0) |
| SignallingCircuit * | reserve (const String &list, bool mandatory, int checkLock=-1, int strategy=-1, SignallingCircuitRange *range=0) |
| bool | release (SignallingCircuit *cic, bool sync=false) |
Static Public Member Functions | |
| static int | str2strategy (const char *name, int def=Increment) |
Static Public Attributes | |
| static const TokenDict | s_strategy [] |
Protected Member Functions | |
| virtual void | destroyed () |
Friends | |
| class | SignallingCircuit |
| class | SignallingCallControl |
| class | SS7ISUP |
| class | ISDNQ931 |
Group of data circuits used by signalling.
Interface to a stateful group of voice/data circuits
| enum Strategy |
Circuit allocation strategy
| SignallingCircuitGroup | ( | unsigned int | base = 0, |
| int | strategy = Increment, |
||
| const char * | name = "circgroup" |
||
| ) |
Constructor, creates a group with a specific base code
| base | Base of identification codes for this group |
| strategy | Default strategy used for circuit allocation |
| name | Name of this component |
| virtual ~SignallingCircuitGroup | ( | ) | [virtual] |
Destructor
| unsigned int base | ( | ) | const [inline] |
Get the base of identification codes for this group
| SignallingCircuitSpan* buildSpan | ( | const String & | name, |
| unsigned int | start = 0, |
||
| NamedList * | params = 0 |
||
| ) |
Create a circuit span using the factory
| name | Name of the span to create |
| start | Desired start of circuit codes in span |
| params | Optional parameters for creation of span and circuits |
| unsigned int count | ( | ) | const [inline] |
Get the number of circuits in this group
| virtual void destroyed | ( | ) | [inline, protected, virtual] |
Remove all spans and circuits. Release object
Reimplemented from SignallingComponent.
Reimplemented in AnalogLineGroup.
References SignallingComponent::destroyed().
| SignallingCircuit* find | ( | unsigned int | cic, |
| bool | local = false |
||
| ) |
Find a specific circuit by its identification code
| cic | Circuit Identification Code |
| local | Interpret the cic parameter as group-local code |
| SignallingCircuitRange* findRange | ( | const char * | name | ) |
Find a range of circuits owned by this group
| name | The range name to find |
| void getCicList | ( | String & | dest | ) |
Create a comma separated list with this group's circuits
| dest | The destination string |
| bool insert | ( | SignallingCircuit * | circuit | ) |
Insert a circuit in the group
| circuit | Pointer to the circuit to insert |
| void insertRange | ( | SignallingCircuitSpan * | span, |
| const char * | name, | ||
| int | strategy = -1 |
||
| ) |
Build and insert a range from circuits belonging to a given span
| span | Span to find |
| name | Range name or 0 to use span's id |
| strategy | Strategy used to allocate circuits from the new range, -1 to use group's strategy |
| void insertRange | ( | const String & | range, |
| const char * | name, | ||
| int | strategy = -1 |
||
| ) |
Build and insert a range contained in a string. See SignallingUtils::parseUIntArray() for the format of the string range
| range | String used to build the range |
| name | Range name |
| strategy | Strategy used to allocate circuits from the new range, -1 to use group's strategy |
| bool insertSpan | ( | SignallingCircuitSpan * | span | ) |
Insert a circuit span in the group
| span | Pointer to the circuit span to insert |
| unsigned int last | ( | ) | const [inline] |
Get the maximum of identification codes for this group
| bool release | ( | SignallingCircuit * | cic, |
| bool | sync = false |
||
| ) | [inline] |
Initiate a release of a circuit
| cic | Circuit to release |
| sync | Synchronous release requested |
References SignallingCircuit::status().
| void remove | ( | SignallingCircuit * | circuit | ) |
Remove a circuit from the group
| circuit | Pointer to the circuit to remove |
| void removeSpan | ( | SignallingCircuitSpan * | span, |
| bool | delCics = true, |
||
| bool | delSpan = false |
||
| ) |
Remove a circuit span from the group
| span | Pointer to the circuit span to remove |
| delCics | True to delete signalling circuits associated to the span |
| delSpan | True to delete the span |
| void removeSpanCircuits | ( | SignallingCircuitSpan * | span | ) |
Remove signalling circuits associated to the given span
| span | Pointer to the circuit span whose circuits will be removed |
| SignallingCircuit* reserve | ( | int | checkLock = -1, |
| int | strategy = -1, |
||
| SignallingCircuitRange * | range = 0 |
||
| ) |
Reserve a circuit for later use
| checkLock | Lock flags to check. If the given lock flags are set, reservation will fail |
| strategy | Strategy used for allocation, use group default if negative |
| range | Range of circuits to allocate from. 0 to use group default |
| SignallingCircuit* reserve | ( | const String & | list, |
| bool | mandatory, | ||
| int | checkLock = -1, |
||
| int | strategy = -1, |
||
| SignallingCircuitRange * | range = 0 |
||
| ) |
Reserve a circuit for later use
| list | Comma separated list of circuits |
| mandatory | The list is mandatory. If false and none of the circuits in the list are available, try to reserve a free one |
| checkLock | Lock flags to check. If the given lock flags are set, reservation will fail |
| strategy | Strategy used for allocation if failed to allocate one from the list, use group default if negative |
| range | Range of circuits to allocate from. 0 to use group default |
| void setStrategy | ( | int | strategy | ) | [inline] |
Set the circuit allocation strategy
| strategy | The new circuit allocation strategy |
| SignallingCircuit::Status status | ( | unsigned int | cic | ) |
Get the status of a circuit
| cic | Circuit Identification Code |
| bool status | ( | unsigned int | cic, |
| SignallingCircuit::Status | newStat, | ||
| bool | sync = false |
||
| ) |
Initiate a circuit status transition
| cic | Circuit Identification Code |
| newStat | Desired new status |
| sync | Synchronous status change requested |
| static int str2strategy | ( | const char * | name, |
| int | def = Increment |
||
| ) | [inline, static] |
Get the strategy value associated with a given name
| name | Strategy name whose value we want to obtain |
| def | Value to return if not found |
References TelEngine::lookup().
| int strategy | ( | ) | const [inline] |
Get the circuit allocation strategy
const TokenDict s_strategy[] [static] |
Keep the strategy names
1.7.6.1