summaryrefslogtreecommitdiffstats
path: root/src/stateless/messaging/trex_stateless_messaging.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/stateless/messaging/trex_stateless_messaging.cpp')
-rw-r--r--src/stateless/messaging/trex_stateless_messaging.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/stateless/messaging/trex_stateless_messaging.cpp b/src/stateless/messaging/trex_stateless_messaging.cpp
index 3e754649..032559bc 100644
--- a/src/stateless/messaging/trex_stateless_messaging.cpp
+++ b/src/stateless/messaging/trex_stateless_messaging.cpp
@@ -29,6 +29,21 @@ limitations under the License.
TrexStatelessDpStart::TrexStatelessDpStart(TrexStreamsCompiledObj *obj) : m_obj(obj) {
}
+
+/**
+ * clone for DP start message
+ *
+ */
+TrexStatelessCpToDpMsgBase *
+TrexStatelessDpStart::clone() {
+
+ TrexStreamsCompiledObj *new_obj = m_obj->clone();
+
+ TrexStatelessCpToDpMsgBase *new_msg = new TrexStatelessDpStart(new_obj);
+
+ return new_msg;
+}
+
TrexStatelessDpStart::~TrexStatelessDpStart() {
if (m_obj) {
delete m_obj;
@@ -51,3 +66,13 @@ TrexStatelessDpStop::handle(TrexStatelessDpCore *dp_core) {
return true;
}
+/**
+ * clone for DP stop message
+ *
+ */
+TrexStatelessCpToDpMsgBase *
+TrexStatelessDpStop::clone() {
+ TrexStatelessCpToDpMsgBase *new_msg = new TrexStatelessDpStop(m_port_id);
+
+ return new_msg;
+}