mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-14 22:51:13 +02:00
2023-09-20 Fred Gleason <fredg@paravelsystems.com>
* Removed definition of CAED_TCP_PORT from 'lib/rd.h'. * Added definition of RD_CAED_PORT to 'lib/rd.h'. * Added definition of RD_CAED_TIMEOUT_INTERVAL to 'lib/rd.h'. * Fixed a bug in caed(8) that broke metering CAE commands. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -24424,3 +24424,8 @@
|
|||||||
2023-09-15 Fred Gleason <fredg@paravelsystems.com>
|
2023-09-15 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Added a 'Set Timeout' ['TO'] CAE command.
|
* Added a 'Set Timeout' ['TO'] CAE command.
|
||||||
* Added a 'Touch' ['TH'] CAE command.
|
* Added a 'Touch' ['TH'] CAE command.
|
||||||
|
2023-09-20 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Removed definition of CAED_TCP_PORT from 'lib/rd.h'.
|
||||||
|
* Added definition of RD_CAED_PORT to 'lib/rd.h'.
|
||||||
|
* Added definition of RD_CAED_TIMEOUT_INTERVAL to 'lib/rd.h'.
|
||||||
|
* Fixed a bug in caed(8) that broke metering CAE commands.
|
||||||
|
48
cae/cae.cpp
48
cae/cae.cpp
@@ -145,8 +145,8 @@ MainObject::MainObject(QObject *parent)
|
|||||||
// Server Front End
|
// Server Front End
|
||||||
//
|
//
|
||||||
cae_server=new CaeServer(this);
|
cae_server=new CaeServer(this);
|
||||||
if(!cae_server->bind(QHostAddress::Any,CAED_TCP_PORT)) {
|
if(!cae_server->bind(QHostAddress::Any,RD_CAED_PORT)) {
|
||||||
rda->syslog(LOG_ERR,"caed: failed to bind port %d",CAED_TCP_PORT);
|
rda->syslog(LOG_ERR,"caed: failed to bind port %d",RD_CAED_PORT);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
// connect(cae_server,SIGNAL(connectionDropped(int)),
|
// connect(cae_server,SIGNAL(connectionDropped(int)),
|
||||||
@@ -1242,10 +1242,11 @@ void MainObject::openRtpCaptureChannelData(int id,unsigned card,unsigned port,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
void MainObject::meterEnableData(const QHostAddress &addr,uint16_t udp_port,
|
void MainObject::meterEnableData(const QHostAddress &addr,uint16_t udp_port,
|
||||||
const QList<unsigned> &cards)
|
const QList<unsigned> &cards)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
QString cmd=QString::asprintf("ME %u",0xFFFF&udp_port);
|
QString cmd=QString::asprintf("ME %u",0xFFFF&udp_port);
|
||||||
for(int i=0;i<cards.size();i++) {
|
for(int i=0;i<cards.size();i++) {
|
||||||
cmd+=QString::asprintf(" %u",cards.at(i));
|
cmd+=QString::asprintf(" %u",cards.at(i));
|
||||||
@@ -1260,9 +1261,10 @@ void MainObject::meterEnableData(const QHostAddress &addr,uint16_t udp_port,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// cae_server->sendCommand(id,cmd+" +!");
|
// cae_server->sendCommand(id,cmd+" +!");
|
||||||
|
*/
|
||||||
SendMeterOutputStatusUpdate();
|
SendMeterOutputStatusUpdate();
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
/*
|
/*
|
||||||
void MainObject::connectionDroppedData(int id)
|
void MainObject::connectionDroppedData(int id)
|
||||||
{
|
{
|
||||||
@@ -1866,13 +1868,12 @@ void MainObject::SendMeterLevelUpdate(const QString &type,int cardnum,
|
|||||||
{
|
{
|
||||||
for(QMap<SessionId,Session *>::const_iterator it=cae_play_sessions.begin();
|
for(QMap<SessionId,Session *>::const_iterator it=cae_play_sessions.begin();
|
||||||
it!=cae_play_sessions.end();it++) {
|
it!=cae_play_sessions.end();it++) {
|
||||||
if((it.value()->cardNumber()==cardnum)&&(it.value()->meterPort()>0)&&
|
if((it.value()->cardNumber()==cardnum)&&
|
||||||
(it.value()->metersEnabled())) {
|
(cae_server->meterPort(it.key())>0)) {
|
||||||
SendMeterUpdate(QString::asprintf("ML %s %d %d %d %d",
|
SendMeterUpdate(QString::asprintf("ML %s %d %d %d %d",
|
||||||
type.toUtf8().constData(),
|
type.toUtf8().constData(),
|
||||||
cardnum,portnum,levels[0],levels[1]),
|
cardnum,portnum,levels[0],levels[1]),
|
||||||
it.value());
|
it.key());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1883,11 +1884,11 @@ void MainObject::SendStreamMeterLevelUpdate(int cardnum,int streamnum,
|
|||||||
{
|
{
|
||||||
for(QMap<SessionId,Session *>::const_iterator it=cae_play_sessions.begin();
|
for(QMap<SessionId,Session *>::const_iterator it=cae_play_sessions.begin();
|
||||||
it!=cae_play_sessions.end();it++) {
|
it!=cae_play_sessions.end();it++) {
|
||||||
if((it.value()->cardNumber()==cardnum)&&(it.value()->meterPort()>0)&&
|
if((it.value()->cardNumber()==cardnum)&&
|
||||||
(it.value()->metersEnabled())) {
|
(cae_server->meterPort(it.key())>0)) {
|
||||||
SendMeterUpdate(QString::asprintf("MO %d %d %d %d",
|
SendMeterUpdate(QString::asprintf("MO %d %d %d %d",
|
||||||
cardnum,streamnum,levels[0],levels[1]),
|
cardnum,streamnum,levels[0],levels[1]),
|
||||||
it.value());
|
it.key());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1898,10 +1899,10 @@ void MainObject::SendMeterPositionUpdate(int cardnum,unsigned pos[])
|
|||||||
for(unsigned k=0;k<RD_MAX_STREAMS;k++) {
|
for(unsigned k=0;k<RD_MAX_STREAMS;k++) {
|
||||||
for(QMap<SessionId,Session *>::const_iterator it=cae_play_sessions.begin();
|
for(QMap<SessionId,Session *>::const_iterator it=cae_play_sessions.begin();
|
||||||
it!=cae_play_sessions.end();it++) {
|
it!=cae_play_sessions.end();it++) {
|
||||||
if((it.value()->cardNumber()==cardnum)&&(it.value()->meterPort()>0)&&
|
if((it.value()->cardNumber()==cardnum)&&
|
||||||
(it.value()->metersEnabled())) {
|
(cae_server->meterPort(it.key())>0)) {
|
||||||
SendMeterUpdate(QString::asprintf("MP %d %d %d",cardnum,k,pos[k]),
|
SendMeterUpdate(QString::asprintf("MP %d %d %d",cardnum,k,pos[k]),
|
||||||
it.value());
|
it.key());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1917,10 +1918,10 @@ void MainObject::SendMeterOutputStatusUpdate()
|
|||||||
for(QMap<SessionId,Session *>::const_iterator it=cae_play_sessions.begin();
|
for(QMap<SessionId,Session *>::const_iterator it=cae_play_sessions.begin();
|
||||||
it!=cae_play_sessions.end();it++) {
|
it!=cae_play_sessions.end();it++) {
|
||||||
if((it.value()->cardNumber()==i)&&
|
if((it.value()->cardNumber()==i)&&
|
||||||
(it.value()->meterPort()>0)&&(it.value()->metersEnabled())) {
|
(cae_server->meterPort(it.key())>0)) {
|
||||||
SendMeterUpdate(QString::asprintf("MS %d %d %d %d",i,j,k,
|
SendMeterUpdate(QString::asprintf("MS %d %d %d %d",i,j,k,
|
||||||
output_status_flag[i][j][k]),
|
output_status_flag[i][j][k]),
|
||||||
it.value());
|
it.key());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1934,20 +1935,23 @@ void MainObject::SendMeterOutputStatusUpdate(int card,int port,int stream)
|
|||||||
{
|
{
|
||||||
for(QMap<SessionId,Session *>::const_iterator it=cae_play_sessions.begin();
|
for(QMap<SessionId,Session *>::const_iterator it=cae_play_sessions.begin();
|
||||||
it!=cae_play_sessions.end();it++) {
|
it!=cae_play_sessions.end();it++) {
|
||||||
if((it.value()->streamNumber()==stream)&&(it.value()->meterPort()>0)&&
|
if((it.value()->streamNumber()==stream)&&
|
||||||
(it.value()->metersEnabled())) {
|
(cae_server->meterPort(it.key())>0)) {
|
||||||
SendMeterUpdate(QString::asprintf("MS %d %d %d %d",card,port,stream,
|
SendMeterUpdate(QString::asprintf("MS %d %d %d %d",card,port,stream,
|
||||||
output_status_flag[card][port][stream]),
|
output_status_flag[card][port][stream]),
|
||||||
it.value());
|
it.key());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainObject::SendMeterUpdate(const QString &msg,Session *sess)
|
void MainObject::SendMeterUpdate(const QString &msg,const SessionId &sid)
|
||||||
{
|
{
|
||||||
meter_socket->writeDatagram(msg.toUtf8(),sess->sessionId().address(),
|
printf("SendMeterUpdate(\"%s\",%s:%u)\n",msg.toUtf8().constData(),
|
||||||
sess->meterPort());
|
sid.address().toString().toUtf8().constData(),
|
||||||
|
0xffff&cae_server->meterPort(sid));
|
||||||
|
meter_socket->
|
||||||
|
writeDatagram(msg.toUtf8(),sid.address(),cae_server->meterPort(sid));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -123,8 +123,8 @@ class MainObject : public QObject
|
|||||||
void openRtpCaptureChannelData(int id,unsigned card,unsigned port,
|
void openRtpCaptureChannelData(int id,unsigned card,unsigned port,
|
||||||
uint16_t udp_port,unsigned samprate,
|
uint16_t udp_port,unsigned samprate,
|
||||||
unsigned chans);
|
unsigned chans);
|
||||||
// void meterEnableData(const QHostAddress &addr,uint16_t udp_port,
|
void meterEnableData(const QHostAddress &addr,uint16_t udp_port,
|
||||||
// const QList<unsigned> &cards);
|
const QList<unsigned> &cards);
|
||||||
void statePlayUpdate(int card,int stream,int state);
|
void statePlayUpdate(int card,int stream,int state);
|
||||||
void stateRecordUpdate(int card,int stream,int state);
|
void stateRecordUpdate(int card,int stream,int state);
|
||||||
void updateMeters();
|
void updateMeters();
|
||||||
@@ -149,8 +149,7 @@ class MainObject : public QObject
|
|||||||
void SendMeterPositionUpdate(int cardnum,unsigned pos[]);
|
void SendMeterPositionUpdate(int cardnum,unsigned pos[]);
|
||||||
void SendMeterOutputStatusUpdate();
|
void SendMeterOutputStatusUpdate();
|
||||||
void SendMeterOutputStatusUpdate(int card,int port,int stream);
|
void SendMeterOutputStatusUpdate(int card,int port,int stream);
|
||||||
// void SendMeterUpdate(const QString &msg,int conn_id);
|
void SendMeterUpdate(const QString &msg,const SessionId &sid);
|
||||||
void SendMeterUpdate(const QString &msg,Session *sess);
|
|
||||||
Driver *GetDriver(unsigned card) const;
|
Driver *GetDriver(unsigned card) const;
|
||||||
void MakeDriver(unsigned *next_card,RDStation::AudioDriver type);
|
void MakeDriver(unsigned *next_card,RDStation::AudioDriver type);
|
||||||
QList<Driver *> d_drivers;
|
QList<Driver *> d_drivers;
|
||||||
|
@@ -42,6 +42,17 @@ CaeServer::CaeServer(QObject *parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
uint16_t CaeServer::meterPort(const SessionId &sid) const
|
||||||
|
{
|
||||||
|
Connection *conn=NULL;
|
||||||
|
|
||||||
|
if((conn=cae_connections.value(sid.normalized()))==NULL) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return conn->meterPort();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool CaeServer::bind(const QHostAddress &addr,uint16_t port)
|
bool CaeServer::bind(const QHostAddress &addr,uint16_t port)
|
||||||
{
|
{
|
||||||
return d_server_socket->bind(port);
|
return d_server_socket->bind(port);
|
||||||
@@ -145,6 +156,8 @@ bool CaeServer::ProcessCommand(const QHostAddress &src_addr,uint16_t src_port,
|
|||||||
if((f0.at(0)=="TO")&&(f0.size()==2)) { // Set Timeout
|
if((f0.at(0)=="TO")&&(f0.size()==2)) { // Set Timeout
|
||||||
interval=f0.at(1).toInt(&ok);
|
interval=f0.at(1).toInt(&ok);
|
||||||
if(ok&&(interval>=0)) {
|
if(ok&&(interval>=0)) {
|
||||||
|
Connection *conn=GetConnection(origin);
|
||||||
|
/*
|
||||||
Connection *conn=cae_connections.value(origin);
|
Connection *conn=cae_connections.value(origin);
|
||||||
if(conn==NULL) {
|
if(conn==NULL) {
|
||||||
conn=new Connection(origin,this);
|
conn=new Connection(origin,this);
|
||||||
@@ -152,6 +165,7 @@ bool CaeServer::ProcessCommand(const QHostAddress &src_addr,uint16_t src_port,
|
|||||||
this,SLOT(connectionExpiredData(const SessionId &)));
|
this,SLOT(connectionExpiredData(const SessionId &)));
|
||||||
cae_connections[origin]=conn;
|
cae_connections[origin]=conn;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
conn->setTimeout(interval);
|
conn->setTimeout(interval);
|
||||||
was_processed=true;
|
was_processed=true;
|
||||||
}
|
}
|
||||||
@@ -414,6 +428,8 @@ bool CaeServer::ProcessCommand(const QHostAddress &src_addr,uint16_t src_port,
|
|||||||
for(int i=2;i<f0.size();i++) {
|
for(int i=2;i<f0.size();i++) {
|
||||||
cards.push_back(f0.at(i).toUInt());
|
cards.push_back(f0.at(i).toUInt());
|
||||||
}
|
}
|
||||||
|
Connection *conn=GetConnection(origin);
|
||||||
|
conn->setMeterPort(udp_port);
|
||||||
emit meterEnableReq(src_addr,udp_port,cards);
|
emit meterEnableReq(src_addr,udp_port,cards);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -694,3 +710,17 @@ bool CaeServer::ProcessCommand(const QHostAddress &src_addr,uint16_t src_port,
|
|||||||
*/
|
*/
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Connection *CaeServer::GetConnection(const SessionId &sid)
|
||||||
|
{
|
||||||
|
Connection *conn=cae_connections.value(sid);
|
||||||
|
if(conn==NULL) {
|
||||||
|
conn=new Connection(sid,this);
|
||||||
|
printf("Added connection %s\n",conn->sessionId().dump().toUtf8().constData());
|
||||||
|
connect(conn,SIGNAL(connectionExpired(const SessionId &)),
|
||||||
|
this,SLOT(connectionExpiredData(const SessionId &)));
|
||||||
|
cae_connections[sid]=conn;
|
||||||
|
}
|
||||||
|
return conn;
|
||||||
|
}
|
||||||
|
@@ -39,8 +39,9 @@ class CaeServer : public QObject
|
|||||||
Q_OBJECT;
|
Q_OBJECT;
|
||||||
public:
|
public:
|
||||||
CaeServer(QObject *parent=0);
|
CaeServer(QObject *parent=0);
|
||||||
bool metersEnabled(int id,unsigned card) const;
|
// bool metersEnabled(int id,unsigned card) const;
|
||||||
void setMetersEnabled(int id,unsigned card,bool state);
|
// void setMetersEnabled(int id,unsigned card,bool state);
|
||||||
|
uint16_t meterPort(const SessionId &sid) const;
|
||||||
bool bind(const QHostAddress &addr,uint16_t port);
|
bool bind(const QHostAddress &addr,uint16_t port);
|
||||||
void sendCommand(const QString &cmd);
|
void sendCommand(const QString &cmd);
|
||||||
void sendCommand(const SessionId &dest,const QString &cmd);
|
void sendCommand(const SessionId &dest,const QString &cmd);
|
||||||
@@ -115,6 +116,7 @@ class CaeServer : public QObject
|
|||||||
private:
|
private:
|
||||||
bool ProcessCommand(const QHostAddress &src_addr,uint16_t src_port,
|
bool ProcessCommand(const QHostAddress &src_addr,uint16_t src_port,
|
||||||
const QString &cmd);
|
const QString &cmd);
|
||||||
|
Connection *GetConnection(const SessionId &sid);
|
||||||
QMap<SessionId,Connection *> cae_connections;
|
QMap<SessionId,Connection *> cae_connections;
|
||||||
QSignalMapper *cae_ready_read_mapper;
|
QSignalMapper *cae_ready_read_mapper;
|
||||||
QUdpSocket *d_server_socket;
|
QUdpSocket *d_server_socket;
|
||||||
|
@@ -18,6 +18,8 @@
|
|||||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include <rdapplication.h>
|
||||||
|
|
||||||
#include "connection.h"
|
#include "connection.h"
|
||||||
|
|
||||||
Connection::Connection(const SessionId &sid,QObject *parent)
|
Connection::Connection(const SessionId &sid,QObject *parent)
|
||||||
@@ -25,6 +27,7 @@ Connection::Connection(const SessionId &sid,QObject *parent)
|
|||||||
{
|
{
|
||||||
d_session_id=sid;
|
d_session_id=sid;
|
||||||
d_interval=0;
|
d_interval=0;
|
||||||
|
d_meter_port=0;
|
||||||
|
|
||||||
d_timer=new QTimer(this);
|
d_timer=new QTimer(this);
|
||||||
d_timer->setSingleShot(true);
|
d_timer->setSingleShot(true);
|
||||||
@@ -44,6 +47,20 @@ SessionId Connection::sessionId() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
uint16_t Connection::meterPort() const
|
||||||
|
{
|
||||||
|
return d_meter_port;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Connection::setMeterPort(uint16_t udp_port)
|
||||||
|
{
|
||||||
|
printf("setMeterPort(%s::setMeterPort(%u)\n",
|
||||||
|
dump().toUtf8().constData(),0xffff&udp_port);
|
||||||
|
d_meter_port=udp_port;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QString Connection::dump() const
|
QString Connection::dump() const
|
||||||
{
|
{
|
||||||
return d_session_id.dump();
|
return d_session_id.dump();
|
||||||
@@ -79,5 +96,7 @@ void Connection::touch()
|
|||||||
|
|
||||||
void Connection::timerData()
|
void Connection::timerData()
|
||||||
{
|
{
|
||||||
|
rda->syslog(LOG_WARNING,"connection %s timed out",
|
||||||
|
d_session_id.dump().toUtf8().constData());
|
||||||
emit connectionExpired(d_session_id);
|
emit connectionExpired(d_session_id);
|
||||||
}
|
}
|
||||||
|
@@ -36,6 +36,8 @@ class Connection : public QObject
|
|||||||
Connection(const SessionId &sid,QObject *parent);
|
Connection(const SessionId &sid,QObject *parent);
|
||||||
~Connection();
|
~Connection();
|
||||||
SessionId sessionId() const;
|
SessionId sessionId() const;
|
||||||
|
uint16_t meterPort() const;
|
||||||
|
void setMeterPort(uint16_t udp_port);
|
||||||
QString dump() const;
|
QString dump() const;
|
||||||
bool operator!=(const Connection &other) const;
|
bool operator!=(const Connection &other) const;
|
||||||
bool operator<(const Connection &other) const;
|
bool operator<(const Connection &other) const;
|
||||||
@@ -52,6 +54,7 @@ class Connection : public QObject
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
SessionId d_session_id;
|
SessionId d_session_id;
|
||||||
|
uint16_t d_meter_port;
|
||||||
QTimer *d_timer;
|
QTimer *d_timer;
|
||||||
int d_interval;
|
int d_interval;
|
||||||
};
|
};
|
||||||
|
@@ -71,6 +71,12 @@ bool SessionId::belongsTo(const SessionId &other) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SessionId SessionId::normalized() const
|
||||||
|
{
|
||||||
|
return SessionId(d_address,d_port);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool SessionId::operator!=(const SessionId &other) const
|
bool SessionId::operator!=(const SessionId &other) const
|
||||||
{
|
{
|
||||||
return (other.d_address!=d_address)||(other.d_port!=d_port)||
|
return (other.d_address!=d_address)||(other.d_port!=d_port)||
|
||||||
@@ -103,8 +109,8 @@ Session::Session(const QHostAddress &addr,uint16_t port,int serial)
|
|||||||
d_end_position=-1;
|
d_end_position=-1;
|
||||||
d_speed=100000;
|
d_speed=100000;
|
||||||
|
|
||||||
d_meter_port=0;
|
// d_meter_port=0;
|
||||||
d_meters_enabled=false;
|
// d_meters_enabled=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -119,8 +125,8 @@ Session::Session(const SessionId &sid)
|
|||||||
d_end_position=-1;
|
d_end_position=-1;
|
||||||
d_speed=100000;
|
d_speed=100000;
|
||||||
|
|
||||||
d_meter_port=0;
|
// d_meter_port=0;
|
||||||
d_meters_enabled=false;
|
// d_meters_enabled=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -219,7 +225,7 @@ void Session::setSpeed(int speed)
|
|||||||
d_speed=speed;
|
d_speed=speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
uint16_t Session::meterPort() const
|
uint16_t Session::meterPort() const
|
||||||
{
|
{
|
||||||
return d_meter_port;
|
return d_meter_port;
|
||||||
@@ -242,3 +248,4 @@ void Session::setMetersEnabled(bool state)
|
|||||||
{
|
{
|
||||||
d_meters_enabled=state;
|
d_meters_enabled=state;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
@@ -36,6 +36,7 @@ class SessionId
|
|||||||
void setSerialNumber(int serial);
|
void setSerialNumber(int serial);
|
||||||
QString dump() const;
|
QString dump() const;
|
||||||
bool belongsTo(const SessionId &other) const;
|
bool belongsTo(const SessionId &other) const;
|
||||||
|
SessionId normalized() const;
|
||||||
bool operator!=(const SessionId &other) const;
|
bool operator!=(const SessionId &other) const;
|
||||||
bool operator<(const SessionId &other) const;
|
bool operator<(const SessionId &other) const;
|
||||||
|
|
||||||
@@ -60,16 +61,16 @@ class Session
|
|||||||
void setPortNumber(int portnum);
|
void setPortNumber(int portnum);
|
||||||
int streamNumber() const;
|
int streamNumber() const;
|
||||||
void setStreamNumber(int streamnum);
|
void setStreamNumber(int streamnum);
|
||||||
uint16_t meterPort() const;
|
// uint16_t meterPort() const;
|
||||||
void setMeterPort(uint16_t port);
|
// void setMeterPort(uint16_t port);
|
||||||
int startPosition() const;
|
int startPosition() const;
|
||||||
void setStartPosition(int pos);
|
void setStartPosition(int pos);
|
||||||
int endPosition() const;
|
int endPosition() const;
|
||||||
void setEndPosition(int pos);
|
void setEndPosition(int pos);
|
||||||
int speed() const;
|
int speed() const;
|
||||||
void setSpeed(int speed);
|
void setSpeed(int speed);
|
||||||
bool metersEnabled();
|
// bool metersEnabled();
|
||||||
void setMetersEnabled(bool state);
|
// void setMetersEnabled(bool state);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SessionId d_session_id;
|
SessionId d_session_id;
|
||||||
@@ -79,8 +80,8 @@ class Session
|
|||||||
int d_start_position;
|
int d_start_position;
|
||||||
int d_end_position;
|
int d_end_position;
|
||||||
int d_speed;
|
int d_speed;
|
||||||
uint16_t d_meter_port;
|
// uint16_t d_meter_port;
|
||||||
bool d_meters_enabled;
|
// bool d_meters_enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user