gem5 v24.0.0.0
|
#include <vncinput.hh>
Classes | |
struct | ClientCutTextMessage |
struct | FrameBufferUpdateReq |
struct | KeyEventMessage |
struct | PixelEncodingsMessage |
struct | PixelFormat |
struct | PixelFormatMessage |
struct | PointerEventMessage |
Public Types | |
enum | ClientMessages { ClientSetPixelFormat = 0 , ClientSetEncodings = 2 , ClientFrameBufferUpdate = 3 , ClientKeyEvent = 4 , ClientPointerEvent = 5 , ClientCutText = 6 } |
Client -> Server message IDs. More... | |
typedef VncInputParams | Params |
Public Types inherited from gem5::SimObject | |
typedef SimObjectParams | Params |
Public Member Functions | |
VncInput (const Params &p) | |
virtual void | setFrameBuffer (const FrameBuffer *rfb) |
Set the address of the frame buffer we are going to show. | |
void | setKeyboard (VncKeyboard *_keyboard) |
Set up the device that would like to receive notifications when keys are pressed in the vnc client keyboard. | |
void | setMouse (VncMouse *_mouse) |
Setup the device that would like to receive notifications when mouse movements or button presses are received from the vnc client. | |
uint16_t | videoWidth () const |
What is the width of the screen we're displaying. | |
uint16_t | videoHeight () const |
What is the height of the screen we're displaying. | |
virtual void | setDirty () |
The frame buffer uses this call to notify the vnc server that the frame buffer has been updated and a new image needs to be sent to the client. | |
Public Member Functions inherited from gem5::SimObject | |
const Params & | params () const |
SimObject (const Params &p) | |
virtual | ~SimObject () |
virtual void | init () |
init() is called after all C++ SimObjects have been created and all ports are connected. | |
virtual void | loadState (CheckpointIn &cp) |
loadState() is called on each SimObject when restoring from a checkpoint. | |
virtual void | initState () |
initState() is called on each SimObject when not restoring from a checkpoint. | |
virtual void | regProbePoints () |
Register probe points for this object. | |
virtual void | regProbeListeners () |
Register probe listeners for this object. | |
ProbeManager * | getProbeManager () |
Get the probe manager for this object. | |
virtual Port & | getPort (const std::string &if_name, PortID idx=InvalidPortID) |
Get a port with a given name and index. | |
virtual void | startup () |
startup() is the final initialization call before simulation. | |
DrainState | drain () override |
Provide a default implementation of the drain interface for objects that don't need draining. | |
virtual void | memWriteback () |
Write back dirty buffers to memory using functional writes. | |
virtual void | memInvalidate () |
Invalidate the contents of memory buffers. | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
Public Member Functions inherited from gem5::EventManager | |
EventQueue * | eventQueue () const |
void | schedule (Event &event, Tick when) |
void | deschedule (Event &event) |
void | reschedule (Event &event, Tick when, bool always=false) |
void | schedule (Event *event, Tick when) |
void | deschedule (Event *event) |
void | reschedule (Event *event, Tick when, bool always=false) |
void | wakeupEventQueue (Tick when=(Tick) -1) |
This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers. | |
void | setCurTick (Tick newVal) |
EventManager (EventManager &em) | |
Event manger manages events in the event queue. | |
EventManager (EventManager *em) | |
EventManager (EventQueue *eq) | |
Public Member Functions inherited from gem5::Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Public Member Functions inherited from gem5::Drainable | |
DrainState | drainState () const |
Return the current drain state of an object. | |
virtual void | notifyFork () |
Notify a child process of a fork. | |
Public Member Functions inherited from gem5::statistics::Group | |
Group (Group *parent, const char *name=nullptr) | |
Construct a new statistics group. | |
virtual | ~Group () |
virtual void | regStats () |
Callback to set stat parameters. | |
virtual void | resetStats () |
Callback to reset stats. | |
virtual void | preDumpStats () |
Callback before stats are dumped. | |
void | addStat (statistics::Info *info) |
Register a stat with this group. | |
const std::map< std::string, Group * > & | getStatGroups () const |
Get all child groups associated with this object. | |
const std::vector< Info * > & | getStats () const |
Get all stats associated with this object. | |
void | addStatGroup (const char *name, Group *block) |
Add a stat block as a child of this block. | |
const Info * | resolveStat (std::string name) const |
Resolve a stat by its name within this group. | |
void | mergeStatGroup (Group *block) |
Merge the contents (stats & children) of a block to this block. | |
Group ()=delete | |
Group (const Group &)=delete | |
Group & | operator= (const Group &)=delete |
Public Member Functions inherited from gem5::Named | |
Named (const std::string &name_) | |
virtual | ~Named ()=default |
virtual std::string | name () const |
Protected Member Functions | |
virtual void | frameBufferResized () |
void | captureFrameBuffer () |
Captures the current frame buffer to a file. | |
Protected Member Functions inherited from gem5::Drainable | |
Drainable () | |
virtual | ~Drainable () |
virtual void | drainResume () |
Resume execution after a successful drain. | |
void | signalDrainDone () const |
Signal that an object is drained. | |
Protected Attributes | |
VncKeyboard * | keyboard |
The device to notify when we get key events. | |
VncMouse * | mouse |
The device to notify when we get mouse events. | |
const FrameBuffer * | fb |
pointer to the actual data that is stored in the frame buffer device | |
uint16_t | _videoWidth |
the width of the frame buffer we are sending to the client | |
uint16_t | _videoHeight |
the height of the frame buffer we are sending to the client | |
bool | captureEnabled |
Flag indicating whether to capture snapshots of frame buffer or not. | |
int | captureCurrentFrame |
Current frame number being captured to a file. | |
OutputDirectory * | captureOutputDirectory |
Directory to store captured frames to. | |
uint64_t | captureLastHash |
Computed hash of the last captured frame. | |
std::unique_ptr< ImgWriter > | captureImage |
Cached ImgWriter object for writing out frame buffers to file. | |
enums::ImageFormat | imgFormat |
image format | |
Protected Attributes inherited from gem5::SimObject | |
const SimObjectParams & | _params |
Cached copy of the object parameters. | |
Protected Attributes inherited from gem5::EventManager | |
EventQueue * | eventq |
A pointer to this object's event queue. | |
Additional Inherited Members | |
Static Public Member Functions inherited from gem5::SimObject | |
static void | serializeAll (const std::string &cpt_dir) |
Create a checkpoint by serializing all SimObjects in the system. | |
static SimObject * | find (const char *name) |
Find the SimObject with the given name and return a pointer to it. | |
static void | setSimObjectResolver (SimObjectResolver *resolver) |
There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. | |
static SimObjectResolver * | getSimObjectResolver () |
There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. | |
Static Public Member Functions inherited from gem5::Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. | |
static void | generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
Generate a checkpoint file so that the serialization can be routed to it. | |
Definition at line 89 of file vncinput.hh.
typedef VncInputParams gem5::VncInput::Params |
Definition at line 166 of file vncinput.hh.
Client -> Server message IDs.
Enumerator | |
---|---|
ClientSetPixelFormat | |
ClientSetEncodings | |
ClientFrameBufferUpdate | |
ClientKeyEvent | |
ClientPointerEvent | |
ClientCutText |
Definition at line 94 of file vncinput.hh.
gem5::VncInput::VncInput | ( | const Params & | p | ) |
Definition at line 55 of file vncinput.cc.
References captureEnabled, captureOutputDirectory, gem5::OutputDirectory::createSubdirectory(), gem5::Named::name(), gem5::OutputDirectory::remove(), and gem5::simout.
|
protected |
Captures the current frame buffer to a file.
Definition at line 113 of file vncinput.cc.
References captureCurrentFrame, captureImage, captureLastHash, captureOutputDirectory, gem5::OutputDirectory::close(), gem5::OutputDirectory::create(), gem5::curTick(), fb, gem5::FrameBuffer::getHash(), and gem5::OutputStream::stream().
Referenced by setDirty().
|
inlineprotectedvirtual |
Reimplemented in gem5::VncServer.
Definition at line 209 of file vncinput.hh.
Referenced by setDirty().
|
virtual |
The frame buffer uses this call to notify the vnc server that the frame buffer has been updated and a new image needs to be sent to the client.
Reimplemented in gem5::VncServer.
Definition at line 93 of file vncinput.cc.
References _videoHeight, _videoWidth, captureEnabled, captureFrameBuffer(), DPRINTF, fb, frameBufferResized(), gem5::FrameBuffer::height(), gem5::ArmISA::width, and gem5::FrameBuffer::width().
Referenced by gem5::Pl111::dmaDone(), gem5::HDLcd::drainResume(), gem5::HDLcd::pxlFrameDone(), gem5::VncServer::setDirty(), setFrameBuffer(), and gem5::Pl111::unserialize().
|
virtual |
Set the address of the frame buffer we are going to show.
To avoid copying, just have the display controller tell us where the data is instead of constanly copying it around
rfb | frame buffer that we're going to use |
Definition at line 74 of file vncinput.cc.
References captureEnabled, captureImage, gem5::createImgWriter(), fb, imgFormat, panic, and setDirty().
Referenced by gem5::Pl111::updateVideoParams().
|
inline |
Set up the device that would like to receive notifications when keys are pressed in the vnc client keyboard.
_keyboard | an object that derrives from VncKeyboard |
Definition at line 180 of file vncinput.hh.
References keyboard.
|
inline |
Setup the device that would like to receive notifications when mouse movements or button presses are received from the vnc client.
_mouse | an object that derrives from VncMouse |
Definition at line 186 of file vncinput.hh.
References mouse.
Referenced by gem5::ps2::TouchKit::TouchKit().
|
inline |
What is the height of the screen we're displaying.
This is used for pointer/tablet devices that need to know to calculate the correct value to send to the device driver.
Definition at line 200 of file vncinput.hh.
References _videoHeight.
Referenced by gem5::ps2::TouchKit::mouseAt(), gem5::VncServer::sendFrameBufferResized(), gem5::VncServer::sendFrameBufferUpdate(), and gem5::VncServer::sendServerInit().
|
inline |
What is the width of the screen we're displaying.
This is used for pointer/tablet devices that need to know to calculate the correct value to send to the device driver.
Definition at line 193 of file vncinput.hh.
References _videoWidth.
Referenced by gem5::ps2::TouchKit::mouseAt(), gem5::VncServer::sendFrameBufferResized(), gem5::VncServer::sendFrameBufferUpdate(), and gem5::VncServer::sendServerInit().
|
protected |
the height of the frame buffer we are sending to the client
Definition at line 224 of file vncinput.hh.
Referenced by setDirty(), and videoHeight().
|
protected |
the width of the frame buffer we are sending to the client
Definition at line 221 of file vncinput.hh.
Referenced by setDirty(), and videoWidth().
|
protected |
Current frame number being captured to a file.
Definition at line 230 of file vncinput.hh.
Referenced by captureFrameBuffer().
|
protected |
Flag indicating whether to capture snapshots of frame buffer or not.
Definition at line 227 of file vncinput.hh.
Referenced by setDirty(), setFrameBuffer(), and VncInput().
|
protected |
Cached ImgWriter object for writing out frame buffers to file.
Definition at line 239 of file vncinput.hh.
Referenced by captureFrameBuffer(), and setFrameBuffer().
|
protected |
Computed hash of the last captured frame.
Definition at line 236 of file vncinput.hh.
Referenced by captureFrameBuffer().
|
protected |
Directory to store captured frames to.
Definition at line 233 of file vncinput.hh.
Referenced by captureFrameBuffer(), and VncInput().
|
protected |
pointer to the actual data that is stored in the frame buffer device
Definition at line 218 of file vncinput.hh.
Referenced by captureFrameBuffer(), gem5::VncServer::sendFrameBufferResized(), gem5::VncServer::sendFrameBufferUpdate(), setDirty(), and setFrameBuffer().
|
protected |
|
protected |
The device to notify when we get key events.
Definition at line 212 of file vncinput.hh.
Referenced by gem5::VncServer::recvKeyboardInput(), and setKeyboard().
|
protected |
The device to notify when we get mouse events.
Definition at line 215 of file vncinput.hh.
Referenced by gem5::VncServer::recvPointerInput(), and setMouse().