pub struct PicsGenerator<'a> { /* private fields */ }Expand description
Generates PICS from raw object declarations and configuration. This standalone
generator does not establish service execution; use BACnetServer::generate_pics
for the full server’s effective Device contract.
Implementations§
Source§impl<'a> PicsGenerator<'a>
impl<'a> PicsGenerator<'a>
Sourcepub const INITIATED_SERVICES: &'static [ServiceSupported]
pub const INITIATED_SERVICES: &'static [ServiceSupported]
The services the PICS marks as initiated (its initiator column): the
requests bacnet-server can build and send itself, in some
configuration. Distinct from
EXECUTED_SERVICES, which
Clause 12.11 ties to execution.
Some go out only when configured: COV and event notifications need a
subscription or a recipient, audit notifications need audit reporting,
and WriteProperty, ReadProperty and Who-Is need a Command action or a
Channel member in another device (Who-Is finds that device). The server
sends them through its own outbound paths, not through bacnet-client.
A test scans the server’s source and fails on an outbound service this
list leaves out.
Sourcepub fn new(
db: &'a ObjectDatabase,
server_config: &'a ServerConfig,
pics_config: &'a PicsConfig,
) -> Self
pub fn new( db: &'a ObjectDatabase, server_config: &'a ServerConfig, pics_config: &'a PicsConfig, ) -> Self
Create a generator over the object database and the server and PICS configuration.
Sourcepub fn generate(&self) -> Pics
pub fn generate(&self) -> Pics
Generate the complete PICS document.
The vendor block comes from the Device object, so the PICS states what
the device reports: for the server, the Device at its identity;
otherwise, or when the database lacks that one, the selected Device.
Vendor_Name, Model_Name, Firmware_Revision and
Application_Software_Version are its values at the time of the call,
or empty without a Device or when one isn’t a character string. The
protocol version and revision are its Protocol_Version and
Protocol_Revision; without a Device, or when either property isn’t an
unsigned value that fits in a u16, the stack’s own
bacnet_types::PROTOCOL_VERSION and
bacnet_types::PROTOCOL_REVISION stand in. The vendor ID is the
same Device’s Vendor_Identifier, which for the server’s identity
Device is the ServerConfig identity’s vendor ID; without a Device,
or when the value isn’t an unsigned that fits in a u16, that
identity’s vendor ID stands in.