Skip to content

Commit

Permalink
Merge branch 'develop' into 2023-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
jwillmartin committed Dec 4, 2023
2 parents d205c11 + 6b604b7 commit 1ecc142
Show file tree
Hide file tree
Showing 37 changed files with 2,609 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/docker-compose-vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ services:
- SIM_V2X_PORT=5757
- SIM_INTERACTION_PORT=7576
- V2X_PORT=8686
- INFRASTRUCTURE_ID=1
- INFRASTRUCTURE_ID=rsu_<J2735 MAP MESSAGE INTERSECTION ID>
- INFRASTRUCTURE_NAME=<RSU_NAME>
- SENSOR_JSON_FILE_PATH=/var/www/plugins/MAP/sensors.json
secrets:
- mysql_password
Expand Down
13 changes: 11 additions & 2 deletions .sonarqube/sonar-scanner.properties
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ sonar.modules= PedestrianPlugin, \
MessageReceiverPlugin, \
CARMAStreetsPlugin, \
ERVCloudForwardingPlugin, \
CDASimAdapter
CDASimAdapter, \
RSUHealthMonitorPlugin, \
TelematicBridgePlugin



Expand All @@ -82,6 +84,8 @@ TimPlugin.sonar.projectBaseDir =src/v2i-hub/TimPlugin
CARMAStreetsPlugin.sonar.projectBaseDir =src/v2i-hub/CARMAStreetsPlugin
ERVCloudForwardingPlugin.sonar.projectBaseDir =src/v2i-hub/ERVCloudForwardingPlugin
CDASimAdapter.sonar.projectBaseDir =src/v2i-hub/CDASimAdapter
RSUHealthMonitorPlugin.sonar.projectBaseDir =src/v2i-hub/RSUHealthMonitorPlugin
TelematicBridgePlugin.sonar.projectBaseDir =src/v2i-hub/TelematicBridgePlugin



Expand Down Expand Up @@ -117,7 +121,10 @@ CARMAStreetsPlugin.sonar.exclusions =test/**
ERVCloudForwardingPlugin.sonar.sources =src
CDASimAdapter.sonar.sources =src
CDASimAdapter.sonar.exclusions =test/**

RSUHealthMonitorPlugin.sonar.sources =src
RSUHealthMonitorPlugin.sonar.exclusions =test/**
TelematicBridgePlugin.sonar.sources =src
TelematicBridgePlugin.sonar.exclusions =test/**

# 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 Down Expand Up @@ -145,3 +152,5 @@ SpatPlugin.sonar.tests=test
CARMAStreetsPlugin.sonar.tests=test
ERVCloudForwardingPlugin.sonar.tests=test
CDASimAdapter.sonar.tests=test
RSUHealthMonitorPlugin.sonar.tests=test
TelematicBridgePlugin.sonar.tests=test
2 changes: 2 additions & 0 deletions configuration/amd64/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ services:
- db
environment:
- MYSQL_PASSWORD=/run/secrets/mysql_password
- INFRASTRUCTURE_ID=rsu_<J2735 MAP MESSAGE INTERSECTION ID>
- INFRASTRUCTURE_NAME=<RSU_NAME>
secrets:
- mysql_password
volumes:
Expand Down
18 changes: 17 additions & 1 deletion ext/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,25 @@ popd

# GPS Parser
pushd /tmp
if [ -d "NemaTode" ]; then
rm -r NemaTode
fi
git clone https://github.com/ckgt/NemaTode.git
cd NemaTode
cmake .
make -j${numCPU}
make install
popd
popd

# Nats C API
pushd /tmp
if [ -d "nats.c" ]; then
rm -r nats.c
fi
git clone https://github.com/nats-io/nats.c
cd nats.c
cmake . -DNATS_BUILD_NO_SPIN=ON
make -j${numCPU}
make install
popd

3 changes: 3 additions & 0 deletions scripts/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ DEPENDENCIES="build-essential \
wget \
zip \
zlib1g \
rapidjson-dev \
librapidxml-dev \
libprotobuf-c-dev \
curl"

# STOL library dependencies
Expand Down
1 change: 1 addition & 0 deletions src/tmx/Messages/include/MessageTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ static CONSTEXPR const char *MSGSUBTYPE_OUTGOING_STRING = "Outgoing";
static CONSTEXPR const char *MSGSUBTYPE_SHUTDOWN_STRING = "Shutdown";
static CONSTEXPR const char *MSGSUBTYPE_TIMESYNC_STRING = "TimeSync";
static CONSTEXPR const char *MSGSUBTYPE_SENSOR_DETECTED_OBJECT_STRING = "SensorDetectedObject";
static CONSTEXPR const char *MSGSUBTYPE_RSU_STATUS_STRING = "RSUStatus";

} /* End namespace messages */

Expand Down
25 changes: 25 additions & 0 deletions src/tmx/Messages/include/RSUStatusMessage.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#pragma once


#include <tmx/messages/message.hpp>
#include "MessageTypes.h"


namespace tmx::messages {


class RSUStatusMessage : public tmx::message
{
public:
RSUStatusMessage() {}

/// Message type for routing this message through TMX core.
static constexpr const char* MessageType = MSGTYPE_APPLICATION_STRING;

/// Message sub type for routing this message through TMX core.
static constexpr const char* MessageSubType = MSGSUBTYPE_RSU_STATUS_STRING;
};

} /* namespace tmx::messages */


12 changes: 10 additions & 2 deletions src/tmx/TmxUtils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
PROJECT ( tmxutils CXX )
FILE (GLOB_RECURSE HEADERS "src/" "*.h*")
FILE (GLOB_RECURSE SOURCES "src/" "*.c*")

find_library(NETSNMPAGENT "netsnmpagent")
find_library(NETSNMPMIBS "netsnmpmibs")
find_library(NETSNMP "netsnmp")

FIND_PACKAGE (carma-clock)
FIND_LIBRARY (UUID_LIBRARY uuid)
Expand All @@ -16,12 +18,18 @@ TARGET_INCLUDE_DIRECTORIES (${PROJECT_NAME} SYSTEM PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<BUILD_INTERFACE:${TMXMESSAGES_INCLUDE_DIR}>
${MYSQL_INCLUDE_DIR}
${NETSNMP_INCLUDE_DIRS}
${MYSQLCPPCONN_INCLUDE_DIR})
TARGET_LINK_LIBRARIES (${PROJECT_NAME} PUBLIC
${TMXAPI_LIBRARIES}
${MYSQL_LIBRARIES}
${MYSQLCPPCONN_LIBRARIES}
${UUID_LIBRARY}
${UUID_LIBRARY}
${NETSNMPAGENT}
${NETSNMPMIBS}
${NETSNMP}
${NETSNMP_LIBRARIES}
rdkafka++
::carma-clock
gmock
Expand Down Expand Up @@ -54,4 +62,4 @@ add_executable(${BINARY} ${TEST_SOURCES})

add_test(NAME ${BINARY} COMMAND ${BINARY})

target_link_libraries(${BINARY} PUBLIC ${PROJECT_NAME} rdkafka++ gmock ${TMXAPI_LIBRARIES} ${ASN_J2735_LIBRARIES} ${UUID_LIBRARY} gtest)
target_link_libraries(${BINARY} PUBLIC ${PROJECT_NAME} rdkafka++ gmock ${TMXAPI_LIBRARIES} ${ASN_J2735_LIBRARIES} ${UUID_LIBRARY} ${NETSNMPAGENT} ${NETSNMPMIBS} ${NETSNMP} ${NETSNMP_LIBRARIES} gtest)
56 changes: 56 additions & 0 deletions src/tmx/TmxUtils/src/RSU_MIB_4_1.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#pragma once
namespace tmx::utils::rsu41::mib::oid
{
/**
* @brief This header file contains a subset of RSU MIB definition from https://github.com/certificationoperatingcouncil/COC_TestSpecs/blob/master/AppNotes/RSU/RSU-MIB.txt
*/
// Contains the ID given to this RSU.
static constexpr const char *RSU_ID_OID = "1.0.15628.4.1.17.4.0";

// Contains the version of this MIB supported by this RSU, e.g. rsuMIB 4.1 rev201812060000Z
static constexpr const char *RSU_MIB_VERSION = "1.0.15628.4.1.17.1.0";

// Contains the version of firmware running on this RSU.
static constexpr const char *RSU_FIRMWARE_VERSION = "1.0.15628.4.1.17.2.0";

// Contains the name of the manufacturer of this RSU.
static constexpr const char *RSU_MANUFACTURER = "1.0.15628.4.1.17.5.0";

// Contains GPS NMEA GPGGA output string.
static constexpr const char *RSU_GPS_OUTPUT_STRING = "1.0.15628.4.1.8.5.0";

// Immediate Forward Message Index
static constexpr const char *RSU_IFM_INDEX = "1.0.15628.4.1.5.1.1.0";

// Immediate Forward Message PSID.
static constexpr const char *RSU_IFM_PSID = "1.0.15628.4.1.5.1.2.0";

// Immediate Forward Message DSRC Message ID
static constexpr const char *RSU_IFM_DSRC_MSG_ID = "1.0.15628.4.1.5.1.3.0";

// Immediate Forward Message Transmit Mode
static constexpr const char *RSU_IFM_TX_MODE = "1.0.15628.4.1.5.1.4.0";

// DSRC channel set for Immediate Forward Message transmit
static constexpr const char *RSU_IFM_TX_CHANNEL = "1.0.15628.4.1.5.1.5.0";

// Set this bit to enable transmission of the message 0=off, 1=on
static constexpr const char *RSU_IFM_ENABLE = "1.0.15628.4.1.5.1.6.0";

// Create (4) or Destroy (6) row entry
static constexpr const char *RSU_IFM_STATUS = "1.0.15628.4.1.5.1.7.0";

// Specifies the current mode of operation of the RSU and provides capability to transition the device into a new mode, e.g. from the current mode to off, etc
static constexpr const char *RSU_MODE = "1.0.15628.4.1.99.0";

/*
SYNTAX INTEGER {
bothOp (0), --both Continuous and Alternating modes are operational
altOp (1), --Alternating mode is operational,
--Continuous mode is not operational
contOp (2), --Continuous mode is operational,
--Alternating mode is not operational
noneOp (3) --neither Continuous nor Alternating mode is operational
*/
static constexpr const char *RSU_CHAN_STATUS = "1.0.15628.4.1.19.1.0";
}
Loading

0 comments on commit 1ecc142

Please sign in to comment.