Skip to content
GitLab
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
ITS - Intelligent Transport Systems
ITS
Compare revisions
84c42dd2049756813c8e4a7c927f9ea7e2b11cb9...f6d8a00aca4f3cb86d4506ea06bafdf6faf119b2
Hide whitespace changes
Inline
Side-by-side
ccsrc/Ports/LibIts_ports/DCC_ports/RrxPort.hh
View file @
f6d8a00a
...
...
@@ -14,30 +14,28 @@
namespace
LibItsDcc__TestSystem
{
class
RrxPort
:
public
RrxPort_BASE
{
public:
RrxPort
(
const
char
*
par_port_name
=
NULL
);
~
RrxPort
();
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error); */
void
Handle_Fd_Event_Error
(
int
fd
);
void
Handle_Fd_Event_Writable
(
int
fd
);
void
Handle_Fd_Event_Readable
(
int
fd
);
/* void Handle_Timeout(double time_since_last_call); */
protected:
void
user_map
(
const
char
*
system_port
);
void
user_unmap
(
const
char
*
system_port
);
void
user_start
();
void
user_stop
();
};
}
/* end of namespace */
class
RrxPort
:
public
RrxPort_BASE
{
public:
RrxPort
(
const
char
*
par_port_name
=
NULL
);
~
RrxPort
();
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error); */
void
Handle_Fd_Event_Error
(
int
fd
);
void
Handle_Fd_Event_Writable
(
int
fd
);
void
Handle_Fd_Event_Readable
(
int
fd
);
/* void Handle_Timeout(double time_since_last_call); */
protected:
void
user_map
(
const
char
*
system_port
);
void
user_unmap
(
const
char
*
system_port
);
void
user_start
();
void
user_stop
();
};
}
// namespace LibItsDcc__TestSystem
#endif
ccsrc/Ports/LibIts_ports/DCC_ports/UpperTesterPort_DCC.cc
View file @
f6d8a00a
...
...
@@ -2,71 +2,33 @@
//=============================================================================
namespace
LibItsDcc__TestSystem
{
UpperTesterPort
::
UpperTesterPort
(
const
char
*
par_port_name
)
:
UpperTesterPort_BASE
(
par_port_name
)
{
UpperTesterPort
::
UpperTesterPort
(
const
char
*
par_port_name
)
:
UpperTesterPort_BASE
(
par_port_name
)
{}
}
UpperTesterPort
::~
UpperTesterPort
()
{
}
UpperTesterPort
::~
UpperTesterPort
()
{
void
UpperTesterPort
::
set_parameter
(
const
char
*
/*parameter_name*/
,
const
char
*
/*parameter_value*/
)
{}
}
/*void UpperTesterPort::Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error) {}*/
void
UpperTesterPort
::
set_parameter
(
const
char
*
/*parameter_name*/
,
const
char
*
/*parameter_value*/
)
{
void
UpperTesterPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{}
}
void
UpperTesterPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{
}
/*void UpperTesterPort::Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error) {}*/
void
UpperTesterPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{}
void
UpperTesterPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{
/*void UpperTesterPort::Handle_Timeout(double time_since_last_call) {}*/
}
void
UpperTesterPort
::
user_map
(
const
char
*
/*system_port*/
)
{
}
void
UpperTesterPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{
void
UpperTesterPort
::
user_unmap
(
const
char
*
/*system_port*/
)
{}
}
void
UpperTesterPort
::
user_start
()
{
}
void
UpperTesterPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{
void
UpperTesterPort
::
user_stop
()
{}
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsDcc__TestSystem
::
UtInitialize
&
/*send_par*/
)
{
}
/*
void UpperTesterPort::
Handle_Timeout(double time_since_last_call
) {}
*/
void
UpperTesterPort
::
outgoing_send
(
const
LibItsDcc__TestSystem
::
UtTrigger
&
/*send_par*/
)
{}
void
UpperTesterPort
::
user_map
(
const
char
*
/*system_port*/
)
{
}
void
UpperTesterPort
::
user_unmap
(
const
char
*
/*system_port*/
)
{
}
void
UpperTesterPort
::
user_start
()
{
}
void
UpperTesterPort
::
user_stop
()
{
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsDcc__TestSystem
::
UtInitialize
&
/*send_par*/
)
{
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsDcc__TestSystem
::
UtTrigger
&
/*send_par*/
)
{
}
}
/* end of namespace */
}
// namespace LibItsDcc__TestSystem
ccsrc/Ports/LibIts_ports/DCC_ports/UpperTesterPort_DCC.hh
View file @
f6d8a00a
...
...
@@ -5,32 +5,31 @@
#include
"LibItsDcc_TestSystem.hh"
namespace
LibItsDcc__TestSystem
{
class
UpperTesterPort
:
public
UpperTesterPort_BASE
{
public:
UpperTesterPort
(
const
char
*
par_port_name
=
NULL
);
~
UpperTesterPort
();
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error); */
void
Handle_Fd_Event_Error
(
int
fd
);
void
Handle_Fd_Event_Writable
(
int
fd
);
void
Handle_Fd_Event_Readable
(
int
fd
);
/* void Handle_Timeout(double time_since_last_call); */
protected:
void
user_map
(
const
char
*
system_port
);
void
user_unmap
(
const
char
*
system_port
);
void
user_start
();
void
user_stop
();
void
outgoing_send
(
const
LibItsDcc__TestSystem
::
UtInitialize
&
send_par
);
void
outgoing_send
(
const
LibItsDcc__TestSystem
::
UtTrigger
&
send_par
);
};
}
/* end of namespace */
class
UpperTesterPort
:
public
UpperTesterPort_BASE
{
public:
UpperTesterPort
(
const
char
*
par_port_name
=
NULL
);
~
UpperTesterPort
();
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error); */
void
Handle_Fd_Event_Error
(
int
fd
);
void
Handle_Fd_Event_Writable
(
int
fd
);
void
Handle_Fd_Event_Readable
(
int
fd
);
/* void Handle_Timeout(double time_since_last_call); */
protected:
void
user_map
(
const
char
*
system_port
);
void
user_unmap
(
const
char
*
system_port
);
void
user_start
();
void
user_stop
();
void
outgoing_send
(
const
LibItsDcc__TestSystem
::
UtInitialize
&
send_par
);
void
outgoing_send
(
const
LibItsDcc__TestSystem
::
UtTrigger
&
send_par
);
};
}
// namespace LibItsDcc__TestSystem
#endif
ccsrc/Ports/LibIts_ports/DENM_ports/AdapterControlPort_DENM.cc
View file @
f6d8a00a
...
...
@@ -3,85 +3,50 @@
#include
"loggers.hh"
#include
"registration.hh"
#include
"denm_layer.hh"
#include
"AdapterControlPort_DENM.hh"
#include
"denm_layer.hh"
//=============================================================================
namespace
LibItsDenm__TestSystem
{
AdapterControlPort
::
AdapterControlPort
(
const
char
*
par_port_name
)
:
AdapterControlPort_BASE
(
par_port_name
)
{
}
AdapterControlPort
::~
AdapterControlPort
()
{
}
void
AdapterControlPort
::
set_parameter
(
const
char
*
/*parameter_name*/
,
const
char
*
/*parameter_value*/
)
{
}
AdapterControlPort
::
AdapterControlPort
(
const
char
*
par_port_name
)
:
AdapterControlPort_BASE
(
par_port_name
)
{}
/*void AdapterControlPort::Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error) {}*/
AdapterControlPort
::~
AdapterControlPort
()
{}
void
AdapterControlPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{
void
AdapterControlPort
::
set_parameter
(
const
char
*
/*parameter_name*/
,
const
char
*
/*parameter_value*/
)
{}
}
/*void AdapterControlPort::Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error) {}*/
void
AdapterControlPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{
void
AdapterControlPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{}
}
void
AdapterControlPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{
}
void
AdapterControlPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{
void
AdapterControlPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{}
}
/*void AdapterControlPort::Handle_Timeout(double time_since_last_call) {}*/
/*
void AdapterControlPort::
Handle_Timeout(double time_since_last_call
) {}
*/
void
AdapterControlPort
::
user_map
(
const
char
*
/*system_port*/
)
{}
void
AdapterControlPort
::
user_map
(
const
char
*
/*system_port*/
)
{
void
AdapterControlPort
::
user_unmap
(
const
char
*
/*system_port*/
)
{}
}
void
AdapterControlPort
::
user_start
()
{
}
void
AdapterControlPort
::
user_unmap
(
const
char
*
/*system_port*/
)
{
void
AdapterControlPort
::
user_stop
()
{}
}
void
AdapterControlPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcGnssPrimitive
&
/*send_par*/
)
{
}
void
AdapterControlPort
::
user_start
()
{
}
void
AdapterControlPort
::
user_stop
()
{
}
void
AdapterControlPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcGnssPrimitive
&
/*send_par*/
)
{
}
void
AdapterControlPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcSecPrimitive
&
send_par
)
{
loggers
::
get_instance
().
log_msg
(
">>> AdapterControlPort::outgoing_send: "
,
send_par
);
void
AdapterControlPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcSecPrimitive
&
send_par
)
{
loggers
::
get_instance
().
log_msg
(
">>> AdapterControlPort::outgoing_send: "
,
send_par
);
// Register this object for AdapterControlPort
denm_layer
*
p
=
registration
<
denm_layer
>::
get_instance
().
get_item
(
std
::
string
(
"DENM"
));
denm_layer
*
p
=
registration
<
denm_layer
>::
get_instance
().
get_item
(
std
::
string
(
"DENM"
));
if
(
p
!=
NULL
)
{
loggers
::
get_instance
().
log
(
"AdapterControlPort::outgoing_send: Got GN layer %p"
,
p
);
LibItsCommon__TypesAndValues
::
AdapterControlResults
response
;
response
.
acSecResponse
()
=
BOOLEAN
(
true
);
if
(
send_par
.
ischosen
(
LibItsCommon__TypesAndValues
::
AcSecPrimitive
::
ALT_acEnableSecurity
))
{
loggers
::
get_instance
().
log
(
"AdapterControlPort::outgoing_send: Enable secured mode"
);
std
::
string
str
(
static_cast
<
const
char
*>
(
send_par
.
acEnableSecurity
().
certificateId
()));
std
::
string
str
(
static_cast
<
const
char
*>
(
send_par
.
acEnableSecurity
().
certificateId
()));
if
(
p
->
enable_secured_mode
(
str
,
send_par
.
acEnableSecurity
().
enforceSecurity
())
==
-
1
)
{
response
.
acSecResponse
()
=
BOOLEAN
(
false
);
}
...
...
@@ -99,7 +64,6 @@ void AdapterControlPort::outgoing_send(const LibItsCommon__TypesAndValues::AcSec
}
else
{
loggers
::
get_instance
().
error
(
"AdapterControlPort::outgoing_send: %s not registered"
,
"geoNetworkingPort"
);
}
}
}
}
/* end of namespace */
}
// namespace LibItsDenm__TestSystem
ccsrc/Ports/LibIts_ports/DENM_ports/AdapterControlPort_DENM.hh
View file @
f6d8a00a
...
...
@@ -6,33 +6,31 @@
namespace
LibItsDenm__TestSystem
{
class
AdapterControlPort
:
public
AdapterControlPort_BASE
{
public:
AdapterControlPort
(
const
char
*
par_port_name
=
NULL
);
~
AdapterControlPort
();
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error); */
void
Handle_Fd_Event_Error
(
int
fd
);
void
Handle_Fd_Event_Writable
(
int
fd
);
void
Handle_Fd_Event_Readable
(
int
fd
);
/* void Handle_Timeout(double time_since_last_call); */
protected:
void
user_map
(
const
char
*
system_port
);
void
user_unmap
(
const
char
*
system_port
);
void
user_start
();
void
user_stop
();
void
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcGnssPrimitive
&
send_par
);
void
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcSecPrimitive
&
send_par
);
};
}
// end of namespace
class
AdapterControlPort
:
public
AdapterControlPort_BASE
{
public:
AdapterControlPort
(
const
char
*
par_port_name
=
NULL
);
~
AdapterControlPort
();
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error); */
void
Handle_Fd_Event_Error
(
int
fd
);
void
Handle_Fd_Event_Writable
(
int
fd
);
void
Handle_Fd_Event_Readable
(
int
fd
);
/* void Handle_Timeout(double time_since_last_call); */
protected:
void
user_map
(
const
char
*
system_port
);
void
user_unmap
(
const
char
*
system_port
);
void
user_start
();
void
user_stop
();
void
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcGnssPrimitive
&
send_par
);
void
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcSecPrimitive
&
send_par
);
};
}
// namespace LibItsDenm__TestSystem
#endif
ccsrc/Ports/LibIts_ports/DENM_ports/DenmPort.cc
View file @
f6d8a00a
...
...
@@ -13,19 +13,16 @@
namespace
LibItsDenm__TestSystem
{
DenmPort
::
DenmPort
(
const
char
*
par_port_name
)
:
DenmPort_BASE
(
par_port_name
),
_cfg_params
(),
_layer_params
(),
_layer
(
NULL
),
_time_key
(
"DenmPort::outgoing_send"
)
{
DenmPort
::
DenmPort
(
const
char
*
par_port_name
)
:
DenmPort_BASE
(
par_port_name
),
_cfg_params
(),
_layer_params
(),
_layer
(
NULL
),
_time_key
(
"DenmPort::outgoing_send"
)
{}
}
DenmPort
::~
DenmPort
()
{
DenmPort
::~
DenmPort
()
{
if
(
_layer
!=
NULL
)
{
delete
_layer
;
}
}
void
DenmPort
::
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
)
{
void
DenmPort
::
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
)
{
loggers
::
get_instance
().
log
(
"DenmPort::set_parameter: %s=%s"
,
parameter_name
,
parameter_value
);
_cfg_params
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
std
::
string
(
parameter_name
),
std
::
string
(
parameter_value
)));
}
...
...
@@ -33,25 +30,15 @@ namespace LibItsDenm__TestSystem {
/*void DenmPort::Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error) {}*/
void
DenmPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{
}
void
DenmPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{
}
void
DenmPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{}
void
DenmPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{
void
DenmPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{}
}
void
DenmPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{
}
/*void DenmPort::Handle_Timeout(double time_since_last_call) {}*/
void
DenmPort
::
user_map
(
const
char
*
system_port
)
{
void
DenmPort
::
user_map
(
const
char
*
system_port
)
{
loggers
::
get_instance
().
log
(
">>> DenmPort::user_map: %s"
,
system_port
);
// Build layer stack
std
::
map
<
std
::
string
,
std
::
string
>::
iterator
it
=
_cfg_params
.
find
(
std
::
string
(
"params"
));
...
...
@@ -62,7 +49,7 @@ namespace LibItsDenm__TestSystem {
// Create layer
_layer
=
layer_stack_builder
::
get_instance
()
->
create_layer_stack
(
it
->
second
.
c_str
());
if
(
static_cast
<
denm_layer
*>
(
_layer
)
==
NULL
)
{
loggers
::
get_instance
().
error
(
"DenmPort::user_map: Invalid stack configuration: %s"
,
it
->
second
.
c_str
());
loggers
::
get_instance
().
error
(
"DenmPort::user_map: Invalid stack configuration: %s"
,
it
->
second
.
c_str
());
}
static_cast
<
denm_layer
*>
(
_layer
)
->
add_upper_port
(
this
);
}
else
{
...
...
@@ -70,8 +57,7 @@ namespace LibItsDenm__TestSystem {
}
}
void
DenmPort
::
user_unmap
(
const
char
*
system_port
)
{
void
DenmPort
::
user_unmap
(
const
char
*
system_port
)
{
loggers
::
get_instance
().
log
(
">>> DenmPort::user_unmap: %s"
,
system_port
);
if
(
_layer
!=
NULL
)
{
delete
_layer
;
...
...
@@ -79,20 +65,13 @@ namespace LibItsDenm__TestSystem {
}
}
void
DenmPort
::
user_start
()
{
}
void
DenmPort
::
user_start
()
{}
void
DenmPort
::
user_stop
()
{
void
DenmPort
::
user_stop
()
{}
}
void
DenmPort
::
outgoing_send
(
const
DenmReq
&
send_par
)
{
// loggers::get_instance().log_msg(">>> DenmPort::outgoing_send: payload=", send_par);
void
DenmPort
::
outgoing_send
(
const
DenmReq
&
send_par
)
{
// loggers::get_instance().log_msg(">>> DenmPort::outgoing_send: payload=", send_par);
float
duration
;
loggers
::
get_instance
().
set_start_time
(
_time_key
);
params
params
;
...
...
@@ -100,11 +79,10 @@ namespace LibItsDenm__TestSystem {
loggers
::
get_instance
().
set_stop_time
(
_time_key
,
duration
);
}
void
DenmPort
::
receiveMsg
(
const
LibItsDenm__TestSystem
::
DenmInd
&
p_ind
,
const
params
&
p_params
)
{
// loggers::get_instance().log_msg(">>> DenmPort::receive_msg: ", p_ind);
void
DenmPort
::
receiveMsg
(
const
LibItsDenm__TestSystem
::
DenmInd
&
p_ind
,
const
params
&
p_params
)
{
// loggers::get_instance().log_msg(">>> DenmPort::receive_msg: ", p_ind);
incoming_message
(
p_ind
);
}
}
/* end of namespace */
}
// namespace LibItsDenm__TestSystem
ccsrc/Ports/LibIts_ports/DENM_ports/DenmPort.hh
View file @
f6d8a00a
...
...
@@ -18,18 +18,18 @@
namespace
LibItsDenm__TestSystem
{
class
DenmPort
:
public
DenmPort_BASE
{
params
_cfg_params
;
params
_layer_params
;
layer
*
_layer
;
params
_cfg_params
;
params
_layer_params
;
layer
*
_layer
;
std
::
string
_time_key
;
public:
DenmPort
(
const
char
*
par_port_name
=
NULL
);
~
DenmPort
();
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
void
receiveMsg
(
const
LibItsDenm__TestSystem
::
DenmInd
&
,
const
params
&
);
void
receiveMsg
(
const
LibItsDenm__TestSystem
::
DenmInd
&
,
const
params
&
);
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
...
...
@@ -45,9 +45,9 @@ namespace LibItsDenm__TestSystem {
void
user_start
();
void
user_stop
();
void
outgoing_send
(
const
DenmReq
&
send_par
);
void
outgoing_send
(
const
DenmReq
&
send_par
);
};
}
/
* end of
namespace
*/
}
/
/
namespace
LibItsDenm__TestSystem
#endif
ccsrc/Ports/LibIts_ports/DENM_ports/UpperTesterPort_DENM.cc
View file @
f6d8a00a
#include
"uppertester_denm_layer_factory.hh"
#include
"loggers.hh"
#include
"UpperTesterPort_DENM.hh"
#include
"loggers.hh"
//=============================================================================
namespace
LibItsDenm__TestSystem
{
UpperTesterPort
::
UpperTesterPort
(
const
char
*
par_port_name
)
:
UpperTesterPort_BASE
(
par_port_name
),
_cfg_params
(),
_layer_params
(),
_layer
(
NULL
),
_time_key
(
"UpperTesterPort_Denm::outgoing_send"
)
{
:
UpperTesterPort_BASE
(
par_port_name
),
_cfg_params
(),
_layer_params
(),
_layer
(
NULL
),
_time_key
(
"UpperTesterPort_Denm::outgoing_send"
)
{
loggers
::
get_instance
().
log
(
"UpperTesterPort_Denm::UpperTesterPort_Denm"
);
}
UpperTesterPort
::~
UpperTesterPort
()
{
UpperTesterPort
::~
UpperTesterPort
()
{
if
(
_layer
!=
NULL
)
{
delete
_layer
;
}
}
void
UpperTesterPort
::
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
)
{
void
UpperTesterPort
::
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
)
{
loggers
::
get_instance
().
log
(
"UpperTesterPort_Denm::set_parameter: %s=%s"
,
parameter_name
,
parameter_value
);
_cfg_params
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
std
::
string
(
parameter_name
),
std
::
string
(
parameter_value
)));
_cfg_params
.
log
();
...
...
@@ -28,25 +25,15 @@ namespace LibItsDenm__TestSystem {
/*void UpperTesterPort_Denm::Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error) {}*/
void
UpperTesterPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{
}
void
UpperTesterPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{
void
UpperTesterPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{}
}
void
UpperTesterPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{
void
UpperTesterPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{}
}
void
UpperTesterPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{
}
/*void UpperTesterPort_Denm::Handle_Timeout(double time_since_last_call) {}*/
void
UpperTesterPort
::
user_map
(
const
char
*
system_port
)
{
void
UpperTesterPort
::
user_map
(
const
char
*
system_port
)
{
loggers
::
get_instance
().
log
(
">>> UpperTesterPort_Denm::user_map: %s"
,
system_port
);
// Build layer stack
params
::
iterator
it
=
_cfg_params
.
find
(
std
::
string
(
"params"
));
...
...
@@ -62,87 +49,73 @@ namespace LibItsDenm__TestSystem {
}
}
void
UpperTesterPort
::
user_unmap
(
const
char
*
system_port
)
{
void
UpperTesterPort
::
user_unmap
(
const
char
*
system_port
)
{
loggers
::
get_instance
().
log
(
">>> UpperTesterPort_Denm::user_unmap: %s"
,
system_port
);
if
(
_layer
!=
NULL
)
{
delete
_layer
;
_layer
=
NULL
;
}
}
void
UpperTesterPort
::
user_start
()
{
void
UpperTesterPort
::
user_start
()
{}
}
void
UpperTesterPort
::
user_stop
()
{
}
void
UpperTesterPort
::
user_stop
()
{
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmInitialize
&
send_par
)
{
void
UpperTesterPort
::
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmInitialize
&
send_par
)
{
loggers
::
get_instance
().
log_msg
(
">>> UppertesterPort::outgoing_send: "
,
send_par
);
float
duration
;
loggers
::
get_instance
().
set_start_time
(
_time_key
);
static_cast
<
uppertester_denm_layer
*>
(
_layer
)
->
sendMsg
(
send_par
,
_layer_params
);
loggers
::
get_instance
().
set_stop_time
(
_time_key
,
duration
);
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmTrigger
&
send_par
)
{
void
UpperTesterPort
::
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmTrigger
&
send_par
)
{
loggers
::
get_instance
().
log_msg
(
">>> UppertesterPort::outgoing_send: "
,
send_par
);
float
duration
;
loggers
::
get_instance
().
set_start_time
(
_time_key
);
static_cast
<
uppertester_denm_layer
*>
(
_layer
)
->
sendMsg
(
send_par
,
_layer_params
);
loggers
::
get_instance
().
set_stop_time
(
_time_key
,
duration
);
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmUpdate
&
send_par
)
{
void
UpperTesterPort
::
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmUpdate
&
send_par
)
{
loggers
::
get_instance
().
log_msg
(
">>> UppertesterPort::outgoing_send: "
,
send_par
);
float
duration
;
loggers
::
get_instance
().
set_start_time
(
_time_key
);
static_cast
<
uppertester_denm_layer
*>
(
_layer
)
->
sendMsg
(
send_par
,
_layer_params
);
loggers
::
get_instance
().
set_stop_time
(
_time_key
,
duration
);
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmTermination
&
send_par
)
{
void
UpperTesterPort
::
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmTermination
&
send_par
)
{
loggers
::
get_instance
().
log_msg
(
">>> UppertesterPort::outgoing_send: "
,
send_par
);
float
duration
;
loggers
::
get_instance
().
set_start_time
(
_time_key
);
static_cast
<
uppertester_denm_layer
*>
(
_layer
)
->
sendMsg
(
send_par
,
_layer_params
);
loggers
::
get_instance
().
set_stop_time
(
_time_key
,
duration
);
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmChangePosition
&
send_par
)
{
void
UpperTesterPort
::
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmChangePosition
&
send_par
)
{
loggers
::
get_instance
().
log_msg
(
">>> UppertesterPort::outgoing_send: "
,
send_par
);
float
duration
;
loggers
::
get_instance
().
set_start_time
(
_time_key
);
static_cast
<
uppertester_denm_layer
*>
(
_layer
)
->
sendMsg
(
send_par
,
_layer_params
);
loggers
::
get_instance
().
set_stop_time
(
_time_key
,
duration
);
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmChangePseudonym
&
send_par
)
{
void
UpperTesterPort
::
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmChangePseudonym
&
send_par
)
{
loggers
::
get_instance
().
log_msg
(
">>> UppertesterPort::outgoing_send: "
,
send_par
);
float
duration
;
loggers
::
get_instance
().
set_start_time
(
_time_key
);
static_cast
<
uppertester_denm_layer
*>
(
_layer
)
->
sendMsg
(
send_par
,
_layer_params
);
loggers
::
get_instance
().
set_stop_time
(
_time_key
,
duration
);
}
void
UpperTesterPort
::
receiveMsg
(
const
Base_Type
&
p_ind
,
const
params
&
p_params
)
{
void
UpperTesterPort
::
receiveMsg
(
const
Base_Type
&
p_ind
,
const
params
&
p_params
)
{
loggers
::
get_instance
().
log_msg
(
">>> UpperTesterPort_Denm::receive_msg: "
,
p_ind
);
// Sanity check
if
(
!
p_ind
.
is_bound
())
{
...
...
@@ -150,12 +123,12 @@ namespace LibItsDenm__TestSystem {
}
if
(
std
::
string
(
p_ind
.
get_descriptor
()
->
name
).
compare
(
"@LibItsDenm_TypesAndValues.UtDenmResults"
)
==
0
)
{
// TODO To be refined
incoming_message
(
static_cast
<
const
LibItsDenm__TypesAndValues
::
UtDenmResults
&>
(
p_ind
));
incoming_message
(
static_cast
<
const
LibItsDenm__TypesAndValues
::
UtDenmResults
&>
(
p_ind
));
}
else
if
(
std
::
string
(
p_ind
.
get_descriptor
()
->
name
).
compare
(
"@LibItsDenm_TypesAndValues.UtDenmEventInd"
)
==
0
)
{
incoming_message
(
static_cast
<
const
LibItsDenm__TypesAndValues
::
UtDenmEventInd
&>
(
p_ind
));
incoming_message
(
static_cast
<
const
LibItsDenm__TypesAndValues
::
UtDenmEventInd
&>
(
p_ind
));
}
else
{
loggers
::
get_instance
().
warning
(
"UpperTesterPort_Denm::receive_msg: Message not processed: %s"
,
p_ind
.
get_descriptor
()
->
name
);
}
}
}
/
* end of
namespace
*/
}
/
/
namespace
LibItsDenm__TestSystem
ccsrc/Ports/LibIts_ports/DENM_ports/UpperTesterPort_DENM.hh
View file @
f6d8a00a
...
...
@@ -9,19 +9,18 @@
namespace
LibItsDenm__TestSystem
{
class
UpperTesterPort
:
public
UpperTesterPort_BASE
{
params
_cfg_params
;
params
_layer_params
;
layer
*
_layer
;
params
_cfg_params
;
params
_layer_params
;
layer
*
_layer
;
std
::
string
_time_key
;
public:
UpperTesterPort
(
const
char
*
par_port_name
=
NULL
);
~
UpperTesterPort
();
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
void
receiveMsg
(
const
Base_Type
&
,
const
params
&
);
void
receiveMsg
(
const
Base_Type
&
,
const
params
&
);
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
...
...
@@ -37,19 +36,18 @@ namespace LibItsDenm__TestSystem {
void
user_start
();
void
user_stop
();
void
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmInitialize
&
send_par
);
void
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmTrigger
&
send_par
);
void
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmUpdate
&
send_par
);
void
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmTermination
&
send_par
);
void
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmChangePosition
&
send_par
);
void
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmChangePseudonym
&
send_par
);
void
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmInitialize
&
send_par
);
void
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmTrigger
&
send_par
);
void
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmUpdate
&
send_par
);
void
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmTermination
&
send_par
);
void
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmChangePosition
&
send_par
);
void
outgoing_send
(
const
LibItsDenm__TypesAndValues
::
UtDenmChangePseudonym
&
send_par
);
};
}
/
* end of
namespace
*/
}
/
/
namespace
LibItsDenm__TestSystem
#endif
ccsrc/Ports/LibIts_ports/EVCSN_ports/AdapterControlPort_EVCSN.cc
View file @
f6d8a00a
...
...
@@ -2,71 +2,33 @@
//=============================================================================
namespace
LibItsEvcsn__TestSystem
{
AdapterControlPort
::
AdapterControlPort
(
const
char
*
par_port_name
)
:
AdapterControlPort_BASE
(
par_port_name
)
{
AdapterControlPort
::
AdapterControlPort
(
const
char
*
par_port_name
)
:
AdapterControlPort_BASE
(
par_port_name
)
{}
}
AdapterControlPort
::~
AdapterControlPort
()
{
}
AdapterControlPort
::~
AdapterControlPort
()
{
void
AdapterControlPort
::
set_parameter
(
const
char
*
/*parameter_name*/
,
const
char
*
/*parameter_value*/
)
{}
}
/*void AdapterControlPort::Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error) {}*/
void
AdapterControlPort
::
set_parameter
(
const
char
*
/*parameter_name*/
,
const
char
*
/*parameter_value*/
)
{
void
AdapterControlPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{}
}
void
AdapterControlPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{
}
/*void AdapterControlPort::Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error) {}*/
void
AdapterControlPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{}
void
AdapterControlPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{
/*void AdapterControlPort::Handle_Timeout(double time_since_last_call) {}*/
}
void
AdapterControlPort
::
user_map
(
const
char
*
/*system_port*/
)
{
}
void
AdapterControlPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{
void
AdapterControlPort
::
user_unmap
(
const
char
*
/*system_port*/
)
{}
}
void
AdapterControlPort
::
user_start
()
{
}
void
AdapterControlPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{
void
AdapterControlPort
::
user_stop
()
{}
}
void
AdapterControlPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcGnssPrimitive
&
/*send_par*/
)
{
}
/*
void AdapterControlPort::
Handle_Timeout(double time_since_last_call
) {}
*/
void
AdapterControlPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcSecPrimitive
&
/*send_par*/
)
{}
void
AdapterControlPort
::
user_map
(
const
char
*
/*system_port*/
)
{
}
void
AdapterControlPort
::
user_unmap
(
const
char
*
/*system_port*/
)
{
}
void
AdapterControlPort
::
user_start
()
{
}
void
AdapterControlPort
::
user_stop
()
{
}
void
AdapterControlPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcGnssPrimitive
&
/*send_par*/
)
{
}
void
AdapterControlPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcSecPrimitive
&
/*send_par*/
)
{
}
}
/* end of namespace */
}
// namespace LibItsEvcsn__TestSystem
ccsrc/Ports/LibIts_ports/EVCSN_ports/AdapterControlPort_EVCSN.hh
View file @
f6d8a00a
...
...
@@ -6,33 +6,31 @@
namespace
LibItsEvcsn__TestSystem
{
class
AdapterControlPort
:
public
AdapterControlPort_BASE
{
public:
AdapterControlPort
(
const
char
*
par_port_name
=
NULL
);
~
AdapterControlPort
();
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error); */
void
Handle_Fd_Event_Error
(
int
fd
);
void
Handle_Fd_Event_Writable
(
int
fd
);
void
Handle_Fd_Event_Readable
(
int
fd
);
/* void Handle_Timeout(double time_since_last_call); */
protected:
void
user_map
(
const
char
*
system_port
);
void
user_unmap
(
const
char
*
system_port
);
void
user_start
();
void
user_stop
();
void
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcGnssPrimitive
&
send_par
);
void
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcSecPrimitive
&
send_par
);
};
}
// end of namespace
class
AdapterControlPort
:
public
AdapterControlPort_BASE
{
public:
AdapterControlPort
(
const
char
*
par_port_name
=
NULL
);
~
AdapterControlPort
();
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error); */
void
Handle_Fd_Event_Error
(
int
fd
);
void
Handle_Fd_Event_Writable
(
int
fd
);
void
Handle_Fd_Event_Readable
(
int
fd
);
/* void Handle_Timeout(double time_since_last_call); */
protected:
void
user_map
(
const
char
*
system_port
);
void
user_unmap
(
const
char
*
system_port
);
void
user_start
();
void
user_stop
();
void
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcGnssPrimitive
&
send_par
);
void
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcSecPrimitive
&
send_par
);
};
}
// namespace LibItsEvcsn__TestSystem
#endif
ccsrc/Ports/LibIts_ports/EVCSN_ports/EvcsnPort.cc
View file @
f6d8a00a
...
...
@@ -11,67 +11,31 @@
namespace
LibItsEvcsn__TestSystem
{
EvcsnPort
::
EvcsnPort
(
const
char
*
par_port_name
)
:
EvcsnPort_BASE
(
par_port_name
)
{
EvcsnPort
::
EvcsnPort
(
const
char
*
par_port_name
)
:
EvcsnPort_BASE
(
par_port_name
)
{}
}
EvcsnPort
::~
EvcsnPort
()
{
}
EvcsnPort
::~
EvcsnPort
()
{
void
EvcsnPort
::
set_parameter
(
const
char
*
/*parameter_name*/
,
const
char
*
/*parameter_value*/
)
{}
}
/*void EvcsnPort::Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error) {}*/
void
EvcsnPort
::
set_parameter
(
const
char
*
/*parameter_name*/
,
const
char
*
/*parameter_value*/
)
{
void
EvcsnPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{}
}
void
EvcsnPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{
}
/*void EvcsnPort::Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error) {}*/
void
EvcsnPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{}
void
EvcsnPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{
/*void EvcsnPort::Handle_Timeout(double time_since_last_call) {}*/
}
void
EvcsnPort
::
user_map
(
const
char
*
/*system_port*/
)
{
}
void
EvcsnPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{
void
EvcsnPort
::
user_unmap
(
const
char
*
/*system_port*/
)
{}
}
void
EvcsnPort
::
user_start
()
{
}
void
EvcsnPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{
void
EvcsnPort
::
user_stop
()
{}
}
/*void EvcsnPort::Handle_Timeout(double time_since_last_call) {}*/
void
EvcsnPort
::
user_map
(
const
char
*
/*system_port*/
)
{
}
void
EvcsnPort
::
user_unmap
(
const
char
*
/*system_port*/
)
{
}
void
EvcsnPort
::
user_start
()
{
}
void
EvcsnPort
::
user_stop
()
{
}
void
EvcsnPort
::
outgoing_send
(
const
EvcsnReq
&
/*send_par*/
)
{
}
}
/* end of namespace */
void
EvcsnPort
::
outgoing_send
(
const
EvcsnReq
&
/*send_par*/
)
{}
}
// namespace LibItsEvcsn__TestSystem
ccsrc/Ports/LibIts_ports/EVCSN_ports/EvcsnPort.hh
View file @
f6d8a00a
...
...
@@ -14,31 +14,30 @@
namespace
LibItsEvcsn__TestSystem
{
class
EvcsnPort
:
public
EvcsnPort_BASE
{
public:
EvcsnPort
(
const
char
*
par_port_name
=
NULL
);
~
EvcsnPort
();
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error); */
void
Handle_Fd_Event_Error
(
int
fd
);
void
Handle_Fd_Event_Writable
(
int
fd
);
void
Handle_Fd_Event_Readable
(
int
fd
);
/* void Handle_Timeout(double time_since_last_call); */
protected:
void
user_map
(
const
char
*
system_port
);
void
user_unmap
(
const
char
*
system_port
);
void
user_start
();
void
user_stop
();
void
outgoing_send
(
const
EvcsnReq
&
send_par
);
};
}
/* end of namespace */
class
EvcsnPort
:
public
EvcsnPort_BASE
{
public:
EvcsnPort
(
const
char
*
par_port_name
=
NULL
);
~
EvcsnPort
();
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error); */
void
Handle_Fd_Event_Error
(
int
fd
);
void
Handle_Fd_Event_Writable
(
int
fd
);
void
Handle_Fd_Event_Readable
(
int
fd
);
/* void Handle_Timeout(double time_since_last_call); */
protected:
void
user_map
(
const
char
*
system_port
);
void
user_unmap
(
const
char
*
system_port
);
void
user_start
();
void
user_stop
();
void
outgoing_send
(
const
EvcsnReq
&
send_par
);
};
}
// namespace LibItsEvcsn__TestSystem
#endif
ccsrc/Ports/LibIts_ports/EVCSN_ports/UpperTesterPort_EVCSN.cc
View file @
f6d8a00a
...
...
@@ -2,86 +2,39 @@
//=============================================================================
namespace
LibItsEvcsn__TestSystem
{
UpperTesterPort
::
UpperTesterPort
(
const
char
*
par_port_name
)
:
UpperTesterPort_BASE
(
par_port_name
)
{
UpperTesterPort
::
UpperTesterPort
(
const
char
*
par_port_name
)
:
UpperTesterPort_BASE
(
par_port_name
)
{}
}
UpperTesterPort
::~
UpperTesterPort
()
{
}
UpperTesterPort
::~
UpperTesterPort
()
{
void
UpperTesterPort
::
set_parameter
(
const
char
*
/*parameter_name*/
,
const
char
*
/*parameter_value*/
)
{}
}
/*void UpperTesterPort::Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error) {}*/
void
UpperTesterPort
::
set_parameter
(
const
char
*
/*parameter_name*/
,
const
char
*
/*parameter_value*/
)
{
void
UpperTesterPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{}
}
void
UpperTesterPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{
}
/*void UpperTesterPort::Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error) {}*/
void
UpperTesterPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{}
void
UpperTesterPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{
/*void UpperTesterPort::Handle_Timeout(double time_since_last_call) {}*/
}
void
UpperTesterPort
::
user_map
(
const
char
*
/*system_port*/
)
{
}
void
UpperTesterPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{
void
UpperTesterPort
::
user_unmap
(
const
char
*
/*system_port*/
)
{}
}
void
UpperTesterPort
::
user_start
()
{
}
void
UpperTesterPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{
void
UpperTesterPort
::
user_stop
()
{}
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
UtInitialize
&
/*send_par*/
)
{
}
/*
void UpperTesterPort::
Handle_Timeout(double time_since_last_call
) {}
*/
void
UpperTesterPort
::
outgoing_send
(
const
LibItsEvcsn__TypesAndValues
::
UtEvcsnTrigger
&
/*send_par*/
)
{}
void
UpperTesterPort
::
user_map
(
const
char
*
/*system_port*/
)
{
void
UpperTesterPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
UtChangePosition
&
/*send_par*/
)
{}
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
UtActivatePositionTime
&
/*send_par*/
)
{
}
void
UpperTesterPort
::
user_unmap
(
const
char
*
/*system_port*/
)
{
void
UpperTesterPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
UtDeactivatePositionTime
&
/*send_par*/
)
{}
}
void
UpperTesterPort
::
user_start
()
{
}
void
UpperTesterPort
::
user_stop
()
{
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
UtInitialize
&
/*send_par*/
)
{
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsEvcsn__TypesAndValues
::
UtEvcsnTrigger
&
/*send_par*/
)
{
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
UtChangePosition
&
/*send_par*/
)
{
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
UtActivatePositionTime
&
/*send_par*/
)
{
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
UtDeactivatePositionTime
&
/*send_par*/
)
{
}
}
/* end of namespace */
}
// namespace LibItsEvcsn__TestSystem
ccsrc/Ports/LibIts_ports/EVCSN_ports/UpperTesterPort_EVCSN.hh
View file @
f6d8a00a
...
...
@@ -5,39 +5,37 @@
#include
"LibItsEvcsn_TestSystem.hh"
namespace
LibItsEvcsn__TestSystem
{
class
UpperTesterPort
:
public
UpperTesterPort_BASE
{
public:
UpperTesterPort
(
const
char
*
par_port_name
=
NULL
);
~
UpperTesterPort
();
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error); */
void
Handle_Fd_Event_Error
(
int
fd
);
void
Handle_Fd_Event_Writable
(
int
fd
);
void
Handle_Fd_Event_Readable
(
int
fd
);
/* void Handle_Timeout(double time_since_last_call); */
protected:
void
user_map
(
const
char
*
system_port
);
void
user_unmap
(
const
char
*
system_port
);
void
user_start
();
void
user_stop
();
void
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
UtInitialize
&
send_par
);
void
outgoing_send
(
const
LibItsEvcsn__TypesAndValues
::
UtEvcsnTrigger
&
send_par
);
void
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
UtChangePosition
&
send_par
);
void
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
UtActivatePositionTime
&
send_par
);
void
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
UtDeactivatePositionTime
&
send_par
);
};
}
/* end of namespace */
class
UpperTesterPort
:
public
UpperTesterPort_BASE
{
public:
UpperTesterPort
(
const
char
*
par_port_name
=
NULL
);
~
UpperTesterPort
();
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error); */
void
Handle_Fd_Event_Error
(
int
fd
);
void
Handle_Fd_Event_Writable
(
int
fd
);
void
Handle_Fd_Event_Readable
(
int
fd
);
/* void Handle_Timeout(double time_since_last_call); */
protected:
void
user_map
(
const
char
*
system_port
);
void
user_unmap
(
const
char
*
system_port
);
void
user_start
();
void
user_stop
();
void
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
UtInitialize
&
send_par
);
void
outgoing_send
(
const
LibItsEvcsn__TypesAndValues
::
UtEvcsnTrigger
&
send_par
);
void
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
UtChangePosition
&
send_par
);
void
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
UtActivatePositionTime
&
send_par
);
void
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
UtDeactivatePositionTime
&
send_par
);
};
}
// namespace LibItsEvcsn__TestSystem
#endif
ccsrc/Ports/LibIts_ports/GN_ports/AdapterControlPort_GN.cc
View file @
f6d8a00a
...
...
@@ -3,78 +3,45 @@
#include
"loggers.hh"
#include
"registration.hh"
#include
"geonetworking_layer.hh"
#include
"AdapterControlPort_GN.hh"
#include
"geonetworking_layer.hh"
//=============================================================================
namespace
LibItsGeoNetworking__TestSystem
{
AdapterControlPort
::
AdapterControlPort
(
const
char
*
par_port_name
)
:
AdapterControlPort_BASE
(
par_port_name
),
_params
()
{
AdapterControlPort
::
AdapterControlPort
(
const
char
*
par_port_name
)
:
AdapterControlPort_BASE
(
par_port_name
),
_params
()
{
loggers
::
get_instance
().
log
(
"AdapterControlPort::AdapterControlPort"
);
}
AdapterControlPort
::~
AdapterControlPort
()
{
AdapterControlPort
::~
AdapterControlPort
()
{}
}
void
AdapterControlPort
::
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
)
{
void
AdapterControlPort
::
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
)
{
loggers
::
get_instance
().
log
(
"AdapterControlPort::set_parameter: %s=%s"
,
parameter_name
,
parameter_value
);
}
/*void AdapterControlPort::Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error) {}*/
void
AdapterControlPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{
void
AdapterControlPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{}
}
void
AdapterControlPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{
}
void
AdapterControlPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{
void
AdapterControlPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{}
}
void
AdapterControlPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{
}
/*void AdapterControlPort::Handle_Timeout(double time_since_last_call) {}*/
void
AdapterControlPort
::
user_map
(
const
char
*
system_port
)
{
loggers
::
get_instance
().
log
(
">>> AdapterControlPort::user_map: %s"
,
system_port
);
void
AdapterControlPort
::
user_map
(
const
char
*
system_port
)
{
loggers
::
get_instance
().
log
(
">>> AdapterControlPort::user_map: %s"
,
system_port
);
}
}
void
AdapterControlPort
::
user_unmap
(
const
char
*
system_port
)
{
loggers
::
get_instance
().
log
(
">>> AdapterControlPort::user_unmap: %s"
,
system_port
);
}
void
AdapterControlPort
::
user_start
()
{
}
void
AdapterControlPort
::
user_unmap
(
const
char
*
system_port
)
{
loggers
::
get_instance
().
log
(
">>> AdapterControlPort::user_unmap: %s"
,
system_port
);
}
void
AdapterControlPort
::
user_stop
()
{
void
AdapterControlPort
::
user_start
()
{}
}
void
AdapterControlPort
::
user_stop
()
{
}
void
AdapterControlPort
::
outgoing_send
(
const
LibItsGeoNetworking__TypesAndValues
::
AcGnPrimitive
&
send_par
)
{
void
AdapterControlPort
::
outgoing_send
(
const
LibItsGeoNetworking__TypesAndValues
::
AcGnPrimitive
&
send_par
)
{
loggers
::
get_instance
().
log_msg
(
">>> AdapterControlPort::outgoing_send: "
,
send_par
);
// Register this object for AdapterControlPort
geonetworking_layer
*
p
=
registration
<
geonetworking_layer
>::
get_instance
().
get_item
(
std
::
string
(
"GN"
));
geonetworking_layer
*
p
=
registration
<
geonetworking_layer
>::
get_instance
().
get_item
(
std
::
string
(
"GN"
));
if
(
p
!=
NULL
)
{
loggers
::
get_instance
().
log
(
"AdapterControlPort::outgoing_send: Got GN layer %p"
,
p
);
LibItsGeoNetworking__TypesAndValues
::
AcGnResponse
response
;
...
...
@@ -91,7 +58,7 @@ namespace LibItsGeoNetworking__TestSystem {
return
;
}
else
if
(
send_par
.
ischosen
(
LibItsGeoNetworking__TypesAndValues
::
AcGnPrimitive
::
ALT_getLongPosVector
))
{
loggers
::
get_instance
().
log
(
"AdapterControlPort::outgoing_send: Get LongPosVector"
);
const
LibItsGeoNetworking__TypesAndValues
::
LongPosVector
*
lpv
=
p
->
get_lpv
(
send_par
.
getLongPosVector
().
gnAddress
());
const
LibItsGeoNetworking__TypesAndValues
::
LongPosVector
*
lpv
=
p
->
get_lpv
(
send_par
.
getLongPosVector
().
gnAddress
());
loggers
::
get_instance
().
log
(
"AdapterControlPort::outgoing_send: Return value: %p"
,
lpv
);
if
(
lpv
==
nullptr
)
{
response
.
failure
()
=
LibItsGeoNetworking__TypesAndValues
::
AcGnResponseFailure
(
BOOLEAN
(
true
));
...
...
@@ -119,29 +86,22 @@ namespace LibItsGeoNetworking__TestSystem {
}
}
void
AdapterControlPort
::
outgoing_send
(
const
LibItsIpv6OverGeoNetworking__TypesAndValues
::
AcGn6Primitive
&
/*send_par*/
)
{
}
void
AdapterControlPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcGnssPrimitive
&
/*send_par*/
)
{
void
AdapterControlPort
::
outgoing_send
(
const
LibItsIpv6OverGeoNetworking__TypesAndValues
::
AcGn6Primitive
&
/*send_par*/
)
{}
}
void
AdapterControlPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcGnssPrimitive
&
/*send_par*/
)
{
}
void
AdapterControlPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcSecPrimitive
&
send_par
)
{
void
AdapterControlPort
::
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcSecPrimitive
&
send_par
)
{
loggers
::
get_instance
().
log_msg
(
">>> AdapterControlPort::outgoing_send: "
,
send_par
);
// Register this object for AdapterControlPort
geonetworking_layer
*
p
=
registration
<
geonetworking_layer
>::
get_instance
().
get_item
(
std
::
string
(
"GN"
));
geonetworking_layer
*
p
=
registration
<
geonetworking_layer
>::
get_instance
().
get_item
(
std
::
string
(
"GN"
));
if
(
p
!=
NULL
)
{
loggers
::
get_instance
().
log
(
"AdapterControlPort::outgoing_send: Got GN layer %p"
,
p
);
LibItsCommon__TypesAndValues
::
AdapterControlResults
response
;
response
.
acSecResponse
()
=
BOOLEAN
(
true
);
if
(
send_par
.
ischosen
(
LibItsCommon__TypesAndValues
::
AcSecPrimitive
::
ALT_acEnableSecurity
))
{
loggers
::
get_instance
().
log
(
"AdapterControlPort::outgoing_send: Enable secured mode"
);
std
::
string
str
(
static_cast
<
const
char
*>
(
send_par
.
acEnableSecurity
().
certificateId
()));
std
::
string
str
(
static_cast
<
const
char
*>
(
send_par
.
acEnableSecurity
().
certificateId
()));
if
(
p
->
enable_secured_mode
(
str
,
send_par
.
acEnableSecurity
().
enforceSecurity
())
==
-
1
)
{
response
.
acSecResponse
()
=
BOOLEAN
(
false
);
}
...
...
@@ -161,4 +121,4 @@ namespace LibItsGeoNetworking__TestSystem {
}
}
}
/
* end of
namespace
*/
}
/
/
namespace
LibItsGeoNetworking__TestSystem
ccsrc/Ports/LibIts_ports/GN_ports/AdapterControlPort_GN.hh
View file @
f6d8a00a
...
...
@@ -8,39 +8,37 @@
namespace
LibItsGeoNetworking__TestSystem
{
class
AdapterControlPort
:
public
AdapterControlPort_BASE
{
params
_params
;
public:
AdapterControlPort
(
const
char
*
par_port_name
=
NULL
);
~
AdapterControlPort
();
class
AdapterControlPort
:
public
AdapterControlPort_BASE
{
params
_params
;
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
public:
AdapterControlPort
(
const
char
*
par_port_name
=
NULL
);
~
AdapterControlPort
();
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error); */
void
Handle_Fd_Event_Error
(
int
fd
);
void
Handle_Fd_Event_Writable
(
int
fd
);
void
Handle_Fd_Event_Readable
(
int
fd
);
/* void Handle_Timeout(double time_since_last_call); */
protected:
void
user_map
(
const
char
*
system_port
);
void
user_unmap
(
const
char
*
system_port
);
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
void
user_start
();
void
user_stop
();
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error); */
void
Handle_Fd_Event_Error
(
int
fd
);
void
Handle_Fd_Event_Writable
(
int
fd
);
void
Handle_Fd_Event_Readable
(
int
fd
);
/* void Handle_Timeout(double time_since_last_call); */
protected:
void
user_map
(
const
char
*
system_port
);
void
user_unmap
(
const
char
*
system_port
);
void
outgoing_send
(
const
LibItsGeoNetworking__TypesAndValues
::
AcGnPrimitive
&
send_par
);
void
outgoing_send
(
const
LibItsIpv6OverGeoNetworking__TypesAndValues
::
AcGn6Primitive
&
send_par
);
void
user_start
();
void
user_stop
();
void
outgoing_send
(
const
LibIts
Common
__TypesAndValues
::
AcGn
ss
Primitive
&
send_par
);
void
outgoing_send
(
const
LibIts
GeoNetworking
__TypesAndValues
::
AcGnPrimitive
&
send_par
);
void
outgoing_send
(
const
LibIts
Common
__TypesAndValues
::
Ac
Sec
Primitive
&
send_par
);
void
outgoing_send
(
const
LibIts
Ipv6OverGeoNetworking
__TypesAndValues
::
Ac
Gn6
Primitive
&
send_par
);
}
;
void
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcGnssPrimitive
&
send_par
)
;
}
/* end of namespace */
void
outgoing_send
(
const
LibItsCommon__TypesAndValues
::
AcSecPrimitive
&
send_par
);
};
}
// namespace LibItsGeoNetworking__TestSystem
#endif
ccsrc/Ports/LibIts_ports/GN_ports/GeoNetworkingPort.cc
View file @
f6d8a00a
...
...
@@ -17,18 +17,16 @@ namespace LibItsGeoNetworking__TestSystem {
:
GeoNetworkingPort_BASE
(
par_port_name
),
_cfg_params
(),
_layer_params
(),
_layer
(
nullptr
),
_time_key
(
"GeoNetworkingPort::outgoing_send"
)
{
// Nothing to do
}
// End of constructor
GeoNetworkingPort
::~
GeoNetworkingPort
()
{
GeoNetworkingPort
::~
GeoNetworkingPort
()
{
loggers
::
get_instance
().
log
(
">>> GeoNetworkingPort::~GeoNetworkingPort"
);
if
(
_layer
!=
nullptr
)
{
delete
_layer
;
}
}
// End of destructor
void
GeoNetworkingPort
::
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
)
{
void
GeoNetworkingPort
::
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
)
{
loggers
::
get_instance
().
log
(
"GeoNetworkingPort::set_parameter: %s=%s"
,
parameter_name
,
parameter_value
);
_cfg_params
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
std
::
string
(
parameter_name
),
std
::
string
(
parameter_value
)));
}
...
...
@@ -36,25 +34,15 @@ namespace LibItsGeoNetworking__TestSystem {
/*void GeoNetworkingPort::Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error) {}*/
void
GeoNetworkingPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{
}
void
GeoNetworkingPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{
}
void
GeoNetworkingPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{}
void
GeoNetworkingPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{
void
GeoNetworkingPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{}
}
void
GeoNetworkingPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{
}
/*void GeoNetworkingPort::Handle_Timeout(double time_since_last_call) {}*/
void
GeoNetworkingPort
::
user_map
(
const
char
*
system_port
)
{
void
GeoNetworkingPort
::
user_map
(
const
char
*
system_port
)
{
loggers
::
get_instance
().
log
(
">>> GeoNetworkingPort::user_map: %s"
,
system_port
);
// Build layer stack
params
::
iterator
it
=
_cfg_params
.
find
(
std
::
string
(
"params"
));
...
...
@@ -73,9 +61,8 @@ namespace LibItsGeoNetworking__TestSystem {
loggers
::
get_instance
().
error
(
"GeoNetworkingPort::user_map: No layers defined in configuration file"
);
}
}
// End of user_map method
void
GeoNetworkingPort
::
user_unmap
(
const
char
*
system_port
)
{
void
GeoNetworkingPort
::
user_unmap
(
const
char
*
system_port
)
{
loggers
::
get_instance
().
log
(
">>> GeoNetworkingPort::user_unmap: %s"
,
system_port
);
// Reset layers
...
...
@@ -85,22 +72,13 @@ namespace LibItsGeoNetworking__TestSystem {
}
}
// End of user_unmap method
void
GeoNetworkingPort
::
user_start
()
{
loggers
::
get_instance
().
log
(
">>> GeoNetworkingPort::user_start"
);
void
GeoNetworkingPort
::
user_start
()
{
loggers
::
get_instance
().
log
(
">>> GeoNetworkingPort::user_start"
);
}
// End of user_start method
}
// End of user_st
art
method
void
GeoNetworkingPort
::
user_stop
()
{
loggers
::
get_instance
().
log
(
">>> GeoNetworkingPort::user_stop"
);
}
// End of user_st
op
method
void
GeoNetworkingPort
::
user_stop
()
{
loggers
::
get_instance
().
log
(
">>> GeoNetworkingPort::user_stop"
);
}
// End of user_stop method
void
GeoNetworkingPort
::
outgoing_send
(
const
GeoNetworkingReq
&
send_par
)
{
void
GeoNetworkingPort
::
outgoing_send
(
const
GeoNetworkingReq
&
send_par
)
{
loggers
::
get_instance
().
log_msg
(
">>> GeoNetworkingPort::outgoing_send: payload="
,
send_par
);
float
duration
;
loggers
::
get_instance
().
set_start_time
(
_time_key
);
params
params
;
...
...
@@ -108,7 +86,7 @@ namespace LibItsGeoNetworking__TestSystem {
loggers
::
get_instance
().
set_stop_time
(
_time_key
,
duration
);
}
void
GeoNetworkingPort
::
receiveMsg
(
const
LibItsGeoNetworking__TestSystem
::
GeoNetworkingInd
&
p_ind
,
const
params
&
p_params
)
{
void
GeoNetworkingPort
::
receiveMsg
(
const
LibItsGeoNetworking__TestSystem
::
GeoNetworkingInd
&
p_ind
,
const
params
&
p_params
)
{
loggers
::
get_instance
().
log_msg
(
">>> GeoNetworkingPort::receive_msg: "
,
p_ind
);
// Sanity check
if
(
!
p_ind
.
is_bound
())
{
...
...
@@ -117,6 +95,5 @@ namespace LibItsGeoNetworking__TestSystem {
incoming_message
(
p_ind
);
}
}
/* end of namespace */
}
// namespace LibItsGeoNetworking__TestSystem
ccsrc/Ports/LibIts_ports/GN_ports/GeoNetworkingPort.hh
View file @
f6d8a00a
...
...
@@ -17,17 +17,17 @@
namespace
LibItsGeoNetworking__TestSystem
{
class
GeoNetworkingPort
:
public
GeoNetworkingPort_BASE
{
params
_cfg_params
;
params
_layer_params
;
layer
*
_layer
;
params
_cfg_params
;
params
_layer_params
;
layer
*
_layer
;
std
::
string
_time_key
;
public:
GeoNetworkingPort
(
const
char
*
par_port_name
=
NULL
);
~
GeoNetworkingPort
();
void
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
);
void
receiveMsg
(
const
LibItsGeoNetworking__TestSystem
::
GeoNetworkingInd
&
,
const
params
&
);
void
receiveMsg
(
const
LibItsGeoNetworking__TestSystem
::
GeoNetworkingInd
&
,
const
params
&
);
private:
/* void Handle_Fd_Event(int fd, boolean is_readable,
...
...
@@ -44,7 +44,7 @@ namespace LibItsGeoNetworking__TestSystem {
void
user_start
();
void
user_stop
();
void
outgoing_send
(
const
GeoNetworkingReq
&
send_par
);
void
outgoing_send
(
const
GeoNetworkingReq
&
send_par
);
};
}
/
* end of
namespace
*/
}
/
/
namespace
LibItsGeoNetworking__TestSystem
ccsrc/Ports/LibIts_ports/GN_ports/UpperTesterPort_GN.cc
View file @
f6d8a00a
#include
"uppertester_geonetworking_factory.hh"
#include
"loggers.hh"
#include
"UpperTesterPort_GN.hh"
#include
"loggers.hh"
//=============================================================================
namespace
LibItsGeoNetworking__TestSystem
{
UpperTesterPort
::
UpperTesterPort
(
const
char
*
par_port_name
)
:
UpperTesterPort_BASE
(
par_port_name
),
_cfg_params
(),
_layer_params
(),
_layer
(
NULL
),
_time_key
(
"UpperTesterPort_Gn::outgoing_send"
)
{
:
UpperTesterPort_BASE
(
par_port_name
),
_cfg_params
(),
_layer_params
(),
_layer
(
NULL
),
_time_key
(
"UpperTesterPort_Gn::outgoing_send"
)
{
loggers
::
get_instance
().
log
(
"UpperTesterPort_Gn::UpperTesterPort_Gn"
);
}
UpperTesterPort
::~
UpperTesterPort
()
{
UpperTesterPort
::~
UpperTesterPort
()
{
if
(
_layer
!=
NULL
)
{
delete
_layer
;
}
}
void
UpperTesterPort
::
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
)
{
void
UpperTesterPort
::
set_parameter
(
const
char
*
parameter_name
,
const
char
*
parameter_value
)
{
loggers
::
get_instance
().
log
(
"UpperTesterPort_Gn::set_parameter: %s=%s"
,
parameter_name
,
parameter_value
);
_cfg_params
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
std
::
string
(
parameter_name
),
std
::
string
(
parameter_value
)));
_cfg_params
.
log
();
...
...
@@ -29,25 +25,15 @@ namespace LibItsGeoNetworking__TestSystem {
/*void UpperTesterPort::Handle_Fd_Event(int fd, boolean is_readable,
boolean is_writable, boolean is_error) {}*/
void
UpperTesterPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{
}
void
UpperTesterPort
::
Handle_Fd_Event_Error
(
int
/*fd*/
)
{}
void
UpperTesterPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{
void
UpperTesterPort
::
Handle_Fd_Event_Writable
(
int
/*fd*/
)
{}
}
void
UpperTesterPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{
}
void
UpperTesterPort
::
Handle_Fd_Event_Readable
(
int
/*fd*/
)
{}
/*void UpperTesterPort::Handle_Timeout(double time_since_last_call) {}*/
void
UpperTesterPort
::
user_map
(
const
char
*
system_port
)
{
void
UpperTesterPort
::
user_map
(
const
char
*
system_port
)
{
loggers
::
get_instance
().
log
(
">>> UpperTesterPort_Gn::user_map: %s"
,
system_port
);
// Build layer stack
params
::
iterator
it
=
_cfg_params
.
find
(
std
::
string
(
"params"
));
...
...
@@ -61,11 +47,9 @@ namespace LibItsGeoNetworking__TestSystem {
}
else
{
loggers
::
get_instance
().
error
(
"UpperTesterPort_Gn::user_map: No layers defined in configuration file"
);
}
}
void
UpperTesterPort
::
user_unmap
(
const
char
*
system_port
)
{
void
UpperTesterPort
::
user_unmap
(
const
char
*
system_port
)
{
loggers
::
get_instance
().
log
(
">>> UpperTesterPort_Gn::user_unmap: %s"
,
system_port
);
if
(
_layer
!=
NULL
)
{
delete
_layer
;
...
...
@@ -73,57 +57,47 @@ namespace LibItsGeoNetworking__TestSystem {
}
}
void
UpperTesterPort
::
user_start
()
{
}
void
UpperTesterPort
::
user_start
()
{}
void
UpperTesterPort
::
user_stop
()
{
}
void
UpperTesterPort
::
user_stop
()
{}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsGeoNetworking__TypesAndValues
::
UtGnInitialize
&
send_par
)
{
void
UpperTesterPort
::
outgoing_send
(
const
LibItsGeoNetworking__TypesAndValues
::
UtGnInitialize
&
send_par
)
{
loggers
::
get_instance
().
log_msg
(
">>> UppertesterPort::outgoing_send: "
,
send_par
);
float
duration
;
loggers
::
get_instance
().
set_start_time
(
_time_key
);
static_cast
<
uppertester_geonetworking_layer
*>
(
_layer
)
->
sendMsg
(
send_par
,
_layer_params
);
loggers
::
get_instance
().
set_stop_time
(
_time_key
,
duration
);
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsGeoNetworking__TypesAndValues
::
UtGnChangePosition
&
send_par
)
{
void
UpperTesterPort
::
outgoing_send
(
const
LibItsGeoNetworking__TypesAndValues
::
UtGnChangePosition
&
send_par
)
{
loggers
::
get_instance
().
log_msg
(
">>> UppertesterPort::outgoing_send: "
,
send_par
);
float
duration
;
loggers
::
get_instance
().
set_start_time
(
_time_key
);
static_cast
<
uppertester_geonetworking_layer
*>
(
_layer
)
->
sendMsg
(
send_par
,
_layer_params
);
loggers
::
get_instance
().
set_stop_time
(
_time_key
,
duration
);
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsGeoNetworking__TypesAndValues
::
UtGnTrigger
&
send_par
)
{
void
UpperTesterPort
::
outgoing_send
(
const
LibItsGeoNetworking__TypesAndValues
::
UtGnTrigger
&
send_par
)
{
loggers
::
get_instance
().
log_msg
(
">>> UppertesterPort::outgoing_send: "
,
send_par
);
float
duration
;
loggers
::
get_instance
().
set_start_time
(
_time_key
);
static_cast
<
uppertester_geonetworking_layer
*>
(
_layer
)
->
sendMsg
(
send_par
,
_layer_params
);
loggers
::
get_instance
().
set_stop_time
(
_time_key
,
duration
);
}
void
UpperTesterPort
::
outgoing_send
(
const
LibItsGeoNetworking__TypesAndValues
::
UtAutoInteropTrigger
&
send_par
)
{
void
UpperTesterPort
::
outgoing_send
(
const
LibItsGeoNetworking__TypesAndValues
::
UtAutoInteropTrigger
&
send_par
)
{
loggers
::
get_instance
().
log_msg
(
">>> UppertesterPort::outgoing_send: "
,
send_par
);
float
duration
;
loggers
::
get_instance
().
set_start_time
(
_time_key
);
static_cast
<
uppertester_geonetworking_layer
*>
(
_layer
)
->
sendMsg
(
send_par
,
_layer_params
);
loggers
::
get_instance
().
set_stop_time
(
_time_key
,
duration
);
}
void
UpperTesterPort
::
receiveMsg
(
const
Base_Type
&
p_ind
,
const
params
&
p_params
)
{
void
UpperTesterPort
::
receiveMsg
(
const
Base_Type
&
p_ind
,
const
params
&
p_params
)
{
loggers
::
get_instance
().
log_msg
(
">>> UpperTesterPort_Gn::receive_msg: "
,
p_ind
);
// Sanity check
if
(
!
p_ind
.
is_bound
())
{
...
...
@@ -131,12 +105,12 @@ namespace LibItsGeoNetworking__TestSystem {
}
if
(
std
::
string
(
p_ind
.
get_descriptor
()
->
name
).
compare
(
"@LibItsGeoNetworking_TypesAndValues.UtGnResults"
)
==
0
)
{
// TODO To be refined
incoming_message
((
LibItsGeoNetworking__TypesAndValues
::
UtGnResults
&
)
p_ind
);
incoming_message
((
LibItsGeoNetworking__TypesAndValues
::
UtGnResults
&
)
p_ind
);
}
else
if
(
std
::
string
(
p_ind
.
get_descriptor
()
->
name
).
compare
(
"@LibItsGeoNetworking_TypesAndValues.UtGnEventInd"
)
==
0
)
{
incoming_message
(
static_cast
<
const
LibItsGeoNetworking__TypesAndValues
::
UtGnEventInd
&>
(
p_ind
));
incoming_message
(
static_cast
<
const
LibItsGeoNetworking__TypesAndValues
::
UtGnEventInd
&>
(
p_ind
));
}
else
{
loggers
::
get_instance
().
warning
(
"UpperTesterPort_Gn::receive_msg: Message not processed: %s"
,
p_ind
.
get_descriptor
()
->
name
);
}
}
}
/
* end of
namespace
*/
}
/
/
namespace
LibItsGeoNetworking__TestSystem
Prev
1
2
3
4
5
6
7
8
…
17
Next