modelica-3rdparty / Modelica_DeviceDrivers

Free library for interfacing hardware drivers to Modelica models. There is support for joysticks, keyboards, UDP, TCP/IP, LCM, MQTT, shared memory, AD/DA converters, serial port and other devices.
BSD 3-Clause "New" or "Revised" License
77 stars 31 forks source link

Add byte size parameter for number of data bits of serial port communication #378

Closed tbeu closed 1 year ago

tbeu commented 1 year ago

Closes #368.

@sertho @max-privato FYI

Reminder: ToDo before v2.2.0 release: Recompile ITI_MDD.dll.

tbeu commented 1 year ago

As commented in the code, I think there should be a bit more elaborate description strings. The term "byte size" in this context is different than the usual meaning.

Resolved as proposed.

Since threre are only 4 valid values, one could also use an enumeration, but that is a matter of taste and I'm also fine with just keeping it as a simple Integer.

Yes, there are 4 possible values in the Linux case. But I did not figure out if that also is true for the Win implementation. I used Integer type for simplicity here (similar as parity which holds three different alternatives only).