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,247 @@
|
|
|
1
|
+
"""在既有内存适配器之外预留输入、批次与协议状态预算。
|
|
2
|
+
|
|
3
|
+
输入SourceSpec本来已完整存在于调用方内存;封装构造前核算它和信号声明,
|
|
4
|
+
不声称控制过去的分配或全进程RSS。输出为既有适配器实际SignalBatch,
|
|
5
|
+
归一化次数、backend、分批、原顺序、watermark/EOF和异常原因不改变。
|
|
6
|
+
每请求预留最坏两个交接批次及来源pending状态,再创建/推进内部生成器;
|
|
7
|
+
NumPy字符串按最大原宽度×N核算Unicode数组/临时副本,不能只计原字符串总长。
|
|
8
|
+
超限明确失败,不偷偷减小batch_rows、切换后端或丢样本。所有预算至EOF/close释放,
|
|
9
|
+
外部长期保存owned批次不在本封装内部预算保证内;不读取CSV、旧日志或DBC。
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
# 原适配器和结构模型负责输入契约,资源账本仅控制新执行层开销。
|
|
13
|
+
from collections.abc import Iterator
|
|
14
|
+
from ..core.binding import SignalDefinition
|
|
15
|
+
from ..core.models import SourceSpec
|
|
16
|
+
from ..results.budget import ResourceBudget
|
|
17
|
+
from ..results.spool import _cleanup_owner, _reserve_owned_ram, _release_owned_ram
|
|
18
|
+
from ..sources.memory import MemorySourceAdapter
|
|
19
|
+
from ..sources.models import ReadRequest, SignalBatch, SourceDescription
|
|
20
|
+
from ..sources.protocol import SourceClosedError
|
|
21
|
+
from .history import _metadata_bytes
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class BudgetedMemorySourceAdapter:
|
|
25
|
+
"""共享一个输入预留,为各读取请求保留独立批次/协议最坏预算。
|
|
26
|
+
|
|
27
|
+
adapter只在预留成功后建立;info存每别名实际投影总数与最大原字符串字符数。
|
|
28
|
+
active登记活动请求,close尝试关闭全部并释放输入引用,原SourceSpec不修改。
|
|
29
|
+
_uninstalled_read保构造或登记未返回的真实请求;_closing先拒绝新读,closed仅在
|
|
30
|
+
所有子请求、原适配器及本层_input_cost实际释放后成立。
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
def __init__(self, budget: ResourceBudget, source: SourceSpec, session_id: str,
|
|
34
|
+
signals: tuple[SignalDefinition, ...], *, backend: str = 'numpy', clock_only=(), retain_original=True):
|
|
35
|
+
"""核算已有完整输入后建立原适配器,不提前生成数组。
|
|
36
|
+
|
|
37
|
+
参数: budget为共享账本;source/session_id/signals/backend与既有内存入口相同。
|
|
38
|
+
clock_only只取时间;retain_original=False不生成原值列,默认仍保留旧行为。
|
|
39
|
+
返回: 新封装。异常: 配置/预算/原适配器初始化原错;持续清理失败附
|
|
40
|
+
memory_source_cleanup_owner,恢复后从该真实owner重试close。
|
|
41
|
+
"""
|
|
42
|
+
if not isinstance(budget, ResourceBudget) or not isinstance(source, SourceSpec) or type(signals) is not tuple or any(not isinstance(item, SignalDefinition) for item in signals):
|
|
43
|
+
raise TypeError('预算内存来源需要账本/SourceSpec/typed信号tuple')
|
|
44
|
+
# 所有保留输入和固定描述保守计数,未知对象不参与任意序列化。
|
|
45
|
+
cost = 16384 + _metadata_bytes((source, session_id, signals)) * 16
|
|
46
|
+
self.budget = self._budget = budget
|
|
47
|
+
self.closed = self._closing = False
|
|
48
|
+
self._input_cost = self._held_cost = 0
|
|
49
|
+
self._adapter = self._uninstalled_read = None
|
|
50
|
+
self.active: set[_BudgetedBatches] = set()
|
|
51
|
+
self.info = {}
|
|
52
|
+
try:
|
|
53
|
+
# 直接申请返回途中取消也由同一槽登记;不靠子调用后的共享余额补账。
|
|
54
|
+
_reserve_owned_ram(self, cost, '_input_cost')
|
|
55
|
+
self._adapter = MemorySourceAdapter(source, session_id, signals, backend=backend,
|
|
56
|
+
clock_only=clock_only,retain_original=retain_original)
|
|
57
|
+
self.info = {item.name: [0, 0] for item in signals}
|
|
58
|
+
# 只遍历已经提供的memory原行,不重新读取旧输入或进行归一化。
|
|
59
|
+
for row in source.rows if signals else ():
|
|
60
|
+
for item in signals:
|
|
61
|
+
if item.field in row.values:
|
|
62
|
+
self.info[item.name][0] += 1
|
|
63
|
+
value = None if item.name in clock_only else row.values[item.field]
|
|
64
|
+
if type(value) is str:
|
|
65
|
+
self.info[item.name][1] = max(self.info[item.name][1], len(value))
|
|
66
|
+
except BaseException as exc:
|
|
67
|
+
_cleanup_owner(self, exc, 'memory_source_cleanup_owner', '预算内存来源构造')
|
|
68
|
+
raise
|
|
69
|
+
|
|
70
|
+
def _ensure_open(self) -> None:
|
|
71
|
+
"""拒绝已关闭来源,不以空批掩盖错误。
|
|
72
|
+
|
|
73
|
+
参数: 无。返回: None。异常: SourceClosedError为已关闭。
|
|
74
|
+
"""
|
|
75
|
+
if self.closed or self._closing:
|
|
76
|
+
raise SourceClosedError('预算内存来源已关闭或正在清理')
|
|
77
|
+
|
|
78
|
+
def describe(self) -> SourceDescription:
|
|
79
|
+
"""直接返回原适配器静态描述,不提升来源能力或观测证据状态。
|
|
80
|
+
|
|
81
|
+
参数: 无。返回: SourceDescription。异常: 关闭/原描述错误传播。
|
|
82
|
+
"""
|
|
83
|
+
self._ensure_open()
|
|
84
|
+
return self._adapter.describe()
|
|
85
|
+
|
|
86
|
+
def _request_cost(self, request: ReadRequest) -> int:
|
|
87
|
+
"""计算一个读取请求在全部next期间持有的最坏预留。
|
|
88
|
+
|
|
89
|
+
参数: request为当前会话/投影/批次上限。返回: 保守bytes,非RSS。
|
|
90
|
+
异常: ValueError为请求会话/别名错误,其他预算错误由申请点报告。
|
|
91
|
+
"""
|
|
92
|
+
self._ensure_open()
|
|
93
|
+
if not isinstance(request, ReadRequest) or request.session_id != self._adapter.session_id or any(name not in self.info for name in request.signal_names):
|
|
94
|
+
raise ValueError('预算内存来源请求会话/投影错误')
|
|
95
|
+
total = sum(self.info[name][0] for name in request.signal_names)
|
|
96
|
+
size = min(total, request.batch_rows)
|
|
97
|
+
max_chars = max((self.info[name][1] for name in request.signal_names), default=0)
|
|
98
|
+
# nbytes至多time/sequence各8、values8、valid1、quality2;4096覆盖复制、装箱/分组。
|
|
99
|
+
per_batch = 65536 + len(request.signal_names) * 8192 + size * 4096
|
|
100
|
+
if self._adapter.backend == 'numpy':
|
|
101
|
+
# 原str可能形成(N,) UTF32定宽列,八倍覆盖原列/转换及模型验证临时副本。
|
|
102
|
+
per_batch += size * max_chars * 4 * 8
|
|
103
|
+
# yield时原生成器仍保留当前批,next构造下一批存在交接重叠,不只申请一套数组。
|
|
104
|
+
# 协议pending最坏保留全部原投影身份并复制set;memory总样本数是已知有限事实。
|
|
105
|
+
return per_batch * 2 + total * 512 + len(request.signal_names) * 2048
|
|
106
|
+
|
|
107
|
+
def iter_batches(self, request: ReadRequest) -> Iterator[SignalBatch]:
|
|
108
|
+
"""预留整次请求的最坏缓冲/状态,再创建实际批次生成器。
|
|
109
|
+
|
|
110
|
+
参数: request为既有读取请求,不改变batch_rows。返回: 独立预算游标。
|
|
111
|
+
异常: 请求/预算/原来源错误传播;超限在数组归一化之前失败,持续清理
|
|
112
|
+
失败附memory_read_cleanup_owner,来源也保留未返回read槽。
|
|
113
|
+
"""
|
|
114
|
+
cost = self._request_cost(request)
|
|
115
|
+
if self._uninstalled_read is not None:
|
|
116
|
+
raise SourceClosedError('预算内存来源尚有未返回请求待清理')
|
|
117
|
+
try:
|
|
118
|
+
iterator = _BudgetedBatches(self, request, cost)
|
|
119
|
+
except BaseException as exc:
|
|
120
|
+
# 构造未返回的真实read先归来源,不能只保费用而遗失原生成器。
|
|
121
|
+
self._uninstalled_read = getattr(exc, 'memory_read_cleanup_owner', None)
|
|
122
|
+
raise
|
|
123
|
+
self._uninstalled_read = iterator
|
|
124
|
+
try:
|
|
125
|
+
self.active.add(iterator)
|
|
126
|
+
except BaseException as exc:
|
|
127
|
+
# add可能在登记前或后抛错;只关当前read,原注册错误不被close取消替代。
|
|
128
|
+
_cleanup_owner(iterator, exc, 'memory_read_cleanup_owner', '预算内存请求登记')
|
|
129
|
+
raise
|
|
130
|
+
self._uninstalled_read = None
|
|
131
|
+
return iterator
|
|
132
|
+
|
|
133
|
+
def close(self) -> None:
|
|
134
|
+
"""关闭所有请求及原适配器,释放本封装预留并保留调用方原输入。
|
|
135
|
+
|
|
136
|
+
参数: 无。返回: None,幂等。异常: 首个原关闭错误附memory_source_cleanup_owner;
|
|
137
|
+
其他独立read也尝试关闭,子责任未完成时保留来源合同与全部未释放槽。
|
|
138
|
+
"""
|
|
139
|
+
if self.closed:
|
|
140
|
+
return
|
|
141
|
+
self._closing = True
|
|
142
|
+
try:
|
|
143
|
+
first_error = None
|
|
144
|
+
# 未登记read仍属于本来源;显式槽与活动set可指向同对象,close幂等。
|
|
145
|
+
if self._uninstalled_read is not None:
|
|
146
|
+
try:
|
|
147
|
+
self._uninstalled_read.close()
|
|
148
|
+
except BaseException as exc:
|
|
149
|
+
first_error = exc
|
|
150
|
+
for iterator in tuple(self.active):
|
|
151
|
+
try:
|
|
152
|
+
iterator.close()
|
|
153
|
+
except BaseException as exc:
|
|
154
|
+
if first_error is None:
|
|
155
|
+
first_error = exc
|
|
156
|
+
else:
|
|
157
|
+
first_error.add_note(f'其他内存请求关闭失败: {type(exc).__name__}')
|
|
158
|
+
if first_error is not None:
|
|
159
|
+
raise first_error
|
|
160
|
+
if self._adapter is not None:
|
|
161
|
+
self._adapter.close()
|
|
162
|
+
self._adapter = None
|
|
163
|
+
# 子生成器与原来源全关后才丢输入引用;固定费逐笔确认释放前后取消。
|
|
164
|
+
self.info.clear()
|
|
165
|
+
_release_owned_ram(self, self._input_cost, '_input_cost')
|
|
166
|
+
if self._held_cost == 0:
|
|
167
|
+
self.closed = True
|
|
168
|
+
except BaseException as exc:
|
|
169
|
+
exc.memory_source_cleanup_owner = self
|
|
170
|
+
raise
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
class _BudgetedBatches:
|
|
174
|
+
"""持有一请求的预留/原生成器/当前批,EOF或close时抵销一次预留。"""
|
|
175
|
+
|
|
176
|
+
def __init__(self, owner: BudgetedMemorySourceAdapter, request: ReadRequest, cost: int):
|
|
177
|
+
"""先申请再创建原请求,构造失败不保留请求状态。
|
|
178
|
+
|
|
179
|
+
参数: owner为预算来源;request为原请求;cost为最坏预留。返回: 独立游标。
|
|
180
|
+
异常: 预算或原请求初始化原错,持续清理失败附memory_read_cleanup_owner;
|
|
181
|
+
未实际入账不抵销,返回途中取消仍登记原cost槽。
|
|
182
|
+
"""
|
|
183
|
+
self.owner, self.closed, self.current = owner, False, None
|
|
184
|
+
self._budget, self._held_cost, self.cost = owner.budget, 0, 0
|
|
185
|
+
self.iterator = None
|
|
186
|
+
self._closing = False
|
|
187
|
+
try:
|
|
188
|
+
# 先装恢复槽再申请;旧最坏整次请求费用公式保持原数值。
|
|
189
|
+
_reserve_owned_ram(self, cost, 'cost')
|
|
190
|
+
self.iterator = owner._adapter.iter_batches(request)
|
|
191
|
+
except BaseException as exc:
|
|
192
|
+
_cleanup_owner(self, exc, 'memory_read_cleanup_owner', '预算内存请求构造')
|
|
193
|
+
raise
|
|
194
|
+
|
|
195
|
+
def __iter__(self) -> '_BudgetedBatches':
|
|
196
|
+
"""返回本独立游标。
|
|
197
|
+
|
|
198
|
+
参数: 无。返回: self。异常: 无。
|
|
199
|
+
"""
|
|
200
|
+
return self
|
|
201
|
+
|
|
202
|
+
def __next__(self) -> SignalBatch:
|
|
203
|
+
"""在整次预留覆盖下推进原适配器,不重复归一化或改进度。
|
|
204
|
+
|
|
205
|
+
参数: 无。返回: 原适配器实际批次。异常: EOF/关闭/原来源错误,故障清理保留根因。
|
|
206
|
+
"""
|
|
207
|
+
self.owner._ensure_open()
|
|
208
|
+
if self.closed:
|
|
209
|
+
raise StopIteration
|
|
210
|
+
if self._closing:
|
|
211
|
+
raise SourceClosedError('预算内存请求正在清理')
|
|
212
|
+
try:
|
|
213
|
+
self.current = next(self.iterator)
|
|
214
|
+
return self.current
|
|
215
|
+
except StopIteration:
|
|
216
|
+
# 真实耗尽后关闭失败必须传播该失败,不能用StopIteration伪报正常完成。
|
|
217
|
+
self.close()
|
|
218
|
+
raise
|
|
219
|
+
except BaseException as exc:
|
|
220
|
+
_cleanup_owner(self, exc, 'memory_read_cleanup_owner', '预算内存请求推进')
|
|
221
|
+
raise
|
|
222
|
+
|
|
223
|
+
def close(self) -> None:
|
|
224
|
+
"""关闭本请求原生成器,释放当前批引用和最坏预留,其他请求保持独立。
|
|
225
|
+
|
|
226
|
+
参数: 无。返回: None,幂等。异常: 原生成器或释放错误附memory_read_cleanup_owner;
|
|
227
|
+
原生成器未成功关闭时保留原对象和费用,其他请求保持独立。
|
|
228
|
+
"""
|
|
229
|
+
if self.closed:
|
|
230
|
+
return
|
|
231
|
+
self._closing = True
|
|
232
|
+
try:
|
|
233
|
+
if self.iterator is not None:
|
|
234
|
+
self.iterator.close()
|
|
235
|
+
# 未开始生成器close不执行finally,只解除本read的原登记,不动平行read。
|
|
236
|
+
if self.owner._adapter is not None:
|
|
237
|
+
self.owner._adapter.active.discard(self.iterator)
|
|
238
|
+
self.current = self.iterator = None
|
|
239
|
+
_release_owned_ram(self, self.cost, 'cost')
|
|
240
|
+
# 费用真正抵销后才从父解除,释放后取消可重试而不会重复扣账。
|
|
241
|
+
self.owner.active.discard(self)
|
|
242
|
+
if self.owner._uninstalled_read is self:
|
|
243
|
+
self.owner._uninstalled_read = None
|
|
244
|
+
self.closed = True
|
|
245
|
+
except BaseException as exc:
|
|
246
|
+
exc.memory_read_cleanup_owner = self
|
|
247
|
+
raise
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
"""完整核验独立解码消息仓,为当前消息表达式取得有预算的运行绑定。
|
|
2
|
+
|
|
3
|
+
输入为已经冻结的MessageDeclarations及调用方拥有的sealed DecodedMessageStore。
|
|
4
|
+
工厂借用原声明和仓,先预约有限元数据,默认以一个独立reader逐条核验真实文件;
|
|
5
|
+
首次核验只有在实际EOF、全流SHA/count以及reader的FD和费用均成功关闭后,才开放
|
|
6
|
+
MessageBindings。首末时间来自全部decoded记录,空仓保持None;不根据表达式
|
|
7
|
+
别名裁剪仓、不要求每个字段出现,也不重读BLF、DBC或普通history。
|
|
8
|
+
同一实际sealed仓可借用已完成lease的核验结果;仍核同预算、封口事实和文件状态,
|
|
9
|
+
为新声明创建独立绑定及自有费用,不复用旧DBC解码或跨任务缓存。后续实际计算仍核全流EOF/SHA。
|
|
10
|
+
|
|
11
|
+
本域保留原SignalDefinition身份,执行数值转换和表达式由其他模块负责;这里
|
|
12
|
+
不应用TTL、保持、同刻去重或原请求范围筛选。profile/read_identity是仓已保存
|
|
13
|
+
的显式标签,真实文件EOF不证明该仓来自某次CAN读取或旧求值触发。
|
|
14
|
+
|
|
15
|
+
lease只拥有固定元数据及自己取得的reader,不关闭借用store、预算或其他reader,
|
|
16
|
+
不删除文件。原store的reader发生错误时仍会按原政策poison/清理父仓;本工厂
|
|
17
|
+
保留该最高恢复owner,不把这一原生行为误称为借仓在失败后必定仍开放。
|
|
18
|
+
未返回reader始终由实际store的pending/readers槽保活,不伪造半初始化对象。
|
|
19
|
+
|
|
20
|
+
预算仅覆盖本层新增摘要、身份编码及有限状态,单行费用由实际reader承担;
|
|
21
|
+
原声明、原仓元数据和调用方保留的异常诊断属于借用输入或输出,不代表RSS。
|
|
22
|
+
本模块只使用轻量预算helper、消息模型和原仓,不导入history/codec/spool或旧IO。
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
# 模型只接独立消息域;原仓负责严格行编码及全流校验,工厂不复制这些算法。
|
|
26
|
+
from ..core.message_binding import MessageBindings, MessageDeclarations, MessageSourceEvidence
|
|
27
|
+
from ..legacy.message_store import DecodedMessageStore, StoredDecodedMessage
|
|
28
|
+
from ..results.budget import ResourceBudget, _cleanup_owner, _release_owned_ram, _reserve_owned_ram
|
|
29
|
+
from ..results.errors import ResultClosedError, ResultFormatError
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _fixed_estimate(declarations: MessageDeclarations, store: DecodedMessageStore) -> int:
|
|
33
|
+
"""在创建本层身份副本前按原生长度估算有限元数据及编码临时空间。
|
|
34
|
+
|
|
35
|
+
参数: declarations为借用的冻结消息声明;store为借用的活sealed仓。
|
|
36
|
+
返回: 保守bytes金额,不遍历原信号定义、参数树、raw_config或逐条记录。
|
|
37
|
+
异常: TypeError/ValueError为仓公开元数据已变成非原生文本或非法条数;
|
|
38
|
+
本函数不strip、encode、repr或创建字段副本,不为估费先建立大文本。
|
|
39
|
+
"""
|
|
40
|
+
# 声明身份已由调用方构造;本层只支付新evidence和运行身份所需的有限编码。
|
|
41
|
+
if type(declarations.identity) is not str:
|
|
42
|
+
raise TypeError('消息声明identity必须为原生文本')
|
|
43
|
+
characters = len(declarations.identity)
|
|
44
|
+
for name in ('source_name', 'session_id', 'decoder_profile', 'read_identity', 'sha256'):
|
|
45
|
+
value = getattr(store, name)
|
|
46
|
+
if type(value) is not str:
|
|
47
|
+
raise TypeError('解码仓绑定元数据必须为原生文本')
|
|
48
|
+
characters += len(value)
|
|
49
|
+
# 条数编码空间随整数位数计入;端点受int64约束,其固定空间已在基数内。
|
|
50
|
+
if type(store.count) is not int or store.count < 0:
|
|
51
|
+
raise ValueError('解码仓绑定条数必须为非负原生int')
|
|
52
|
+
return 32768 + 32 * (characters + store.count.bit_length() + 1)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def _file_snapshot(store: DecodedMessageStore) -> tuple[int, ...]:
|
|
56
|
+
"""记录新消息暂存文件的有限状态,防止把已变化路径当作先前核验的同一文件。
|
|
57
|
+
|
|
58
|
+
参数: store为已经封口的实际消息仓。返回: 设备、文件身份、大小及系统提供的时间信息tuple。
|
|
59
|
+
异常: 原stat错误传播。边界: 这不是持续监控或新内容摘要,计算reader仍须核完整EOF/SHA;
|
|
60
|
+
stat对象及tuple在lease固定元数据预算内,不接触原BLF或DBC。
|
|
61
|
+
"""
|
|
62
|
+
state = None
|
|
63
|
+
try:
|
|
64
|
+
state = store.file_path.stat()
|
|
65
|
+
return state.st_dev, state.st_ino, state.st_size, state.st_mtime_ns, state.st_ctime_ns
|
|
66
|
+
finally:
|
|
67
|
+
# 取消异常可保留本frame,不让已结束预算的stat对象留在诊断局部变量中。
|
|
68
|
+
state = None
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class MessageBindingLease:
|
|
72
|
+
"""持有自有reader和固定费,完整核验或同仓复用后借出不可变消息运行绑定。
|
|
73
|
+
|
|
74
|
+
_fixed_cost/_held_cost只记录本层直接交易,reader的费用由原reader独立负责。
|
|
75
|
+
_opening_reader标记取得子对象的窗口;未返回子仍属于借用store的真实责任槽。
|
|
76
|
+
_verified_*保留同一借用仓的有限核验快照,仅供建立独立新绑定,不替其他lease付款。
|
|
77
|
+
开始关闭或失败后不可借出bindings,只有自身子和费用都清完才closed。
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
def __init__(self, budget: ResourceBudget):
|
|
81
|
+
"""先安装全部责任槽,不预约费用,也不打开文件。
|
|
82
|
+
|
|
83
|
+
参数: budget为实际消息仓使用的ResourceBudget。
|
|
84
|
+
返回: 尚未完成的lease,供唯一工厂继续初始化。
|
|
85
|
+
异常: TypeError为非ResourceBudget;不会接收已经支付却无owner的裸金额。
|
|
86
|
+
"""
|
|
87
|
+
# 所有槽在首次预算或reader回调之前存在,预约返回后取消仍可恢复同一owner。
|
|
88
|
+
self._budget = budget
|
|
89
|
+
self._fixed_cost = self._held_cost = 0
|
|
90
|
+
self._reader = self._current = self._bindings = None
|
|
91
|
+
self._store = self._declarations = self._facts = self._evidence = None
|
|
92
|
+
# 成功核验的有限证据保在本lease;借用仓不由它关闭,关闭lease即解除这些引用。
|
|
93
|
+
self._verified_store = self._verified_facts = self._verified_file = None
|
|
94
|
+
self._opening_reader = False
|
|
95
|
+
self._closed = self._closing = self._failed = False
|
|
96
|
+
if not isinstance(budget, ResourceBudget):
|
|
97
|
+
raise TypeError('消息绑定lease需要ResourceBudget')
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def bindings(self) -> MessageBindings:
|
|
101
|
+
"""取得完整核验后形成的不可变消息绑定,不借出半成品。
|
|
102
|
+
|
|
103
|
+
参数: 无。返回: 原MessageBindings对象。
|
|
104
|
+
异常: ResultClosedError为尚未完成、已失败、关闭中或已经关闭。
|
|
105
|
+
"""
|
|
106
|
+
# 即使bindings曾经创建成功,清理中的owner也不能继续参与新的求值。
|
|
107
|
+
if self._closed or self._closing or self._failed or self._bindings is None:
|
|
108
|
+
raise ResultClosedError('消息运行绑定未完成、已失败或正在关闭')
|
|
109
|
+
return self._bindings
|
|
110
|
+
|
|
111
|
+
@property
|
|
112
|
+
def closed(self) -> bool:
|
|
113
|
+
"""读取本lease的实际清理状态。
|
|
114
|
+
|
|
115
|
+
参数: 无。返回: reader和自有费用均清完时为True。
|
|
116
|
+
异常: 无;不把借用store是否关闭混成本lease的状态。
|
|
117
|
+
"""
|
|
118
|
+
return self._closed
|
|
119
|
+
|
|
120
|
+
def _require_store(self) -> None:
|
|
121
|
+
"""核本次借用仓的当前合同及封口事实,拒绝回读期间替换元数据。
|
|
122
|
+
|
|
123
|
+
参数: 无,读取本lease保存的原store、声明和有限事实。
|
|
124
|
+
返回: None;不读取源CAN或额外打开仓文件。
|
|
125
|
+
异常: 原仓生命周期错误;ValueError为来源、会话或预算不对应;
|
|
126
|
+
ResultFormatError为本次回读前后封口事实被替换。
|
|
127
|
+
"""
|
|
128
|
+
# 原仓必须真实仍可读;普通声明身份不代替其当前文件和生命周期。
|
|
129
|
+
store, declarations = self._store, self._declarations
|
|
130
|
+
store._require('sealed')
|
|
131
|
+
if store.budget is not self._budget or store._budget is not self._budget:
|
|
132
|
+
raise ValueError('消息仓绑定的原共享budget已被替换')
|
|
133
|
+
if store.source_name != declarations.source or store.session_id != declarations.declarations.session_id:
|
|
134
|
+
raise ValueError('消息仓来源或会话与当前消息声明不符')
|
|
135
|
+
# 路径只作同一输入对象的保护,不把路径文本冒充内容SHA或CAN认证。
|
|
136
|
+
current = (store.source_name, store.session_id, store.decoder_profile, store.read_identity,
|
|
137
|
+
store.sha256, store.count, store.file_path, store.max_row_bytes, store.sparse_sequences, store.line_limit)
|
|
138
|
+
if self._facts is not None and current != self._facts:
|
|
139
|
+
raise ResultFormatError('消息仓回读期间封口身份或条数已改变')
|
|
140
|
+
|
|
141
|
+
def _close_reader(self) -> None:
|
|
142
|
+
"""关闭唯一已安装的真实reader,未完成责任保在原槽供重试。
|
|
143
|
+
|
|
144
|
+
参数: 无。返回: None;正常EOF已关闭的reader也按原幂等接口收尾。
|
|
145
|
+
异常: 原FD或费用释放错误;实际关闭后才取消时清槽,避免重复抵销。
|
|
146
|
+
"""
|
|
147
|
+
# 当前记录必须先结束引用,子reader才可归还覆盖单行的实际费用。
|
|
148
|
+
self._current = None
|
|
149
|
+
if self._reader is None:
|
|
150
|
+
return
|
|
151
|
+
try:
|
|
152
|
+
self._reader.close()
|
|
153
|
+
except BaseException:
|
|
154
|
+
if self._reader.closed:
|
|
155
|
+
self._reader = None
|
|
156
|
+
raise
|
|
157
|
+
else:
|
|
158
|
+
self._reader = None
|
|
159
|
+
|
|
160
|
+
def _clear_temporary(self) -> None:
|
|
161
|
+
"""结束本工厂有限临时引用,不清调用方的原对象或异常traceback。
|
|
162
|
+
|
|
163
|
+
参数: 无。返回: None。
|
|
164
|
+
异常: 无主动异常;借用store与声明只解除引用,不执行它们的close。
|
|
165
|
+
"""
|
|
166
|
+
# 临时槽解除引用;成功后用于同仓复用的少量事实由_verified_*持有并计入固定费。
|
|
167
|
+
self._current = self._facts = self._evidence = None
|
|
168
|
+
self._store = self._declarations = None
|
|
169
|
+
|
|
170
|
+
def close(self) -> None:
|
|
171
|
+
"""只关闭本lease的实际reader,再归还逐笔自有固定费。
|
|
172
|
+
|
|
173
|
+
参数: 无。返回: None,实际完成后重复调用幂等。
|
|
174
|
+
异常: 原FD或预算取消错误,可恢复后在同一owner上重试;
|
|
175
|
+
释放后取消按实际槽记账,不重复抵销其他借用费用。
|
|
176
|
+
副作用: 不显式关闭借用仓、其他reader或共享budget,不删除任何文件。
|
|
177
|
+
"""
|
|
178
|
+
# 关闭中禁止重新借出绑定;子FD持续失败时保留子及其实际责任,不先报closed。
|
|
179
|
+
if self._closed:
|
|
180
|
+
return
|
|
181
|
+
self._closing = True
|
|
182
|
+
try:
|
|
183
|
+
self._close_reader()
|
|
184
|
+
self._bindings = None
|
|
185
|
+
self._clear_temporary()
|
|
186
|
+
self._verified_store = self._verified_facts = self._verified_file = None
|
|
187
|
+
self._opening_reader = False
|
|
188
|
+
_release_owned_ram(self, self._fixed_cost, '_fixed_cost')
|
|
189
|
+
self._closed = True
|
|
190
|
+
except BaseException as exc:
|
|
191
|
+
# 直接close也交出同一真实lease;不递归清理,不覆盖原store恢复属性。
|
|
192
|
+
exc.message_binding_lease_cleanup_owner = self
|
|
193
|
+
raise
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
def bind_message_store(declarations: MessageDeclarations, store: DecodedMessageStore, *,
|
|
197
|
+
verified_by: MessageBindingLease | None = None) -> MessageBindingLease:
|
|
198
|
+
"""完整核验消息仓,或在同一未变仓上借用真实已完成核验,返回独立有预算绑定。
|
|
199
|
+
|
|
200
|
+
参数: declarations为冻结MessageDeclarations;store为调用方拥有的实际
|
|
201
|
+
DecodedMessageStore,须仍活且sealed,source/session与原声明一致;verified_by
|
|
202
|
+
可为已成功且未关闭的真实lease,仅同一仓/预算/封口及文件状态一致时复用核验结果。
|
|
203
|
+
返回: MessageBindingLease,其bindings包含实际仓SHA/count/首末及显式标签;
|
|
204
|
+
空仓首末为None,所有decoded帧都计数,不按字段缺失或请求范围筛掉。
|
|
205
|
+
异常: TypeError/ValueError为类型及声明不对应;原仓状态、IO、预算、取消错误
|
|
206
|
+
原样传播;ResultFormatError为未完成真实EOF或当前封口事实变化。
|
|
207
|
+
原错误附message_binding_lease_cleanup_owner;未返回reader的责任保在
|
|
208
|
+
原decoded_message_store_cleanup_owner,不擅自关闭借用父仓。
|
|
209
|
+
"""
|
|
210
|
+
# 只接现有真实仓与消息声明,不以普通history、结构证据或同名字符串伪装输入。
|
|
211
|
+
if not isinstance(declarations, MessageDeclarations) or not isinstance(store, DecodedMessageStore):
|
|
212
|
+
raise TypeError('消息运行绑定需要MessageDeclarations和DecodedMessageStore')
|
|
213
|
+
if verified_by is not None and type(verified_by) is not MessageBindingLease:
|
|
214
|
+
raise TypeError('共享核验需要真实MessageBindingLease,不能用结构证据代替')
|
|
215
|
+
store._require('sealed')
|
|
216
|
+
owner = MessageBindingLease(store.budget)
|
|
217
|
+
previous = evidence = None
|
|
218
|
+
try:
|
|
219
|
+
# 长标签先按原生长度付费,随后才创建事实tuple、模型及身份编码临时副本。
|
|
220
|
+
owner._store, owner._declarations = store, declarations
|
|
221
|
+
_reserve_owned_ram(owner, _fixed_estimate(declarations, store), '_fixed_cost')
|
|
222
|
+
owner._require_store()
|
|
223
|
+
owner._facts = (store.source_name, store.session_id, store.decoder_profile, store.read_identity,
|
|
224
|
+
store.sha256, store.count, store.file_path, store.max_row_bytes, store.sparse_sequences, store.line_limit)
|
|
225
|
+
if verified_by is not None:
|
|
226
|
+
# bindings属性拒绝未完成/失败/关闭的lease;对象身份和原封口事实防跨仓借证。
|
|
227
|
+
previous = verified_by.bindings
|
|
228
|
+
if (verified_by._budget is not owner._budget or verified_by._verified_store is not store
|
|
229
|
+
or verified_by._verified_facts != owner._facts):
|
|
230
|
+
raise ResultFormatError('共享核验的消息仓、预算或封口事实已改变')
|
|
231
|
+
owner._verified_file = _file_snapshot(store)
|
|
232
|
+
if verified_by._verified_file != owner._verified_file:
|
|
233
|
+
raise ResultFormatError('共享核验的消息仓文件状态已改变')
|
|
234
|
+
evidence = previous.evidence
|
|
235
|
+
owner._evidence = MessageSourceEvidence(evidence.source, evidence.session_id,
|
|
236
|
+
evidence.decoder_profile, evidence.read_identity, evidence.store_sha256,
|
|
237
|
+
evidence.record_count, evidence.first_time_ns, evidence.last_time_ns)
|
|
238
|
+
owner._bindings = MessageBindings(declarations, owner._evidence)
|
|
239
|
+
owner._require_store()
|
|
240
|
+
if _file_snapshot(store) != owner._verified_file:
|
|
241
|
+
raise ResultFormatError('共享绑定创建期间消息仓文件状态已改变')
|
|
242
|
+
owner._verified_store, owner._verified_facts = store, owner._facts
|
|
243
|
+
owner._clear_temporary()
|
|
244
|
+
return owner
|
|
245
|
+
owner._verified_file = _file_snapshot(store)
|
|
246
|
+
count = 0
|
|
247
|
+
first_time_ns = last_time_ns = None
|
|
248
|
+
# 此窗口内未返回的真实reader仍在store.pending/readers中,不制造第二个父owner。
|
|
249
|
+
owner._opening_reader = True
|
|
250
|
+
owner._reader = store.iter_records()
|
|
251
|
+
owner._opening_reader = False
|
|
252
|
+
for owner._current in owner._reader:
|
|
253
|
+
if not isinstance(owner._current, StoredDecodedMessage):
|
|
254
|
+
raise ResultFormatError('消息仓回读返回非StoredDecodedMessage')
|
|
255
|
+
if first_time_ns is None:
|
|
256
|
+
first_time_ns = owner._current.time_ns
|
|
257
|
+
last_time_ns = owner._current.time_ns
|
|
258
|
+
count += 1
|
|
259
|
+
# 下一次next可能在真实EOF释放子费用,不能跨该动作保留上一行完整values。
|
|
260
|
+
owner._current = None
|
|
261
|
+
# 提前close同样能使for停止;只有真EOF与实际FD/费用关闭才允许生成运行证据。
|
|
262
|
+
if not owner._reader.verified_eof or not owner._reader.closed:
|
|
263
|
+
raise ResultFormatError('消息绑定未完成真实仓EOF及reader关闭')
|
|
264
|
+
owner._require_store()
|
|
265
|
+
digest = owner._reader._digest.hexdigest()
|
|
266
|
+
if count != owner._facts[5] or owner._reader._count != count or digest != owner._facts[4]:
|
|
267
|
+
raise ResultFormatError('消息绑定实际SHA或条数与原封口事实不符')
|
|
268
|
+
if _file_snapshot(store) != owner._verified_file:
|
|
269
|
+
raise ResultFormatError('消息仓核验期间文件状态已改变')
|
|
270
|
+
owner._close_reader()
|
|
271
|
+
# 首末取全仓实际行,时间已在仓中映射,不施offset、TTL或连续观测域裁剪。
|
|
272
|
+
owner._evidence = MessageSourceEvidence(source=store.source_name, session_id=store.session_id,
|
|
273
|
+
decoder_profile=store.decoder_profile, read_identity=store.read_identity,
|
|
274
|
+
store_sha256=digest, record_count=count, first_time_ns=first_time_ns,
|
|
275
|
+
last_time_ns=last_time_ns)
|
|
276
|
+
owner._bindings = MessageBindings(declarations, owner._evidence)
|
|
277
|
+
owner._verified_store, owner._verified_facts = store, owner._facts
|
|
278
|
+
owner._clear_temporary()
|
|
279
|
+
return owner
|
|
280
|
+
except BaseException as exc:
|
|
281
|
+
# 先断开本层单行引用,原输入与必要异常诊断仍归调用方;不清他人traceback帧。
|
|
282
|
+
owner._current = None
|
|
283
|
+
owner._failed = True
|
|
284
|
+
if owner._opening_reader and owner._reader is None:
|
|
285
|
+
# 调用返回到父赋值之间取消时,原仓仍登记实际子;父属性只供调用方恢复。
|
|
286
|
+
if getattr(exc, 'decoded_message_store_cleanup_owner', None) is None:
|
|
287
|
+
exc.decoded_message_store_cleanup_owner = store
|
|
288
|
+
exc.message_binding_lease_cleanup_owner = owner
|
|
289
|
+
_cleanup_owner(owner, exc, 'message_binding_lease_cleanup_owner', '消息绑定工厂')
|
|
290
|
+
raise
|
|
291
|
+
finally:
|
|
292
|
+
# 原异常可能长期保留;不由本层frame继续保活其他lease已交接的绑定/证据。
|
|
293
|
+
previous = evidence = None
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""在读取器已有预算内同步交付必要消息,不建立额外历史或结果副本。"""
|
|
2
|
+
|
|
3
|
+
from ..results.budget import _reserve_owned_ram, _release_owned_ram
|
|
4
|
+
from .history import _metadata_bytes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def deliver_message(owner, projection, consumer, frame, sequence, values, time_ns, *, canonical_keys=False):
|
|
8
|
+
"""先付本次投影费用,再同步调用消费者,返回后释放临时消息。
|
|
9
|
+
|
|
10
|
+
参数: owner为拥有_update_cost槽的读取器;projection为有限CAN投影;
|
|
11
|
+
consumer为同步可调用对象;其余为当前原帧、序号、已解码值及实际时间。
|
|
12
|
+
canonical_keys说明文本入口的规范字段键。消费者如需保留对象,须自行
|
|
13
|
+
取得保存费用;此调用只借出当前对象,不承诺历史生命周期。
|
|
14
|
+
返回: None,非目标帧不构造消息。异常: 预算/值/消费者及清理错误原样传播。
|
|
15
|
+
"""
|
|
16
|
+
fields = projection.fields_for(frame)
|
|
17
|
+
if not projection.accepts_frame(frame):
|
|
18
|
+
return
|
|
19
|
+
update = None
|
|
20
|
+
# 费用只取所选字段;无关解码值不遍历、不复制进计算输入。
|
|
21
|
+
cost = 16384 + sum(1024 + 16 * _metadata_bytes(values.get(
|
|
22
|
+
field.key if canonical_keys else field.signal)) for field in fields)
|
|
23
|
+
_reserve_owned_ram(owner, cost, '_update_cost')
|
|
24
|
+
try:
|
|
25
|
+
update = projection.build(frame, sequence, values, time_ns, canonical_keys=canonical_keys)
|
|
26
|
+
consumer(update)
|
|
27
|
+
except BaseException as error:
|
|
28
|
+
update = None
|
|
29
|
+
try:
|
|
30
|
+
_release_owned_ram(owner, owner._update_cost, '_update_cost')
|
|
31
|
+
except BaseException as cleanup:
|
|
32
|
+
# 原消费者错误优先;尚未释放的费用留在同一read槽,供外层关闭重试。
|
|
33
|
+
error.add_note('消息投影费用清理失败:' + type(cleanup).__name__)
|
|
34
|
+
raise
|
|
35
|
+
else:
|
|
36
|
+
update = None
|
|
37
|
+
_release_owned_ram(owner, owner._update_cost, '_update_cost')
|