-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheProsimaClock.h
71 lines (49 loc) · 1.67 KB
/
eProsimaClock.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// eProsimaClock.h : main header file for the PROJECT_NAME application
//
#pragma once
#ifndef __AFXWIN_H__
#error "include 'stdafx.h' before including this file for PCH"
#endif
#include "resource.h" // main symbols
// fastrts dependencies
#include <fastrtps/subscriber/SubscriberListener.h>
#include "Type/eProsimaClockTypePubSubTypes.h"
#include <set>
// CeProsimaClockApp:
// See eProsimaClock.cpp for the implementation of this class
//
class CeProsimaClockApp :
public CWinApp,
public eprosima::fastrtps::SubscriberListener
{
// fastrtps
std::shared_ptr<eprosima::fastrtps::Participant> m_part;
std::shared_ptr<eprosima::fastrtps::Publisher> m_pub;
std::shared_ptr<eprosima::fastrtps::Subscriber> m_sub;
eProsimaClockPubSubType m_type;
// counter state
CTimeSpan counter; // keeps the former state
CTime reference;
// List of available publishers
std::set<eprosima::fastrtps::rtps::GUID_t> m_publishers;
public:
CeProsimaClockApp();
// Overrides
public:
virtual BOOL InitInstance();
void OnTimer(UINT_PTR nIDEvent);
void OnCloseDialog();
protected:
void createPublisher();
void createSubscriber();
// Listener overrides, only interested on the publishers
void onSubscriptionMatched(eprosima::fastrtps::Subscriber* sub, eprosima::fastrtps::rtps::MatchingInfo& info) override;
void onNewDataMessage(eprosima::fastrtps::Subscriber* sub) override;
// Implementation
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnBnClickedEndpointType();
afx_msg void OnUpdateDisplays(CCmdUI *pCmdUI);
afx_msg void OnUpdateEndpointKind(CCmdUI *pCmdUI);
afx_msg void OnUpdateTimerState(CCmdUI *pCmdUI);
};