<commit_before># CSerial

Cross-platform serial port implementation.

[Homepage](http://programming.rm5248.com/projects/c-serial/)

Based largely off of [JavaSerial](https://github.com/rm5248/JavaSerial),
CSerial aims to bring cross-platform serial programming to a computer near you.

The library is structured along the lines of the Apache Portable Runtime(APR).
It aims to provide as much low-level support as is required to create a working
serial port implementation.

CSerial is designed to be fully POSIX-compliant, however if it is not please
open an issue on GitHub.  See the 'Bugs' section for more details on this.

## Build / Install

Building is done using CMake.  On Linux, this should be done like the 
following:

```bash
~$ mkdir CSerial_build
~$ cd CSerial_build
~$ cmake /path/to/CSerial_code
~$ make
~$ make install
```

On Windows, I recommend using CMake to create a new Visual Studio project and 
building the code that way.  I have not tested cygwin nor MinGW makefiles as 
generated by CMake.

## Example

For information on how to use the library, check out the [example program](
https://github.com/rm5248/CSerial/blob/master/examples/example_full.c)
under the 'examples' directory.

The simplified flow of how to use the library is below:

1. Allocate a new `c_serial_port_t` struct.  Note that this is an opaque type,
and can only be passed as a pointer.  Use the `c_serial_new` function.
2. Set the name of the serial port.  This is the actual serial port that will 
be opened.  It will be something like `/dev/ttyS0` on Linux systems, and 
`COM1` on Windows systems.  Use the `c_serial_set_port_name` function.
3. Set the serial port parameters.  By default, the port will be opened at 
`9600-8-N-1`.  Any other settings <commit_msg>Added CI  and install information<commit_after># CSerial

Cross-platform serial port implementation.

[Homepage](http://programming.rm5248.com/projects/c-serial/)

Based largely off of [JavaSerial](https://github.com/rm5248/JavaSerial),
CSerial aims to bring cross-platform serial programming to a computer near you.

The library is structured along the lines of the Apache Portable Runtime(APR).
It aims to provide as much low-level support as is required to create a working
serial port implementation.

CSerial is designed to be fully POSIX-compliant, however if it is not please
open an issue on GitHub.  See the 'Bugs' section for more details on this.

## Continuous Integration
[![Build Status](http://jenkins.rm5248.com/buildStatus/icon?job=CSerial)](
http://jenkins.rm5248.com/job/CSerial)

Find builds on [Jenkins!](http://jenkins.rm5248.com/job/CSerial/)

## Install(Debian-based systems)

There is an APT server setup that provides CSerial that you can find
[here](http://apt.rm5248.com/).  Note that because the 'nightly' repo 
contains packages for both amd64 and armhf, you may need to specify
the exact version to install, as otherwise it may attempt to install 
one from an incorrect arch.

## Build / Install from source

Building is done using CMake.  On Linux, this should be done like the 
following:

```bash
~$ mkdir CSerial_build
~$ cd CSerial_build
~$ cmake /path/to/CSerial_code
~$ make
~$ make install
```

On Windows, I recommend using CMake to create a new Visual Studio project and 
building the code that way.  I have not tested cygwin nor MinGW makefiles as 
generated by CMake.

## Example

For information on how to use the library, check out the [example program](
https://github.com/rm5248/CSerial/blob/master/examples/example_full.c)
under the 'examples' directory.

The simplified flow of how to use the library is below:

1. Allocate a new `c_serial_port_t` struct.  Note that this is an opaque type,
and can only be passed as a pointer.  Use the `c_serial_new` function.
2. Set the name of the serial port.  This is the actual serial port that will 
be opened.  It will be something like `/dev/ttyS0` on Linux systems, and 
`COM1` on Windows systems.  Use the `c_serial_set_port_name` function.
3. Set the serial port parameters.  By default, the port will be opened at 
`9600-8-N-1`.  Any other settings 
{'fraction_non_alphanumeric': 0.0756875152105135, 'fraction_numerical': 0.015575565831102457, 'mean_word_length': 4.2025316455696204, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5718913', 'n_tokens_mistral': 1252, 'n_tokens_neox': 1202, 'n_words': 560}