Skip to content

Commit 1c8e98d

Browse files
authored
Merge pull request #211 from json-scada/master
Firebase Studio, Go compilation
2 parents 02cb909 + 4cde7f7 commit 1c8e98d

File tree

7 files changed

+45
-18
lines changed

7 files changed

+45
-18
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ To provide an easy to use, fully-featured, scalable, and portable SCADA/IIoT-I4.
192192
- [ ] Managed Cloud Service
193193
- [ ] Supported LTS versions
194194

195-
## Spin up a free private instance on Google's Project IDX
195+
## Spin up a free private instance on Google's Firebase Studio
196196

197-
With just a Google account, you can spin up a free private instance for test/dev on Google's Project IDX. This is a great way to get started with the project. This will build the code from the Github repo and deploy it to a private Linux VM on the cloud running protocols and providing a web UI for you to interact with. There will be a web-based code editor available for you to develop new apps and view/change the code on the VM. You can also get help from Google's Gemini AI for coding and other tasks. This is free and there no need to install any software on your local machine.
197+
With just a Google account, you can spin up a free private instance for test/dev on Google's Firebase Studio. This is a great way to get started with the project. This will build the code from the Github repo and deploy it to a private Linux VM on the cloud running protocols and providing a web UI for you to interact with. There will be a web-based code editor available for you to develop new apps and view/change the code on the VM. You can also get help from Google's Gemini AI for coding and other tasks. This is free and there no need to install any software on your local machine.
198198

199199
See details [here](https://github.com/riclolsen/json-scada/blob/master/platform-nix-idx/README.md).
200200

index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ To provide an easy to use, fully-featured, scalable, and portable SCADA/IIoT-I4.
193193
- [ ] Managed Cloud Service
194194
- [ ] Supported LTS versions
195195

196-
## Spin up a free private instance on Google's Project IDX
196+
## Spin up a free private instance on Google's Firebase Studio
197197

198-
With just a Google account, you can spin up a free private instance for test/dev on Google's Project IDX. This is a great way to get started with the project. This will build the code from the Github repo and deploy it to a private Linux VM on the cloud running protocols and providing a web UI for you to interact with. There will be a web-based code editor available for you to develop new apps and view/change the code on the VM. You can also get help from Google's Gemini AI for coding and other tasks. This is free and there no need to install any software on your local machine.
198+
With just a Google account, you can spin up a free private instance for test/dev on Google's Firebase Studio. This is a great way to get started with the project. This will build the code from the Github repo and deploy it to a private Linux VM on the cloud running protocols and providing a web UI for you to interact with. There will be a web-based code editor available for you to develop new apps and view/change the code on the VM. You can also get help from Google's Gemini AI for coding and other tasks. This is free and there no need to install any software on your local machine.
199199

200200
See details [here](platform-nix-idx/README.md).
201201

platform-nix-idx/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# Project IDX Setup
22

3-
Start a free instance for dev/test on Google's Project IDX platform with just a Google account.
3+
Start a free instance for dev/test on Google's Firebase Studio platform with just a Google account.
44

5-
1. Access the Project IDX platform, click on the "Get Started" button. Connect your Google account if asked.
5+
1. Access the Firebase Studio platform, click on the "Get Started" button. Connect your Google account if asked.
66

7-
[https://idx.dev](https://idx.dev)
7+
[https://firebase.studio](https://firebase.studio)
88

9-
2. Create a new Workspace importing a GitHub repository.
9+
2. Click on the "Import Repo" button to importing a GitHub repository.
1010

11-
* URL: https://github.com/riclolsen/json-scada
11+
* Repo URL: https://github.com/riclolsen/json-scada
1212
* Name: json-scada
1313

1414
Alternatively, you can fork the repo on Github and import it from there.
1515

1616
3. Wait for the workspace to be imported and built. This will take a while, do not click the recover button. When started, some terminals will open to initialize and build the project. Wait until all the tasks are finished and the workspace is ready. This will take some minutes.
1717

18-
4. Click the Project IDX button on left sidebar and select "Backend Ports". Click the "Open New Window" action for port 8080. This will give access to the web UI for the project. Login with admin/jsonscada credentials.
18+
4. Click the "Firebase Studio" button on left sidebar and select "Backend Ports". Click the "Open New Window" action for port 8080. This will give access to the web UI for the project. Login with admin/jsonscada credentials.
1919

2020
5. On the VSCode's terminal, control JSON-SCADA processes with the "supervisorctl" command.
2121

@@ -33,4 +33,4 @@ Open the Gemini chat with Ctrl+Shift+Space.
3333

3434
Notice that the provided free VM is a constrained environment with limited resources: 8GB RAM, 1-core CPUs, 10GB Disk.
3535

36-
More info for Project IDX [here](https://developers.google.com/idx).
36+
More info for Firebase Studio [here](https://firebase.google.com/docs).

platform-nix-idx/build.sh

+2
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ dotnet publish --no-self-contained --runtime $ARG1 -p:PublishReadyToRun=true -c
7070

7171
export GOBIN=~/json-scada/bin
7272
go env -w GO111MODULE=auto
73+
export CGO_CPPFLAGS="-I /usr/include"
74+
export CGO_LDFLAGS="-L /usr/lib"
7375

7476
cd ../calculations
7577
go mod tidy

src/calculations/calculations.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import (
3333
"time"
3434

3535
plc4go "github.com/apache/plc4x/plc4go/pkg/api"
36+
"github.com/apache/plc4x/plc4go/pkg/api/drivers"
3637
"github.com/xuri/excelize/v2"
3738
"go.mongodb.org/mongo-driver/bson"
3839
"go.mongodb.org/mongo-driver/bson/primitive"
@@ -292,8 +293,8 @@ func __() {
292293
f := excelize.NewFile()
293294
_ = f
294295
driverManager := plc4go.NewPlcDriverManager()
296+
drivers.RegisterAdsDriver(driverManager)
295297
_ = driverManager
296-
297298
}
298299

299300
func main() {

src/calculations/go.mod

+7-2
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,22 @@ go 1.24
55
toolchain go1.24.1
66

77
require (
8-
github.com/apache/plc4x/plc4go v0.0.0-20250322152815-d7951490fa5e
8+
github.com/apache/plc4x/plc4go v0.0.0-20250329154427-eb854839c617
99
github.com/xuri/excelize/v2 v2.9.0
1010
go.mongodb.org/mongo-driver v1.17.3
1111
)
1212

1313
require (
14+
github.com/IBM/netaddr v1.5.0 // indirect
15+
github.com/cstockton/go-conv v1.0.0 // indirect
1416
github.com/fatih/color v1.18.0 // indirect
1517
github.com/golang/snappy v1.0.0 // indirect
18+
github.com/google/uuid v1.6.0 // indirect
1619
github.com/gopacket/gopacket v1.3.1 // indirect
1720
github.com/icza/bitio v1.1.0 // indirect
21+
github.com/jacobsa/go-serial v0.0.0-20180131005756-15cf729a72d4 // indirect
1822
github.com/klauspost/compress v1.18.0 // indirect
23+
github.com/libp2p/go-reuseport v0.4.0 // indirect
1924
github.com/mattn/go-colorable v0.1.14 // indirect
2025
github.com/mattn/go-isatty v0.0.20 // indirect
2126
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
@@ -31,7 +36,7 @@ require (
3136
github.com/xuri/nfp v0.0.0-20250226145837-86d5fc24b2ba // indirect
3237
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
3338
golang.org/x/crypto v0.36.0 // indirect
34-
golang.org/x/net v0.37.0 // indirect
39+
golang.org/x/net v0.38.0 // indirect
3540
golang.org/x/sync v0.12.0 // indirect
3641
golang.org/x/sys v0.31.0 // indirect
3742
golang.org/x/text v0.23.0 // indirect

src/calculations/go.sum

+23-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1-
github.com/apache/plc4x/plc4go v0.0.0-20250322152815-d7951490fa5e h1:kirF1ebEgSxzl/XLdq1zPfDxRVsL0d7D6skRq56cKJ0=
2-
github.com/apache/plc4x/plc4go v0.0.0-20250322152815-d7951490fa5e/go.mod h1:cHhIlE13Er15Z0m28gFWKkZxhMB8lZrMYfHJdKyO78M=
1+
github.com/IBM/netaddr v1.5.0 h1:IJlFZe1+nFs09TeMB/HOP4+xBnX2iM/xgiDOgZgTJq0=
2+
github.com/IBM/netaddr v1.5.0/go.mod h1:DDBPeYgbFzoXHjSz9Jwk7K8wmWV4+a/Kv0LqRnb8we4=
3+
github.com/ajankovic/xdiff v0.0.1 h1:V1cj8t5xwYzm6ZGPqPOlAc9AIajXuTEn41D/1MJBWMM=
4+
github.com/ajankovic/xdiff v0.0.1/go.mod h1:SUmEZ67uB97I0zkiuQ+lb+LOms9ipn8X+p+2RdJV710=
5+
github.com/antchfx/xpath v0.0.0-20170515025933-1f3266e77307 h1:C735MoY/X+UOx6SECmHk5pVOj51h839Ph13pEoY8UmU=
6+
github.com/antchfx/xpath v0.0.0-20170515025933-1f3266e77307/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk=
7+
github.com/apache/plc4x/plc4go v0.0.0-20250329154427-eb854839c617 h1:B74LlX+XIZPvR/el99gobbndndwUNsfjW24QwBcqUqc=
8+
github.com/apache/plc4x/plc4go v0.0.0-20250329154427-eb854839c617/go.mod h1:jjU8kaOH/leHKXi5vkLniGTPOc+Pw2Kv3fYGV7ei2UY=
39
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
10+
github.com/cstockton/go-conv v1.0.0 h1:zj/q/0MpQ/97XfiC9glWiohO8lhgR4TTnHYZifLTv6I=
11+
github.com/cstockton/go-conv v1.0.0/go.mod h1:HuiHkkRgOA0IoBNPC7ysG7kNpjDYlgM7Kj62yQPxjy4=
12+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
413
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
514
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
615
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
@@ -10,14 +19,20 @@ github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs=
1019
github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
1120
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
1221
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
22+
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
23+
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
1324
github.com/gopacket/gopacket v1.3.1 h1:ZppWyLrOJNZPe5XkdjLbtuTkfQoxQ0xyMJzQCqtqaPU=
1425
github.com/gopacket/gopacket v1.3.1/go.mod h1:3I13qcqSpB2R9fFQg866OOgzylYkZxLTmkvcXhvf6qg=
1526
github.com/icza/bitio v1.1.0 h1:ysX4vtldjdi3Ygai5m1cWy4oLkhWTAi+SyO6HC8L9T0=
1627
github.com/icza/bitio v1.1.0/go.mod h1:0jGnlLAx8MKMr9VGnn/4YrvZiprkvBelsVIbA9Jjr9A=
1728
github.com/icza/mighty v0.0.0-20180919140131-cfd07d671de6 h1:8UsGZ2rr2ksmEru6lToqnXgA8Mz1DP11X4zSJ159C3k=
1829
github.com/icza/mighty v0.0.0-20180919140131-cfd07d671de6/go.mod h1:xQig96I1VNBDIWGCdTt54nHt6EeI639SmHycLYL7FkA=
30+
github.com/jacobsa/go-serial v0.0.0-20180131005756-15cf729a72d4 h1:G2ztCwXov8mRvP0ZfjE6nAlaCX2XbykaeHdbT6KwDz0=
31+
github.com/jacobsa/go-serial v0.0.0-20180131005756-15cf729a72d4/go.mod h1:2RvX5ZjVtsznNZPEt4xwJXNJrM3VTZoQf7V6gk0ysvs=
1932
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
2033
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
34+
github.com/libp2p/go-reuseport v0.4.0 h1:nR5KU7hD0WxXCJbmw7r2rhRYruNRl2koHw8fQscQm2s=
35+
github.com/libp2p/go-reuseport v0.4.0/go.mod h1:ZtI03j/wO5hZVDFo2jKywN6bYKWLOy8Se6DrI2E1cLU=
2136
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
2237
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
2338
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
@@ -31,6 +46,7 @@ github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8
3146
github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow=
3247
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
3348
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
49+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
3450
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
3551
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
3652
github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM=
@@ -43,8 +59,11 @@ github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY=
4359
github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ=
4460
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
4561
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
62+
github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
4663
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
4764
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
65+
github.com/subchen/go-xmldom v1.1.2 h1:7evI2YqfYYOnuj+PBwyaOZZYjl3iWq35P6KfBUw9jeU=
66+
github.com/subchen/go-xmldom v1.1.2/go.mod h1:6Pg/HuX5/T4Jlj0IPJF1sRxKVoI/rrKP6LIMge9d5/8=
4867
github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=
4968
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
5069
github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY=
@@ -72,8 +91,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91
7291
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
7392
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
7493
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
75-
golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c=
76-
golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
94+
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
95+
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
7796
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
7897
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
7998
golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw=

0 commit comments

Comments
 (0)