This project provides a C++ parser for IODD (IO Device Description) files, enabling seamless integration and management of IO-Link sensor data. The parser supports various XML-based IODD files and extracts critical information like device identity, process data, menus, and variables.
- Parse IODD XML files: Reads and processes IO-Link sensor definitions.
- Support for multiple sensor types: Includes compatibility with various manufacturers (e.g., Balluff, ifm).
- Organized structure: Modular codebase for easy extension and maintenance.
- Efficient XML parsing: Uses
ezxml
for lightweight XML handling. - Cross-platform compatibility: Build and run on Device, Linux, Windows, or macOS.
├── inc/
│ ├── ezxml.h # Lightweight XML parser header
│ ├── iodd_data_type.h # Data type definitions for IODD
│ ├── iodd_device_identity.h # Device identity structures
│ ├── iodd_menu.h # Menu-related parsing
│ ├── iodd_parser.h # Core parser logic
│ ├── iodd_process_data.h # Process data extraction
│ ├── iodd_sensor.h # High-level sensor interface
│ └── types.h # Common type definitions
├── ioddfiles/ # Sample IODD XML files
├── src/
│ ├── ezxml.c # XML parser implementation
│ ├── iodd_data_type.cpp # Data type parsing
│ ├── iodd_device_identity.cpp # Device identity implementation
│ ├── iodd_menu.cpp # Menu structure parsing
│ ├── iodd_parser.cpp # Core parsing implementation
│ ├── iodd_process_data.cpp # Process data handling
│ ├── iodd_sensor.cpp # Sensor interface implementation
│ └── iodd_variable.cpp # Variable parsing
└── main.cpp
- C++11 or later
- XML parsing library:
ezxml
- A supported compiler: GCC, Clang, MSVC
-
Clone this repository:
git clone https://github.com/longntv/iodd_parser_cpp cd iodd_parser_cpp
-
Build the project:
mkdir build && cd build cmake .. make
-
Run the parser with a sample IODD file:
./iodd_parser
The main entry point is main.cpp
. You can specify an IODD file to parse and retrieve details such as:
- Device identity
- Process data
- Variables and menus
Modify the main.cpp
file to handle your desired IODD processing logic.
The ioddfiles/
directory includes examples like:
- Balluff:
Balluff-BCM_R15E-002-DI00-20200327-IODD1.1.xml
- ifm:
ifm-000215-20161025-IODD1.0.1.xml
- Generic sensors:
AH002.xml
,AL002.xml
,TR7439.xml
Contributions are welcome! Feel free to open issues or submit pull requests for:
- Adding support for new IODD versions.
- Optimizing the XML parser.
- Improving documentation.
<!-- Primary Keywords -->
<meta name="keywords" content="IODD parser, IO-Link sensor, C++ XML parser, IODD file reader, industrial automation, XML file handler, ezxml parser">
<!-- Description -->
<meta name="description" content="A lightweight C++ parser for IODD (IO Device Description) files. Supports IO-Link sensors from manufacturers like Balluff and ifm. Perfect for industrial automation.">
<!-- Robots -->
<meta name="robots" content="index, follow">
For inquiries or support, contact:
[Long Nguyen]
Email: [longntv@gmail.com]
GitHub: Your GitHub Profile