Commit bedd4304 authored by Bryan Godbolt's avatar Bryan Godbolt

working on opal link

parent efb1428b
......@@ -212,7 +212,7 @@ RESOURCES = mavground.qrc
# Include RT-LAB Library
win32 {
LIBS += C:\OPAL-RT\RT-LAB7.2.4\Common\lib\OpalApi.lib
LIBS += -LC:\OPAL-RT\RT-LAB7.2.4\Common\bin -lOpalApi
INCLUDEPATH += src/lib/opalrt
SOURCES += src/comm/OpalLink.cc
HEADERS += src/comm/OpalLink.h
......
......@@ -80,7 +80,8 @@ bool OpalLink::isFullDuplex()
bool OpalLink::connect()
{
return false;
short modelState;
OpalConnect(101, true, &modelState);
}
bool OpalLink::disconnect()
......@@ -92,3 +93,14 @@ qint64 OpalLink::bytesAvailable()
{
return 0;
}
void OpalLink::writeBytes(const char *bytes, qint64 length)
{
}
void OpalLink::readBytes(char *bytes, qint64 maxLength)
{
}
......@@ -13,6 +13,9 @@
#include "LinkManager.h"
#include "MG.h"
#include "errno.h"
#include "OpalApi.h"
class OpalLink : public LinkInterface
{
Q_OBJECT
......@@ -47,29 +50,11 @@ class OpalLink : public LinkInterface
public slots:
virtual void writeBytes(const char *bytes, qint64 length) = 0;
virtual void readBytes(char *bytes, qint64 maxLength) = 0;
signals:
void bytesReady(LinkInterface* link);
void bytesReceived(LinkInterface* link, QByteArray data);
void connected();
void disconnected();
void writeBytes(const char *bytes, qint64 length);
void connected(bool connected);
void readBytes(char *bytes, qint64 maxLength);
void nameChanged(QString name);
public:
OpalLink();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment