mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
Still required but unwanted overloaded DBus operator in aviomodulator.h - no compilation without them. Need to be removed. Enabled more classes for DBus.
66 lines
1.6 KiB
C++
66 lines
1.6 KiB
C++
/* Copyright (C) 2013 VATSIM Community / authors
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "testservice.h"
|
|
|
|
namespace BlackMiscTest
|
|
{
|
|
|
|
const QString Testservice::ServiceName = QString(BLACKMISCKTEST_SERVICENAME);
|
|
const QString Testservice::ServicePath = QString(BLACKMISCKTEST_SERVICEPATH);
|
|
|
|
/*
|
|
* Constructor
|
|
*/
|
|
Testservice::Testservice(QObject *parent) : QObject(parent)
|
|
{
|
|
// void
|
|
}
|
|
|
|
/*
|
|
* Slot to receive messages
|
|
*/
|
|
void Testservice::receiveStringMessage(const QString &message)
|
|
{
|
|
qDebug() << "Pid:" << TestserviceTool::getPid() << "Received message:" << message;
|
|
}
|
|
|
|
/*
|
|
* Receive variant
|
|
*/
|
|
void Testservice::receiveVariant(const QDBusVariant &variant)
|
|
{
|
|
QVariant qv = variant.variant();
|
|
BlackMisc::Aviation::CAltitude altitude = qv.value<BlackMisc::Aviation::CAltitude>();
|
|
qDebug() << "Pid:" << TestserviceTool::getPid() << "Received variant:" << altitude;
|
|
}
|
|
|
|
/*
|
|
* Receive speed
|
|
*/
|
|
void Testservice::receiveSpeed(const BlackMisc::PhysicalQuantities::CSpeed &speed)
|
|
{
|
|
qDebug() << "Pid:" << TestserviceTool::getPid() << "Received speed:" << speed;
|
|
}
|
|
|
|
/*
|
|
* Receive COM unit
|
|
*/
|
|
void Testservice::receiveComUnit(const BlackMisc::Aviation::CComSystem &comUnit)
|
|
{
|
|
qDebug() << "Pid:" << TestserviceTool::getPid() << "Received COM:" << comUnit;
|
|
}
|
|
|
|
/*
|
|
* Receivealtitude
|
|
*/
|
|
void Testservice::receiveAltitude(const BlackMisc::Aviation::CAltitude &altitude)
|
|
{
|
|
qDebug() << "Pid:" << TestserviceTool::getPid() << "Received altitude:" << altitude;
|
|
|
|
}
|
|
|
|
} // namespace
|