SST  15.1.0
StructuralSimulationToolkit
coreTest_ComponentEvent.h
1 // Copyright 2009-2025 NTESS. Under the terms
2 // of Contract DE-NA0003525 with NTESS, the U.S.
3 // Government retains certain rights in this software.
4 //
5 // Copyright (c) 2009-2025, NTESS
6 // All rights reserved.
7 //
8 // This file is part of the SST software package. For license
9 // information, see the LICENSE file in the top level directory of the
10 // distribution.
11 
12 #ifndef SST_CORE_CORETEST_COMPONENTEVENT_H
13 #define SST_CORE_CORETEST_COMPONENTEVENT_H
14 
15 #include <vector>
16 
17 namespace SST::CoreTestComponent {
18 
20 {
21 public:
22  using dataVec = std::vector<char>;
24  SST::Event()
25  {}
26  dataVec payload;
28 
29  void setId() { id = generateUniqueId(); }
30 
31  void serialize_order(SST::Core::Serialization::serializer& ser) override
32  {
33  Event::serialize_order(ser);
34  SST_SER(payload);
35  SST_SER(id);
36  }
37 
39 };
40 
41 } // namespace SST::CoreTestComponent
42 
43 #endif // SST_CORE_CORETEST_COMPONENTEVENT_H
Definition: coreTest_Component.h:22
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:42
id_type generateUniqueId()
Generates an ID that is unique across ranks, components and events.
Definition: event.cc:43
std::pair< uint64_t, int > id_type
Type definition of unique identifiers.
Definition: event.h:103
Definition: coreTest_ComponentEvent.h:19
static const id_type NO_ID
Constant, default value for id_types.
Definition: event.h:105
Base class for Events - Items sent across links to communicate between components.
Definition: event.h:40