OpenCores
URL https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [debugger/] [src/] [gui_plugin/] [gui_plugin.h] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 sergeykhbr
/*
2
 *  Copyright 2018 Sergey Khabarov, sergeykhbr@gmail.com
3
 *
4
 *  Licensed under the Apache License, Version 2.0 (the "License");
5
 *  you may not use this file except in compliance with the License.
6
 *  You may obtain a copy of the License at
7
 *
8
 *      http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 *  Unless required by applicable law or agreed to in writing, software
11
 *  distributed under the License is distributed on an "AS IS" BASIS,
12
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 *  See the License for the specific language governing permissions and
14
 *  limitations under the License.
15
 */
16
 
17
#ifndef __DEBUGGER_GUI_PLUGIN_H__
18
#define __DEBUGGER_GUI_PLUGIN_H__
19
 
20
#include "iclass.h"
21
#include "iservice.h"
22
#include "ihap.h"
23
#include "igui.h"
24
#include "async_tqueue.h"
25
#include "coreservices/ithread.h"
26
#include "coreservices/isocinfo.h"
27
#include "coreservices/icmdexec.h"
28
#include "MainWindow/DbgMainWindow.h"
29
#include "qt_wrapper.h"
30
 
31
namespace debugger {
32
 
33
class GuiPlugin : public IService,
34
                  public IThread,
35
                  public IHap,
36
                  public IGui {
37
public:
38
    GuiPlugin(const char *name);
39
    ~GuiPlugin();
40
 
41
    /** IService interface */
42
    virtual void postinitService();
43
 
44
    /** IHap */
45
    virtual void hapTriggered(IFace *isrc, EHapType type, const char *descr);
46
 
47
    /** IGui interface */
48
    virtual IService *getParentService();
49
    virtual IFace *getSocInfo();
50
    virtual const AttributeType *getpConfig();
51
    virtual void registerCommand(IGuiCmdHandler *src, AttributeType *cmd,
52
                                 bool silent);
53
    virtual void removeFromQueue(IFace *iface);
54
 
55
    /** IThread interface */
56
    virtual void stop();
57
protected:
58
    virtual void busyLoop();
59
 
60
private:
61
    bool processCmdQueue();
62
 
63
private:
64
    static const int CMD_QUEUE_SIZE = 128;
65
 
66
    AttributeType guiConfig_;
67
    AttributeType socInfo_;
68
    AttributeType cmdExecutor_;
69
 
70
    ISocInfo *info_;
71
    ICmdExecutor *iexec_;
72
    QtWrapper *ui_;
73
 
74
    GuiAsyncTQueueType queue_;
75
 
76
    event_def eventCommandAvailable_;
77
    event_def config_done_;
78
};
79
 
80
DECLARE_CLASS(GuiPlugin)
81
 
82
}  // namespace debugger
83
 
84 2 sergeykhbr
#endif  // __DEBUGGER_GUI_PLUGIN_H__

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.