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