-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CR1000X Datalogger Implementation (#5)
This pull request includes the necessary changes to implement a CR1000X datalogger device type in the swarm. The difference between the base device and the CR1000X is mostly the output format of MQTT messages. * NEW: Implemented CR1000X device. The device closely matches the messaging format of a real datalogger, its serial number is produced by converting the `device_id` into ASCII codes separated by dashes. e.g. "MORLY" becomes `77-79-82-76-89`. For each "field" of the logger, the most likely XML type is calculated from the data and the aggregation process is assumed based on the field name: "Temp_Std" will assume standard deviation aggregation. * NEW: Refactored codebase for looser coupling between swarm classes and device classes. Swarm now just handles the orchestration of devices, not instantiation. * NEW: CLI now allows for the selection of device type used with the argument `--device-type`. * NEW: Expanded testing coverage.
- Loading branch information
1 parent
7d69d75
commit a273e51
Showing
33 changed files
with
2,156 additions
and
1,003 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
docs/source/iotdevicesimulator.messaging.rst → docs/source/iotswarm.messaging.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
iotdevicesimulator.messaging package | ||
iotswarm.messaging package | ||
==================================== | ||
|
||
.. automodule:: iotdevicesimulator.messaging | ||
.. automodule:: iotswarm.messaging | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Submodules | ||
---------- | ||
|
||
iotdevicesimulator.messaging.aws module | ||
iotswarm.messaging.aws module | ||
--------------------------------------- | ||
|
||
.. automodule:: iotdevicesimulator.messaging.aws | ||
.. automodule:: iotswarm.messaging.aws | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
iotdevicesimulator.messaging.core module | ||
iotswarm.messaging.core module | ||
---------------------------------------- | ||
|
||
.. automodule:: iotdevicesimulator.messaging.core | ||
.. automodule:: iotswarm.messaging.core | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
docs/source/iotdevicesimulator.scripts.rst → docs/source/iotswarm.scripts.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
iotdevicesimulator.scripts package | ||
iotswarm.scripts package | ||
================================== | ||
|
||
Submodules | ||
---------- | ||
|
||
iotdevicesimulator.scripts.cli module | ||
iotswarm.scripts.cli module | ||
------------------------------------- | ||
|
||
.. click:: iotdevicesimulator.scripts.cli:main | ||
.. click:: iotswarm.scripts.cli:main | ||
:prog: iot-swarm | ||
:nested: full | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: iotdevicesimulator.scripts | ||
.. automodule:: iotswarm.scripts | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
iotdevicesimulator | ||
================== | ||
iotswarm | ||
======== | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
iotdevicesimulator | ||
iotswarm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ dependencies = [ | |
"oracledb", | ||
"backoff", | ||
] | ||
name = "iot-device-simulator" | ||
name = "iot-swarm" | ||
dynamic = ["version"] | ||
authors = [{ name = "Lewis Chambers", email = "[email protected]" }] | ||
description = "Package for simulating a net of IoT devices for stress testing." | ||
|
@@ -24,9 +24,9 @@ test = ["pytest", "pytest-cov", "pytest-asyncio", "parameterized"] | |
docs = ["sphinx", "sphinx-copybutton", "sphinx-rtd-theme", "sphinx-click"] | ||
|
||
[project.scripts] | ||
iot-swarm = "iotdevicesimulator.scripts.cli:main" | ||
iot-swarm = "iotswarm.scripts.cli:main" | ||
[tool.setuptools.dynamic] | ||
version = { attr = "iotdevicesimulator.__version__" } | ||
version = { attr = "iotswarm.__version__" } | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] | ||
|
@@ -40,12 +40,12 @@ filterwarnings = [ | |
"ignore::DeprecationWarning:autosemver.*:", | ||
"ignore::DeprecationWarning:pkg_resources.*:", | ||
] | ||
addopts = "--cov=iotdevicesimulator" | ||
addopts = "--cov=iotswarm" | ||
markers = [ | ||
"asyncio: Tests asynchronous functions.", | ||
"oracle: Requires oracle connection and required config credentials", | ||
"slow: Marks slow tests", | ||
] | ||
|
||
[tool.coverage.run] | ||
omit = ["*example.py", "*__init__.py", "queries.py", "loggers.py"] | ||
omit = ["*example.py", "*__init__.py", "queries.py", "loggers.py", "cli.py"] |
Oops, something went wrong.