APM:Libraries
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
PX4::NSHShellStream Class Reference

#include <Util.h>

Inheritance diagram for PX4::NSHShellStream:
[legend]
Collaboration diagram for PX4::NSHShellStream:
[legend]

Public Member Functions

size_t write (uint8_t)
 
size_t write (const uint8_t *buffer, size_t size)
 
int16_t read () override
 
uint32_t available () override
 
uint32_t txspace () override
 
- Public Member Functions inherited from AP_HAL::BetterStream
virtual void printf (const char *,...) FMT_PRINTF(2
 
virtual void virtual void vprintf (const char *, va_list)
 
void print (const char *str)
 
void println (const char *str)
 
size_t write (const char *str)
 

Private Member Functions

void start_shell (void)
 

Static Private Member Functions

static void shell_thread (void *arg)
 

Private Attributes

int shell_stdin = -1
 
int shell_stdout = -1
 
pthread_t shell_thread_ctx
 
struct {
   int   in = -1
 
   int   out = -1
 
child
 
bool showed_memory_warning = false
 
bool showed_armed_warning = false
 

Detailed Description

Definition at line 7 of file Util.h.

Member Function Documentation

◆ available()

uint32_t NSHShellStream::available ( void  )
overridevirtual

Implements AP_HAL::BetterStream.

Definition at line 124 of file NSHShellStream.cpp.

◆ read()

int16_t NSHShellStream::read ( void  )
overridevirtual

Implements AP_HAL::BetterStream.

Definition at line 110 of file NSHShellStream.cpp.

Here is the call graph for this function:

◆ shell_thread()

void NSHShellStream::shell_thread ( void *  arg)
staticprivate

Definition at line 24 of file NSHShellStream.cpp.

Referenced by start_shell().

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

◆ start_shell()

void NSHShellStream::start_shell ( void  )
private

Definition at line 42 of file NSHShellStream.cpp.

Referenced by read(), and write().

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

◆ txspace()

uint32_t NSHShellStream::txspace ( void  )
overridevirtual

Implements AP_HAL::BetterStream.

Definition at line 133 of file NSHShellStream.cpp.

◆ write() [1/2]

size_t NSHShellStream::write ( uint8_t  b)
virtual

Implements AP_HAL::BetterStream.

Definition at line 86 of file NSHShellStream.cpp.

Referenced by write().

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

◆ write() [2/2]

size_t NSHShellStream::write ( const uint8_t *  buffer,
size_t  size 
)
virtual

Reimplemented from AP_HAL::BetterStream.

Definition at line 97 of file NSHShellStream.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ child

struct { ... } PX4::NSHShellStream::child

Referenced by shell_thread(), and start_shell().

◆ in

int PX4::NSHShellStream::in = -1

Definition at line 20 of file Util.h.

Referenced by shell_thread().

◆ out

int PX4::NSHShellStream::out = -1

Definition at line 21 of file Util.h.

Referenced by shell_thread().

◆ shell_stdin

int PX4::NSHShellStream::shell_stdin = -1
private

Definition at line 15 of file Util.h.

Referenced by available(), read(), shell_thread(), and start_shell().

◆ shell_stdout

int PX4::NSHShellStream::shell_stdout = -1
private

Definition at line 16 of file Util.h.

Referenced by shell_thread(), start_shell(), txspace(), and write().

◆ shell_thread_ctx

pthread_t PX4::NSHShellStream::shell_thread_ctx
private

Definition at line 17 of file Util.h.

Referenced by start_shell().

◆ showed_armed_warning

bool PX4::NSHShellStream::showed_armed_warning = false
private

Definition at line 24 of file Util.h.

Referenced by start_shell().

◆ showed_memory_warning

bool PX4::NSHShellStream::showed_memory_warning = false
private

Definition at line 23 of file Util.h.

Referenced by start_shell().


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