mirror of https://github.com/AxioDL/jbus.git
Listener: Move port constants into cpp file
These are a complete internal detail, so we can hide them from the header entirely.
This commit is contained in:
parent
dff87c2c6a
commit
04ea97ac8e
|
@ -1,6 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
@ -20,9 +19,6 @@ class Listener {
|
||||||
std::queue<std::unique_ptr<Endpoint>> m_endpointQueue;
|
std::queue<std::unique_ptr<Endpoint>> m_endpointQueue;
|
||||||
bool m_running = false;
|
bool m_running = false;
|
||||||
|
|
||||||
static const uint32_t DataPort = 0xd6ba;
|
|
||||||
static const uint32_t ClockPort = 0xc10c;
|
|
||||||
|
|
||||||
void listenerProc();
|
void listenerProc();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include "jbus/Listener.hpp"
|
#include "jbus/Listener.hpp"
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#include "jbus/Common.hpp"
|
#include "jbus/Common.hpp"
|
||||||
#include "jbus/Endpoint.hpp"
|
#include "jbus/Endpoint.hpp"
|
||||||
|
|
||||||
|
@ -10,6 +12,8 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace jbus {
|
namespace jbus {
|
||||||
|
constexpr uint32_t DataPort = 0xd6ba;
|
||||||
|
constexpr uint32_t ClockPort = 0xc10c;
|
||||||
|
|
||||||
void Listener::listenerProc() {
|
void Listener::listenerProc() {
|
||||||
#if LOG_LISTENER
|
#if LOG_LISTENER
|
||||||
|
@ -29,7 +33,7 @@ void Listener::listenerProc() {
|
||||||
WaitGCTicks(GetGCTicksPerSec());
|
WaitGCTicks(GetGCTicksPerSec());
|
||||||
} else {
|
} else {
|
||||||
#if LOG_LISTENER
|
#if LOG_LISTENER
|
||||||
printf("data listening on port %d\n", DataPort);
|
printf("data listening on port %u\n", DataPort);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,7 +46,7 @@ void Listener::listenerProc() {
|
||||||
WaitGCTicks(GetGCTicksPerSec());
|
WaitGCTicks(GetGCTicksPerSec());
|
||||||
} else {
|
} else {
|
||||||
#if LOG_LISTENER
|
#if LOG_LISTENER
|
||||||
printf("clock listening on port %d\n", ClockPort);
|
printf("clock listening on port %u\n", ClockPort);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue