Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:usdot-jpo-ode/jpo-conflictvisual…
Browse files Browse the repository at this point in the history
…izer into removing-external-style
  • Loading branch information
John-Wiens committed Jun 17, 2024
2 parents 46931e9 + ab2ddbf commit 80e3fab
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,55 +54,58 @@ public String buildTopicName(int roadRegulatorID, int intersectionID, String mes
}

public void broadcastSpat(ProcessedSpat spat) {
Integer intersectionID = spat.getIntersectionId();
if (intersectionID == null) {
intersectionID = -1;
}
if(spat != null){
Integer intersectionID = spat.getIntersectionId();
if (intersectionID == null) {
intersectionID = -1;
}

Integer roadRegulatorID = spat.getRegion();
if (roadRegulatorID == null) {
roadRegulatorID = -1;
}
Integer roadRegulatorID = spat.getRegion();
if (roadRegulatorID == null) {
roadRegulatorID = -1;
}

if (intersectionID != -1) {
try {
broadcastMessage(buildTopicName(-1, intersectionID, "spat"), mapper.writeValueAsString(spat));
} catch (JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
if (intersectionID != -1) {
try {
broadcastMessage(buildTopicName(-1, intersectionID, "spat"), mapper.writeValueAsString(spat));
} catch (JsonProcessingException e) {
e.printStackTrace();
}

}

}
}

public void broadcastMap(ProcessedMap<LineString> map) {
Integer intersectionID = map.getProperties().getIntersectionId();
if (intersectionID == null) {
intersectionID = -1;
}
if(map != null){
Integer intersectionID = map.getProperties().getIntersectionId();
if (intersectionID == null) {
intersectionID = -1;
}

Integer roadRegulatorID = map.getProperties().getRegion();
if (roadRegulatorID == null) {
roadRegulatorID = -1;
}
Integer roadRegulatorID = map.getProperties().getRegion();
if (roadRegulatorID == null) {
roadRegulatorID = -1;
}

if (intersectionID != -1) {
try {
broadcastMessage(buildTopicName(-1, intersectionID, "map"), mapper.writeValueAsString(map));
} catch (JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
if (intersectionID != -1) {
try {
broadcastMessage(buildTopicName(-1, intersectionID, "map"), mapper.writeValueAsString(map));
} catch (JsonProcessingException e) {
e.printStackTrace();
}
}
}
}

public void broadcastBSM(BsmIntersectionIdKey key, OdeBsmData bsm) {
if (key.getIntersectionId() != -1) {
try {
broadcastMessage(buildTopicName(-1, key.getIntersectionId(), "bsm"), mapper.writeValueAsString(bsm));
} catch (JsonProcessingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
if(bsm != null){
if (key.getIntersectionId() != -1) {
try {
broadcastMessage(buildTopicName(-1, key.getIntersectionId(), "bsm"), mapper.writeValueAsString(bsm));
} catch (JsonProcessingException e) {
e.printStackTrace();
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ services:
ACM_LOG_TO_CONSOLE: true
ACM_LOG_TO_FILE: false
ACM_LOG_LEVEL: DEBUG
CM_MONGO_API_USERNAME: ${CM_MONGO_API_USERNAME}
CM_MONGO_API_PASSWORD: ${CM_MONGO_API_PASSWORD}

#KAFKA_BROKER_IP: ${KAFKA_BROKER_IP}
#KAFKA_BROKER_PORT: ${KAFKA_BROKER_PORT}
logging:
Expand Down
Binary file added docs/CIMMS_Overview.pptx
Binary file not shown.
Binary file not shown.
Binary file added docs/CV PFS CIMMS ConOps Update 08-31-2023.pdf
Binary file not shown.
9 changes: 5 additions & 4 deletions sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ KAFKA_BROKER_PORT=9092
# Set to the directory where the source code is. Generally the location of this file.
DOCKER_HOST_DIR=

# Put anything you want for the NEXTAUTH_SECRET, and KEYCLOAK_CLIENT_SECRET
NEXTAUTH_SECRET=
NEXTAUTH_URL=http://${DOCKER_HOST_IP}:3000
KEYCLOAK_CLIENT_ID=
KEYCLOAK_CLIENT_ID=conflictvisualizer-gui
KEYCLOAK_CLIENT_SECRET=
KEYCLOAK_REALM=
KEYCLOAK_REALM=conflictvisualizer
MAPBOX_TOKEN=

KEYCLOAK_ADMIN=
Expand All @@ -26,6 +27,6 @@ API_WS_URL=ws://${DOCKER_HOST_IP}:8081
DB_HOST_IP=${DOCKER_HOST_IP}
DB_HOST_PORT=27017


CM_MONGO_API_PASSWORD=api
CM_MONGO_API_USERNAME=api
CM_MONGO_API_PASSWORD=api

0 comments on commit 80e3fab

Please sign in to comment.