ZephyrXtreme::ZephyrXtreme(int id,QObject *parent)
  : LPSwitcher(id,LPSwitcher::TypeZephyrXtreme,parent)
{
  zep_locked=false;
  zep_xmt_algo=LPSwitcher::XmtAlgoLast;
  zep_rcv_algo=LPSwitcher::RcvAlgoLast;
  zep_channel_rate=LPSwitcher::ChannelRateLast;
  zep_pending_channel_rate=LPSwitcher::ChannelRateLast;
  zep_sample_rate=0;
  zep_pending_sample_rate=0;
  for(int i=0;i<2;i++) {
    zep_line_state[i]=LPSwitcher::StateOffline;
    zep_dialed_string[i]="";
    zep_pending_string[i]="";
  }

  zep_device=new LPTTYDevice(this);
  zep_device->setSpeed(ZEPHYRXTREME_SPEED);
  zep_device->setWordLength(ZEPHYRXTREME_WORD_LENGTH);
  zep_device->setParity(ZEPHYRXTREME_PARITY);
  zep_device->setFlowControl(ZEPHYRXTREME_FLOW_CONTROL);
  connect(zep_device,SIGNAL(readyRead()),this,SLOT(readyReadData()));

  zep_socket=new QTcpSocket(this);
  connect(zep_socket,SIGNAL(connected()),this,SLOT(connectedData()));
  connect(zep_socket,SIGNAL(disconnected()),this,SLOT(disconnectedData()));
  connect(zep_socket,SIGNAL(readyRead()),this,SLOT(socketReadyRead()));

  zep_poll_timer=new QTimer(this);
  connect(zep_poll_timer,SIGNAL(timeout()),this,SLOT(pollData()));
}
Esempio n. 2
0
RDSocket::RDSocket(int id,QObject *parent)
  : Q3Socket(parent)
{
  id_num=id;
  connect(this,SIGNAL(hostFound()),this,SLOT(hostFoundData()));
  connect(this,SIGNAL(connected()),this,SLOT(connectedData()));
  connect(this,SIGNAL(connectionClosed()),this,SLOT(connectionClosedData()));
  connect(this,SIGNAL(delayedCloseFinished()),
	  this,SLOT(delayedCloseFinishedData()));
  connect(this,SIGNAL(readyRead()),this,SLOT(readyReadData()));
  connect(this,SIGNAL(bytesWritten(int)),this,SLOT(bytesWrittenData(int)));
  connect(this,SIGNAL(error(int)),this,SLOT(errorData(int)));
}
Esempio n. 3
0
SoftwareAuthority::SoftwareAuthority(RDMatrix *matrix,QObject *parent)
  : Switcher(matrix,parent)
{
  swa_matrix=matrix->matrix();
  swa_ptr=0;
  swa_istate=0;

  //
  // Get Matrix Parameters
  //
  swa_username=matrix->username(RDMatrix::Primary);
  swa_password=matrix->password(RDMatrix::Primary);
  swa_porttype=matrix->portType(RDMatrix::Primary);
  swa_ipaddress=matrix->ipAddress(RDMatrix::Primary);
  swa_ipport=matrix->ipPort(RDMatrix::Primary);
  swa_card=matrix->card();
  swa_inputs=0;
  swa_outputs=0;
  swa_gpis=0;
  swa_gpos=0;
  swa_start_cart=matrix->startCart(RDMatrix::Primary);
  swa_stop_cart=matrix->stopCart(RDMatrix::Primary);

  //
  // Reconnection Timer
  //
  swa_reconnect_timer=new QTimer(this);
  connect(swa_reconnect_timer,SIGNAL(timeout()),this,SLOT(ipConnect()));

  //
  // Initialize the connection
  //
  swa_socket=new Q3Socket(this);
  connect(swa_socket,SIGNAL(connected()),this,SLOT(connectedData()));
  connect(swa_socket,SIGNAL(connectionClosed()),
	  this,SLOT(connectionClosedData()));
  connect(swa_socket,SIGNAL(readyRead()),
	  this,SLOT(readyReadData()));
  connect(swa_socket,SIGNAL(error(int)),this,SLOT(errorData(int)));
  ipConnect();
}
Esempio n. 4
0
bool AbstractInputSlot::isConnected() const
{
    return connectedData() != nullptr;
}