1
0
forked from ROMEO/nexosim

34 Commits

Author SHA1 Message Date
Serge Barral
1be2f48a00 Revert "Merge pull request #12 from asynchronics/feature/event-sinks"
This reverts commit 7e881afb638ccc0dbcfc7b539fc152dc923d63e1, reversing
changes made to 9d78e4f72a4c6ff459fc386b2f25beae40b94429.
2024-03-06 16:16:55 +01:00
Serge Barral
43e41012d2
Merge pull request #15 from us-irs/feature/clock-send-bound
Add send bound for Clock trait
2024-03-06 14:48:30 +01:00
47af3455ff
Add send bound for Clock trait 2024-03-06 12:27:34 +01:00
Serge Barral
7e881afb63
Merge pull request #12 from asynchronics/feature/event-sinks
Small changes and cleanups to prepare the RPC work.

Apart from some internal refactoring, this PR introduces improved `EventSlot` and `EventQueue` (the later was renamed from `EventStream`) which can be connected to several outputs at the same time. They are now unified under the common `EventSink` public trait. The new `Output::connect_sink` replaces and generalizes the former `Output::connect_slot` and `Output::connect_stream` to any type implementing `EventSink`.
2024-02-19 13:47:18 +01:00
Serge Barral
863f995f1b Small changes and cleanups to prepare the RPC work 2024-02-19 13:20:02 +01:00
Serge Barral
9d78e4f72a
Merge pull request #9 from asynchronics/feature/clock
Add support for custom/real-time clocks
2023-08-29 12:58:03 +02:00
Serge Barral
41a38445ee Correct minor typos 2023-08-29 12:56:57 +02:00
Serge Barral
ef703f5b7e Add support for custom/real-time clocks 2023-08-29 12:46:40 +02:00
Serge Barral
fe3fd372e7 Prepare release v0.2.0 2023-08-15 17:16:16 +02:00
Serge Barral
f6808adaf9 Mark EventKey as must_use 2023-08-15 16:07:17 +02:00
Serge Barral
e31597b14d
Merge pull request #7 from asynchronics/feature/schedule-fn-overloading
Overload `schedule_*event` methods
2023-08-14 15:58:05 +02:00
Serge Barral
22516fe190 Overload schedule_*event methods
The `schedule_*event_in` and `schedule_*event_at` pairs of methods are
each merged into a single overloaded method accepting either a relative
`Duration`or an absolute `MonotonicTime`.
2023-08-14 15:47:08 +02:00
Serge Barral
a036630c4e
Merge pull request #6 from asynchronics/feature/periodic-events
Feature/periodic events
2023-08-14 14:23:44 +02:00
Serge Barral
6ffa685c90 Exclude non-loom test when asynchronix_loom set 2023-08-14 14:18:46 +02:00
Serge Barral
484b74b3ec Add tests for periodic/key events 2023-08-14 12:31:35 +02:00
Serge Barral
b0f7e69039 Implement periodic events 2023-07-28 16:18:10 +02:00
Serge Barral
f6c714937a Update leap second data 2023-07-28 16:16:01 +02:00
Serge Barral
7c52f4b8b5
Merge pull request #5 from asynchronics/feature/better-event-cancellation
Feature/better event cancellation
2023-07-21 14:52:21 +02:00
Serge Barral
aeb243d3ec Simplify priority queue implementation
Following to the modification of the event cancellation logic, the
simulator no longer needs to remove key-value pairs from the priority
queue. For this reason, a standard binary heap can now be used.
2023-07-21 14:23:26 +02:00
Serge Barral
f458377308 Make it possible to cancel current-time events
This is a pretty large patch that impacts the API.

Until now, it was not possible to cancel events that were scheduled for
the current simulation time slice, making it necessary for the user to
use complex workarounds (see former version of the espresso machine
example).

The new implementation makes this possible but the generation of a key
associated to an event has now a non-negligible cost (basicaly it
creates three references to an Arc). For this reason, the API now
defaults to NOT creating a key, and new methods were added for
situations when the event may need to be cancelled and a key is
necessary.

See the much simplified implementation of the espresso machine example
for a motivating case.
2023-07-21 14:23:20 +02:00
Serge Barral
045dea509c Minor doc fixes 2023-07-17 14:58:52 +02:00
Serge Barral
1fcb7e181c Satisfy newest clippy 2023-07-16 16:40:41 +02:00
Serge Barral
3fcb05eae9 Replace event module by async-event crate 2023-07-16 16:37:40 +02:00
Serge Barral
0bcecbfdc2 Small README fixes 2023-01-16 23:15:47 +01:00
Serge Barral
31520d461a First release candidate for v0.1.0 2023-01-16 23:05:46 +01:00
Serge Barral
fe00ee0743 Remove unmaintained action-rs GH actions in CI 2022-11-04 15:16:03 +01:00
Serge Barral
835dd5ea8e Fix bug introduced during refactoring 2022-10-22 17:56:02 +02:00
Serge Barral
d2cfbcfa34 Replace the Parker crate by crossbeam_utils 2022-10-18 12:20:02 +02:00
Serge Barral
c3ca7fc0e1 Add comments + minor renaming 2022-10-18 11:36:07 +02:00
Serge Barral
eba882b4b1 Refactor code 2022-10-18 09:50:22 +02:00
Serge Barral
abab030b4a Restrict visibility of many items to super 2022-10-17 12:29:26 +02:00
Serge Barral
b009f4481e Deactivate worker only after global queue re-check 2022-10-16 12:16:01 +02:00
Serge Barral
77e992da4a Remove temporary loom test committed by error 2022-10-16 12:06:07 +02:00
Serge Barral
5c94ec6a65 First public commit 2022-10-12 05:33:16 +02:00