sends::chan_list Class Reference
Channel list.
More...
#include <chan_list.hh>
List of all members.
Detailed Description
Channel list.
Master channel list.
- Author:
- John Zweizig
- Version:
- 1.0; Last modified: January 23, 2008
Member Typedef Documentation
Channel index.
Data type used to represent an index into the channel list.
Constructor & Destructor Documentation
| sends::chan_list::chan_list |
( |
unsigned long |
ndef = 100000 |
) |
|
Construct empty channel list.
Construct an empty channel list. The list_available flag is cleared to prevent clients from using the channel list information.
- Parameters:
-
| ndef | Number of entries to preallocate. |
Member Function Documentation
Add a channel to the channel list.
Add the specified channel to the channel list. If the list is available for read access, an exception is thrown.
- Parameters:
-
| void sends::chan_list::clear |
( |
void |
|
) |
|
Clear the list and reset the available flag.
| std::ostream& sends::chan_list::dump |
( |
std::ostream & |
out |
) |
const |
Dump the channel list contents.
Dump the contents of the channel list to the specified output stream.
- Parameters:
-
- Returns:
- Reference to the argument output stream.
| void sends::chan_list::enable |
( |
void |
|
) |
|
Enable the list for read access.
Find channel entry
- Exceptions:
-
| runtime_error | if not found. |
Find the specified channel entry in the list. A runtime_error exception is thrown if the channel is not found.
- Parameters:
-
| name | Name of channel to be found. |
| t | Channel type. |
- Returns:
- Index into the channel list.
Find the specified channel entry in the list. A runtime_error exception is thrown if the channel is not found.
- Exceptions:
-
| runtime_error | if not found. |
- Parameters:
-
| ent | Channel entry (name, type) to be found. |
- Returns:
- index into the channel list.
Find the channel with the nearest parameters.
- Exceptions:
-
| runtime_error | if not found. |
- Parameters:
-
| name | Name of channel to be found. |
| t | Channel type. |
| rate | Sample rate |
- Returns:
- index into the channel list.
Find the first entry in the list greater or equal to the specified entry;
- Parameters:
-
| ent | Channel entry to be found. |
- Returns:
- index into the channel list.
| void sends::chan_list::read |
( |
const std::string & |
file |
) |
|
Read channel file.
Fill the channel list from a file of channel definitions. The file contains one channel definition per line. Comments may be included by following any definition text with a pound sign and the comment text. A channel definition may be continued on one or more additional lines by typing a backslash as the last character of the non-terminal line(s). definition fields are separated by white-space characters an contain the following
| Column | Contents |
| 1 | Channel name |
| 2 | Channel type |
| 3 | Minimum access level |
| 4 | Data type |
| 5 | Sample rate |
| 6 - n | Source frame(s) |
- Parameters:
-
| file | Path to a file of channel definitions. |
| void sends::chan_list::reserve |
( |
chan_index |
nMax |
) |
|
reserve the specified number of entries
Extent the channel list to contain at least the specified number of entries. No action is taken if the current capacity is at least the specified number of entries.
- Parameters:
-
Return the number of active entries in the channel list.
- Returns:
- The number of entris in the channel list.
Reference the specified entry.
Get a constant reference to the entry specified by the channel index.
- Parameters:
-
| inx | Index to the desired channel entry. |
- Exceptions:
-
| std::out_of_range | is thrown if the index is invalid. |
- Returns:
- constant reference to the channel entry.
The documentation for this class was generated from the following file: