1
0
forked from ROMEO/nexosim
Commit Graph

52 Commits

Author SHA1 Message Date
6e3d5bb132 Change scheduler interface and add external inputs example.
Relevant for issue #13.
2024-08-02 14:06:49 +02:00
a6a2c85129 Merge pull request #29 from asynchronics/feature/grpc-init-parameters
Accept an arbitrary argument for remote init
2024-07-31 16:00:29 +02:00
1b0395f693 Accept an arbitrary argument for remote init 2024-07-29 18:41:25 +02:00
8b015b2eba Add AutoActionKey 2024-06-26 13:42:24 +02:00
8ec5cd9e9b Replace MessagePack by CBOR
CBOR looks very similar but seems more future-proof as it was
standardized by the IETF in RFC 8949.
2024-06-19 12:00:59 +02:00
0abc520e4b Split sinks and source registries
This makes it possible to concurrently control and monitor the
simulation when using gRPC.
Accordingly, the gRPC server now runs on 2 threads so it can serve
control and monitoring requests concurrently.
2024-06-12 11:20:34 +02:00
f731d40add WIP 2024-06-11 11:27:16 +02:00
59d2af51ba Expose the Protobuf simulation service to WASM/JS 2024-05-27 23:33:02 +02:00
77e6e569ff Add same-thread executor support 2024-05-27 23:12:45 +02:00
195bcdceba Add instance name to model contexts 2024-05-10 14:32:07 +02:00
02eec1b277 Add test and improve example 2024-05-08 11:20:33 +02:00
2fa159a87f Fix comments 2024-05-07 12:44:42 +02:00
af3d68e76f Force the waker VTable to be uniquely instantiated
From Rust 1.78, `Waker::will_wake` tests equality by comparing the VTable
pointers rather than the content of the VTable.

Unfortunately, this exposes some instability in the code generation
which sometimes causes several VTables to be instantiated in memory for
the same generic parameters. This can in turn defeat `Waker::will_wake`
if e.g. `Waker::clone` and `Waker::wake_by_*` end up with different
pointers.

The problemt is hopefully addressed by preventing inlining of the VTable
generation function. A test has been added to try to detect regression,
though the test may not be 100% reliable.
2024-05-07 01:37:47 +02:00
e4b108c6b7 Satisfy newest clippy 2024-05-06 16:45:07 +02:00
0734dc2fac Implement clonable outputs and add submodels example 2024-04-29 21:00:12 +02:00
9b4f69c17e gRPC: small fix + minor changes 2024-04-26 16:10:00 +02:00
9956c4fa3f CI: add --all-features and force check on dev 2024-04-26 13:43:06 +02:00
7526ffbcea Add setup step. 2024-04-26 11:48:11 +02:00
e84e802f09 Initial (g)RPC implementation 2024-04-25 11:12:54 +02:00
c984202005 Prepare release v0.2.2 2024-04-04 13:44:10 +02:00
23160ff347 Update multishot crate dependency
A soundness issue was discovered in the `multishot` dependency that
was fixed in 0.3.2.
2024-04-04 13:29:57 +02:00
8e16f8c9b2 small fix for new serde dependency 2024-03-13 11:10:26 +01:00
dc576013e5 Add optional serde support and make MonotonicTime serializable 2024-03-12 18:11:06 +01:00
b96ffe7770 Prepare release v0.2.1 (3rd attempt) 2024-03-06 19:52:33 +01:00
b1a6ae829f Prepare release v0.2.1 (2nd attempt) 2024-03-06 19:41:34 +01:00
d2f165abc7 Prepare release v0.2.1 2024-03-06 16:40:43 +01:00
1be2f48a00 Revert "Merge pull request #12 from asynchronics/feature/event-sinks"
This reverts commit 7e881afb63, reversing
changes made to 9d78e4f72a.
2024-03-06 16:16:55 +01:00
47af3455ff Add send bound for Clock trait 2024-03-06 12:27:34 +01:00
863f995f1b Small changes and cleanups to prepare the RPC work 2024-02-19 13:20:02 +01:00
41a38445ee Correct minor typos 2023-08-29 12:56:57 +02:00
ef703f5b7e Add support for custom/real-time clocks 2023-08-29 12:46:40 +02:00
fe3fd372e7 Prepare release v0.2.0 2023-08-15 17:16:16 +02:00
f6808adaf9 Mark EventKey as must_use 2023-08-15 16:07:17 +02:00
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
6ffa685c90 Exclude non-loom test when asynchronix_loom set 2023-08-14 14:18:46 +02:00
484b74b3ec Add tests for periodic/key events 2023-08-14 12:31:35 +02:00
b0f7e69039 Implement periodic events 2023-07-28 16:18:10 +02:00
f6c714937a Update leap second data 2023-07-28 16:16:01 +02:00
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
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
045dea509c Minor doc fixes 2023-07-17 14:58:52 +02:00
1fcb7e181c Satisfy newest clippy 2023-07-16 16:40:41 +02:00
3fcb05eae9 Replace event module by async-event crate 2023-07-16 16:37:40 +02:00
31520d461a First release candidate for v0.1.0 2023-01-16 23:05:46 +01:00
835dd5ea8e Fix bug introduced during refactoring 2022-10-22 17:56:02 +02:00
d2cfbcfa34 Replace the Parker crate by crossbeam_utils 2022-10-18 12:20:02 +02:00
c3ca7fc0e1 Add comments + minor renaming 2022-10-18 11:36:07 +02:00
eba882b4b1 Refactor code 2022-10-18 09:50:22 +02:00
abab030b4a Restrict visibility of many items to super 2022-10-17 12:29:26 +02:00
b009f4481e Deactivate worker only after global queue re-check 2022-10-16 12:16:01 +02:00