Icoc

Latest version: v2.1.0

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

Scan your dependencies

Page 2 of 5

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

1.4.0

ICOc

Channel Selection

- ICOc now supports more sensor channels. You can now select one of up to 255 (instead of 8) hardware channels for each of the three measurement channels.
- The CLI interface now uses three options (`-1`, `-2`, `-3`), instead of one option (`-p`), to specify the channel number of each of the three measurement channels.

Logging

We replaced our custom logging class in the ICOc command line interface with logging code from the Python standard library. This logging code stores data in the following files:

- `cli.log`: Log messages of ICOc
- `network.log`: Log messages of CAN network class
- `plotter.log`: Log messages of plotter (window process)

By default ICOc only write log messages of level `ERROR` or higher into theses files. To print more detailed output you can use the option `--log` to change the log level. For example, to change the log level to `DEBUG` (or higher) you can use the the following command:

sh
icoc --log debug


The other parts of the code, which use the old `Network` class (e.g. the verification test) do not store the log output in files, but instead use the standard error output (`stdout`). This change should hopefully improve the visibility of important log messages.

Tests

- The production tests for the hardware (STH, SMH and STU) should now also work on macOS, after you installed the [PCBUSB](https://github.com/mac-can/PCBUSB-Library) library.
- The STH tests now use the correct ADC reference voltage for the ± 40 g acceleration sensor [ADXL356](https://www.analog.com/en/products/adxl356.html?doc=ADXL356-357.pdf).

Internal

Measurement

- Renamed the method `convert_voltage_adc_to_volts` to `convert_to_supply_voltage`
- The method `convert_to_supply_voltage` now supports different reference voltages

Network

- The methods to

- activate (`activate_acceleration_self_test`) and
- deactivate (`deactivate_acceleration_self_test`)

the self test of the accelerometer now have a parameter to specify the dimension (`x`, `y` or `z`) for the self test.

- The method to read the acceleration voltage (`read_acceleration_voltage`) now supports two additional parameters to

- specify the dimension (`x`, `y` or `z`) and
- the ADC reference voltage.

- The method to read the supply voltage (`read_supply_voltage`) now takes the current reference voltage into consideration

- The new method `read_sensor_configuration` can be used to read the current sensor configuration (i.e. the mapping from hardware/sensor channel to measurement channel).

1.3.0

ICOc

- The program can now change the number of the measured sensor channels. Please note:

- This only works with the **latest version of sensor hardware and firmware**
- The channel config support is in the **very early stages of development**; For example, ICOc currently still assumes that all sensors read acceleration values

STH Test

- All code of the (STH test) should now use the new network class.

SMH Test

- We added a flash upload test for the sensory milling head PCB. To only execute this part of the SMH test you can use the following command:

sh
test-smh -k flash


Internal

ICOc

- The streaming code now uses CAN read events instead of polling.

Logging

- We do not log the CAN streaming messages (every CAN message after you chose “Start Data Acquisition” in ICOc) any more. The reason behind this change is that ICOc is currently not able to handle logging and writing the data into a HFD5 file at the same time on “slower” processors (such as Intel’s Core i5-5300 2.3 GHz).

Network

- We added methods to read and write the sleep and advertisement time values of a sensor device using [`System` (Bluetooth)](https://mytoolit.github.io/Documentation/#command:bluetooth) commands

- We renamed the following methods:

| Old Name | New Name |
| ------------- | ----------------------- |
| `connect_sth` | `connect_sensor_device` |
| `get_sths` | `get_sensor_devices` |

Page 2 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.