powerlink_rs_xdc/
lib.rs

1#![no_std]
2#![doc = "Parses and generates POWERLINK XDC (XML Device Configuration) files."]
3#![doc = ""]
4#![doc = "This `no_std + alloc` library provides type-safe parsing and serialization"]
5#![doc = "for POWERLINK XDC (Configuration Manager) data based on the EPSG DS 311 specification."]
6#![doc = ""]
7#![doc = "It provides the following main capabilities:"]
8#![doc = "- **Parsing**: Loading `.xdc` or `.xdd` XML strings into strongly-typed Rust structures."]
9#![doc = "- **Resolution**: Resolving complex inheritance, `uniqueIDRef` links, and templates defined in the Application Process."]
10#![doc = "- **Serialization**: generating minimal valid XDC XML strings from Rust structures."]
11#![doc = "- **Core Integration**: Converting the parsed data into the `ObjectDictionary` format required by the `powerlink-rs` core stack."]
12
13extern crate alloc;
14
15mod builder;
16mod converter;
17mod error;
18mod model;
19mod parser;
20mod resolver;
21mod types;
22
23// --- Public API Re-exports ---
24
25// Functions
26pub use builder::save_xdc_to_string;
27pub use converter::{NmtSettings, extract_nmt_settings, to_core_od, xdc_to_storage_map};
28pub use error::XdcError;
29pub use parser::{load_xdc_from_str, load_xdd_defaults_from_str};
30
31// Public Types
32pub use types::{
33    AddInfo, AllowedValues, AppArray, AppDataType, AppDerived, AppEnum, AppStruct,
34    ApplicationProcess, Capabilities, Characteristic, CharacteristicList, Classification,
35    CnFeatures, CombinedState, ConnectedModule, Connector, Count, DeviceFunction, DeviceManager,
36    Diagnostic, Dictionary, EnumValue, ErrorDefinition, Firmware, FunctionInstance, FunctionType,
37    GeneralFeatures, Identity, IndicatorList, InterfaceComm, InterfaceDevice, InterfaceList, LED,
38    LEDstate, MnFeatures, ModuleInterface, ModuleManagementComm, ModuleManagementDevice,
39    NetworkManagement, NmtCnDna, Object, ObjectDictionary, ObjectPdoMapping, ParameterAccess,
40    ParameterGroup, ParameterGroupItem, ParameterRef, ParameterSupport, Picture, ProfileHeader,
41    Range, StandardCompliance, StaticErrorBit, StructMember, SubObject, Value, ValueRange,
42    VarDeclaration, Version, VersionInfo, XdcFile,
43};