DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq::snbmodules::protocol_type Struct Reference

#include <protocols_enum.hpp>

Public Types

enum  e_protocol_type { BITTORRENT , RCLONE , SCP , dummy }
 Different type of protocols available for communication. More...
 

Static Public Member Functions

static std::string protocols_to_string (e_protocol_type e)
 
static std::optional< e_protocol_typestring_to_protocols (std::string s)
 

Detailed Description

Definition at line 17 of file protocols_enum.hpp.

Member Enumeration Documentation

◆ e_protocol_type

Different type of protocols available for communication.

Enumerator
BITTORRENT 
RCLONE 
SCP 
dummy 

Definition at line 20 of file protocols_enum.hpp.

Member Function Documentation

◆ protocols_to_string()

static std::string dunedaq::snbmodules::protocol_type::protocols_to_string ( e_protocol_type e)
inlinestatic

Definition at line 28 of file protocols_enum.hpp.

29 {
30 const std::map<e_protocol_type, std::string> MyEnumStrings{
31 { BITTORRENT, "BITTORRENT" }, { RCLONE, "RCLONE" }, { SCP, "SCP" }, { dummy, "dummy" }
32 };
33 auto it = MyEnumStrings.find(e);
34 return it == MyEnumStrings.end() ? "Not supported" : it->second;
35 }

◆ string_to_protocols()

static std::optional< e_protocol_type > dunedaq::snbmodules::protocol_type::string_to_protocols ( std::string s)
inlinestatic

Definition at line 37 of file protocols_enum.hpp.

38 {
39 const std::map<std::string, e_protocol_type> MyStringsEnum{
40 { "BITTORRENT", BITTORRENT }, { "RCLONE", RCLONE }, { "SCP", SCP }, { "dummy", dummy }
41 };
42 auto it = MyStringsEnum.find(s);
43 if (it == MyStringsEnum.end()) {
44 return std::nullopt;
45 }
46 return it->second;
47 }

The documentation for this struct was generated from the following file: