UniSet
2.32.1
extensions
SharedMemory
tests
SharedMemory/tests/TestObject.h
1
#ifndef _TestObject_H_
2
#define _TestObject_H_
3
// -----------------------------------------------------------------------------
4
#include "TestObject_SK.h"
5
// -----------------------------------------------------------------------------
6
class
TestObject
:
7
public
TestObject_SK
8
{
9
public
:
10
TestObject
(
uniset::ObjectId
objId, xmlNode* cnode );
11
virtual
~TestObject
();
12
13
void
askDoNotNotify();
14
void
askNotifyChange();
15
void
askNotifyFirstNotNull();
16
17
inline
bool
getEvnt()
18
{
19
return
evntIsOK;
20
}
21
22
void
stopHeartbeat();
23
void
runHeartbeat(
int
max = 3 );
24
25
inline
uniset::timeout_t getHeartbeatTime()
26
{
27
return
ptHeartBeat.
getInterval
();
28
}
29
30
// тест на последовательность SensorMessage
31
void
askMonotonic();
32
void
startMonitonicTest();
33
bool
isMonotonicTestOK()
const
;
34
long
getLostMessages()
const
;
35
long
getLastValue()
const
;
36
bool
isEmptyQueue();
37
bool
isFullQueue();
38
39
std::string getLastTextMessage()
const
;
40
int
getLastTextMessageType()
const
;
41
42
protected
:
43
TestObject
();
44
45
virtual
void
sysCommand(
const
uniset::SystemMessage
* sm )
override
;
46
virtual
void
sensorInfo(
const
uniset::SensorMessage
* sm )
override
;
47
virtual
void
onTextMessage(
const
uniset::TextMessage
* msg )
override
;
48
49
private
:
50
bool
evntIsOK = {
false
};
51
52
bool
monotonicFailed = {
false
};
53
long
lostMessages = {
false
};
54
long
lastValue = { 0 };
55
std::string lastText = {
""
};
56
int
lastTextType = { 0 };
57
};
58
// -----------------------------------------------------------------------------
59
#endif
// _TestObject_H_
60
// -----------------------------------------------------------------------------
TestObject
Definition
HttpResolver/tests/TestObject.h:8
uniset::PassiveTimer::getInterval
virtual timeout_t getInterval() const noexcept override
Definition
PassiveTimer.cc:84
uniset::SensorMessage
Definition
MessageType.h:127
uniset::SystemMessage
Definition
MessageType.h:171
uniset::TextMessage
Definition
MessageType.h:283
uniset::ObjectId
long ObjectId
Definition
UniSetTypes_i.idl:30
Документация по UniSet. Последние изменения: Ср 19 Июл 2023 21:17:14. Создано системой
1.10.0