A class for representing data for a station.
More...
#include <EchoLinkStationData.h>
|
static const int | MAXCALL = 15 |
| The maximum length of a callsign. More...
|
|
static const int | MAXDATA = 45 |
| The maximum length of the data field. More...
|
|
static const int | MAXDESC = 27 |
| The maximum length of a description. More...
|
|
static const int | MAXID = 7 |
| The maximum length of the id field. More...
|
|
static const int | MAXIP = 20 |
| The maximum length of the ip address. More...
|
|
A class for representing data for a station.
- Author
- Tobias Blomberg
- Date
- 2003-04-13
This class is used to represent data about a station.
- Examples
- EchoLinkDirectory_demo.cpp.
Definition at line 128 of file EchoLinkStationData.h.
◆ Status
The status of the station in the directory server
Enumerator |
---|
STAT_UNKNOWN | The state is unknown.
|
STAT_OFFLINE | The state is offline.
|
STAT_ONLINE | The state is online.
|
STAT_BUSY | The state is busy.
|
Definition at line 166 of file EchoLinkStationData.h.
◆ StationData() [1/2]
EchoLink::StationData::StationData |
( |
void |
| ) |
|
◆ StationData() [2/2]
EchoLink::StationData::StationData |
( |
const StationData & |
rhs | ) |
|
|
inline |
◆ callsign()
const std::string& EchoLink::StationData::callsign |
( |
void |
| ) |
const |
|
inline |
◆ clear()
void EchoLink::StationData::clear |
( |
void |
| ) |
|
Clear the contents and reset to default values.
◆ code()
std::string EchoLink::StationData::code |
( |
void |
| ) |
const |
|
inline |
Get the code representation of the callsign.
- Returns
- Returns the code representation of the callsign
The code representation is the callsign mapped to digits only. The mapping is done using the "phone method". ABC=2, DEF=3, GHI=4, JKL=5, MNO=6, PQRS=7, TUV=8, WXYZ=9. Digits are mapped to its corresponding digit. Star is ignored. All other characters are mapped to digit 1.
Definition at line 311 of file EchoLinkStationData.h.
◆ description()
const std::string& EchoLink::StationData::description |
( |
void |
| ) |
const |
|
inline |
Get the description/location string.
- Returns
- Returns the description/location string
Definition at line 267 of file EchoLinkStationData.h.
◆ id()
int EchoLink::StationData::id |
( |
void |
| ) |
const |
|
inline |
◆ ip()
const Async::IpAddress EchoLink::StationData::ip |
( |
void |
| ) |
const |
|
inline |
◆ ipStr()
std::string EchoLink::StationData::ipStr |
( |
void |
| ) |
const |
|
inline |
Get the string representation of the IP address.
- Returns
- Returns the string representation of the IP address
Definition at line 297 of file EchoLinkStationData.h.
◆ operator<()
bool EchoLink::StationData::operator< |
( |
const StationData & |
rhs | ) |
const |
|
inline |
◆ operator=()
Assignment operator.
- Parameters
-
rhs | Right Hand Side expression |
- Returns
- Returns a reference to this object
◆ setCallsign()
void EchoLink::StationData::setCallsign |
( |
const std::string & |
callsign | ) |
|
Set the callsign.
- Parameters
-
callsign | The callsign to set |
◆ setData()
void EchoLink::StationData::setData |
( |
const char * |
data | ) |
|
Set station data from a string as represented in the directory server.
- Parameters
-
This function is used to set status, time and description from a string that have a representation like in the reply from the directory server. The only use for this function is probably when parsing a reply from the directory server. Use setStatus, setTime and setDescription for normal use.
◆ setDescription()
void EchoLink::StationData::setDescription |
( |
const std::string & |
desc | ) |
|
|
inline |
Set the description/location string.
- Parameters
-
desc | The description string to set |
Definition at line 261 of file EchoLinkStationData.h.
◆ setId()
void EchoLink::StationData::setId |
( |
int |
id | ) |
|
|
inline |
◆ setIp()
void EchoLink::StationData::setIp |
( |
const Async::IpAddress & |
ip | ) |
|
|
inline |
◆ setStatus()
void EchoLink::StationData::setStatus |
( |
Status |
status | ) |
|
|
inline |
◆ setTime()
void EchoLink::StationData::setTime |
( |
const std::string & |
time | ) |
|
|
inline |
◆ status()
Status EchoLink::StationData::status |
( |
void |
| ) |
const |
|
inline |
◆ statusStr() [1/2]
static std::string EchoLink::StationData::statusStr |
( |
Status |
status | ) |
|
|
static |
Translate a status code to a string.
- Parameters
-
status | The status code to translate |
- Returns
- Returns the string representation of the given status code
◆ statusStr() [2/2]
std::string EchoLink::StationData::statusStr |
( |
void |
| ) |
const |
|
inline |
Return the string representation of the status.
- Returns
- Returns a string representation of the status
Definition at line 243 of file EchoLinkStationData.h.
◆ time()
const std::string& EchoLink::StationData::time |
( |
void |
| ) |
const |
|
inline |
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const StationData & |
station |
|
) |
| |
|
friend |
Output stream operator.
- Parameters
-
os | The stream to output data to |
station | The station data to output to the stream |
◆ MAXCALL
const int EchoLink::StationData::MAXCALL = 15 |
|
static |
◆ MAXDATA
const int EchoLink::StationData::MAXDATA = 45 |
|
static |
◆ MAXDESC
const int EchoLink::StationData::MAXDESC = 27 |
|
static |
◆ MAXID
const int EchoLink::StationData::MAXID = 7 |
|
static |
◆ MAXIP
const int EchoLink::StationData::MAXIP = 20 |
|
static |
The documentation for this class was generated from the following file: