Icoc

Latest version: v1.10.0

Safety actively analyzes 623383 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

1.10.0

Documentation

- Remove release notes from [official (bookdown) documentation](https://mytoolit.github.io/ICOc/)

If you are interest in the updates between releases:

- please visit the [GitHub release page](https://github.com/mytoolit/ICOc/releases) or
- take a look into the directory `Documentation/Releases`

ICOn

Measure

- Add support for specifying the channel configuration for the measurement

Internal

Network

- The Network class now raises a `CANInitError` (a subclass of `NetworkError`), when it is unable to initialize the CAN connection instead of a more general `NetworkError`.
- Make sure CAN bus is shutdown properly in error scenarios. This update should get rid of warning messages, such as “PcanBus was not properly shut down”.

Sensor Configuration

- Add check for correct init arguments
- Add method to check if sensor configuration requires hardware that supports channel configuration

STU- Test

- The STU test now tries to fix CAN communication problems, after flashing a new firmware on the chip. This fix should get rid of the bus error that might occur otherwise:


Bus error: an error counter reached the 'heavy'/'warning' limit


and might cause problems in in other tests afterwards.

1.9.0

ICOn

- Moved code into `scripts` directory
- ICOn now handles timeout problems while streaming data ([50](https://github.com/MyTooliT/ICOc/issues/50))

Linting

- We now check the whole codebase with [Pylint](https://github.com/PyCQA/pylint)

Internal

Network

- The `network` class now handles timeout problems when streaming data. If no streaming data arrives for a specified amount of time, then a `StreamingTimeoutError` will be raised.

1.8.0

Documentation

- Added very basic [example code](https://mytoolit.github.io/ICOc/#code-examples)

Docker

- Removed (references to) Docker Hub images, since nobody used them anyway
- Removed `Dockerfile` for Alpine Linux
- Use virtual environment for ICOc install in `Dockerfile` for Ubuntu

ICOn

Measurement

- Add timestamp to measurement filename (Issue [48](https://github.com/MyTooliT/ICOc/issues/48))
- Use default value for acceleration sensor range (Issue [47](https://github.com/MyTooliT/ICOc/issues/47))
- Add options for ADC configuration values:
- prescaler,
- acquisition time,
- oversampling rate, and
- reference voltage
- Use `0` as value for infinite runtime (option `-t/--time`) (Issue [49](https://github.com/MyTooliT/ICOc/issues/49))

Linting

- We now check the codebase – currently only for errors – with [Pylint](https://github.com/PyCQA/pylint)

Logging

- Log files are now stored in the user log directory (of the current OS) instead of the current working directory

Internal

Package

- Merged Python modules for sensor code

- `mytoolit.can.sensor`
- `mytoolit.measurement.sensor`

into `mytoolit.measurement.sensor`

- Moved `EEPROMStatus` definition from `mytoolit.eeprom.eeprom_status` into `mytoolit.eeprom.status`

Storage

- Add method `dataloss` to determine amount of measurement data loss

1.7.0

Configuration

- We added support for a [user configuration file](https://mytoolit.github.io/ICOc/#introduction:section:changing-configuration-values) that can be used to overwrite values in the [default configuration](https://github.com/MyTooliT/ICOc/blob/3e7ebde288b9e728b00c8b86ae37454ca767728b/mytoolit/config/config.yaml).

Package

- Require Python `3.9` or later
- Uploaded package to [PyPi](https://pypi.org/project/icoc/), which means you can now install ICOc via:

sh
pip install icoc


Scripts

- We removed the `clean-repo` command

Hardware Tests

- The SMH, STH and STU tests now store the PDF test report in the current working directory

ICOc

- The command now stores log files inside the current working directory

ICOn

Config

- The [new subcommand `config`](https://mytoolit.github.io/ICOc/#tutorials:section:opening-the-user-configuration) can be used to open the user configuration file.

Measurement

- Add the possibility to change the measurement duration (option `-t`, `--time`)
- Store data in HDF5 format

STU

- Add `reset` command

Style

- We now use [Black][] instead of [YAPF](https://github.com/google/yapf) to format the code base, since Black:
- supports the latest Python features (e.g. `match`/`case` and `except*`) and
- splits long strings (experimental feature).

[Black]: https://github.com/psf/black

Tests

- We added two (very basic) [Prysk](https://pypi.org/project/prysk/) tests for the command line tool `icon`

Internal

ADC

- We added methods to read the

- prescaler,
- acquisition time,
- oversampling rate and
- the sample rate

of ADC configuration objects (class `ADCConfiguration`).

Network

- Collected streaming data now also contains the message counter value
- Fixed reading data from multiple channels

Streaming Data

- We added the method `default`, which can be used to serialize data (into JSON format)

Storage

- We added the method `add_streaming_data`, which can be used to directly add `StreamingData` objects to the (HDF5) storage.

1.6.0

Docker

We now provide [ICOc-Docker images](https://hub.docker.com/repositories/mytoolit) based on

- [Alpine Linux](https://github.com/MyTooliT/ICOc/blob/712556bd/Docker/Alpine/Dockerfile) and
- [Ubuntu](https://github.com/MyTooliT/ICOc/blob/712556bd/Docker/Ubuntu/Dockerfile)

For more information, please take a look [here](https://mytoolit.github.io/ICOc/#docker-on-linux).

ICOc

Internal

Measurement

- Renamed `convert_to_supply_voltage` to `convert_raw_to_supply_voltage`
- The conversion function `convert_raw_to_g` now returns the data value including the unit ([`Quantity`][])
- The conversion function `convert_raw_to_supply_voltage` now returns the data value including the unit ([`Quantity`][])

[`quantity`]: https://pint.readthedocs.io/en/stable/getting/tutorial.html#defining-a-quantity

Network

- Removed the coroutine `read_x_acceleration` (please use `read_streaming_data_single`) instead
- Added the coroutines

| Name | Description |
| ----------------------------- | ---------------------------------------------- |
| `read_streaming_data_seconds` | Read streaming data for certain amount of time |
| `read_streaming_data_amount` | Read certain amount of streaming values |

ICOn

We now provide the command line tool [`icon`](https://mytoolit.github.io/ICOc/#icon-cli-tool) in addition to `icoc`. This CLI tool currently only offers a very limited subset of the functionality of `icoc`. However, since ICOn is based on [python-can](https://python-can.readthedocs.io), it offers two advantages over `icoc`:

- ICOn works on Linux and macOS (in addition to Windows)
- ICOn [supports additional CAN adapters](https://python-can.readthedocs.io/en/master/interfaces.html)

Python

This version of ICOc requires Python `3.8` or later.

Setup

We modernized the setup process of the Python package and removed `setup.py` in favor of [`pyproject.toml`](https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/).

WSL

We updated the [documentation on how to use (parts of) ICOc on the latest stable version of Ubuntu (22.04) in the Windows subsystem for Linux](https://mytoolit.github.io/ICOc/#windows-subsystem-for-linux-2)

1.5.0

ICOc

Command Line

- You can now set/enable the measurement for channel 2 and 3 just by providing the option for the measurement channel without an argument. In this case the measurement channel will be mapped to the corresponding hardware/sensor channel, i.e.

- measurement channel 2 will use hardware channel 2 and
- measurement channel 3 will use hardware channel 3.

Example:


icoc -2


The command above will use

- hardware channel 1 for measurement channel 1 (default value),
- hardware channel 2 for measurement channel 2, and
- disable measurement channel 3.

- ICOc can now connect to an STH, which has “no name” using the command line option `-n` (`--name`):

sh
icoc -n '' alternatively you can also just use `icoc -n`


Logging

- The log level set in the command line interface is now correctly propagated to the CAN class.

STH Tests

- The STH test script now uses the hardware version in the configuration (`STH` → `HARDWARE VERSION`) to determine the correct chip for the flash process.

| Hardware Version | Chip |
| ---------------- | -------------- |
| `1.x.x` | `BGM113A256V2` |
| `2.x.x` | `BGM123A256V2` |

- The test that executes self test now only checks that the absolute difference between the voltage

- at the the self test and
- before/after the self test

is larger than a certain value. Before we always assumed that the voltage at the test is higher than before/after. This does not seem to be the case for certain sensors like the ± 40 g sensor [ADXL356](https://www.analog.com/en/products/adxl356.html).

- The EEPROM test now also write the
- [acceleration slope](https://mytoolit.github.io/Documentation/#value:acceleration-slope) and
- [acceleration offset](https://mytoolit.github.io/Documentation/#value:acceleration-offset)
values of the y-axis and z-axis into the EEPROM

Internal

Network

- Added the following coroutines:

| Method | Description |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| `write_sensor_configuration` | Write [measurement channel configuration](https://mytoolit.github.io/Documentation/#command:get-set-sensors) |
| `read_eeprom_y_axis_acceleration_slope` | Read [y-axis acceleration slope](https://mytoolit.github.io/Documentation/#value:acceleration-slope) |
| `write_eeprom_y_axis_acceleration_slope` | Write [y-axis acceleration slope](https://mytoolit.github.io/Documentation/#value:acceleration-slope) |
| `read_eeprom_y_axis_acceleration_offset` | Read [y-axis offset slope](https://mytoolit.github.io/Documentation/#value:acceleration-offset) |
| `write_eeprom_y_axis_acceleration_offset` | Write [y-axis offset slope](https://mytoolit.github.io/Documentation/#value:acceleration-offset) |
| `read_eeprom_z_axis_acceleration_slope` | Read [z-axis acceleration slope](https://mytoolit.github.io/Documentation/#value:acceleration-slope) |
| `write_eeprom_z_axis_acceleration_slope` | Write [z-axis acceleration slope](https://mytoolit.github.io/Documentation/#value:acceleration-slope) |
| `read_eeprom_z_axis_acceleration_offset` | Read [z-axis offset slope](https://mytoolit.github.io/Documentation/#value:acceleration-offset) |
| `write_eeprom_z_axis_acceleration_offset` | Write [z-axis offset slope](https://mytoolit.github.io/Documentation/#value:acceleration-offset) |

- The doctests of the Network class should now work more reliable on Linux

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.