chronaxis 0.1.0.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- chronaxis/__init__.py +72 -0
- chronaxis/__main__.py +12 -0
- chronaxis/analysis_cli.py +181 -0
- chronaxis/batch/__init__.py +14 -0
- chronaxis/batch/api.py +46 -0
- chronaxis/batch/cli.py +48 -0
- chronaxis/batch/config.py +37 -0
- chronaxis/batch/models.py +202 -0
- chronaxis/batch/process_transport.py +149 -0
- chronaxis/batch/process_tree.py +72 -0
- chronaxis/batch/publication.py +41 -0
- chronaxis/batch/runner.py +236 -0
- chronaxis/batch/templates.py +42 -0
- chronaxis/can_dependencies.py +42 -0
- chronaxis/cli.py +193 -0
- chronaxis/configuration/__init__.py +46 -0
- chronaxis/configuration/cli.py +41 -0
- chronaxis/configuration/diagnostics.py +107 -0
- chronaxis/configuration/explanation.py +233 -0
- chronaxis/configuration/file_tools.py +140 -0
- chronaxis/configuration/imports.py +144 -0
- chronaxis/configuration/initialization.py +36 -0
- chronaxis/configuration/json_parser.py +114 -0
- chronaxis/configuration/models.py +74 -0
- chronaxis/configuration/origins.py +90 -0
- chronaxis/configuration/overrides.py +55 -0
- chronaxis/configuration/resolution.py +150 -0
- chronaxis/configuration/template_catalog.py +68 -0
- chronaxis/configuration/templates/batch/analysis-annotated.yaml +18 -0
- chronaxis/configuration/templates/batch/analysis-minimal.yaml +18 -0
- chronaxis/configuration/templates/batch/annotated.yaml +6 -0
- chronaxis/configuration/templates/batch/minimal.yaml +6 -0
- chronaxis/configuration/templates/can-asc/annotated.yaml +18 -0
- chronaxis/configuration/templates/can-asc/minimal.yaml +18 -0
- chronaxis/configuration/templates/can-blf/annotated.yaml +18 -0
- chronaxis/configuration/templates/can-blf/minimal.yaml +18 -0
- chronaxis/configuration/templates/can-export/annotated.yaml +23 -0
- chronaxis/configuration/templates/can-export/minimal.yaml +23 -0
- chronaxis/configuration/templates/catalog.json +233 -0
- chronaxis/configuration/templates/charge-session/annotated.yaml +38 -0
- chronaxis/configuration/templates/charge-session/minimal.yaml +38 -0
- chronaxis/configuration/templates/command-response/annotated.yaml +32 -0
- chronaxis/configuration/templates/command-response/minimal.yaml +36 -0
- chronaxis/configuration/templates/fault-window/annotated.yaml +25 -0
- chronaxis/configuration/templates/fault-window/minimal.yaml +27 -0
- chronaxis/configuration/templates/ini-mapping/annotated.yaml +20 -0
- chronaxis/configuration/templates/ini-mapping/minimal.yaml +20 -0
- chronaxis/configuration/templates/raw-can-csv/annotated.yaml +34 -0
- chronaxis/configuration/templates/raw-can-csv/minimal.yaml +35 -0
- chronaxis/configuration/templates/shared/charge-session.asc +5 -0
- chronaxis/configuration/templates/shared/command-response.asc +8 -0
- chronaxis/configuration/templates/shared/fault-window.asc +5 -0
- chronaxis/configuration/templates/shared/power.asc +7 -0
- chronaxis/configuration/templates/shared/sample.asc +6 -0
- chronaxis/configuration/templates/shared/sample.blf +0 -0
- chronaxis/configuration/templates/shared/sample.csv +5 -0
- chronaxis/configuration/templates/shared/sample.dbc +11 -0
- chronaxis/configuration/templates/shared/signals.csv +6 -0
- chronaxis/configuration/templates/shared/source.ini +5 -0
- chronaxis/configuration/templates/shared/stability.asc +9 -0
- chronaxis/configuration/templates/shared/teaching.dbc +27 -0
- chronaxis/configuration/templates/shared/threshold.asc +7 -0
- chronaxis/configuration/templates/signal-csv/annotated.yaml +27 -0
- chronaxis/configuration/templates/signal-csv/minimal.yaml +27 -0
- chronaxis/configuration/templates/signal-export/annotated.yaml +27 -0
- chronaxis/configuration/templates/signal-export/minimal.yaml +29 -0
- chronaxis/configuration/templates/stability/annotated.yaml +35 -0
- chronaxis/configuration/templates/stability/minimal.yaml +35 -0
- chronaxis/configuration/templates/threshold/annotated.yaml +22 -0
- chronaxis/configuration/templates/threshold/minimal.yaml +22 -0
- chronaxis/configuration/yaml_parser.py +125 -0
- chronaxis/core/__init__.py +71 -0
- chronaxis/core/binding.py +449 -0
- chronaxis/core/calculation_series_join.py +106 -0
- chronaxis/core/calculations.py +435 -0
- chronaxis/core/calculations_memory_numpy.py +136 -0
- chronaxis/core/calculations_memory_reference.py +165 -0
- chronaxis/core/calculations_numpy.py +298 -0
- chronaxis/core/calculations_reference.py +294 -0
- chronaxis/core/condition_evidence.py +182 -0
- chronaxis/core/conditional_integral_result.py +43 -0
- chronaxis/core/conditional_integral_terms.py +146 -0
- chronaxis/core/conditional_integral_terms_numpy.py +148 -0
- chronaxis/core/conditional_integral_terms_reference.py +111 -0
- chronaxis/core/conditional_time_reduction.py +118 -0
- chronaxis/core/conditional_time_reduction_numpy.py +223 -0
- chronaxis/core/conditional_time_reduction_reference.py +213 -0
- chronaxis/core/declarations.py +192 -0
- chronaxis/core/decoded_binding.py +197 -0
- chronaxis/core/direct_message.py +387 -0
- chronaxis/core/export_interpolation.py +54 -0
- chronaxis/core/expression.py +642 -0
- chronaxis/core/expression_numpy.py +314 -0
- chronaxis/core/expression_reference.py +272 -0
- chronaxis/core/integral_result.py +53 -0
- chronaxis/core/integral_sum.py +77 -0
- chronaxis/core/integral_sum_numpy.py +224 -0
- chronaxis/core/integral_sum_reference.py +148 -0
- chronaxis/core/integral_terms.py +119 -0
- chronaxis/core/integral_terms_numpy.py +127 -0
- chronaxis/core/integral_terms_reference.py +91 -0
- chronaxis/core/mean_weights_numpy.py +29 -0
- chronaxis/core/mean_weights_reference.py +27 -0
- chronaxis/core/message_binding.py +305 -0
- chronaxis/core/models.py +485 -0
- chronaxis/core/normalize_numpy.py +396 -0
- chronaxis/core/numeric.py +472 -0
- chronaxis/core/numeric_numpy.py +440 -0
- chronaxis/core/record_intervals.py +115 -0
- chronaxis/core/sample_reduction.py +161 -0
- chronaxis/core/sample_reduction_numpy.py +160 -0
- chronaxis/core/sample_reduction_reference.py +154 -0
- chronaxis/core/selection.py +74 -0
- chronaxis/core/sequence.py +160 -0
- chronaxis/core/sequence_reference.py +248 -0
- chronaxis/core/stability.py +249 -0
- chronaxis/core/start_end.py +169 -0
- chronaxis/core/state.py +494 -0
- chronaxis/core/state_numpy.py +296 -0
- chronaxis/core/temporal.py +373 -0
- chronaxis/core/temporal_clock.py +25 -0
- chronaxis/core/temporal_memory_numpy.py +163 -0
- chronaxis/core/temporal_memory_reference.py +161 -0
- chronaxis/core/temporal_numpy.py +345 -0
- chronaxis/core/temporal_reference.py +304 -0
- chronaxis/core/time_reduction.py +190 -0
- chronaxis/core/time_reduction_numpy.py +205 -0
- chronaxis/core/time_reduction_reference.py +203 -0
- chronaxis/core/types.py +105 -0
- chronaxis/core/units.py +81 -0
- chronaxis/core/validation.py +94 -0
- chronaxis/core/window_delta.py +123 -0
- chronaxis/core/window_delta_numpy.py +78 -0
- chronaxis/core/window_delta_reference.py +69 -0
- chronaxis/core/windows.py +224 -0
- chronaxis/core/windows_numpy.py +78 -0
- chronaxis/core/windows_reference.py +61 -0
- chronaxis/execution/__init__.py +6 -0
- chronaxis/execution/batch_signal_groups.py +122 -0
- chronaxis/execution/bindings.py +296 -0
- chronaxis/execution/boundaries.py +568 -0
- chronaxis/execution/calculation_blocks.py +338 -0
- chronaxis/execution/calculation_values.py +55 -0
- chronaxis/execution/can_batch_reader.py +356 -0
- chronaxis/execution/can_reader.py +948 -0
- chronaxis/execution/can_reference_template.py +61 -0
- chronaxis/execution/condition_evidence.py +370 -0
- chronaxis/execution/conditional_integral_facts.py +310 -0
- chronaxis/execution/conditional_integral_reduction.py +216 -0
- chronaxis/execution/csv_observation.py +524 -0
- chronaxis/execution/csv_reader.py +662 -0
- chronaxis/execution/current_message_calculation.py +225 -0
- chronaxis/execution/driver_expression.py +274 -0
- chronaxis/execution/expressions.py +618 -0
- chronaxis/execution/frame_capture.py +245 -0
- chronaxis/execution/groups.py +236 -0
- chronaxis/execution/historical_conditional_blocks.py +264 -0
- chronaxis/execution/historical_conditional_integral.py +226 -0
- chronaxis/execution/historical_conditional_time_calculation.py +368 -0
- chronaxis/execution/historical_integral.py +219 -0
- chronaxis/execution/historical_observation.py +372 -0
- chronaxis/execution/historical_sample_calculation.py +338 -0
- chronaxis/execution/historical_selection_rows.py +300 -0
- chronaxis/execution/historical_time_calculation.py +341 -0
- chronaxis/execution/history.py +572 -0
- chronaxis/execution/history_records.py +225 -0
- chronaxis/execution/hold.py +448 -0
- chronaxis/execution/integral_facts.py +311 -0
- chronaxis/execution/integral_reduction.py +216 -0
- chronaxis/execution/legacy_frame_samples.py +94 -0
- chronaxis/execution/memory_reader.py +247 -0
- chronaxis/execution/message_bindings.py +293 -0
- chronaxis/execution/message_delivery.py +37 -0
- chronaxis/execution/observed_ingestion.py +551 -0
- chronaxis/execution/raw_signal_groups.py +192 -0
- chronaxis/execution/record_alarm_duration.py +114 -0
- chronaxis/execution/record_delta_condition.py +167 -0
- chronaxis/execution/record_diagnostics.py +87 -0
- chronaxis/execution/record_event_durations.py +143 -0
- chronaxis/execution/record_export_samples.py +94 -0
- chronaxis/execution/record_exports.py +155 -0
- chronaxis/execution/record_integral.py +196 -0
- chronaxis/execution/record_point_buffer.py +101 -0
- chronaxis/execution/record_rule_timeline.py +344 -0
- chronaxis/execution/record_sample.py +46 -0
- chronaxis/execution/record_sample_series.py +29 -0
- chronaxis/execution/record_scope_calculations.py +290 -0
- chronaxis/execution/record_selection.py +62 -0
- chronaxis/execution/record_sequences.py +199 -0
- chronaxis/execution/record_session_calculations.py +778 -0
- chronaxis/execution/record_signal_export.py +133 -0
- chronaxis/execution/record_source_cursor.py +295 -0
- chronaxis/execution/record_time_calculation.py +322 -0
- chronaxis/execution/record_time_indexes.py +143 -0
- chronaxis/execution/record_value_history.py +160 -0
- chronaxis/execution/record_windows.py +229 -0
- chronaxis/execution/required_expression.py +52 -0
- chronaxis/execution/retained_metadata.py +71 -0
- chronaxis/execution/run_session.py +402 -0
- chronaxis/execution/scanned_signal_proof.py +550 -0
- chronaxis/execution/signal_validity.py +40 -0
- chronaxis/execution/state.py +280 -0
- chronaxis/execution/temporal_buffer.py +508 -0
- chronaxis/execution/text_can_reader.py +359 -0
- chronaxis/execution/timeline.py +309 -0
- chronaxis/execution/timeline_multi.py +415 -0
- chronaxis/execution/window_delta_events.py +220 -0
- chronaxis/execution/window_replay.py +350 -0
- chronaxis/execution/windows.py +173 -0
- chronaxis/guide/README.md +70 -0
- chronaxis/guide/api/AnalysisError.md +14 -0
- chronaxis/guide/api/AnalysisPlan.md +96 -0
- chronaxis/guide/api/AnalysisResult.md +398 -0
- chronaxis/guide/api/AnalysisRunner.md +155 -0
- chronaxis/guide/api/BatchJob.md +19 -0
- chronaxis/guide/api/BatchJobResult.md +61 -0
- chronaxis/guide/api/BatchPlan.md +48 -0
- chronaxis/guide/api/BatchReport.md +108 -0
- chronaxis/guide/api/BatchRunner.md +84 -0
- chronaxis/guide/api/OutputManifest.md +23 -0
- chronaxis/guide/api/PlanFragment.md +47 -0
- chronaxis/guide/api/PlanValidationError.md +98 -0
- chronaxis/guide/api/PresetSpec.md +63 -0
- chronaxis/guide/api/ResultClosedError.md +14 -0
- chronaxis/guide/api/RunMetadata.md +100 -0
- chronaxis/guide/api/TimeConversion.md +29 -0
- chronaxis/guide/api/TimeOverflowError.md +17 -0
- chronaxis/guide/api/build_preset.md +36 -0
- chronaxis/guide/api/checked_add_ns.md +30 -0
- chronaxis/guide/api/convert_time.md +40 -0
- chronaxis/guide/api/explain_analysis_plan.md +38 -0
- chronaxis/guide/api/index.json +185 -0
- chronaxis/guide/api/load_analysis_plan.md +34 -0
- chronaxis/guide/api/load_batch_plan.md +36 -0
- chronaxis/guide/api/parse_datetime_ns.md +35 -0
- chronaxis/guide/api/parse_duration.md +30 -0
- chronaxis/guide/api/resolve_preset_roles.md +37 -0
- chronaxis/guide/api/run_batch.md +38 -0
- chronaxis/guide/api/shift_times_reference.md +33 -0
- chronaxis/guide/api/time_deltas_reference.md +37 -0
- chronaxis/guide/api/validate_analysis_plan.md +38 -0
- chronaxis/guide/en/README.md +74 -0
- chronaxis/guide/en/api/AnalysisError.md +14 -0
- chronaxis/guide/en/api/AnalysisPlan.md +93 -0
- chronaxis/guide/en/api/AnalysisResult.md +398 -0
- chronaxis/guide/en/api/AnalysisRunner.md +191 -0
- chronaxis/guide/en/api/BatchJob.md +17 -0
- chronaxis/guide/en/api/BatchJobResult.md +43 -0
- chronaxis/guide/en/api/BatchPlan.md +37 -0
- chronaxis/guide/en/api/BatchReport.md +52 -0
- chronaxis/guide/en/api/BatchRunner.md +51 -0
- chronaxis/guide/en/api/OutputManifest.md +23 -0
- chronaxis/guide/en/api/PlanFragment.md +33 -0
- chronaxis/guide/en/api/PlanValidationError.md +58 -0
- chronaxis/guide/en/api/PresetSpec.md +51 -0
- chronaxis/guide/en/api/ResultClosedError.md +14 -0
- chronaxis/guide/en/api/RunMetadata.md +100 -0
- chronaxis/guide/en/api/TimeConversion.md +23 -0
- chronaxis/guide/en/api/TimeOverflowError.md +14 -0
- chronaxis/guide/en/api/build_preset.md +23 -0
- chronaxis/guide/en/api/checked_add_ns.md +21 -0
- chronaxis/guide/en/api/convert_time.md +25 -0
- chronaxis/guide/en/api/explain_analysis_plan.md +30 -0
- chronaxis/guide/en/api/index.json +185 -0
- chronaxis/guide/en/api/load_analysis_plan.md +27 -0
- chronaxis/guide/en/api/load_batch_plan.md +28 -0
- chronaxis/guide/en/api/parse_datetime_ns.md +23 -0
- chronaxis/guide/en/api/parse_duration.md +20 -0
- chronaxis/guide/en/api/resolve_preset_roles.md +23 -0
- chronaxis/guide/en/api/run_batch.md +39 -0
- chronaxis/guide/en/api/shift_times_reference.md +21 -0
- chronaxis/guide/en/api/time_deltas_reference.md +22 -0
- chronaxis/guide/en/api/validate_analysis_plan.md +29 -0
- chronaxis/guide/en/fields/analysis/calculations-all-1.json +345 -0
- chronaxis/guide/en/fields/analysis/calculations-all-2.json +300 -0
- chronaxis/guide/en/fields/analysis/calculations-all-3.json +84 -0
- chronaxis/guide/en/fields/analysis/config_version-all-1.json +24 -0
- chronaxis/guide/en/fields/analysis/dataset-all-1.json +344 -0
- chronaxis/guide/en/fields/analysis/derived-all-1.json +147 -0
- chronaxis/guide/en/fields/analysis/diagnostics-all-1.json +69 -0
- chronaxis/guide/en/fields/analysis/execution-all-1.json +167 -0
- chronaxis/guide/en/fields/analysis/imports-all-1.json +39 -0
- chronaxis/guide/en/fields/analysis/intervals-all-1.json +173 -0
- chronaxis/guide/en/fields/analysis/message_calculations-all-1.json +345 -0
- chronaxis/guide/en/fields/analysis/message_calculations-all-2.json +270 -0
- chronaxis/guide/en/fields/analysis/metadata-all-1.json +24 -0
- chronaxis/guide/en/fields/analysis/outputs-all-1.json +332 -0
- chronaxis/guide/en/fields/analysis/outputs-all-2.json +319 -0
- chronaxis/guide/en/fields/analysis/outputs-all-3.json +321 -0
- chronaxis/guide/en/fields/analysis/outputs-all-4.json +236 -0
- chronaxis/guide/en/fields/analysis/outputs-all-5.json +246 -0
- chronaxis/guide/en/fields/analysis/outputs-all-6.json +214 -0
- chronaxis/guide/en/fields/analysis/overrides-all-1.json +104 -0
- chronaxis/guide/en/fields/analysis/presets-charge_session-1.json +398 -0
- chronaxis/guide/en/fields/analysis/presets-charge_session-2.json +114 -0
- chronaxis/guide/en/fields/analysis/presets-command_response-1.json +376 -0
- chronaxis/guide/en/fields/analysis/presets-fault_context-1.json +285 -0
- chronaxis/guide/en/fields/analysis/presets-threshold_excursion-1.json +317 -0
- chronaxis/guide/en/fields/analysis/rules-condition_duration-1.json +344 -0
- chronaxis/guide/en/fields/analysis/rules-condition_duration-2.json +27 -0
- chronaxis/guide/en/fields/analysis/rules-debounce-1.json +335 -0
- chronaxis/guide/en/fields/analysis/rules-falling_edge-1.json +317 -0
- chronaxis/guide/en/fields/analysis/rules-hysteresis-1.json +334 -0
- chronaxis/guide/en/fields/analysis/rules-hysteresis-2.json +27 -0
- chronaxis/guide/en/fields/analysis/rules-rising_edge-1.json +317 -0
- chronaxis/guide/en/fields/analysis/rules-start_end-1.json +333 -0
- chronaxis/guide/en/fields/analysis/rules-start_end-2.json +60 -0
- chronaxis/guide/en/fields/analysis/rules-start_only-1.json +334 -0
- chronaxis/guide/en/fields/analysis/rules-window_delta-1.json +338 -0
- chronaxis/guide/en/fields/analysis/rules-window_delta-2.json +96 -0
- chronaxis/guide/en/fields/analysis/sequences-all-1.json +378 -0
- chronaxis/guide/en/fields/analysis/sequences-all-2.json +70 -0
- chronaxis/guide/en/fields/analysis/signals-variant-1-1.json +349 -0
- chronaxis/guide/en/fields/analysis/signals-variant-1-2.json +297 -0
- chronaxis/guide/en/fields/analysis/signals-variant-1-3.json +323 -0
- chronaxis/guide/en/fields/analysis/signals-variant-1-4.json +192 -0
- chronaxis/guide/en/fields/analysis/signals-variant-2-1.json +327 -0
- chronaxis/guide/en/fields/analysis/signals-variant-2-2.json +312 -0
- chronaxis/guide/en/fields/analysis/signals-variant-2-3.json +294 -0
- chronaxis/guide/en/fields/analysis/signals-variant-2-4.json +253 -0
- chronaxis/guide/en/fields/analysis/signals-variant-2-5.json +44 -0
- chronaxis/guide/en/fields/analysis/sources-can_asc-1.json +318 -0
- chronaxis/guide/en/fields/analysis/sources-can_asc-2.json +310 -0
- chronaxis/guide/en/fields/analysis/sources-can_asc-3.json +311 -0
- chronaxis/guide/en/fields/analysis/sources-can_asc-4.json +69 -0
- chronaxis/guide/en/fields/analysis/sources-can_blf-1.json +317 -0
- chronaxis/guide/en/fields/analysis/sources-can_blf-2.json +310 -0
- chronaxis/guide/en/fields/analysis/sources-can_blf-3.json +317 -0
- chronaxis/guide/en/fields/analysis/sources-memory-1.json +332 -0
- chronaxis/guide/en/fields/analysis/sources-memory-2.json +125 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-1.json +330 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-10.json +233 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-11.json +225 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-12.json +228 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-13.json +226 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-14.json +230 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-15.json +227 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-16.json +230 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-17.json +238 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-18.json +239 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-19.json +233 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-2.json +310 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-20.json +242 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-21.json +230 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-22.json +228 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-23.json +230 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-24.json +223 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-25.json +290 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-26.json +131 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-3.json +297 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-4.json +226 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-5.json +230 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-6.json +227 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-7.json +230 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-8.json +238 -0
- chronaxis/guide/en/fields/analysis/sources-raw_can_csv-9.json +239 -0
- chronaxis/guide/en/fields/analysis/sources-signal_csv-1.json +331 -0
- chronaxis/guide/en/fields/analysis/sources-signal_csv-2.json +307 -0
- chronaxis/guide/en/fields/analysis/sources-signal_csv-3.json +315 -0
- chronaxis/guide/en/fields/analysis/sources-variant-6-1.json +319 -0
- chronaxis/guide/en/fields/analysis/sources-variant-6-2.json +307 -0
- chronaxis/guide/en/fields/analysis/sources-variant-6-3.json +312 -0
- chronaxis/guide/en/fields/analysis/sources-variant-6-4.json +113 -0
- chronaxis/guide/en/fields/analysis/windows-all-1.json +361 -0
- chronaxis/guide/en/fields/analysis/windows-all-2.json +187 -0
- chronaxis/guide/en/fields/batch/backend-all-1.json +26 -0
- chronaxis/guide/en/fields/batch/batch_version-all-1.json +22 -0
- chronaxis/guide/en/fields/batch/fail_fast-all-1.json +22 -0
- chronaxis/guide/en/fields/batch/inputs-all-1.json +161 -0
- chronaxis/guide/en/fields/batch/jobs-all-1.json +58 -0
- chronaxis/guide/en/fields/batch/process_count-all-1.json +23 -0
- chronaxis/guide/en/fields/batch/source-all-1.json +22 -0
- chronaxis/guide/en/fields/batch/template-all-1.json +22 -0
- chronaxis/guide/en/fields/definitions/derived-all-1.json +121 -0
- chronaxis/guide/en/fields/definitions/signals-all-1.json +336 -0
- chronaxis/guide/en/fields/definitions/signals-all-2.json +307 -0
- chronaxis/guide/en/fields/definitions/signals-all-3.json +290 -0
- chronaxis/guide/en/fields/definitions/signals-all-4.json +347 -0
- chronaxis/guide/en/fields/definitions/signals-all-5.json +297 -0
- chronaxis/guide/en/fields/definitions/signals-all-6.json +259 -0
- chronaxis/guide/en/fields/definitions/signals-all-7.json +117 -0
- chronaxis/guide/en/fields/definitions/sources-all-1.json +332 -0
- chronaxis/guide/en/fields/definitions/sources-all-10.json +306 -0
- chronaxis/guide/en/fields/definitions/sources-all-11.json +294 -0
- chronaxis/guide/en/fields/definitions/sources-all-12.json +212 -0
- chronaxis/guide/en/fields/definitions/sources-all-13.json +217 -0
- chronaxis/guide/en/fields/definitions/sources-all-14.json +213 -0
- chronaxis/guide/en/fields/definitions/sources-all-15.json +214 -0
- chronaxis/guide/en/fields/definitions/sources-all-16.json +215 -0
- chronaxis/guide/en/fields/definitions/sources-all-17.json +213 -0
- chronaxis/guide/en/fields/definitions/sources-all-18.json +214 -0
- chronaxis/guide/en/fields/definitions/sources-all-19.json +213 -0
- chronaxis/guide/en/fields/definitions/sources-all-2.json +323 -0
- chronaxis/guide/en/fields/definitions/sources-all-20.json +217 -0
- chronaxis/guide/en/fields/definitions/sources-all-21.json +210 -0
- chronaxis/guide/en/fields/definitions/sources-all-22.json +214 -0
- chronaxis/guide/en/fields/definitions/sources-all-23.json +218 -0
- chronaxis/guide/en/fields/definitions/sources-all-24.json +209 -0
- chronaxis/guide/en/fields/definitions/sources-all-25.json +215 -0
- chronaxis/guide/en/fields/definitions/sources-all-26.json +218 -0
- chronaxis/guide/en/fields/definitions/sources-all-27.json +224 -0
- chronaxis/guide/en/fields/definitions/sources-all-28.json +215 -0
- chronaxis/guide/en/fields/definitions/sources-all-29.json +205 -0
- chronaxis/guide/en/fields/definitions/sources-all-3.json +303 -0
- chronaxis/guide/en/fields/definitions/sources-all-30.json +298 -0
- chronaxis/guide/en/fields/definitions/sources-all-31.json +315 -0
- chronaxis/guide/en/fields/definitions/sources-all-32.json +306 -0
- chronaxis/guide/en/fields/definitions/sources-all-33.json +209 -0
- chronaxis/guide/en/fields/definitions/sources-all-4.json +336 -0
- chronaxis/guide/en/fields/definitions/sources-all-5.json +299 -0
- chronaxis/guide/en/fields/definitions/sources-all-6.json +307 -0
- chronaxis/guide/en/fields/definitions/sources-all-7.json +320 -0
- chronaxis/guide/en/fields/definitions/sources-all-8.json +303 -0
- chronaxis/guide/en/fields/definitions/sources-all-9.json +315 -0
- chronaxis/guide/en/fields/index.json +3450 -0
- chronaxis/guide/en/fields/mapping/aliases-all-1.json +91 -0
- chronaxis/guide/en/fields/mapping/analysis-all-1.json +382 -0
- chronaxis/guide/en/fields/mapping/analysis-all-10.json +301 -0
- chronaxis/guide/en/fields/mapping/analysis-all-11.json +312 -0
- chronaxis/guide/en/fields/mapping/analysis-all-12.json +311 -0
- chronaxis/guide/en/fields/mapping/analysis-all-13.json +314 -0
- chronaxis/guide/en/fields/mapping/analysis-all-14.json +310 -0
- chronaxis/guide/en/fields/mapping/analysis-all-15.json +297 -0
- chronaxis/guide/en/fields/mapping/analysis-all-16.json +226 -0
- chronaxis/guide/en/fields/mapping/analysis-all-17.json +230 -0
- chronaxis/guide/en/fields/mapping/analysis-all-18.json +227 -0
- chronaxis/guide/en/fields/mapping/analysis-all-19.json +230 -0
- chronaxis/guide/en/fields/mapping/analysis-all-2.json +323 -0
- chronaxis/guide/en/fields/mapping/analysis-all-20.json +221 -0
- chronaxis/guide/en/fields/mapping/analysis-all-21.json +237 -0
- chronaxis/guide/en/fields/mapping/analysis-all-22.json +233 -0
- chronaxis/guide/en/fields/mapping/analysis-all-23.json +222 -0
- chronaxis/guide/en/fields/mapping/analysis-all-24.json +231 -0
- chronaxis/guide/en/fields/mapping/analysis-all-25.json +225 -0
- chronaxis/guide/en/fields/mapping/analysis-all-26.json +230 -0
- chronaxis/guide/en/fields/mapping/analysis-all-27.json +228 -0
- chronaxis/guide/en/fields/mapping/analysis-all-28.json +230 -0
- chronaxis/guide/en/fields/mapping/analysis-all-29.json +223 -0
- chronaxis/guide/en/fields/mapping/analysis-all-3.json +318 -0
- chronaxis/guide/en/fields/mapping/analysis-all-30.json +233 -0
- chronaxis/guide/en/fields/mapping/analysis-all-31.json +218 -0
- chronaxis/guide/en/fields/mapping/analysis-all-32.json +239 -0
- chronaxis/guide/en/fields/mapping/analysis-all-33.json +233 -0
- chronaxis/guide/en/fields/mapping/analysis-all-34.json +225 -0
- chronaxis/guide/en/fields/mapping/analysis-all-35.json +228 -0
- chronaxis/guide/en/fields/mapping/analysis-all-36.json +226 -0
- chronaxis/guide/en/fields/mapping/analysis-all-37.json +244 -0
- chronaxis/guide/en/fields/mapping/analysis-all-38.json +326 -0
- chronaxis/guide/en/fields/mapping/analysis-all-39.json +299 -0
- chronaxis/guide/en/fields/mapping/analysis-all-4.json +297 -0
- chronaxis/guide/en/fields/mapping/analysis-all-40.json +311 -0
- chronaxis/guide/en/fields/mapping/analysis-all-41.json +310 -0
- chronaxis/guide/en/fields/mapping/analysis-all-42.json +346 -0
- chronaxis/guide/en/fields/mapping/analysis-all-43.json +267 -0
- chronaxis/guide/en/fields/mapping/analysis-all-44.json +327 -0
- chronaxis/guide/en/fields/mapping/analysis-all-45.json +279 -0
- chronaxis/guide/en/fields/mapping/analysis-all-46.json +327 -0
- chronaxis/guide/en/fields/mapping/analysis-all-47.json +312 -0
- chronaxis/guide/en/fields/mapping/analysis-all-48.json +294 -0
- chronaxis/guide/en/fields/mapping/analysis-all-49.json +253 -0
- chronaxis/guide/en/fields/mapping/analysis-all-5.json +312 -0
- chronaxis/guide/en/fields/mapping/analysis-all-50.json +346 -0
- chronaxis/guide/en/fields/mapping/analysis-all-51.json +324 -0
- chronaxis/guide/en/fields/mapping/analysis-all-52.json +335 -0
- chronaxis/guide/en/fields/mapping/analysis-all-53.json +317 -0
- chronaxis/guide/en/fields/mapping/analysis-all-54.json +316 -0
- chronaxis/guide/en/fields/mapping/analysis-all-55.json +302 -0
- chronaxis/guide/en/fields/mapping/analysis-all-56.json +319 -0
- chronaxis/guide/en/fields/mapping/analysis-all-57.json +334 -0
- chronaxis/guide/en/fields/mapping/analysis-all-58.json +333 -0
- chronaxis/guide/en/fields/mapping/analysis-all-59.json +359 -0
- chronaxis/guide/en/fields/mapping/analysis-all-6.json +327 -0
- chronaxis/guide/en/fields/mapping/analysis-all-60.json +303 -0
- chronaxis/guide/en/fields/mapping/analysis-all-61.json +326 -0
- chronaxis/guide/en/fields/mapping/analysis-all-62.json +301 -0
- chronaxis/guide/en/fields/mapping/analysis-all-63.json +326 -0
- chronaxis/guide/en/fields/mapping/analysis-all-64.json +367 -0
- chronaxis/guide/en/fields/mapping/analysis-all-65.json +334 -0
- chronaxis/guide/en/fields/mapping/analysis-all-66.json +358 -0
- chronaxis/guide/en/fields/mapping/analysis-all-67.json +349 -0
- chronaxis/guide/en/fields/mapping/analysis-all-68.json +331 -0
- chronaxis/guide/en/fields/mapping/analysis-all-69.json +304 -0
- chronaxis/guide/en/fields/mapping/analysis-all-7.json +303 -0
- chronaxis/guide/en/fields/mapping/analysis-all-70.json +349 -0
- chronaxis/guide/en/fields/mapping/analysis-all-71.json +288 -0
- chronaxis/guide/en/fields/mapping/analysis-all-72.json +316 -0
- chronaxis/guide/en/fields/mapping/analysis-all-73.json +266 -0
- chronaxis/guide/en/fields/mapping/analysis-all-74.json +227 -0
- chronaxis/guide/en/fields/mapping/analysis-all-75.json +239 -0
- chronaxis/guide/en/fields/mapping/analysis-all-76.json +274 -0
- chronaxis/guide/en/fields/mapping/analysis-all-77.json +380 -0
- chronaxis/guide/en/fields/mapping/analysis-all-78.json +313 -0
- chronaxis/guide/en/fields/mapping/analysis-all-79.json +338 -0
- chronaxis/guide/en/fields/mapping/analysis-all-8.json +292 -0
- chronaxis/guide/en/fields/mapping/analysis-all-80.json +304 -0
- chronaxis/guide/en/fields/mapping/analysis-all-81.json +140 -0
- chronaxis/guide/en/fields/mapping/analysis-all-9.json +332 -0
- chronaxis/guide/en/fields/mapping/io_policy-all-1.json +19 -0
- chronaxis/guide/en/fields/mapping/mapping_version-all-1.json +19 -0
- chronaxis/guide/en/fields/mapping/path_base-all-1.json +19 -0
- chronaxis/guide/en/fields/mapping/sections-all-1.json +402 -0
- chronaxis/guide/en/fields/mapping/sections-all-2.json +232 -0
- chronaxis/guide/en/semantics.md +70 -0
- chronaxis/guide/en/tasks.json +290 -0
- chronaxis/guide/en/workflow.md +41 -0
- chronaxis/guide/examples/analysis-imports.yaml +22 -0
- chronaxis/guide/examples/analysis.yaml +23 -0
- chronaxis/guide/examples/batch-minimal.yaml +3 -0
- chronaxis/guide/examples/conditional-energy.yaml +36 -0
- chronaxis/guide/examples/data/activity.csv +6 -0
- chronaxis/guide/examples/data/can/activity.asc +11 -0
- chronaxis/guide/examples/data/can/calculation-minimal.asc +6 -0
- chronaxis/guide/examples/data/can/conditional-energy/part-1.asc +92 -0
- chronaxis/guide/examples/data/can/conditional-energy/part-2.asc +36 -0
- chronaxis/guide/examples/data/can/conditional-energy/signals.dbc +10 -0
- chronaxis/guide/examples/data/can/execution-comparison.asc +12 -0
- chronaxis/guide/examples/data/can/execution-report.asc +4 -0
- chronaxis/guide/examples/data/can/expression-extended.asc +11 -0
- chronaxis/guide/examples/data/can/interval-actual.asc +6 -0
- chronaxis/guide/examples/data/can/preset-charge-energy.asc +15 -0
- chronaxis/guide/examples/data/can/preset-charge-minimal.asc +11 -0
- chronaxis/guide/examples/data/can/preset-command-automatic.asc +11 -0
- chronaxis/guide/examples/data/can/preset-fault-context.asc +7 -0
- chronaxis/guide/examples/data/can/preset-threshold-delay.asc +7 -0
- chronaxis/guide/examples/data/can/preset-threshold-partial.asc +7 -0
- chronaxis/guide/examples/data/can/quality.asc +6 -0
- chronaxis/guide/examples/data/can/quickstart-parts/part1.asc +4 -0
- chronaxis/guide/examples/data/can/quickstart-parts/part2.asc +3 -0
- chronaxis/guide/examples/data/can/quickstart.asc +6 -0
- chronaxis/guide/examples/data/can/rule-condition_duration-extended.asc +35 -0
- chronaxis/guide/examples/data/can/rule-condition_duration-minimal.asc +19 -0
- chronaxis/guide/examples/data/can/rule-debounce-extended.asc +19 -0
- chronaxis/guide/examples/data/can/rule-falling_edge-extended.asc +35 -0
- chronaxis/guide/examples/data/can/rule-hysteresis-extended.asc +19 -0
- chronaxis/guide/examples/data/can/rule-start_end-extended.asc +35 -0
- chronaxis/guide/examples/data/can/rule-start_only-extended.asc +19 -0
- chronaxis/guide/examples/data/can/rule-window_delta-extended.asc +19 -0
- chronaxis/guide/examples/data/can/sequence-outcomes.asc +19 -0
- chronaxis/guide/examples/data/can/signal-types.asc +13 -0
- chronaxis/guide/examples/data/can/start-end.asc +30 -0
- chronaxis/guide/examples/data/can/teaching-base.asc +58 -0
- chronaxis/guide/examples/data/can/teaching.dbc +53 -0
- chronaxis/guide/examples/data/joint-current.csv +5 -0
- chronaxis/guide/examples/data/joint.asc +5 -0
- chronaxis/guide/examples/data/joint.dbc +7 -0
- chronaxis/guide/examples/data/message-clean.asc +6 -0
- chronaxis/guide/examples/data/message-direction.asc +7 -0
- chronaxis/guide/examples/data/message-direction.dbc +7 -0
- chronaxis/guide/examples/data/power.blf +0 -0
- chronaxis/guide/examples/data/power.dbc +6 -0
- chronaxis/guide/examples/data/quality.csv +5 -0
- chronaxis/guide/examples/data/raw-can-example.csv +5 -0
- chronaxis/guide/examples/data/signal-types.csv +5 -0
- chronaxis/guide/examples/data/signals.csv +6 -0
- chronaxis/guide/examples/data/timing.asc +6 -0
- chronaxis/guide/examples/data/timing.dbc +11 -0
- chronaxis/guide/examples/export-can-minimal.yaml +24 -0
- chronaxis/guide/examples/input-csv-minimal.yaml +23 -0
- chronaxis/guide/examples/preset-charge-energy.yaml +41 -0
- chronaxis/guide/examples/preset-charge-minimal.yaml +31 -0
- chronaxis/guide/examples/preset-fault-context.yaml +27 -0
- chronaxis/guide/examples/quality.yaml +19 -0
- chronaxis/guide/examples/sequence-outcomes.yaml +39 -0
- chronaxis/guide/examples/shared/definitions.yaml +14 -0
- chronaxis/guide/examples/signal-enum-minimal.yaml +19 -0
- chronaxis/guide/examples/signal-number-conversion.yaml +24 -0
- chronaxis/guide/examples/window-merged.yaml +28 -0
- chronaxis/guide/fields/analysis/calculations-all-1.json +360 -0
- chronaxis/guide/fields/analysis/calculations-all-2.json +299 -0
- chronaxis/guide/fields/analysis/calculations-all-3.json +70 -0
- chronaxis/guide/fields/analysis/config_version-all-1.json +24 -0
- chronaxis/guide/fields/analysis/dataset-all-1.json +344 -0
- chronaxis/guide/fields/analysis/derived-all-1.json +147 -0
- chronaxis/guide/fields/analysis/diagnostics-all-1.json +69 -0
- chronaxis/guide/fields/analysis/execution-all-1.json +167 -0
- chronaxis/guide/fields/analysis/imports-all-1.json +39 -0
- chronaxis/guide/fields/analysis/intervals-all-1.json +173 -0
- chronaxis/guide/fields/analysis/message_calculations-all-1.json +360 -0
- chronaxis/guide/fields/analysis/message_calculations-all-2.json +255 -0
- chronaxis/guide/fields/analysis/metadata-all-1.json +24 -0
- chronaxis/guide/fields/analysis/outputs-all-1.json +349 -0
- chronaxis/guide/fields/analysis/outputs-all-2.json +302 -0
- chronaxis/guide/fields/analysis/outputs-all-3.json +321 -0
- chronaxis/guide/fields/analysis/outputs-all-4.json +253 -0
- chronaxis/guide/fields/analysis/outputs-all-5.json +244 -0
- chronaxis/guide/fields/analysis/outputs-all-6.json +199 -0
- chronaxis/guide/fields/analysis/overrides-all-1.json +104 -0
- chronaxis/guide/fields/analysis/presets-charge_session-1.json +398 -0
- chronaxis/guide/fields/analysis/presets-charge_session-2.json +114 -0
- chronaxis/guide/fields/analysis/presets-command_response-1.json +376 -0
- chronaxis/guide/fields/analysis/presets-fault_context-1.json +285 -0
- chronaxis/guide/fields/analysis/presets-threshold_excursion-1.json +317 -0
- chronaxis/guide/fields/analysis/rules-condition_duration-1.json +344 -0
- chronaxis/guide/fields/analysis/rules-condition_duration-2.json +27 -0
- chronaxis/guide/fields/analysis/rules-debounce-1.json +335 -0
- chronaxis/guide/fields/analysis/rules-falling_edge-1.json +317 -0
- chronaxis/guide/fields/analysis/rules-hysteresis-1.json +334 -0
- chronaxis/guide/fields/analysis/rules-hysteresis-2.json +27 -0
- chronaxis/guide/fields/analysis/rules-rising_edge-1.json +317 -0
- chronaxis/guide/fields/analysis/rules-start_end-1.json +349 -0
- chronaxis/guide/fields/analysis/rules-start_end-2.json +44 -0
- chronaxis/guide/fields/analysis/rules-start_only-1.json +334 -0
- chronaxis/guide/fields/analysis/rules-window_delta-1.json +356 -0
- chronaxis/guide/fields/analysis/rules-window_delta-2.json +78 -0
- chronaxis/guide/fields/analysis/sequences-all-1.json +394 -0
- chronaxis/guide/fields/analysis/sequences-all-2.json +54 -0
- chronaxis/guide/fields/analysis/signals-variant-1-1.json +349 -0
- chronaxis/guide/fields/analysis/signals-variant-1-2.json +297 -0
- chronaxis/guide/fields/analysis/signals-variant-1-3.json +340 -0
- chronaxis/guide/fields/analysis/signals-variant-1-4.json +175 -0
- chronaxis/guide/fields/analysis/signals-variant-2-1.json +327 -0
- chronaxis/guide/fields/analysis/signals-variant-2-2.json +335 -0
- chronaxis/guide/fields/analysis/signals-variant-2-3.json +289 -0
- chronaxis/guide/fields/analysis/signals-variant-2-4.json +270 -0
- chronaxis/guide/fields/analysis/sources-can_asc-1.json +318 -0
- chronaxis/guide/fields/analysis/sources-can_asc-2.json +310 -0
- chronaxis/guide/fields/analysis/sources-can_asc-3.json +311 -0
- chronaxis/guide/fields/analysis/sources-can_asc-4.json +69 -0
- chronaxis/guide/fields/analysis/sources-can_blf-1.json +317 -0
- chronaxis/guide/fields/analysis/sources-can_blf-2.json +310 -0
- chronaxis/guide/fields/analysis/sources-can_blf-3.json +317 -0
- chronaxis/guide/fields/analysis/sources-memory-1.json +347 -0
- chronaxis/guide/fields/analysis/sources-memory-2.json +110 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-1.json +330 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-10.json +233 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-11.json +225 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-12.json +228 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-13.json +226 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-14.json +230 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-15.json +227 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-16.json +230 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-17.json +238 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-18.json +239 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-19.json +233 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-2.json +310 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-20.json +242 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-21.json +230 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-22.json +228 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-23.json +230 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-24.json +223 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-25.json +290 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-26.json +131 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-3.json +297 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-4.json +226 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-5.json +230 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-6.json +227 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-7.json +230 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-8.json +238 -0
- chronaxis/guide/fields/analysis/sources-raw_can_csv-9.json +239 -0
- chronaxis/guide/fields/analysis/sources-signal_csv-1.json +331 -0
- chronaxis/guide/fields/analysis/sources-signal_csv-2.json +327 -0
- chronaxis/guide/fields/analysis/sources-signal_csv-3.json +295 -0
- chronaxis/guide/fields/analysis/sources-variant-6-1.json +319 -0
- chronaxis/guide/fields/analysis/sources-variant-6-2.json +327 -0
- chronaxis/guide/fields/analysis/sources-variant-6-3.json +314 -0
- chronaxis/guide/fields/analysis/sources-variant-6-4.json +91 -0
- chronaxis/guide/fields/analysis/windows-all-1.json +361 -0
- chronaxis/guide/fields/analysis/windows-all-2.json +187 -0
- chronaxis/guide/fields/batch/backend-all-1.json +26 -0
- chronaxis/guide/fields/batch/batch_version-all-1.json +22 -0
- chronaxis/guide/fields/batch/fail_fast-all-1.json +22 -0
- chronaxis/guide/fields/batch/inputs-all-1.json +161 -0
- chronaxis/guide/fields/batch/jobs-all-1.json +58 -0
- chronaxis/guide/fields/batch/process_count-all-1.json +23 -0
- chronaxis/guide/fields/batch/source-all-1.json +22 -0
- chronaxis/guide/fields/batch/template-all-1.json +22 -0
- chronaxis/guide/fields/definitions/derived-all-1.json +121 -0
- chronaxis/guide/fields/definitions/signals-all-1.json +336 -0
- chronaxis/guide/fields/definitions/signals-all-2.json +307 -0
- chronaxis/guide/fields/definitions/signals-all-3.json +305 -0
- chronaxis/guide/fields/definitions/signals-all-4.json +352 -0
- chronaxis/guide/fields/definitions/signals-all-5.json +311 -0
- chronaxis/guide/fields/definitions/signals-all-6.json +254 -0
- chronaxis/guide/fields/definitions/signals-all-7.json +88 -0
- chronaxis/guide/fields/definitions/sources-all-1.json +332 -0
- chronaxis/guide/fields/definitions/sources-all-10.json +307 -0
- chronaxis/guide/fields/definitions/sources-all-11.json +280 -0
- chronaxis/guide/fields/definitions/sources-all-12.json +209 -0
- chronaxis/guide/fields/definitions/sources-all-13.json +219 -0
- chronaxis/guide/fields/definitions/sources-all-14.json +213 -0
- chronaxis/guide/fields/definitions/sources-all-15.json +212 -0
- chronaxis/guide/fields/definitions/sources-all-16.json +232 -0
- chronaxis/guide/fields/definitions/sources-all-17.json +213 -0
- chronaxis/guide/fields/definitions/sources-all-18.json +212 -0
- chronaxis/guide/fields/definitions/sources-all-19.json +217 -0
- chronaxis/guide/fields/definitions/sources-all-2.json +336 -0
- chronaxis/guide/fields/definitions/sources-all-20.json +228 -0
- chronaxis/guide/fields/definitions/sources-all-21.json +212 -0
- chronaxis/guide/fields/definitions/sources-all-22.json +232 -0
- chronaxis/guide/fields/definitions/sources-all-23.json +213 -0
- chronaxis/guide/fields/definitions/sources-all-24.json +212 -0
- chronaxis/guide/fields/definitions/sources-all-25.json +217 -0
- chronaxis/guide/fields/definitions/sources-all-26.json +228 -0
- chronaxis/guide/fields/definitions/sources-all-27.json +212 -0
- chronaxis/guide/fields/definitions/sources-all-28.json +217 -0
- chronaxis/guide/fields/definitions/sources-all-29.json +227 -0
- chronaxis/guide/fields/definitions/sources-all-3.json +306 -0
- chronaxis/guide/fields/definitions/sources-all-30.json +333 -0
- chronaxis/guide/fields/definitions/sources-all-31.json +302 -0
- chronaxis/guide/fields/definitions/sources-all-32.json +319 -0
- chronaxis/guide/fields/definitions/sources-all-33.json +89 -0
- chronaxis/guide/fields/definitions/sources-all-4.json +336 -0
- chronaxis/guide/fields/definitions/sources-all-5.json +313 -0
- chronaxis/guide/fields/definitions/sources-all-6.json +292 -0
- chronaxis/guide/fields/definitions/sources-all-7.json +319 -0
- chronaxis/guide/fields/definitions/sources-all-8.json +315 -0
- chronaxis/guide/fields/definitions/sources-all-9.json +318 -0
- chronaxis/guide/fields/index.json +3432 -0
- chronaxis/guide/fields/mapping/aliases-all-1.json +91 -0
- chronaxis/guide/fields/mapping/analysis-all-1.json +382 -0
- chronaxis/guide/fields/mapping/analysis-all-10.json +307 -0
- chronaxis/guide/fields/mapping/analysis-all-11.json +311 -0
- chronaxis/guide/fields/mapping/analysis-all-12.json +329 -0
- chronaxis/guide/fields/mapping/analysis-all-13.json +294 -0
- chronaxis/guide/fields/mapping/analysis-all-14.json +311 -0
- chronaxis/guide/fields/mapping/analysis-all-15.json +280 -0
- chronaxis/guide/fields/mapping/analysis-all-16.json +227 -0
- chronaxis/guide/fields/mapping/analysis-all-17.json +230 -0
- chronaxis/guide/fields/mapping/analysis-all-18.json +221 -0
- chronaxis/guide/fields/mapping/analysis-all-19.json +237 -0
- chronaxis/guide/fields/mapping/analysis-all-2.json +342 -0
- chronaxis/guide/fields/mapping/analysis-all-20.json +233 -0
- chronaxis/guide/fields/mapping/analysis-all-21.json +244 -0
- chronaxis/guide/fields/mapping/analysis-all-22.json +228 -0
- chronaxis/guide/fields/mapping/analysis-all-23.json +226 -0
- chronaxis/guide/fields/mapping/analysis-all-24.json +230 -0
- chronaxis/guide/fields/mapping/analysis-all-25.json +227 -0
- chronaxis/guide/fields/mapping/analysis-all-26.json +230 -0
- chronaxis/guide/fields/mapping/analysis-all-27.json +221 -0
- chronaxis/guide/fields/mapping/analysis-all-28.json +237 -0
- chronaxis/guide/fields/mapping/analysis-all-29.json +233 -0
- chronaxis/guide/fields/mapping/analysis-all-3.json +322 -0
- chronaxis/guide/fields/mapping/analysis-all-30.json +244 -0
- chronaxis/guide/fields/mapping/analysis-all-31.json +228 -0
- chronaxis/guide/fields/mapping/analysis-all-32.json +226 -0
- chronaxis/guide/fields/mapping/analysis-all-33.json +230 -0
- chronaxis/guide/fields/mapping/analysis-all-34.json +227 -0
- chronaxis/guide/fields/mapping/analysis-all-35.json +230 -0
- chronaxis/guide/fields/mapping/analysis-all-36.json +221 -0
- chronaxis/guide/fields/mapping/analysis-all-37.json +291 -0
- chronaxis/guide/fields/mapping/analysis-all-38.json +315 -0
- chronaxis/guide/fields/mapping/analysis-all-39.json +304 -0
- chronaxis/guide/fields/mapping/analysis-all-4.json +312 -0
- chronaxis/guide/fields/mapping/analysis-all-40.json +307 -0
- chronaxis/guide/fields/mapping/analysis-all-41.json +292 -0
- chronaxis/guide/fields/mapping/analysis-all-42.json +333 -0
- chronaxis/guide/fields/mapping/analysis-all-43.json +296 -0
- chronaxis/guide/fields/mapping/analysis-all-44.json +322 -0
- chronaxis/guide/fields/mapping/analysis-all-45.json +298 -0
- chronaxis/guide/fields/mapping/analysis-all-46.json +347 -0
- chronaxis/guide/fields/mapping/analysis-all-47.json +302 -0
- chronaxis/guide/fields/mapping/analysis-all-48.json +263 -0
- chronaxis/guide/fields/mapping/analysis-all-49.json +301 -0
- chronaxis/guide/fields/mapping/analysis-all-5.json +313 -0
- chronaxis/guide/fields/mapping/analysis-all-50.json +336 -0
- chronaxis/guide/fields/mapping/analysis-all-51.json +335 -0
- chronaxis/guide/fields/mapping/analysis-all-52.json +335 -0
- chronaxis/guide/fields/mapping/analysis-all-53.json +334 -0
- chronaxis/guide/fields/mapping/analysis-all-54.json +339 -0
- chronaxis/guide/fields/mapping/analysis-all-55.json +335 -0
- chronaxis/guide/fields/mapping/analysis-all-56.json +336 -0
- chronaxis/guide/fields/mapping/analysis-all-57.json +335 -0
- chronaxis/guide/fields/mapping/analysis-all-58.json +333 -0
- chronaxis/guide/fields/mapping/analysis-all-59.json +325 -0
- chronaxis/guide/fields/mapping/analysis-all-6.json +323 -0
- chronaxis/guide/fields/mapping/analysis-all-60.json +334 -0
- chronaxis/guide/fields/mapping/analysis-all-61.json +311 -0
- chronaxis/guide/fields/mapping/analysis-all-62.json +289 -0
- chronaxis/guide/fields/mapping/analysis-all-63.json +383 -0
- chronaxis/guide/fields/mapping/analysis-all-64.json +357 -0
- chronaxis/guide/fields/mapping/analysis-all-65.json +375 -0
- chronaxis/guide/fields/mapping/analysis-all-66.json +351 -0
- chronaxis/guide/fields/mapping/analysis-all-67.json +346 -0
- chronaxis/guide/fields/mapping/analysis-all-68.json +317 -0
- chronaxis/guide/fields/mapping/analysis-all-69.json +313 -0
- chronaxis/guide/fields/mapping/analysis-all-7.json +306 -0
- chronaxis/guide/fields/mapping/analysis-all-70.json +326 -0
- chronaxis/guide/fields/mapping/analysis-all-71.json +316 -0
- chronaxis/guide/fields/mapping/analysis-all-72.json +264 -0
- chronaxis/guide/fields/mapping/analysis-all-73.json +228 -0
- chronaxis/guide/fields/mapping/analysis-all-74.json +241 -0
- chronaxis/guide/fields/mapping/analysis-all-75.json +273 -0
- chronaxis/guide/fields/mapping/analysis-all-76.json +382 -0
- chronaxis/guide/fields/mapping/analysis-all-77.json +328 -0
- chronaxis/guide/fields/mapping/analysis-all-78.json +338 -0
- chronaxis/guide/fields/mapping/analysis-all-79.json +304 -0
- chronaxis/guide/fields/mapping/analysis-all-8.json +309 -0
- chronaxis/guide/fields/mapping/analysis-all-80.json +140 -0
- chronaxis/guide/fields/mapping/analysis-all-9.json +329 -0
- chronaxis/guide/fields/mapping/io_policy-all-1.json +19 -0
- chronaxis/guide/fields/mapping/mapping_version-all-1.json +19 -0
- chronaxis/guide/fields/mapping/path_base-all-1.json +19 -0
- chronaxis/guide/fields/mapping/sections-all-1.json +402 -0
- chronaxis/guide/fields/mapping/sections-all-2.json +232 -0
- chronaxis/guide/lookup.py +90 -0
- chronaxis/guide/manifest.json +614 -0
- chronaxis/guide/run_analysis.py +34 -0
- chronaxis/guide/schemas/analysis.schema.json +8451 -0
- chronaxis/guide/schemas/batch-v1.schema.json +172 -0
- chronaxis/guide/schemas/definitions.schema.json +29 -0
- chronaxis/guide/schemas/legacy-import-v1.schema.json +143 -0
- chronaxis/guide/semantics.md +62 -0
- chronaxis/guide/tasks.json +290 -0
- chronaxis/guide/workflow.md +38 -0
- chronaxis/legacy/__init__.py +46 -0
- chronaxis/legacy/batch_read.py +412 -0
- chronaxis/legacy/batch_validation.py +134 -0
- chronaxis/legacy/batch_wire.py +264 -0
- chronaxis/legacy/batch_worker.py +417 -0
- chronaxis/legacy/binding.py +154 -0
- chronaxis/legacy/dbc_cycles.py +47 -0
- chronaxis/legacy/decode_policy.py +28 -0
- chronaxis/legacy/disjunction.py +79 -0
- chronaxis/legacy/export_worker.py +147 -0
- chronaxis/legacy/export_write.py +378 -0
- chronaxis/legacy/message_store.py +562 -0
- chronaxis/legacy/process_read.py +526 -0
- chronaxis/legacy/raw_store.py +341 -0
- chronaxis/legacy/records.py +709 -0
- chronaxis/legacy/required_records.py +122 -0
- chronaxis/legacy/sum.py +403 -0
- chronaxis/legacy/sum_numpy.py +43 -0
- chronaxis/legacy/updates.py +277 -0
- chronaxis/legacy/vendor/sclicer_functions_v1/can_processor.py +138 -0
- chronaxis/legacy/vendor/sclicer_functions_v1/file_processor.py +218 -0
- chronaxis/legacy/vendor/sclicer_functions_v1/utils.py +447 -0
- chronaxis/legacy/worker.py +352 -0
- chronaxis/migration/__init__.py +11 -0
- chronaxis/migration/api.py +270 -0
- chronaxis/migration/ini.py +110 -0
- chronaxis/migration/legacy_sum.py +304 -0
- chronaxis/migration/models.py +83 -0
- chronaxis/migration/publication.py +230 -0
- chronaxis/migration/sclicer.py +241 -0
- chronaxis/migration/slope.py +78 -0
- chronaxis/migration/start_end.py +48 -0
- chronaxis/planning/__init__.py +19 -0
- chronaxis/planning/channels.py +30 -0
- chronaxis/planning/checks.py +447 -0
- chronaxis/planning/config_groups.py +215 -0
- chronaxis/planning/dbc_defaults.py +88 -0
- chronaxis/planning/export_options.py +247 -0
- chronaxis/planning/input_defaults.py +62 -0
- chronaxis/planning/input_paths.py +124 -0
- chronaxis/planning/input_requirements.py +250 -0
- chronaxis/planning/inputs.py +306 -0
- chronaxis/planning/intervals.py +242 -0
- chronaxis/planning/legacy_execution.py +38 -0
- chronaxis/planning/message_calculations.py +171 -0
- chronaxis/planning/models.py +369 -0
- chronaxis/planning/nodes.py +355 -0
- chronaxis/planning/plan.py +294 -0
- chronaxis/planning/preset_models.py +211 -0
- chronaxis/planning/record_execution.py +76 -0
- chronaxis/planning/reports.py +523 -0
- chronaxis/planning/sequences.py +91 -0
- chronaxis/planning/signal_groups.py +61 -0
- chronaxis/planning/signal_validity.py +46 -0
- chronaxis/planning/text_inputs.py +110 -0
- chronaxis/presets.py +270 -0
- chronaxis/results/__init__.py +34 -0
- chronaxis/results/analysis_outcome.py +67 -0
- chronaxis/results/artifact_exports.py +212 -0
- chronaxis/results/binding_metadata.py +54 -0
- chronaxis/results/budget.py +138 -0
- chronaxis/results/can_metadata.py +247 -0
- chronaxis/results/codec.py +246 -0
- chronaxis/results/errors.py +25 -0
- chronaxis/results/export_files.py +216 -0
- chronaxis/results/frame_exports.py +299 -0
- chronaxis/results/frame_patch.py +186 -0
- chronaxis/results/frame_rebuild.py +458 -0
- chronaxis/results/frame_sort.py +223 -0
- chronaxis/results/input_diagnostics.py +51 -0
- chronaxis/results/manifest.py +343 -0
- chronaxis/results/merge_runs.py +207 -0
- chronaxis/results/owned_directory.py +32 -0
- chronaxis/results/raw_exports.py +689 -0
- chronaxis/results/readable.py +355 -0
- chronaxis/results/readable_format.py +94 -0
- chronaxis/results/result.py +734 -0
- chronaxis/results/rows.py +57 -0
- chronaxis/results/signal_exports.py +209 -0
- chronaxis/results/signal_grid.py +219 -0
- chronaxis/results/spool.py +421 -0
- chronaxis/results/summary.py +350 -0
- chronaxis/results/text_can_metadata.py +64 -0
- chronaxis/results/threshold_metadata.py +105 -0
- chronaxis/runner.py +121 -0
- chronaxis/sources/__init__.py +23 -0
- chronaxis/sources/asc.py +412 -0
- chronaxis/sources/blf.py +101 -0
- chronaxis/sources/can_spec.py +179 -0
- chronaxis/sources/can_updates.py +160 -0
- chronaxis/sources/csv_spec.py +133 -0
- chronaxis/sources/descriptions.py +65 -0
- chronaxis/sources/memory.py +299 -0
- chronaxis/sources/models.py +497 -0
- chronaxis/sources/packing.py +170 -0
- chronaxis/sources/protocol.py +221 -0
- chronaxis/sources/raw_can.py +62 -0
- chronaxis/sources/raw_csv.py +470 -0
- chronaxis/sources/raw_csv_layout.py +310 -0
- chronaxis/sources/signal_csv.py +608 -0
- chronaxis/sources/text_can_decode.py +421 -0
- chronaxis/sources/text_can_ref.py +48 -0
- chronaxis/sources/text_can_spec.py +61 -0
- chronaxis/timebase/__init__.py +19 -0
- chronaxis/timebase/conversion.py +364 -0
- chronaxis/timebase/numpy_ops.py +104 -0
- chronaxis/user_guide.py +81 -0
- chronaxis-0.1.0.dev0.dist-info/METADATA +172 -0
- chronaxis-0.1.0.dev0.dist-info/RECORD +917 -0
- chronaxis-0.1.0.dev0.dist-info/WHEEL +5 -0
- chronaxis-0.1.0.dev0.dist-info/entry_points.txt +2 -0
- chronaxis-0.1.0.dev0.dist-info/licenses/LICENSE +21 -0
- chronaxis-0.1.0.dev0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
"""逐块累计整窗积分覆盖、质量和来源,并为保留的诊断申请预算。
|
|
2
|
+
|
|
3
|
+
输入为真实观测范围、原 CalculationDefinition 和有限块 IntegralFacts;输出为冻结整窗事实。
|
|
4
|
+
先检查连续性与未知覆盖,再申请候选工作空间,最后整体替换当前前缀。
|
|
5
|
+
不保存面积或时间轴,不执行浮点求和、单位转换或 CalculationResult 分类。
|
|
6
|
+
未知区间与完整来源可能随窗口增长;超过 ResourceBudget 明确失败,不截断诊断。
|
|
7
|
+
预算采用既有保守元数据估算,不代表全进程 RSS;不读写文件或历史快照。
|
|
8
|
+
budget 属于调用方。本对象关闭后不再持有 facts;调用方独立保留返回引用须另计预算。
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
# 复用冻结事实、整数时间及预算协议,数值核仍由两个原积分项后端独立执行。
|
|
12
|
+
from ..core.integral_terms import IntegralFacts
|
|
13
|
+
from ..core.calculations import CalculationDefinition, calculation_unit
|
|
14
|
+
from ..core.models import Interval, SourceRef
|
|
15
|
+
from ..core.types import QualityFlag as Q
|
|
16
|
+
from ..core.validation import require_text
|
|
17
|
+
from ..results.budget import ResourceBudget
|
|
18
|
+
from ..results.errors import ResultClosedError
|
|
19
|
+
from .history import _metadata_bytes
|
|
20
|
+
from .retained_metadata import retained_metadata_bytes, reference_workspace
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _refs_cost(refs: tuple[SourceRef, ...]) -> int:
|
|
24
|
+
"""估算完整来源实体及冻结容器,不承担JSON工作副本。
|
|
25
|
+
|
|
26
|
+
参数: refs 为调用方已经提供的冻结定位。返回: 保守 bytes。
|
|
27
|
+
异常: ResultFormatError 为既有估算协议无法处理的字段。
|
|
28
|
+
"""
|
|
29
|
+
# 逐字段实体估算含实例字典/长文本;2048另覆盖每项持有和局部状态余量。
|
|
30
|
+
try:
|
|
31
|
+
return retained_metadata_bytes(refs) + 2048 * len(refs)
|
|
32
|
+
finally:
|
|
33
|
+
# 费用估算中取消也不让本层参数在TB持有完整定位tuple。
|
|
34
|
+
refs = None
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _unique_refs(existing, incoming):
|
|
38
|
+
"""按完整类型和值保留第一次出现的定位,保持原出现顺序。
|
|
39
|
+
|
|
40
|
+
参数: existing/incoming 为已校验来源 tuple。返回: 去重后的 tuple。
|
|
41
|
+
异常: MemoryError 为预算已申请后的实际分配失败。
|
|
42
|
+
"""
|
|
43
|
+
# 无未计费的全量哈希表;此函数只在调用方已申请候选预算后执行。
|
|
44
|
+
result = None
|
|
45
|
+
try:
|
|
46
|
+
result = list(existing)
|
|
47
|
+
for ref in incoming:
|
|
48
|
+
# 显式短路和原any相同;不留下会在异步取消时保全list的生成器帧。
|
|
49
|
+
duplicate = False
|
|
50
|
+
for old in result:
|
|
51
|
+
if type(ref) is type(old) and ref == old:
|
|
52
|
+
duplicate = True
|
|
53
|
+
break
|
|
54
|
+
if not duplicate:
|
|
55
|
+
result.append(ref)
|
|
56
|
+
return tuple(result)
|
|
57
|
+
finally:
|
|
58
|
+
# 原异常TB可能由调用者保留;不把本层新list钉在已抵费的栈帧里。
|
|
59
|
+
result = existing = incoming = ref = old = None
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _join_unknown(existing, incoming):
|
|
63
|
+
"""合并连续块边界处及块内相邻的未知范围,不填补有效区间。
|
|
64
|
+
|
|
65
|
+
参数: 两个 tuple 均为有序、不重叠的正区间。返回: 紧凑区间 tuple。
|
|
66
|
+
异常: MemoryError 为已申请工作空间内的实际分配失败。
|
|
67
|
+
"""
|
|
68
|
+
# 旧范围保持顺序;仅当前末段可能和新段相邻,不能跨有效间隔合并。
|
|
69
|
+
result = None
|
|
70
|
+
try:
|
|
71
|
+
result = list(existing)
|
|
72
|
+
for interval in incoming:
|
|
73
|
+
if result and result[-1].end_ns == interval.start_ns:
|
|
74
|
+
result[-1] = Interval(result[-1].start_ns, interval.end_ns)
|
|
75
|
+
else:
|
|
76
|
+
result.append(interval)
|
|
77
|
+
return tuple(result)
|
|
78
|
+
finally:
|
|
79
|
+
# 未知范围的新list/边界Interval同样不得在失败TB中逃逸费用寿命。
|
|
80
|
+
result = existing = incoming = interval = None
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class IntegralFactsAccumulator:
|
|
84
|
+
"""持有一个已接收的连续前缀,完整结束后才开放整窗事实。
|
|
85
|
+
|
|
86
|
+
构造时固定目标交集;不会从前缀猜测 EOF。失败只允许关闭,完成后拒绝追加。
|
|
87
|
+
所有保留状态及候选容器均先 reserve;预算单线程协议下取消前后精确记账。
|
|
88
|
+
close 释放成功后即结束,即使该次调用随后被取消;释放前取消则可重试。
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
def __init__(self, budget: ResourceBudget, spec: CalculationDefinition,
|
|
92
|
+
observation: Interval, input_unit: str, binding_identity: str,
|
|
93
|
+
source_refs: tuple[SourceRef, ...] = ()):
|
|
94
|
+
"""固定真实观测交集并申请初始状态预算。
|
|
95
|
+
|
|
96
|
+
参数: budget 为借用账本;spec 为原积分请求;observation 为真实观测范围;
|
|
97
|
+
input_unit/identity 为原表达式事实;source_refs 为已知完整定位。
|
|
98
|
+
返回: 新 owner。异常: TypeError/ValueError 为协议错误;预算/分配/取消原样传播。
|
|
99
|
+
清理仍失败时,原异常.integral_facts_cleanup_owner 提供可重试 close 的 owner。
|
|
100
|
+
"""
|
|
101
|
+
# 在申请前拒绝非法输入,不把任意对象或缺失观测伪装成空窗口。
|
|
102
|
+
if not isinstance(budget, ResourceBudget) or not isinstance(spec, CalculationDefinition) or spec.operation != 'integral':
|
|
103
|
+
raise TypeError('需要ResourceBudget和integral CalculationDefinition')
|
|
104
|
+
if not isinstance(observation, Interval):
|
|
105
|
+
raise TypeError('观测范围需要真实Interval')
|
|
106
|
+
require_text(input_unit, 'integral.input_unit')
|
|
107
|
+
require_text(binding_identity, 'integral.binding_identity')
|
|
108
|
+
if type(source_refs) is not tuple or any(not isinstance(ref, SourceRef) for ref in source_refs):
|
|
109
|
+
raise TypeError('完整来源需要SourceRef tuple')
|
|
110
|
+
calculation_unit(spec, input_unit) # 仅校验输出单位兼容性,此处没有数值转换。
|
|
111
|
+
# 沿用积分项的闭合观测交集表示;相接端点保留点事实,不等同于无交集。
|
|
112
|
+
left, right = max(spec.window.start_ns, observation.start_ns), min(spec.window.end_ns, observation.end_ns)
|
|
113
|
+
actual = Interval(left, right) if left <= right else None
|
|
114
|
+
# owner 账本在第一次 reserve 前建立,取消后仍能在构造清理中准确释放。
|
|
115
|
+
self._budget, self._spec, self._actual = budget, spec, actual
|
|
116
|
+
self._unit, self._identity = input_unit, binding_identity
|
|
117
|
+
self._held_cost, self._state = 0, None
|
|
118
|
+
self._closed = self._closing = self._failed = self._finished = False
|
|
119
|
+
self._base_cost = 65536 + 16 * _metadata_bytes((spec, observation, input_unit, binding_identity))
|
|
120
|
+
try:
|
|
121
|
+
# 来源去重容器、冻结状态及旧输入引用均由这次保守申请覆盖。
|
|
122
|
+
self._reserve(self._base_cost + _refs_cost(source_refs)
|
|
123
|
+
+ reference_workspace(0, len(source_refs)))
|
|
124
|
+
refs = _unique_refs((), source_refs)
|
|
125
|
+
self._state = IntegralFacts(spec, None, 0, 0, (), Q.NONE, input_unit, binding_identity, refs)
|
|
126
|
+
self._release(self._held_cost - self._base_cost - _refs_cost(refs))
|
|
127
|
+
except BaseException as exc:
|
|
128
|
+
# 构造不会正常交付 owner;清理异常不能覆盖原失败或丢掉重试入口。
|
|
129
|
+
try:
|
|
130
|
+
self.close()
|
|
131
|
+
except BaseException as cleanup:
|
|
132
|
+
exc.add_note(f'积分事实构造清理失败: {type(cleanup).__name__}')
|
|
133
|
+
if not self._closed:
|
|
134
|
+
# 仅一次最小重试,处理清理本身被取消;持续失败不无限循环。
|
|
135
|
+
try:
|
|
136
|
+
self.close()
|
|
137
|
+
except BaseException as retry:
|
|
138
|
+
exc.add_note(f'积分事实构造清理重试失败: {type(retry).__name__}')
|
|
139
|
+
if not self._closed:
|
|
140
|
+
exc.integral_facts_cleanup_owner = self
|
|
141
|
+
exc.add_note('释放恢复后调用integral_facts_cleanup_owner.close()')
|
|
142
|
+
raise
|
|
143
|
+
finally:
|
|
144
|
+
# 构造已交给_state或真实恢复owner;本层临时tuple不由异常栈继续持有。
|
|
145
|
+
refs = None
|
|
146
|
+
|
|
147
|
+
@property
|
|
148
|
+
def closed(self):
|
|
149
|
+
"""提供关闭状态。参数: 无。返回: bool。异常: 无。"""
|
|
150
|
+
# 是否结束以实际释放结果为准,不能仅凭进入 close 判定。
|
|
151
|
+
return self._closed
|
|
152
|
+
|
|
153
|
+
@property
|
|
154
|
+
def failed(self):
|
|
155
|
+
"""提供失败状态。参数: 无。返回: bool。异常: 无。"""
|
|
156
|
+
# 推进失败后保留资源供清理,此标志不表示已经关闭。
|
|
157
|
+
return self._failed
|
|
158
|
+
|
|
159
|
+
@property
|
|
160
|
+
def facts(self) -> IntegralFacts:
|
|
161
|
+
"""在完整 finish 后借用冻结整窗事实,不额外复制诊断。
|
|
162
|
+
|
|
163
|
+
参数: 无。返回: 原 spec 与完整覆盖/来源事实。异常: 关闭、失败或未完成时拒绝。
|
|
164
|
+
副作用: 返回引用只由本 owner 计费至 close;独立留存由调用方承担。
|
|
165
|
+
"""
|
|
166
|
+
# 未完成前缀不能冒充整窗事实,关闭过程中也禁止借出状态。
|
|
167
|
+
self._require_open()
|
|
168
|
+
if self._failed or not self._finished:
|
|
169
|
+
raise RuntimeError('整窗事实尚未成功完成')
|
|
170
|
+
return self._state
|
|
171
|
+
|
|
172
|
+
def _require_open(self):
|
|
173
|
+
"""拒绝关闭及正在清理时读取或推进。参数: 无。返回: None。异常: ResultClosedError。"""
|
|
174
|
+
if self._closed or self._closing:
|
|
175
|
+
raise ResultClosedError('积分事实owner已关闭或正在清理')
|
|
176
|
+
|
|
177
|
+
def _reserve(self, amount):
|
|
178
|
+
"""申请前后按真实账本增量登记,覆盖成功后取消。
|
|
179
|
+
|
|
180
|
+
参数: amount 为非负 bytes。返回: None。异常: 原预算或取消异常。
|
|
181
|
+
"""
|
|
182
|
+
before = self._budget.ram_bytes
|
|
183
|
+
try:
|
|
184
|
+
self._budget.reserve_ram(amount)
|
|
185
|
+
finally:
|
|
186
|
+
# ResourceBudget 单线程契约下,只有成功申请才改变账本。
|
|
187
|
+
if self._budget.ram_bytes == before + amount:
|
|
188
|
+
self._held_cost += amount
|
|
189
|
+
|
|
190
|
+
def _release(self, amount):
|
|
191
|
+
"""释放前后按真实账本减少持有量,取消后不会再次扣同一笔。
|
|
192
|
+
|
|
193
|
+
参数: amount 为 owner 当前持有部分。返回: None。异常: 原释放或取消异常。
|
|
194
|
+
"""
|
|
195
|
+
before = self._budget.ram_bytes
|
|
196
|
+
try:
|
|
197
|
+
self._budget.release_ram(amount)
|
|
198
|
+
finally:
|
|
199
|
+
# 释放后取消也已归还;释放前取消仍保留全部持有量,等待 close 重试。
|
|
200
|
+
if self._budget.ram_bytes == before - amount:
|
|
201
|
+
self._held_cost -= amount
|
|
202
|
+
|
|
203
|
+
def _validate_block(self, facts):
|
|
204
|
+
"""检查当前块接在已接收前缀之后,覆盖事实完整且身份一致。
|
|
205
|
+
|
|
206
|
+
参数: facts 为有限块事实。返回: None。异常: TypeError/ValueError 为协议错误。
|
|
207
|
+
"""
|
|
208
|
+
# 原请求、单位和绑定身份一致才能连接;不做隐式换单位或重绑定。
|
|
209
|
+
if not isinstance(facts, IntegralFacts):
|
|
210
|
+
raise TypeError('需要IntegralFacts')
|
|
211
|
+
if facts.spec != self._spec or facts.input_unit != self._unit or facts.binding_identity != self._identity:
|
|
212
|
+
raise ValueError('积分块请求、单位或绑定身份不一致')
|
|
213
|
+
# 固定最终目标;None 不接受人为块,点窗口只允许一次真实点事实。
|
|
214
|
+
block, target = facts.actual_window, self._actual
|
|
215
|
+
if block is None or target is None:
|
|
216
|
+
raise ValueError('没有实际目标或块观测')
|
|
217
|
+
previous = self._state.actual_window
|
|
218
|
+
cursor = target.start_ns if previous is None else previous.end_ns
|
|
219
|
+
if block.start_ns != cursor or block.end_ns > target.end_ns:
|
|
220
|
+
raise ValueError('积分块有缺口、重叠或超出目标')
|
|
221
|
+
if target.start_ns == target.end_ns:
|
|
222
|
+
if previous is not None or block != target:
|
|
223
|
+
raise ValueError('零窗口仅接收一个真实点块')
|
|
224
|
+
elif block.start_ns >= block.end_ns:
|
|
225
|
+
raise ValueError('正窗口不接受不推进的块')
|
|
226
|
+
# 有序且不重叠是必要条件,不能仅靠总时长相等掩盖重复未知诊断。
|
|
227
|
+
last_end, unknown_duration = block.start_ns, 0
|
|
228
|
+
for interval in facts.value_unknown_ranges:
|
|
229
|
+
if interval.start_ns < last_end:
|
|
230
|
+
raise ValueError('未知范围必须有序且不重叠')
|
|
231
|
+
last_end = interval.end_ns
|
|
232
|
+
unknown_duration += interval.end_ns - interval.start_ns
|
|
233
|
+
duration = block.end_ns - block.start_ns
|
|
234
|
+
if unknown_duration + facts.value_valid_duration_ns != duration:
|
|
235
|
+
raise ValueError('有效与未知时长未完整划分当前块')
|
|
236
|
+
if facts.valid_sample_count > duration:
|
|
237
|
+
raise ValueError('半开整数纳秒窗口的样本数超过可用时间点')
|
|
238
|
+
|
|
239
|
+
def push(self, facts: IntegralFacts) -> None:
|
|
240
|
+
"""顺序累计一块覆盖事实,面积仍留在调用方的有限块内消费。
|
|
241
|
+
|
|
242
|
+
参数: facts 为连续块的真实 IntegralFacts。返回: None。
|
|
243
|
+
异常: 协议、预算、分配或取消错误;此后只允许 close。
|
|
244
|
+
"""
|
|
245
|
+
# 检查生命周期后才推进,拒绝在失败前缀或已交付整窗结果上追加。
|
|
246
|
+
self._require_open()
|
|
247
|
+
if self._failed or self._finished:
|
|
248
|
+
raise RuntimeError('失败或完成的积分事实owner不能追加')
|
|
249
|
+
old = unknown = refs = candidate = window = None
|
|
250
|
+
try:
|
|
251
|
+
self._validate_block(facts)
|
|
252
|
+
old = self._state
|
|
253
|
+
# 旧refs实体已由前缀持有;候选只复制指针,不能再按旧完整payload深计。
|
|
254
|
+
old_dynamic = 4096 * len(old.value_unknown_ranges)
|
|
255
|
+
incoming = 4096 * len(facts.value_unknown_ranges) + _refs_cost(facts.source_refs)
|
|
256
|
+
self._reserve(65536 + old_dynamic + incoming
|
|
257
|
+
+ reference_workspace(len(old.source_refs), len(facts.source_refs)))
|
|
258
|
+
unknown = _join_unknown(old.value_unknown_ranges, facts.value_unknown_ranges)
|
|
259
|
+
refs = _unique_refs(old.source_refs, facts.source_refs)
|
|
260
|
+
window = Interval(self._actual.start_ns, facts.actual_window.end_ns)
|
|
261
|
+
candidate = IntegralFacts(self._spec, window,
|
|
262
|
+
old.value_valid_duration_ns + facts.value_valid_duration_ns,
|
|
263
|
+
old.valid_sample_count + facts.valid_sample_count, unknown,
|
|
264
|
+
old.quality | facts.quality, self._unit, self._identity, refs)
|
|
265
|
+
# 单个冻结状态原子安装;异常前的前缀不会被零散字段部分更新。
|
|
266
|
+
self._state = candidate
|
|
267
|
+
retained = self._base_cost + 4096 * len(unknown) + _refs_cost(refs)
|
|
268
|
+
# 旧状态与临时容器停止持有后,归还保守候选余额。
|
|
269
|
+
old = candidate = None
|
|
270
|
+
self._release(self._held_cost - retained)
|
|
271
|
+
except BaseException as exc:
|
|
272
|
+
# 保留当前可追踪状态及已申请金额,不在异常路径悄悄丢失资源句柄。
|
|
273
|
+
self._failed = True
|
|
274
|
+
exc.integral_facts_cleanup_owner = self
|
|
275
|
+
raise
|
|
276
|
+
finally:
|
|
277
|
+
# 费用释放/候选构造失败时,原TB也不得留下本层旧快照或新候选容器。
|
|
278
|
+
old = unknown = refs = candidate = window = facts = None
|
|
279
|
+
|
|
280
|
+
def finish(self) -> None:
|
|
281
|
+
"""确认真实目标全部覆盖;无交集可直接完成,点窗口必须收到点事实。
|
|
282
|
+
|
|
283
|
+
参数: 无。返回: None;成功后 facts 可读,重复 finish 无副作用。
|
|
284
|
+
异常: RuntimeError 为失败状态;ValueError 为观测前缀不足。
|
|
285
|
+
"""
|
|
286
|
+
self._require_open()
|
|
287
|
+
if self._failed:
|
|
288
|
+
raise RuntimeError('失败owner只能关闭')
|
|
289
|
+
# 不把当前最后一块当 EOF;原始真实交集在构造时已经固定。
|
|
290
|
+
if self._actual is not None and self._state.actual_window != self._actual:
|
|
291
|
+
self._failed = True
|
|
292
|
+
raise ValueError('尚未覆盖完整实际窗口')
|
|
293
|
+
self._finished = True
|
|
294
|
+
|
|
295
|
+
def close(self) -> None:
|
|
296
|
+
"""归还本 owner 的 RAM;释放前取消可重试,不关闭借用账本。
|
|
297
|
+
|
|
298
|
+
参数: 无。返回: None;重复关闭不再扣账。
|
|
299
|
+
异常: 原释放/取消错误,是否已关闭以实际账本释放结果为准。
|
|
300
|
+
"""
|
|
301
|
+
if self._closed:
|
|
302
|
+
return
|
|
303
|
+
self._closing = True
|
|
304
|
+
try:
|
|
305
|
+
self._release(self._held_cost)
|
|
306
|
+
finally:
|
|
307
|
+
# 成功释放或成功后取消均清除引用;失败前取消仍保留状态供重试。
|
|
308
|
+
if self._held_cost == 0:
|
|
309
|
+
self._state = self._spec = self._actual = None
|
|
310
|
+
self._unit = self._identity = None
|
|
311
|
+
self._closed = True
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"""为逐块积分数值归约和整窗事实提供预算、生命周期及故障清理。
|
|
2
|
+
|
|
3
|
+
输入为真实观测、原请求及同一后端的有限面积块,结束后借出数值与覆盖事实。
|
|
4
|
+
数值核保留有界误差项,事实 owner 保留诊断和完整来源;不保存全部面积或时间轴。
|
|
5
|
+
所有状态和候选数组先申请保守 RAM 预算,超限或取消后只允许关闭。
|
|
6
|
+
budget 为借用的单线程账本,本 owner 不关闭它;估算不代表全进程 RSS。
|
|
7
|
+
不执行文件 I/O、历史读写/解码或最终 CalculationResult 的覆盖状态分类。
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
# 两核独立,仅在运行 owner 中选择;冻结协议和事实预算允许共享。
|
|
11
|
+
from ..core.integral_sum import IntegralSumResult, require_partial_limit
|
|
12
|
+
from ..core.integral_sum_reference import ReferenceIntegralSum
|
|
13
|
+
from ..core.integral_sum_numpy import NumpyIntegralSum
|
|
14
|
+
from ..core.integral_terms import ReferenceIntegralTerms, IntegralFacts
|
|
15
|
+
from ..core.integral_terms_numpy import NumpyIntegralTerms
|
|
16
|
+
from ..core.calculations import CalculationDefinition, calculation_unit
|
|
17
|
+
from ..core.models import Interval, SourceRef
|
|
18
|
+
from ..results.budget import ResourceBudget
|
|
19
|
+
from ..results.errors import ResultClosedError
|
|
20
|
+
from .integral_facts import IntegralFactsAccumulator
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class IntegralReduction:
|
|
24
|
+
"""持有一个积分归约 owner,完成前不开放整窗结果。
|
|
25
|
+
|
|
26
|
+
纯核的非有限累计是数值结果故障,仍消费后续事实;协议/容量/预算异常使 owner 失败。
|
|
27
|
+
关闭途中禁止借出引用,释放前取消可重试,释放后取消不会重复扣账。
|
|
28
|
+
借出的结果和事实由本 owner 计费到 close,调用方另行留存须承担预算。
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
def __init__(self, budget: ResourceBudget, spec: CalculationDefinition, observation: Interval,
|
|
32
|
+
input_unit: str, binding_identity: str, source_refs: tuple[SourceRef, ...] = (),
|
|
33
|
+
backend: str = 'numpy', partial_limit: int = 4096):
|
|
34
|
+
"""先申请数值工作空间,再创建独立核和事实 owner。
|
|
35
|
+
|
|
36
|
+
参数: budget 为借用账本;spec/observation 为原请求及真实范围;
|
|
37
|
+
input_unit/identity/refs 保留表达式身份;backend 为 reference/numpy;partial_limit 为误差容量。
|
|
38
|
+
返回: None,初始化新 owner。异常: 配置、预算、分配、取消原样传播。
|
|
39
|
+
持续清理失败时原异常.integral_reduction_cleanup_owner 可用于重试 close。
|
|
40
|
+
"""
|
|
41
|
+
# 配置验证不分配面积数组;事实详细门槛由子 owner 原样实施。
|
|
42
|
+
if not isinstance(budget, ResourceBudget) or not isinstance(spec, CalculationDefinition) or spec.operation != 'integral':
|
|
43
|
+
raise TypeError('积分归约需要ResourceBudget和integral CalculationDefinition')
|
|
44
|
+
if type(backend) is not str or backend not in ('reference', 'numpy'):
|
|
45
|
+
raise ValueError('积分归约后端需要reference或numpy')
|
|
46
|
+
limit = require_partial_limit(partial_limit)
|
|
47
|
+
unit, factor = calculation_unit(spec, input_unit)
|
|
48
|
+
# 句柄与计费状态先建立,构造中取消也有可恢复清理入口。
|
|
49
|
+
self._budget, self._backend = budget, backend
|
|
50
|
+
self._unit, self._factor = unit, factor
|
|
51
|
+
self._held_cost = 0
|
|
52
|
+
self._kernel = self._facts_owner = self._result = None
|
|
53
|
+
self._failed = self._finished = self._closing = self._closed = False
|
|
54
|
+
self._numeric_cost = 65536 + 512 * limit
|
|
55
|
+
try:
|
|
56
|
+
# 512 bytes/项覆盖旧/候选误差列、参考 float 对象和数组拆分临时列。
|
|
57
|
+
self._reserve(self._numeric_cost)
|
|
58
|
+
kernel = ReferenceIntegralSum if backend == 'reference' else NumpyIntegralSum
|
|
59
|
+
self._kernel = kernel(limit)
|
|
60
|
+
self._facts_owner = IntegralFactsAccumulator(budget, spec, observation, input_unit,
|
|
61
|
+
binding_identity, source_refs)
|
|
62
|
+
except BaseException as exc:
|
|
63
|
+
# 子构造清理持续失败时接管其句柄,不让嵌套 owner 的资源变成不可达。
|
|
64
|
+
child = getattr(exc, 'integral_facts_cleanup_owner', None)
|
|
65
|
+
if child is not None:
|
|
66
|
+
self._facts_owner = child
|
|
67
|
+
try:
|
|
68
|
+
self.close()
|
|
69
|
+
except BaseException as cleanup:
|
|
70
|
+
exc.add_note(f'积分归约构造清理失败: {type(cleanup).__name__}')
|
|
71
|
+
if not self._closed:
|
|
72
|
+
# 只重试一次,持续故障由显式恢复句柄处理,不能无限循环。
|
|
73
|
+
try:
|
|
74
|
+
self.close()
|
|
75
|
+
except BaseException as retry:
|
|
76
|
+
exc.add_note(f'积分归约构造清理重试失败: {type(retry).__name__}')
|
|
77
|
+
if not self._closed:
|
|
78
|
+
exc.integral_reduction_cleanup_owner = self
|
|
79
|
+
exc.add_note('释放恢复后调用integral_reduction_cleanup_owner.close()')
|
|
80
|
+
raise
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
def closed(self) -> bool:
|
|
84
|
+
"""读取实际关闭状态。参数: 无。返回: bool。异常: 无。"""
|
|
85
|
+
return self._closed # 以两个 owner 实际归还预算为准。
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def failed(self) -> bool:
|
|
89
|
+
"""读取推进异常状态。参数: 无。返回: bool。异常: 无。"""
|
|
90
|
+
return self._failed # 与正常交付的数值失败结果不同。
|
|
91
|
+
|
|
92
|
+
@property
|
|
93
|
+
def result(self) -> IntegralSumResult:
|
|
94
|
+
"""借出完成后的数值结果,不能将前缀当成整窗面积。
|
|
95
|
+
|
|
96
|
+
参数: 无。返回: 冻结结果。异常: 关闭、失败或未完成时拒绝。
|
|
97
|
+
"""
|
|
98
|
+
self._require_finished() # 借出引用由本 owner 计费到 close。
|
|
99
|
+
return self._result
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def facts(self) -> IntegralFacts:
|
|
103
|
+
"""借出完成后的整窗覆盖、质量及完整来源。
|
|
104
|
+
|
|
105
|
+
参数: 无。返回: 冻结事实。异常: 关闭、失败或未完成时拒绝。
|
|
106
|
+
"""
|
|
107
|
+
self._require_finished() # 子 owner 同时验证完整真实交集。
|
|
108
|
+
return self._facts_owner.facts
|
|
109
|
+
|
|
110
|
+
def _require_open(self) -> None:
|
|
111
|
+
"""拒绝关闭及清理中操作。参数: 无。返回: None。异常: ResultClosedError。"""
|
|
112
|
+
if self._closed or self._closing:
|
|
113
|
+
raise ResultClosedError('积分归约owner已关闭或正在清理')
|
|
114
|
+
|
|
115
|
+
def _require_finished(self) -> None:
|
|
116
|
+
"""验证借出整窗结果的门槛。参数: 无。返回: None。异常: 生命周期错误。"""
|
|
117
|
+
self._require_open()
|
|
118
|
+
if self._failed or not self._finished:
|
|
119
|
+
raise RuntimeError('整窗积分归约尚未成功完成')
|
|
120
|
+
|
|
121
|
+
def _reserve(self, amount: int) -> None:
|
|
122
|
+
"""按真实预算增量登记申请,覆盖成功后取消。
|
|
123
|
+
|
|
124
|
+
参数: amount 为 bytes。返回: None。异常: 原申请或取消错误。
|
|
125
|
+
"""
|
|
126
|
+
before = self._budget.ram_bytes
|
|
127
|
+
try:
|
|
128
|
+
self._budget.reserve_ram(amount)
|
|
129
|
+
finally:
|
|
130
|
+
# 单线程借用账本下,成功申请后的取消也须由本 owner 持有并归还。
|
|
131
|
+
if self._budget.ram_bytes == before + amount:
|
|
132
|
+
self._held_cost += amount
|
|
133
|
+
|
|
134
|
+
def _release(self, amount: int) -> None:
|
|
135
|
+
"""按真实预算减少持有量,覆盖成功后取消。
|
|
136
|
+
|
|
137
|
+
参数: amount 为 bytes。返回: None。异常: 原释放或取消错误。
|
|
138
|
+
"""
|
|
139
|
+
before = self._budget.ram_bytes
|
|
140
|
+
try:
|
|
141
|
+
self._budget.release_ram(amount)
|
|
142
|
+
finally:
|
|
143
|
+
# 成功后取消不再重复扣账,释放前取消则保留金额供 close 重试。
|
|
144
|
+
if self._budget.ram_bytes == before - amount:
|
|
145
|
+
self._held_cost -= amount
|
|
146
|
+
|
|
147
|
+
def push(self, terms: ReferenceIntegralTerms | NumpyIntegralTerms) -> None:
|
|
148
|
+
"""即时消费有限面积块及事实,不保留调用方输入数组。
|
|
149
|
+
|
|
150
|
+
参数: terms 必须与构造后端一致。返回: None。
|
|
151
|
+
异常: 协议、容量、预算、分配或取消错误;此后只允许 close。
|
|
152
|
+
"""
|
|
153
|
+
try:
|
|
154
|
+
self._require_open()
|
|
155
|
+
if self._failed or self._finished:
|
|
156
|
+
raise RuntimeError('失败或完成的积分归约不能追加')
|
|
157
|
+
try:
|
|
158
|
+
# 输入归调用方块 workspace;先计费有效索引/候选列,再执行任何数值核。
|
|
159
|
+
expected = ReferenceIntegralTerms if self._backend == 'reference' else NumpyIntegralTerms
|
|
160
|
+
if not isinstance(terms, expected):
|
|
161
|
+
raise TypeError('积分面积模型与归约后端不一致')
|
|
162
|
+
workspace = 4096 + 64 * len(terms.areas)
|
|
163
|
+
self._reserve(workspace)
|
|
164
|
+
self._facts_owner.push(terms.facts)
|
|
165
|
+
self._kernel.push(terms)
|
|
166
|
+
# 输入没有被持有,有限块临时列可归还;固定误差空间留到关闭。
|
|
167
|
+
self._release(workspace)
|
|
168
|
+
except BaseException:
|
|
169
|
+
self._failed = True # 已推进的前缀不再借出,不假装撤销成功。
|
|
170
|
+
raise
|
|
171
|
+
finally:
|
|
172
|
+
# 原异常及TB仍交调用方;只断本层借入参数、视图和临时,不清外部帧。
|
|
173
|
+
self = terms = None
|
|
174
|
+
|
|
175
|
+
def finish(self) -> None:
|
|
176
|
+
"""核对整窗事实后归约并应用一次输出单位因子。
|
|
177
|
+
|
|
178
|
+
参数: 无。返回: None,重复成功完成无副作用。
|
|
179
|
+
异常: 未覆盖真实目标、预算/分配/取消错误;失败后只允许 close。
|
|
180
|
+
"""
|
|
181
|
+
self._require_open()
|
|
182
|
+
if self._failed:
|
|
183
|
+
raise RuntimeError('失败的积分归约只能关闭')
|
|
184
|
+
if self._finished:
|
|
185
|
+
return
|
|
186
|
+
try:
|
|
187
|
+
# 不能从最后一个已见块猜 EOF,数值结果也不能先于覆盖门槛交付。
|
|
188
|
+
self._facts_owner.finish()
|
|
189
|
+
result = self._kernel.finish(self._unit, self._factor)
|
|
190
|
+
self._result = result
|
|
191
|
+
self._finished = True
|
|
192
|
+
except BaseException:
|
|
193
|
+
self._failed = True
|
|
194
|
+
raise
|
|
195
|
+
|
|
196
|
+
def close(self) -> None:
|
|
197
|
+
"""关闭自有事实与数值状态,保留调用方已有预算。
|
|
198
|
+
|
|
199
|
+
参数: 无。返回: None,重复成功关闭无副作用。
|
|
200
|
+
异常: 原释放/取消错误;释放前取消保留句柄和金额供再次 close。
|
|
201
|
+
"""
|
|
202
|
+
if self._closed:
|
|
203
|
+
return
|
|
204
|
+
self._closing = True
|
|
205
|
+
try:
|
|
206
|
+
# 子 owner 自行处理释放前后取消;父 owner 不能把子金额当成自己的释放。
|
|
207
|
+
if self._facts_owner is not None:
|
|
208
|
+
self._facts_owner.close()
|
|
209
|
+
self._release(self._held_cost)
|
|
210
|
+
finally:
|
|
211
|
+
# 父释放后取消也可结束;子释放后取消时父金额仍在,需再次 close 收尾。
|
|
212
|
+
child_closed = self._facts_owner is None or self._facts_owner.closed
|
|
213
|
+
if child_closed and self._held_cost == 0:
|
|
214
|
+
self._kernel = self._facts_owner = self._result = None
|
|
215
|
+
self._unit = self._factor = None
|
|
216
|
+
self._closed = True
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"""把同次BLF原帧仓与稀疏解码仓按原序连接,供新增报文重建使用。
|
|
2
|
+
|
|
3
|
+
不重新扫描BLF、不重新解码;新DBC上下文只提供编码布局和复用选择器。
|
|
4
|
+
原帧与解码记录的序号、时间和公开帧字段逐项相符,结束时两仓均完整核验。
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from ..results.frame_exports import as_export_frame
|
|
8
|
+
from ..results.frame_rebuild import FrameSample
|
|
9
|
+
from ..results.budget import _reserve_owned_ram,_release_owned_ram,_cleanup_owner
|
|
10
|
+
from ..results.errors import ResultClosedError,ResultFormatError
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class LegacyFrameSamples:
|
|
14
|
+
"""最多保留一条原帧与一条解码记录,拥有两游标而借用原仓和DBC。"""
|
|
15
|
+
|
|
16
|
+
def __init__(self,raw_store,message_store,context,budget,*,read_identity,session_id,channel,trace=True):
|
|
17
|
+
"""核同次仓身份后开有限游标。参数: 原帧/解码仓/DBC上下文/预算、原scan的read身份/会话/声明通道。返回: owner。异常: 合同/IO错。
|
|
18
|
+
"""
|
|
19
|
+
self._budget=budget; self.context=context; self._held_cost=self._fixed_cost=0
|
|
20
|
+
self.channel=channel;self.trace=trace
|
|
21
|
+
self.raw=self.messages=self.pending=None; self._closed=False; self._ended=False
|
|
22
|
+
try:
|
|
23
|
+
context.require_open()
|
|
24
|
+
if raw_store._budget is not budget or raw_store.state!='sealed':
|
|
25
|
+
raise ValueError('重建需要同预算已封口原帧仓')
|
|
26
|
+
if message_store is not None and (message_store._budget is not budget or message_store.state!='sealed'
|
|
27
|
+
or message_store.source_name!=raw_store.source_name or message_store.session_id!=session_id
|
|
28
|
+
or message_store.read_identity!=read_identity):
|
|
29
|
+
raise ValueError('原帧与解码仓不是同次读取')
|
|
30
|
+
_reserve_owned_ram(self,262144,'_fixed_cost')
|
|
31
|
+
self.raw=raw_store.iter_frames()
|
|
32
|
+
if message_store is not None:
|
|
33
|
+
self.messages=message_store.iter_records(); self.pending=next(self.messages,None)
|
|
34
|
+
except BaseException as error:
|
|
35
|
+
_cleanup_owner(self,error,'legacy_frame_samples_cleanup_owner','原帧解码连接构造'); raise
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
def closed(self):
|
|
39
|
+
"""返回真实关闭状态。参数: 无。返回: bool。异常: 无。
|
|
40
|
+
"""
|
|
41
|
+
return self._closed
|
|
42
|
+
|
|
43
|
+
def __iter__(self):
|
|
44
|
+
"""返回独立游标。参数: 无。返回: self。异常: 无。
|
|
45
|
+
"""
|
|
46
|
+
return self
|
|
47
|
+
|
|
48
|
+
def __next__(self):
|
|
49
|
+
"""连接同原序记录,不跳过完整仓核验。参数: 无。返回: FrameSample。异常: EOF/来源不符/IO错。
|
|
50
|
+
"""
|
|
51
|
+
if self._closed or self._ended:
|
|
52
|
+
raise StopIteration
|
|
53
|
+
self.context.require_open()
|
|
54
|
+
try:
|
|
55
|
+
raw=next(self.raw)
|
|
56
|
+
except StopIteration:
|
|
57
|
+
if self.pending is not None or not self.raw.verified_eof or self.messages is not None and not self.messages.verified_eof:
|
|
58
|
+
raise ResultFormatError('原帧和解码仓没有共同完整结束')
|
|
59
|
+
self._ended=True; raise
|
|
60
|
+
decoded=None
|
|
61
|
+
if self.pending is not None:
|
|
62
|
+
item=self.pending
|
|
63
|
+
if item.decoded.sequence<raw.sequence:
|
|
64
|
+
raise ResultFormatError('解码仓出现无对应原帧记录')
|
|
65
|
+
if item.decoded.sequence==raw.sequence:
|
|
66
|
+
if item.time_ns!=raw.time_ns or item.decoded.frame!=raw.frame:
|
|
67
|
+
raise ResultFormatError('重建原帧与解码记录内容不符')
|
|
68
|
+
decoded=item.decoded; self.pending=next(self.messages,None)
|
|
69
|
+
# 与同次读取使用相同候选选择,不把标准与扩展帧的同数值ID混为一条。
|
|
70
|
+
message=self.context.observe(raw.frame)
|
|
71
|
+
known=raw.frame.channel==self.channel and self.context.is_known_frame(raw.frame)
|
|
72
|
+
values=(); layout=(); valid=True
|
|
73
|
+
rule=next((rule for rule in self.context.rules if rule.matches(raw.frame)),None)
|
|
74
|
+
if rule is not None and not raw.frame.is_error_frame and not raw.frame.is_remote_frame:
|
|
75
|
+
if decoded is None or message is None:
|
|
76
|
+
raise ResultFormatError('已请求重建报文缺同次解码记录')
|
|
77
|
+
values=tuple((name,decoded.values.get(name)) for name in rule.continuous)
|
|
78
|
+
selectors=tuple(signal for signal in message.signals if signal.is_multiplexer)
|
|
79
|
+
# 未激活分支的复用选择器可以缺席;实际布局只包含本次解码已有的选择器。
|
|
80
|
+
layout=tuple((signal.name,int(signal.conversion.numeric_scaled_to_raw(decoded.values[signal.name])))
|
|
81
|
+
for signal in selectors if signal.name in decoded.values)
|
|
82
|
+
return FrameSample(as_export_frame(raw,compact=not self.trace),values,layout,known,valid)
|
|
83
|
+
|
|
84
|
+
def close(self):
|
|
85
|
+
"""关闭真实两个游标后释放自己的费用。参数: 无。返回: None。异常: 原close错可重试。
|
|
86
|
+
"""
|
|
87
|
+
if self._closed:
|
|
88
|
+
return
|
|
89
|
+
for slot in ('raw','messages'):
|
|
90
|
+
owner=getattr(self,slot)
|
|
91
|
+
if owner is not None:
|
|
92
|
+
owner.close(); setattr(self,slot,None)
|
|
93
|
+
self.pending=self.context=None
|
|
94
|
+
_release_owned_ram(self,self._fixed_cost,'_fixed_cost'); self._closed=True
|