1 /* Copyright (c) 2010-2018. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #ifndef INSTR_PAJE_EVENTS_HPP
7 #define INSTR_PAJE_EVENTS_HPP
9 #include "src/instr/instr_private.hpp"
18 enum e_event_type : unsigned int {
19 PAJE_DefineContainerType,
20 PAJE_DefineVariableType,
24 PAJE_DefineEntityValue,
26 PAJE_DestroyContainer,
40 Container* container_;
43 Container* getContainer() { return container_; }
46 e_event_type eventType_;
47 std::stringstream stream_;
49 PajeEvent(Container* container, Type* type, double timestamp, e_event_type eventType);
50 virtual ~PajeEvent() = default;
51 virtual void print() = 0;
52 void insertIntoBuffer();
55 class VariableEvent : public PajeEvent {
59 VariableEvent(double timestamp, Container* container, Type* type, e_event_type event_type, double value)
60 : PajeEvent::PajeEvent(container, type, timestamp, event_type), value(value)
63 void print() override;
66 class StateEvent : public PajeEvent {
68 std::string filename = "(null)";
73 StateEvent(Container* container, Type* type, e_event_type event_type, EntityValue* value, TIData* extra);
74 void print() override;
77 class LinkEvent : public PajeEvent {
84 LinkEvent(Container* container, Type* type, e_event_type event_type, Container* sourceContainer, std::string value,
85 std::string key, int size)
86 : PajeEvent(container, type, SIMIX_get_clock(), event_type)
87 , endpoint_(sourceContainer)
93 void print() override;
96 class NewEvent : public PajeEvent {
100 NewEvent(double timestamp, Container* container, Type* type, EntityValue* value)
101 : simgrid::instr::PajeEvent::PajeEvent(container, type, timestamp, PAJE_NewEvent), value(value)
104 void print() override;