-
Notifications
You must be signed in to change notification settings - Fork 506
/
device_tick.h
55 lines (39 loc) · 1.14 KB
/
device_tick.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* Copyright (c) 2021 dresden elektronik ingenieurtechnik gmbh.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
* style license a copy of which has been included with this distribution in
* the LICENSE.txt file.
*
*/
#ifndef DEVICE_TICK_H
#define DEVICE_TICK_H
#include <QObject>
#include "device.h"
class Event;
class Device;
class DeviceTickPrivate;
/*! \class DeviceTick
Coordinates poking the Device state machines.
It differentiates between normal idle operation and device pairing while
Permit Join is enabled. While during pairing a faster pace is applied.
TODO
Take task queue and APS-DATA.request queue into account.
*/
class DeviceTick : public QObject
{
Q_OBJECT
public:
explicit DeviceTick(const DeviceContainer &devices, QObject *parent = nullptr);
~DeviceTick();
Q_SIGNALS:
void eventNotify(const Event&); //! Emitted \p Event needs to be enqueued in a higher layer.
public Q_SLOTS:
void handleEvent(const Event &event);
private Q_SLOTS:
void timoutFired();
private:
DeviceTickPrivate *d = nullptr;
};
#endif // DEVICE_TICK_H