16#ifndef SIMICS_SYSTEMC_INJECTION_EXTENSION_INJECT_PCI_EXPRESS_H
17#define SIMICS_SYSTEMC_INJECTION_EXTENSION_INJECT_PCI_EXPRESS_H
19#if defined SIMICS_5_API || defined SIMICS_6_API
34template <
typename TPAYLOAD>
35class InjectPciExpress :
public InjectBase<TPAYLOAD> {
39 virtual
bool setValue(AttrDictParser *parser, const std::
string &key,
40 attr_value_t *attr, TPAYLOAD *gp) {
41 if (key ==
"send_message") {
42 AttrDictParser p = parser->init(attr);
43 std::vector<uint8_t> payload;
44 if (!p.lookUp(
"payload", &payload))
48 if (!p.lookUp(
"type", &type))
51 ExtensionSetter<TPAYLOAD, iface::PciExpressExtension>(gp)
52 ->send_message(type, payload);
#define ATTR_DICT_PARSER_NAMESPACE(ns)
Definition: attr_dict_parser.h:34
Definition: pci_bus_interface.h:24