SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
provider_controller_simics_adapter.h
Go to the documentation of this file.
1// -*- mode: C++; c-file-style: "virtutech-c++" -*-
2
3/*
4 © 2016 Intel Corporation
5
6 This software and the related documents are Intel copyrighted materials, and
7 your use of them is governed by the express license under which they were
8 provided to you ("License"). Unless the License provides otherwise, you may
9 not use, modify, copy, publish, distribute, disclose or transmit this software
10 or the related documents without Intel's prior written permission.
11
12 This software and the related documents are provided as is, with no express or
13 implied warranties, other than those that are expressly stated in the License.
14*/
15
16#ifndef SIMICS_SYSTEMC_IFACE_INSTRUMENTATION_PROVIDER_CONTROLLER_SIMICS_ADAPTER_H
17#define SIMICS_SYSTEMC_IFACE_INSTRUMENTATION_PROVIDER_CONTROLLER_SIMICS_ADAPTER_H
18
21#include <systemc-provider-interfaces.h>
22#include <systemc>
23
24#include <string>
25#include <vector>
26
28
29namespace simics {
30namespace systemc {
31namespace iface {
32namespace instrumentation {
33
34template<typename TBase, typename TInterface = ProviderControllerInterface>
36 : public SimicsAdapter<sc_provider_controller_interface_t> {
37 public:
39 : SimicsAdapter<sc_provider_controller_interface_t>(
40 SC_PROVIDER_CONTROLLER_INTERFACE, init_iface()) {
41 }
42
43 protected:
44 static bool insert(conf_object_t *obj, conf_object_t *conn, int pos) {
45 return adapter<TBase, TInterface>(obj)->insert(static_cast<
47 SIM_object_data(conn)), pos);
48 }
49 static void remove(conf_object_t *obj, conf_object_t *conn) {
50 adapter<TBase, TInterface>(obj)->remove(static_cast<
52 SIM_object_data(conn)));
53 }
54
55 private:
56 std::vector<std::string> description(conf_object_t *obj,
57 DescriptionType type) {
58 return descriptionBase<TBase, TInterface>(obj, type);
59 }
60 sc_provider_controller_interface_t init_iface() {
61 sc_provider_controller_interface_t iface = {};
62 iface.insert = insert;
63 iface.remove = remove;
64 return iface;
65 }
66};
67
68} // namespace instrumentation
69} // namespace iface
70} // namespace systemc
71} // namespace simics
72
73#endif
Base class for mapping Simics interface to a C++ interface.
Definition: simics_adapter.h:47
Definition: provider_controller_simics_adapter.h:36
ProviderControllerSimicsAdapter()
Definition: provider_controller_simics_adapter.h:38
static void remove(conf_object_t *obj, conf_object_t *conn)
Definition: provider_controller_simics_adapter.h:49
static bool insert(conf_object_t *obj, conf_object_t *conn, int pos)
Definition: provider_controller_simics_adapter.h:44
Definition: tool_connection_interface.h:29
DescriptionType
Definition: description_interface.h:25
Definition: pci_bus_interface.h:24