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,359 @@
|
|
|
1
|
+
"""把新ASC/原始CSV的同次解码接到公共信号批次和真实观测协议。
|
|
2
|
+
|
|
3
|
+
适配器声明字段和时基,不读文件;每个TextCANObservationRead拥有独立解析器、
|
|
4
|
+
有限原帧块和预算。每次交付同时段各别名批,总样本数不超过batch_rows;同刻别名未全部
|
|
5
|
+
交付前不越过其watermark。完整EOF并关闭解析器后才开放观测证明和可选原帧仓。
|
|
6
|
+
原帧仓仅显式导出时创建,共用已解码值,不另扫描原文件。
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
from uuid import uuid4
|
|
11
|
+
|
|
12
|
+
from ..core.validation import require_identifier
|
|
13
|
+
from ..sources.text_can_spec import CANTextSpec
|
|
14
|
+
from ..sources.text_can_decode import CANTextDecodeRead,pack_text_records
|
|
15
|
+
from ..sources.descriptions import describe_fields,source_timebase_identity
|
|
16
|
+
from ..sources.models import ReadRequest,SignalBatch,SourceDescription,SourceCapabilities,freeze_metadata
|
|
17
|
+
from ..sources.protocol import BatchValidator,SourceClosedError
|
|
18
|
+
from ..results.budget import _reserve_owned_ram,_release_owned_ram,_cleanup_owner
|
|
19
|
+
from ..results.errors import ResultClosedError
|
|
20
|
+
from .can_reader import CANObservation
|
|
21
|
+
from .frame_capture import TextFrameStore
|
|
22
|
+
from .history import _metadata_bytes,_pending_bytes
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class BudgetedTextCANSourceAdapter:
|
|
26
|
+
"""拥有静态描述和活read集合,借用导出DBC上下文;关闭不会释放借用上下文。"""
|
|
27
|
+
|
|
28
|
+
def __init__(self,budget,spec,session_id,signals,*,backend='numpy',work_dir=None,retain_raw_frames=False,database_context=None,message_consumer=None,cycle_fields=(), metadata_fields=(),message_keys=(),integrity=True,trace=True,selected_ids=None,time_frame_ids=None):
|
|
29
|
+
"""构造声明,不读取输入。参数: 预算/spec/会话/定义、后端、可选暂存目录及DBC上下文;message_keys为无值公式的完整触发定位;message_consumer同步接收必要消息,保留需自付预算;cycle_fields显式请求初始化DBC周期;metadata_fields仅确认驱动候选,两者不增加值解码。返回: adapter。异常: 配置/预算错。
|
|
30
|
+
|
|
31
|
+
time_frame_ids将所需通道/ID的单调性检查与全来源范围统计分开,不改变原帧时间。
|
|
32
|
+
selected_ids是纯消息计算需要的有限ID集合;仅在不要求全来源时间或原帧导出时
|
|
33
|
+
下推给原始CSV读取器。此时观测范围是保留记录的范围,不能冒称全部来源范围。
|
|
34
|
+
"""
|
|
35
|
+
if type(spec) is not CANTextSpec or backend not in ('reference','numpy') or type(retain_raw_frames) is not bool:
|
|
36
|
+
raise ValueError('文本CAN来源配置或后端非法')
|
|
37
|
+
from ..sources.can_updates import require_message_keys
|
|
38
|
+
require_message_keys(message_keys, channel=spec.channel)
|
|
39
|
+
if message_keys and message_consumer is None:
|
|
40
|
+
raise ValueError('消息触发定位必须有实际消费者')
|
|
41
|
+
if message_consumer is not None and not callable(message_consumer):
|
|
42
|
+
raise TypeError('message_consumer需要同步可调用对象')
|
|
43
|
+
if retain_raw_frames and work_dir is None:
|
|
44
|
+
raise ValueError('显式原帧保存需要新工作目录')
|
|
45
|
+
from ..legacy.dbc_cycles import require_cycle_fields
|
|
46
|
+
require_cycle_fields(cycle_fields,spec.channel)
|
|
47
|
+
require_cycle_fields(metadata_fields,spec.channel)
|
|
48
|
+
if retain_raw_frames and time_frame_ids is not None:
|
|
49
|
+
raise ValueError('原帧导出需要完整时间顺序检查')
|
|
50
|
+
self._metadata_fields = metadata_fields
|
|
51
|
+
self._selected_ids = selected_ids
|
|
52
|
+
self._time_frame_ids = time_frame_ids
|
|
53
|
+
self._cycle_fields=cycle_fields
|
|
54
|
+
self._integrity=integrity
|
|
55
|
+
self._trace=trace
|
|
56
|
+
require_identifier(session_id,'text_can.session_id')
|
|
57
|
+
self.budget=self._budget=budget; self.spec=spec; self.session_id=session_id
|
|
58
|
+
self.signals=signals; self.backend=backend; self.work_dir=None if work_dir is None else Path(work_dir)
|
|
59
|
+
self._retain_raw_frames=retain_raw_frames; self.database_context=database_context
|
|
60
|
+
self._update_consumer=message_consumer; self._update_projection=None
|
|
61
|
+
self._held_cost=self._fixed_cost=0; self._closed=False; self._requests=set(); self._pending=None
|
|
62
|
+
try:
|
|
63
|
+
cost=131072+_metadata_bytes((signals,selected_ids,time_frame_ids))*32+sum(1024+len(str(i.path).encode('utf-8'))*32 for i in spec.inputs)
|
|
64
|
+
if message_keys:
|
|
65
|
+
cost += 8192 + 2048 * len(message_keys)
|
|
66
|
+
if cycle_fields or metadata_fields:
|
|
67
|
+
cost += 16384 + _metadata_bytes((cycle_fields,metadata_fields))*32
|
|
68
|
+
_reserve_owned_ram(self,cost,'_fixed_cost')
|
|
69
|
+
if message_consumer is not None:
|
|
70
|
+
from ..sources.can_updates import CANUpdateProjection
|
|
71
|
+
from ..sources.can_spec import can_field_from_key
|
|
72
|
+
self._update_projection=CANUpdateProjection(spec.name,session_id,tuple(can_field_from_key(s.field) for s in signals),message_keys=message_keys,clock_fields=metadata_fields)
|
|
73
|
+
locator={'paths':tuple(str(i.path) for i in spec.inputs),'dbc_path':str(spec.dbc_path),
|
|
74
|
+
'channel':spec.channel,'profile':'can-text-v1','offset_ns':0,'time_unit':'ns',
|
|
75
|
+
'source_timebase_sha256':source_timebase_identity(spec.timebase,0)}
|
|
76
|
+
self._description=SourceDescription(spec.name,describe_fields(spec.name,signals,locator),
|
|
77
|
+
spec.timebase.timebase_id,None,None,SourceCapabilities(True,True,True,False,
|
|
78
|
+
('ASC/CSV按文本转换时间并保原行;混合BLF沿用库浮点秒转纳秒并以记录序号定位;CSV按ID筛选时仅观测保留记录',),
|
|
79
|
+
(('所需通道/ID按声明顺序时间非递减;其他帧仅参与来源范围统计;DBC缺单位仍未核实'
|
|
80
|
+
if time_frame_ids is not None else '输入必须按声明顺序时间非递减;DBC缺单位仍未核实'),)),legacy_profile='can-text-v1')
|
|
81
|
+
except BaseException as error:
|
|
82
|
+
_cleanup_owner(self,error,'text_can_source_cleanup_owner','文本CAN来源构造')
|
|
83
|
+
raise
|
|
84
|
+
|
|
85
|
+
@property
|
|
86
|
+
def retain_raw_frames(self):
|
|
87
|
+
"""返回本来源冻结的原帧保存选择。参数: 无。返回: bool。异常: 无。
|
|
88
|
+
"""
|
|
89
|
+
return self._retain_raw_frames
|
|
90
|
+
|
|
91
|
+
def _ensure_open(self):
|
|
92
|
+
"""拒绝使用已关闭适配器。参数: 无。返回: None。异常: SourceClosedError。
|
|
93
|
+
"""
|
|
94
|
+
if self._closed:
|
|
95
|
+
raise SourceClosedError('文本CAN来源已关闭')
|
|
96
|
+
|
|
97
|
+
def describe(self):
|
|
98
|
+
"""返回静态字段及时间声明。参数: 无。返回: SourceDescription。异常: 已关闭。
|
|
99
|
+
"""
|
|
100
|
+
self._ensure_open(); return self._description
|
|
101
|
+
|
|
102
|
+
def iter_batches_with_observation(self,request):
|
|
103
|
+
"""创建具有同次观测的独立read。参数: request。返回: read。异常: 合同/预算错及可恢复owner。
|
|
104
|
+
"""
|
|
105
|
+
self._ensure_open()
|
|
106
|
+
if self._pending is not None:
|
|
107
|
+
raise ResultClosedError('文本CAN仍有未返回read待清理')
|
|
108
|
+
try:
|
|
109
|
+
self._pending=TextCANObservationRead(self,request)
|
|
110
|
+
read=self._pending; self._requests.add(read); self._pending=None
|
|
111
|
+
return read
|
|
112
|
+
except BaseException as error:
|
|
113
|
+
self._pending=self._pending or getattr(error,'text_can_observation_cleanup_owner',None)
|
|
114
|
+
_cleanup_owner(self._pending,error,'text_can_observation_cleanup_owner','文本CAN读取登记') if self._pending is not None else None
|
|
115
|
+
if self._pending is not None and self._pending.closed:
|
|
116
|
+
self._pending=None
|
|
117
|
+
if self._pending is not None:
|
|
118
|
+
error.text_can_source_cleanup_owner=self
|
|
119
|
+
raise
|
|
120
|
+
|
|
121
|
+
def iter_batches(self,request):
|
|
122
|
+
"""沿同一批次合同创建read,不另读输入。参数: request。返回: read。异常: 原工厂错。
|
|
123
|
+
"""
|
|
124
|
+
return self.iter_batches_with_observation(request)
|
|
125
|
+
|
|
126
|
+
def close(self):
|
|
127
|
+
"""关闭所有本来源活read,再释放描述费用。参数: 无。返回: None。异常: 关闭/费用错可重试。
|
|
128
|
+
"""
|
|
129
|
+
if self._closed:
|
|
130
|
+
return
|
|
131
|
+
if self._pending is not None:
|
|
132
|
+
self._pending.close(); self._pending=None
|
|
133
|
+
while self._requests:
|
|
134
|
+
next(iter(self._requests)).close()
|
|
135
|
+
self._description=None
|
|
136
|
+
self._update_projection=self._update_consumer=None
|
|
137
|
+
_release_owned_ram(self,self._fixed_cost,'_fixed_cost'); self._closed=True
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
class TextCANObservationRead:
|
|
141
|
+
"""拥有一个有限原帧块和一个归一化批,完整EOF前不开放完成事实。"""
|
|
142
|
+
|
|
143
|
+
def __init__(self,owner,request):
|
|
144
|
+
"""验证原会话/投影并构造未开始的解码器。参数: adapter/request。返回: read。异常: 合同/预算错。
|
|
145
|
+
"""
|
|
146
|
+
owner._ensure_open()
|
|
147
|
+
if type(request) is not ReadRequest or request.session_id!=owner.session_id:
|
|
148
|
+
raise ValueError('文本CAN读取需要原会话ReadRequest')
|
|
149
|
+
definitions={s.name:s for s in owner.signals}
|
|
150
|
+
if not set(request.signal_names)<=set(definitions):
|
|
151
|
+
raise ValueError('文本CAN请求包含未声明信号')
|
|
152
|
+
self._owner=owner; self._request=request; self._budget=owner.budget
|
|
153
|
+
self.identity=uuid4().hex; self._definitions=tuple(definitions[n] for n in request.signal_names)
|
|
154
|
+
self._held_cost=self._fixed_cost=self._records_cost=self._batch_cost=self._pending_cost=self._validation_cost=self._runtime_cost=self._update_cost=0
|
|
155
|
+
self._decoder=self._raw_store=self._current=self._validator=self._runtime_metadata=self._observation=None
|
|
156
|
+
self._binding_projection=None
|
|
157
|
+
self._records=[]; self._column=0; self._raw_eof=self._eof_sent=False
|
|
158
|
+
self._closed=self._exhausted=self._failed=False
|
|
159
|
+
try:
|
|
160
|
+
_reserve_owned_ram(self,131072+_metadata_bytes((request,owner.signals))*32,'_fixed_cost')
|
|
161
|
+
self._validator=BatchValidator(owner.describe(),request)
|
|
162
|
+
try:
|
|
163
|
+
self._decoder=CANTextDecodeRead(owner.spec,self._budget,
|
|
164
|
+
owner.signals if owner._update_consumer is not None else self._definitions,
|
|
165
|
+
database_context=owner.database_context, integrity=owner._integrity, trace=owner._trace,retain_source_time=owner.retain_raw_frames,
|
|
166
|
+
classify_unselected=owner._update_consumer is None,
|
|
167
|
+
**({'cycle_fields':owner._cycle_fields} if owner._cycle_fields else {}),
|
|
168
|
+
**({'metadata_fields':owner._metadata_fields} if owner._metadata_fields else {}),
|
|
169
|
+
**({'selected_ids':owner._selected_ids} if owner._selected_ids is not None else {}),
|
|
170
|
+
**({'time_frame_ids':owner._time_frame_ids} if owner._time_frame_ids is not None else {}))
|
|
171
|
+
except BaseException as error:
|
|
172
|
+
self._decoder=getattr(error,'text_can_cleanup_owner',None); raise
|
|
173
|
+
if owner.retain_raw_frames:
|
|
174
|
+
try:
|
|
175
|
+
self._raw_store=TextFrameStore(owner.work_dir/('frames-'+self.identity),self._budget,
|
|
176
|
+
owner.spec.name,owner.session_id,self.identity,database_context=owner.database_context,channel=owner.spec.channel,integrity=owner._integrity,trace=owner._trace)
|
|
177
|
+
except BaseException as error:
|
|
178
|
+
self._raw_store=getattr(error,'text_frame_store_cleanup_owner',None); raise
|
|
179
|
+
except BaseException as error:
|
|
180
|
+
_cleanup_owner(self,error,'text_can_observation_cleanup_owner','文本CAN观测构造')
|
|
181
|
+
raise
|
|
182
|
+
|
|
183
|
+
@property
|
|
184
|
+
def closed(self):
|
|
185
|
+
"""返回真实关闭状态。参数: 无。返回: bool。异常: 无。
|
|
186
|
+
"""
|
|
187
|
+
return self._closed
|
|
188
|
+
|
|
189
|
+
@property
|
|
190
|
+
def failed(self):
|
|
191
|
+
"""返回当前读取是否失败。参数: 无。返回: bool。异常: 无。
|
|
192
|
+
"""
|
|
193
|
+
return self._failed
|
|
194
|
+
|
|
195
|
+
@property
|
|
196
|
+
def exhausted(self):
|
|
197
|
+
"""返回完整EOF及解析器关闭事实。参数: 无。返回: bool。异常: 无。
|
|
198
|
+
"""
|
|
199
|
+
return self._exhausted
|
|
200
|
+
|
|
201
|
+
@property
|
|
202
|
+
def observation(self):
|
|
203
|
+
"""仅交付本read已完成的真实观测。参数: 无。返回: CANObservation。异常: 未完成/失败。
|
|
204
|
+
"""
|
|
205
|
+
if not self._exhausted or self._failed or self._observation is None:
|
|
206
|
+
raise ResultClosedError('文本CAN观测尚未完成')
|
|
207
|
+
return self._observation
|
|
208
|
+
|
|
209
|
+
@property
|
|
210
|
+
def observed_bounds(self):
|
|
211
|
+
"""返回同次解析已经看到的首末时间,不额外扫描或冒充EOF。
|
|
212
|
+
|
|
213
|
+
参数: 无。返回: (first,last),空输入为None。异常: 失败/关闭状态拒绝借读。
|
|
214
|
+
"""
|
|
215
|
+
if self._closed or self._failed:
|
|
216
|
+
raise ResultClosedError('文本CAN观测已关闭或失败')
|
|
217
|
+
if self._observation is not None:
|
|
218
|
+
return self._observation.first_ns,self._observation.last_ns
|
|
219
|
+
return self._decoder.first_ns,self._decoder.last_ns
|
|
220
|
+
|
|
221
|
+
@property
|
|
222
|
+
def runtime_metadata(self):
|
|
223
|
+
"""交付同次DBC身份与解码次数。参数: 无。返回: 冻结元数据。异常: 未完成。
|
|
224
|
+
"""
|
|
225
|
+
self.observation
|
|
226
|
+
return self._runtime_metadata
|
|
227
|
+
|
|
228
|
+
def prepare_metadata(self):
|
|
229
|
+
"""在读取前取得同次DBC周期,不冒充最终解码计数。
|
|
230
|
+
|
|
231
|
+
参数: 无。返回: 冻结DBC事实。异常: 关闭/失败或启动原错;清理由本read负责。
|
|
232
|
+
"""
|
|
233
|
+
if self._closed or self._failed or self._decoder is None:
|
|
234
|
+
raise ResultClosedError('文本CAN读取已关闭或失败')
|
|
235
|
+
try:
|
|
236
|
+
facts = self._decoder.prepare_metadata()
|
|
237
|
+
if self._binding_projection is None and self._owner._update_projection is not None:
|
|
238
|
+
self._binding_projection = self._owner._update_projection.for_read(facts['fields'])
|
|
239
|
+
return facts
|
|
240
|
+
except BaseException as error:
|
|
241
|
+
self._failed = True
|
|
242
|
+
_cleanup_owner(self, error, 'text_can_observation_cleanup_owner', '文本CAN初始化')
|
|
243
|
+
raise
|
|
244
|
+
|
|
245
|
+
def __iter__(self):
|
|
246
|
+
"""返回独立游标。参数: 无。返回: self。异常: 无。
|
|
247
|
+
"""
|
|
248
|
+
return self
|
|
249
|
+
|
|
250
|
+
def _accept(self,batch):
|
|
251
|
+
"""按既有批合同核同刻组,保留所需pending费用。参数: batch。返回: 原批。异常: 校验/预算错。
|
|
252
|
+
"""
|
|
253
|
+
_reserve_owned_ram(self,4096+2*_pending_bytes(self._validator)+1024*batch.sample_count,'_validation_cost')
|
|
254
|
+
self._validator.accept(batch)
|
|
255
|
+
retained=_pending_bytes(self._validator)
|
|
256
|
+
_release_owned_ram(self,self._pending_cost,'_pending_cost')
|
|
257
|
+
self._validation_cost-=retained; self._pending_cost+=retained
|
|
258
|
+
_release_owned_ram(self,self._validation_cost,'_validation_cost')
|
|
259
|
+
self._current=batch; return batch
|
|
260
|
+
|
|
261
|
+
def _fill(self):
|
|
262
|
+
"""按全部别名的样本容量取有限原记录,所有值只解码一次。参数: 无。返回: None。异常: 原读/预算/暂存错。
|
|
263
|
+
"""
|
|
264
|
+
self._records.clear(); self._column=0
|
|
265
|
+
if self._binding_projection is None:
|
|
266
|
+
self.prepare_metadata()
|
|
267
|
+
_release_owned_ram(self,self._records_cost,'_records_cost')
|
|
268
|
+
raw_rows=min(256,max(1,self._request.batch_rows//max(1,len(self._definitions))))
|
|
269
|
+
for _ in range(raw_rows):
|
|
270
|
+
try:
|
|
271
|
+
record=next(self._decoder)
|
|
272
|
+
except StopIteration:
|
|
273
|
+
self._raw_eof=True; break
|
|
274
|
+
cost=16384+_metadata_bytes((record.values,record.frame_values,record.frame_layout,
|
|
275
|
+
str(record.raw.path),record.raw.raw_time))*32
|
|
276
|
+
_reserve_owned_ram(self,cost,'_records_cost'); self._records.append(record)
|
|
277
|
+
if self._raw_store is not None:
|
|
278
|
+
self._raw_store.append(record)
|
|
279
|
+
if self._owner._update_consumer is not None:
|
|
280
|
+
from .message_delivery import deliver_message
|
|
281
|
+
deliver_message(self,self._binding_projection,self._owner._update_consumer,
|
|
282
|
+
record.raw.frame,record.sequence,dict(record.values),record.raw.time_ns,canonical_keys=True)
|
|
283
|
+
|
|
284
|
+
def __next__(self):
|
|
285
|
+
"""交付全局时间非递减的有界批,最终EOF后保完成事实。参数: 无。返回: SignalBatch。异常: EOF/原读/预算/合同错。
|
|
286
|
+
"""
|
|
287
|
+
if self._closed or self._exhausted:
|
|
288
|
+
raise StopIteration
|
|
289
|
+
if self._failed:
|
|
290
|
+
raise ResultClosedError('失败的文本CAN读取只能清理')
|
|
291
|
+
try:
|
|
292
|
+
self._owner._ensure_open()
|
|
293
|
+
self._current=None; _release_owned_ram(self,self._batch_cost,'_batch_cost')
|
|
294
|
+
if self._eof_sent:
|
|
295
|
+
self._finish(); raise StopIteration
|
|
296
|
+
if not self._records or self._column>=max(1,len(self._definitions)):
|
|
297
|
+
self._fill()
|
|
298
|
+
if not self._records and self._raw_eof:
|
|
299
|
+
self._eof_sent=True
|
|
300
|
+
return self._accept(SignalBatch(self._owner.spec.name,self._request.session_id,{},
|
|
301
|
+
self._decoder.last_ns,True,self._decoder.last_ns))
|
|
302
|
+
column_count=min(self._request.batch_rows,max(1,len(self._definitions)-self._column))
|
|
303
|
+
_reserve_owned_ram(self,65536+(2*self._records_cost+16384)*column_count,'_batch_cost')
|
|
304
|
+
columns={}
|
|
305
|
+
if self._definitions:
|
|
306
|
+
for definition in self._definitions[self._column:self._column+column_count]:
|
|
307
|
+
columns[definition.name]=pack_text_records(definition,tuple(self._records),self._request.session_id,self._owner.backend)
|
|
308
|
+
self._column+=column_count
|
|
309
|
+
# watermark含端点;尚待交付的别名可能从块首开始,因此只能推进到首点前1ns。
|
|
310
|
+
progress=self._records[-1].raw.time_ns if self._column>=max(1,len(self._definitions)) else self._records[0].raw.time_ns
|
|
311
|
+
watermark=None if progress==-(1<<63) else progress-1
|
|
312
|
+
return self._accept(SignalBatch(self._owner.spec.name,self._request.session_id,columns,watermark,False,None))
|
|
313
|
+
except StopIteration:
|
|
314
|
+
raise
|
|
315
|
+
except BaseException as error:
|
|
316
|
+
self._failed=True
|
|
317
|
+
_cleanup_owner(self,error,'text_can_observation_cleanup_owner','文本CAN观测读取')
|
|
318
|
+
raise
|
|
319
|
+
|
|
320
|
+
def _finish(self):
|
|
321
|
+
"""封口可选原帧仓,解析器真正关闭后提交完整事实。参数: 无。返回: None。异常: 封口/关闭/预算错。
|
|
322
|
+
"""
|
|
323
|
+
if not self._decoder.exhausted:
|
|
324
|
+
raise ValueError('文本原始解析器没有真正到达EOF')
|
|
325
|
+
raw=self._decoder
|
|
326
|
+
fact=CANObservation(self._owner.spec.name,self._request.session_id,self._request,self.identity,
|
|
327
|
+
raw.first_ns,raw.last_ns,raw.count,True,
|
|
328
|
+
'selected' if self._owner._selected_ids is not None and self._owner.spec.source_type=='raw_can_csv' else 'source',
|
|
329
|
+
raw.retained_count)
|
|
330
|
+
metadata=dict(raw.metadata,decode_calls=raw.decode_calls,record_count=raw.count,source_kind=self._owner.spec.source_type)
|
|
331
|
+
_reserve_owned_ram(self,65536+_metadata_bytes(metadata)*32,'_runtime_cost')
|
|
332
|
+
self._runtime_metadata=freeze_metadata(metadata)
|
|
333
|
+
if self._raw_store is not None:
|
|
334
|
+
self._raw_store.seal()
|
|
335
|
+
self._decoder.close(); self._decoder=None
|
|
336
|
+
self._observation=fact; self._exhausted=True
|
|
337
|
+
|
|
338
|
+
def take_raw_store(self,receiver,slot):
|
|
339
|
+
"""移交本read的同次封口原帧仓。参数: receiver空槽及slot名。返回: None。异常: 未完成/已有责任。
|
|
340
|
+
"""
|
|
341
|
+
self.observation
|
|
342
|
+
if self._raw_store is None or self._raw_store.state!='sealed' or getattr(receiver,slot,None) is not None:
|
|
343
|
+
raise ValueError('文本原帧仓不能移交')
|
|
344
|
+
setattr(receiver,slot,self._raw_store); self._raw_store=None
|
|
345
|
+
|
|
346
|
+
def close(self):
|
|
347
|
+
"""关闭实际解析器/原帧仓并释放自身费用,不释放共享DBC。参数: 无。返回: None。异常: 原清理错可恢复。
|
|
348
|
+
"""
|
|
349
|
+
if self._closed:
|
|
350
|
+
return
|
|
351
|
+
self._current=None; self._records.clear(); self._validator=None
|
|
352
|
+
if self._decoder is not None:
|
|
353
|
+
self._decoder.close(); self._decoder=None
|
|
354
|
+
if self._raw_store is not None:
|
|
355
|
+
self._raw_store.close(); self._raw_store=None
|
|
356
|
+
self._runtime_metadata=self._observation=self._binding_projection=None
|
|
357
|
+
for slot in ('_update_cost','_batch_cost','_records_cost','_pending_cost','_validation_cost','_runtime_cost','_fixed_cost'):
|
|
358
|
+
_release_owned_ram(self,getattr(self,slot),slot)
|
|
359
|
+
self._owner._requests.discard(self); self._closed=True
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
"""逐个准确边界驱动一个真实条件规则,不建立全量分析轴。
|
|
2
|
+
|
|
3
|
+
调用方保留真实下一完整组直到consumed_group=True,域前完整组由调用方先提交作种子。
|
|
4
|
+
本游标直接处理domain.start,随后选择TTL、当前duration deadline、更新和来源/会话末。
|
|
5
|
+
每步prepare旧点→可选一次完整组提交→complete三视图→独立预算Detector,终点正式finish。
|
|
6
|
+
输出TimelineStep拥有条件结果和事件批,须close;固定与步workspace先申请,输出不复制
|
|
7
|
+
事件/位置,不保留完整组。旧已交付步在后续失败后仍可读,失败游标禁止继续。
|
|
8
|
+
只驱动单规则;多规则共用提交、窗口/指标和公共AnalysisRunner另接,不改旧I/O或业务算法。
|
|
9
|
+
使用同一单线程账本,保证新层保守计账,不代表整进程RSS或外部另存引用被强制回收。
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
# 只复用已验时间/查询/检测/生命周期协议,两个数值后端仍各自执行。
|
|
13
|
+
from ..core.expression import CompiledExpression
|
|
14
|
+
from ..core.models import SourceRef
|
|
15
|
+
from ..core.temporal import TemporalRule
|
|
16
|
+
from ..core.types import SignalDType
|
|
17
|
+
from ..results.errors import AnalysisError, ResultClosedError
|
|
18
|
+
from .boundaries import BoundaryQueries, RuleDeadline, _require_native_ns
|
|
19
|
+
from .condition_evidence import ConditionEvidenceQueries
|
|
20
|
+
from .groups import DecodedTimeGroup
|
|
21
|
+
from .temporal_buffer import BudgetedTemporalDetector, _BatchRegistry
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _require_timeline_input(evidence, boundaries, compiled, rule, source_refs):
|
|
25
|
+
"""共用单/多规则的已有起点与实际会话校验,不推进或分配分析数组。
|
|
26
|
+
|
|
27
|
+
参数: 两查询、登记BOOL、冻结规则及固定SourceRef tuple。
|
|
28
|
+
返回: 原表达式整数登记槽;不持有编译树。
|
|
29
|
+
异常: 类型/上游/会话/已处理起点错误,保留全部caller状态。
|
|
30
|
+
"""
|
|
31
|
+
if not isinstance(evidence, ConditionEvidenceQueries) or not isinstance(boundaries, BoundaryQueries):
|
|
32
|
+
raise TypeError('时间游标需要真实条件与边界查询')
|
|
33
|
+
evidence._ensure_open()
|
|
34
|
+
boundaries._ensure_open()
|
|
35
|
+
if boundaries._expressions is not evidence._queries:
|
|
36
|
+
raise ValueError('时间游标两查询必须借用同一真实表达式owner')
|
|
37
|
+
# 同一个表达式owner仍可能有不同实际范围;在Detector申请前拒绝错配的终点或起点。
|
|
38
|
+
if (boundaries._domain.start_ns != evidence._start
|
|
39
|
+
or boundaries._domain.end_ns != evidence._end):
|
|
40
|
+
raise ValueError('时间游标两查询必须使用同一实际观测范围')
|
|
41
|
+
if not isinstance(compiled, CompiledExpression) or compiled.root.dtype is not SignalDType.BOOL:
|
|
42
|
+
raise TypeError('时间游标需要已登记BOOL条件')
|
|
43
|
+
slot = evidence._slots.get(id(compiled))
|
|
44
|
+
if slot is None or evidence._queries._expressions[slot] is not compiled:
|
|
45
|
+
raise ValueError('时间游标条件未登记')
|
|
46
|
+
if not isinstance(rule, TemporalRule) or type(source_refs) is not tuple or any(
|
|
47
|
+
not isinstance(ref, SourceRef) for ref in source_refs):
|
|
48
|
+
raise TypeError('时间游标需要冻结规则和SourceRef tuple')
|
|
49
|
+
# 实际执行以HoldContext会话为准,不能套用内存绑定的bindings.session字段。
|
|
50
|
+
if rule.session_id != evidence._queries._holds._context.session_id or any(ref.session_id != rule.session_id for ref in source_refs):
|
|
51
|
+
raise ValueError('时间游标规则/来源会话与实际绑定不一致')
|
|
52
|
+
state = evidence._queries._holds._state
|
|
53
|
+
if (state.last_time_ns is not None and state.last_time_ns >= evidence._start
|
|
54
|
+
or evidence._pending[slot] is not None or evidence._completed_times[slot] is not None):
|
|
55
|
+
raise ValueError('时间游标必须从未处理的起点开始,种子只允许域前完整组')
|
|
56
|
+
return slot
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class TimelineStep:
|
|
60
|
+
"""拥有一个时刻的条件证据和本次增量事件,三个申请各自唯一释放。
|
|
61
|
+
|
|
62
|
+
条件和事件不复制,workspace覆盖本对象/链字段;关闭子结果后释放workspace。
|
|
63
|
+
私有链仅登记本owner,后续失败不撤销先前已交付对象。
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
def __init__(self, owner, cost, time_ns, consumed, condition, events):
|
|
67
|
+
"""接收已计账子结果,不安装登记。
|
|
68
|
+
|
|
69
|
+
参数: owner游标;cost workspace bytes;time_ns整数ns;consumed是否消费组;
|
|
70
|
+
condition完成条件证据;events预算事件批。
|
|
71
|
+
返回: 尚未登记的步。异常: 构造失败由step外层清理。
|
|
72
|
+
"""
|
|
73
|
+
self._owner, self._cost, self._closed = owner, cost, False
|
|
74
|
+
self._time, self._consumed, self._condition, self._events = time_ns, consumed, condition, events
|
|
75
|
+
self._registry = self._previous = self._next = None
|
|
76
|
+
|
|
77
|
+
def _ensure_open(self):
|
|
78
|
+
"""拒绝释放后读取。参数: 无。返回: None。异常: ResultClosedError。"""
|
|
79
|
+
if self._closed:
|
|
80
|
+
raise ResultClosedError('时间游标步已关闭')
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
def closed(self):
|
|
84
|
+
"""读取资源状态。参数: 无。返回: bool。异常: 无。"""
|
|
85
|
+
return self._closed
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def time_ns(self):
|
|
89
|
+
"""读取准确时刻。参数: 无。返回: 原生int ns。异常: ResultClosedError。"""
|
|
90
|
+
self._ensure_open()
|
|
91
|
+
return self._time
|
|
92
|
+
|
|
93
|
+
@property
|
|
94
|
+
def consumed_group(self):
|
|
95
|
+
"""读取是否消费前瞻。参数: 无。返回: bool。异常: ResultClosedError。"""
|
|
96
|
+
self._ensure_open()
|
|
97
|
+
return self._consumed
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def tick(self):
|
|
101
|
+
"""借读自有一点证据。参数: 无。返回: ConditionTick。异常: ResultClosedError。"""
|
|
102
|
+
self._ensure_open()
|
|
103
|
+
return self._condition.ticks[0]
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def source_refs(self):
|
|
107
|
+
"""借读当前点完整位置。参数: 无。返回: SourceRef tuple。异常: ResultClosedError。"""
|
|
108
|
+
self._ensure_open()
|
|
109
|
+
return self._condition.source_refs
|
|
110
|
+
|
|
111
|
+
@property
|
|
112
|
+
def events(self):
|
|
113
|
+
"""借读本次增量输出。参数: 无。返回: Event tuple。异常: ResultClosedError。"""
|
|
114
|
+
self._ensure_open()
|
|
115
|
+
return self._events.events
|
|
116
|
+
|
|
117
|
+
def _discard(self):
|
|
118
|
+
"""无扣账地解除登记与关闭引用。
|
|
119
|
+
|
|
120
|
+
参数: 无。返回: None。异常: 脱链取消传播,finally仍关闭,owner可重试移除。
|
|
121
|
+
"""
|
|
122
|
+
try:
|
|
123
|
+
self._owner._results.discard(self)
|
|
124
|
+
finally:
|
|
125
|
+
self._closed, self._cost = True, 0
|
|
126
|
+
self._owner = self._condition = self._events = self._time = self._consumed = None
|
|
127
|
+
|
|
128
|
+
def close(self):
|
|
129
|
+
"""依次关闭两子结果与workspace,未扣账可重试。
|
|
130
|
+
|
|
131
|
+
参数: 无。返回: None,幂等。
|
|
132
|
+
异常: 子结果/预算/取消传播,已扣workspace则最小收尾且不会再次扣账。
|
|
133
|
+
"""
|
|
134
|
+
if self._closed:
|
|
135
|
+
return
|
|
136
|
+
# 每个子句柄成功关闭才清空字段,关闭取消留给下次重试。
|
|
137
|
+
for name in ('_events', '_condition'):
|
|
138
|
+
result = getattr(self, name)
|
|
139
|
+
if result is not None:
|
|
140
|
+
result.close()
|
|
141
|
+
setattr(self, name, None)
|
|
142
|
+
budget, cost = self._owner._budget, self._cost
|
|
143
|
+
before, released = budget.ram_bytes, False
|
|
144
|
+
try:
|
|
145
|
+
budget.release_ram(cost)
|
|
146
|
+
released = True
|
|
147
|
+
finally:
|
|
148
|
+
if released or budget.ram_bytes == before - cost:
|
|
149
|
+
self._discard()
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
class TemporalTimeline:
|
|
153
|
+
"""借用单条件查询/边界并拥有一个新检测器的严格递增游标。
|
|
154
|
+
|
|
155
|
+
起点前可有已提交种子;开始后只能由此游标提交state,revision检测外部错位。
|
|
156
|
+
不缓存输入组、全轴或事件全集;每个已交付步独立持有预算到close。
|
|
157
|
+
"""
|
|
158
|
+
|
|
159
|
+
def __init__(self, evidence: ConditionEvidenceQueries, boundaries: BoundaryQueries,
|
|
160
|
+
compiled: CompiledExpression, rule: TemporalRule, *, source_refs: tuple[SourceRef, ...] = ()):
|
|
161
|
+
"""校验共享真实上游与单规则后创建预算检测器。
|
|
162
|
+
|
|
163
|
+
参数: evidence/boundaries借用同一表达式owner;compiled已登记BOOL;rule冻结配置;
|
|
164
|
+
source_refs调用方提供的固定规则绑定位置,不等于全部事件原始行。
|
|
165
|
+
返回: 新游标,尚未处理start。异常: 类型/登记/会话/已有推进/预算/取消传播并清理自有申请。
|
|
166
|
+
"""
|
|
167
|
+
slot = _require_timeline_input(evidence, boundaries, compiled, rule, source_refs)
|
|
168
|
+
state = evidence._queries._holds._state
|
|
169
|
+
# 固定元数据由已计账上游/检测器各自拥有,此申请覆盖游标与登记字段。
|
|
170
|
+
self._budget, self._fixed_cost, self._closed, self._failed = evidence._budget, 0, False, False
|
|
171
|
+
self._evidence = self._boundaries = self._detector = self._results = None
|
|
172
|
+
self._slot, self._cursor, self._revision = slot, None, state.revision
|
|
173
|
+
self._start, self._end = evidence._start, evidence._end
|
|
174
|
+
before = self._budget.ram_bytes
|
|
175
|
+
try:
|
|
176
|
+
self._budget.reserve_ram(65536)
|
|
177
|
+
self._fixed_cost = 65536
|
|
178
|
+
self._evidence, self._boundaries, self._results = evidence, boundaries, _BatchRegistry()
|
|
179
|
+
self._detector = BudgetedTemporalDetector(self._budget, rule, self._start, self._end,
|
|
180
|
+
source_refs=source_refs, backend=evidence._backend)
|
|
181
|
+
except BaseException:
|
|
182
|
+
if self._fixed_cost == 0 and self._budget.ram_bytes == before + 65536:
|
|
183
|
+
self._fixed_cost = 65536
|
|
184
|
+
self.close()
|
|
185
|
+
raise
|
|
186
|
+
|
|
187
|
+
@property
|
|
188
|
+
def closed(self):
|
|
189
|
+
"""读取关闭状态。参数: 无。返回: bool。异常: 无。"""
|
|
190
|
+
return self._closed
|
|
191
|
+
|
|
192
|
+
@property
|
|
193
|
+
def failed(self):
|
|
194
|
+
"""读取不可重试状态。参数: 无。返回: bool。异常: 无。"""
|
|
195
|
+
return self._failed
|
|
196
|
+
|
|
197
|
+
@property
|
|
198
|
+
def cursor_ns(self):
|
|
199
|
+
"""读取已处理游标。参数: 无。返回: int ns或起步前None。异常: ResultClosedError。"""
|
|
200
|
+
if self._closed:
|
|
201
|
+
raise ResultClosedError('时间游标已关闭')
|
|
202
|
+
return self._cursor
|
|
203
|
+
|
|
204
|
+
def _ensure_active(self):
|
|
205
|
+
"""核对自身/上游可用。参数: 无。返回: None。异常: 关闭或AnalysisError。"""
|
|
206
|
+
if self._closed:
|
|
207
|
+
raise ResultClosedError('时间游标已关闭')
|
|
208
|
+
if self._failed:
|
|
209
|
+
raise AnalysisError('时间游标已失败,禁止重试')
|
|
210
|
+
self._evidence._ensure_open()
|
|
211
|
+
self._boundaries._ensure_open()
|
|
212
|
+
|
|
213
|
+
def _construct(self, cost, time_ns, consumed, condition, events):
|
|
214
|
+
"""仅构造局部步。参数: 已计账事实与句柄。返回: TimelineStep。异常: 分配/取消。"""
|
|
215
|
+
return TimelineStep(self, cost, time_ns, consumed, condition, events)
|
|
216
|
+
|
|
217
|
+
def step(self, next_group: DecodedTimeGroup | None = None) -> TimelineStep | None:
|
|
218
|
+
"""推进一个准确时刻,只有consumed_group为True时调用方才取下一完整组。
|
|
219
|
+
|
|
220
|
+
参数: next_group真实前瞻或明确无后续组的None,域前种子已由调用方提交。
|
|
221
|
+
返回: 须close的TimelineStep;已处理terminal后为None。
|
|
222
|
+
异常: 入口/外部revision错位前置拒绝;workspace不足未推进可重试;开始后的错误标failed,
|
|
223
|
+
不回滚state/Detector,保留以前输出且清理本次未交付申请。
|
|
224
|
+
"""
|
|
225
|
+
self._ensure_active()
|
|
226
|
+
state = self._evidence._queries._holds._state
|
|
227
|
+
if state.revision != self._revision:
|
|
228
|
+
raise ValueError('时间游标开始后不得外部提交state')
|
|
229
|
+
if next_group is not None:
|
|
230
|
+
if type(next_group) is not DecodedTimeGroup:
|
|
231
|
+
raise TypeError('时间游标需要真实DecodedTimeGroup或None')
|
|
232
|
+
_require_native_ns(next_group.time_ns, 'timeline.next_group_ns')
|
|
233
|
+
if next_group.time_ns < self._start or self._cursor is not None and next_group.time_ns <= self._cursor:
|
|
234
|
+
raise ValueError('前瞻必须位于域起点及之后且严格晚于已处理游标')
|
|
235
|
+
if self._cursor == self._end:
|
|
236
|
+
return None
|
|
237
|
+
# 固定一点控制workspace先申请;条件、边界与事件各自另有已验预算。
|
|
238
|
+
cost, before = 65536, self._budget.ram_bytes
|
|
239
|
+
reserved, started, condition, events, final, result = False, False, None, None, None, None
|
|
240
|
+
try:
|
|
241
|
+
self._budget.reserve_ram(cost)
|
|
242
|
+
reserved, started = True, True
|
|
243
|
+
compiled = self._evidence._queries._expressions[self._slot]
|
|
244
|
+
time_ns = self._start
|
|
245
|
+
if self._cursor is not None:
|
|
246
|
+
deadline = self._detector.next_deadline_ns
|
|
247
|
+
deadlines = () if deadline is None else (RuleDeadline(self._detector.rule.rule_id, deadline),)
|
|
248
|
+
boundary = self._boundaries.query_next(compiled, after_ns=self._cursor,
|
|
249
|
+
next_group_ns=None if next_group is None else next_group.time_ns, duration_deadlines=deadlines)
|
|
250
|
+
try:
|
|
251
|
+
time_ns = boundary.time_ns
|
|
252
|
+
finally:
|
|
253
|
+
boundary.close()
|
|
254
|
+
# 同一完整组在旧点捕获之后只提交一次,定时器绝不制造实际更新。
|
|
255
|
+
consumed = next_group is not None and next_group.time_ns == time_ns
|
|
256
|
+
condition = self._evidence.prepare(compiled, time_ns)
|
|
257
|
+
if consumed:
|
|
258
|
+
state.apply(next_group)
|
|
259
|
+
condition.complete()
|
|
260
|
+
events = self._detector.push(condition.ticks)
|
|
261
|
+
if time_ns == self._end:
|
|
262
|
+
final = self._detector.finish()
|
|
263
|
+
final.close()
|
|
264
|
+
final = None
|
|
265
|
+
# 外层先拿到对象再安装,取消只清理当前步,不关闭先前输出。
|
|
266
|
+
result = self._construct(cost, time_ns, consumed, condition, events)
|
|
267
|
+
self._results.add(result)
|
|
268
|
+
self._cursor, self._revision = time_ns, state.revision
|
|
269
|
+
return result
|
|
270
|
+
except BaseException:
|
|
271
|
+
if started:
|
|
272
|
+
self._failed = True
|
|
273
|
+
try:
|
|
274
|
+
if result is not None:
|
|
275
|
+
result._discard()
|
|
276
|
+
finally:
|
|
277
|
+
try:
|
|
278
|
+
# 未交付子结果仍有原owner登记;成功关闭移除,失败保留到owner.close。
|
|
279
|
+
for child in (final, events, condition):
|
|
280
|
+
if child is not None:
|
|
281
|
+
child.close()
|
|
282
|
+
finally:
|
|
283
|
+
if reserved or self._budget.ram_bytes == before + cost:
|
|
284
|
+
self._budget.release_ram(cost)
|
|
285
|
+
raise
|
|
286
|
+
|
|
287
|
+
def close(self):
|
|
288
|
+
"""关闭所有自有步、检测器与固定空间,保留借用查询/状态/历史。
|
|
289
|
+
|
|
290
|
+
参数: 无。返回: None,幂等。
|
|
291
|
+
异常: 子关闭/预算/取消传播,未完成可重试,固定已释放则最小关闭。
|
|
292
|
+
"""
|
|
293
|
+
if self._closed:
|
|
294
|
+
return
|
|
295
|
+
while self._results:
|
|
296
|
+
result = next(iter(self._results))
|
|
297
|
+
result.close()
|
|
298
|
+
self._results.discard(result)
|
|
299
|
+
if self._detector is not None:
|
|
300
|
+
self._detector.close()
|
|
301
|
+
self._detector = None
|
|
302
|
+
cost, before, released = self._fixed_cost, self._budget.ram_bytes, False
|
|
303
|
+
try:
|
|
304
|
+
self._budget.release_ram(cost)
|
|
305
|
+
released = True
|
|
306
|
+
finally:
|
|
307
|
+
if released or self._budget.ram_bytes == before - cost:
|
|
308
|
+
self._closed, self._fixed_cost = True, 0
|
|
309
|
+
self._evidence = self._boundaries = self._results = None
|