2022-06-11 23:01:27 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
2022-12-17 20:14:19 +00:00
|
|
|
File: AuIOWaitableIOLoopSource.hpp
|
2022-06-11 23:01:27 +00:00
|
|
|
Date: 2022-6-6
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Aurora::IO
|
|
|
|
{
|
|
|
|
struct IOWatachableIOLoopSource : IIOWatachableIOLoopSource
|
|
|
|
{
|
2022-12-17 20:14:19 +00:00
|
|
|
IOWatachableIOLoopSource(const AuSPtr<Loop::ILoopSource>&pSource);
|
|
|
|
IOWatachableIOLoopSource(const AuSPtr<Loop::ILoopSource>&pSource, AuUInt32 ioTimeoutMS);
|
2022-06-11 23:01:27 +00:00
|
|
|
|
|
|
|
bool IsRunOnOtherTick() override;
|
|
|
|
bool IsRunOnTick() override;
|
|
|
|
|
|
|
|
bool CanRequestTick() override;
|
|
|
|
void OnReportPumper(const AuSPtr<IIOProcessorManualInvoker> &iface) override;
|
|
|
|
|
|
|
|
bool IsRunOnSelfIO() override;
|
|
|
|
AuSPtr<Loop::ILoopSource> GetSelfIOSource() override;
|
|
|
|
|
|
|
|
bool ApplyRateLimit() override;
|
|
|
|
|
2022-06-28 14:57:29 +00:00
|
|
|
AuUInt32 IOTimeoutInMS() override;
|
2022-06-11 23:01:27 +00:00
|
|
|
AuSPtr<Loop::ILoopSource> GetLoopSource() override;
|
2022-12-17 20:14:19 +00:00
|
|
|
AuSPtr<Loop::ILoopSource> SetLoopSource(const AuSPtr<Loop::ILoopSource> &pSource) override;
|
2022-06-11 23:01:27 +00:00
|
|
|
bool IsRunOnSelfIOCheckedOnTimerTick() override;
|
|
|
|
|
2022-12-17 20:14:19 +00:00
|
|
|
AuSPtr<Loop::ILoopSource> pSource;
|
|
|
|
AuUInt32 dwIoTimeoutMS{};
|
2022-06-11 23:01:27 +00:00
|
|
|
};
|
|
|
|
}
|