SensESP 3.0.0-beta.6
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
sensesp::StreamLineProducer Class Reference

ValueProducer that reads from a Stream and produces a full line. More...

#include <sensesp/system/stream_producer.h>

Inheritance diagram for sensesp::StreamLineProducer:
[legend]

Public Member Functions

 StreamLineProducer (Stream *stream, reactesp::EventLoop *event_loop=event_loop(), int max_line_length=256)
 
- Public Member Functions inherited from sensesp::ValueProducer< String >
 ValueProducer ()
 
 ValueProducer (const String &initial_value)
 
virtual const String & get () const
 
std::enable_if< std::is_base_of< ValueConsumer< typenameVConsumer::input_type >, VConsumer >::value &&std::is_convertible< String, typenameVConsumer::input_type >::value, std::shared_ptr< VConsumer > >::type connect_to (std::shared_ptr< VConsumer > consumer)
 Connect a producer to a transform with a different input type.
 
std::enable_if< std::is_base_of< ValueConsumer< typenameVConsumer::input_type >, VConsumer >::value &&std::is_convertible< String, typenameVConsumer::input_type >::value, VConsumer * >::type connect_to (VConsumer *consumer)
 
std::enable_if< std::is_base_of< ValueConsumer< typenameVConsumer::input_type >, VConsumer >::value &&std::is_convertible< String, typenameVConsumer::input_type >::value, VConsumer * >::type connect_to (VConsumer &consumer)
 
void emit (const String &new_value)
 
- Public Member Functions inherited from sensesp::Observable
 Observable ()
 
 Observable (Observable &&other)
 Move constructor.
 
void notify ()
 
void attach (std::function< void()> observer)
 

Protected Member Functions

void receive_line ()
 

Protected Attributes

const int max_line_length_
 
int buf_pos = 0
 
char * buf_
 
Stream * stream_
 
reactesp::StreamEvent * read_event_
 
- Protected Attributes inherited from sensesp::ValueProducer< String >
String output_
 

Detailed Description

ValueProducer that reads from a Stream and produces a full line.

Definition at line 34 of file stream_producer.h.

Constructor & Destructor Documentation

◆ StreamLineProducer()

sensesp::StreamLineProducer::StreamLineProducer ( Stream * stream,
reactesp::EventLoop * event_loop = event_loop(),
int max_line_length = 256 )
inline

Definition at line 36 of file stream_producer.h.

Here is the call graph for this function:

Member Function Documentation

◆ receive_line()

void sensesp::StreamLineProducer::receive_line ( )
inlineprotected

Definition at line 52 of file stream_producer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ buf_

char* sensesp::StreamLineProducer::buf_
protected

Definition at line 48 of file stream_producer.h.

◆ buf_pos

int sensesp::StreamLineProducer::buf_pos = 0
protected

Definition at line 47 of file stream_producer.h.

◆ max_line_length_

const int sensesp::StreamLineProducer::max_line_length_
protected

Definition at line 46 of file stream_producer.h.

◆ read_event_

reactesp::StreamEvent* sensesp::StreamLineProducer::read_event_
protected

Definition at line 50 of file stream_producer.h.

◆ stream_

Stream* sensesp::StreamLineProducer::stream_
protected

Definition at line 49 of file stream_producer.h.


The documentation for this class was generated from the following file: