Loading go-apps/meep-gis-engine/server/gis-engine_test.go +8 −8 Original line number Diff line number Diff line Loading @@ -2211,7 +2211,7 @@ const testScenario string = ` "packetLoss": null }, "poa5GConfig": { "cellId": "404040404" "cellId": "04040404" }, "geoData": { "location": { Loading Loading @@ -2331,7 +2331,7 @@ const testScenario string = ` "packetLoss": null }, "poa5GConfig": { "cellId": "707070707" "cellId": "07070707" }, "geoData": { "location": { Loading Loading @@ -2713,7 +2713,7 @@ const testScenario string = ` "packetLoss": null }, "poa5GConfig": { "cellId": "A0A0A0A0A" "cellId": "0A0A0A0A" }, "geoData": { "location": { Loading Loading @@ -2753,7 +2753,7 @@ const testScenario string = ` "packetLoss": null }, "poa5GConfig": { "cellId": "B0B0B0B0B" "cellId": "0B0B0B0B" }, "geoData": { "location": { Loading Loading @@ -2793,7 +2793,7 @@ const testScenario string = ` "packetLoss": null }, "poa5GConfig": { "cellId": "C0C0C0C0C" "cellId": "0C0C0C0C" }, "geoData": { "location": { Loading Loading @@ -3594,7 +3594,7 @@ const testScenario string = ` "packetLoss": null }, "poa5GConfig": { "cellId": "D0D0D0D0D" "cellId": "0D0D0D0D" }, "geoData": { "location": { Loading Loading @@ -3634,7 +3634,7 @@ const testScenario string = ` "packetLoss": null }, "poa5GConfig": { "cellId": "E0E0E0E0E" "cellId": "0E0E0E0E" }, "geoData": { "location": { Loading Loading @@ -3674,7 +3674,7 @@ const testScenario string = ` "packetLoss": null }, "poa5GConfig": { "cellId": "F0F0F0F0F" "cellId": "0F0F0F0F" }, "geoData": { "location": { Loading go-apps/meep-vis/entrypoint.sh +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ echo "MEEP_SANDBOX_NAME: ${MEEP_SANDBOX_NAME}" echo "MEEP_MEP_NAME: ${MEEP_MEP_NAME}" echo "MEEP_CODECOV: ${MEEP_CODECOV}" echo "MEEP_BROKER: ${MEEP_BROKER}" # E.g. mqtt://test.mosquito.org:1338 or amqp://guest:guest@localhost:5672 echo "MEEP_POA_LIST: ${MEEP_POA_LIST}" # E.g. poa-5g1,poa-5g2 echo "MEEP_POA_LIST: ${MEEP_POA_LIST}" # E.g. poa-5g1;poa-5g2 if [[ ! -z "${MEEP_MEP_NAME}" ]]; then svcPath="${MEEP_SANDBOX_NAME}/${MEEP_MEP_NAME}" Loading go-apps/meep-vis/sbi/vis-sbi.go +21 −5 Original line number Diff line number Diff line Loading @@ -17,6 +17,9 @@ package sbi import ( "encoding/binary" "encoding/hex" "errors" "os" "strconv" "strings" Loading Loading @@ -389,15 +392,28 @@ func initializeV2xMessageDistribution() (err error) { } else if nl.Poa5GConfig != nil { cellId = nl.Poa5GConfig.CellId } //log.Info("=================> cellId: ", cellId) //log.Info("=================> mnc: ", mnc) //log.Info("=================> mcc: ", mcc) if len(cellId)%2 != 0 { cellId = "0" + cellId } log.Info("=================> cellId: ", cellId) log.Info("=================> mnc: ", mnc) log.Info("=================> mcc: ", mcc) // Calculate Ecgi cellId_num, err := strconv.Atoi(cellId) if err != nil { // Hexadump, content, err := hex.DecodeString(cellId) if err != nil { log.Error(err.Error()) return err } if len(content) > 4 { err = errors.New("Invalid cellId format (TS 36.413: E-UTRAN Cell Identity (ECI) and E-UTRAN Cell Global Identification (ECGI)): " + cellId) log.Error(err.Error()) return err } cellId_num = int(binary.BigEndian.Uint32(content)) } log.Info("initializeV2xMessageDistribution: cellId_num= ", cellId_num) TwentyEigthBits := 0xFFFFFFF // TS 36.413: E-UTRAN Cell Identity (ECI) and E-UTRAN Cell Global Identification (ECGI) eci := cellId_num & TwentyEigthBits Loading go-apps/meep-vis/server/vis.go +1 −1 Original line number Diff line number Diff line Loading @@ -414,7 +414,7 @@ func Init() (err error) { // E.g. poa-5g1,poa-5g2 poa_list := strings.TrimSpace(os.Getenv("MEEP_POA_LIST")) if poa_list != "" { v2x_poa_list = strings.Split(poa_list, ",") v2x_poa_list = strings.Split(poa_list, ";") if len(v2x_poa_list) > 1 { sort.Strings(v2x_poa_list) // Sorting the PoA list to use search algorithms } Loading go-apps/meep-vis/server/vis_test.go +1 −1 Original line number Diff line number Diff line Loading @@ -1138,7 +1138,7 @@ func initializeVars() { v2x_broker = v2xBrokerTest os.Setenv("MEEP_BROKER", v2x_broker) v2x_poa_list = poaListTest os.Setenv("MEEP_POA_LIST", strings.Join(v2x_poa_list, ",")) os.Setenv("MEEP_POA_LIST", strings.Join(v2x_poa_list, ";")) } func initialiseScenario(testScenario string) { Loading Loading
go-apps/meep-gis-engine/server/gis-engine_test.go +8 −8 Original line number Diff line number Diff line Loading @@ -2211,7 +2211,7 @@ const testScenario string = ` "packetLoss": null }, "poa5GConfig": { "cellId": "404040404" "cellId": "04040404" }, "geoData": { "location": { Loading Loading @@ -2331,7 +2331,7 @@ const testScenario string = ` "packetLoss": null }, "poa5GConfig": { "cellId": "707070707" "cellId": "07070707" }, "geoData": { "location": { Loading Loading @@ -2713,7 +2713,7 @@ const testScenario string = ` "packetLoss": null }, "poa5GConfig": { "cellId": "A0A0A0A0A" "cellId": "0A0A0A0A" }, "geoData": { "location": { Loading Loading @@ -2753,7 +2753,7 @@ const testScenario string = ` "packetLoss": null }, "poa5GConfig": { "cellId": "B0B0B0B0B" "cellId": "0B0B0B0B" }, "geoData": { "location": { Loading Loading @@ -2793,7 +2793,7 @@ const testScenario string = ` "packetLoss": null }, "poa5GConfig": { "cellId": "C0C0C0C0C" "cellId": "0C0C0C0C" }, "geoData": { "location": { Loading Loading @@ -3594,7 +3594,7 @@ const testScenario string = ` "packetLoss": null }, "poa5GConfig": { "cellId": "D0D0D0D0D" "cellId": "0D0D0D0D" }, "geoData": { "location": { Loading Loading @@ -3634,7 +3634,7 @@ const testScenario string = ` "packetLoss": null }, "poa5GConfig": { "cellId": "E0E0E0E0E" "cellId": "0E0E0E0E" }, "geoData": { "location": { Loading Loading @@ -3674,7 +3674,7 @@ const testScenario string = ` "packetLoss": null }, "poa5GConfig": { "cellId": "F0F0F0F0F" "cellId": "0F0F0F0F" }, "geoData": { "location": { Loading
go-apps/meep-vis/entrypoint.sh +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ echo "MEEP_SANDBOX_NAME: ${MEEP_SANDBOX_NAME}" echo "MEEP_MEP_NAME: ${MEEP_MEP_NAME}" echo "MEEP_CODECOV: ${MEEP_CODECOV}" echo "MEEP_BROKER: ${MEEP_BROKER}" # E.g. mqtt://test.mosquito.org:1338 or amqp://guest:guest@localhost:5672 echo "MEEP_POA_LIST: ${MEEP_POA_LIST}" # E.g. poa-5g1,poa-5g2 echo "MEEP_POA_LIST: ${MEEP_POA_LIST}" # E.g. poa-5g1;poa-5g2 if [[ ! -z "${MEEP_MEP_NAME}" ]]; then svcPath="${MEEP_SANDBOX_NAME}/${MEEP_MEP_NAME}" Loading
go-apps/meep-vis/sbi/vis-sbi.go +21 −5 Original line number Diff line number Diff line Loading @@ -17,6 +17,9 @@ package sbi import ( "encoding/binary" "encoding/hex" "errors" "os" "strconv" "strings" Loading Loading @@ -389,15 +392,28 @@ func initializeV2xMessageDistribution() (err error) { } else if nl.Poa5GConfig != nil { cellId = nl.Poa5GConfig.CellId } //log.Info("=================> cellId: ", cellId) //log.Info("=================> mnc: ", mnc) //log.Info("=================> mcc: ", mcc) if len(cellId)%2 != 0 { cellId = "0" + cellId } log.Info("=================> cellId: ", cellId) log.Info("=================> mnc: ", mnc) log.Info("=================> mcc: ", mcc) // Calculate Ecgi cellId_num, err := strconv.Atoi(cellId) if err != nil { // Hexadump, content, err := hex.DecodeString(cellId) if err != nil { log.Error(err.Error()) return err } if len(content) > 4 { err = errors.New("Invalid cellId format (TS 36.413: E-UTRAN Cell Identity (ECI) and E-UTRAN Cell Global Identification (ECGI)): " + cellId) log.Error(err.Error()) return err } cellId_num = int(binary.BigEndian.Uint32(content)) } log.Info("initializeV2xMessageDistribution: cellId_num= ", cellId_num) TwentyEigthBits := 0xFFFFFFF // TS 36.413: E-UTRAN Cell Identity (ECI) and E-UTRAN Cell Global Identification (ECGI) eci := cellId_num & TwentyEigthBits Loading
go-apps/meep-vis/server/vis.go +1 −1 Original line number Diff line number Diff line Loading @@ -414,7 +414,7 @@ func Init() (err error) { // E.g. poa-5g1,poa-5g2 poa_list := strings.TrimSpace(os.Getenv("MEEP_POA_LIST")) if poa_list != "" { v2x_poa_list = strings.Split(poa_list, ",") v2x_poa_list = strings.Split(poa_list, ";") if len(v2x_poa_list) > 1 { sort.Strings(v2x_poa_list) // Sorting the PoA list to use search algorithms } Loading
go-apps/meep-vis/server/vis_test.go +1 −1 Original line number Diff line number Diff line Loading @@ -1138,7 +1138,7 @@ func initializeVars() { v2x_broker = v2xBrokerTest os.Setenv("MEEP_BROKER", v2x_broker) v2x_poa_list = poaListTest os.Setenv("MEEP_POA_LIST", strings.Join(v2x_poa_list, ",")) os.Setenv("MEEP_POA_LIST", strings.Join(v2x_poa_list, ";")) } func initialiseScenario(testScenario string) { Loading