PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Public Member Functions | |
Mavlink2Dev (ReadBuffer *_read_buffer) | |
virtual | ~Mavlink2Dev () |
virtual ssize_t | read (struct file *filp, char *buffer, size_t buflen) |
virtual ssize_t | write (struct file *filp, const char *buffer, size_t buflen) |
Public Member Functions inherited from DevCommon | |
DevCommon (const char *device_path) | |
virtual | ~DevCommon () |
virtual int | ioctl (struct file *filp, int cmd, unsigned long arg) |
virtual int | open (file *filp) |
virtual int | close (file *filp) |
Public Member Functions inherited from cdev::CDev | |
CDev (const char *devname) | |
Constructor. More... | |
CDev (const CDev &)=delete | |
CDev & | operator= (const CDev &)=delete |
CDev (CDev &&)=delete | |
CDev & | operator= (CDev &&)=delete |
virtual | ~CDev () |
virtual int | init () |
virtual int | open (file_t *filep) |
Handle an open of the device. More... | |
virtual int | close (file_t *filep) |
Handle a close of the device. More... | |
virtual ssize_t | read (file_t *filep, char *buffer, size_t buflen) |
Perform a read from the device. More... | |
virtual ssize_t | write (file_t *filep, const char *buffer, size_t buflen) |
Perform a write to the device. More... | |
virtual off_t | seek (file_t *filep, off_t offset, int whence) |
Perform a logical seek operation on the device. More... | |
virtual int | ioctl (file_t *filep, int cmd, unsigned long arg) |
Perform an ioctl operation on the device. More... | |
virtual int | poll (file_t *filep, px4_pollfd_struct_t *fds, bool setup) |
Perform a poll setup/teardown operation. More... | |
const char * | get_devname () const |
Get the device name. More... | |
Protected Attributes | |
ReadBuffer * | _read_buffer |
size_t | _remaining_partial = 0 |
size_t | _partial_start = 0 |
uint8_t | _partial_buffer [512] = {} |
Protected Attributes inherited from DevCommon | |
int | _fd = -1 |
uint16_t | _packet_len |
ParserState | _parser_state = ParserState::Idle |
bool | _had_data = false |
whether poll() returned available data More... | |
Protected Attributes inherited from cdev::CDev | |
px4_sem_t | _lock |
lock to protect access to all class members (also for derived classes) More... | |
Additional Inherited Members | |
Public Types inherited from DevCommon | |
enum | Operation { Read, Write } |
Protected Types inherited from DevCommon | |
enum | ParserState : uint8_t { ParserState::Idle = 0, ParserState::GotLength } |
Protected Member Functions inherited from DevCommon | |
virtual pollevent_t | poll_state (struct file *filp) |
void | lock (enum Operation op) |
void | unlock (enum Operation op) |
Protected Member Functions inherited from cdev::CDev | |
virtual pollevent_t | poll_state (file_t *filep) |
Check the current state of the device for poll events from the perspective of the file. More... | |
virtual void | poll_notify (pollevent_t events) |
Report new poll events. More... | |
virtual void | poll_notify_one (px4_pollfd_struct_t *fds, pollevent_t events) |
Internal implementation of poll_notify. More... | |
virtual int | open_first (file_t *filep) |
Notification of the first open. More... | |
virtual int | close_last (file_t *filep) |
Notification of the last close. More... | |
virtual int | register_class_devname (const char *class_devname) |
Register a class device name, automatically adding device class instance suffix if need be. More... | |
virtual int | unregister_class_devname (const char *class_devname, unsigned class_instance) |
Register a class device name, automatically adding device class instance suffix if need be. More... | |
void | lock () |
Take the driver lock. More... | |
void | unlock () |
Release the driver lock. More... | |
int | unregister_driver_and_memory () |
First, unregisters the driver. More... | |
Static Protected Attributes inherited from cdev::CDev | |
static const px4_file_operations_t | fops = {} |
Pointer to the default cdev file operations table; useful for registering clone devices etc. More... | |
Definition at line 229 of file protocol_splitter.cpp.
Mavlink2Dev::Mavlink2Dev | ( | ReadBuffer * | _read_buffer | ) |
Definition at line 245 of file protocol_splitter.cpp.
|
inlinevirtual |
Definition at line 233 of file protocol_splitter.cpp.
References file, cdev::CDev::read(), and cdev::CDev::write().
|
virtual |
Definition at line 251 of file protocol_splitter.cpp.
References DevCommon::_fd, DevCommon::_had_data, _partial_buffer, _partial_start, _read_buffer, _remaining_partial, ReadBuffer::buf_size, ReadBuffer::buffer, cdev::CDev::lock(), ReadBuffer::move(), ReadBuffer::read(), DevCommon::Read, and cdev::CDev::unlock().
Referenced by RtpsDev::~RtpsDev().
|
virtual |
Definition at line 343 of file protocol_splitter.cpp.
References DevCommon::_fd, DevCommon::_packet_len, DevCommon::_parser_state, DevCommon::GotLength, DevCommon::Idle, DevCommon::ioctl(), cdev::CDev::lock(), cdev::CDev::unlock(), and DevCommon::Write.
Referenced by RtpsDev::~RtpsDev().
|
protected |
Definition at line 242 of file protocol_splitter.cpp.
Referenced by read().
|
protected |
Definition at line 241 of file protocol_splitter.cpp.
Referenced by read().
|
protected |
Definition at line 239 of file protocol_splitter.cpp.
Referenced by read().
|
protected |
Definition at line 240 of file protocol_splitter.cpp.
Referenced by read().