Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
FileSystemCommPort Class ReferenceProvides CommPort interface to file system devices, such as serial ports. More...
Inheritance diagram for FileSystemCommPort:
Detailed DescriptionProvides CommPort interface to file system devices, such as serial ports. Pass a path to use a file system device, or see NetworkCommPort for a network interface Definition at line 12 of file FileSystemCommPort.h.
Constructor & Destructor Documentation
constructor (see also sub-class constructor in protected section) Definition at line 15 of file FileSystemCommPort.h.
destructor, checks that the file descriptor has already been closed Definition at line 25 of file FileSystemCommPort.h.
Definition at line 51 of file FileSystemCommPort.h. Member Function Documentation
Implements CommPort. Reimplemented in SerialCommPort. Definition at line 43 of file FileSystemCommPort.cc. Referenced by connectionError(), and plistValueChanged().
Displays message on stderr and if fatal is set, calls closeFD(). Need the useClassName parameter because we can't trust autoRegisterFileSystemCommPort to still be valid during static destruction, so that's false when called from destructor Definition at line 63 of file FileSystemCommPort.h. Referenced by open(), and ~FileSystemCommPort().
Returns the name of the class (aka its type). Suggested implementation is to declare a static string member, set it to the result of calling the registry's registerType, and then return that member here Implements CommPort. Reimplemented in SerialCommPort. Definition at line 31 of file FileSystemCommPort.h. Referenced by connectionError(), and plistValueChanged().
Returns a std::basic_streambuf, which is expected to implement the actual work. You can pass this to an istream to use the nice C++ style input and output, or you can call the streambuf functions directly. However, if you're going the latter route, probably easier to just call CommPort's own read() and write(). Depending on implementation, the streambuf this returns might be a different instance than getWriteStreambuf. If they are the same instance, then you could use an iostream instead of separate istream and ostream. Implements CommPort. Definition at line 33 of file FileSystemCommPort.h.
Returns a std::basic_streambuf, which is expected to implement the actual work. You can pass this to an ostream to use the nice C++ style input and output, or you can call the streambuf functions directly. However, if you're going the latter route, probably easier to just call CommPort's own read() and write(). Depending on implementation, the streambuf this returns might be a different instance than getReadStreambuf. If they are the same instance, then you could use an iostream instead of separate istream and ostream. Implements CommPort. Definition at line 34 of file FileSystemCommPort.h.
Allows you to check whether the reference from getReadStreambuf() is currently functional (if checking is supported!). For streambufs which don't have a way to check this, always returns true. Reimplemented from CommPort. Definition at line 35 of file FileSystemCommPort.h.
Allows you to check whether the reference from getWriteStreambuf() is currently functional (if checking is supported!). For streambufs which don't have a way to check this, always returns true. Reimplemented from CommPort. Definition at line 36 of file FileSystemCommPort.h.
tries to have rbuf and/or wbuf open path, subject to mode Implements CommPort. Reimplemented in SerialCommPort. Definition at line 6 of file FileSystemCommPort.cc. Referenced by plistValueChanged().
watches path, triggers a close() and re-open() if it changes Implements PrimitiveListener. Reimplemented in SerialCommPort. Definition at line 56 of file FileSystemCommPort.cc. Member Data Documentation
holds the class name, set via registration with the CommPort registry Definition at line 85 of file FileSystemCommPort.h. Referenced by getClassName().
Definition at line 80 of file FileSystemCommPort.h. Referenced by open(), and plistValueChanged().
Definition at line 81 of file FileSystemCommPort.h. Referenced by open(), and plistValueChanged().
mode bitmask to pass to the open() call (see std::ios_base::openmode) Definition at line 48 of file FileSystemCommPort.h. Referenced by close(), FileSystemCommPort(), open(), and plistValueChanged().
Definition at line 82 of file FileSystemCommPort.h. Referenced by SerialCommPort::close(), close(), connectionError(), SerialCommPort::open(), open(), plistValueChanged(), and ~FileSystemCommPort().
path of file system object being accessed Definition at line 47 of file FileSystemCommPort.h. Referenced by close(), FileSystemCommPort(), SerialCommPort::open(), open(), plistValueChanged(), and SerialCommPort::setupSerial().
Definition at line 78 of file FileSystemCommPort.h. Referenced by close(), connectionError(), getReadStreambuf(), isReadable(), and open().
Definition at line 79 of file FileSystemCommPort.h. Referenced by close(), connectionError(), getWriteStreambuf(), isWriteable(), and open(). The documentation for this class was generated from the following files: |
Tekkotsu Hardware Abstraction Layer 5.1CVS |
Generated Mon May 9 05:01:41 2016 by Doxygen 1.6.3 |