Skip to content

Commit

Permalink
Refactor Ocpp 1.6/2.0 (#15)
Browse files Browse the repository at this point in the history
* Document ocpp 1.6 functions

Signed-off-by: Lorenzo Donini <lorenzo.donini@motius.de>

* Refactor ocpp1.6 structure and naming

Signed-off-by: Lorenzo Donini <lorenzo.donini@motius.de>

* Refactor ocppj naming and docs

Signed-off-by: Lorenzo Donini <lorenzo.donini@motius.de>

* Update dateTime formatting in ocpp1.6

Signed-off-by: Lorenzo Donini <lorenzo.donini@motius.de>

* Move feature name constants in ocpp1.6

Update documentation

* Start refactoing ocpp2.0 profiles

Signed-off-by: Lorenzo Donini <lorenzo.donini@motius.de>

* Create missing ocpp 2.0 profiles

* Rename ocpp 1.6 auth package

* Restructure first half of ocpp2 messages

Signed-off-by: Lorenzo Donini <lorenzo.donini@motius.de>

* Restructure second half of ocpp2.0 messages

Signed-off-by: Lorenzo Donini <lorenzo.donini@motius.de>

* Rename confirmation to response

Signed-off-by: Lorenzo Donini <lorenzo.donini@motius.de>

* Cleanup ocpp 2.0 endpoints

Signed-off-by: Lorenzo Donini <lorenzo.donini@motius.de>

* Fix expected errors in e2e tests

Signed-off-by: Lorenzo Donini <lorenzo.donini@motius.de>

* Add MessageTypeNotSupported error code

Signed-off-by: Lorenzo Donini <lorenzo.donini@motius.de>

* Check for unsupported feature in 1.6 and update example names

Signed-off-by: Lorenzo Donini <lorenzo.donini@motius.de>
  • Loading branch information
lorenzodonini authored May 23, 2020
1 parent 03b5898 commit 0c9d005
Show file tree
Hide file tree
Showing 164 changed files with 5,953 additions and 5,281 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ jobs:
- go test ./...
- stage: publish_latest
script:
- docker build -t ldonini/ocpp1.6-central-system:latest -f example/cs/Dockerfile .
- docker build -t ldonini/ocpp1.6-charge-point:latest -f example/cp/Dockerfile .
- docker build -t ldonini/ocpp1.6-central-system:latest -f example/cs1.6/Dockerfile .
- docker build -t ldonini/ocpp1.6-charge-point:latest -f example/cp1.6/Dockerfile .
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker push ldonini/ocpp1.6-central-system:latest
- docker push ldonini/ocpp1.6-charge-point:latest
if: branch == master
- stage: release
script:
- docker build -t "ldonini/ocpp1.6-central-system:$TRAVIS_TAG" -f example/cs/Dockerfile .
- docker build -t "ldonini/ocpp1.6-charge-point:$TRAVIS_TAG" -f example/cp/Dockerfile .
- docker build -t "ldonini/ocpp1.6-central-system:$TRAVIS_TAG" -f example/cs1.6/Dockerfile .
- docker build -t "ldonini/ocpp1.6-charge-point:$TRAVIS_TAG" -f example/cp1.6/Dockerfile .
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker push "ldonini/ocpp1.6-central-system:$TRAVIS_TAG"
- docker push "ldonini/ocpp1.6-charge-point:$TRAVIS_TAG"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Planned milestones and features:

**Note: The library is still a WIP, therefore expect some APIs to change.**

## Usage
## OCPP 1.6 Usage

Go version 1.11+ is required.

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
central_system:
build:
context: .
dockerfile: ./example/cs/Dockerfile
dockerfile: example/cs1.6/Dockerfile
image: ldonini/ocpp1.6-central-system:latest
container_name: central-system
ports:
Expand All @@ -16,7 +16,7 @@ services:
- CENTRAL_SYSTEM_URL=ws://central_system:8887
build:
context: .
dockerfile: ./example/cp/Dockerfile
dockerfile: example/cp1.6/Dockerfile
image: ldonini/ocpp1.6-charge-point:latest
container_name: charge-point
networks:
Expand Down
335 changes: 0 additions & 335 deletions example/cp/charge_point_sim.go

This file was deleted.

2 changes: 1 addition & 1 deletion example/cp/Dockerfile → example/cp1.6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ COPY . .
# Fetch dependencies.
RUN go mod download
# Build the binary.
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o /go/bin/charge_point example/cp/charge_point_sim.go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o /go/bin/charge_point example/cp1.6/charge_point_sim.go

############################
# STEP 2 build a small image
Expand Down
Loading

0 comments on commit 0c9d005

Please sign in to comment.