pub struct CpTarget {
pub record: String,
pub passive_only: bool,
}Expand description
Internal state of PvDatabase.
§Invariant — alias-aware lookup (epics-base PR #336)
MUST: every record-name lookup that originates from an
external API (CA/PVA server, link processing, iocsh, bridge
providers) MUST go through PvDatabase::get_record /
PvDatabase::find_entry / PvDatabase::has_name, never
inner.records.read().await.get(...) directly.
MUST NOT: a function that takes an arbitrary record-name
&str and reads inner.records directly, unless one of:
- the function is itself an alias-management primitive
(
add_record,remove_record,add_alias,find_entry_no_resolve,has_name_no_resolve,get_record_no_resolve,all_record_names), OR - the name has been normalised to canonical earlier in the
same scope (the
let canonical_owned; let name: &str = ...pattern inprocess_record_with_links_inner/complete_async_record_inner/put_record_field_from_ca/put_pv).
Owner/Gate: PvDatabase::get_record (alias-aware path).
New code that adds a record-name entry point should call
get_record first OR run the canonical-normalisation snippet
at function entry. Direct inner.records access is reserved
for the alias-management primitives listed above.
One CP/CPP edge in the [PvDatabaseInner::cp_links] index: the record
to (re)process when the source record changes.
passive_only distinguishes CPP from CP. C adds the CA_DBPROCESS
action for a CP link unconditionally, but for a CPP link only when the
link-holding record’s SCAN is Passive (dbCa.c:854,994,1072). CP
edges clear the flag; CPP edges set it, and dispatch_cp_targets
honours it.
Fields§
§record: String§passive_only: bool