Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pissirSmartHome
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alfredo Chissotti
pissirSmartHome
Commits
759f294c
Commit
759f294c
authored
2 years ago
by
alfredo
Browse files
Options
Downloads
Patches
Plain Diff
domain.java funzionante anche per piu' piattaforme (forse)
parent
d410f5d5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
domainManager/src/code/Domain.java
+21
-20
21 additions, 20 deletions
domainManager/src/code/Domain.java
domainManager/src/code/InstallHandler.java
+2
-0
2 additions, 0 deletions
domainManager/src/code/InstallHandler.java
with
23 additions
and
20 deletions
domainManager/src/code/Domain.java
+
21
−
20
View file @
759f294c
...
...
@@ -127,26 +127,27 @@ public class Domain {
}
for
(
int
i
=
0
;
i
<
s1
.
length
;
i
++)
{
String
remZip
=
s1
[
i
].
substring
(
0
,
s1
[
i
].
length
()
-
4
);
String
[]
curr
=
remZip
.
split
(
"-"
);
for
(
int
j
=
0
;
j
<
curr
.
length
;
j
++)
{
if
(
curr
.
length
>
1
)
{
String
a
=
curr
[
0
];
String
b
=
curr
[
1
];
try
{
// inserimento modulo non arduino
DBC
.
fillModules
(
a
,
b
,
s1
[
i
]);
}
catch
(
SQLException
|
JSONException
e
)
{
e
.
printStackTrace
();
}
}
else
{
String
a
=
curr
[
0
];
try
{
// inserimento modulo arduino
DBC
.
fillModules
(
a
,
"Arduino1"
,
s1
[
i
]);
}
catch
(
SQLException
|
JSONException
e
)
{
e
.
printStackTrace
();
}
if
(
remZip
.
contains
(
"-debian9-BB"
)){
String
[]
curr
=
remZip
.
split
(
"-"
);
String
a
=
curr
[
0
];
String
b
=
curr
[
1
];
try
{
// inserimento modulo non arduino
DBC
.
fillModules
(
a
,
b
,
s1
[
i
]);
}
catch
(
SQLException
|
JSONException
e
)
{
e
.
printStackTrace
();
}
}
if
(
remZip
.
contains
(
"_Arduino1wifi"
)){
String
[]
curr
=
remZip
.
split
(
"_"
);
String
a
=
curr
[
0
];
// vogliamo solo Arduino1
String
b
=
curr
[
1
].
substring
(
0
,
8
);
try
{
// inserimento modulo arduino
DBC
.
fillModules
(
a
,
b
,
s1
[
i
]);
}
catch
(
SQLException
|
JSONException
e
)
{
e
.
printStackTrace
();
}
}
}
...
...
This diff is collapsed.
Click to expand it.
domainManager/src/code/InstallHandler.java
+
2
−
0
View file @
759f294c
...
...
@@ -103,6 +103,8 @@ public class InstallHandler implements HttpHandler {
}
// System.out.println("riga 105 moduleHost = " + moduleHosts);
// divido gli host in base al loro module
// Per ogni host e module, associo ad ogni module tutti i suoi host
// moduleHosts puo' avere module0---host1 e module0---host2, hostsMap unisce i due host sullo stesso module
HashMap
<
String
,
ArrayList
<
String
>>
hostsMap
=
new
HashMap
<
String
,
ArrayList
<
String
>>();
for
(
String
mh
:
moduleHosts
)
{
String
[]
mhSplit
=
mh
.
split
(
"---"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment