weighbridge-simulator


Nameweighbridge-simulator JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/garrett-he/weighbridge-simulator
SummaryA command line tool continuously send data to a serial port to simulate weighbridge communicating.
upload_time2023-10-05 18:59:26
maintainer
docs_urlNone
authorGarrett HE
requires_python>=3.8,<3.13
licenseBSD-3-Clause
keywords weighbridge simulator serial-communication
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # weighbridge-simulator

![license](https://img.shields.io/github/license/garrett-he/weighbridge-simulator)
![status](https://img.shields.io/pypi/status/weighbridge-simulator)
![build](https://img.shields.io/github/actions/workflow/status/garrett-he/weighbridge-simulator/ubuntu-jammy.yml)
![version](https://img.shields.io/pypi/v/weighbridge-simulator)
![python](https://img.shields.io/pypi/pyversions/weighbridge-simulator)

A command line tool continuously send data to a serial port to simulate
weighbridge communicating.

## Install

You can install this tool by the following methods:

1. Install `weighbridge-simulator` by `pip`:
   ```
   pip install git+ssh://git@github.com/garrett-he/weighbridge-simulator.git
   ```

2. Download compiled binary files from [Repository Releases][1].

## Quickstart

1. Prepare a file contains weight list in format:

   ```
   000.000
   000.020
   000.160
   000.420
   000.780
   005.660
   005.800
   006.040
   006.120
   006.100
   006.080
   ...
   ```

2. Run `wb-simulator` to start simulation:

    ```
    wb-simulator --data-file FILE
    ```

Then you can receive the weight values from the created port `/dev/pts/N` in *
*raw** data format.

> `weighbridge-simulator` will convert the input data into **raw**
> weighbridge format before sending it to a serial port, like:
>
> `012.345` will be converted to `543.210=`

## Usage

```
Usage: wb-simulator [OPTIONS]

  A command line tool continuously send data to a serial port to simulate
  weighbridge communicating.

Options:
  -p, --port NAME       Name of serial port.
  -d, --data-file PATH  Path of data file.  [required]
  -l, --loops N         Loops of sending data set, zero means endless.
  -i, --interval SECS   Interval of each data.
  --version             Show the version and exit.
  --help                Show this message and exit.
```

## License

Copyright (C) 2023 Garrett HE <garrett.he@hotmail.com>

The BSD 3-Clause License, see [LICENSE](./LICENSE).

[1]: https://github.com/garrett-he/weighbridge-simulator/releases

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/garrett-he/weighbridge-simulator",
    "name": "weighbridge-simulator",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<3.13",
    "maintainer_email": "",
    "keywords": "weighbridge,simulator,serial-communication",
    "author": "Garrett HE",
    "author_email": "garrett.he@hotmail.com",
    "download_url": "https://files.pythonhosted.org/packages/cf/87/bb987694e8e930f1161b7acfee75b84276109a4959dce8c9b99d5c863bf4/weighbridge_simulator-0.3.1.tar.gz",
    "platform": null,
    "description": "# weighbridge-simulator\n\n![license](https://img.shields.io/github/license/garrett-he/weighbridge-simulator)\n![status](https://img.shields.io/pypi/status/weighbridge-simulator)\n![build](https://img.shields.io/github/actions/workflow/status/garrett-he/weighbridge-simulator/ubuntu-jammy.yml)\n![version](https://img.shields.io/pypi/v/weighbridge-simulator)\n![python](https://img.shields.io/pypi/pyversions/weighbridge-simulator)\n\nA command line tool continuously send data to a serial port to simulate\nweighbridge communicating.\n\n## Install\n\nYou can install this tool by the following methods:\n\n1. Install `weighbridge-simulator` by `pip`:\n   ```\n   pip install git+ssh://git@github.com/garrett-he/weighbridge-simulator.git\n   ```\n\n2. Download compiled binary files from [Repository Releases][1].\n\n## Quickstart\n\n1. Prepare a file contains weight list in format:\n\n   ```\n   000.000\n   000.020\n   000.160\n   000.420\n   000.780\n   005.660\n   005.800\n   006.040\n   006.120\n   006.100\n   006.080\n   ...\n   ```\n\n2. Run `wb-simulator` to start simulation:\n\n    ```\n    wb-simulator --data-file FILE\n    ```\n\nThen you can receive the weight values from the created port `/dev/pts/N` in *\n*raw** data format.\n\n> `weighbridge-simulator` will convert the input data into **raw**\n> weighbridge format before sending it to a serial port, like:\n>\n> `012.345` will be converted to `543.210=`\n\n## Usage\n\n```\nUsage: wb-simulator [OPTIONS]\n\n  A command line tool continuously send data to a serial port to simulate\n  weighbridge communicating.\n\nOptions:\n  -p, --port NAME       Name of serial port.\n  -d, --data-file PATH  Path of data file.  [required]\n  -l, --loops N         Loops of sending data set, zero means endless.\n  -i, --interval SECS   Interval of each data.\n  --version             Show the version and exit.\n  --help                Show this message and exit.\n```\n\n## License\n\nCopyright (C) 2023 Garrett HE <garrett.he@hotmail.com>\n\nThe BSD 3-Clause License, see [LICENSE](./LICENSE).\n\n[1]: https://github.com/garrett-he/weighbridge-simulator/releases\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "A command line tool continuously send data to a serial port to simulate weighbridge communicating.",
    "version": "0.3.1",
    "project_urls": {
        "Homepage": "https://github.com/garrett-he/weighbridge-simulator",
        "Repository": "https://github.com/garrett-he/weighbridge-simulator.git"
    },
    "split_keywords": [
        "weighbridge",
        "simulator",
        "serial-communication"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "80a97c70a0dffb0ca81e41b8546c83a0e77da04c1ab2fe771685be3915a358d4",
                "md5": "85949f665849a280ff58c955f05f2b5e",
                "sha256": "e6558dd2e428d9cd4f74da0ed7b4886f08a400461f4d974677d5f2b303884764"
            },
            "downloads": -1,
            "filename": "weighbridge_simulator-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "85949f665849a280ff58c955f05f2b5e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<3.13",
            "size": 4674,
            "upload_time": "2023-10-05T18:59:24",
            "upload_time_iso_8601": "2023-10-05T18:59:24.294819Z",
            "url": "https://files.pythonhosted.org/packages/80/a9/7c70a0dffb0ca81e41b8546c83a0e77da04c1ab2fe771685be3915a358d4/weighbridge_simulator-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cf87bb987694e8e930f1161b7acfee75b84276109a4959dce8c9b99d5c863bf4",
                "md5": "fa064af79cc4b661a3e8d92f176e95f5",
                "sha256": "a318b48a9adccc122409ccea85650cf0b14882db0583ad153a568dec05de662a"
            },
            "downloads": -1,
            "filename": "weighbridge_simulator-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "fa064af79cc4b661a3e8d92f176e95f5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<3.13",
            "size": 3685,
            "upload_time": "2023-10-05T18:59:26",
            "upload_time_iso_8601": "2023-10-05T18:59:26.028312Z",
            "url": "https://files.pythonhosted.org/packages/cf/87/bb987694e8e930f1161b7acfee75b84276109a4959dce8c9b99d5c863bf4/weighbridge_simulator-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-05 18:59:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "garrett-he",
    "github_project": "weighbridge-simulator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "weighbridge-simulator"
}
        
Elapsed time: 0.20760s