| PX4 Firmware
    PX4 Autopilot Software http://px4.io | 
#include <mavlink_shell.h>
| Public Member Functions | |
| MavlinkShell ()=default | |
| ~MavlinkShell () | |
| int | start () | 
| Start the mavlink shell.  More... | |
| size_t | write (uint8_t *buffer, size_t len) | 
| Write to the shell.  More... | |
| size_t | read (uint8_t *buffer, size_t len) | 
| Read from the shell.  More... | |
| size_t | available () | 
| Get the number of bytes that can be read.  More... | |
| Private Member Functions | |
| MavlinkShell (const MavlinkShell &)=delete | |
| MavlinkShell | operator= (const MavlinkShell &)=delete | 
| Static Private Member Functions | |
| static int | shell_start_thread (int argc, char *argv[]) | 
| Private Attributes | |
| int | _to_shell_fd = -1 | 
| int | _from_shell_fd = -1 | 
| fd to write to the shell  More... | |
| int | _shell_fds [2] = { -1, -1} | 
| fd to read from the shell  More... | |
| px4_task_t | _task | 
| stdin & out used by the shell  More... | |
Definition at line 48 of file mavlink_shell.h.
| 
 | default | 
| MavlinkShell::~MavlinkShell | ( | ) | 
Definition at line 57 of file mavlink_shell.cpp.
References _from_shell_fd, and _to_shell_fd.
| 
 | privatedelete | 
| size_t MavlinkShell::available | ( | ) | 
Get the number of bytes that can be read.
Definition at line 171 of file mavlink_shell.cpp.
References _from_shell_fd, and OK.
Referenced by Mavlink::task_main().
| 
 | privatedelete | 
| size_t MavlinkShell::read | ( | uint8_t * | buffer, | 
| size_t | len | ||
| ) | 
Read from the shell.
This is blocking, if 0 bytes are available, this will block.
| len | buffer length | 
Definition at line 166 of file mavlink_shell.cpp.
References _from_shell_fd, and read().
Referenced by Mavlink::task_main().
| 
 | staticprivate | 
Definition at line 150 of file mavlink_shell.cpp.
Referenced by start().
| int MavlinkShell::start | ( | ) | 
Start the mavlink shell.
Definition at line 70 of file mavlink_shell.cpp.
References _from_shell_fd, _shell_fds, _task, _to_shell_fd, and shell_start_thread().
Referenced by Mavlink::get_shell().
| size_t MavlinkShell::write | ( | uint8_t * | buffer, | 
| size_t | len | ||
| ) | 
Write to the shell.
Definition at line 161 of file mavlink_shell.cpp.
References _to_shell_fd, and write().
Referenced by MavlinkReceiver::handle_message_serial_control().
| 
 | private | 
fd to write to the shell
Definition at line 83 of file mavlink_shell.h.
Referenced by available(), read(), start(), and ~MavlinkShell().
| 
 | private | 
| 
 | private | 
| 
 | private | 
Definition at line 82 of file mavlink_shell.h.
Referenced by start(), write(), and ~MavlinkShell().