Vital Recorder Configuration Generator
A robust, cross-platform CLI tool for generating Vital Recorder configuration files (vr.conf
).
Features
- Cross-platform: Works on Windows, Linux, macOS, and Unix systems
- Interactive CLI: User-friendly menu-driven interface
- Complete device support: All patient monitors and anesthesia machines
- Validation: Input validation and error handling
- Flexible configuration: Support for all VR settings including:
- Application settings (save directory, sound, DSA display)
- File cutting options (by metric or hourly)
- Network configuration (WebSocket, server IP, VR code)
- Multiple beds with multiple devices
- All device types from the specification
Installation
Prerequisites
Building from Source
# Clone or create the project
mkdir vr-config-generator
cd vr-config-generator
# Create the Cargo.toml and src/main.rs files with the provided code
# Build the release version
cargo build --release
# The binary will be in target/release/
# On Windows: target\release\vr-config-generator.exe
# On Unix/Linux: target/release/vr-config-generator
Quick Build Commands
Windows:
cargo build --release
.\target\release\vr-config-generator.exe
Linux/macOS/Unix:
cargo build --release
chmod +x target/release/vr-config-generator
./target/release/vr-config-generator
Usage
-
Run the program:
./vr-config-generator # Unix/Linux/macOS
vr-config-generator.exe # Windows
-
Follow the interactive menu:
- Configure Application Settings
- Add and configure beds
- Add devices to beds
- Generate the configuration file
-
The program will create a vr.conf
file in the current directory
Configuration Options
Application Settings
- Save Directory: Directory path for .vital files
- Sound Settings: Enable/disable event sounds
- File Cutting:
- Cut by metric (HR/SpO2)
- Cut hourly
- No cutting
- Recording: Auto-start recording on program launch
- Network: WebSocket settings, VR code, server IP
- Display: Show/hide DSA, ECG, EEG data
Supported Devices
Patient Monitors:
- Phillips: Intellivue, VueLink
- GE: Solar8000, Bx50, B1x5M, Canvas, Dashx000, Dash2500
- Draeger: Infinity
- Nihon Kohden: BSM, EGA, ADT, NealTime, ORF
- MEKICS
Anesthesia Machines:
- Draeger: Primus, Medibus X
- GE: Datex-Ohmeda
Demo:
Device Configuration
Each device supports:
- COM port selection (COM5 on Windows, /dev/ttyUSB0 on Unix)
- Readonly mode (for Y-cable monitoring)
- Waveform selection (device-specific)
- Additional device-specific options
Example Workflow
- Start the program
- Configure Application Settings:
- Set save directory:
/home/user/vital_data
- Enable sound: No
- Set file cutting: Hourly
- Enable auto-record: Yes
- Add Bed:
- Creates BED_01 automatically
- Add Device to Bed:
- Select "Phillips Intellivue"
- Set COM port:
COM5
(Windows) or /dev/ttyUSB0
(Linux)
- Enable readonly: Yes
- Configure waveforms:
I,II,III,PLETH,ABP
- Generate Configuration:
- File is created and ready to use with Vital Recorder
Output File Format
The generated vr.conf
file follows the exact specification required by Vital Recorder:
- Windows-style line endings (\r\n)
- Proper section headers
- Correct parameter formatting
- All required configuration blocks
Cross-Platform Notes
Windows
- Use COM ports like:
COM1
, COM5
, COM10
- Run from Command Prompt or PowerShell
- Output file uses Windows line endings
Linux/Unix
- Use device paths like:
/dev/ttyUSB0
, /dev/ttyS0
- May require permissions for serial ports:
sudo usermod -a -G dialout $USER
- Log out and back in after adding user to dialout group
macOS
- Use device paths like:
/dev/tty.usbserial-*
- Check available ports:
ls /dev/tty.*
Troubleshooting
Program won't start:
- Ensure Rust is properly installed
- Check executable permissions on Unix/Linux:
chmod +x vr-config-generator
- On Windows, check antivirus isn't blocking the executable
Serial port issues:
- Linux: Add user to dialout group:
sudo usermod -a -G dialout $USER
- Windows: Check Device Manager for correct COM port numbers
- macOS: Use
ls /dev/tty.*
to find available ports
Configuration file not working:
- Ensure the file is named exactly
vr.conf
- Place it in the same directory as the Vital Recorder binary
- Check that all required fields are filled (especially COM ports)
Build errors:
- Update Rust:
rustup update
- Clean build:
cargo clean && cargo build --release
- Check Rust version:
rustc --version
(should be 1.70.0+)
Advanced Usage
Command Line Arguments (Future Enhancement)
While the current version is fully interactive, you can extend it to support command-line arguments:
// Add to Cargo.toml dependencies:
// clap = { version = "4.0", features = ["derive"] }
// Future usage examples:
./vr-config-generator --output my-config.conf
./vr-config-generator --bed-count 3 --demo-mode
./vr-config-generator --import existing.conf --edit
Batch Configuration
For multiple installations, you can create a template configuration and modify it:
- Generate a base configuration
- Copy and modify for each installation
- Use environment-specific settings
Integration with Vital Recorder
- Generate the
vr.conf
file
- Place it in the Vital Recorder installation directory
- Start Vital Recorder - it will automatically load the configuration
- Monitor the logs to ensure devices connect properly
Configuration Examples
Example 1: Single Bed with Intellivue Monitor
[BED/BED_01]
[DEV/Intellivue]
port=COM5
readonly=1
type=Intellivue
wavs=I,II,III,PLETH,ABP
Example 2: OR Setup with Anesthesia Machine
[BED/BED_01]
[DEV/Infinity]
port=COM3
type=Infinity
[DEV/Primus]
port=COM4
readonly=1
type=Primus
Example 3: Multi-bed ICU Configuration
[BED/BED_01]
[DEV/Intellivue]
port=COM5
type=Intellivue
[BED/BED_02]
[DEV/Solar8000]
port=COM6
type=Solar8000
[BED/BED_03]
[DEV/BSM]
port=COM7
type=BSM
Safety and Best Practices
- Always test the configuration with a demo device first
- Backup existing configurations before replacing
- Document your COM port mappings and device connections
- Use readonly mode when monitoring existing connections
- Verify waveforms are appropriate for your clinical needs
- Test file cutting settings to ensure proper data segmentation
Performance Considerations
- The generator creates compact, optimized configuration files
- No runtime dependencies - the binary is self-contained
- Fast execution - configuration generation is instantaneous
- Low memory footprint - suitable for embedded systems
License
MIT License - See LICENSE file for details
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Test thoroughly on your target platform
- Submit a pull request
Support
For issues related to:
- Configuration Generator: Open an issue on GitHub
- Vital Recorder Software: Contact the VR support team
- Device Connectivity: Consult device manufacturer documentation
Version History
- 1.0.0 (Current)
- Initial release
- Full device support
- Cross-platform compatibility
- Interactive CLI interface
Roadmap
Future enhancements planned:
Technical Details
File Format Specification
The generated vr.conf
follows this structure:
- Application configuration section
- Separator line (10 dashes)
- Bed configuration section
- Windows-style line endings (\r\n) for compatibility
Supported Waveform Sampling Rates
Phillips Monitors (Intellivue/VueLink):
- 500Hz: ECG leads (I, II, III, V, AVR, AVL, AVF, MCL, V1-V6)
- 125Hz: PLETH, ABP, ART, CVP, FAP, PAP, ICP, EEG
- 62.5Hz: CO2, RESP, AWF, AWP
GE Monitors (Bx50/B1x5M/Canvas):
- 300Hz: ECG1, ECG2
- 100Hz: IABP1-6
Serial Communication Parameters
Default settings (usually auto-detected):
- Baud rate: Device-specific (9600-115200)
- Data bits: 8
- Stop bits: 1
- Parity: None
- Flow control: Hardware (RTS/CTS) or None
Generated by VR Config Generator v1.0.0