Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ITS - Intelligent Transport Systems
ITS
Commits
0cd5a90b
Commit
0cd5a90b
authored
Oct 10, 2018
by
garciay
Browse files
STF545: Execute first EA tests
parent
00ee277b
Changes
7
Hide whitespace changes
Inline
Side-by-side
ccsrc/Framework/base_time.hh
0 → 100644
View file @
0cd5a90b
/*!
* \file base_time.hh
* \brief Header file for the control port base_time functionality.
* \author ETSI STF525
* \copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
* \version 0.1
*/
#pragma once
#include
<chrono>
/**
* \class base_time
* \brief This class provides time tools such as getting current time
*/
class
base_time
{
const
unsigned
long
long
its_base_time
=
1072911600000L
-
3600L
;
//! Base time 01/01/2004 in millseconds
static
base_time
*
_instance
;
private:
base_time
()
{
};
//! Can not be created manually
public:
static
inline
base_time
&
get_instance
();
virtual
~
base_time
()
{
if
(
_instance
!=
nullptr
)
delete
_instance
;
};
public:
inline
const
unsigned
long
long
get_current_time
()
const
;
inline
const
unsigned
long
long
get_its_base_time
()
const
;
inline
const
unsigned
long
long
get_its_current_time
()
const
;
};
// End of class base_time
// static functions
base_time
&
base_time
::
get_instance
()
{
return
(
_instance
!=
nullptr
)
?
*
_instance
:
*
(
_instance
=
new
base_time
());
}
const
unsigned
long
long
base_time
::
get_current_time
()
const
{
return
std
::
chrono
::
duration_cast
<
std
::
chrono
::
milliseconds
>
(
std
::
chrono
::
system_clock
::
now
().
time_since_epoch
()).
count
();
}
const
unsigned
long
long
base_time
::
get_its_base_time
()
const
{
return
base_time
::
its_base_time
;
}
const
unsigned
long
long
base_time
::
get_its_current_time
()
const
{
return
std
::
chrono
::
duration_cast
<
std
::
chrono
::
milliseconds
>
(
std
::
chrono
::
system_clock
::
now
().
time_since_epoch
()).
count
()
-
base_time
::
its_base_time
;
}
ccsrc/Framework/src/base_time.cc
0 → 100644
View file @
0cd5a90b
/*!
* \file base_time.cc
* \brief Source file for the control port base_time functionality.
* \author ETSI STF525
* \copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
* \version 0.1
*/
#include
"base_time.hh"
base_time
*
base_time
::
_instance
=
nullptr
;
ccsrc/Protocols/Security/etsi_ts102941_data.cc
0 → 100644
View file @
0cd5a90b
#include
"etsi_ts102941_data.hh"
#include
"loggers.hh"
int
etsi_ts102941_data
::
encode
(
const
EtsiTs102941MessagesItss
::
EtsiTs102941Data
&
p_etsi_ts_10291_data
,
OCTETSTRING
&
p_data
)
{
loggers
::
get_instance
().
log
(
">>> etsi_ts102941_data::encode: %s"
,
p_etsi_ts_10291_data
.
get_descriptor
()
->
name
);
BITSTRING
b
;
TTCN_EncDec
::
clear_error
();
TTCN_Buffer
buffer
;
p_etsi_ts_10291_data
.
encode
(
*
p_etsi_ts_10291_data
.
get_descriptor
(),
buffer
,
TTCN_EncDec
::
CT_OER
);
p_data
=
OCTETSTRING
(
buffer
.
get_len
(),
buffer
.
get_data
());
loggers
::
get_instance
().
log_msg
(
"etsi_ts102941_data::encode: "
,
p_data
);
return
0
;
}
int
etsi_ts102941_data
::
decode
(
const
OCTETSTRING
&
p_data
,
EtsiTs102941MessagesItss
::
EtsiTs102941Data
&
p_etsi_ts_10291_data
,
params
*
p_params
)
{
loggers
::
get_instance
().
log_msg
(
">>> etsi_ts102941_data::decode: "
,
p_data
);
TTCN_EncDec
::
clear_error
();
TTCN_Buffer
decoding_buffer
(
p_data
);
// _params = params;
p_etsi_ts_10291_data
.
decode
(
*
p_etsi_ts_10291_data
.
get_descriptor
(),
decoding_buffer
,
TTCN_EncDec
::
CT_OER
);
loggers
::
get_instance
().
log_msg
(
"<<< etsi_ts102941_data::decode: "
,
(
const
Base_Type
&
)
p_etsi_ts_10291_data
);
return
0
;
}
ccsrc/Protocols/Security/etsi_ts102941_data.hh
0 → 100644
View file @
0cd5a90b
#pragma once
#include
"codec.hh"
#include
"params.hh"
#include
"EtsiTs102941MessagesItss.hh"
class
etsi_ts102941_data
:
public
codec
<
EtsiTs102941MessagesItss
::
EtsiTs102941Data
,
EtsiTs102941MessagesItss
::
EtsiTs102941Data
>
{
public:
explicit
etsi_ts102941_data
()
:
codec
<
EtsiTs102941MessagesItss
::
EtsiTs102941Data
,
EtsiTs102941MessagesItss
::
EtsiTs102941Data
>
()
{
};
virtual
~
etsi_ts102941_data
()
{
};
virtual
int
encode
(
const
EtsiTs102941MessagesItss
::
EtsiTs102941Data
&
p_etsi_ts_10291_data
,
OCTETSTRING
&
p_data
);
virtual
int
decode
(
const
OCTETSTRING
&
p_data
,
EtsiTs102941MessagesItss
::
EtsiTs102941Data
&
p_etsi_ts_10291_data
,
params
*
p_params
=
NULL
);
};
// End of class etsi_ts102941_data
scripts/titan_repos.txt
View file @
0cd5a90b
...
...
@@ -31,10 +31,12 @@ https://github.com/eclipse/titan.ProtocolModules.RADIUS_ProtocolModule_Generator
https://github.com/eclipse/titan.ProtocolModules.WebSocket.git
https://github.com/eclipse/titan.ProtocolModules.HTTP2.0.git
https://github.com/eclipse/titan.Libraries.TCCUsefulFunctions.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.CoAP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.MQTT.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.SCTP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.SDP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.TLS.git
git://git.eclipse.org/gitroot/titan/titan.TestPorts.GPIO.git
git://git.eclipse.org/gitroot/titan/titan.TestPorts.Serial.git
https://git.eclipse.org/r/titan/titan.ApplicationLibraries.CoAP
https://git.eclipse.org/r/titan/titan.ApplicationLibraries.MQTT
https://git.eclipse.org/r/titan/titan.ProtocolModules.CoAP.git
https://git.eclipse.org/r/titan/titan.ProtocolModules.MQTT.git
https://git.eclipse.org/r/titan/titan.ProtocolModules.SCTP.git
https://git.eclipse.org/r/titan/titan.ProtocolModules.SDP.git
https://git.eclipse.org/r/titan/titan.ProtocolModules.TLS.git
https://git.eclipse.org/r/titan/titan.TestPorts.GPIO.git
https://git.eclipse.org/r/titan/titan.TestPorts.Serial.git
scripts/update_its_project.bash
View file @
0cd5a90b
...
...
@@ -355,7 +355,10 @@ chown -R ${CHOWN_USER_GROUP} ${PATH_DEV_ITS}
mkdir
${
PATH_DEV_ITS
}
/bin/asn1
cd
${
PATH_DEV_ITS
}
/bin/asn1
make
CC
=
gcc
-f
${
PATH_DEV_ITS
}
/asn1/Makefile
# Remove useless ASN.1 files
rm
-fr
${
PATH_DEV_ITS
}
/ttcn/LibIts/asn1/IS/ISO_TS_19091/original
rm
-f
${
PATH_DEV_ITS
}
/ttcn/LibIts/asn1/Security/TS102921/EtsiTs102941MessagesCA.asn
rm
-f
${
PATH_DEV_ITS
}
/ttcn/LibIts/asn1/Security/TS102921/MessagesItss_OptionalPrivacy.asn
cd
-
if
[
!
-d
${
PATH_DEV_ITS
}
/include/asn1
]
then
...
...
LibIts
@
d58221e7
Compare
aabcd1ce
...
d58221e7
Subproject commit
aabcd1ceff5219dc4d53fda9db26d841e2dd6673
Subproject commit
d58221e7c8fdd6ad4baf5b396b8c8f8836ea99e6
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment