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

Study mods to InputBuffer - not for merge #559

Open
wants to merge 3 commits into
base: Devt
Choose a base branch
from
Open

Conversation

MitchBradley
Copy link
Collaborator

This code is not intended to be merged in this form.

This is a proof of concept of some class structure changes that
will be useful as a steppingstone for the Client class task.
The old InputBuffer class, which was used for two different
purposes (macro input and buffering between SerialCheckTask
and protocol_main_loop()), has now been split into MacroBuffer
and InputBuffer. MacroBuffer inherits from Stream, so it can
be a primary data source, while InputBuffer is a standalone class
with only the exact set of methods needed for the intermediate
buffering job.

MacroBuffer has a write() method that discards the data, so
when it is used as a data source in the "client" sense, writes
to it do nothing.

InputBuffer will go away when the Client class appears, as its
function will be subsumed by an integrated line buffering mechanism.

The Telnet_Server and Serial2Socket classes were converted to
inherit from Stream so they can be used as input sources without
using different code to read them, compared to other sources.

This code is not intended to be merged in this form.

This is a proof of concept of some class structure changes that
will be useful as a steppingstone for the Client class task.
The old InputBuffer class, which was used for two different
purposes (macro input and buffering between SerialCheckTask
and protocol_main_loop()), has now been split into MacroBuffer
and InputBuffer.  MacroBuffer inherits from Stream, so it can
be a primary data source, while InputBuffer is a standalone class
with only the exact set of methods needed for the intermediate
buffering job.

MacroBuffer has a write() method that discards the data, so
when it is used as a data source in the "client" sense, writes
to it do nothing.

InputBuffer will go away when the Client class appears, as its
function will be subsumed by an integrated line buffering mechanism.

The Telnet_Server and Serial2Socket classes were converted to
inherit from Stream so they can be used as input sources without
using different code to read them, compared to other sources.
@MitchBradley MitchBradley changed the base branch from Devt to DevtSane February 18, 2021 21:23
@MitchBradley MitchBradley changed the base branch from DevtSane to DevtTest February 18, 2021 21:25
Base automatically changed from DevtTest to DevtNewName February 18, 2021 21:26
@MitchBradley MitchBradley changed the base branch from DevtNewName to DevtSane February 18, 2021 21:27
Base automatically changed from DevtSane to Devt February 18, 2021 21:47
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.

1 participant