quic/qbox
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QemuTargetSignalSocket Class Reference

A QEMU input GPIO exposed as a TargetSignalSocket<bool> More...

#include <qemu-target-signal-socket.h>

Inheritance diagram for QemuTargetSignalSocket:
Inheritance graph
[legend]
Collaboration diagram for QemuTargetSignalSocket:
Collaboration graph
[legend]

Public Member Functions

 QemuTargetSignalSocket (const char *name)
 
void init (qemu::Device dev, int gpio_idx)
 Initialize this socket with a device and a GPIO index.
 
void init_named (qemu::Device dev, const char *gpio_name, int gpio_idx)
 Initialize this socket with a device, a GPIO namespace, and a GPIO index.
 
qemu::Gpio get_gpio ()
 Returns the GPIO wrapped by this socket.
 
void notify ()
 Force a notification on the default event.
 
- Public Member Functions inherited from TargetSignalSocket< bool >
 TargetSignalSocket (const char *name)
 
void register_value_changed_cb (const ValueChangedCallback &cb)
 
const boolread () const
 

Protected Member Functions

void value_changed_cb (const bool &val)
 
void init_with_gpio (qemu::Gpio gpio)
 

Protected Attributes

qemu::Gpio m_gpio_in
 
- Protected Attributes inherited from TargetSignalSocket< bool >
TargetSignalSocketProxy< boolm_proxy
 

Additional Inherited Members

- Public Types inherited from TargetSignalSocket< bool >
using Iface = typename TargetSignalSocketProxy< bool >::Iface
 
using Parent = sc_core::sc_export< Iface >
 
using ValueChangedCallback = typename TargetSignalSocketProxy< bool >::ValueChangedCallback
 

Detailed Description

A QEMU input GPIO exposed as a TargetSignalSocket<bool>

This class exposes an input GPIO of a QEMU device as a TargetSignalSocket<bool>. It can be connected to an sc_core::sc_port<bool> or a TargetInitiatorSocket<bool>. Modifications to this socket will be reported to the wrapped GPIO.

Member Function Documentation

◆ get_gpio()

qemu::Gpio QemuTargetSignalSocket::get_gpio ( )
inline

Returns the GPIO wrapped by this socket.

Returns
the GPIO wrapped by this socket

◆ init()

void QemuTargetSignalSocket::init ( qemu::Device  dev,
int  gpio_idx 
)
inline

Initialize this socket with a device and a GPIO index.

This method initializes the socket using the given QEMU device and the corresponding GPIO index in this device. See the QEMU API and the device you want to wrap to know what index to use here.

Parameters
[in]devThe QEMU device
[in]gpio_idxThe GPIO index within the device

◆ init_named()

void QemuTargetSignalSocket::init_named ( qemu::Device  dev,
const char gpio_name,
int  gpio_idx 
)
inline

Initialize this socket with a device, a GPIO namespace, and a GPIO index.

This method initializes the socket using the given QEMU device and the corresponding GPIO (namespace, index) pair in this device. See the QEMU API and the device you want to wrap to know what namespace/index to use here.

Parameters
[in]devThe QEMU device
[in]gpio_nameThe GPIO namespace within the device
[in]gpio_idxThe GPIO index within the device

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