Skip to content

Commit

Permalink
remove invalid quality flag if short value is greater then 2^24
Browse files Browse the repository at this point in the history
  • Loading branch information
m-unkel committed May 24, 2023
1 parent 814ff70 commit ba14aff
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 28 deletions.
25 changes: 5 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ The library is used as testing framework for test-automation.

### Operating systems

* Debian/Ubuntu (x64): YES
* Debian/Ubuntu (x64): YES >= 20.04
* Raspbian (arm32v7): YES
* Windows (x64): YES
* Raspbian (aarch64): Not yet
Expand All @@ -113,36 +113,21 @@ The library is used as testing framework for test-automation.
* python >= 3.6, < 3.11

## Installation
Please adjust the version number to the latest version or use a specific version according to your needs.

### Package distribution

#### Install from pypi.org
### Install from pypi.org
```bash
python3 -m pip install c104~=1.16.0
```

#### Add to requirements.txt
```
c104~=1.16.0
```

### Source distribution

#### Install from source

### Install from git
```bash
sudo apt-get install build-essential python3-dev python3-pip
python3 -m pip install c104@git+https://github.com/fraunhofer-fit-dien/iec104-python.git@v1.16.0
```

#### Add to requirements.txt
```
c104 @ git+https://github.com/fraunhofer-fit-dien/iec104-python.git@v1.16.0
```

## Wiki

Read more about the **Classes** and their **Properties** in our [project Wiki](https://iec104-python.readthedocs.io/).
Read more about the **Classes** and their **Properties** in our [project Wiki](https://iec104-python.readthedocs.io/python/index.html).

## Contribution

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def build_extension(self, ext: CMakeExtension) -> None:

setup(
name="c104",
version="1.16.0",
version="1.16.1",
author="Martin Unkel, Fraunhofer FIT",
author_email="martin.unkel@fit.fraunhofer.de",
description="iec104-python",
Expand Down
8 changes: 1 addition & 7 deletions src/object/DataPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,7 @@ void DataPoint::setValueEx(const double new_value, const Quality &new_quality,
case M_ME_TF_1:
case C_SE_NC_1:
case C_SE_TC_1: {
if (new_value < -16777216. || new_value > 16777215.) {
// unexpected bad quality
std::cerr << "[c104.Point.setValueEx] Cannot set value of M_ME (short) "
"to numbers other than [-2^24, ... , +2^24 - 1] at IOA "
<< std::to_string(informationObjectAddress) << std::endl;
quality.store(Quality::Invalid);
}
// no validation required
} break;
case M_IT_NA_1:
case M_IT_TA_1:
Expand Down

0 comments on commit ba14aff

Please sign in to comment.