Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in_serial, in_xbee updates (2015-07-22) #25

Merged
merged 12 commits into from
Jul 23, 2015

Conversation

hasegaw
Copy link
Contributor

@hasegaw hasegaw commented Jul 22, 2015

Here's updated version of in_serial and in_xbee plugin.

in_serial plugin updates:

  • Now functionable on MacOS X (and maybe on BSD variants)
  • Use FD-based event for Linux, timer-based for other OSes
  • Use non-blocking I/O
  • Eliminated unnecessary data validation
  • More several bugfixes and improvements

in_xbee:

  • Added periodic I/O sampling packet support
  • Resolved dead lock bug
  • More several improvements

termios.h in some operating systems actually don't have Bxxxxxx symbols
for higher bitrates. This change allows use of those.
Eventually we'd like to re-introduce better input validation mechanism.

Signed-off-by: Takeshi HASEGAWA <hasegaw@gmail.com>
Most of operating systems, expecting Linux,  will restore termios
if the process is terminated.

The line was intended for keeping original termios before process
shutdown, but we don't have a chance (callback) to recover it yet,
therefore it is a useless.

Signed-off-by: Takeshi HASEGAWA <hasegaw@gmail.com>
Resolved tcsetattr() failure on Mac OS X.
Tested on MacOS X Yostmite, and Respbian.

Signed-off-by: Takeshi HASEGAWA <hasegaw@gmail.com>
Use timer-based event for non-Linux operating systems,
since file descriptior based event handler didn't work on MacOS X.
Tested on MacOS X Yosetmite, and Raspbian.

Signed-off-by: Takeshi HASEGAWA <hasegaw@gmail.com>
- Open the device with O_NONBLOCK
- Queue all available lines in each event handler call
- Eliminated unnecessary data validation (for in_seral) that inherited from in_kmsg plugin
- Changed line buffer size from 2024 to 1024

Tested on MacOS X, and Raspbian

Signed-off-by: Takeshi HASEGAWA <hasegaw@gmail.com>
Signed-off-by: Takeshi HASEGAWA <hasegaw@gmail.com>
As of today, in_xbee_collect() is not used.

Signed-off-by: Takeshi HASEGAWWA <hasegaw@gmail.com>
Signed-off-by: Takeshi HASEGAWA <hasegaw@gmail.com>
- Splited IO sampling subroutines to in_xbee_iosampling.[ch]
- Introduced available ioports lists to implement XBee API more accurately

Signed-off-by: Takeshi HASEGAWA <hasegaw@gmail.com>
Signed-off-by: Takeshi HASEGAWA <hasegaw@gmail.com>
Signed-off-by: Takeshi HASEGAWA <hasegaw@gmail.com>
Signed-off-by: Takeshi HASEGAWA <hasegaw@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants