Skip to content

Commit 14fc7d1

Browse files
committed
Release v3.0
2 parents 393762f + c1bbe05 commit 14fc7d1

111 files changed

Lines changed: 3605 additions & 4686 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 30 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -56,60 +56,48 @@ cc_msvc_force_warn_opt(/W4)
5656

5757
include(GNUInstallDirs)
5858

59-
set (CORE_LIB_NAME "cc_tools_qt_plugin_cc_mqtt5_protocol_core")
59+
set (INTERFACE_LIB_PREFIX "cc_tools_qt_plugin_cc_mqtt5")
6060

6161
######################################################################
6262

63-
function (cc_plugin_core)
64-
set (name ${CORE_LIB_NAME})
63+
function (cc_plugin_Message)
64+
set (name ${INTERFACE_LIB_PREFIX}_Message)
6565
set (src
66-
cc_tools_qt_plugin/cc_mqtt5/field/BinData.cpp
67-
cc_tools_qt_plugin/cc_mqtt5/field/EnableEnum.cpp
68-
cc_tools_qt_plugin/cc_mqtt5/field/Length.cpp
69-
cc_tools_qt_plugin/cc_mqtt5/field/MsgId.cpp
70-
cc_tools_qt_plugin/cc_mqtt5/field/PacketId.cpp
71-
cc_tools_qt_plugin/cc_mqtt5/field/PropertiesList.cpp
72-
cc_tools_qt_plugin/cc_mqtt5/field/Property.cpp
73-
cc_tools_qt_plugin/cc_mqtt5/field/ProtocolName.cpp
74-
cc_tools_qt_plugin/cc_mqtt5/field/Qos.cpp
75-
cc_tools_qt_plugin/cc_mqtt5/field/ReasonCode.cpp
76-
cc_tools_qt_plugin/cc_mqtt5/field/String.cpp
77-
cc_tools_qt_plugin/cc_mqtt5/field/Topic.cpp
78-
cc_tools_qt_plugin/cc_mqtt5/field/VarLenInt.cpp
79-
cc_tools_qt_plugin/cc_mqtt5/message/Auth.cpp
80-
cc_tools_qt_plugin/cc_mqtt5/message/Connack.cpp
81-
cc_tools_qt_plugin/cc_mqtt5/message/Connect.cpp
82-
cc_tools_qt_plugin/cc_mqtt5/message/Disconnect.cpp
83-
cc_tools_qt_plugin/cc_mqtt5/message/Pingreq.cpp
84-
cc_tools_qt_plugin/cc_mqtt5/message/Pingresp.cpp
85-
cc_tools_qt_plugin/cc_mqtt5/message/Puback.cpp
86-
cc_tools_qt_plugin/cc_mqtt5/message/Pubcomp.cpp
87-
cc_tools_qt_plugin/cc_mqtt5/message/Publish.cpp
88-
cc_tools_qt_plugin/cc_mqtt5/message/Pubrec.cpp
89-
cc_tools_qt_plugin/cc_mqtt5/message/Pubrel.cpp
90-
cc_tools_qt_plugin/cc_mqtt5/message/Suback.cpp
91-
cc_tools_qt_plugin/cc_mqtt5/message/Subscribe.cpp
92-
cc_tools_qt_plugin/cc_mqtt5/message/Unsuback.cpp
93-
cc_tools_qt_plugin/cc_mqtt5/message/Unsubscribe.cpp
94-
cc_tools_qt_plugin/cc_mqtt5/Message.cpp
95-
cc_tools_qt_plugin/cc_mqtt5/frame/FrameTransportMessage.cpp
96-
cc_tools_qt_plugin/cc_mqtt5/factory/AllMessagesDynMemMsgFactory.cpp
66+
cc_tools_qt_plugin/Message/cc_mqtt5/Message.cpp
67+
cc_tools_qt_plugin/Message/cc_mqtt5/message/Auth.cpp
68+
cc_tools_qt_plugin/Message/cc_mqtt5/message/Connack.cpp
69+
cc_tools_qt_plugin/Message/cc_mqtt5/message/Connect.cpp
70+
cc_tools_qt_plugin/Message/cc_mqtt5/message/Disconnect.cpp
71+
cc_tools_qt_plugin/Message/cc_mqtt5/message/Pingreq.cpp
72+
cc_tools_qt_plugin/Message/cc_mqtt5/message/Pingresp.cpp
73+
cc_tools_qt_plugin/Message/cc_mqtt5/message/Puback.cpp
74+
cc_tools_qt_plugin/Message/cc_mqtt5/message/Pubcomp.cpp
75+
cc_tools_qt_plugin/Message/cc_mqtt5/message/Publish.cpp
76+
cc_tools_qt_plugin/Message/cc_mqtt5/message/Pubrec.cpp
77+
cc_tools_qt_plugin/Message/cc_mqtt5/message/Pubrel.cpp
78+
cc_tools_qt_plugin/Message/cc_mqtt5/message/Suback.cpp
79+
cc_tools_qt_plugin/Message/cc_mqtt5/message/Subscribe.cpp
80+
cc_tools_qt_plugin/Message/cc_mqtt5/message/Unsuback.cpp
81+
cc_tools_qt_plugin/Message/cc_mqtt5/message/Unsubscribe.cpp
82+
cc_tools_qt_plugin/Message/cc_mqtt5/frame/FrameTransportMessage.cpp
83+
cc_tools_qt_plugin/Message/cc_mqtt5/frame/Frame.cpp
84+
cc_tools_qt_plugin/Message/cc_mqtt5/factory/MsgFactory.cpp
9785
)
9886

9987
add_library (${name} STATIC ${src})
88+
set_target_properties(${name} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
10089
target_link_libraries (${name} PUBLIC cc::cc_mqtt5 cc::comms cc::cc_tools_qt Qt${OPT_QT_MAJOR_VERSION}::Widgets Qt${OPT_QT_MAJOR_VERSION}::Core)
10190
target_include_directories (${name} PUBLIC ${PROJECT_SOURCE_DIR})
10291
target_compile_options(${name} PRIVATE
10392
$<$<CXX_COMPILER_ID:MSVC>:/bigobj /wd4127 /wd5054>
10493
$<$<CXX_COMPILER_ID:GNU>:-ftemplate-depth=2048 -fconstexpr-depth=4096 -Wno-unused-local-typedefs>
10594
$<$<CXX_COMPILER_ID:Clang>:-ftemplate-depth=2048 -fconstexpr-depth=4096 -fbracket-depth=2048 -Wno-unused-local-typedefs>
10695
)
107-
10896
endfunction()
10997

11098
######################################################################
11199

112-
function (cc_plugin protocol has_config_widget)
100+
function (cc_plugin protocol interface)
113101
string(TOLOWER "cc_tools_plugin_${protocol}" name)
114102

115103
if (NOT "${name}" MATCHES ".*_protocol$")
@@ -133,22 +121,19 @@ function (cc_plugin protocol has_config_widget)
133121
cc_tools_qt_plugin/cc_mqtt5/plugin/Plugin_${protocol}.h
134122
)
135123

136-
if (has_config_widget)
137-
list (APPEND src cc_tools_qt_plugin/cc_mqtt5/plugin/ConfigWidget_${protocol}.cpp)
138-
endif ()
139-
140124
set(extra_link_opts)
141-
if (CMAKE_COMPILER_IS_GNUCC)
125+
if ((CMAKE_COMPILER_IS_GNUCC) OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
142126
set(extra_link_opts "-Wl,--no-undefined")
143127
endif ()
144128

145-
add_library (${name} MODULE ${src} ${moc})
146-
target_link_libraries (${name} ${CORE_LIB_NAME} cc::cc_tools_qt Qt${OPT_QT_MAJOR_VERSION}::Widgets Qt${OPT_QT_MAJOR_VERSION}::Core ${extra_link_opts})
129+
add_library (${name} MODULE ${src})
130+
target_link_libraries (${name} ${INTERFACE_LIB_PREFIX}_${interface} cc::cc_tools_qt Qt${OPT_QT_MAJOR_VERSION}::Core ${extra_link_opts})
147131
target_compile_options(${name} PRIVATE
148132
$<$<CXX_COMPILER_ID:MSVC>:/bigobj /wd4127 /wd5054>
149133
$<$<CXX_COMPILER_ID:GNU>:-ftemplate-depth=2048 -fconstexpr-depth=4096>
150134
$<$<CXX_COMPILER_ID:Clang>:-ftemplate-depth=2048 -fconstexpr-depth=4096 -fbracket-depth=2048>
151135
)
136+
target_include_directories (${name} PRIVATE ${PROJECT_SOURCE_DIR})
152137

153138
install (
154139
TARGETS ${name}
@@ -174,6 +159,6 @@ if (TARGET cc::cc_tools_qt)
174159
include_directories (${cc_inc})
175160
endif ()
176161

177-
cc_plugin_core()
162+
cc_plugin_Message()
178163

179-
cc_plugin ("CC_MQTT_v5" FALSE)
164+
cc_plugin ("CC_MQTT_v5" "Message")
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Generated by commsdsl2tools_qt v7.0.0
2+
3+
#include "Message.h"
4+
5+
namespace cc_tools_qt_plugin
6+
{
7+
8+
namespace Message
9+
{
10+
11+
namespace cc_mqtt5
12+
{
13+
14+
Message::Message() = default;
15+
16+
Message::~Message() noexcept = default;
17+
18+
} // namespace cc_mqtt5
19+
20+
} // namespace Message
21+
22+
} // namespace cc_tools_qt_plugin
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Generated by commsdsl2tools_qt v7.0.0
2+
3+
#pragma once
4+
5+
#include "cc_mqtt5/Message.h"
6+
#include "cc_tools_qt/ToolsMessage.h"
7+
#include "cc_tools_qt/ToolsProtMsgInterface.h"
8+
#include "cc_tools_qt_plugin/cc_mqtt5/Version.h"
9+
#include "cc_tools_qt_plugin/cc_mqtt5/options/DefaultOptions.h"
10+
11+
namespace cc_tools_qt_plugin
12+
{
13+
14+
namespace Message
15+
{
16+
17+
namespace cc_mqtt5
18+
{
19+
20+
class Message : public cc_tools_qt::ToolsMessage
21+
{
22+
public:
23+
using ProtInterface = cc_tools_qt::ToolsProtMsgInterface<::cc_mqtt5::Message>;
24+
using ProtOptions = cc_tools_qt_plugin::cc_mqtt5::options::DefaultOptions;
25+
Message();
26+
virtual ~Message() noexcept;
27+
};
28+
29+
} // namespace cc_mqtt5
30+
31+
} // namespace Message
32+
33+
} // namespace cc_tools_qt_plugin
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// Generated by commsdsl2tools_qt v7.0.0
2+
3+
#include "MsgFactory.h"
4+
5+
#include "cc_tools_qt_plugin/Message/cc_mqtt5/message/Auth.h"
6+
#include "cc_tools_qt_plugin/Message/cc_mqtt5/message/Connack.h"
7+
#include "cc_tools_qt_plugin/Message/cc_mqtt5/message/Connect.h"
8+
#include "cc_tools_qt_plugin/Message/cc_mqtt5/message/Disconnect.h"
9+
#include "cc_tools_qt_plugin/Message/cc_mqtt5/message/Pingreq.h"
10+
#include "cc_tools_qt_plugin/Message/cc_mqtt5/message/Pingresp.h"
11+
#include "cc_tools_qt_plugin/Message/cc_mqtt5/message/Puback.h"
12+
#include "cc_tools_qt_plugin/Message/cc_mqtt5/message/Pubcomp.h"
13+
#include "cc_tools_qt_plugin/Message/cc_mqtt5/message/Publish.h"
14+
#include "cc_tools_qt_plugin/Message/cc_mqtt5/message/Pubrec.h"
15+
#include "cc_tools_qt_plugin/Message/cc_mqtt5/message/Pubrel.h"
16+
#include "cc_tools_qt_plugin/Message/cc_mqtt5/message/Suback.h"
17+
#include "cc_tools_qt_plugin/Message/cc_mqtt5/message/Subscribe.h"
18+
#include "cc_tools_qt_plugin/Message/cc_mqtt5/message/Unsuback.h"
19+
#include "cc_tools_qt_plugin/Message/cc_mqtt5/message/Unsubscribe.h"
20+
21+
namespace cc_tools_qt_plugin
22+
{
23+
24+
namespace Message
25+
{
26+
27+
namespace cc_mqtt5
28+
{
29+
30+
namespace factory
31+
{
32+
33+
MsgFactory::MsgFactory() = default;
34+
MsgFactory::~MsgFactory() = default;
35+
36+
MsgFactory::MessagesListInternal MsgFactory::createAllMessagesImpl()
37+
{
38+
return
39+
MessagesListInternal{
40+
cc_tools_qt::ToolsMessagePtr(new cc_tools_qt_plugin::Message::cc_mqtt5::message::Connect),
41+
cc_tools_qt::ToolsMessagePtr(new cc_tools_qt_plugin::Message::cc_mqtt5::message::Connack),
42+
cc_tools_qt::ToolsMessagePtr(new cc_tools_qt_plugin::Message::cc_mqtt5::message::Publish),
43+
cc_tools_qt::ToolsMessagePtr(new cc_tools_qt_plugin::Message::cc_mqtt5::message::Puback),
44+
cc_tools_qt::ToolsMessagePtr(new cc_tools_qt_plugin::Message::cc_mqtt5::message::Pubrec),
45+
cc_tools_qt::ToolsMessagePtr(new cc_tools_qt_plugin::Message::cc_mqtt5::message::Pubrel),
46+
cc_tools_qt::ToolsMessagePtr(new cc_tools_qt_plugin::Message::cc_mqtt5::message::Pubcomp),
47+
cc_tools_qt::ToolsMessagePtr(new cc_tools_qt_plugin::Message::cc_mqtt5::message::Subscribe),
48+
cc_tools_qt::ToolsMessagePtr(new cc_tools_qt_plugin::Message::cc_mqtt5::message::Suback),
49+
cc_tools_qt::ToolsMessagePtr(new cc_tools_qt_plugin::Message::cc_mqtt5::message::Unsubscribe),
50+
cc_tools_qt::ToolsMessagePtr(new cc_tools_qt_plugin::Message::cc_mqtt5::message::Unsuback),
51+
cc_tools_qt::ToolsMessagePtr(new cc_tools_qt_plugin::Message::cc_mqtt5::message::Pingreq),
52+
cc_tools_qt::ToolsMessagePtr(new cc_tools_qt_plugin::Message::cc_mqtt5::message::Pingresp),
53+
cc_tools_qt::ToolsMessagePtr(new cc_tools_qt_plugin::Message::cc_mqtt5::message::Disconnect),
54+
cc_tools_qt::ToolsMessagePtr(new cc_tools_qt_plugin::Message::cc_mqtt5::message::Auth)
55+
};
56+
}
57+
58+
} // namespace factory
59+
60+
} // namespace cc_mqtt5
61+
62+
} // namespace Message
63+
64+
} // namespace cc_tools_qt_plugin
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Generated by commsdsl2tools_qt v7.0.0
2+
3+
#pragma once
4+
5+
#include "cc_tools_qt/ToolsMsgFactory.h"
6+
7+
namespace cc_tools_qt_plugin
8+
{
9+
10+
namespace Message
11+
{
12+
13+
namespace cc_mqtt5
14+
{
15+
16+
namespace factory
17+
{
18+
19+
class MsgFactory : public cc_tools_qt::ToolsMsgFactory
20+
{
21+
public:
22+
MsgFactory();
23+
virtual ~MsgFactory();
24+
25+
protected:
26+
virtual MessagesListInternal createAllMessagesImpl() override;
27+
};
28+
29+
} // namespace factory
30+
31+
} // namespace cc_mqtt5
32+
33+
} // namespace Message
34+
35+
} // namespace cc_tools_qt_plugin
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
// Generated by commsdsl2tools_qt v7.0.0
2+
3+
#include "Frame.h"
4+
5+
#include "cc_mqtt5/frame/Frame.h"
6+
#include "cc_tools_qt/ToolsFrameBase.h"
7+
#include "cc_tools_qt_plugin/Message/cc_mqtt5/Message.h"
8+
#include "cc_tools_qt_plugin/Message/cc_mqtt5/factory/MsgFactory.h"
9+
#include "cc_tools_qt_plugin/Message/cc_mqtt5/frame/FrameTransportMessage.h"
10+
#include "cc_tools_qt_plugin/cc_mqtt5/Version.h"
11+
#include "cc_tools_qt_plugin/cc_mqtt5/options/DefaultOptions.h"
12+
13+
namespace cc_tools_qt_plugin
14+
{
15+
16+
namespace Message
17+
{
18+
19+
namespace cc_mqtt5
20+
{
21+
22+
namespace frame
23+
{
24+
25+
namespace
26+
{
27+
using ProtFrame =
28+
::cc_mqtt5::frame::Frame<
29+
cc_tools_qt_plugin::Message::cc_mqtt5::Message::ProtInterface,
30+
::cc_mqtt5::input::AllMessages<cc_tools_qt_plugin::Message::cc_mqtt5::Message::ProtInterface, cc_tools_qt_plugin::cc_mqtt5::options::DefaultOptions>,
31+
cc_tools_qt_plugin::cc_mqtt5::options::DefaultOptions
32+
>;
33+
}// namespace
34+
35+
class FrameImpl : public
36+
cc_tools_qt::ToolsFrameBase<
37+
cc_tools_qt_plugin::Message::cc_mqtt5::Message,
38+
ProtFrame,
39+
cc_tools_qt_plugin::Message::cc_mqtt5::factory::MsgFactory,
40+
cc_tools_qt_plugin::Message::cc_mqtt5::frame::FrameTransportMessage
41+
>
42+
{
43+
};
44+
45+
Frame::Frame() :
46+
m_pImpl(new FrameImpl){
47+
}
48+
49+
Frame::~Frame() = default;
50+
51+
cc_tools_qt::ToolsMessagesList Frame::readDataImpl(const cc_tools_qt::ToolsDataInfo& dataInfo, bool final)
52+
{
53+
return m_pImpl->readData(dataInfo, final);
54+
}
55+
56+
void Frame::updateMessageImpl(cc_tools_qt::ToolsMessage& msg)
57+
{
58+
return m_pImpl->updateMessage(msg);
59+
}
60+
61+
cc_tools_qt::ToolsMessagePtr Frame::createInvalidMessageImpl()
62+
{
63+
return m_pImpl->createInvalidMessage();
64+
}
65+
66+
cc_tools_qt::ToolsMessagePtr Frame::createRawDataMessageImpl()
67+
{
68+
return m_pImpl->createRawDataMessage();
69+
}
70+
71+
cc_tools_qt::ToolsMessagePtr Frame::createExtraInfoMessageImpl()
72+
{
73+
return m_pImpl->createExtraInfoMessage();
74+
}
75+
76+
cc_tools_qt::ToolsMessagesList Frame::createAllMessagesImpl()
77+
{
78+
return m_pImpl->createAllMessages();
79+
}
80+
81+
cc_tools_qt::ToolsMessagePtr Frame::createMessageImpl(const QString& idAsString, unsigned idx)
82+
{
83+
return m_pImpl->createMessage(idAsString, idx);
84+
}
85+
86+
} // namespace frame
87+
88+
} // namespace cc_mqtt5
89+
90+
} // namespace Message
91+
92+
} // namespace cc_tools_qt_plugin

0 commit comments

Comments
 (0)