goburrow / serial

Go (golang) serial library for modbus
https://github.com/goburrow/modbus
MIT License
191 stars 90 forks source link

Added support for Mac OS #1

Closed gonium closed 9 years ago

gonium commented 9 years ago

Hi,

the pull request contains an implementation of the serial code for mac os. Basically I just took the linux code and changed some minor details:

I also changed the test code to use different PTYs. This is probably not what is reasonable - the testcode depends on the runtime system (since it depends on PTY names). Probably you could refactor the test to use environment variables, but this decision is up to you.

The testsuite works, as well as my small test program for getting values from a SDM630 smart meter. I use socat just like under linux for running the testsuite.

-Mathias

nqv commented 9 years ago

Thank you @gonium We should later merge mac and linux code into shared unix one.