233 virtual ~UNetExchange();
236 static std::shared_ptr<UNetExchange>
init_unetexchange(
int argc,
const char*
const argv[],
237 uniset::ObjectId shmID,
const std::shared_ptr<SharedMemory>& ic = 0,
const std::string& prefix =
"unet" );
240 static void help_print(
int argc,
const char* argv[] )
noexcept;
242 bool checkExistTransport(
const std::string& transportID )
noexcept;
244 inline std::shared_ptr<LogAgregator> getLogAggregator()
noexcept
248 inline std::shared_ptr<DebugStream> log()
noexcept
259 std::string s_fvalue;
261 std::shared_ptr<SMInterface> shm;
262 void step()
noexcept;
267 void askSensors( UniversalIO::UIOCommand cmd );
269 void receiverEvent(
const std::shared_ptr<UNetReceiver>& r,
UNetReceiver::Event ev )
noexcept;
276 void termReceivers();
278 void initMulticastTransport( UniXML::iterator nodes,
const std::string& n_field,
const std::string& n_fvalue,
const std::string& prefix );
279 void initMulticastReceiverForNode( UniXML::iterator root, UniXML::iterator n_it,
const std::string& prefix );
281 void initUDPTransport(UniXML::iterator nodes,
const std::string& n_field,
const std::string& n_fvalue,
const std::string& prefix);
282 void initIterators()
noexcept;
283 void startReceivers();
292 timeout_t initPause = { 0 };
297 timeout_t maxHeartBeat = { 10 };
298 IOController::IOStateList::iterator itHeartBeat;
301 timeout_t steptime = { 1000 };
303 std::atomic_bool activated = {
false };
304 std::atomic_bool cancelled = {
false };
305 timeout_t activateTimeout = { 20000 };
309 ReceiverInfo()
noexcept: r1(
nullptr), r2(
nullptr),
311 respondInvert(
false),
316 ReceiverInfo(
const std::shared_ptr<UNetReceiver>& _r1,
const std::shared_ptr<UNetReceiver>& _r2 )
noexcept:
319 respondInvert(
false),
324 std::shared_ptr<UNetReceiver> r1;
325 std::shared_ptr<UNetReceiver> r2;
327 void step(
const std::shared_ptr<SMInterface>& shm,
const std::string& myname, std::shared_ptr<DebugStream>& log )
noexcept;
329 inline void setRespondID(
uniset::ObjectId id,
bool invert =
false )
noexcept
332 respondInvert = invert;
345 sidChannelSwitchCount = id;
348 inline void initIterators(
const std::shared_ptr<SMInterface>& shm )
noexcept
350 shm->initIterator(itLostPackets);
351 shm->initIterator(itRespond);
352 shm->initIterator(itChannelNum);
353 shm->initIterator(itChannelSwitchCount);
362 IOController::IOStateList::iterator itRespond;
363 bool respondInvert = {
false };
365 IOController::IOStateList::iterator itLostPackets;
367 IOController::IOStateList::iterator itChannelNum;
369 long channelSwitchCount = { 0 };
371 IOController::IOStateList::iterator itChannelSwitchCount;
374 typedef std::deque<ReceiverInfo> ReceiverList;
375 ReceiverList recvlist;
377 bool no_sender = {
false };
378 std::shared_ptr<UNetSender> sender;
379 std::shared_ptr<UNetSender> sender2;
381 std::shared_ptr<LogAgregator> loga;
382 std::shared_ptr<DebugStream> unetlog;
383 std::shared_ptr<LogServer> logserv;
384 std::string logserv_host = {
""};
385 int logserv_port = {0};
static std::shared_ptr< UNetExchange > init_unetexchange(int argc, const char *const argv[], uniset::ObjectId shmID, const std::shared_ptr< SharedMemory > &ic=0, const std::string &prefix="unet")
Определения UNetUDP/unetexchange.cc:635