Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge release to develop for release 7.6.0 #605

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
| CicleCI Build Status | Sonar Code Quality |
## Develop CI/CD Processes
| V2X-Hub Docker Image Builds (x86 or AMD) | V2X-Hub Docker Image Builds (ARM) | Sonar Code Quality |
|----------------------|---------------------|---------------------|
[![Build Workflows](https://github.com/usdot-fhwa-OPS/V2X-Hub/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/usdot-fhwa-OPS/V2X-Hub/actions/workflows/build.yml)|[![CircleCI](https://dl.circleci.com/status-badge/img/gh/usdot-fhwa-OPS/V2X-Hub/tree/develop.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/usdot-fhwa-OPS/V2X-Hub/tree/develop)| [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=usdot-fhwa-ops_V2X-Hub&metric=alert_status)](https://sonarcloud.io/dashboard?id=usdot-fhwa-ops_V2X-Hub) |
## Release CI/CD Processes
| V2X-Hub Docker Image Builds (x86 or AMD) | V2X-Hub Docker Image Builds (ARM) |
|----------------------|---------------------|
[![CircleCI](https://circleci.com/gh/usdot-fhwa-OPS/V2X-Hub.svg?style=svg)](https://circleci.com/gh/usdot-fhwa-OPS/V2X-Hub) | [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=usdot-fhwa-ops_V2X-Hub&metric=alert_status)](https://sonarcloud.io/dashboard?id=usdot-fhwa-ops_V2X-Hub) |

[![Build Workflows](https://github.com/usdot-fhwa-OPS/V2X-Hub/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/usdot-fhwa-OPS/V2X-Hub/actions/workflows/build.yml)|[![CircleCI](https://dl.circleci.com/status-badge/img/gh/usdot-fhwa-OPS/V2X-Hub/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/usdot-fhwa-OPS/V2X-Hub/tree/master)|
# Overview
In order to bring infrastructure components into the Connected Vehicle architecture, you need software that will facilitate the exchange of data in a format that can be understood by both vehicles and infrastructure devices The V2X Hub, takes in data from vehicles via Basic Safety Messages (BSM) in a Society of Automotive Engineers (SAE) standard format and translates the data to a National Transportation Communications for ITS Protocol (NTCIP) that infrastructure components can understand. And vice versa. It translates Signal Phase and Timing (SPaT) data from NTCIP to SAE and sends it to the Roadside Unit (RSU) for broadcast to mobile devices, including vehicles.

Expand Down
6 changes: 3 additions & 3 deletions configuration/amd64/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
- mysql-datavolume:/var/lib/mysql

php:
image: usdotfhwaops/php:latest
image: usdotfhwaops/php:7.6.0
container_name: php
network_mode: host
depends_on:
Expand All @@ -30,7 +30,7 @@ services:
tty: true

v2xhub:
image: usdotfhwaops/v2xhubamd:latest
image: usdotfhwaops/v2xhubamd:7.6.0
container_name: v2xhub
network_mode: host
restart: always
Expand All @@ -46,7 +46,7 @@ services:
- ./logs:/var/log/tmx
- ./MAP:/var/www/plugins/MAP
port_drayage_webservice:
image: usdotfhwaops/port-drayage-webservice:latest
image: usdotfhwaops/port-drayage-webservice:7.6.0
container_name: port_drayage_webservice
network_mode: host
secrets:
Expand Down
6 changes: 3 additions & 3 deletions configuration/arm64/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
- mysql-datavolume:/var/lib/mysql

php:
image: usdotfhwaops/php_arm:latest
image: usdotfhwaops/php_arm:7.6.0
container_name: php
network_mode: host
depends_on:
Expand All @@ -30,7 +30,7 @@ services:
tty: true

v2xhub:
image: usdotfhwaops/v2xhubarm:latest
image: usdotfhwaops/v2xhubarm:7.6.0
container_name: v2xhub
network_mode: host
restart: always
Expand All @@ -44,7 +44,7 @@ services:
- ./logs:/var/log/tmx
- ./MAP:/var/www/plugins/MAP
port_drayage_webservice:
image: usdotfhwaops/port-drayage-webservice_arm:latest
image: usdotfhwaops/port-drayage-webservice_arm:7.6.0
container_name: port_drayage_webservice
network_mode: host
secrets:
Expand Down
2 changes: 1 addition & 1 deletion ext/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pushd /tmp
if [ -d "nats.c" ]; then
rm -r nats.c
fi
git clone https://github.com/nats-io/nats.c
git clone https://github.com/nats-io/nats.c --branch v3.7.0
cd nats.c
cmake . -DNATS_BUILD_NO_SPIN=ON
make -j${numCPU}
Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/CARMACloudPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT ( CARMACloudPlugin VERSION 7.5.1 LANGUAGES CXX )
PROJECT ( CARMACloudPlugin VERSION 7.6.0 LANGUAGES CXX )

SET (TMX_PLUGIN_NAME "CARMACloud")
add_compile_options(-fPIC)
Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/CARMAStreetsPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT ( CARMAStreetsPlugin VERSION 7.5.1 LANGUAGES CXX )
PROJECT ( CARMAStreetsPlugin VERSION 7.6.0 LANGUAGES CXX )

BuildTmxPlugin ( )

Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/CDASimAdapter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT ( CDASimAdapter VERSION 7.5.1 LANGUAGES CXX )
PROJECT ( CDASimAdapter VERSION 7.6.0 LANGUAGES CXX )
set(CMAKE_CXX_STANDARD 17)

FIND_PACKAGE( carma-clock )
Expand Down
58 changes: 33 additions & 25 deletions src/v2i-hub/CDASimAdapter/src/CDASimAdapter.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "include/CDASimAdapter.hpp"

#include <chrono>

using namespace tmx::utils;

Expand All @@ -18,12 +18,12 @@ namespace CDASimAdapter{
success = GetConfigValue<double>("X", location.X);
success = success && GetConfigValue<double>("Y", location.Y);
success = success && GetConfigValue<double>("Z", location.Z);
PLOG(logINFO) << "Location of Simulated V2X-Hub updated to : {" << location.X << ", "
PLOG(logINFO) << "Location of Simulated V2X-Hub updated to : {" << location.X << ", "
<< location.Y << ", " << location.Z << "}." << std::endl;
success = success && GetConfigValue<int>("MaxConnectionAttempts", max_connection_attempts);
success = success && GetConfigValue<uint>("ConnectionSleepTime", connection_sleep_time);
if (connection_sleep_time < 1 ) {
PLOG(logWARNING) << "ConnectionSleepTime of " << connection_sleep_time << " is invalid. Valid values are <= 1." << std::endl;
PLOG(logWARNING) << "ConnectionSleepTime of " << connection_sleep_time << " is invalid. Valid values are <= 1." << std::endl;
connection_sleep_time = 1;
}
if (!success) {
Expand All @@ -33,15 +33,15 @@ namespace CDASimAdapter{

void CDASimAdapter::OnConfigChanged(const char *key, const char *value) {
PluginClient::OnConfigChanged(key, value);
UpdateConfigSettings();
UpdateConfigSettings();
}

void CDASimAdapter::OnStateChange(IvpPluginState state) {
PluginClient::OnStateChange(state);

if (state == IvpPluginState_registered) {
UpdateConfigSettings();

// While CARMA Simulation connection is down, attempt to reconnect
int connection_attempts = 0;
while ( (!connection || !connection->is_connected()) && (connection_attempts < max_connection_attempts || max_connection_attempts < 1 ) ) {
Expand All @@ -66,22 +66,30 @@ namespace CDASimAdapter{
}else {
PLOG(logERROR) << "CDASim connection failed!" << std::endl;
}

}
}



void CDASimAdapter::forward_time_sync_message(tmx::messages::TimeSyncMessage &msg) {

std::string payload =msg.to_string();
PLOG(logDEBUG1) << "Sending Time Sync Message " << msg << std::endl;
// A script to validate time synchronization of tools in CDASim currently relies on the following
// log line. TODO: This line is meant to be removed in the future upon completion of this work:
// https://github.com/usdot-fhwa-stol/carma-analytics-fotda/pull/43
auto time_now = std::chrono::system_clock::now();
auto epoch = time_now.time_since_epoch();
auto milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(epoch);
PLOG(logDEBUG1) << "Simulation Time: " << msg.get_timestep() << " where current system time is: " << milliseconds.count() << ", where msgs: " << msg << std::endl;

this->BroadcastMessage<tmx::messages::TimeSyncMessage>(msg, _name, 0 , IvpMsgFlags_None);

}

void CDASimAdapter::forward_simulated_detected_message(tmx::messages::simulation::SensorDetectedObject &msg) {
PLOG(logDEBUG1) << "Sending Simulated SensorDetectedObject Message " << msg << std::endl;
this->BroadcastMessage<tmx::messages::simulation::SensorDetectedObject>(msg, _name, 0 , IvpMsgFlags_None);
this->BroadcastMessage<tmx::messages::simulation::SensorDetectedObject>(msg, _name, 0 , IvpMsgFlags_None);
}

bool CDASimAdapter::connect() {
Expand All @@ -97,7 +105,7 @@ namespace CDASimAdapter{
std::string infrastructure_id = sim::get_sim_config(sim::INFRASTRUCTURE_ID);
std::string sensor_json_file_path = sim::get_sim_config(sim::SENSOR_JSON_FILE_PATH);

PLOG(logINFO) << "CDASim connecting " << simulation_ip <<
PLOG(logINFO) << "CDASim connecting " << simulation_ip <<
"\nUsing Registration Port : " << std::to_string( simulation_registration_port) <<
" Time Sync Port: " << std::to_string( time_sync_port) << " and V2X Port: " << std::to_string(v2x_port) << std::endl;
if ( connection ) {
Expand All @@ -108,20 +116,20 @@ namespace CDASimAdapter{
connection = std::make_unique<CDASimConnection>(simulation_ip, infrastructure_id, simulation_registration_port, sim_v2x_port, local_ip,
time_sync_port, simulated_interaction_port, v2x_port, location, sensor_json_file_path);
}
}
}
catch (const TmxException &e) {
PLOG(logERROR) << "Exception occured attempting to initialize CDASim Connection : " << e.what() << std::endl;
return false;
}
catch (const std::invalid_argument &e ) {
// std::stoul throws invalid arguement exception when provided with a string that contains characters that are not numbers.
PLOG(logERROR) << "Exception occured attempting to initialize CDASim Connection : " << e.what() <<
PLOG(logERROR) << "Exception occured attempting to initialize CDASim Connection : " << e.what() <<
". Check environment variables are set to the correct type!";
return false;
}
}
return connection->connect();
}



void CDASimAdapter::start_immediate_forward_thread() {
Expand All @@ -130,10 +138,10 @@ namespace CDASimAdapter{
}
immediate_forward_tick_id = immediate_forward_timer->AddPeriodicTick([this]() {
this->attempt_message_from_v2xhub();

} // end of lambda expression
, std::chrono::milliseconds(5) );

immediate_forward_timer->Start();

}
Expand Down Expand Up @@ -170,27 +178,27 @@ namespace CDASimAdapter{

void CDASimAdapter::start_sensor_detected_object_detection_thread() {
PLOG(logDEBUG) << "Creating Thread Timer for simulated external object" << std::endl;
try
try
{
if(!external_object_detection_thread_timer)
{
external_object_detection_thread_timer = std::make_unique<tmx::utils::ThreadTimer>(std::chrono::milliseconds(5));
}
}
external_object_detection_thread_timer->AddPeriodicTick([this](){
PLOG(logDEBUG1) << "Listening for Sensor Detected Message from CDASim." << std::endl;
auto msg = connection->consume_sensor_detected_object_message();
if ( !msg.is_empty()) {
if ( !msg.is_empty()) {
this->forward_simulated_detected_message(msg);
}
else
else
{
PLOG(logDEBUG1) << "CDASim connection has not yet received an simulated sensor detected message!" << std::endl;
}
}//End lambda
, std::chrono::milliseconds(5));
external_object_detection_thread_timer->Start();
}
catch ( const UdpServerRuntimeError &e )
catch ( const UdpServerRuntimeError &e )
{
PLOG(logERROR) << "Error occured :" << e.what() << std::endl;
}
Expand Down Expand Up @@ -238,23 +246,23 @@ namespace CDASimAdapter{
}
}


int CDASimAdapter::Main() {


PLOG(logINFO) << "Starting plugin " << _name << std::endl;
PLOG(logINFO) << "Starting plugin " << _name << std::endl;

while (_plugin->state != IvpPluginState_error) {

if (IsPluginState(IvpPluginState_registered))
{

}
}

return EXIT_SUCCESS;
}

}


Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/CommandPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT ( CommandPlugin VERSION 7.5.1 LANGUAGES CXX )
PROJECT ( CommandPlugin VERSION 7.6.0 LANGUAGES CXX )

FIND_PACKAGE (OpenSSL REQUIRED)

Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/CswPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT ( CswPlugin VERSION 7.5.1 LANGUAGES CXX )
PROJECT ( CswPlugin VERSION 7.6.0 LANGUAGES CXX )

SET (TMX_PLUGIN_NAME "CSW")

Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/DmsPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT ( DmsPlugin VERSION 7.5.1 LANGUAGES CXX )
PROJECT ( DmsPlugin VERSION 7.6.0 LANGUAGES CXX )

SET (TMX_PLUGIN_NAME "Dynamic Message Sign")

Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/ERVCloudForwardingPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT(ERVCloudForwardingPlugin VERSION 7.5.1 LANGUAGES CXX)
PROJECT(ERVCloudForwardingPlugin VERSION 7.6.0 LANGUAGES CXX)

SET(TMX_PLUGIN_NAME "ERVCloudForwarding")
add_compile_options(-fPIC)
Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/ImmediateForwardPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT ( ImmediateForwardPlugin VERSION 7.5.1 LANGUAGES CXX )
PROJECT ( ImmediateForwardPlugin VERSION 7.6.0 LANGUAGES CXX )

SET (TMX_PLUGIN_NAME "Immediate Forward")

Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/LocationPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project( LocationPlugin VERSION 7.5.1 LANGUAGES CXX )
project( LocationPlugin VERSION 7.6.0 LANGUAGES CXX )

SET (TMX_PLUGIN_NAME Location)

Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/MapPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT ( MapPlugin VERSION 7.5.1 LANGUAGES CXX )
PROJECT ( MapPlugin VERSION 7.6.0 LANGUAGES CXX )

SET (TMX_PLUGIN_NAME "MAP")

Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/MessageLoggerPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT ( MessageLoggerPlugin VERSION 7.5.1 LANGUAGES CXX )
PROJECT ( MessageLoggerPlugin VERSION 7.6.0 LANGUAGES CXX )

SET (TMX_PLUGIN_NAME "MessageLoggerPlugin")

Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/MessageReceiverPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT ( MessageReceiverPlugin VERSION 7.5.1 LANGUAGES CXX )
PROJECT ( MessageReceiverPlugin VERSION 7.6.0 LANGUAGES CXX )

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/ODEForwardPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT ( ODEForwardPlugin VERSION 7.5.1 LANGUAGES CXX )
PROJECT ( ODEForwardPlugin VERSION 7.6.0 LANGUAGES CXX )

SET (TMX_PLUGIN_NAME "ODEForwardPlugin")

Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/PedestrianPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT ( PedestrianPlugin VERSION 7.5.1 LANGUAGES CXX )
PROJECT ( PedestrianPlugin VERSION 7.6.0 LANGUAGES CXX )

SET (TMX_PLUGIN_NAME "Pedestrian")
add_compile_options(-fPIC)
Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/PortDrayagePlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT ( PortDrayagePlugin VERSION 7.5.1 LANGUAGES CXX )
PROJECT ( PortDrayagePlugin VERSION 7.6.0 LANGUAGES CXX )

SET (TMX_PLUGIN_NAME "PortDrayage")
set(CMAKE_AUTOMOC ON)
Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/PreemptionPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT ( PreemptionPlugin VERSION 7.5.1 LANGUAGES CXX )
PROJECT ( PreemptionPlugin VERSION 7.6.0 LANGUAGES CXX )

SET (TMX_PLUGIN_NAME "Preemption")

Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/RSUHealthMonitorPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT(RSUHealthMonitorPlugin VERSION 7.5.1 LANGUAGES CXX)
PROJECT(RSUHealthMonitorPlugin VERSION 7.6.0 LANGUAGES CXX)

set(TMX_PLUGIN_NAME "RSU Health Monitor")

Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/RtcmPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT ( RtcmPlugin VERSION 7.5.1 LANGUAGES CXX )
PROJECT ( RtcmPlugin VERSION 7.6.0 LANGUAGES CXX )

SET (TMX_PLUGIN_NAME "RTCM")

Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/SpatPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT ( SpatPlugin VERSION 7.5.1 LANGUAGES CXX )
PROJECT ( SpatPlugin VERSION 7.6.0 LANGUAGES CXX )

SET (TMX_PLUGIN_NAME "SPAT")

Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/TelematicBridgePlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT (TelematicBridgePlugin VERSION 7.5.1 LANGUAGES CXX)
PROJECT (TelematicBridgePlugin VERSION 7.6.0 LANGUAGES CXX)

set (TMX_PLUGIN_NAME "Telematic Bridge")

Expand Down
2 changes: 1 addition & 1 deletion src/v2i-hub/TimPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT ( TimPlugin VERSION 7.5.1 LANGUAGES CXX )
PROJECT ( TimPlugin VERSION 7.6.0 LANGUAGES CXX )

SET (TMX_PLUGIN_NAME "TIM")
add_compile_options(-fPIC)
Expand Down
2 changes: 1 addition & 1 deletion web/admin/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</div>
<div class="headerbottom">
<div class="timelabel" id="timeDisplay"></div>
<div class="versionlabel" id="versionDisplay">7.4.0</div>
<div class="versionlabel" id="versionDisplay">7.6.0</div>
</div>
</div>

Expand Down
Loading