Fred Gleason 89b846f7d6 2014-08-14 Fred Gleason <fredg@paravelsystems.com>
* Fixed warnings in 'lib/rdaudioconvert.cpp'.
	* Fixed warnings in 'lib/rdaudioexport.cpp'.
	* Fixed warnings in 'lib/rdaudioimport.cpp'.
	* Fixed warnings in 'lib/rdcart_dialog.cpp'.
	* Fixed warnings in 'lib/rdconf.cpp'.
	* Fixed warnings in 'lib/rdcopyaudio.cpp'.
	* Fixed warnings in 'lib/rdescape_string.cpp'.
	* Fixed warnings in 'lib/rdevent_line.cpp'.
	* Fixed warnings in 'lib/rdfeed.cpp'.
	* Refactored 'RDOneShot' to use int values in 'lib/rdoneshot.cpp'
	and 'lib/rdoneshot.h'.
	* Fixed warnings in 'lib/rdpeaksexport.cpp'.
	* Fixed warnings in 'lib/rdtrimaudio.cpp'.
	* Fixed warnings in 'lib/rdwavefile.cpp'.
	* Fixed warnings in 'rdhpi/rdhpiplaystream.cpp'.
	* Fixed warnings in 'rdhpi/rdhpirecordstream.cpp'.
	* Fixed warnings in 'rdhpi/rdhpisoundcard.cpp'.
	* Fixed warnings in 'pam_rd/pam_rd.cpp'.
	* Fixed warnings in 'rdadmin/edit_rdairplay.cpp'.
	* Fixed warnings in 'rdairplay/list_log.cpp'.
	* Fixed warnings in 'rdairplay/log_play.cpp'.
	* Fixed warnings in 'rdairplay/pie_counter.cpp'.
	* Fixed warnings in 'rdairplay/rlm_host.cpp'.
	* Fixed warnings in 'rdcatchd/rdcatchd.cpp'.
	* Fixed warnings in 'rdlogedit/editlog.cpp'.
	* Fixed warnings in 'rdlogmanager/rdlogmanager.cpp'.
	* Fixed warnings in 'rdrepl/replfactory.h'.
	* Fixed warnings in 'ripcd/acu1p.cpp' and 'ripcd/acu1p.h'.
	* Fixed warnings in 'ripcd/bt16x2.cpp' and 'ripcd/bt16x2.h'.
	* Fixed warnings in 'ripcd/btss164.cpp' and 'ripcd/btss164.h'.
	* Fixed warnings in 'ripcd/btss42.cpp' and 'ripcd/btss42.h'.
	* Fixed warnings in 'ripcd/btss44.cpp' and 'ripcd/btss44.h'.
	* Fixed warnings in 'ripcd/btss82.cpp' and 'ripcd/btss82.h'.
	* Fixed warnings in 'ripcd/btsrc16.cpp' and 'ripcd/btsrc16.h'.
	* Fixed warnings in 'ripcd/btsrc8iii.cpp' and 'ripcd/btsrc8iii.h'.
	* Fixed warnings in 'ripcd/livewire_mcastgpio.cpp'.
	* Fixed warnings in 'ripcd/local_gpio.cpp' and 'ripcd/local_gpio.h'.
	* Fixed warnings in 'ripcd/sas64000gpi.cpp' and 'ripcd/sas64000gpi.h'.
	* Fixed warnings in 'ripcd/vguest.cpp' and 'ripcd/vguest.h'.
	* Fixed warnings in 'utils/rdhpiinfo/rdhpiinfo.cpp'
	* Fixed warnings in 'utils/rdgen/wavlib.cpp'
	* Fixed warnings in 'utils/rdimport/rdimport.cpp'
	* Fixed warnings in 'utils/rdsoftkeys/rdsoftkeys.cpp'
	* Fixed warnings in 'web/rdxport/export.cpp'
2014-08-14 19:08:38 -04:00

83 lines
2.0 KiB
C++

// acu1p.h
//
// Rivendell switcher driver for the Sine Systems ACU-1 (Prophet)
//
// (C) Copyright 2012 Fred Gleason <fredg@paravelsystems.com>
//
// $Id: acu1p.h,v 1.1.2.2 2012/12/13 03:14:00 cvs Exp $
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
#ifndef ACU1P_H
#define ACU1P_H
#include <stdint.h>
#include <qsocketnotifier.h>
#include <qtimer.h>
#include <rd.h>
#include <rdmatrix.h>
#include <rdmacro.h>
#include <rdtty.h>
#include <rdoneshot.h>
#include <switcher.h>
#define ACU1P_UNIT_ID 1
#define ACU1P_POLL_INTERVAL 100
#define ACU1P_GPIO_PINS 16
class Acu1p : public Switcher
{
Q_OBJECT
public:
Acu1p(RDMatrix *matrix,QObject *parent=0,const char *name=0);
~Acu1p();
RDMatrix::Type type();
unsigned gpiQuantity();
unsigned gpoQuantity();
bool primaryTtyActive();
bool secondaryTtyActive();
void processCommand(RDMacro *cmd);
private slots:
void pollData();
void readyReadData(int sock);
void gpiOneshotData(int value);
void gpoOneshotData(int value);
private:
void ProcessGpi(uint16_t gpi_data);
void SetRelay(int gpo,bool state);
void PulseRelay(int gpo);
RDTTYDevice *bt_device;
QSocketNotifier *bt_notify;
QTimer *bt_poll_timer;
bool bt_gpi_state[ACU1P_GPIO_PINS];
bool bt_gpi_mask[ACU1P_GPIO_PINS];
uint8_t bt_gpo_mask;
RDOneShot *bt_gpi_oneshot;
RDOneShot *bt_gpo_oneshot;
int bt_matrix;
int bt_inputs;
int bt_outputs;
int bt_gpis;
int bt_gpos;
};
#endif // ACU1P_H