Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
104
Merge Requests
104
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
d93a96a4
Commit
d93a96a4
authored
Oct 23, 2023
by
Léo-Paul Géneau
👾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/js-drone: update subscriber description
parent
53b89db1
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
18 deletions
+18
-18
software/js-drone/buildout.hash.cfg
software/js-drone/buildout.hash.cfg
+3
-3
software/js-drone/drone-scripts/worker.js.jinja2
software/js-drone/drone-scripts/worker.js.jinja2
+3
-3
software/js-drone/instance-default.cfg.jinja2
software/js-drone/instance-default.cfg.jinja2
+2
-2
software/js-drone/instance-input-schema.json
software/js-drone/instance-input-schema.json
+1
-1
software/js-drone/instance-peer-input-schema.json
software/js-drone/instance-peer-input-schema.json
+6
-6
software/js-drone/instance-peer.cfg.jinja2.in
software/js-drone/instance-peer.cfg.jinja2.in
+1
-1
software/js-drone/test/test.py
software/js-drone/test/test.py
+2
-2
No files found.
software/js-drone/buildout.hash.cfg
View file @
d93a96a4
...
@@ -22,11 +22,11 @@ md5sum = e0ea95530bf84edfc37eea994cc9ee86
...
@@ -22,11 +22,11 @@ md5sum = e0ea95530bf84edfc37eea994cc9ee86
[instance-default]
[instance-default]
filename = instance-default.cfg.jinja2
filename = instance-default.cfg.jinja2
md5sum =
5c8ebd1f9ca3024d083b0652868e2f71
md5sum =
069f8947c55420ec013497d9eba56252
[instance-peer]
[instance-peer]
filename = instance-peer.cfg.jinja2.in
filename = instance-peer.cfg.jinja2.in
md5sum =
d12fbb134c587173ddff46ff1bc6ffe7
md5sum =
328ba59583e7b47ab9e1a184ac8a201f
[main]
[main]
_update_hash_filename_ = drone-scripts/main.js.jinja2
_update_hash_filename_ = drone-scripts/main.js.jinja2
...
@@ -42,4 +42,4 @@ md5sum = a88028c1248d2b6a91b7d3cb03047196
...
@@ -42,4 +42,4 @@ md5sum = a88028c1248d2b6a91b7d3cb03047196
[worker]
[worker]
_update_hash_filename_ = drone-scripts/worker.js.jinja2
_update_hash_filename_ = drone-scripts/worker.js.jinja2
md5sum =
06a322cc711830262fbbfdc1bfe7947a
md5sum =
a12788ec0d9972fc30c19c1f6db12da3
software/js-drone/drone-scripts/worker.js.jinja2
View file @
d93a96a4
...
@@ -206,11 +206,11 @@ import { evalScript, fdopen, loadFile, open } from "std";
...
@@ -206,11 +206,11 @@ import { evalScript, fdopen, loadFile, open } from "std";
switch (type) {
switch (type) {
case "initPubsub":
case "initPubsub":
initPubsub(configuration.numberOfDrone
, configuration.numberOfSubscriber
);
initPubsub(configuration.numberOfDrone
s, configuration.numberOfSubscribers
);
for (peer_id = 0; peer_id < configuration.numberOfDrone
+ configuration.numberOfSubscriber
; peer_id++) {
for (peer_id = 0; peer_id < configuration.numberOfDrone
s + configuration.numberOfSubscribers
; peer_id++) {
peer_dict[peer_id] = new Drone(peer_id);
peer_dict[peer_id] = new Drone(peer_id);
peer_dict[peer_id].init(peer_id);
peer_dict[peer_id].init(peer_id);
if (peer_id < configuration.numberOfDrone) {
if (peer_id < configuration.numberOfDrone
s
) {
drone_dict[peer_id] = peer_dict[peer_id];
drone_dict[peer_id] = peer_dict[peer_id];
}
}
}
}
...
...
software/js-drone/instance-default.cfg.jinja2
View file @
d93a96a4
...
@@ -17,8 +17,8 @@ return = instance-path
...
@@ -17,8 +17,8 @@ return = instance-path
sla-computer_guid = {{ guid }}
sla-computer_guid = {{ guid }}
config-autopilotIp = {{ parameter_dict['autopilotIp'] }}
config-autopilotIp = {{ parameter_dict['autopilotIp'] }}
config-autopilotPort = {{ dumps(parameter_dict['autopilotPort']) }}
config-autopilotPort = {{ dumps(parameter_dict['autopilotPort']) }}
config-numberOfDrone = {{ dumps(len(parameter_dict['droneGuidList'])) }}
config-numberOfDrone
s
= {{ dumps(len(parameter_dict['droneGuidList'])) }}
config-numberOfSubscriber = {{ dumps(len(parameter_dict['subscriberGuidList'])) }}
config-numberOfSubscriber
s
= {{ dumps(len(parameter_dict['subscriberGuidList'])) }}
config-id = {{ dumps(id) }}
config-id = {{ dumps(id) }}
config-isASimulation = {{ dumps(parameter_dict['isASimulation']) }}
config-isASimulation = {{ dumps(parameter_dict['isASimulation']) }}
{% if id < len(parameter_dict['droneGuidList']) -%}
{% if id < len(parameter_dict['droneGuidList']) -%}
...
...
software/js-drone/instance-input-schema.json
View file @
d93a96a4
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
},
},
"subscriberGuidList"
:
{
"subscriberGuidList"
:
{
"title"
:
"List of subscribers computer ID"
,
"title"
:
"List of subscribers computer ID"
,
"description"
:
"List of computer ID of swarms subscribers"
,
"description"
:
"List of computer ID of swarms subscribers
(entities able to listen/send OPC-UA messages from/to the swarm)
"
,
"type"
:
"array"
,
"type"
:
"array"
,
"default"
:
[]
"default"
:
[]
},
},
...
...
software/js-drone/instance-peer-input-schema.json
View file @
d93a96a4
...
@@ -14,14 +14,14 @@
...
@@ -14,14 +14,14 @@
"description"
:
"Port on which autopilot service is running."
,
"description"
:
"Port on which autopilot service is running."
,
"type"
:
"integer"
"type"
:
"integer"
},
},
"numberOfDrone"
:
{
"numberOfDrone
s
"
:
{
"title"
:
"Number of drone"
,
"title"
:
"Number of drone
s
"
,
"description"
:
"Number of drone in the swarm"
,
"description"
:
"Number of drone
s
in the swarm"
,
"type"
:
"integer"
"type"
:
"integer"
},
},
"numberOfSubscriber"
:
{
"numberOfSubscriber
s
"
:
{
"title"
:
"Number of subscriber"
,
"title"
:
"Number of subscriber
s
"
,
"description"
:
"Number of subscriber
of the swarm
"
,
"description"
:
"Number of subscriber
s of the swarm (entities able to listen/send OPC-UA messages from/to the swarm)
"
,
"type"
:
"integer"
"type"
:
"integer"
},
},
"id"
:
{
"id"
:
{
...
...
software/js-drone/instance-peer.cfg.jinja2.in
View file @
d93a96a4
...
@@ -67,7 +67,7 @@ recipe = slapos.recipe.template:jinja2
...
@@ -67,7 +67,7 @@ recipe = slapos.recipe.template:jinja2
template = ${index-html:target}
template = ${index-html:target}
rendered = $${directory:public}/index.html
rendered = $${directory:public}/index.html
context =
context =
raw nb_drones {{ parameter_dict['numberOfDrone'] }}
raw nb_drones {{ parameter_dict['numberOfDrone
s
'] }}
[httpd-port]
[httpd-port]
recipe = slapos.cookbook:free_port
recipe = slapos.cookbook:free_port
...
...
software/js-drone/test/test.py
View file @
d93a96a4
...
@@ -251,8 +251,8 @@ class SubscriberTestCase(SlapOSInstanceTestCase):
...
@@ -251,8 +251,8 @@ class SubscriberTestCase(SlapOSInstanceTestCase):
{
{
'autopilotIp'
:
'192.168.27.1'
,
'autopilotIp'
:
'192.168.27.1'
,
'autopilotPort'
:
7909
,
'autopilotPort'
:
7909
,
'numberOfDrone'
:
1
,
'numberOfDrone
s
'
:
1
,
'numberOfSubscriber'
:
1
,
'numberOfSubscriber
s
'
:
1
,
'id'
:
1
,
'id'
:
1
,
'isASimulation'
:
False
,
'isASimulation'
:
False
,
'isADrone'
:
False
,
'isADrone'
:
False
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment