DDS  ver. 3.4
Classes | Namespaces | Macros | Enumerations
OctopusTestImpl.h File Reference
#include "Intercom.h"
#include "OctopusProtocol.h"
#include "Options.h"
#include <condition_variable>
#include <iostream>
#include <mutex>
#include <boost/property_tree/json_parser.hpp>

Go to the source code of this file.

Classes

class  dds::dds_octopus::COctopusTestImpl< T >
 

Namespaces

 dds
 
 dds::dds_octopus
 

Macros

#define BEGIN_OCTOPUS_MSG_MAP(name)
 
#define OCTOPUS_MSG_HANDLER(func, cmd)
 
#define END_OCTOPUS_MSG_MAP
 

Enumerations

enum  dds::dds_octopus::ETestStatus { dds::dds_octopus::TS_OK, dds::dds_octopus::TS_FAILED, dds::dds_octopus::TS_TIMEOUT }
 

Macro Definition Documentation

◆ BEGIN_OCTOPUS_MSG_MAP

#define BEGIN_OCTOPUS_MSG_MAP (   name)
Value:
std::string _name() const \
{ \
return name; \
} \
\
void _onCustomCmd(const std::string& _command, const std::string& _condition, uint64_t _senderId) \
{ \
boost::property_tree::ptree root; \
std::stringstream ss; \
ss << _command; \
boost::property_tree::read_json(ss, root); \
for (const auto& node : root) \
{ \
if (node.first == dds_octopus::SOctopusProtocol_Log::class_name()) \
{ \
dds_octopus::SOctopusProtocol_Log log; \
log.init(node.second); \
std::cout << "Task: " << log.m_sVal << std::endl; \
continue; \
}

◆ END_OCTOPUS_MSG_MAP

#define END_OCTOPUS_MSG_MAP
Value:
} \
}

◆ OCTOPUS_MSG_HANDLER

#define OCTOPUS_MSG_HANDLER (   func,
  cmd 
)
Value:
else if (node.first == cmd::class_name()) \
{ \
cmd var; \
var.init(node.second); \
func(var, _senderId); \
continue; \
}