template <>
class WireServer
Defined at line 3312 of file fidling/gen/src/lib/fake-clock/fidl/fidl/cpp/fidl/fuchsia.testing/cpp/wire_messaging.h
Pure-virtual interface to be implemented by a server.
This interface uses typed channels (i.e. |::fidl::ClientEnd
<
::fuchsia_testing::FakeClockControl>|
and |::fidl::ServerEnd
<
::fuchsia_testing::FakeClockControl>|).
Public Methods
void Advance (::fuchsia_testing::wire::FakeClockControlAdvanceRequest * request, AdvanceCompleter::Sync & completer)
Advances the fake clock `increment` once. This advances both monotonic and boot clocks by
the same amount.
Returns `ZX_ERR_INVALID_ARGS` if the provided `increment` is invalid (such as a badly formed
RandomRange). Returns `ZX_ERR_ACCESS_DENIED` if called while the FakeClock is free-running.
void IncrementMonoToBootOffsetBy (::fuchsia_testing::wire::FakeClockControlIncrementMonoToBootOffsetByRequest * request, IncrementMonoToBootOffsetByCompleter::Sync & completer)
Increments the mono-to-boot offset by the given `increment`. With real
clocks, the positive offset from monotonic clock to boot clock increases
during suspend. Here, this method fakes such an increase in offset.
`increment` must be a positive duration.
Returns `ZX_ERR_INVALID_ARGS` if the provided `increment` is not positive.
void ResumeWithIncrements (::fuchsia_testing::wire::FakeClockControlResumeWithIncrementsRequest * request, ResumeWithIncrementsCompleter::Sync & completer)
Resumes free-running increments on the fake clock.
`real` is the period based on the real monotonic clock over which `increment` is going to be
applied. Returns `ZX_ERR_INVALID_ARGS` if the provided `increment` is invalid (such as a
badly formed RandomRange).
void AddStopPoint (::fuchsia_testing::wire::FakeClockControlAddStopPointRequest * request, AddStopPointCompleter::Sync & completer)
Registers interest in a deadline event.
`deadline_id` and `event_type` identify the named deadline and the event associated with
the deadline. When the event occurs, FakeClock will signal `EVENTPAIR_SIGNALED` on
`on_stop`. If time is free-running, the clock is stopped. Closing the eventpair cancels
interest in the deadline. If the eventpair is closed when a deadline is reached, time is
not stopped. Note that only events that occur after `AddStopPoint` is called are matched.
In addition, the `EXPIRED` event is always reported, even if the component that created the
deadline does not act on the deadline expiration.
The intended use is to set a stop point using `AddStopPoint`, resume running time with
`ResumeWithIncrements`, then wait for the stop point to occur using the `on_stop`
eventpair.
Setting a stop point is only allowed while time is stopped. If time is free running when
this method is invoked `ZX_ERR_ACCESS_DENIED` is returned. If a stop point is already
registered for the same event, `ZX_ALREADY_BOUND` is returned.
void Pause (PauseCompleter::Sync & completer)
Pauses free-running increments on the fake clock.
void IgnoreNamedDeadline (::fuchsia_testing::wire::FakeClockControlIgnoreNamedDeadlineRequest * request, IgnoreNamedDeadlineCompleter::Sync & completer)
Instructs the fake clock to make deadlines named `deadline_id` never expire.
This is a no-op if `deadline_id` is already in the ignored set.
void WireServer ()
Defined at line 3315 of file fidling/gen/src/lib/fake-clock/fidl/fidl/cpp/fidl/fuchsia.testing/cpp/wire_messaging.h
Handler bind_handler (async_dispatcher_t * dispatcher)
|bind_handler| returns a handler that binds incoming connections to this
server implementation.
The returned handler borrows the server instance.
The server must outlive the provided |dispatcher|. Only after
the dispatcher is shutdown will it be safe to destroy the servers.
The server should not be moved.
void ~WireServer ()
Defined at line 3316 of file fidling/gen/src/lib/fake-clock/fidl/fidl/cpp/fidl/fuchsia.testing/cpp/wire_messaging.h