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,415 @@
|
|
|
1
|
+
"""在同一完整组两侧推进一个数据集会话的多条件/多规则。
|
|
2
|
+
|
|
3
|
+
调用方先保留域前种子与真实下一完整组,最早边界由各条件TTL/来源EOF和对应规则deadline选择。
|
|
4
|
+
不同表达式对象槽全部prepare后至多一次state.apply,再全部complete并推进各自独立Detector。
|
|
5
|
+
迟滞的进出条件都参加该过程;防抖截止与条件TTL/EOF共同决定下一时刻。
|
|
6
|
+
同一编译对象被多个规则引用时只保存一份三视图;不共享数值核或改变原读写/解码调用。
|
|
7
|
+
固定配置与步workspace先计规则数预算,子条件/事件批各自保有预算,输出须close。
|
|
8
|
+
步骤失败不回滚已提交组或规则,禁止重试但保留原输出,单线程生命周期不承诺RSS。
|
|
9
|
+
没有全量轴/历史缓存、窗口指标或公共AnalysisRunner,固定事件绑定refs不等于全部原始行。
|
|
10
|
+
构造中的未安装Detector由父_uninstalled_detector持续持有;深子构造尚未返回
|
|
11
|
+
也按原异常上的temporal_detector_cleanup_owner接管,持续清理失败再交出真实父
|
|
12
|
+
multi_rule_timeline_cleanup_owner。恢复仅关闭自有步/Detector/固定配置,不关闭查询。
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
# 冻结配置及控制协议复用,不改变参考/NumPy条件或规则数值实现。
|
|
16
|
+
from dataclasses import dataclass
|
|
17
|
+
from ..core.expression import CompiledExpression
|
|
18
|
+
from ..core.models import SourceRef
|
|
19
|
+
from ..core.temporal import TemporalRule
|
|
20
|
+
from ..core.stability import StabilitySpec
|
|
21
|
+
from ..core.start_end import StartEndSpec
|
|
22
|
+
from ..core.types import SignalDType
|
|
23
|
+
from ..results.errors import AnalysisError, ResultClosedError
|
|
24
|
+
from ..results.spool import _cleanup_owner
|
|
25
|
+
from .boundaries import RuleDeadline, _require_native_ns
|
|
26
|
+
from .groups import DecodedTimeGroup
|
|
27
|
+
from .history import _metadata_bytes
|
|
28
|
+
from .temporal_buffer import BudgetedTemporalDetector, _BatchRegistry
|
|
29
|
+
from .timeline import _require_timeline_input
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@dataclass(frozen=True)
|
|
33
|
+
class TimelineRule:
|
|
34
|
+
"""声明一个已编译条件与冻结规则的关联,固定来源位置由caller提供。
|
|
35
|
+
|
|
36
|
+
不持有运行状态,实际owner/会话/起点由多规则游标校验;多个规则可引用相同compiled对象。
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
rule: TemporalRule # 当前数据集/会话中的唯一规则ID。
|
|
40
|
+
compiled: CompiledExpression # 同一实际表达式owner登记的BOOL对象。
|
|
41
|
+
source_refs: tuple[SourceRef, ...] = () # 固定绑定定位,当前点物理行另在步骤返回。
|
|
42
|
+
stability: StabilitySpec | None = None # 可选双向防抖;不改变普通条件时间线。
|
|
43
|
+
exit_compiled: CompiledExpression | None = None # 迟滞退出或start_end结束BOOL;防抖可省略。
|
|
44
|
+
start_end: StartEndSpec | None = None # 开始/结束专用时限;与迟滞互斥。
|
|
45
|
+
|
|
46
|
+
def __post_init__(self):
|
|
47
|
+
"""校验冻结输入结构,不创建Detector。
|
|
48
|
+
|
|
49
|
+
参数: 无,读取规则、进出条件、来源与可选防抖声明。返回: None,保留原对象。
|
|
50
|
+
异常: TypeError为非规则/BOOL/SourceRef tuple或非法迟滞声明。
|
|
51
|
+
"""
|
|
52
|
+
if (not isinstance(self.rule, TemporalRule) or not isinstance(self.compiled, CompiledExpression)
|
|
53
|
+
or self.compiled.root.dtype is not SignalDType.BOOL or type(self.source_refs) is not tuple
|
|
54
|
+
or any(not isinstance(ref, SourceRef) for ref in self.source_refs)):
|
|
55
|
+
raise TypeError('多规则声明需要冻结规则、BOOL编译对象及SourceRef tuple')
|
|
56
|
+
if self.stability is not None and not isinstance(self.stability, StabilitySpec):
|
|
57
|
+
raise TypeError('多规则防抖需要StabilitySpec')
|
|
58
|
+
if self.start_end is not None and (not isinstance(self.start_end, StartEndSpec)
|
|
59
|
+
or self.stability is not None or self.exit_compiled is None):
|
|
60
|
+
raise TypeError('start_end需要独立结束条件且不能混用迟滞')
|
|
61
|
+
if self.exit_compiled is not None and (self.stability is None and self.start_end is None
|
|
62
|
+
or not isinstance(self.exit_compiled, CompiledExpression)
|
|
63
|
+
or self.exit_compiled.root.dtype is not SignalDType.BOOL):
|
|
64
|
+
raise TypeError('独立结束/退出条件需要已编译BOOL和对应状态声明')
|
|
65
|
+
|
|
66
|
+
@property
|
|
67
|
+
def expressions(self):
|
|
68
|
+
"""收集进出条件供共享查询。参数: 无。返回: 编译对象tuple。异常: 无。"""
|
|
69
|
+
return (self.compiled,) if self.exit_compiled is None else (self.compiled, self.exit_compiled)
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def dependencies(self):
|
|
73
|
+
"""收集两个条件的实际依赖。参数: 无。返回: 名称tuple。异常: 无。"""
|
|
74
|
+
return tuple(dict.fromkeys(name for expression in self.expressions for name in expression.dependencies))
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class MultiTimelineStep:
|
|
78
|
+
"""拥有全部已计账子结果与少量输出视图,顺序与固定槽/规则顺序对应。
|
|
79
|
+
|
|
80
|
+
ticks按不同条件槽,events_by_rule按规则顺序,缓存仅小typed值/事件引用。
|
|
81
|
+
refs通过仍打开的自有条件读取,不把大位置元数据复制到未计账缓存。
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
def __init__(self, owner, cost, time_ns, consumed, conditions, batches):
|
|
85
|
+
"""在已申请workspace中创建输出视图,不安装链。
|
|
86
|
+
|
|
87
|
+
参数: owner游标、cost bytes、time_ns ns、consumed是否消费组、conditions/batches局部句柄list。
|
|
88
|
+
返回: None;初始化实例状态;子句柄移交到此对象。异常: 构造错误由外层关闭局部句柄。
|
|
89
|
+
"""
|
|
90
|
+
self._owner, self._cost, self._closed = owner, cost, False
|
|
91
|
+
self._time, self._consumed, self._conditions, self._batches = time_ns, consumed, conditions, batches
|
|
92
|
+
self._slots, self._keys = owner._unique_slots, owner._keys
|
|
93
|
+
# 元数据由上游/自有Detector计账,workspace覆盖每规则至多一个Event及小tuple视图。
|
|
94
|
+
self._ticks = tuple(condition.ticks[0] for condition in conditions)
|
|
95
|
+
self._events = tuple(batch.events for batch in batches)
|
|
96
|
+
self._registry = self._previous = self._next = None
|
|
97
|
+
|
|
98
|
+
def _ensure_open(self):
|
|
99
|
+
"""拒绝释放后读取。参数: 无。返回: None。异常: ResultClosedError。"""
|
|
100
|
+
if self._closed:
|
|
101
|
+
raise ResultClosedError('多规则时间步已关闭')
|
|
102
|
+
|
|
103
|
+
@property
|
|
104
|
+
def closed(self):
|
|
105
|
+
"""读取关闭状态。参数: 无。返回: bool。异常: 无。"""
|
|
106
|
+
return self._closed
|
|
107
|
+
|
|
108
|
+
@property
|
|
109
|
+
def time_ns(self):
|
|
110
|
+
"""读取准确时刻。参数: 无。返回: int ns。异常: ResultClosedError。"""
|
|
111
|
+
self._ensure_open()
|
|
112
|
+
return self._time
|
|
113
|
+
|
|
114
|
+
@property
|
|
115
|
+
def consumed_group(self):
|
|
116
|
+
"""读取是否消费前瞻。参数: 无。返回: bool。异常: ResultClosedError。"""
|
|
117
|
+
self._ensure_open()
|
|
118
|
+
return self._consumed
|
|
119
|
+
|
|
120
|
+
@property
|
|
121
|
+
def condition_slots(self):
|
|
122
|
+
"""读取ticks对应表达式登记槽。参数: 无。返回: int tuple。异常: ResultClosedError。"""
|
|
123
|
+
self._ensure_open()
|
|
124
|
+
return self._slots
|
|
125
|
+
|
|
126
|
+
@property
|
|
127
|
+
def ticks(self):
|
|
128
|
+
"""读取各不同条件证据。参数: 无。返回: ConditionTick tuple。异常: ResultClosedError。"""
|
|
129
|
+
self._ensure_open()
|
|
130
|
+
return self._ticks
|
|
131
|
+
|
|
132
|
+
@property
|
|
133
|
+
def source_refs(self):
|
|
134
|
+
"""读取每条件当前点完整位置。参数: 无。返回: 嵌套SourceRef tuple。异常: 关闭。"""
|
|
135
|
+
self._ensure_open()
|
|
136
|
+
return tuple(condition.source_refs for condition in self._conditions)
|
|
137
|
+
|
|
138
|
+
@property
|
|
139
|
+
def rule_keys(self):
|
|
140
|
+
"""读取事件批对应dataset/session/rule身份。参数: 无。返回: 三元tuple的tuple。异常: 关闭。"""
|
|
141
|
+
self._ensure_open()
|
|
142
|
+
return self._keys
|
|
143
|
+
|
|
144
|
+
@property
|
|
145
|
+
def events_by_rule(self):
|
|
146
|
+
"""读取各规则本次增量事件。参数: 无。返回: Event tuple的tuple。异常: 关闭。"""
|
|
147
|
+
self._ensure_open()
|
|
148
|
+
return self._events
|
|
149
|
+
|
|
150
|
+
def _discard(self):
|
|
151
|
+
"""无扣账地脱离并清空自有视图。
|
|
152
|
+
|
|
153
|
+
参数: 无。返回: None。异常: 脱链取消传播,finally仍关闭;owner随后只清理残留链。
|
|
154
|
+
"""
|
|
155
|
+
try:
|
|
156
|
+
self._owner._results.discard(self)
|
|
157
|
+
finally:
|
|
158
|
+
self._closed, self._cost = True, 0
|
|
159
|
+
self._owner = self._conditions = self._batches = self._time = self._consumed = None
|
|
160
|
+
self._slots = self._keys = self._ticks = self._events = None
|
|
161
|
+
|
|
162
|
+
def close(self):
|
|
163
|
+
"""释放全部子结果再释放workspace,支持中途关闭取消后重试。
|
|
164
|
+
|
|
165
|
+
参数: 无。返回: None,幂等。异常: 子结果/预算/取消传播,已扣workspace最小关闭。
|
|
166
|
+
"""
|
|
167
|
+
if self._closed:
|
|
168
|
+
return
|
|
169
|
+
# list槽只在对应子结果成功关闭后清空,失败句柄仍可重试。
|
|
170
|
+
for results in (self._batches, self._conditions):
|
|
171
|
+
for index, result in enumerate(results):
|
|
172
|
+
if result is not None:
|
|
173
|
+
result.close()
|
|
174
|
+
results[index] = None
|
|
175
|
+
budget, cost = self._owner._budget, self._cost
|
|
176
|
+
before, released = budget.ram_bytes, False
|
|
177
|
+
try:
|
|
178
|
+
budget.release_ram(cost)
|
|
179
|
+
released = True
|
|
180
|
+
finally:
|
|
181
|
+
if released or budget.ram_bytes == before - cost:
|
|
182
|
+
self._discard()
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
class MultiRuleTimeline:
|
|
186
|
+
"""单数据集会话的多规则同步游标,每真实组只提交一次。
|
|
187
|
+
|
|
188
|
+
只保存固定槽/规则顺序、当前游标和独立检测器;不同条件在同一组前全部捕获旧点。
|
|
189
|
+
不保存编译树或原组,既有表达式owner拥有树;关闭自有资源不关闭借用查询。
|
|
190
|
+
_uninstalled_detector负责尚未装入_detectors的真实子实例,安装成功才清空;
|
|
191
|
+
构造清理持续失败的父实例从原异常multi_rule_timeline_cleanup_owner恢复close。
|
|
192
|
+
"""
|
|
193
|
+
|
|
194
|
+
def __init__(self, evidence, boundaries, rules: tuple[TimelineRule, ...]):
|
|
195
|
+
"""校验规则关联后先预算再建立固定槽和各独立Detector。
|
|
196
|
+
|
|
197
|
+
参数: 两真实共享查询、同一dataset/session且rule_id唯一的非空冻结rules。
|
|
198
|
+
返回: 新游标,尚未处理起点。异常: 配置/已有起点/预算/取消原错误传播;
|
|
199
|
+
部分构造接管未返回Detector,持续清理失败从multi_rule_timeline_cleanup_owner恢复。
|
|
200
|
+
"""
|
|
201
|
+
if type(rules) is not tuple or not rules or any(type(item) is not TimelineRule for item in rules):
|
|
202
|
+
raise TypeError('多规则游标需要非空TimelineRule tuple')
|
|
203
|
+
# 不建立容器/检测器之前逐条复用单规则既有输入契约。
|
|
204
|
+
for item in rules:
|
|
205
|
+
_require_timeline_input(evidence, boundaries, item.compiled, item.rule, item.source_refs)
|
|
206
|
+
if item.exit_compiled is not None:
|
|
207
|
+
_require_timeline_input(evidence, boundaries, item.exit_compiled, item.rule, item.source_refs)
|
|
208
|
+
fixed = 65536 + 8192 * len(rules) + 16 * sum(_metadata_bytes(item.rule) for item in rules)
|
|
209
|
+
self._budget, self._fixed_cost, self._closed, self._failed = evidence._budget, 0, False, False
|
|
210
|
+
self._evidence = self._boundaries = self._results = self._detectors = None
|
|
211
|
+
self._uninstalled_detector = None
|
|
212
|
+
self._slots = self._unique_slots = self._slot_positions = self._keys = None
|
|
213
|
+
self._exit_slots = None
|
|
214
|
+
self._start, self._end, self._cursor = evidence._start, evidence._end, None
|
|
215
|
+
self._revision = evidence._queries._holds._state.revision
|
|
216
|
+
before = self._budget.ram_bytes
|
|
217
|
+
try:
|
|
218
|
+
self._budget.reserve_ram(fixed)
|
|
219
|
+
self._fixed_cost = fixed
|
|
220
|
+
self._evidence, self._boundaries, self._results = evidence, boundaries, _BatchRegistry()
|
|
221
|
+
self._detectors = [None] * len(rules)
|
|
222
|
+
# 本次单一dataset/session,规则ID保持原文,不造虚假deadline别名。
|
|
223
|
+
if any(item.rule.dataset_id != rules[0].rule.dataset_id for item in rules):
|
|
224
|
+
raise ValueError('多规则游标只能处理同一dataset')
|
|
225
|
+
if len({item.rule.rule_id for item in rules}) != len(rules):
|
|
226
|
+
raise ValueError('多规则游标rule_id必须唯一')
|
|
227
|
+
self._slots = tuple(evidence._slots[id(item.compiled)] for item in rules)
|
|
228
|
+
self._exit_slots = tuple(None if item.exit_compiled is None else evidence._slots[id(item.exit_compiled)] for item in rules)
|
|
229
|
+
self._unique_slots = tuple(dict.fromkeys(self._slots + tuple(slot for slot in self._exit_slots if slot is not None)))
|
|
230
|
+
self._slot_positions = {slot: index for index, slot in enumerate(self._unique_slots)}
|
|
231
|
+
self._keys = tuple((item.rule.dataset_id, item.rule.session_id, item.rule.rule_id) for item in rules)
|
|
232
|
+
for index, item in enumerate(rules):
|
|
233
|
+
# 先存到父恢复字段再安装;失败离开构造frame也不能丢失这笔子所有权。
|
|
234
|
+
self._uninstalled_detector = BudgetedTemporalDetector(self._budget, item.rule, self._start, self._end,
|
|
235
|
+
source_refs=item.source_refs, backend=evidence._backend, stability=item.stability, start_end=item.start_end)
|
|
236
|
+
self._detectors[index] = self._uninstalled_detector
|
|
237
|
+
self._uninstalled_detector = None
|
|
238
|
+
except BaseException as exc:
|
|
239
|
+
# 深子构造未返回时只有原异常上的实际恢复owner可达,不根据总余额重建子费用。
|
|
240
|
+
child = getattr(exc, 'temporal_detector_cleanup_owner', None)
|
|
241
|
+
if child is not None:
|
|
242
|
+
self._uninstalled_detector = child
|
|
243
|
+
if self._fixed_cost == 0 and self._budget.ram_bytes == before + fixed:
|
|
244
|
+
self._fixed_cost = fixed
|
|
245
|
+
# 父统一负责未安装与已安装子,清理取消只记notes且保留真实父恢复句柄。
|
|
246
|
+
_cleanup_owner(self, exc, 'multi_rule_timeline_cleanup_owner', '多规则时间游标构造')
|
|
247
|
+
raise
|
|
248
|
+
|
|
249
|
+
@property
|
|
250
|
+
def closed(self):
|
|
251
|
+
"""读取关闭状态。参数: 无。返回: bool。异常: 无。"""
|
|
252
|
+
return self._closed
|
|
253
|
+
|
|
254
|
+
@property
|
|
255
|
+
def failed(self):
|
|
256
|
+
"""读取禁止重试状态。参数: 无。返回: bool。异常: 无。"""
|
|
257
|
+
return self._failed
|
|
258
|
+
|
|
259
|
+
@property
|
|
260
|
+
def cursor_ns(self):
|
|
261
|
+
"""读取已处理游标。参数: 无。返回: int ns或None。异常: ResultClosedError。"""
|
|
262
|
+
if self._closed:
|
|
263
|
+
raise ResultClosedError('多规则游标已关闭')
|
|
264
|
+
return self._cursor
|
|
265
|
+
|
|
266
|
+
def _ensure_active(self):
|
|
267
|
+
"""核对自身/上游。参数: 无。返回: None。异常: 关闭/AnalysisError。"""
|
|
268
|
+
if self._closed:
|
|
269
|
+
raise ResultClosedError('多规则游标已关闭')
|
|
270
|
+
if self._failed:
|
|
271
|
+
raise AnalysisError('多规则游标已失败,禁止重试')
|
|
272
|
+
self._evidence._ensure_open()
|
|
273
|
+
self._boundaries._ensure_open()
|
|
274
|
+
|
|
275
|
+
def _construct(self, cost, time_ns, consumed, conditions, batches):
|
|
276
|
+
"""仅构造局部输出。参数: 已计账事实/子句柄。返回: MultiTimelineStep。异常: 分配/取消。"""
|
|
277
|
+
return MultiTimelineStep(self, cost, time_ns, consumed, conditions, batches)
|
|
278
|
+
|
|
279
|
+
def step(self, next_group: DecodedTimeGroup | None = None) -> MultiTimelineStep | None:
|
|
280
|
+
"""选择全局一个时刻,全部旧点捕获后只提交一次完整更新。
|
|
281
|
+
|
|
282
|
+
参数: caller保留的下一完整组或无后续组None;种子已在构造前提交。
|
|
283
|
+
返回: 须close的步,真正terminal处理后None。
|
|
284
|
+
异常: 入口/版本错误前置拒绝,首workspace申请失败可重试;开始后失败禁止重试,
|
|
285
|
+
不回滚已提交state或已推进规则,原输出继续可读,本次子句柄仍有清理归属。
|
|
286
|
+
"""
|
|
287
|
+
self._ensure_active()
|
|
288
|
+
state = self._evidence._queries._holds._state
|
|
289
|
+
if state.revision != self._revision:
|
|
290
|
+
raise ValueError('多规则游标开始后不得外部提交state')
|
|
291
|
+
if next_group is not None:
|
|
292
|
+
if type(next_group) is not DecodedTimeGroup:
|
|
293
|
+
raise TypeError('多规则游标需要真实DecodedTimeGroup或None')
|
|
294
|
+
_require_native_ns(next_group.time_ns, 'multi.next_group_ns')
|
|
295
|
+
if next_group.time_ns < self._start or self._cursor is not None and next_group.time_ns <= self._cursor:
|
|
296
|
+
raise ValueError('多规则前瞻须不早于域起点且晚于已处理游标')
|
|
297
|
+
if self._cursor == self._end:
|
|
298
|
+
return None
|
|
299
|
+
cost, before = 65536 + 32768 * len(self._detectors), self._budget.ram_bytes
|
|
300
|
+
reserved, started, conditions, batches, final, result = False, False, None, None, None, None
|
|
301
|
+
try:
|
|
302
|
+
self._budget.reserve_ram(cost)
|
|
303
|
+
reserved, started = True, True
|
|
304
|
+
# 先预建固定槽,子查询/事件返回后无需增长list再交接所有权。
|
|
305
|
+
conditions, batches = [None] * len(self._unique_slots), [None] * len(self._detectors)
|
|
306
|
+
time_ns = self._start
|
|
307
|
+
if self._cursor is not None:
|
|
308
|
+
time_ns = self._end
|
|
309
|
+
for slot in self._unique_slots:
|
|
310
|
+
# 只向对应条件传当前各规则deadline,每次重算,不保留过期timer。
|
|
311
|
+
deadlines = tuple(RuleDeadline(detector.rule.rule_id, detector.next_deadline_ns)
|
|
312
|
+
for rule_slot, detector in zip(self._slots, self._detectors)
|
|
313
|
+
if rule_slot == slot and detector.next_deadline_ns is not None)
|
|
314
|
+
compiled = self._evidence._queries._expressions[slot]
|
|
315
|
+
boundary = self._boundaries.query_next(compiled, after_ns=self._cursor,
|
|
316
|
+
next_group_ns=None if next_group is None else next_group.time_ns, duration_deadlines=deadlines)
|
|
317
|
+
try:
|
|
318
|
+
time_ns = min(time_ns, boundary.time_ns)
|
|
319
|
+
finally:
|
|
320
|
+
boundary.close()
|
|
321
|
+
# 所有不同条件取得旧点后才提交,共享条件不会重复占用预备槽。
|
|
322
|
+
for index, slot in enumerate(self._unique_slots):
|
|
323
|
+
compiled = self._evidence._queries._expressions[slot]
|
|
324
|
+
conditions[index] = self._evidence.prepare(compiled, time_ns)
|
|
325
|
+
consumed = next_group is not None and next_group.time_ns == time_ns
|
|
326
|
+
if consumed:
|
|
327
|
+
state.apply(next_group)
|
|
328
|
+
for condition in conditions:
|
|
329
|
+
condition.complete()
|
|
330
|
+
for index, (slot, detector) in enumerate(zip(self._slots, self._detectors)):
|
|
331
|
+
condition = conditions[self._slot_positions[slot]]
|
|
332
|
+
exit_slot = self._exit_slots[index]
|
|
333
|
+
if exit_slot is None:
|
|
334
|
+
batches[index] = detector.push(condition.ticks)
|
|
335
|
+
else:
|
|
336
|
+
exit_condition = conditions[self._slot_positions[exit_slot]]
|
|
337
|
+
batches[index] = detector.push(condition.ticks, exit_condition.ticks)
|
|
338
|
+
if time_ns == self._end:
|
|
339
|
+
final = detector.finish()
|
|
340
|
+
final.close()
|
|
341
|
+
final = None
|
|
342
|
+
result = self._construct(cost, time_ns, consumed, conditions, batches)
|
|
343
|
+
self._results.add(result)
|
|
344
|
+
self._cursor, self._revision = time_ns, state.revision
|
|
345
|
+
return result
|
|
346
|
+
except BaseException:
|
|
347
|
+
if started:
|
|
348
|
+
self._failed = True
|
|
349
|
+
try:
|
|
350
|
+
if result is not None:
|
|
351
|
+
result._discard()
|
|
352
|
+
finally:
|
|
353
|
+
try:
|
|
354
|
+
if final is not None:
|
|
355
|
+
final.close()
|
|
356
|
+
# 原owner保有尚未成功关闭句柄,借用层由caller按层级收尾。
|
|
357
|
+
for children in (batches, conditions):
|
|
358
|
+
if children is not None:
|
|
359
|
+
for child in children:
|
|
360
|
+
if child is not None:
|
|
361
|
+
child.close()
|
|
362
|
+
finally:
|
|
363
|
+
if reserved or self._budget.ram_bytes == before + cost:
|
|
364
|
+
self._budget.release_ram(cost)
|
|
365
|
+
raise
|
|
366
|
+
|
|
367
|
+
@property
|
|
368
|
+
def duration_summaries(self):
|
|
369
|
+
"""在关闭前提取已完成规则的小型累计快照。
|
|
370
|
+
|
|
371
|
+
参数: 无。返回: (rule_id,start_ns,end_ns,active_ns,known_ns)的tuple。
|
|
372
|
+
异常: 关闭/失败/未完成的原检测器错误;不保存全部事件或输入点。
|
|
373
|
+
"""
|
|
374
|
+
if self._closed or self._failed:
|
|
375
|
+
raise ResultClosedError('失败或关闭的时间线不能读取累计')
|
|
376
|
+
result = []
|
|
377
|
+
for detector in self._detectors:
|
|
378
|
+
counts = detector.duration_counts
|
|
379
|
+
if counts is not None:
|
|
380
|
+
result.append((detector.rule.rule_id, detector.start_ns, detector.end_ns, *counts))
|
|
381
|
+
return tuple(result)
|
|
382
|
+
|
|
383
|
+
def close(self):
|
|
384
|
+
"""关闭自有步、未安装/已安装Detector及固定配置,保留caller查询/状态/历史。
|
|
385
|
+
|
|
386
|
+
参数: 无。返回: None,幂等。
|
|
387
|
+
异常: 子结果/预算/取消传播;子句柄成功close才清字段,未释放可重试。
|
|
388
|
+
固定已释放时最小关闭,不对借用查询或上游state调用close。
|
|
389
|
+
"""
|
|
390
|
+
if self._closed:
|
|
391
|
+
return
|
|
392
|
+
while self._results:
|
|
393
|
+
result = next(iter(self._results))
|
|
394
|
+
result.close()
|
|
395
|
+
self._results.discard(result)
|
|
396
|
+
# 尚未安装的深子也属于本父;成功关闭才丢字段,持续取消保留明确恢复路径。
|
|
397
|
+
if self._uninstalled_detector is not None:
|
|
398
|
+
self._uninstalled_detector.close()
|
|
399
|
+
self._uninstalled_detector = None
|
|
400
|
+
if self._detectors is not None:
|
|
401
|
+
# 已安装槽逐项清空,避免一个后续子失败时重新承担已完成的子关闭责任。
|
|
402
|
+
for index, detector in enumerate(self._detectors):
|
|
403
|
+
if detector is not None:
|
|
404
|
+
detector.close()
|
|
405
|
+
self._detectors[index] = None
|
|
406
|
+
self._detectors = None
|
|
407
|
+
cost, before, released = self._fixed_cost, self._budget.ram_bytes, False
|
|
408
|
+
try:
|
|
409
|
+
self._budget.release_ram(cost)
|
|
410
|
+
released = True
|
|
411
|
+
finally:
|
|
412
|
+
if released or self._budget.ram_bytes == before - cost:
|
|
413
|
+
self._closed, self._fixed_cost = True, 0
|
|
414
|
+
self._evidence = self._boundaries = self._results = None
|
|
415
|
+
self._slots = self._unique_slots = self._slot_positions = self._keys = self._exit_slots = None
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
"""从封存信号历史逐窗计算变化量,交付已有点事件模型。
|
|
2
|
+
|
|
3
|
+
每次只执行一个规则,复用HistoricalWindowReplay的有限ZOH及两后端表达式查询。
|
|
4
|
+
新更新和旧边界移出窗口都推进判断;只保存当前窗口片段,内存不足明确失败。
|
|
5
|
+
数值核输出条件,独立边沿检测器负责初始化和重触发;once仅抑制后续事件,
|
|
6
|
+
不会把仍成立的条件伪装成FALSE。自有回读、当前帧、片段及事件批均计预算;
|
|
7
|
+
编译树、原历史和实际绑定借用。调用方必须close,不重读或修改原始来源。
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from collections import deque
|
|
11
|
+
from dataclasses import replace
|
|
12
|
+
from ..core.models import SourceRef
|
|
13
|
+
from ..core.temporal import ConditionTick, TemporalRule
|
|
14
|
+
from ..core.types import QualityFlag as Q, Truth
|
|
15
|
+
from ..core.window_delta import DeltaSpan
|
|
16
|
+
from ..core.window_delta_reference import window_delta_reference
|
|
17
|
+
from ..core.window_delta_numpy import window_delta_numpy
|
|
18
|
+
from ..results.errors import ResultClosedError
|
|
19
|
+
from ..results.spool import _cleanup_owner, _reserve_owned_ram, _release_owned_ram
|
|
20
|
+
from .history import _metadata_bytes
|
|
21
|
+
from .temporal_buffer import BudgetedTemporalDetector
|
|
22
|
+
from .window_replay import HistoricalWindowReplay
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class WindowDeltaEvents:
|
|
26
|
+
"""拥有一个规则的滑动片段与事件批,失败后只能关闭;关闭可重试。"""
|
|
27
|
+
|
|
28
|
+
def __init__(self, history, context, bindings, plan, compiled_rules, scopes=None):
|
|
29
|
+
"""保存借用合同并预约有限元数据,延迟打开第一条规则的回读。
|
|
30
|
+
|
|
31
|
+
参数: 历史/context/绑定/计划,compiled_rules为(规则,实际表达式)tuple,scopes实际范围。
|
|
32
|
+
返回: Event迭代owner。异常: 预算或取消,持续清理失败附window_delta_events_cleanup_owner。
|
|
33
|
+
"""
|
|
34
|
+
self._budget, self._held_cost = history.budget, 0
|
|
35
|
+
self._fixed_cost = self._buffer_cost = self._work_cost = 0
|
|
36
|
+
self._history, self._context, self._bindings, self._plan = history, context, bindings, plan
|
|
37
|
+
self._rules, self._scopes, self._index = compiled_rules, scopes, 0
|
|
38
|
+
self._replay = self._frame = self._detector = self._batch = None
|
|
39
|
+
self._spans = self._entry = self._compiled = self._domain = None
|
|
40
|
+
self._query_time = None
|
|
41
|
+
self._emitted = self._closed = self._failed = self._done = False
|
|
42
|
+
try:
|
|
43
|
+
_reserve_owned_ram(self, 65536 + 16 * _metadata_bytes(tuple(item[0] for item in compiled_rules)), '_fixed_cost')
|
|
44
|
+
self._spans = deque()
|
|
45
|
+
except BaseException as exc:
|
|
46
|
+
_cleanup_owner(self, exc, 'window_delta_events_cleanup_owner', '窗口变化量构造')
|
|
47
|
+
raise
|
|
48
|
+
|
|
49
|
+
def __iter__(self):
|
|
50
|
+
"""返回本游标。参数: 无。返回: self。异常: 无。"""
|
|
51
|
+
return self
|
|
52
|
+
|
|
53
|
+
def _start_rule(self):
|
|
54
|
+
"""在上一规则资源关闭后打开下一有效观测范围。
|
|
55
|
+
|
|
56
|
+
参数: 无。返回: bool表示已创建规则。异常: 构造、预算和实际范围错误。
|
|
57
|
+
"""
|
|
58
|
+
while self._index < len(self._rules):
|
|
59
|
+
self._entry, self._compiled = self._rules[self._index]
|
|
60
|
+
self._index += 1
|
|
61
|
+
self._domain = (self._context.domain if self._scopes is None else
|
|
62
|
+
self._scopes.for_dependencies(self._compiled.dependencies).actual)
|
|
63
|
+
if self._domain is None:
|
|
64
|
+
continue
|
|
65
|
+
# 原样借用已检查表达式,点事件规则保留原计划ID;参数在plan中追溯。
|
|
66
|
+
rule = TemporalRule(self._entry.rule_id, self._plan.dataset.dataset_id,
|
|
67
|
+
self._context.session_id, 'rising_edge', emit_initial=self._entry.emit_initial)
|
|
68
|
+
refs = tuple(dict.fromkeys(SourceRef(self._context.session_id,
|
|
69
|
+
self._bindings.resolve(name).source, self._bindings.resolve(name).field)
|
|
70
|
+
for name in self._compiled.dependencies))
|
|
71
|
+
self._detector = BudgetedTemporalDetector(self._budget, rule, self._domain.start_ns,
|
|
72
|
+
self._domain.end_ns, refs, self._plan.execution.backend)
|
|
73
|
+
self._replay = HistoricalWindowReplay(self._history, self._context, self._bindings, self._compiled,
|
|
74
|
+
self._domain, backend=self._plan.execution.backend)
|
|
75
|
+
self._emitted = False
|
|
76
|
+
return True
|
|
77
|
+
return False
|
|
78
|
+
|
|
79
|
+
def _capture_value(self, result):
|
|
80
|
+
"""从一个已计账表达式视图取原生数值及质量。
|
|
81
|
+
|
|
82
|
+
参数: result为参考或数组结果。返回: (value,quality)。异常: 上游结构错误。
|
|
83
|
+
"""
|
|
84
|
+
if self._plan.execution.backend == 'reference':
|
|
85
|
+
value = result.rows[0].value
|
|
86
|
+
return (value.value if value.valid else None), value.quality
|
|
87
|
+
value = result.arrays.value
|
|
88
|
+
return (value.values[0].item() if value.valid[0] else None), Q(int(value.quality[0]))
|
|
89
|
+
|
|
90
|
+
def _capture_frame(self):
|
|
91
|
+
"""预付当前片段,再保存点值与右侧有效性;不复制输入样本。
|
|
92
|
+
|
|
93
|
+
参数: 无,使用自有当前frame。返回: None。异常: 预算、类型和上游错误。
|
|
94
|
+
"""
|
|
95
|
+
_reserve_owned_ram(self, 2048, '_buffer_cost')
|
|
96
|
+
value, point_quality = self._capture_value(self._frame.point_result)
|
|
97
|
+
continuous = self._frame.continuous_result
|
|
98
|
+
quality = Q.MISSING if continuous is None else self._capture_value(continuous)[1]
|
|
99
|
+
self._spans.append(DeltaSpan(self._frame.time_ns, self._frame.end_ns,
|
|
100
|
+
value, quality, point_quality))
|
|
101
|
+
self._query_time = self._frame.time_ns
|
|
102
|
+
|
|
103
|
+
def _evaluate(self):
|
|
104
|
+
"""计算当前窗口并推进独立边沿状态,最多借出一个事件。
|
|
105
|
+
|
|
106
|
+
参数: 无。返回: Event或None,借至下一次迭代/关闭。异常: 数值契约、预算或取消。
|
|
107
|
+
"""
|
|
108
|
+
time_ns, spec = self._query_time, self._entry.window_delta
|
|
109
|
+
left = time_ns - spec.window_ns
|
|
110
|
+
# 边界已离开窗口才移除;左端恰好等于旧起点时仍保留该点。
|
|
111
|
+
while self._spans and self._spans[0].end_ns <= left and self._spans[0].start_ns < left:
|
|
112
|
+
self._spans.popleft()
|
|
113
|
+
_release_owned_ram(self, 2048, '_buffer_cost')
|
|
114
|
+
_reserve_owned_ram(self, 65536 + 4096 * len(self._spans), '_work_cost')
|
|
115
|
+
try:
|
|
116
|
+
spans = tuple(self._spans)
|
|
117
|
+
kernel = window_delta_reference if self._plan.execution.backend == 'reference' else window_delta_numpy
|
|
118
|
+
point = kernel(spec, spans, time_ns, self._compiled.root.dtype)
|
|
119
|
+
continuous = point
|
|
120
|
+
terminal = time_ns == self._domain.end_ns
|
|
121
|
+
# EOF真实点可以有效,右侧不能延长;其他点/连续差异也分别保留。
|
|
122
|
+
if terminal:
|
|
123
|
+
state, quality = Truth.UNKNOWN, Q.MISSING
|
|
124
|
+
else:
|
|
125
|
+
if spans[-1].start_ns == time_ns and spans[-1].point_quality != spans[-1].quality:
|
|
126
|
+
continuous = kernel(spec, spans[:-1] + (replace(spans[-1], point_quality=spans[-1].quality),),
|
|
127
|
+
time_ns, self._compiled.root.dtype)
|
|
128
|
+
state, quality = continuous.condition, continuous.quality
|
|
129
|
+
tick = ConditionTick(time_ns, state, quality, actual_update=True, terminal=terminal,
|
|
130
|
+
point_state=point.condition, point_quality=point.quality)
|
|
131
|
+
# 窗口边界移动也是新条件证据,必须在该时刻识别边沿,不等下一条报文。
|
|
132
|
+
self._batch = self._detector.push((tick,))
|
|
133
|
+
event = self._batch.events[0] if self._batch.events else None
|
|
134
|
+
if self._entry.retrigger == 'once' and self._emitted:
|
|
135
|
+
event = None
|
|
136
|
+
if event is not None:
|
|
137
|
+
self._emitted = True
|
|
138
|
+
# 当前源片段结束处由下一帧先提交实际更新,再判断同刻窗口。
|
|
139
|
+
following = self._frame.end_ns
|
|
140
|
+
for item in self._spans:
|
|
141
|
+
shifted = item.start_ns + spec.window_ns
|
|
142
|
+
if time_ns < shifted < following:
|
|
143
|
+
following = shifted
|
|
144
|
+
self._query_time = following if time_ns < following < self._frame.end_ns else None
|
|
145
|
+
return event
|
|
146
|
+
finally:
|
|
147
|
+
# 暂存tuple/数组只活在这次计算;事件由_batch独立计账。
|
|
148
|
+
spans = point = continuous = tick = None
|
|
149
|
+
_release_owned_ram(self, self._work_cost, '_work_cost')
|
|
150
|
+
|
|
151
|
+
def __next__(self):
|
|
152
|
+
"""逐帧或窗口边界推进直到有事件,跨输入批次保留当前窗口。
|
|
153
|
+
|
|
154
|
+
参数: 无。返回: Event。异常: StopIteration正常结束;失败后需close。
|
|
155
|
+
"""
|
|
156
|
+
if self._closed or self._failed:
|
|
157
|
+
raise ResultClosedError('窗口变化量已关闭或失败')
|
|
158
|
+
if self._done:
|
|
159
|
+
raise StopIteration
|
|
160
|
+
try:
|
|
161
|
+
while True:
|
|
162
|
+
if self._batch is not None:
|
|
163
|
+
self._batch.close()
|
|
164
|
+
self._batch = None
|
|
165
|
+
if self._replay is None and not self._start_rule():
|
|
166
|
+
self._done = True
|
|
167
|
+
break
|
|
168
|
+
if self._query_time is None:
|
|
169
|
+
if self._frame is not None:
|
|
170
|
+
self._frame.close()
|
|
171
|
+
self._frame = None
|
|
172
|
+
self._frame = next(self._replay, None)
|
|
173
|
+
if self._frame is None:
|
|
174
|
+
self._batch = self._detector.finish()
|
|
175
|
+
self._close_rule()
|
|
176
|
+
continue
|
|
177
|
+
self._capture_frame()
|
|
178
|
+
event = self._evaluate()
|
|
179
|
+
if event is not None:
|
|
180
|
+
return event
|
|
181
|
+
except BaseException as exc:
|
|
182
|
+
self._failed = True
|
|
183
|
+
# 深层构造没有返回时,接住它交出的真实owner,不丢清理责任。
|
|
184
|
+
for slot, name in (('_replay', 'window_replay_cleanup_owner'),
|
|
185
|
+
('_detector', 'temporal_detector_cleanup_owner')):
|
|
186
|
+
child = getattr(exc, name, None)
|
|
187
|
+
if child is not None and getattr(self, slot) is None:
|
|
188
|
+
setattr(self, slot, child)
|
|
189
|
+
exc.window_delta_events_cleanup_owner = self
|
|
190
|
+
raise
|
|
191
|
+
raise StopIteration
|
|
192
|
+
|
|
193
|
+
def _close_rule(self):
|
|
194
|
+
"""关闭本规则自有资源并释放窗口存储,成功后才清owner槽。
|
|
195
|
+
|
|
196
|
+
参数: 无。返回: None。异常: 子关闭或预算取消,可再次调用。
|
|
197
|
+
"""
|
|
198
|
+
for name in ('_batch', '_frame', '_replay', '_detector'):
|
|
199
|
+
child = getattr(self, name)
|
|
200
|
+
if child is not None:
|
|
201
|
+
child.close()
|
|
202
|
+
setattr(self, name, None)
|
|
203
|
+
if self._spans is not None:
|
|
204
|
+
self._spans.clear()
|
|
205
|
+
_release_owned_ram(self, self._buffer_cost, '_buffer_cost')
|
|
206
|
+
_release_owned_ram(self, self._work_cost, '_work_cost')
|
|
207
|
+
self._query_time = None
|
|
208
|
+
|
|
209
|
+
def close(self):
|
|
210
|
+
"""释放全部自有资源,保留原历史/绑定;关闭失败可重试。
|
|
211
|
+
|
|
212
|
+
参数: 无。返回: None,幂等。异常: 子层或账本清理错误。
|
|
213
|
+
"""
|
|
214
|
+
if self._closed:
|
|
215
|
+
return
|
|
216
|
+
self._close_rule()
|
|
217
|
+
self._spans = self._rules = self._entry = self._compiled = self._domain = None
|
|
218
|
+
self._history = self._context = self._bindings = self._plan = self._scopes = None
|
|
219
|
+
_release_owned_ram(self, self._fixed_cost, '_fixed_cost')
|
|
220
|
+
self._closed = self._held_cost == 0
|