![]() |
GM6000 Digital Heater Controller Build: 20 (Branch = develop)
SDX-1330
|
This concrete class implements a Input-Output stream. More...
This concrete class implements a Input-Output stream.
The actual implementation is dependent on the linked-in implementation (which is platform/behavior specific).
#include <InputOutput_.h>
Public Member Functions | |
| InputOutput_ (int fd) | |
| Constructor. | |
| InputOutput_ (void *handle) | |
| Constructor. | |
| InputOutput_ (Cpl::Io::Descriptor streamfd) | |
| Constructor. | |
| InputOutput_ (int infd, int outfd) | |
| Constructor - Split personality IO stream - allows the underlying input and output streams to reference different streams. | |
| InputOutput_ (void *inhandle, void *outhandle) | |
| Constructor - Split personality IO stream - allows the underlying input and output streams to reference different streams. | |
| InputOutput_ (Cpl::Io::Descriptor instreamfd, Cpl::Io::Descriptor outstreamfd) | |
| Constructor - Split personality IO stream - allows the underlying input and output streams to reference different streams. | |
| InputOutput_ (void) | |
| Constructor. | |
| ~InputOutput_ (void) | |
| Destructor. | |
| void | activate (int fd) |
| Activates and/or resets the underlying 'fd' for the stream. | |
| void | activate (void *handle) |
| Activates and/or resets the underlying 'handle' for the stream. | |
| void | activate (Cpl::Io::Descriptor streamfd) |
| Activates and/or resets the underlying 'streamfd' for the stream. | |
| void | activate (int infd, int outfd) |
| Activates and/or resets the underlying 'fd' for the stream. | |
| void | activate (void *inhandle, void *outhandle) |
| Activates and/or resets the underlying 'handle' for the stream. | |
| void | activate (Cpl::Io::Descriptor instreamfd, Cpl::Io::Descriptor outstreamfd) |
| Activates and/or resets the underlying 'streamfd' for the stream. | |
| bool | isOpened () |
| This method returns true if the Input AND Output streams where successfully open and/or is still opened (i.e. | |
| bool | isInputOpened () |
| Same isOpened() - but only report the Input stream's open/closed status. | |
| bool | isOutputOpened () |
| Same isOpened() - but only report the Output stream's open/closed status. | |
| bool | read (char &c) |
| See Cpl::Io::Input. | |
| bool | read (Cpl::Text::String &destString) |
| See Cpl::Io::Input. | |
| bool | read (void *buffer, int numBytes, int &bytesRead) |
| See Cpl::Io::Input. | |
| bool | available () |
| See Cpl::Io::Input. | |
| bool | write (char c) |
| See Cpl::Io::Output. | |
| bool | write (const char *string) |
| See Cpl::Io::Output. | |
| bool | write (const Cpl::Text::String &string) |
| See Cpl::Io::Output. | |
| bool | write (Cpl::Text::String &formatBuffer, const char *format,...) |
| See Cpl::Io::Output. | |
| bool | vwrite (Cpl::Text::String &formatBuffer, const char *format, va_list ap) |
| See Cpl::Io::Output. | |
| bool | write (const void *buffer, int numBytes) |
| See Cpl::Io::Output. | |
| bool | write (const void *buffer, int maxBytes, int &bytesWritten) |
| See Cpl::Io::Output. | |
| void | flush () |
| See Cpl::Io::Output. | |
| bool | isEos () |
| See Cpl::Io::IsEos. | |
| void | close () |
| See Cpl::Io::Output. | |
Public Member Functions inherited from Cpl::Io::Input | |
| virtual | ~Input () |
| Lets the make the destructor virtual. | |
Public Member Functions inherited from Cpl::Io::Close | |
| virtual | ~Close () |
| Lets the make the destructor virtual. | |
Public Member Functions inherited from Cpl::Container::Item | |
| bool | insert_ (void *newContainerPtr) |
| Helper method to trap when inserting an item in multiple containers. | |
| bool | isInContainer_ (const void *containerPtr) const noexcept |
| Returns 'true' if the instance is in the specified container. | |
Public Member Functions inherited from Cpl::Io::IsEos | |
| virtual | ~IsEos () |
| Lets the make the destructor virtual. | |
Public Member Functions inherited from Cpl::Io::Output | |
| virtual | ~Output () |
| Lets the make the destructor virtual. | |
Protected Attributes | |
| Input_ | m_in |
| Input Stream. | |
| Output_ | m_out |
| Output Stream. | |
| bool | m_single |
| Keep track if I have two or a single stream. | |
Friends | |
| class | Cpl::Io::File::InputOutput |
| class | Cpl::Io::Serial::Port |
Additional Inherited Members | |
Static Public Member Functions inherited from Cpl::Container::Item | |
| static void | remove_ (Item *itemPtr) noexcept |
| Helper method to do the proper 'clean-up' for the multiple-containers-error-trap when removing an item from a container. | |
Public Attributes inherited from Cpl::Container::Item | |
| void * | m_nextPtr_ |
| The link field. | |
| void * | m_inListPtr_ |
| Debug field. | |
Protected Member Functions inherited from Cpl::Container::Item | |
| Item () | |
| Constructor. | |
| Item (const char *) | |
| Constructor used ONLY with the child class MapItem: -->special constructor to allow a Map to be statically allocated. | |
| Cpl::Io::Stdio::InputOutput_::InputOutput_ | ( | int | fd | ) |
Constructor.
'fd' is a the 'file/stream descriptor' of a existing/opened stream.
| Cpl::Io::Stdio::InputOutput_::InputOutput_ | ( | void * | handle | ) |
Constructor.
'handle' is a the 'file/stream descriptor' of a existing/opened stream.
| Cpl::Io::Stdio::InputOutput_::InputOutput_ | ( | Cpl::Io::Descriptor | streamfd | ) |
Constructor.
'streamfd' is a the 'file/stream descriptor' of a existing/opened stream.
| Cpl::Io::Stdio::InputOutput_::InputOutput_ | ( | int | infd, |
| int | outfd ) |
Constructor - Split personality IO stream - allows the underlying input and output streams to reference different streams.
| Cpl::Io::Stdio::InputOutput_::InputOutput_ | ( | void * | inhandle, |
| void * | outhandle ) |
Constructor - Split personality IO stream - allows the underlying input and output streams to reference different streams.
| Cpl::Io::Stdio::InputOutput_::InputOutput_ | ( | Cpl::Io::Descriptor | instreamfd, |
| Cpl::Io::Descriptor | outstreamfd ) |
Constructor - Split personality IO stream - allows the underlying input and output streams to reference different streams.
| Cpl::Io::Stdio::InputOutput_::InputOutput_ | ( | void | ) |
Constructor.
No underlying file descriptors - the stream must be activated before using
| Cpl::Io::Stdio::InputOutput_::~InputOutput_ | ( | void | ) |
Destructor.
| void Cpl::Io::Stdio::InputOutput_::activate | ( | Cpl::Io::Descriptor | instreamfd, |
| Cpl::Io::Descriptor | outstreamfd ) |
Activates and/or resets the underlying 'streamfd' for the stream.
If the current 'fd' is not in the closed state - a fatal error is generated
| void Cpl::Io::Stdio::InputOutput_::activate | ( | Cpl::Io::Descriptor | streamfd | ) |
Activates and/or resets the underlying 'streamfd' for the stream.
If the current 'fd' is not in the closed state - a fatal error is generated
| void Cpl::Io::Stdio::InputOutput_::activate | ( | int | fd | ) |
Activates and/or resets the underlying 'fd' for the stream.
If the current 'fd' is not in the closed state - a fatal error is generated
| void Cpl::Io::Stdio::InputOutput_::activate | ( | int | infd, |
| int | outfd ) |
Activates and/or resets the underlying 'fd' for the stream.
If the current 'fd' is not in the closed state - a fatal error is generated
| void Cpl::Io::Stdio::InputOutput_::activate | ( | void * | handle | ) |
Activates and/or resets the underlying 'handle' for the stream.
If the current 'fd' is not in the closed state - a fatal error is generated
| void Cpl::Io::Stdio::InputOutput_::activate | ( | void * | inhandle, |
| void * | outhandle ) |
Activates and/or resets the underlying 'handle' for the stream.
If the current 'fd' is not in the closed state - a fatal error is generated
|
virtual |
See Cpl::Io::Input.
Implements Cpl::Io::Input.
|
virtual |
See Cpl::Io::Output.
Implements Cpl::Io::Close.
|
virtual |
See Cpl::Io::Output.
Implements Cpl::Io::Output.
|
virtual |
See Cpl::Io::IsEos.
Implements Cpl::Io::IsEos.
| bool Cpl::Io::Stdio::InputOutput_::isInputOpened | ( | ) |
Same isOpened() - but only report the Input stream's open/closed status.
| bool Cpl::Io::Stdio::InputOutput_::isOpened | ( | ) |
This method returns true if the Input AND Output streams where successfully open and/or is still opened (i.e.
close() has not been called). Note: it is okay to call other methods in the class if the file is not open - i.e. nothing 'bad' will happen and the method will return 'failed' status (when appropriate).
| bool Cpl::Io::Stdio::InputOutput_::isOutputOpened | ( | ) |
Same isOpened() - but only report the Output stream's open/closed status.
|
virtual |
See Cpl::Io::Input.
Reimplemented from Cpl::Io::Input.
|
virtual |
See Cpl::Io::Input.
Reimplemented from Cpl::Io::Input.
|
virtual |
See Cpl::Io::Input.
Implements Cpl::Io::Input.
|
virtual |
See Cpl::Io::Output.
Reimplemented from Cpl::Io::Output.
|
virtual |
See Cpl::Io::Output.
Reimplemented from Cpl::Io::Output.
|
virtual |
See Cpl::Io::Output.
Reimplemented from Cpl::Io::Output.
|
virtual |
See Cpl::Io::Output.
Reimplemented from Cpl::Io::Output.
|
virtual |
See Cpl::Io::Output.
Implements Cpl::Io::Output.
|
virtual |
See Cpl::Io::Output.
Reimplemented from Cpl::Io::Output.
|
virtual |
See Cpl::Io::Output.
Reimplemented from Cpl::Io::Output.
|
protected |
Keep track if I have two or a single stream.