Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
eosd_def Class Reference
Collaboration diagram for eosd_def:

Public Member Functions

 eosd_def ()
 
void set_host (host_def *h, bool is_bios)
 
void mk_dot_label ()
 
const string & dot_label ()
 
string get_node_num () const
 

Public Attributes

string config_dir_name
 
string data_dir_name
 
uint16_t p2p_port
 
uint16_t http_port
 
uint16_t file_size
 
string name
 
tn_node_defnode
 
string host
 
string p2p_endpoint
 

Detailed Description

Definition at line 195 of file main.cpp.

Constructor & Destructor Documentation

◆ eosd_def()

eosd_def::eosd_def ( )
inline

Definition at line 197 of file main.cpp.

198 : config_dir_name (),
199 data_dir_name (),
200 p2p_port(),
201 http_port(),
202 file_size(),
203 name(),
204 node(),
205 host(),
206 p2p_endpoint() {}
string config_dir_name
Definition main.cpp:210
uint16_t file_size
Definition main.cpp:214
string name
Definition main.cpp:215
string p2p_endpoint
Definition main.cpp:218
string host
Definition main.cpp:217
tn_node_def * node
Definition main.cpp:216
uint16_t http_port
Definition main.cpp:213
uint16_t p2p_port
Definition main.cpp:212
string data_dir_name
Definition main.cpp:211

Member Function Documentation

◆ dot_label()

const string & eosd_def::dot_label ( )
inline

Definition at line 222 of file main.cpp.

222 {
223 if (dot_label_str.empty() ) {
224 mk_dot_label();
225 }
226 return dot_label_str;
227 }
void mk_dot_label()
Definition main.cpp:248
Here is the call graph for this function:

◆ get_node_num()

string eosd_def::get_node_num ( ) const
inline

Definition at line 229 of file main.cpp.

229 {
230 return name.substr( name.length() - 2 );
231 }
Here is the caller graph for this function:

◆ mk_dot_label()

void eosd_def::mk_dot_label ( )

Definition at line 248 of file main.cpp.

248 {
249 dot_label_str = name + "\\nprod=";
250 if (node == 0 || node->producers.empty()) {
251 dot_label_str += "<none>";
252 }
253 else {
254 bool docomma = false;
255 for (auto &prod: node->producers) {
256 if (docomma)
257 dot_label_str += ",";
258 else
259 docomma = true;
260 dot_label_str += prod;
261 }
262 }
263}
vector< string > producers
Definition main.cpp:241
Here is the caller graph for this function:

◆ set_host()

void eosd_def::set_host ( host_def * h,
bool is_bios )

Definition at line 266 of file main.cpp.

266 {
267 host = h->host_name;
268 p2p_port = is_bios ? h->p2p_bios_port() : h->p2p_port();
269 http_port = is_bios ? h->http_bios_port() : h->http_port();
271 p2p_endpoint = h->public_name + ":" + boost::lexical_cast<string, uint16_t>(p2p_port);
272}
uint16_t p2p_bios_port()
Definition main.cpp:155
uint16_t http_port()
Definition main.cpp:151
string host_name
Definition main.cpp:139
uint16_t p2p_port()
Definition main.cpp:147
uint16_t def_file_size
Definition main.cpp:144
string public_name
Definition main.cpp:140
uint16_t http_bios_port()
Definition main.cpp:159
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ config_dir_name

string eosd_def::config_dir_name

Definition at line 210 of file main.cpp.

◆ data_dir_name

string eosd_def::data_dir_name

Definition at line 211 of file main.cpp.

◆ file_size

uint16_t eosd_def::file_size

Definition at line 214 of file main.cpp.

◆ host

string eosd_def::host

Definition at line 217 of file main.cpp.

◆ http_port

uint16_t eosd_def::http_port

Definition at line 213 of file main.cpp.

◆ name

string eosd_def::name

Definition at line 215 of file main.cpp.

◆ node

tn_node_def* eosd_def::node

Definition at line 216 of file main.cpp.

◆ p2p_endpoint

string eosd_def::p2p_endpoint

Definition at line 218 of file main.cpp.

◆ p2p_port

uint16_t eosd_def::p2p_port

Definition at line 212 of file main.cpp.


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