Sponsored Content
Full Discussion: Serial Lines Explained
Top Forums UNIX for Dummies Questions & Answers Serial Lines Explained Post 302930455 by sreyan32 on Sunday 4th of January 2015 11:15:36 AM
Old 01-04-2015
Okay from what I have read in this thread I can understand that in the older days you would have a monitor and a keyboard with a serial port connecting to the central CPU. You would communicate with the CPU using signals sent via the serial port. I know this is an over simplification but is it correct ?

Can someone explain how serial ports can be used for session control in a little more detail ?

What baffles me is that is why still use serial ports ? Why not remove them ? On a normal desktop or laptop serial ports are not used the way they were used back in the olden days, so keep them ?

For example as Corona688 mentioned in a earlier thread
stty still gives the baud rate. This is not required so why still keep it.

Why adopt an old standard forcefully when it is not required is my point
 

We Also Found This Discussion For You

1. Ubuntu

Ubuntu 9.04 Serial application to telnet to serial device

Hello! I am working on an application which reads environmental instruments which have serial ports. The application requires a serial port to be present to talk to the device (i.e. /dev/ttyS0 ). In some instances the environmental devices will be 100's of yards away from the computer, so a... (5 Replies)
Discussion started by: mvona
5 Replies
ost::SerialService(3)					     Library Functions Manual					     ost::SerialService(3)

NAME
ost::SerialService - The SerialService is a thead service object that is meant to service attached serial ports. SYNOPSIS
#include <serial.h> Inherits ost::Thread, and ost::Mutex. Public Member Functions void update (unsigned char flag=0xff) Notify service thread that a port has been added or removed, or a timer changed, so that a new schedule can be computed for expiring attached ports. SerialService (int pri=0, size_t stack=0, const char *id=NULL) Create a service thread for attaching serial ports. virtual ~SerialService () Terminate the service thread and update attached objects. int getCount (void) Get current reference count. Protected Member Functions virtual void onUpdate (unsigned char flag) A virtual handler for processing user defined update requests (1-254) which have been posted through Update. virtual void onEvent (void) A virtual handler for event loop calls. virtual void onCallback (SerialPort *port) A virtual handler for adding support for additional callback events into SerialPort. Friends class SerialPort Additional Inherited Members Detailed Description The SerialService is a thead service object that is meant to service attached serial ports. Multiple pool objects may be created and multiple serial ports may be attached to the same thread of of execution. This allows one to balance threads and the serial ports they service. The TTYPort and TTYService classes are used to form thread-pool serviced serial I/O protocol sets. These can be used when one has a large number of serial devices to manage, and a single (or limited number of) thread(s) can then be used to service the tty port objects present. Each tty port supports a timer control and several virtual methods that the service thread can call when events occur. This model provides for 'callback' event management, whereby the service thread performs a 'callback' into the port object when events occur. Specific events supported include the expiration of a TTYPort timer, pending input data waiting to be read, and 'sighup' connection breaks. Author: David Sugar dyfet@ostel.com Thread pool service for serial ports. Constructor &; Destructor Documentation ost::SerialService::SerialService (intpri = 0, size_tstack = 0, const char *id = NULL) Create a service thread for attaching serial ports. The thread begins execution with the first attached port. Parameters: pri of this thread to run under. stack stack size. id stack ID. virtual ost::SerialService::~SerialService () [virtual] Terminate the service thread and update attached objects. Member Function Documentation int ost::SerialService::getCount (void) [inline] Get current reference count. This can be used when selecting the lead used service handler from a pool. Returns: count of active ports. virtual void ost::SerialService::onCallback (SerialPort *port) [protected], [virtual] A virtual handler for adding support for additional callback events into SerialPort. Parameters: port serial port currently being evaluated. virtual void ost::SerialService::onEvent (void) [protected], [virtual] A virtual handler for event loop calls. This can be used to extend event loop processing. virtual void ost::SerialService::onUpdate (unsigned charflag) [protected], [virtual] A virtual handler for processing user defined update requests (1-254) which have been posted through Update. Parameters: flag of update request. void ost::SerialService::update (unsigned charflag = 0xff) Notify service thread that a port has been added or removed, or a timer changed, so that a new schedule can be computed for expiring attached ports. This can also be used to pass requests to the OnUpdate() event handler. Parameters: flag event for OnUpdate, termination, or reschedule. Friends And Related Function Documentation friend class SerialPort [friend] Author Generated automatically by Doxygen for GNU CommonC++ from the source code. GNU CommonC++ Sat Jun 23 2012 ost::SerialService(3)
All times are GMT -4. The time now is 12:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy