Skip to content

Commit

Permalink
rename 'radio' to 'sigan' or 'SignalAnalyzer'
Browse files Browse the repository at this point in the history
  • Loading branch information
jhazentia committed Feb 4, 2022
1 parent 599ed86 commit 527cabb
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ before_install:
- sudo mknod /dev/bus/usb/001/001 c 189 260

install:
- MOCK_RADIO=1 docker-compose up --build -d
- MOCK_SIGAN=1 docker-compose up --build -d

before_script:
- python3 -m pip install --upgrade pip
Expand Down
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"module": "pytest",
"cwd": "${workspaceFolder}/src",
"env": {
"MOCK_RADIO": "true"
"MOCK_SIGAN": "true"
}
},
{
Expand All @@ -25,8 +25,8 @@
],
"django": true,
"env": {
"MOCK_RADIO": "false",
"MOCK_RADIO_RANDOM": "false"
"MOCK_SIGAN": "false",
"MOCK_SIGAN_RANDOM": "false"
},
"envFile": "${workspaceFolder}/env"
}
Expand Down
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,16 @@ repositories. As shown below, the scos-sensor repository integrates everything t
as a functioning scos-sensor and provides the code for the user interface, scheduling,
and the storage and retrieval of schedules and acquisitions. The [scos-actions
repository](https://github.com/ntia/scos-actions) provides the core actions API,
defines the radio interface that provides an abstraction for all signal analyzers, and
provides basic actions. Finally, using a real radio within scos-sensor requires a third
`scos-<signal analyzer>` repository that provides the signal analyzer specific
implementation of the radio interface where `<signal analyzer>` is replaced with the
name of the signal analyzer, e.g. a USRP scos-sensor utilizes the [scos-usrp
repository](https://github.com/ntia/scos-usrp). The signal analyzer specific
implementation of the radio interface may expose additional properties of the signal
analyzer to support signal analyzer specific capabilities and the repository may also
provide additional signal analyzer specific actions.
defines the signal analyzer interface that provides an abstraction for all signal
analyzers, and provides basic actions. Finally, using a real signal analyzer within
scos-sensor requires a third `scos-<signal analyzer>` repository that provides the
signal analyzer specific implementation of the signal analyzer interface where
`<signal analyzer>` is replaced with the name of the signal analyzer, e.g. a USRP
scos-sensor utilizes the [scos-usrp repository](https://github.com/ntia/scos-usrp). The
signal analyzer specific implementation of the signal analyzer interface may expose
additional properties of the signal analyzer to support signal analyzer specific
capabilities and the repository may also provide additional signal analyzer specific
actions.

![SCOS Sensor Modules](/docs/img/scos-sensor-modules.JPG?raw=true)

Expand Down Expand Up @@ -230,7 +231,7 @@ provide additional signal analyzer specific actions.

This section describes how to spin up a production-grade sensor in just a few commands.

We currently support Ettus USRP B2xx software-defined radios out of the box, and any
We currently support Ettus USRP B2xx signal analyzers out of the box, and any
Intel-based host computer should work.

1) Install `git`, `Docker`, and `docker-compose`.
Expand Down Expand Up @@ -620,11 +621,11 @@ existing actions that use the new hardware.
Common action classes can still be re-used by plugins through the scos-actions
repository. The scos-actions repository is intended to be a dependency for every plugin
as it contains the actions base class and signals needed to interface with scos-sensor.
These actions use a common but flexible radio interface that can be implemented for new
types of hardware. This allows for action re-use by passing the radio interface and the
required hardware and measurement parameters to the constructor of these actions.
Alternatively, custom actions that support unique hardware functionality can be added
to the plugin.
These actions use a common but flexible signal analyzer interface that can be
implemented for new types of hardware. This allows for action re-use by passing the
signal analyzer interface implementation and the required hardware and measurement
parameters to the constructor of these actions. Alternatively, custom actions that
support unique hardware functionality can be added to the plugin.

The scos-actions repository can also be installed as a plugin which uses a mock signal
analyzer.
Expand All @@ -634,7 +635,7 @@ any Python package begins with "scos_", and contains a dictionary of actions at
Python path `package_name.discover.actions`, these actions will automatically be
available for scheduling.

The scos-usrp plugin adds support for the Ettus B2xx line of software-defined radios.
The scos-usrp plugin adds support for the Ettus B2xx line of signal analyzers.
It can also be used as an example of a plugin which adds new hardware support and
re-uses the common actions in scos-actions.

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ services:
- IN_DOCKER=1
- IPS
- MAX_DISK_USAGE
- MOCK_RADIO
- MOCK_RADIO_RANDOM
- MOCK_SIGAN
- MOCK_SIGAN_RANDOM
- OAUTH_TOKEN_URL
- PATH_TO_CLIENT_CERT
- PATH_TO_JWT_PUBLIC_KEY
Expand Down
11 changes: 6 additions & 5 deletions docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
],
"securityDefinitions": {
"token": {
"type": "apiKey",
"description": "Tokens are automatically generated for all users. You can view yours by going to your User Details view in the browsable API at `/api/v1/users/me` and looking for the `auth_token` key. New user accounts do not initially have a password and so can not log in to the browsable API. To set a password for a user (for testing purposes), an admin can do that in the Sensor Configuration Portal, but only the account's token should be stored and used for general purpose API access. Example cURL call: `curl -kLsS -H \"Authorization: Token 529c30e6e04b3b546f2e073e879b75fdfa147c15\" https://localhost/api/v1`",
"in": "header",
"name": "Token",
"type": "apiKey"
"in": "header"
}
},
"security": [
Expand Down Expand Up @@ -1638,7 +1638,7 @@
"type": "string",
"enum": [
"logger",
"test_monitor_radio",
"test_monitor_sigan",
"test_multi_frequency_iq_action",
"test_single_frequency_iq_action",
"test_single_frequency_m4s_action",
Expand Down Expand Up @@ -1795,7 +1795,8 @@
"description": "The SigMF metadata for the acquisition",
"type": "object",
"additionalProperties": {
"type": "string"
"type": "string",
"x-nullable": true
}
}
}
Expand Down Expand Up @@ -1937,4 +1938,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/actions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
for name, module in discovered_plugins.items():
logger.debug("Looking for actions in " + name + ": " + str(module))
discover = importlib.import_module(name + ".discover")
if settings.MOCK_RADIO or settings.RUNNING_TESTS:
if settings.MOCK_SIGAN or settings.RUNNING_TESTS:
if hasattr(discover, "test_actions"):
for name, action in discover.test_actions.items():
logger.debug("test_action: " + name + "=" + str(action))
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/monitor_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


def monitor_action_completed_callback(sender, **kwargs):
healthy = kwargs["radio_healthy"]
healthy = kwargs["sigan_healthy"]
if healthy:
if os.path.exists(settings.SDR_HEALTHCHECK_FILE):
Path(settings.SDR_HEALTHCHECK_FILE).unlink()
Expand Down
4 changes: 2 additions & 2 deletions src/sensor/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
IN_DOCKER = env.bool("IN_DOCKER", default=False)
RUNNING_TESTS = "test" in __cmd
RUNNING_DEMO = env.bool("DEMO", default=False)
MOCK_RADIO = env.bool("MOCK_RADIO", default=False) or RUNNING_DEMO or RUNNING_TESTS
MOCK_RADIO_RANDOM = env.bool("MOCK_RADIO_RANDOM", default=False)
MOCK_SIGAN = env.bool("MOCK_SIGAN", default=False) or RUNNING_DEMO or RUNNING_TESTS
MOCK_SIGAN_RANDOM = env.bool("MOCK_SIGAN_RANDOM", default=False)


# Healthchecks - the existance of any of these indicates an unhealthy state
Expand Down

0 comments on commit 527cabb

Please sign in to comment.