Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report an error if a message cannot be delivered #70

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,52 +95,62 @@ jobs:
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-disable-isolation -Zmiri-num-cpus=4

- name: Run cargo miri example1 (single-threaded executor)
- name: Run cargo miri espresso_machine (single-threaded executor)
run: cargo miri run --example espresso_machine
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-disable-isolation -Zmiri-num-cpus=1

- name: Run cargo miri example1 (multi-threaded executor)
- name: Run cargo miri espresso_machine (multi-threaded executor)
run: cargo miri run --example espresso_machine
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-disable-isolation -Zmiri-num-cpus=4

- name: Run cargo miri example2 (single-threaded executor)
- name: Run cargo miri power_supply (single-threaded executor)
run: cargo miri run --example power_supply
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-disable-isolation -Zmiri-num-cpus=1

- name: Run cargo miri example2 (multi-threaded executor)
- name: Run cargo miri power_supply (multi-threaded executor)
run: cargo miri run --example power_supply
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-disable-isolation -Zmiri-num-cpus=4

- name: Run cargo miri example3 (single-threaded executor)
- name: Run cargo miri stepper_motor (single-threaded executor)
run: cargo miri run --example stepper_motor
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-disable-isolation -Zmiri-num-cpus=1

- name: Run cargo miri example3 (multi-threaded executor)
- name: Run cargo miri stepper_motor (multi-threaded executor)
run: cargo miri run --example stepper_motor
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-disable-isolation -Zmiri-num-cpus=4

- name: Run cargo miri example4 (single-threaded executor)
- name: Run cargo miri assembly (single-threaded executor)
run: cargo miri run --example assembly
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-disable-isolation -Zmiri-num-cpus=1

- name: Run cargo miri example4 (multi-threaded executor)
- name: Run cargo miri assembly (multi-threaded executor)
run: cargo miri run --example assembly
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-disable-isolation -Zmiri-num-cpus=4

- name: Run cargo miri example5 (single-threaded executor)
- name: Run cargo miri uni_requestor (single-threaded executor)
run: cargo miri run --example uni_requestor
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-disable-isolation -Zmiri-num-cpus=1

- name: Run cargo miri uni_requestor (multi-threaded executor)
run: cargo miri run --example uni_requestor
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-disable-isolation -Zmiri-num-cpus=4

- name: Run cargo miri observables (single-threaded executor)
run: cargo miri run --example observables
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-disable-isolation -Zmiri-num-cpus=1

- name: Run cargo miri example5 (multi-threaded executor)
- name: Run cargo miri observables (multi-threaded executor)
run: cargo miri run --example observables
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-disable-isolation -Zmiri-num-cpus=4
Expand Down
6 changes: 3 additions & 3 deletions nexosim/examples/uni_requestor.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Example: sensor reading data from the environment model.
//! Example: sensor reading data from environment model.
//!
//! This example demonstrates in particular:
//!
Expand All @@ -11,8 +11,8 @@
//! ```text
//! ┌─────────────┐ ┌──────────┐
//! │ │ temperature │ │ overheat
//! Temperature ●─────────►│ Environment ├──────────────►│ Sensor ├──────────►
//! │ │ │ │ state
//! Temperature ●─────────►│ Environment ├──────────────►│ Sensor ├──────────►
//! │ │ │ │
//! └─────────────┘ └──────────┘
//! ```

Expand Down
11 changes: 6 additions & 5 deletions nexosim/src/grpc/api/simulation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ enum ErrorCode {
SIMULATION_TERMINATED = 2;
SIMULATION_DEADLOCK = 3;
SIMULATION_MESSAGE_LOSS = 4;
SIMULATION_PANIC = 5;
SIMULATION_TIMEOUT = 6;
SIMULATION_OUT_OF_SYNC = 7;
SIMULATION_BAD_QUERY = 8;
SIMULATION_TIME_OUT_OF_RANGE = 9;
SIMULATION_NO_RECIPIENT = 5;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that after final release those numbers will be frozen. Or we do not care about such things?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they need to be frozen. They are totally arbitrary though, but at least at the beginning let's order them sequentially...

SIMULATION_PANIC = 6;
SIMULATION_TIMEOUT = 7;
SIMULATION_OUT_OF_SYNC = 8;
SIMULATION_BAD_QUERY = 9;
SIMULATION_TIME_OUT_OF_RANGE = 10;
MISSING_ARGUMENT = 20;
INVALID_TIME = 30;
INVALID_PERIOD = 31;
Expand Down
Loading