1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! Built-in device support that EPICS base has historically shipped
//! with every IOC.
//!
//! These device support implementations are not protocol-specific —
//! they run inside the generic record processing loop and read or
//! write values directly to the local Rust process state. Users
//! typically don't have to register them by hand; the IOC builder
//! pre-registers each one so a `.db` file can name the DTYP and get
//! the expected behaviour with zero setup.
//!
//! See each submodule for the upstream lineage and the records it
//! applies to.
pub use DbStateDeviceSupport;
pub use GetenvDeviceSupport;
pub use StdioDeviceSupport;
pub use SoftTimestampDeviceSupport;
use crateDeviceSupport;
use crateDeviceSupportContext;
/// Built-in device support that must be dispatched by the runtime
/// [`DeviceSupportContext`] because it needs the record's `INP`/`OUT`.
///
/// `Soft Timestamp` (base `devTimestamp.c`) needs its INST_IO `INP` strftime
/// format string, `stdio` (base `devStdio.c`) needs its INST_IO `OUT` stream
/// name, `Db State` (base `devBiDbState.c` / `devBoDbState.c`) needs its
/// INST_IO `INP` (bi) / `OUT` (bo) state name, and `getenv` (base
/// `devSiEnviron.c` / `devLsiEnviron.c`) needs its INST_IO `INP` env-var name —
/// none of which a context-free static `Fn() -> Box<dyn DeviceSupport>` factory
/// can see. The inner typed record handed to `init`/`read` does NOT expose
/// `INP`/`OUT` either (those live on the `RecordInstance` common header, not the
/// record body), so every base builtin is dispatched here and receives the link
/// at construction. Both [`IocBuilder::new`](crate::server::ioc_builder::IocBuilder::new) and
/// [`IocApplication::new`](crate::server::ioc_app::IocApplication::new) pre-register this as
/// the *base* of the dynamic-factory chain, so a user's
/// `register_dynamic_device_support` factory takes priority and falls through
/// to here for the built-in DTYPs.