adevs
Public Member Functions | Protected Member Functions | List of all members
adevs::QemuSerialPort Class Reference

#include <adevs_qemu.h>

Inheritance diagram for adevs::QemuSerialPort:
adevs::QemuDeviceModel

Public Member Functions

void append_qemu_arguments (std::vector< std::string > &args)
 
void write_bytes (void *data, int num_bytes)
 
- Public Member Functions inherited from adevs::QemuDeviceModel
int num_bytes_to_read ()
 
void read_bytes (void *buf)
 
virtual ~QemuDeviceModel ()
 Destructor.
 
 QemuDeviceModel ()
 Constructor.
 
void read_loop ()
 Called by the reading thread to execute the read loop.
 
void init_func ()
 

Protected Member Functions

io_bufferread ()
 
void initialize_io_structures ()
 
- Protected Member Functions inherited from adevs::QemuDeviceModel
void start ()
 

Detailed Description

A model of a serial port. This will connect to a QEMU serial port emulator that sends and receives data via a unix domain socket.

Member Function Documentation

void adevs::QemuSerialPort::append_qemu_arguments ( std::vector< std::string > &  args)
virtual

The device may append arguments to the qemu command line by appending them to this vector. Distinct elements in the vector will be separated by a space on the command line. This method should called by the simulator prior to forking qemu.

Implements adevs::QemuDeviceModel.

void adevs::QemuSerialPort::write_bytes ( void *  data,
int  num_bytes 
)
virtual

Cause data to arrive at the external, physical port. This call will block if the corresponding write to the underlying file descriptor blocks.

Parameters
dataData buffer to copy to device
num_bytesNumber of bytes to copy

Implements adevs::QemuDeviceModel.


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