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,550 @@
|
|
|
1
|
+
"""为纯CAN逐消息计划保存实际完成证明,不保存无人使用的普通样本文件。
|
|
2
|
+
|
|
3
|
+
输入为原计划、实际需求字段的预算CAN读取和同一请求。显式all诊断仍构造原
|
|
4
|
+
HistorySample并编码为规范字节,只增量计算stream_sha256,不落盘。
|
|
5
|
+
默认直接累计不生成普通信号样本,只在唯一EOF处核协议,并按真实时间范围保存原时间与
|
|
6
|
+
所需记录的独立内容指纹。显式all诊断保原规范样本摘要;有贡献明细时仍核消息仓。
|
|
7
|
+
真实读取耗尽、进程结束、消息仓移交及read关闭后才开放有限证明。该证明明确是
|
|
8
|
+
扫描流证据,不是DecodedSourceEvidence,也不提供磁盘history_sha256或文件EOF。
|
|
9
|
+
旧公开历史绑定、普通分析和原始导出不使用本模块。消息计算直接消费原批或读取实际消息仓。
|
|
10
|
+
所有新状态、当前批、单行编码和未关闭资源先计预算,失败保同一最高owner供重试。
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from dataclasses import dataclass
|
|
14
|
+
from collections.abc import Mapping
|
|
15
|
+
from hashlib import sha256
|
|
16
|
+
import heapq
|
|
17
|
+
|
|
18
|
+
from ..core.numeric import ScalarValue
|
|
19
|
+
from ..core.types import QualityFlag, SignalDType
|
|
20
|
+
from ..planning.plan import AnalysisPlan
|
|
21
|
+
from ..planning.models import SourcePlan
|
|
22
|
+
from ..planning.input_requirements import collect_input_requirements
|
|
23
|
+
from ..results.errors import AnalysisError, ResultClosedError, ResultFormatError
|
|
24
|
+
from ..results.spool import _cleanup_owner, _reserve_owned_ram, _release_owned_ram
|
|
25
|
+
from ..sources.models import ReadRequest, SignalBatch
|
|
26
|
+
from ..sources.protocol import BatchValidator
|
|
27
|
+
from .bindings import _fingerprint, require_decoded_source_contract
|
|
28
|
+
from .can_reader import BudgetedLegacyCANSourceAdapter
|
|
29
|
+
from .can_batch_reader import CANBatchObservationRead
|
|
30
|
+
from .history import _metadata_bytes, _pending_bytes, _batch_bytes
|
|
31
|
+
from .history_records import HistorySample, HistoryProgress, estimate_record_bytes, encode_record
|
|
32
|
+
from .observed_ingestion import SourceScanObservation
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def can_message_only(plan):
|
|
36
|
+
"""选择没有普通样本消费者的全CAN计划。参数: 原AnalysisPlan。返回: bool。异常: 错误模型属性错误。"""
|
|
37
|
+
return bool(plan.message_calculations and all(source.source_type == 'can_blf' for source in plan.sources)
|
|
38
|
+
and not plan.rules and not plan.windows and not plan.calculations
|
|
39
|
+
and plan.outputs.signal_csv is None and plan.outputs.can_frames is None)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _source_contract(source):
|
|
43
|
+
"""提取有限原CAN配置事实供替换检查。参数: 原SourcePlan。返回: 冻结tuple。异常: 非CAN属性错误。"""
|
|
44
|
+
config = source.config
|
|
45
|
+
original = (source.name, source.source_type, source.input_identity, source.time_unit, source.timezone_text,
|
|
46
|
+
config.name, str(config.path), str(config.dbc_path), config.channel, config.legacy_profile,
|
|
47
|
+
config.timebase, config.unit, config.offset_ns)
|
|
48
|
+
# 旧all指纹严格保持原有限tuple;新方式显式进入完成证据,不借用旧全解码身份。
|
|
49
|
+
contract = original if config.decode_scope == 'all' else original + (('decode-scope-v1', config.decode_scope),)
|
|
50
|
+
return contract if config.input_check == 'full' or config.decode_scope == 'all' else contract + (('input-check-v1', config.input_check),)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@dataclass(frozen=True)
|
|
54
|
+
class ScannedSignalFacts:
|
|
55
|
+
"""保存已完成首遍验证的有限事实;stream摘要不声称有对应磁盘文件。"""
|
|
56
|
+
|
|
57
|
+
source: str
|
|
58
|
+
session_id: str
|
|
59
|
+
source_contract_sha256: str
|
|
60
|
+
description_sha256: str
|
|
61
|
+
request_sha256: str
|
|
62
|
+
stream_sha256: str
|
|
63
|
+
progress_count: int
|
|
64
|
+
sample_count: int
|
|
65
|
+
projected_aliases: tuple[str, ...]
|
|
66
|
+
completion: HistoryProgress
|
|
67
|
+
observation: SourceScanObservation
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
@dataclass(frozen=True)
|
|
71
|
+
class ScannedInputFacts:
|
|
72
|
+
"""记录纯消息读取的实际输入摘要,不声称生成或验证过普通信号样本。"""
|
|
73
|
+
|
|
74
|
+
source: str # 本次真实来源。
|
|
75
|
+
session_id: str # 原会话。
|
|
76
|
+
source_contract_sha256: str # 静态来源与解码策略。
|
|
77
|
+
description_sha256: str # 实际需求字段描述。
|
|
78
|
+
request_sha256: str # 无普通样本的真实读取请求。
|
|
79
|
+
original_timestamps_sha256: str | None # source为全时间SHA,其他范围明确未采集。
|
|
80
|
+
retained_records_sha256: str # 实际保留记录的长度前缀与JSON原字节。
|
|
81
|
+
required_aliases: tuple[str, ...] # 实际需要的消息字段别名。
|
|
82
|
+
retained_record_count: int # 保留的原消息数,不是样本数。
|
|
83
|
+
completion: HistoryProgress # 仅内部EOF协议标记;不编码成样本流摘要。
|
|
84
|
+
observation: SourceScanObservation # 原读取数量及明确时间范围。
|
|
85
|
+
time_scope: str = 'source' # 未采集时间不能借用旧全时间证明。
|
|
86
|
+
input_check: str = 'full' # 实际固定的原帧检查策略。
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class ScannedCANSignals:
|
|
90
|
+
"""拥有一个实际CAN read、有限验证状态和未移交消息仓,不拥有普通历史文件。"""
|
|
91
|
+
|
|
92
|
+
def __init__(self, declarations, source_plan, adapter, request, *, input_only=False):
|
|
93
|
+
"""核实际投影和原来源后预付状态。
|
|
94
|
+
|
|
95
|
+
参数: 四项原对象;input_only仅纯消息空样本请求,改存实际输入指纹。
|
|
96
|
+
返回: 读取与证明owner。异常: 原合同/预算错误,不打开第二次来源。
|
|
97
|
+
"""
|
|
98
|
+
if (not isinstance(source_plan, SourcePlan) or source_plan.source_type != 'can_blf'
|
|
99
|
+
or type(adapter) is not BudgetedLegacyCANSourceAdapter or type(request) is not ReadRequest
|
|
100
|
+
or not adapter.batch_read or adapter.retain_raw_frames):
|
|
101
|
+
raise TypeError('扫描证明只接真实有界CAN来源、原请求且无原始导出')
|
|
102
|
+
if type(input_only) is not bool or input_only and (request.signal_names or adapter.capture_message_updates
|
|
103
|
+
or adapter._update_consumer is None):
|
|
104
|
+
raise ValueError('输入证明仅接真实直接累计的空普通样本请求')
|
|
105
|
+
self._declarations, self._source_plan, self._adapter, self._request = declarations, source_plan, adapter, request
|
|
106
|
+
self._input_only = input_only
|
|
107
|
+
self._projected_aliases = request.signal_names
|
|
108
|
+
self._required_aliases = None
|
|
109
|
+
self._input_fingerprints = None
|
|
110
|
+
self._budget, self._config = adapter.budget, source_plan.config
|
|
111
|
+
self._fixed_cost = self._pending_cost = self._append_cost = self._record_cost = self._runtime_cost = self._held_cost = 0
|
|
112
|
+
self._read = self._batch = self._message_store = None
|
|
113
|
+
self._description = self._validator = self._definitions = self._contract = None
|
|
114
|
+
self._hash = self._expected_sha = self._completion = self._facts = self._facts_sha = None
|
|
115
|
+
self._counts = self._expected_counts = (0, 0)
|
|
116
|
+
self._runtime_metadata = self._read_identity = None
|
|
117
|
+
self._started = self._finished = self._closed = self._closing = self._failed = False
|
|
118
|
+
self._capture_message_updates = adapter.capture_message_updates
|
|
119
|
+
self._decode_scope, self._decode_frame_ids = adapter.decode_scope, None
|
|
120
|
+
self.retain_raw_frames = False
|
|
121
|
+
description = source = contract_request = None
|
|
122
|
+
try:
|
|
123
|
+
# 输入定义借用原对象;所有新索引、验证器、规范记录及摘要空间分别预付。
|
|
124
|
+
description = adapter.describe()
|
|
125
|
+
cost = 65536 + 32 * _metadata_bytes((description, request, declarations))
|
|
126
|
+
_reserve_owned_ram(self, cost, '_fixed_cost')
|
|
127
|
+
self._required_aliases = tuple(item.name for item in adapter.signals)
|
|
128
|
+
# 借用固定tuple的存活由本扫描已付描述/声明空间覆盖,adapter关闭后仍可核证据。
|
|
129
|
+
self._decode_frame_ids = adapter.decode_frame_ids
|
|
130
|
+
self._description, self._contract = description, _source_contract(source_plan)
|
|
131
|
+
self._validator = BatchValidator(description, request)
|
|
132
|
+
self._hash = sha256()
|
|
133
|
+
self._expected_sha = self._hash.hexdigest()
|
|
134
|
+
self._max_line_bytes = max(1, self._budget.memory_budget_bytes // 256)
|
|
135
|
+
self._require_contract()
|
|
136
|
+
source = next(item for item in declarations.sources if item.name == source_plan.name)
|
|
137
|
+
# 这里只核纯合同;空字段来源仍须由consume取得真实全帧观测和EOF。
|
|
138
|
+
# DBC/消息字段有实际用途,普通样本投影可以为空;分别核需要的字段描述与读请求。
|
|
139
|
+
contract_request = ReadRequest(request.session_id, self._required_aliases,
|
|
140
|
+
request.domain_start_ns, request.domain_end_ns, request.batch_rows)
|
|
141
|
+
self._definitions = require_decoded_source_contract(declarations, source, description, contract_request)
|
|
142
|
+
except BaseException as exc:
|
|
143
|
+
self._failed = True
|
|
144
|
+
_cleanup_owner(self, exc, 'scanned_can_signals_cleanup_owner', 'CAN扫描证明构造')
|
|
145
|
+
raise
|
|
146
|
+
finally:
|
|
147
|
+
# 构造失败可能已退款;异常栈不再保留本次新建请求和别名元组。
|
|
148
|
+
description = source = contract_request = None
|
|
149
|
+
|
|
150
|
+
def _require_contract(self, *, completed=False):
|
|
151
|
+
"""核原对象与实际本流状态,完成后不再访问已关闭adapter。参数: completed。返回: None。异常: 替换/失效错误。"""
|
|
152
|
+
if self._closed or self._closing or self._failed:
|
|
153
|
+
raise ResultClosedError('CAN扫描证明已关闭、清理或失败')
|
|
154
|
+
source, adapter = self._source_plan, self._adapter
|
|
155
|
+
declared = next((item for item in self._declarations.sources if item.name == source.name), None)
|
|
156
|
+
if (source.config is not self._config or _source_contract(source) != self._contract
|
|
157
|
+
or declared is None or declared.input_identity != source.input_identity
|
|
158
|
+
or declared.timebase != self._config.timebase or declared.offset_ns != self._config.offset_ns
|
|
159
|
+
or self._request.session_id != self._declarations.session_id
|
|
160
|
+
or self._request.signal_names != self._projected_aliases
|
|
161
|
+
or self._config.decode_scope == 'all' and self._projected_aliases != tuple(
|
|
162
|
+
item.name for item in self._declarations.signals if item.source == source.name)
|
|
163
|
+
or self._validator.description is not self._description or self._validator.request is not self._request
|
|
164
|
+
or self._counts != self._expected_counts or self._hash.hexdigest() != self._expected_sha):
|
|
165
|
+
raise ValueError('CAN扫描证明的原来源、完整投影、请求、验证器或计数摘要已改变')
|
|
166
|
+
if not completed:
|
|
167
|
+
adapter._ensure_open()
|
|
168
|
+
if (adapter.spec is not self._config or adapter.budget is not self._budget
|
|
169
|
+
or adapter.session_id != self._request.session_id or adapter.describe() != self._description
|
|
170
|
+
or adapter.capture_message_updates is not self._capture_message_updates
|
|
171
|
+
or adapter.decode_scope != self._decode_scope
|
|
172
|
+
or adapter.decode_frame_ids != self._decode_frame_ids
|
|
173
|
+
or adapter.retain_raw_frames or not adapter.batch_read):
|
|
174
|
+
raise ValueError('CAN扫描证明的实际adapter与原合同不符')
|
|
175
|
+
|
|
176
|
+
def _digest_record(self, record):
|
|
177
|
+
"""编码一条原规范记录并更新流摘要。参数: HistorySample/Progress。返回: None。异常: 原模型/编码/预算错误。"""
|
|
178
|
+
payload = primary = None
|
|
179
|
+
try:
|
|
180
|
+
_reserve_owned_ram(self, estimate_record_bytes(record), '_record_cost')
|
|
181
|
+
payload = encode_record(record, self._max_line_bytes)
|
|
182
|
+
self._hash.update(payload)
|
|
183
|
+
except BaseException as exc:
|
|
184
|
+
primary = exc
|
|
185
|
+
raise
|
|
186
|
+
finally:
|
|
187
|
+
record = payload = None
|
|
188
|
+
self._release_temporary('_record_cost', primary)
|
|
189
|
+
|
|
190
|
+
def _release_temporary(self, slot, primary):
|
|
191
|
+
"""归还实际临时费,清理错误不覆盖主错。参数: 费用槽及原异常。返回: None。异常: 无主错时释放错误。"""
|
|
192
|
+
try:
|
|
193
|
+
_release_owned_ram(self, getattr(self, slot), slot)
|
|
194
|
+
except BaseException as cleanup:
|
|
195
|
+
if primary is None:
|
|
196
|
+
raise
|
|
197
|
+
primary.add_note('扫描临时费用清理附加失败: ' + type(cleanup).__name__)
|
|
198
|
+
|
|
199
|
+
def _accept(self, batch):
|
|
200
|
+
"""按原历史顺序验证并编码一批,不写磁盘。参数: 原SignalBatch。返回: None。异常: 原协议/样本/预算错。"""
|
|
201
|
+
columns = heap = column = record = value = original = progress = None
|
|
202
|
+
definition = labels = logical = physical = primary = None
|
|
203
|
+
try:
|
|
204
|
+
if type(batch) is not SignalBatch or batch.source != self._source_plan.name:
|
|
205
|
+
raise ValueError('扫描样本批不属于原来源')
|
|
206
|
+
if self._input_only:
|
|
207
|
+
# 直接累计在read内部消费所有消息;这里只接受空的唯一EOF,不造ScalarValue/样本或摘要。
|
|
208
|
+
if batch.series or not batch.source_eof or self._completion is not None:
|
|
209
|
+
raise ValueError('纯消息输入证明不能混入普通样本或非最终批')
|
|
210
|
+
self._validator.accept(batch)
|
|
211
|
+
self._completion = HistoryProgress(0, batch.source, batch.session_id,
|
|
212
|
+
0, batch.watermark_ns, True, batch.observed_end_ns)
|
|
213
|
+
self._counts = self._expected_counts = (1, 0)
|
|
214
|
+
return
|
|
215
|
+
batch_index, total = self._counts
|
|
216
|
+
if batch_index >= 2 ** 63 - 1 or total + batch.sample_count >= 2 ** 63:
|
|
217
|
+
raise OverflowError('扫描批次/样本计数超过int64')
|
|
218
|
+
growth = batch.sample_count * 256 + len(batch.series) * 512
|
|
219
|
+
_reserve_owned_ram(self, _batch_bytes(batch) + _pending_bytes(self._validator)
|
|
220
|
+
+ growth + 4096 + len(batch.series) * 512, '_append_cost')
|
|
221
|
+
self._validator.accept(batch)
|
|
222
|
+
pending = _pending_bytes(self._validator)
|
|
223
|
+
if pending < self._pending_cost:
|
|
224
|
+
_release_owned_ram(self, self._pending_cost - pending, '_pending_cost')
|
|
225
|
+
else:
|
|
226
|
+
retained = pending - self._pending_cost
|
|
227
|
+
self._append_cost -= retained
|
|
228
|
+
self._pending_cost += retained
|
|
229
|
+
columns = tuple(batch.series.values())
|
|
230
|
+
heap = [(int(item.time_ns[0]), int(item.sequence[0]), order, 0)
|
|
231
|
+
for order, item in enumerate(columns) if len(item.time_ns)]
|
|
232
|
+
heapq.heapify(heap)
|
|
233
|
+
while heap:
|
|
234
|
+
time, sequence, order, index = heapq.heappop(heap)
|
|
235
|
+
column = columns[order]
|
|
236
|
+
physical, valid = column.values[index].item(), bool(column.valid[index])
|
|
237
|
+
original_present = column.original_values is not None
|
|
238
|
+
original = column.original_values[index] if original_present else None
|
|
239
|
+
logical = column.labels[physical] if valid and column.dtype is SignalDType.ENUM else physical
|
|
240
|
+
if not valid and original_present:
|
|
241
|
+
logical = original
|
|
242
|
+
value = ScalarValue(logical, column.dtype, valid, QualityFlag(int(column.quality[index])), column.labels)
|
|
243
|
+
record = HistorySample(batch_index, column.name, time, sequence, physical, value,
|
|
244
|
+
column.unit, column.source_ref[index], original_present, original)
|
|
245
|
+
definition = self._definitions[record.name]
|
|
246
|
+
labels = tuple(dict.fromkeys(label for _, label in definition.choices)) if definition.dtype is SignalDType.ENUM else ()
|
|
247
|
+
if (record.source_ref.field != definition.field or record.value.dtype is not definition.dtype
|
|
248
|
+
or record.unit != definition.unit or record.value.labels != labels):
|
|
249
|
+
raise ResultFormatError('实际扫描样本与当前绑定契约不符')
|
|
250
|
+
self._digest_record(record)
|
|
251
|
+
if index + 1 < len(column.time_ns):
|
|
252
|
+
heapq.heappush(heap, (int(column.time_ns[index + 1]), int(column.sequence[index + 1]), order, index + 1))
|
|
253
|
+
progress = HistoryProgress(batch_index, batch.source, batch.session_id,
|
|
254
|
+
batch.sample_count, batch.watermark_ns, batch.source_eof, batch.observed_end_ns)
|
|
255
|
+
self._digest_record(progress)
|
|
256
|
+
self._counts = self._expected_counts = (batch_index + 1, total + batch.sample_count)
|
|
257
|
+
self._expected_sha = self._hash.hexdigest()
|
|
258
|
+
if batch.source_eof:
|
|
259
|
+
self._completion = progress
|
|
260
|
+
except BaseException as exc:
|
|
261
|
+
primary = exc
|
|
262
|
+
raise
|
|
263
|
+
finally:
|
|
264
|
+
batch = columns = heap = column = record = value = original = progress = None
|
|
265
|
+
definition = labels = logical = physical = None
|
|
266
|
+
self._release_temporary('_append_cost', primary)
|
|
267
|
+
|
|
268
|
+
def _adopt(self, exc):
|
|
269
|
+
"""接实际未返回的read,避免丢失构造失败资源。参数: 原异常。返回: None。异常: 无正常新增异常。"""
|
|
270
|
+
if self._read is None:
|
|
271
|
+
self._read = getattr(exc, 'can_observation_read_cleanup_owner', None)
|
|
272
|
+
if self._read is None and self._message_store is None:
|
|
273
|
+
self._message_store = getattr(exc, 'decoded_message_store_cleanup_owner', None)
|
|
274
|
+
|
|
275
|
+
def _close_read(self):
|
|
276
|
+
"""关闭本次真实read,失败保留责任。参数: 无。返回: None。异常: 原关闭错误。"""
|
|
277
|
+
self._batch = None
|
|
278
|
+
if self._read is not None:
|
|
279
|
+
self._read.close()
|
|
280
|
+
if not self._read.closed:
|
|
281
|
+
raise AnalysisError('扫描read关闭未完成')
|
|
282
|
+
self._read = None
|
|
283
|
+
|
|
284
|
+
def consume(self):
|
|
285
|
+
"""完整扫描一次并在真实EOF和关闭后发布证明。参数: 无。返回: None。异常: 原错误及最高恢复owner。"""
|
|
286
|
+
self._require_contract(completed=self._finished)
|
|
287
|
+
if self._finished:
|
|
288
|
+
return
|
|
289
|
+
if self._started:
|
|
290
|
+
raise ResultClosedError('CAN扫描证明不能重复开始读取')
|
|
291
|
+
fact = metadata = store = observation = facts = None
|
|
292
|
+
try:
|
|
293
|
+
self._started = True
|
|
294
|
+
self._read = self._adapter.iter_batches_with_observation(self._request)
|
|
295
|
+
if type(self._read) is not CANBatchObservationRead:
|
|
296
|
+
raise TypeError('扫描证明必须消费本次实际CANBatchObservationRead')
|
|
297
|
+
while True:
|
|
298
|
+
self._require_contract()
|
|
299
|
+
try:
|
|
300
|
+
self._batch = next(self._read)
|
|
301
|
+
except StopIteration:
|
|
302
|
+
break
|
|
303
|
+
self._require_contract()
|
|
304
|
+
self._accept(self._batch)
|
|
305
|
+
self._batch = None
|
|
306
|
+
self._require_contract()
|
|
307
|
+
completion = self._completion
|
|
308
|
+
if completion is None or not completion.source_eof or not self._validator.ended:
|
|
309
|
+
raise ValueError('扫描证明缺少原流完整EOF')
|
|
310
|
+
fact = self._read.observation
|
|
311
|
+
if (not self._read.exhausted or self._read.failed or fact.request is not self._request
|
|
312
|
+
or fact.read_identity != self._read.identity or fact.source != self._source_plan.name
|
|
313
|
+
or fact.session_id != self._request.session_id or not fact.source_eof
|
|
314
|
+
or fact.last_ns != completion.observed_end_ns):
|
|
315
|
+
raise ValueError('CAN扫描完成事实不属于同一次真实读取')
|
|
316
|
+
metadata = self._read.runtime_metadata
|
|
317
|
+
_reserve_owned_ram(self, 65536 + 32 * _metadata_bytes(metadata), '_runtime_cost')
|
|
318
|
+
self._runtime_metadata, self._read_identity = metadata, fact.read_identity
|
|
319
|
+
if self._read.capture_message_updates is not self._capture_message_updates:
|
|
320
|
+
raise ValueError('扫描read的原消息捕获开关已改变')
|
|
321
|
+
if self._capture_message_updates:
|
|
322
|
+
self._read.take_message_store(self, '_message_store')
|
|
323
|
+
store = self._message_store
|
|
324
|
+
if (store.closed or store.state != 'sealed' or not store.sparse_sequences
|
|
325
|
+
or store.count > fact.row_count or store._last_sequence >= fact.row_count
|
|
326
|
+
or store.source_name != fact.source or store.session_id != fact.session_id
|
|
327
|
+
or store.read_identity != fact.read_identity or store.decoder_profile != metadata['profile']):
|
|
328
|
+
raise ValueError('扫描消息仓不属于本次完整输入')
|
|
329
|
+
start = self._description.observation_start_ns
|
|
330
|
+
observation = SourceScanObservation(fact.source, fact.session_id, fact.first_ns, fact.last_ns,
|
|
331
|
+
fact.row_count, (fact.first_ns if start is None else start) if fact.time_scope == 'source' else None,
|
|
332
|
+
completion.observed_end_ns if fact.time_scope == 'source' else None, True,
|
|
333
|
+
fact.time_scope, fact.retained_record_count, fact.full_check_count)
|
|
334
|
+
if self._input_only:
|
|
335
|
+
self._input_fingerprints = self._read.input_fingerprints
|
|
336
|
+
timestamp_sha, records_sha, frame_count, retained_count = self._input_fingerprints
|
|
337
|
+
if frame_count != fact.row_count:
|
|
338
|
+
raise ValueError('实际输入指纹原帧数与观测不一致')
|
|
339
|
+
facts = ScannedInputFacts(fact.source, fact.session_id, _fingerprint(self._contract),
|
|
340
|
+
_fingerprint(self._description), _fingerprint(self._request), timestamp_sha,
|
|
341
|
+
records_sha, self._required_aliases, retained_count, completion, observation,
|
|
342
|
+
self._adapter.time_scope, self._adapter.input_check)
|
|
343
|
+
else:
|
|
344
|
+
facts = ScannedSignalFacts(fact.source, fact.session_id, _fingerprint(self._contract),
|
|
345
|
+
_fingerprint(self._description), _fingerprint(self._request), self._expected_sha,
|
|
346
|
+
self._counts[0], self._counts[1], self._request.signal_names, completion, observation)
|
|
347
|
+
self._close_read()
|
|
348
|
+
self._facts = facts
|
|
349
|
+
self._facts_sha = _fingerprint(facts)
|
|
350
|
+
self._finished = True
|
|
351
|
+
except BaseException as exc:
|
|
352
|
+
self._failed = True
|
|
353
|
+
self._adopt(exc)
|
|
354
|
+
exc.scanned_can_signals_cleanup_owner = self
|
|
355
|
+
raise
|
|
356
|
+
finally:
|
|
357
|
+
fact = metadata = store = observation = facts = None
|
|
358
|
+
|
|
359
|
+
def assert_current(self, source, description, request, declarations):
|
|
360
|
+
"""核活的完整扫描与调用者原合同。参数: 四项原对象。返回: None。异常: 替换或未完成证明。"""
|
|
361
|
+
self._require_contract(completed=True)
|
|
362
|
+
if (not self._finished or self._facts is None or self._source_plan is not source
|
|
363
|
+
or self._description is not description or self._request is not request
|
|
364
|
+
or self._declarations is not declarations or self._facts.completion != self._completion
|
|
365
|
+
or self._facts.description_sha256 != _fingerprint(description)
|
|
366
|
+
or self._facts.request_sha256 != _fingerprint(request)):
|
|
367
|
+
raise ValueError('扫描证明未完成或不是当前原计划及完整样本流')
|
|
368
|
+
if self._input_only:
|
|
369
|
+
if (type(self._facts) is not ScannedInputFacts or self._input_fingerprints is None
|
|
370
|
+
or (self._facts.original_timestamps_sha256, self._facts.retained_records_sha256)
|
|
371
|
+
!= self._input_fingerprints[:2]
|
|
372
|
+
or self._facts.required_aliases != self._required_aliases
|
|
373
|
+
or self._facts.retained_record_count != self._input_fingerprints[3]):
|
|
374
|
+
raise ValueError('输入证明与实际已验证字节流不符')
|
|
375
|
+
elif (self._facts.stream_sha256 != self._expected_sha
|
|
376
|
+
or (self._facts.progress_count, self._facts.sample_count) != self._counts):
|
|
377
|
+
raise ValueError('样本扫描证明与实际计数摘要不符')
|
|
378
|
+
if _fingerprint(self._facts) != self._facts_sha:
|
|
379
|
+
raise ValueError('扫描证明的完成事实已被替换')
|
|
380
|
+
|
|
381
|
+
@property
|
|
382
|
+
def facts(self):
|
|
383
|
+
"""借读真实完成的扫描事实。参数: 无。返回: ScannedSignalFacts。异常: 原生命周期/合同错误。"""
|
|
384
|
+
self.assert_current(self._source_plan, self._description, self._request, self._declarations)
|
|
385
|
+
return self._facts
|
|
386
|
+
|
|
387
|
+
@property
|
|
388
|
+
def observation(self):
|
|
389
|
+
"""读取全部原帧观测。参数: 无。返回: SourceScanObservation。异常: 未完成/失效证明。"""
|
|
390
|
+
return self.facts.observation
|
|
391
|
+
|
|
392
|
+
@property
|
|
393
|
+
def runtime_metadata(self):
|
|
394
|
+
"""借读同次READY。参数: 无。返回: 冻结元数据。异常: 未完成/失效证明。"""
|
|
395
|
+
self.facts
|
|
396
|
+
return self._runtime_metadata
|
|
397
|
+
|
|
398
|
+
@property
|
|
399
|
+
def read_identity(self):
|
|
400
|
+
"""读取同次真实read标识。参数: 无。返回: str。异常: 未完成/失效证明。"""
|
|
401
|
+
self.facts
|
|
402
|
+
return self._read_identity
|
|
403
|
+
|
|
404
|
+
@property
|
|
405
|
+
def capture_message_updates(self):
|
|
406
|
+
"""读取原捕获开关。参数: 无。返回: bool。异常: 无。"""
|
|
407
|
+
return self._capture_message_updates
|
|
408
|
+
|
|
409
|
+
@property
|
|
410
|
+
def closed(self):
|
|
411
|
+
"""读取实际关闭状态。参数: 无。返回: bool。异常: 无。"""
|
|
412
|
+
return self._closed
|
|
413
|
+
|
|
414
|
+
@property
|
|
415
|
+
def finished(self):
|
|
416
|
+
"""读取成功扫描事实,不代替当前活性检查。参数: 无。返回: bool。异常: 无。"""
|
|
417
|
+
return self._finished
|
|
418
|
+
|
|
419
|
+
def take_message_store(self, receiver, slot='_message_store'):
|
|
420
|
+
"""先安装父实际槽再解除本消息仓责任。参数: 同预算父及空槽。返回: 原仓。异常: 原移交错误。"""
|
|
421
|
+
self.facts
|
|
422
|
+
store = self._message_store
|
|
423
|
+
if (not self._capture_message_updates or store is None or getattr(receiver, '_budget', None) is not self._budget
|
|
424
|
+
or type(slot) is not str or not slot.startswith('_') or not hasattr(receiver, slot)
|
|
425
|
+
or getattr(receiver, slot) is not None):
|
|
426
|
+
raise ValueError('扫描消息仓移交需同预算空父槽且只能一次')
|
|
427
|
+
try:
|
|
428
|
+
setattr(receiver, slot, store)
|
|
429
|
+
except BaseException as exc:
|
|
430
|
+
exc.scanned_can_signals_cleanup_owner = self
|
|
431
|
+
raise
|
|
432
|
+
finally:
|
|
433
|
+
if getattr(receiver, slot, None) is store:
|
|
434
|
+
self._message_store = None
|
|
435
|
+
return store
|
|
436
|
+
|
|
437
|
+
def close(self):
|
|
438
|
+
"""关闭真实read/未移交仓后归还本owner费用。参数: 无。返回: None。异常: 持续失败保本最高owner。"""
|
|
439
|
+
if self._closed:
|
|
440
|
+
return
|
|
441
|
+
self._closing = True
|
|
442
|
+
try:
|
|
443
|
+
self._close_read()
|
|
444
|
+
if self._message_store is not None:
|
|
445
|
+
self._message_store.close()
|
|
446
|
+
if not self._message_store.closed:
|
|
447
|
+
raise AnalysisError('扫描消息仓未完成关闭')
|
|
448
|
+
self._message_store = None
|
|
449
|
+
self._facts = self._facts_sha = self._runtime_metadata = self._read_identity = None
|
|
450
|
+
self._definitions = self._validator = self._description = self._contract = self._hash = None
|
|
451
|
+
self._decode_frame_ids = None
|
|
452
|
+
self._input_fingerprints = self._required_aliases = self._projected_aliases = None
|
|
453
|
+
self._completion = self._counts = self._expected_counts = self._expected_sha = None
|
|
454
|
+
self._declarations = self._source_plan = self._adapter = self._request = self._config = None
|
|
455
|
+
for slot in ('_record_cost', '_append_cost', '_pending_cost', '_runtime_cost', '_fixed_cost'):
|
|
456
|
+
_release_owned_ram(self, getattr(self, slot), slot)
|
|
457
|
+
self._closed = self._held_cost == 0
|
|
458
|
+
except BaseException as exc:
|
|
459
|
+
exc.scanned_can_signals_cleanup_owner = self
|
|
460
|
+
raise
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
@dataclass(frozen=True)
|
|
464
|
+
class _ScannedBindings:
|
|
465
|
+
"""仅用于纯消息运行清单的已扫描定义,不能交给普通历史表达式执行入口。"""
|
|
466
|
+
|
|
467
|
+
declarations: object
|
|
468
|
+
sources: tuple[ScannedSignalFacts | ScannedInputFacts, ...]
|
|
469
|
+
identity: str
|
|
470
|
+
|
|
471
|
+
@property
|
|
472
|
+
def signals(self):
|
|
473
|
+
"""借用全部原信号定义。参数: 无。返回: 冻结tuple。异常: 无。"""
|
|
474
|
+
return self.declarations.signals
|
|
475
|
+
|
|
476
|
+
def resolve(self, name):
|
|
477
|
+
"""解析原定义供清单角色核对。参数: 别名。返回: SignalDefinition。异常: 原声明解析错误。"""
|
|
478
|
+
return self.declarations.resolve(name)
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
class ScannedBindingLease:
|
|
482
|
+
"""拥有已完成扫描的有限运行清单证明;借用scan但不关闭它们。"""
|
|
483
|
+
|
|
484
|
+
def __init__(self, plan, scans, descriptions, requests, budget):
|
|
485
|
+
"""核真实扫描后建立版本化绑定摘要。参数: 同次原计划及来源对象。返回: lease。异常: 合同/预算错误。"""
|
|
486
|
+
if (type(plan) is not AnalysisPlan or not can_message_only(plan) or type(scans) is not tuple
|
|
487
|
+
or len(scans) != len(plan.sources) or any(type(scan) is not ScannedCANSignals for scan in scans)
|
|
488
|
+
or type(descriptions) is not tuple or len(descriptions) != len(plan.sources)
|
|
489
|
+
or not isinstance(requests, Mapping) or set(requests) != {source.name for source in plan.sources}):
|
|
490
|
+
raise TypeError('扫描绑定仅接全CAN纯消息计划及完整实际扫描')
|
|
491
|
+
self._budget, self._plan, self._scans = budget, plan, scans
|
|
492
|
+
self._descriptions, self._requests = descriptions, requests
|
|
493
|
+
self._fixed_cost = self._held_cost = 0
|
|
494
|
+
self._bindings = None
|
|
495
|
+
self._closed = self._closing = False
|
|
496
|
+
facts = identity = source = scan = description = declared = None
|
|
497
|
+
requirements = needed = aliases = expected_fields = expected_samples = prefix = None
|
|
498
|
+
try:
|
|
499
|
+
_reserve_owned_ram(self, 65536 + 32768 * len(scans)
|
|
500
|
+
+ 32 * _metadata_bytes((plan.bindings, plan.message_calculations,
|
|
501
|
+
descriptions, tuple(requests.values()))), '_fixed_cost')
|
|
502
|
+
facts = []
|
|
503
|
+
requirements = collect_input_requirements(plan)
|
|
504
|
+
for source, scan, description in zip(plan.sources, scans, descriptions):
|
|
505
|
+
if scan._budget is not budget:
|
|
506
|
+
raise ValueError('扫描绑定必须使用同一实际budget')
|
|
507
|
+
scan.assert_current(source, description, requests[source.name], plan.bindings)
|
|
508
|
+
needed = requirements.for_source(source.name)
|
|
509
|
+
aliases = tuple(item.name for item in plan.bindings.signals if item.source == source.name)
|
|
510
|
+
expected_fields = aliases if source.config.decode_scope == 'all' else needed.required_aliases
|
|
511
|
+
expected_samples = aliases if source.config.decode_scope == 'all' else needed.ordinary_sample_aliases
|
|
512
|
+
if (requests[source.name].signal_names != expected_samples
|
|
513
|
+
or tuple(item.name for item in description.fields) != expected_fields):
|
|
514
|
+
raise ValueError('扫描投影未恰好覆盖本计划实际需求')
|
|
515
|
+
declared = next(item for item in plan.bindings.sources if item.name == source.name)
|
|
516
|
+
require_decoded_source_contract(plan.bindings, declared, description, requests[source.name])
|
|
517
|
+
facts.append(scan.facts)
|
|
518
|
+
facts = tuple(facts)
|
|
519
|
+
prefix = 'scanned-input-binding-v2:' if any(scan._input_only for scan in scans) else 'scanned-signal-binding-v1:'
|
|
520
|
+
identity = prefix + _fingerprint((plan.bindings.identity, facts))
|
|
521
|
+
self._bindings = _ScannedBindings(plan.bindings, facts, identity)
|
|
522
|
+
except BaseException as exc:
|
|
523
|
+
_cleanup_owner(self, exc, 'scanned_binding_lease_cleanup_owner', '扫描绑定构造')
|
|
524
|
+
raise
|
|
525
|
+
finally:
|
|
526
|
+
facts = identity = source = scan = description = declared = None
|
|
527
|
+
requirements = needed = aliases = expected_fields = expected_samples = prefix = None
|
|
528
|
+
|
|
529
|
+
@property
|
|
530
|
+
def bindings(self):
|
|
531
|
+
"""借读当前完整扫描绑定,拒绝失效scan。参数: 无。返回: 私有绑定。异常: 状态/原合同错误。"""
|
|
532
|
+
if self._closed or self._closing or self._bindings is None:
|
|
533
|
+
raise ResultClosedError('扫描绑定未完成或已关闭')
|
|
534
|
+
for source, scan, description in zip(self._plan.sources, self._scans, self._descriptions):
|
|
535
|
+
scan.assert_current(source, description, self._requests[source.name], self._plan.bindings)
|
|
536
|
+
return self._bindings
|
|
537
|
+
|
|
538
|
+
@property
|
|
539
|
+
def closed(self):
|
|
540
|
+
"""读取真实关闭状态。参数: 无。返回: bool。异常: 无。"""
|
|
541
|
+
return self._closed
|
|
542
|
+
|
|
543
|
+
def close(self):
|
|
544
|
+
"""释放自有证明,不关闭借用scan。参数: 无。返回: None。异常: 预算释放错误可重试。"""
|
|
545
|
+
if self._closed:
|
|
546
|
+
return
|
|
547
|
+
self._closing = True
|
|
548
|
+
self._bindings = self._plan = self._scans = self._descriptions = self._requests = None
|
|
549
|
+
_release_owned_ram(self, self._fixed_cost, '_fixed_cost')
|
|
550
|
+
self._closed = self._held_cost == 0
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""从本次已经加载的DBC元数据补全必要信号的有效期。
|
|
2
|
+
|
|
3
|
+
仅处理尚未确定valid_for的信号,在读取首帧前按所属报文周期乘三。
|
|
4
|
+
不加载DBC、不扫描报文、不改变实际时间;返回的新定义交给计算状态使用,
|
|
5
|
+
静态配置仍保留缺省声明。无需有效期的无关信号不会额外请求周期。
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from dataclasses import replace
|
|
9
|
+
from ..legacy.records import field_to_dict
|
|
10
|
+
from ..sources.can_spec import can_field_from_key
|
|
11
|
+
from ..planning.signal_validity import triple_period
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def resolve_signal_validity(definitions, source_cursors):
|
|
15
|
+
"""在来源初始化后补全待DBC的有效期,显式有效期原样复用。
|
|
16
|
+
|
|
17
|
+
参数: definitions为本次实际需要的SignalDefinition元组;source_cursors为
|
|
18
|
+
来源名到已初始化游标的映射,metadata.fields含本次请求的locator/cycle_ns。
|
|
19
|
+
返回: SignalDefinition元组,全部有效期为正int64纳秒。
|
|
20
|
+
异常: ValueError为缺失或不唯一的周期;PlanValidationError为周期三倍溢出。
|
|
21
|
+
副作用: 无,不修改原声明或游标,不读取文件。
|
|
22
|
+
"""
|
|
23
|
+
resolved = []
|
|
24
|
+
for definition in definitions:
|
|
25
|
+
# 已显式填写或由信号period求出的值无需再查询DBC。
|
|
26
|
+
if definition.valid_for_ns is not None:
|
|
27
|
+
resolved.append(definition)
|
|
28
|
+
continue
|
|
29
|
+
# 用完整规范定位找本次事实,不能按同名信号借用另一通道或报文的周期。
|
|
30
|
+
cursor = source_cursors.get(definition.source)
|
|
31
|
+
metadata = None if cursor is None else cursor.metadata
|
|
32
|
+
locator = field_to_dict(can_field_from_key(definition.field))
|
|
33
|
+
entries = (() if metadata is None else
|
|
34
|
+
tuple(item for item in metadata.get('fields', ()) if item.get('locator') == locator))
|
|
35
|
+
if len(entries) != 1 or 'cycle_ns' not in entries[0]:
|
|
36
|
+
raise ValueError(f'{definition.name}无法取得唯一DBC周期;请填写本信号period或valid_for')
|
|
37
|
+
# 只替换运行所需定义;静态声明保持原样,不把尚未读取的周期写成既定事实。
|
|
38
|
+
validity = triple_period(entries[0]['cycle_ns'], f'信号{definition.name}.valid_for')
|
|
39
|
+
resolved.append(replace(definition, valid_for_ns=validity))
|
|
40
|
+
return tuple(resolved)
|