NAME
Data::Power::Inspection - Power Equipment Fault Inspection and Troubleshooting Library
VERSION
Version 0.07
SYNOPSIS
The module provides the following functions for use:
1. get_inspection_rules
Retrieves all available inspection rules in the system.
2. get_rules_by_device
Retrieves inspection rules specific to a given device type or name.
3. get_rules_by_data_source
Retrieves inspection rules based on the data sources required by the rules.
4. get_rules_by_priority
Retrieves inspection rules filtered by their priority level.
5. get_replaceable_inspection_rules
Retrieves inspection rules that are marked as replaceable.
6. get_equipment_fault_criteria
Retrieves the fault criteria for specific equipment or device types.
Usage Example
use Data::Power::Inspection qw(get_rules_by_device);
use utf8;
use open qw(:std :utf8);
binmode(STDOUT, ":utf8");
# Retrieve inspection rules for a specific device type
my $pole_switch_rules = get_rules_by_device('柱上开关');
# Process and display the rules
foreach my $equipment (sort keys %$pole_switch_rules) {
print "== $equipment ==\n";
foreach my $rule_name (sort keys %{$pole_switch_rules->{$equipment}}) {
my $rule = $pole_switch_rules->{$equipment}{$rule_name};
print "\n- 巡检项目: $rule_name\n";
print " 巡检内容: $rule->{description}\n";
print " 可能问题: $rule->{problem}\n";
print " 可替代性: " . ($rule->{replaceable} ? "可替代" : "不可替代") . "\n";
print " 判断算法: $rule->{algorithm}\n";
print " 数据要求:\n";
foreach my $data (@{$rule->{data}}) {
print " - 内容: $data->{content}\n";
print " 来源: $data->{source}\n";
print " 频率: $data->{frequency}\n";
print " 业务: $data->{business_mode}\n";
print " 优先级: $data->{priority}\n";
print " 说明: $data->{note}\n" if exists $data->{note};
print " 需要额外通道: 是\n" if exists $data->{additional_channel} && $data->{additional_channel};
}
print "\n";
}
print "\n";
}
AUTHOR
Y Peng, <ypeng at t-online.de>
LICENSE AND COPYRIGHT
This software is Copyright (c) 2025 by Y Peng.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)