Skip to content

Commit

Permalink
V2xrelease 7.1 (#320)
Browse files Browse the repository at this point in the history
* CRMTFC-137: Creating CARMAStreets prototype V2X-Hub

CRMTFC-137: Sprint Review demo  fix

CARMA-Streets: Save point

CRMTFC-137:CARMAStreetsPlugin

+ Added plugin to connect to CARMA Streets
kafka broker and forward a configurable list
of MobilityOperation messages based on strategy.

CRMTFC-137: Add custom image dockerfiles for

+ mysql
+ php

CRMTFC-137: Fix docker-compose and set credentials in docker-compose

CRMTFC-137: CircleCI to push custom php and mysql images

CRMTFX-137: fiex circlci config to commit mysql images

+ removed ls commands from php dockerfile

CRMTFC-137: CircleCI add user to mysql image

using build args

CRMTFC-137: Dockerfile bug

CRMTFC-137: Remove .env username and password from docker-compose

* init (#261)

* CRMTFC-137: Creating CARMAStreets prototype V2X-Hub

CRMTFC-137: Sprint Review demo  fix

CARMA-Streets: Save point

CRMTFC-137:CARMAStreetsPlugin

+ Added plugin to connect to CARMA Streets
kafka broker and forward a configurable list
of MobilityOperation messages based on strategy.

CRMTFC-137: Add custom image dockerfiles for

+ mysql
+ php

CRMTFC-137: Fix docker-compose and set credentials in docker-compose

CRMTFC-137: CircleCI to push custom php and mysql images

CRMTFX-137: fiex circlci config to commit mysql images

+ removed ls commands from php dockerfile

CRMTFC-137: CircleCI add user to mysql image

using build args

CRMTFC-137: Dockerfile bug

CRMTFC-137: Remove .env username and password from docker-compose

* init (#261)

* mobility operation message encoding/decoding for streets support (#271)

* update

* add mobilityoperation and bsm

* update

* update

* update bsm id

* update

* update trajectory format

* update

* address comment

* update tag

* update

* PR cmt

* PR cmt

* PR cmt

* address comments

* Fix BSM ID hex conversion into decimal  (#286)

* init

* update

* update

* update

* update

* init (#289)

* Fix dependencies issues after rebase (#264)

* init

* update

* update

Co-authored-by: paulbourelly999 <77466294+paulbourelly999@users.noreply.github.com>

* Issue-304: Fix port drayage webservice circleci

* Issue-314: Fixed PR issues for carma-streets merge

+ Logging to PLOG statements
+ Consolidate logging statements to decrease cognitive complexity
+ Added message types to manifest json
+ Removed old docker-compose files
+ Added CARMAStreetsPlugin to sonar analysis

* Update manifest.json

Co-authored-by: Paul K Bourelly <paul.k.bourelly@leidos.com>
Co-authored-by: dan-du-car <62157949+dan-du-car@users.noreply.github.com>
Co-authored-by: paulbourelly999 <77466294+paulbourelly999@users.noreply.github.com>
Co-authored-by: Anjan Rayamajhi <18730915+arayama@users.noreply.github.com>
  • Loading branch information
5 people authored Feb 3, 2022
1 parent 1cf6f14 commit 0d2e43b
Show file tree
Hide file tree
Showing 14 changed files with 877 additions and 26 deletions.
3 changes: 0 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ jobs:
port_drayage_webservice_build_develop :
docker:
- image: cimg/openjdk:11.0.12
# Set working directory
working_directory: "/home/V2X-Hub"
steps:
- setup_remote_docker
- checkout
Expand All @@ -214,7 +212,6 @@ jobs:
port_drayage_webservice_build :
docker:
- image: cimg/openjdk:11.0.12
# Set working directory
steps:
- setup_remote_docker
- checkout
Expand Down
9 changes: 7 additions & 2 deletions .sonarqube/sonar-scanner.properties
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ sonar.modules= PedestrianPlugin, \
PortDrayagePlugin, \
ODELoggerPlugin, \
DsrcImmediateForwardPlugin, \
MessageReceiverPlugin
MessageReceiverPlugin, \
CARMAStreetsPlugin



Expand All @@ -76,6 +77,7 @@ RtcmPlugin.sonar.projectBaseDir =/home/V2X-Hub/src/v2i-hub/RtcmP
SPaTLoggerPlugin.sonar.projectBaseDir =/home/V2X-Hub/src/v2i-hub/SPaTLoggerPlugin
SpatPlugin.sonar.projectBaseDir =/home/V2X-Hub/src/v2i-hub/SpatPlugin
TimPlugin.sonar.projectBaseDir =/home/V2X-Hub/src/v2i-hub/TimPlugin
CARMAStreetsPlugin.sonar.projectBaseDir =/home/V2X-Hub/src/v2i-hub/CARMAStreetsPlugin

# C++ Package differences
# Sources
Expand All @@ -102,6 +104,7 @@ CARMACloudPlugin.sonar.sources =src
CommandPlugin.sonar.sources =src
ODELoggerPlugin.sonar.sources =src
MobilityOperationPlugin.sonar.sources =src
CARMAStreetsPlugin.sonar.sources =src



Expand Down Expand Up @@ -130,7 +133,8 @@ PreemptionPlugin.sonar.cfamily.gcov.reportsPath =coverage
#CARMACloudPlugin.sonar.cfamily.gcov.reportsPath =coverage
#MobilityOperationPlugin.sonar.cfamily.gcov.reportsPath =coverage
#ODELoggerPlugin.sonar.cfamily.gcov.reportsPath =coverage
#CommandPlugin.cfamily.gcov.reportsPath =coverage
#CommandPlugin.sonar.cfamily.gcov.reportsPath =coverage
#CARMAStreetsPlugin.sonar.cfamily.gcov.reportsPath =coverage

# Tests
# Note: For C++ setting this field does not cause test analysis to occur. It only allows the test source code to be evaluated.
Expand All @@ -157,3 +161,4 @@ PreemptionPlugin.sonar.tests=test
#MobilityOperationPlugin.sonar.tests=test
#ODELoggerPlugin.sonar.tests=test
#CommandPlugin.sonar.tests=test
#CARMAStreetsPlugin.sonar.tests=test
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ RUN ln -s ../bin PortDrayagePlugin/bin
RUN zip PortDrayagePlugin.zip PortDrayagePlugin/bin/PortDrayagePlugin PortDrayagePlugin/manifest.json
RUN ln -s ../bin ODELoggerPlugin/bin
RUN zip ODELoggerPlugin.zip ODELoggerPlugin/bin/ODELoggerPlugin ODELoggerPlugin/manifest.json
RUN ln -s ../bin CARMAStreetsPlugin/bin
RUN zip CARMAStreetsPlugin.zip CARMAStreetsPlugin/bin/CARMAStreetsPlugin CARMAStreetsPlugin/manifest.json


WORKDIR /home/V2X-Hub/src/tmx/TmxCore/
Expand Down
3 changes: 2 additions & 1 deletion configuration/amd64/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ services:
network_mode: host
depends_on:
- db
- v2xhub
stdin_open: true
tty: true

Expand All @@ -33,7 +34,7 @@ services:
network_mode: host
restart: always
depends_on:
- php
- db
environment:
- MYSQL_PASSWORD=/run/secrets/mysql_password
secrets:
Expand Down
3 changes: 2 additions & 1 deletion configuration/arm64/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ services:
network_mode: host
depends_on:
- db
- v2xhub
stdin_open: true
tty: true

Expand All @@ -33,7 +34,7 @@ services:
network_mode: host
restart: always
depends_on:
- php
- db
environment:
- MYSQL_PASSWORD=/run/secrets/mysql_password
secrets:
Expand Down
1 change: 1 addition & 0 deletions container/service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ tmxctl --plugin-install MessageLoggerPlugin.zip
tmxctl --plugin-install PedestrianPlugin.zip
tmxctl --plugin-install TimPlugin.zip
tmxctl --plugin-install CARMACloudPlugin.zip
tmxctl --plugin-install CARMAStreetsPlugin.zip
tmxctl --plugin-install ODELoggerPlugin.zip
tmxctl --plugin-install PortDrayagePlugin.zip

Expand Down
4 changes: 3 additions & 1 deletion docker/Dockerfile-depl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ubuntu:bionic-20190807 AS install_dependencies

RUN apt-get update && apt-get install -y cmake git build-essential libgtest-dev libssl-dev qtbase5-dev \
zip libmysqlcppconn-dev libboost1.65-all-dev libmysqlclient-dev uuid-dev libxerces-c-dev qtbase5-dev \
libcurl4-openssl-dev libgps-dev libsnmp-dev librdkafka-dev libev-dev libuv-dev libcpprest-dev
libcurl4-openssl-dev libgps-dev libsnmp-dev librdkafka-dev libjsoncpp-dev libev-dev libuv-dev libcpprest-dev
# Build and install GTest
WORKDIR cd /usr/src/googletest/googletest
RUN mkdir ~/build
Expand Down Expand Up @@ -118,6 +118,8 @@ RUN zip PortDrayagePlugin.zip PortDrayagePlugin/bin/PortDrayagePlugin PortDrayag

RUN ln -s ../bin ODELoggerPlugin/bin
RUN zip ODELoggerPlugin.zip ODELoggerPlugin/bin/ODELoggerPlugin ODELoggerPlugin/manifest.json
RUN ln -s ../bin CARMAStreetsPlugin/bin
RUN zip CARMAStreetsPlugin.zip CARMAStreetsPlugin/bin/CARMAStreetsPlugin CARMAStreetsPlugin/manifest.json

WORKDIR /home/V2X-Hub/src/tmx/TmxCore/
RUN cp tmxcore.service /lib/systemd/system/ && cp tmxcore.service /usr/sbin/
Expand Down
10 changes: 2 additions & 8 deletions src/tmx/Asn_J2735/include/asn_j2735_r63/TestMessage02.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@
extern "C" {
#endif

/* Forward declarations */
struct Header;
struct Reg_BasicSafetyMessage;

/* TestMessage02 */
typedef struct TestMessage02 {
struct Header *header; /* OPTIONAL */
struct Reg_BasicSafetyMessage *regional; /* OPTIONAL */
MobilityHeader_t header; /* OPTIONAL */
MobilityPath_t body; /* OPTIONAL */
/*
* This type is extensible,
* possible extensions are below.
Expand All @@ -46,9 +43,6 @@ extern asn_TYPE_member_t asn_MBR_TestMessage02_1[2];
}
#endif

/* Referred external types */
#include "Header.h"
#include "RegionalExtension.h"

#endif /* _TestMessage02_H_ */
#include "asn_internal.h"
16 changes: 7 additions & 9 deletions src/tmx/Asn_J2735/src/r63/TestMessage02.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,38 @@
#include "TestMessage02.h"

asn_TYPE_member_t asn_MBR_TestMessage02_1[] = {
{ ATF_POINTER, 2, offsetof(struct TestMessage02, header),
{ ATF_NOFLAGS, 0, offsetof(struct TestMessage02, header),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_Header,
&asn_DEF_MobilityHeader,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"header"
},
{ ATF_POINTER, 1, offsetof(struct TestMessage02, regional),
{ ATF_NOFLAGS, 0, offsetof(struct TestMessage02, body),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_Reg_BasicSafetyMessage,
&asn_DEF_MobilityPath,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"regional"
"body"
},
};
static const int asn_MAP_TestMessage02_oms_1[] = { 0, 1 };
static const ber_tlv_tag_t asn_DEF_TestMessage02_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_TestMessage02_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* header */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* regional */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* body */
};
asn_SEQUENCE_specifics_t asn_SPC_TestMessage02_specs_1 = {
sizeof(struct TestMessage02),
offsetof(struct TestMessage02, _asn_ctx),
asn_MAP_TestMessage02_tag2el_1,
2, /* Count of tags in the map */
asn_MAP_TestMessage02_oms_1, /* Optional members */
2, 0, /* Root/Additions */
0, 0, 0, /* Optional elements (not needed) */
2, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_TestMessage02 = {
Expand Down
5 changes: 5 additions & 0 deletions src/v2i-hub/CARMAStreetsPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PROJECT ( CARMAStreetsPlugin VERSION 5.0 LANGUAGES CXX )

BuildTmxPlugin ( )

TARGET_LINK_LIBRARIES (${PROJECT_NAME} tmxutils rdkafka++ jsoncpp)
75 changes: 75 additions & 0 deletions src/v2i-hub/CARMAStreetsPlugin/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"name": "CARMAStreetsPlugin",
"description": "Plugin to communicate with CARMA Streets via Apache Kafka",
"version": "@PROJECT_VERSION@",
"exeLocation": "/bin/CARMAStreetsPlugin",
"coreIpAddr": "127.0.0.1",
"corePort": 24601,
"messageTypes": [{
"type": "J2735",
"subtype": "TMSG03-P",
"description": "Mobility Operation Message"
},
{
"type": "J2735",
"subtype": "TMSG02-P",
"description": "Mobility Path Message"
},
{
"type": "J2735",
"subtype": "BSM",
"description": "Basic Safety Message"
}],
"configuration": [
{
"key": "transmitMobilityOperationTopic",
"default": "v2xhub_mobility_operation_in",
"description": "Apache Kafka topic plugin will transmit message to."
},
{
"key": "transmitBSMTopic",
"default": "v2xhub_bsm_in",
"description": "Apache Kafka topic plugin will transmit message to."
},
{
"key": "runKafkaConsumer",
"default": "1",
"description": "indicator for consuming kafka messages."
},
{
"key": "subscribeToSchedulingPlanTopic",
"default": "v2xhub_scheduling_plan_sub",
"description": "Apache Kafka topic plugin will transmit message to."
},
{
"key": "transmitMobilityPathTopic",
"default": "v2xhub_mobility_path_in",
"description": "Apache Kafka topic plugin will transmit message to."
},
{
"key": "intersectionType",
"default": "Carma/stop_controlled_intersection",
"description": "The type of intersection"
},
{
"key": "KafkaBrokerIp",
"default": "127.0.0.1",
"description": "IP of Apache Kafka broker."
},
{
"key": "KafkaBrokerPort",
"default": "9092",
"description": "Port of Apache Kafka broker."
},
{
"key": "MobilityOperationStrategies",
"default": "Carma/stop_controlled_intersection",
"description": "A comma separated list of strategies of MobilityOperation messages to send to CARMA Streets"
},
{
"key": "LogLevel",
"default": "INFO",
"description": "The log level for this plugin"
}
]
}
Loading

0 comments on commit 0d2e43b

Please sign in to comment.