pub struct Resolver { /* private fields */ }Expand description
Effective settings of tag paths in one PLC, from the decorators, its [udt] and [tags] entries, its rules
and groups, and the controller’s types (the /tags tags and types; UDT entries need them).
Implementations§
Source§impl Resolver
impl Resolver
Sourcepub fn new(
decorators: &Map<String, Json>,
udt: &Map<String, Json>,
tags: &Map<String, Json>,
rules: Vec<Map<String, Json>>,
groups: Vec<Map<String, Json>>,
where_: &str,
) -> Result<Self, String>
pub fn new( decorators: &Map<String, Json>, udt: &Map<String, Json>, tags: &Map<String, Json>, rules: Vec<Map<String, Json>>, groups: Vec<Map<String, Json>>, where_: &str, ) -> Result<Self, String>
A resolver without the controller’s types; an unknown decorator or a bad entry is an error naming its place.
Sourcepub fn from_body(body: &Json) -> Result<Self, String>
pub fn from_body(body: &Json) -> Result<Self, String>
From a GET /tags body, as codegen sees it.
Sourcepub fn set_types(&mut self, tag_list: &[Json], types: &Map<String, Json>)
pub fn set_types(&mut self, tag_list: &[Json], types: &Map<String, Json>)
The controller structure (empty: unknown, so only [tags] entries and rules apply).
Sourcepub fn effective(&self, tag: &str) -> Settings
pub fn effective(&self, tag: &str) -> Settings
Settings of a tag path: rate_ms and together from the closest node that sets them, the other fields
from the path itself (an element also from its array); then the rules, per field the first rule (file
order) that sets it. A bit keeps no min, max, units, deadband, bits or together; writable falls back to
its word’s.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Resolver
impl RefUnwindSafe for Resolver
impl Send for Resolver
impl Sync for Resolver
impl Unpin for Resolver
impl UnsafeUnpin for Resolver
impl UnwindSafe for Resolver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more