images in docs.rs now work

This commit is contained in:
Robin Müller 2022-11-03 13:22:41 +01:00
parent 140e673706
commit 9421465ffe
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
9 changed files with 46 additions and 28 deletions

View File

@ -1,12 +1,13 @@
<component name="ProjectRunConfigurationManager"> <component name="ProjectRunConfigurationManager">
<configuration default="false" name="Docs" type="CargoCommandRunConfiguration" factoryName="Cargo Command"> <configuration default="false" name="Docs" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="doc" /> <option name="command" value="doc --all-features" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" /> <option name="workingDirectory" value="file://$PROJECT_DIR$" />
<option name="channel" value="DEFAULT" /> <option name="channel" value="DEFAULT" />
<option name="requiredFeatures" value="true" /> <option name="requiredFeatures" value="true" />
<option name="allFeatures" value="false" /> <option name="allFeatures" value="false" />
<option name="emulateTerminal" value="false" /> <option name="emulateTerminal" value="false" />
<option name="withSudo" value="false" /> <option name="withSudo" value="false" />
<option name="buildTarget" value="REMOTE" />
<option name="backtrace" value="SHORT" /> <option name="backtrace" value="SHORT" />
<envs /> <envs />
<option name="isRedirectInput" value="false" /> <option name="isRedirectInput" value="false" />

19
Cargo.lock generated
View File

@ -61,6 +61,12 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603"
[[package]]
name = "base64"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
[[package]] [[package]]
name = "bit_field" name = "bit_field"
version = "0.10.1" version = "0.10.1"
@ -278,6 +284,18 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650"
[[package]]
name = "embed-doc-image"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af36f591236d9d822425cb6896595658fa558fcebf5ee8accac1d4b92c47166e"
dependencies = [
"base64",
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "embedded-hal" name = "embedded-hal"
version = "0.2.7" version = "0.2.7"
@ -296,6 +314,7 @@ dependencies = [
"crossbeam-channel", "crossbeam-channel",
"delegate 0.8.0", "delegate 0.8.0",
"downcast-rs", "downcast-rs",
"embed-doc-image",
"hashbrown", "hashbrown",
"heapless", "heapless",
"num-traits", "num-traits",

View File

@ -10,6 +10,7 @@ delegate = "0.8"
hashbrown = "0.12" hashbrown = "0.12"
heapless = "0.7" heapless = "0.7"
paste = "1.0" paste = "1.0"
embed-doc-image = "0.1"
[dependencies.num-traits] [dependencies.num-traits]
version = "0.2" version = "0.2"
@ -43,6 +44,7 @@ default = ["std"]
std = ["downcast-rs/std", "alloc", "bus", "postcard/use-std", "crossbeam-channel/std"] std = ["downcast-rs/std", "alloc", "bus", "postcard/use-std", "crossbeam-channel/std"]
alloc = [] alloc = []
heapless = [] heapless = []
doc-images = []
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true

View File

@ -13,9 +13,8 @@
<key attr.name="description" attr.type="string" for="edge" id="d9"/> <key attr.name="description" attr.type="string" for="edge" id="d9"/>
<key for="edge" id="d10" yfiles.type="edgegraphics"/> <key for="edge" id="d10" yfiles.type="edgegraphics"/>
<graph edgedefault="directed" id="G"> <graph edgedefault="directed" id="G">
<data key="d0"/> <data key="d0" xml:space="preserve"/>
<node id="n0"> <node id="n0">
<data key="d5"/>
<data key="d6"> <data key="d6">
<y:ShapeNode> <y:ShapeNode>
<y:Geometry height="509.9999999999999" width="768.7000000000003" x="579.3105418719211" y="304.7"/> <y:Geometry height="509.9999999999999" width="768.7000000000003" x="579.3105418719211" y="304.7"/>
@ -27,7 +26,6 @@
</data> </data>
</node> </node>
<node id="n1"> <node id="n1">
<data key="d5"/>
<data key="d6"> <data key="d6">
<y:ShapeNode> <y:ShapeNode>
<y:Geometry height="60.0" width="203.0" x="814.0" y="506.6799999999999"/> <y:Geometry height="60.0" width="203.0" x="814.0" y="506.6799999999999"/>
@ -39,7 +37,6 @@
</data> </data>
</node> </node>
<node id="n2"> <node id="n2">
<data key="d5"/>
<data key="d6"> <data key="d6">
<y:ShapeNode> <y:ShapeNode>
<y:Geometry height="60.0" width="82.0" x="617.6" y="413.23"/> <y:Geometry height="60.0" width="82.0" x="617.6" y="413.23"/>
@ -52,7 +49,6 @@ Creator 0<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:
</data> </data>
</node> </node>
<node id="n3"> <node id="n3">
<data key="d5"/>
<data key="d6"> <data key="d6">
<y:ShapeNode> <y:ShapeNode>
<y:Geometry height="60.0" width="76.55999999999995" x="988.5" y="335.62999999999994"/> <y:Geometry height="60.0" width="76.55999999999995" x="988.5" y="335.62999999999994"/>
@ -65,7 +61,6 @@ Creator 2<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:
</data> </data>
</node> </node>
<node id="n4"> <node id="n4">
<data key="d5"/>
<data key="d6"> <data key="d6">
<y:ShapeNode> <y:ShapeNode>
<y:Geometry height="60.0" width="72.55999999999983" x="860.6610837438426" y="335.62999999999994"/> <y:Geometry height="60.0" width="72.55999999999983" x="860.6610837438426" y="335.62999999999994"/>
@ -78,7 +73,6 @@ Creator 1<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:
</data> </data>
</node> </node>
<node id="n5"> <node id="n5">
<data key="d5"/>
<data key="d6"> <data key="d6">
<y:ShapeNode> <y:ShapeNode>
<y:Geometry height="60.0" width="87.27999999999997" x="1112.52" y="335.62999999999994"/> <y:Geometry height="60.0" width="87.27999999999997" x="1112.52" y="335.62999999999994"/>
@ -91,7 +85,6 @@ Creator 3<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:
</data> </data>
</node> </node>
<node id="n6"> <node id="n6">
<data key="d5"/>
<data key="d6"> <data key="d6">
<y:ShapeNode> <y:ShapeNode>
<y:Geometry height="60.0" width="126.0" x="781.0" y="620.26"/> <y:Geometry height="60.0" width="126.0" x="781.0" y="620.26"/>
@ -105,7 +98,6 @@ Event Reporting
</data> </data>
</node> </node>
<node id="n7"> <node id="n7">
<data key="d5"/>
<data key="d6"> <data key="d6">
<y:ShapeNode> <y:ShapeNode>
<y:Geometry height="60.0" width="118.63999999999987" x="928.2" y="620.26"/> <y:Geometry height="60.0" width="118.63999999999987" x="928.2" y="620.26"/>
@ -118,7 +110,6 @@ Event Action<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel>
</data> </data>
</node> </node>
<node id="n8"> <node id="n8">
<data key="d5"/>
<data key="d6"> <data key="d6">
<y:ShapeNode> <y:ShapeNode>
<y:Geometry height="60.0" width="87.27999999999997" x="792.1260377358491" y="733.8400000000001"/> <y:Geometry height="60.0" width="87.27999999999997" x="792.1260377358491" y="733.8400000000001"/>
@ -151,7 +142,6 @@ Sink<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:Model
</data> </data>
</node> </node>
<edge id="e0" source="n4" target="n1"> <edge id="e0" source="n4" target="n1">
<data key="d9"/>
<data key="d10"> <data key="d10">
<y:PolyLineEdge> <y:PolyLineEdge>
<y:Path sx="8.058916256157545" sy="0.0" tx="-10.5" ty="0.0"/> <y:Path sx="8.058916256157545" sy="0.0" tx="-10.5" ty="0.0"/>
@ -164,7 +154,6 @@ Sink<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:Model
</data> </data>
</edge> </edge>
<edge id="e1" source="n2" target="n1"> <edge id="e1" source="n2" target="n1">
<data key="d9"/>
<data key="d10"> <data key="d10">
<y:PolyLineEdge> <y:PolyLineEdge>
<y:Path sx="0.0" sy="11.93999999999994" tx="-83.5" ty="0.0"> <y:Path sx="0.0" sy="11.93999999999994" tx="-83.5" ty="0.0">
@ -179,7 +168,6 @@ Sink<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:Model
</data> </data>
</edge> </edge>
<edge id="e2" source="n3" target="n1"> <edge id="e2" source="n3" target="n1">
<data key="d9"/>
<data key="d10"> <data key="d10">
<y:PolyLineEdge> <y:PolyLineEdge>
<y:Path sx="-23.719999999999914" sy="5.5" tx="87.56000000000006" ty="0.0"/> <y:Path sx="-23.719999999999914" sy="5.5" tx="87.56000000000006" ty="0.0"/>
@ -192,7 +180,6 @@ Sink<y:LabelModel><y:SmartNodeLabelModel distance="4.0"/></y:LabelModel><y:Model
</data> </data>
</edge> </edge>
<edge id="e3" source="n5" target="n1"> <edge id="e3" source="n5" target="n1">
<data key="d9"/>
<data key="d10"> <data key="d10">
<y:PolyLineEdge> <y:PolyLineEdge>
<y:Path sx="-6.275467980295616" sy="0.0" tx="57.5" ty="8.5"> <y:Path sx="-6.275467980295616" sy="0.0" tx="57.5" ty="8.5">
@ -207,7 +194,6 @@ event 4 (group 2)<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false
</data> </data>
</edge> </edge>
<edge id="e4" source="n1" target="n6"> <edge id="e4" source="n1" target="n6">
<data key="d9"/>
<data key="d10"> <data key="d10">
<y:PolyLineEdge> <y:PolyLineEdge>
<y:Path sx="-65.0" sy="0.0" tx="6.5" ty="0.0"/> <y:Path sx="-65.0" sy="0.0" tx="6.5" ty="0.0"/>
@ -219,7 +205,6 @@ event 4 (group 2)<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false
</data> </data>
</edge> </edge>
<edge id="e5" source="n1" target="n7"> <edge id="e5" source="n1" target="n7">
<data key="d9"/>
<data key="d10"> <data key="d10">
<y:PolyLineEdge> <y:PolyLineEdge>
<y:Path sx="42.660000000000196" sy="0.0" tx="-29.359999999999786" ty="0.0"/> <y:Path sx="42.660000000000196" sy="0.0" tx="-29.359999999999786" ty="0.0"/>
@ -231,7 +216,6 @@ event 4 (group 2)<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false
</data> </data>
</edge> </edge>
<edge id="e6" source="n1" target="n2"> <edge id="e6" source="n1" target="n2">
<data key="d9"/>
<data key="d10"> <data key="d10">
<y:PolyLineEdge> <y:PolyLineEdge>
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"> <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0">
@ -246,7 +230,6 @@ event 2<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultA
</data> </data>
</edge> </edge>
<edge id="e7" source="n1" target="n4"> <edge id="e7" source="n1" target="n4">
<data key="d9"/>
<data key="d10"> <data key="d10">
<y:PolyLineEdge> <y:PolyLineEdge>
<y:Path sx="-35.69940886699487" sy="0.0" tx="-17.140492610837327" ty="1.5"/> <y:Path sx="-35.69940886699487" sy="0.0" tx="-17.140492610837327" ty="1.5"/>
@ -258,7 +241,6 @@ event 2<y:LabelModel><y:SmartEdgeLabelModel autoRotationEnabled="false" defaultA
</data> </data>
</edge> </edge>
<edge id="e8" source="n6" target="n8"> <edge id="e8" source="n6" target="n8">
<data key="d9"/>
<data key="d10"> <data key="d10">
<y:PolyLineEdge> <y:PolyLineEdge>
<y:Path sx="0.0" sy="0.0" tx="8.233962264150945" ty="-21.42352238805968"/> <y:Path sx="0.0" sy="0.0" tx="8.233962264150945" ty="-21.42352238805968"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

View File

@ -3,10 +3,24 @@
//! This module provides components to perform event routing. The most important component for this //! This module provides components to perform event routing. The most important component for this
//! task is the [EventManager]. It uses a map of event listeners and uses a dynamic [EventReceiver] //! task is the [EventManager]. It uses a map of event listeners and uses a dynamic [EventReceiver]
//! instance to receive all events and then route them to event subscribers where appropriate. //! instance to receive all events and then route them to event subscribers where appropriate.
//! #![cfg_attr(feature = "doc-images",
cfg_attr(all(),
doc = ::embed_doc_image::embed_image!("event_man_arch", "images/event_man_arch.png"
)))]
#![cfg_attr(
not(feature = "doc-images"),
doc = "**Doc images not enabled**. Compile with feature `doc-images` and Rust version >= 1.54 \
to enable."
)]
//! One common use case for satellite systems is to offer a light-weight publish-subscribe mechanism //! One common use case for satellite systems is to offer a light-weight publish-subscribe mechanism
//! and IPC mechanism for software and hardware events which are also packaged as telemetry or can //! and IPC mechanism for software and hardware events which are also packaged as telemetry or can
//! trigger a system response. This can be done with the [EventManager] like this: //! trigger a system response.
//!
//! The following graph shows how the event flow for such a setup could look like:
//!
//! ![Event flow][event_man_arch]
//!
//! This can be done with the [EventManager] like this:
//! //!
//! 1. Provide a concrete [SendEventProvider] implementation and a concrete [EventReceiver] //! 1. Provide a concrete [SendEventProvider] implementation and a concrete [EventReceiver]
//! implementation. These abstraction allow to use different message queue backends. //! implementation. These abstraction allow to use different message queue backends.

View File

@ -24,9 +24,9 @@ pub mod events;
pub mod executable; pub mod executable;
pub mod hal; pub mod hal;
pub mod objects; pub mod objects;
pub mod params;
#[cfg(feature = "alloc")] #[cfg(feature = "alloc")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))] #[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
pub mod pool; pub mod pool;
pub mod pus; pub mod pus;
pub mod tmtc; pub mod tmtc;
pub mod params;

View File

@ -1,9 +1,9 @@
use fsrc_core::event_man::{EventManager, MpscEventReceiver, MpscEventU32SendProvider}; use fsrc_core::event_man::{EventManager, MpscEventReceiver, MpscEventU32SendProvider};
use fsrc_core::events::{EventU32, EventU32TypedSev, Severity, SeverityInfo}; use fsrc_core::events::{EventU32, EventU32TypedSev, Severity, SeverityInfo};
use fsrc_core::pus::event_man::{DefaultPusMgmtBackendProvider, EventReporter, PusEventTmManager};
use fsrc_core::pus::{EcssTmError, EcssTmSender};
use fsrc_core::params::U32Pair; use fsrc_core::params::U32Pair;
use fsrc_core::params::{Params, ParamsHeapless, WritableToBeBytes}; use fsrc_core::params::{Params, ParamsHeapless, WritableToBeBytes};
use fsrc_core::pus::event_man::{DefaultPusMgmtBackendProvider, EventReporter, PusEventTmManager};
use fsrc_core::pus::{EcssTmError, EcssTmSender};
use spacepackets::ecss::PusPacket; use spacepackets::ecss::PusPacket;
use spacepackets::tm::PusTm; use spacepackets::tm::PusTm;
use std::sync::mpsc::{channel, SendError, TryRecvError}; use std::sync::mpsc::{channel, SendError, TryRecvError};