MADARA
3.1.8
Main Page
Namespaces
Classes
Files
File List
File Members
Transport.inl
Go to the documentation of this file.
1
#ifndef _TRANSPORT_INL_
2
#define _TRANSPORT_INL_
3
4
#include "
Transport.h
"
5
6
inline
int
madara::transport::Base::validate_transport
(
void
)
7
{
8
is_valid_
=
true
;
9
shutting_down_
=
false
;
10
valid_setup_
.broadcast ();
11
12
madara_logger_log
(
context_
.
get_logger
(),
logger::LOG_MINOR
,
13
"transport::validate_transport: transport is ready\n"
);
14
15
return
0;
16
}
17
18
inline
int
19
madara::transport::Base::check_transport
(
void
)
20
{
21
madara_logger_log
(
context_
.
get_logger
(),
logger::LOG_DETAILED
,
22
"transport::check_transport: checking for valid transport\n"
);
23
24
if
(!
is_valid_
)
25
return
-2;
26
27
if
(
shutting_down_
)
28
return
-1;
29
30
return
0;
31
}
32
33
inline
void
34
madara::transport::Base::invalidate_transport
(
void
)
35
{
36
is_valid_
=
false
;
37
shutting_down_
=
true
;
38
valid_setup_
.broadcast ();
39
40
madara_logger_log
(
context_
.
get_logger
(),
logger::LOG_DETAILED
,
41
"transport::invalidate_transport: invalidating transport\n"
);
42
}
43
44
inline
madara::transport::TransportSettings
&
45
madara::transport::Base::settings
(
void
)
46
{
47
return
settings_
;
48
}
49
50
#endif
madara::transport::Base::is_valid_
volatile bool is_valid_
Definition:
Transport.h:179
madara::transport::Base::settings_
QoSTransportSettings settings_
Definition:
Transport.h:188
madara::logger::LOG_DETAILED
Definition:
Logger.h:79
madara::transport::Base::invalidate_transport
void invalidate_transport(void)
Invalidates a transport to indicate it is shutting down.
Definition:
Transport.inl:34
madara::transport::Base::validate_transport
int validate_transport(void)
Validates a transport to indicate it is not shutting down.
Definition:
Transport.inl:6
madara::transport::TransportSettings
Holds basic transport settings.
Definition:
TransportSettings.h:92
madara_logger_log
#define madara_logger_log(logger, level,...)
Fast version of the madara::logger::log method.
Definition:
Logger.h:20
Transport.h
madara::transport::Base::shutting_down_
volatile bool shutting_down_
Definition:
Transport.h:180
madara::transport::Base::valid_setup_
Condition valid_setup_
Definition:
Transport.h:183
madara::logger::LOG_MINOR
Definition:
Logger.h:77
madara::knowledge::ThreadSafeContext::get_logger
logger::Logger & get_logger(void) const
Gets the logger used for information printing.
Definition:
ThreadSafeContext.inl:664
madara::transport::Base::context_
madara::knowledge::ThreadSafeContext & context_
Definition:
Transport.h:191
madara::transport::Base::check_transport
int check_transport(void)
all subclasses should call this method at the beginning of send_data
Definition:
Transport.inl:19
madara::transport::Base::settings
TransportSettings & settings(void)
Getter for the transport settings.
Definition:
Transport.inl:45
include
madara
transport
Transport.inl
Generated on Wed May 9 2018 18:17:17 for MADARA by
1.8.11