Skip to content

Commit

Permalink
Merge pull request #173 from HyperloopUPV-H8/backend/adj
Browse files Browse the repository at this point in the history
[backend][3] ADJ
  • Loading branch information
msanlli authored Dec 2, 2024
2 parents 3ddc5c1 + cd8a82e commit f47c01e
Show file tree
Hide file tree
Showing 32 changed files with 14 additions and 1,526 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-control-station.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Build control station

on:
workflow_call:
workflow_dispatch:
pull_request:
paths:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-ethernet-view.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Build ethernet view

on:
workflow_call:
workflow_dispatch:
pull_request:
paths:
Expand Down
2 changes: 1 addition & 1 deletion backend/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"encoding/binary"
"flag"
"fmt"
"github.com/HyperloopUPV-H8/h9-backend/pkg/excel/utils"

"log"
"net"
Expand All @@ -24,6 +23,7 @@ import (
"github.com/HyperloopUPV-H8/h9-backend/internal/common"
"github.com/HyperloopUPV-H8/h9-backend/internal/pod_data"
"github.com/HyperloopUPV-H8/h9-backend/internal/update_factory"
"github.com/HyperloopUPV-H8/h9-backend/internal/utils"
vehicle_models "github.com/HyperloopUPV-H8/h9-backend/internal/vehicle/models"
"github.com/HyperloopUPV-H8/h9-backend/pkg/abstraction"
"github.com/HyperloopUPV-H8/h9-backend/pkg/broker"
Expand Down
2 changes: 0 additions & 2 deletions backend/internal/adj/adj.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ func getBoards(info Info, boardsList map[string]string) (map[string]Board, error
return nil, err
}

// board.Structures = getBoardStructures( boardJSON.StructuresPaths) // TODO: Issued in JSON_ADE #1

boards[boardName] = board
}

Expand Down
10 changes: 6 additions & 4 deletions backend/internal/adj/models.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
package adj

import "github.com/HyperloopUPV-H8/h9-backend/internal/utils"

type ADJ struct {
Info Info
Boards map[string]Board
}

type Info struct {
Ports map[string]uint16 `json:"ports"`
Addresses map[string]string `json:"addresses"`
Units map[string]string `json:"units"`
MessageIds map[string]uint16 `json:"message_ids"`
Ports map[string]uint16 `json:"ports"`
Addresses map[string]string `json:"addresses"`
Units map[string]utils.Operations `json:"units"`
MessageIds map[string]uint16 `json:"message_ids"`
BoardIds map[string]uint16
}

Expand Down
8 changes: 4 additions & 4 deletions backend/internal/pod_data/measurement.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"strings"

"github.com/HyperloopUPV-H8/h9-backend/internal/adj"
"github.com/HyperloopUPV-H8/h9-backend/internal/common"
"github.com/HyperloopUPV-H8/h9-backend/internal/excel/adj"
"github.com/HyperloopUPV-H8/h9-backend/internal/excel/utils"
"github.com/HyperloopUPV-H8/h9-backend/internal/utils"
)

const EnumType = "enum"
Expand Down Expand Up @@ -114,7 +114,7 @@ func getBooleanMeasurement(adeMeas adj.Measurement) BooleanMeasurement {
}

func isNumeric(kind string) bool {
return (kind == "uint8" ||
return kind == "uint8" ||
kind == "uint16" ||
kind == "uint32" ||
kind == "uint64" ||
Expand All @@ -123,5 +123,5 @@ func isNumeric(kind string) bool {
kind == "int32" ||
kind == "int64" ||
kind == "float32" ||
kind == "float64")
kind == "float64"
}
2 changes: 1 addition & 1 deletion backend/internal/pod_data/models.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package pod_data

import "github.com/HyperloopUPV-H8/h9-backend/internal/excel/utils"
import "github.com/HyperloopUPV-H8/h9-backend/internal/utils"

type PodData struct {
Boards []Board `json:"boards"`
Expand Down
4 changes: 2 additions & 2 deletions backend/internal/pod_data/pod_data.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package pod_data

import (
"github.com/HyperloopUPV-H8/h9-backend/internal/utils"
"strconv"

"github.com/HyperloopUPV-H8/h9-backend/internal/adj"
"github.com/HyperloopUPV-H8/h9-backend/internal/common"
"github.com/HyperloopUPV-H8/h9-backend/internal/excel/adj"
"github.com/HyperloopUPV-H8/h9-backend/internal/excel/utils"
)

func NewPodData(adeBoards map[string]adj.Board, globalUnits map[string]utils.Operations) (PodData, error) {
Expand Down
File renamed without changes.
File renamed without changes.
68 changes: 0 additions & 68 deletions backend/pkg/excel/ade/ade.go

This file was deleted.

Loading

0 comments on commit f47c01e

Please sign in to comment.