---
title: llarp/tooling/router_event.hpp

---

# llarp/tooling/router_event.hpp



## Namespaces

| Name           |
| -------------- |
| **[llarp](Namespaces/namespacellarp.md)** <br>[crypto.hpp] |
| **[llarp::path](Namespaces/namespacellarp_1_1path.md)**  |
| **[tooling](Namespaces/namespacetooling.md)**  |

## Classes

|                | Name           |
| -------------- | -------------- |
| struct | **[tooling::RouterEvent](Classes/structtooling_1_1RouterEvent.md)**  |




## Source code

```cpp
#pragma once

#include <llarp/router_id.hpp>

#include <string>
#include <vector>
#include <memory>

namespace llarp
{
  struct PathID_t;

  namespace path
  {
    struct Path;
    struct PathHopConfig;

    struct TransitHop;

  }  // namespace path

}  // namespace llarp

namespace tooling
{
  struct RouterHive;

  struct RouterEvent
  {
    RouterEvent(std::string eventType, llarp::RouterID routerID, bool triggered)
        : eventType(eventType), routerID(routerID), triggered(triggered)
    {}

    virtual ~RouterEvent() = default;

    virtual std::string
    ToString() const
    {
      std::string result;
      result += eventType;
      result += " [";
      result += routerID.ShortString();
      result += "] -- ";
      return result;
    }

    const std::string eventType;

    llarp::RouterID routerID;

    bool triggered = false;
  };

  using RouterEventPtr = std::unique_ptr<RouterEvent>;

}  // namespace tooling
```


-------------------------------

Updated on 2023-01-27 at 23:09:26 +0000
