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,212 @@
|
|
|
1
|
+
"""拥有本次新增导出目录及有界索引,发布时只复制并核对实际文件。
|
|
2
|
+
|
|
3
|
+
每个导出至多16个普通文件;片段数量增长只增加磁盘索引,不积累路径列表。
|
|
4
|
+
仅请求完整性诊断时保存摘要;复制沿必要读取计算,普通运行核文件身份与大小。
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
import os
|
|
9
|
+
import stat
|
|
10
|
+
from hashlib import sha256
|
|
11
|
+
import json
|
|
12
|
+
from .frame_sort import FrameSort
|
|
13
|
+
from .budget import _reserve_owned_ram,_release_owned_ram,_cleanup_owner
|
|
14
|
+
from .errors import ResultClosedError,ResultFormatError
|
|
15
|
+
from .raw_exports import _write_all
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class ArtifactExportStore:
|
|
19
|
+
"""保存一次会话的信号/报文导出及独立清单,不借用原数据reader。"""
|
|
20
|
+
|
|
21
|
+
def __init__(self,budget,path,session_id,device_label,*,integrity=True):
|
|
22
|
+
"""创建独占目录及索引。参数: 预算/path/会话/设备。返回: owner。异常: 配置/IO/预算错。
|
|
23
|
+
"""
|
|
24
|
+
if type(integrity) is not bool: raise TypeError('integrity必须为bool')
|
|
25
|
+
self._integrity=integrity; self.index_info=None
|
|
26
|
+
self._budget=budget; self.path=Path(path); self.session_id=session_id; self.device_label=device_label
|
|
27
|
+
self._held_cost=self._fixed_cost=0; self._sort=None; self._input=self._output=self._index=self._cursor=None
|
|
28
|
+
self.count=0; self.state='building'; self._closed=False
|
|
29
|
+
try:
|
|
30
|
+
if device_label not in ('home','work') or any(p.casefold()=='refprojects' for p in self.path.resolve().parts):
|
|
31
|
+
raise ValueError('新导出需要实际设备标签及新工作目录')
|
|
32
|
+
_reserve_owned_ram(self,524288,'_fixed_cost')
|
|
33
|
+
self.path.mkdir(parents=True,exist_ok=False)
|
|
34
|
+
try:
|
|
35
|
+
self._sort=FrameSort(self.path/'inventory',budget,integrity=integrity)
|
|
36
|
+
except BaseException as error:
|
|
37
|
+
self._sort=getattr(error,'frame_sort_cleanup_owner',None); raise
|
|
38
|
+
except BaseException as error:
|
|
39
|
+
_cleanup_owner(self,error,'artifact_export_store_cleanup_owner','导出索引构造'); raise
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def closed(self):
|
|
43
|
+
"""读取真实关闭状态。参数: 无。返回: bool。异常: 无。
|
|
44
|
+
"""
|
|
45
|
+
return self._closed
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def owned_ram(self):
|
|
49
|
+
"""汇总本仓及索引实际费用供父层核账。参数: 无。返回: bytes。异常: 无。
|
|
50
|
+
"""
|
|
51
|
+
return self._held_cost+(0 if self._sort is None else self._sort._held_cost)
|
|
52
|
+
|
|
53
|
+
def next_path(self):
|
|
54
|
+
"""提供当前导出独占子目录。参数: 无。返回: Path。异常: 非building。
|
|
55
|
+
"""
|
|
56
|
+
if self._closed or self.state!='building':
|
|
57
|
+
raise ResultClosedError('导出索引不能新增')
|
|
58
|
+
return self.path/f'export-{self.count:08d}'
|
|
59
|
+
|
|
60
|
+
def _close_slot(self,slot):
|
|
61
|
+
"""真实close成功后撤槽。参数: slot责任名。返回: None。异常: 原close错,保槽重试。
|
|
62
|
+
"""
|
|
63
|
+
owner=getattr(self,slot)
|
|
64
|
+
if owner is not None:
|
|
65
|
+
owner.close(); setattr(self,slot,None)
|
|
66
|
+
|
|
67
|
+
@staticmethod
|
|
68
|
+
def _identity(path):
|
|
69
|
+
"""取得普通文件的替换/修改标识。参数: Path。返回: 四整数tuple。异常: 链接/非普通文件/IO。"""
|
|
70
|
+
info=path.lstat()
|
|
71
|
+
if path.is_symlink() or not stat.S_ISREG(info.st_mode):
|
|
72
|
+
raise ResultFormatError('导出内容必须为普通文件')
|
|
73
|
+
return (info.st_dev,info.st_ino,info.st_size,info.st_mtime_ns)
|
|
74
|
+
|
|
75
|
+
def _file(self,path,destination=None,expected=None,identity=None):
|
|
76
|
+
"""必要复制时才读内容;请求摘要则在同次读取计算。参数: 路径/目标/大小摘要/身份。返回: 大小和可选摘要。"""
|
|
77
|
+
if self._input is not None or self._output is not None:
|
|
78
|
+
raise ResultClosedError('导出文件还有未清理句柄')
|
|
79
|
+
before=self._identity(path)
|
|
80
|
+
# 摘要模式会核实际内容,允许修复为原字节后重试;普通模式没有内容依据,仍拒身份变化。
|
|
81
|
+
if identity is not None and tuple(identity)!=before and not self._integrity:
|
|
82
|
+
raise ResultFormatError('导出文件已被替换或修改')
|
|
83
|
+
if expected is not None and before[2]!=expected[0]:
|
|
84
|
+
raise ResultFormatError('导出文件大小与登记不同')
|
|
85
|
+
if destination is None and not self._integrity:
|
|
86
|
+
return before[2],None
|
|
87
|
+
self._input=path.open('rb',buffering=0)
|
|
88
|
+
opened=os.fstat(self._input.fileno())
|
|
89
|
+
if (opened.st_dev,opened.st_ino,opened.st_size,opened.st_mtime_ns)!=before:
|
|
90
|
+
raise ResultFormatError('导出文件在打开时变化')
|
|
91
|
+
if destination is not None:
|
|
92
|
+
self._output=destination.open('xb',buffering=0)
|
|
93
|
+
digest=sha256() if self._integrity else None; count=0
|
|
94
|
+
while True:
|
|
95
|
+
block=self._input.read(65536)
|
|
96
|
+
if not block: break
|
|
97
|
+
count+=len(block)
|
|
98
|
+
if count>before[2]: raise ResultFormatError('导出文件超过登记大小')
|
|
99
|
+
if digest is not None: digest.update(block)
|
|
100
|
+
if self._output is not None:
|
|
101
|
+
self._budget.reserve_spool(len(block)); _write_all(self._output,block)
|
|
102
|
+
value=None if digest is None else digest.hexdigest()
|
|
103
|
+
if count!=before[2] or self._identity(path)!=before:
|
|
104
|
+
raise ResultFormatError('导出文件在读取时变化')
|
|
105
|
+
if expected is not None and expected[1] is not None and value!=expected[1]:
|
|
106
|
+
raise ResultFormatError('导出文件内容与登记摘要不同')
|
|
107
|
+
self._close_slot('_output'); self._close_slot('_input')
|
|
108
|
+
# 写成功和真实close已确认;不再把新目标整份回读一次。
|
|
109
|
+
return count,value
|
|
110
|
+
|
|
111
|
+
def append(self,export_type,scope,interval,*,segment_id=None,completed_files=None):
|
|
112
|
+
"""登记刚生成目录中有限文件的实际身份。参数: 类型/范围/区间/片段ID。返回: None。异常: 文件/索引错。
|
|
113
|
+
"""
|
|
114
|
+
path=self.next_path(); files=[]
|
|
115
|
+
# 内部writer交出的有限事实避免登记时再次扫描;旧调用未交事实则按原开关读取。
|
|
116
|
+
supplied=None if completed_files is None else {item['name']:item for item in completed_files}
|
|
117
|
+
if supplied is not None and len(supplied)>16: raise ValueError('导出文件事实超过上限')
|
|
118
|
+
try:
|
|
119
|
+
if export_type not in ('signal_csv','can_frames') or scope not in ('session','segments'):
|
|
120
|
+
raise ValueError('导出种类或范围错误')
|
|
121
|
+
for entry in path.iterdir():
|
|
122
|
+
if len(files)>=16 or not entry.is_file() or entry.is_symlink() or not entry.name.isascii():
|
|
123
|
+
raise ValueError('导出目录只允许至多16个普通文件')
|
|
124
|
+
identity=self._identity(entry)
|
|
125
|
+
if supplied is None:
|
|
126
|
+
size,digest=self._file(entry,identity=identity)
|
|
127
|
+
else:
|
|
128
|
+
fact=supplied.pop(entry.name,None)
|
|
129
|
+
if fact is None or fact['bytes']!=identity[2]:
|
|
130
|
+
raise ResultFormatError('导出文件与writer事实不符')
|
|
131
|
+
size,digest=fact['bytes'],fact.get('sha256') if self._integrity else None
|
|
132
|
+
if self._integrity and (type(digest) is not str or len(digest)!=64):
|
|
133
|
+
raise ResultFormatError('请求摘要但writer没有提供')
|
|
134
|
+
files.append(dict(name=entry.name,bytes=size,_identity=identity,
|
|
135
|
+
**({} if digest is None else {'sha256':digest})))
|
|
136
|
+
if supplied: raise ResultFormatError('writer登记的文件缺失')
|
|
137
|
+
if not any(f['name']=='manifest.json' for f in files):
|
|
138
|
+
raise ValueError('导出缺完成清单')
|
|
139
|
+
self._sort.append((self.count,),dict(index=self.count,export_type=export_type,scope=scope,segment_id=segment_id,
|
|
140
|
+
interval=None if interval is None else [interval.start_ns,interval.end_ns],
|
|
141
|
+
directory=path.name,files=sorted(files,key=lambda f:f['name']),device_label=self.device_label))
|
|
142
|
+
self.count+=1
|
|
143
|
+
except BaseException as error:
|
|
144
|
+
self.state='failed'; error.artifact_export_store_cleanup_owner=self; raise
|
|
145
|
+
|
|
146
|
+
def seal(self):
|
|
147
|
+
"""封口目录索引后才允许移交。参数: 无。返回: None。异常: 状态/排序IO错。
|
|
148
|
+
"""
|
|
149
|
+
self.next_path(); self._sort.seal(); self.state='sealed'
|
|
150
|
+
|
|
151
|
+
def copy_to(self,destination):
|
|
152
|
+
"""逐目录复制到新发布位置,按请求在同次读取核摘要。参数: 新结果根。返回: exports.jsonl路径。异常: IO/完整性错。
|
|
153
|
+
"""
|
|
154
|
+
if self._closed or self.state!='sealed' or self._cursor is not None or self._index is not None:
|
|
155
|
+
raise ResultClosedError('导出索引未封口或有发布资源待恢复')
|
|
156
|
+
root=Path(destination)/'exports'; root.mkdir(exist_ok=False)
|
|
157
|
+
index=Path(destination)/'exports.jsonl'
|
|
158
|
+
index_digest=sha256() if self._integrity else None; index_bytes=0
|
|
159
|
+
self.index_info=None
|
|
160
|
+
try:
|
|
161
|
+
self._index=index.open('xb',buffering=0)
|
|
162
|
+
self._cursor=self._sort._read(self._sort.path/f'{self._sort.level}-0.jsonl')
|
|
163
|
+
count=0
|
|
164
|
+
for key,sequence,record in self._cursor:
|
|
165
|
+
if key!=[count] and key!=(count,):
|
|
166
|
+
raise ResultFormatError('导出索引序号不连续')
|
|
167
|
+
if record['directory']!=f'export-{count:08d}':
|
|
168
|
+
raise ResultFormatError('导出索引目录错误')
|
|
169
|
+
target=root/record['directory']; target.mkdir(exist_ok=False)
|
|
170
|
+
for entry in record['files']:
|
|
171
|
+
name=entry['name']
|
|
172
|
+
if Path(name).name!=name or '/' in name or '\\' in name or ':' in name:
|
|
173
|
+
raise ResultFormatError('导出索引包含不安全文件名')
|
|
174
|
+
self._file(self.path/record['directory']/name,target/name,
|
|
175
|
+
(entry['bytes'],entry.get('sha256')),entry['_identity'])
|
|
176
|
+
# 修改标识仅用于当前文件生命周期,不逐文件发布另一套证明。
|
|
177
|
+
del entry['_identity']
|
|
178
|
+
payload=(json.dumps(record,ensure_ascii=False,allow_nan=False,sort_keys=True)+'\n').encode('utf-8')
|
|
179
|
+
self._budget.reserve_spool(len(payload)); _write_all(self._index,payload); count+=1
|
|
180
|
+
if index_digest is not None: index_digest.update(payload)
|
|
181
|
+
index_bytes+=len(payload)
|
|
182
|
+
if count!=self.count:
|
|
183
|
+
raise ResultFormatError('导出索引数量不符')
|
|
184
|
+
self._close_slot('_cursor'); self._close_slot('_index')
|
|
185
|
+
self.index_info=dict(name=index.name,bytes=index_bytes,
|
|
186
|
+
**({} if index_digest is None else {'sha256':index_digest.hexdigest()}))
|
|
187
|
+
return index
|
|
188
|
+
except BaseException as error:
|
|
189
|
+
error.artifact_export_store_cleanup_owner=self
|
|
190
|
+
try:
|
|
191
|
+
self.recover_copy()
|
|
192
|
+
except BaseException as cleanup:
|
|
193
|
+
error.add_note('导出复制清理失败: '+type(cleanup).__name__)
|
|
194
|
+
raise
|
|
195
|
+
|
|
196
|
+
def recover_copy(self):
|
|
197
|
+
"""关闭失败发布句柄,可重新发布到另一新目录。参数: 无。返回: None。异常: 实际close错可重试。
|
|
198
|
+
"""
|
|
199
|
+
for slot in ('_output','_input','_cursor','_index'):
|
|
200
|
+
self._close_slot(slot)
|
|
201
|
+
# 生成器已退出而真实close持续失败时,句柄仍登记在索引仓,重试必须处理它们。
|
|
202
|
+
if self._sort is not None:
|
|
203
|
+
while self._sort.handles:
|
|
204
|
+
self._sort._close_file(self._sort.handles[-1])
|
|
205
|
+
|
|
206
|
+
def close(self):
|
|
207
|
+
"""真实关闭索引及IO后释放自己的费用,保留磁盘。参数: 无。返回: None。异常: 原close错。
|
|
208
|
+
"""
|
|
209
|
+
if self._closed:
|
|
210
|
+
return
|
|
211
|
+
self.recover_copy(); self._close_slot('_sort')
|
|
212
|
+
_release_owned_ram(self,self._fixed_cost,'_fixed_cost'); self._closed=True
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"""保存清单中的预设版本与最终角色,不读取来源或重新执行工程契约。
|
|
2
|
+
|
|
3
|
+
输入是计划构建器已检查、运行层又与实际绑定核对的有限角色记录,输出为冻结
|
|
4
|
+
快照。记录只有别名和契约追溯,不含样本或原配置。contract_status仅表示给定
|
|
5
|
+
声明元数据通过了检查,不能证明方向、位置或物理语义已经由系统测量核实。
|
|
6
|
+
本模块只依赖标准库与核心字段校验,无I/O、预算或状态副作用。
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
# 完整信号定义由RunMetadata另存;角色快照只引用同一清单的实际简单别名。
|
|
10
|
+
from dataclasses import dataclass
|
|
11
|
+
from ..core.validation import require_identifier, require_text
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass(frozen=True)
|
|
15
|
+
class PresetRoleMetadata:
|
|
16
|
+
"""保留角色选择和声明契约版本,字段冻结且不代表物理事实已验。"""
|
|
17
|
+
|
|
18
|
+
role: str # 原预设角色。
|
|
19
|
+
alias: str # 最终实际信号别名。
|
|
20
|
+
resolution: str # explicit或semantic_unique。
|
|
21
|
+
contract_version: str # 实际检查的角色契约版本。
|
|
22
|
+
contract_status: str = 'checked_against_declared_metadata' # 校验的是给定声明。
|
|
23
|
+
|
|
24
|
+
def __post_init__(self):
|
|
25
|
+
"""校验有限字段,不执行角色契约。参数: 无。返回: None。异常: 类型或非法状态。"""
|
|
26
|
+
require_identifier(self.role, 'preset_role.role')
|
|
27
|
+
require_identifier(self.alias, 'preset_role.alias')
|
|
28
|
+
require_text(self.contract_version, 'preset_role.contract_version')
|
|
29
|
+
# 两种选择方式都先由原构建器完成,不接受未知方式或升级后的物理验证状态。
|
|
30
|
+
if self.resolution not in ('explicit', 'semantic_unique'):
|
|
31
|
+
raise ValueError('预设角色查找方式需explicit或semantic_unique')
|
|
32
|
+
if self.contract_status != 'checked_against_declared_metadata':
|
|
33
|
+
raise ValueError('预设角色状态只能说明已检查声明元数据')
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
@dataclass(frozen=True)
|
|
37
|
+
class PresetBindingMetadata:
|
|
38
|
+
"""按原计划顺序保存一个预设的版本和全部角色,角色不可重复。"""
|
|
39
|
+
|
|
40
|
+
preset_id: str # 原预设ID。
|
|
41
|
+
preset_type: str # 原预设种类,不从名称推断领域事实。
|
|
42
|
+
version: str # 原预设版本,与角色契约版本独立。
|
|
43
|
+
roles: tuple[PresetRoleMetadata, ...] # 有限冻结记录,不含输入行。
|
|
44
|
+
|
|
45
|
+
def __post_init__(self):
|
|
46
|
+
"""核快照及角色唯一性。参数: 无。返回: None。异常: 类型、空身份或重复角色。"""
|
|
47
|
+
require_identifier(self.preset_id, 'preset_binding.preset_id')
|
|
48
|
+
require_text(self.preset_type, 'preset_binding.preset_type')
|
|
49
|
+
require_text(self.version, 'preset_binding.version')
|
|
50
|
+
if type(self.roles) is not tuple or any(type(role) is not PresetRoleMetadata for role in self.roles):
|
|
51
|
+
raise TypeError('预设清单角色需冻结PresetRoleMetadata tuple')
|
|
52
|
+
# 模型只检查内部结构;运行层另证别名和定义属于本次实际输入。
|
|
53
|
+
if len({role.role for role in self.roles}) != len(self.roles):
|
|
54
|
+
raise ValueError('预设清单不能重复同一角色')
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"""维护共享资源账本、自有RAM交易槽及未返回owner的有限清理协议。
|
|
2
|
+
|
|
3
|
+
输入为显式正整数限额及申请bytes,输出为检查后的当前/峰值统计。
|
|
4
|
+
RAM申请先校验再分配,释放只能抵销已申请金额;spool保留诊断文件,累计不释放。
|
|
5
|
+
AnalysisRunner及执行组件共用账本登记数组nbytes、状态和历史存储费用;它不代表全进程RSS上限。
|
|
6
|
+
三个资源事务helper只围绕直接预算调用登记实际归属,或委托真实owner.close,
|
|
7
|
+
不创建来源、数组或文件。轻量累计器可复用这些协议,无需加载结果编解码和暂存。
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
# 明确超限异常,首版不降采样、丢结果或偷改窗口。
|
|
11
|
+
from .errors import BudgetExceededError
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _reserve_owned_ram(owner, amount: int, slot: str) -> None:
|
|
15
|
+
"""预约一笔RAM并按实际账本登记owner及指定槽位,覆盖成功后取消。
|
|
16
|
+
|
|
17
|
+
参数: owner已初始化_budget/_held_cost/slot;amount为bytes;slot为实际费用字段。
|
|
18
|
+
返回: None。异常: 原预算/取消传播,未实际入账不增加自有费用。
|
|
19
|
+
边界: 仅围绕一次单线程直接预算调用判断,不用子操作后的总额猜测借用费用。
|
|
20
|
+
"""
|
|
21
|
+
# 预算回调可能先更新再抛异常,finally必须登记已成功的这一笔申请。
|
|
22
|
+
before = owner._budget.ram_bytes
|
|
23
|
+
try:
|
|
24
|
+
owner._budget.reserve_ram(amount)
|
|
25
|
+
finally:
|
|
26
|
+
if owner._budget.ram_bytes == before + amount:
|
|
27
|
+
owner._held_cost += amount
|
|
28
|
+
setattr(owner, slot, getattr(owner, slot) + amount)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _release_owned_ram(owner, amount: int, slot: str) -> None:
|
|
32
|
+
"""抵销一笔实际自有RAM,释放前取消保留金额,释放后取消立即清账。
|
|
33
|
+
|
|
34
|
+
参数: owner持有实际_budget/_held_cost/slot;amount为bytes;slot为对应实际费用。
|
|
35
|
+
返回: None。异常: 原预算/取消传播,恢复后不得重复抵销已释放金额。
|
|
36
|
+
"""
|
|
37
|
+
# 空槽不调用外部预算回调,也不把未付金额用于抵销其他owner的费用。
|
|
38
|
+
if amount == 0:
|
|
39
|
+
return
|
|
40
|
+
before = owner._budget.ram_bytes
|
|
41
|
+
try:
|
|
42
|
+
owner._budget.release_ram(amount)
|
|
43
|
+
finally:
|
|
44
|
+
if owner._budget.ram_bytes == before - amount:
|
|
45
|
+
owner._held_cost -= amount
|
|
46
|
+
setattr(owner, slot, getattr(owner, slot) - amount)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def _cleanup_owner(owner, exc: BaseException, attribute: str, label: str) -> None:
|
|
50
|
+
"""尝试关闭构造未返回的真实owner,持续失败将恢复句柄附在原异常。
|
|
51
|
+
|
|
52
|
+
参数: owner为实际部分构造对象;exc为原异常;attribute为恢复属性名;label为说明。
|
|
53
|
+
返回: None,不覆盖原异常。异常: 关闭错误记录在原异常notes中,不向外替换它。
|
|
54
|
+
"""
|
|
55
|
+
# 至多两次处理瞬时关闭取消;持续故障保留原对象,调用方恢复后显式close。
|
|
56
|
+
for attempt in range(2):
|
|
57
|
+
try:
|
|
58
|
+
owner.close()
|
|
59
|
+
break
|
|
60
|
+
except BaseException as cleanup:
|
|
61
|
+
exc.add_note(f'{label}清理第{attempt + 1}次失败: {type(cleanup).__name__}')
|
|
62
|
+
if not (getattr(owner, '_closed', False) or getattr(owner, 'closed', False)):
|
|
63
|
+
setattr(exc, attribute, owner)
|
|
64
|
+
exc.add_note(f'释放恢复后调用{attribute}.close()')
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class ResourceBudget:
|
|
68
|
+
"""保存限额与单线程共享计数;每次申请失败都保持原计数不变。"""
|
|
69
|
+
|
|
70
|
+
def __init__(self, memory_budget_bytes: int = 268435456, spool_quota_bytes: int | None = None):
|
|
71
|
+
"""校验并初始化资源计数,不分配数组或创建文件。
|
|
72
|
+
|
|
73
|
+
参数: memory_budget_bytes为RAM估算bytes;spool_quota_bytes为可选累计限额。
|
|
74
|
+
返回: 新账本。异常: ValueError为bool、非正数或非原生int。
|
|
75
|
+
"""
|
|
76
|
+
# 配置从计划传入也重新校验,不能把None磁盘配额解释为无限物理磁盘。
|
|
77
|
+
for value in (memory_budget_bytes, spool_quota_bytes):
|
|
78
|
+
if value is not None and (type(value) is not int or value <= 0):
|
|
79
|
+
raise ValueError('资源限额需要正原生int')
|
|
80
|
+
if memory_budget_bytes is None:
|
|
81
|
+
raise ValueError('RAM限额不能省略')
|
|
82
|
+
self.memory_budget_bytes = memory_budget_bytes
|
|
83
|
+
self.spool_quota_bytes = spool_quota_bytes
|
|
84
|
+
self.ram_bytes = self.peak_ram_bytes = self.spool_bytes = 0
|
|
85
|
+
|
|
86
|
+
def reserve_ram(self, amount: int) -> None:
|
|
87
|
+
"""在分配前保守申请新层RAM,失败不修改账本。
|
|
88
|
+
|
|
89
|
+
参数: amount为非负原生int bytes。返回: None。
|
|
90
|
+
异常: ValueError为金额错误;BudgetExceededError为超限。
|
|
91
|
+
"""
|
|
92
|
+
# 使用Python整数避免账本定宽溢出。
|
|
93
|
+
self._amount(amount)
|
|
94
|
+
if self.ram_bytes + amount > self.memory_budget_bytes:
|
|
95
|
+
raise BudgetExceededError(f'新分析层RAM估算超限: {self.ram_bytes}+{amount}>{self.memory_budget_bytes}')
|
|
96
|
+
self.ram_bytes += amount
|
|
97
|
+
self.peak_ram_bytes = max(self.peak_ram_bytes, self.ram_bytes)
|
|
98
|
+
|
|
99
|
+
def release_ram(self, amount: int) -> None:
|
|
100
|
+
"""释放已有申请,不能凭负数或重复释放隐藏状态开销。
|
|
101
|
+
|
|
102
|
+
参数: amount为非负原生int bytes。返回: None。
|
|
103
|
+
异常: ValueError为金额错误或超出当前申请。
|
|
104
|
+
"""
|
|
105
|
+
self._amount(amount)
|
|
106
|
+
if amount > self.ram_bytes:
|
|
107
|
+
raise ValueError('RAM释放超出当前申请')
|
|
108
|
+
self.ram_bytes -= amount
|
|
109
|
+
|
|
110
|
+
def reserve_spool(self, amount: int) -> None:
|
|
111
|
+
"""写入前累计申请磁盘量,失败或部分写入也保守保留申请。
|
|
112
|
+
|
|
113
|
+
参数: amount为非负原生int bytes。返回: None。
|
|
114
|
+
异常: ValueError为金额错误;BudgetExceededError为累计超配额。
|
|
115
|
+
"""
|
|
116
|
+
self._amount(amount)
|
|
117
|
+
if self.spool_quota_bytes is not None and self.spool_bytes + amount > self.spool_quota_bytes:
|
|
118
|
+
raise BudgetExceededError('累计磁盘暂存超过spool_quota_bytes')
|
|
119
|
+
self.spool_bytes += amount
|
|
120
|
+
|
|
121
|
+
@staticmethod
|
|
122
|
+
def _amount(amount: int) -> None:
|
|
123
|
+
"""检查金额,防止布尔和负数影响预算。
|
|
124
|
+
|
|
125
|
+
参数: amount为申请金额。返回: None。异常: ValueError为非法金额。
|
|
126
|
+
"""
|
|
127
|
+
if type(amount) is not int or amount < 0:
|
|
128
|
+
raise ValueError('资源金额需要非负原生int')
|
|
129
|
+
|
|
130
|
+
def snapshot(self) -> dict:
|
|
131
|
+
"""返回独立的小型资源快照,不修改计数。
|
|
132
|
+
|
|
133
|
+
参数: 无。返回: 限额、当前/峰值RAM估算和累计spool预留。
|
|
134
|
+
异常: 无;整进程RSS不在此模型内。
|
|
135
|
+
"""
|
|
136
|
+
return {'memory_budget_bytes': self.memory_budget_bytes, 'spool_quota_bytes': self.spool_quota_bytes,
|
|
137
|
+
'ram_estimated_bytes': self.ram_bytes, 'peak_ram_estimated_bytes': self.peak_ram_bytes,
|
|
138
|
+
'spool_reserved_bytes': self.spool_bytes, 'whole_process_rss': 'not_measured'}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
"""冻结同次CAN读取、原始暂存和DBC单位核对的结构化运行事实。
|
|
2
|
+
|
|
3
|
+
CANUnitCheck只保存原声明与同次公开DBC单位的比较;CANSourceMetadata保存会话、
|
|
4
|
+
profile、声明路径、实际read身份/进程、原帧数、映射首末、封口暂存SHA与累计费用、
|
|
5
|
+
依赖/vendor版本证据及单位检查。CANFrameFormatNotice明确记录已授权的单向DBC声明
|
|
6
|
+
差异,真实帧不转换。输入均为有限明确字段,输出冻结模型,不塞JSON
|
|
7
|
+
字符串或伪造DBC内容哈希。缺DBC单位仍保None/空原值并记declared,不提升为verified。
|
|
8
|
+
本模块仅校类型、内部一致性与唯一性,无路径访问、DBC解析、进程、预算或I/O副作用;
|
|
9
|
+
构造成功不能证明来源已读完、进程已退出、暂存已核验或物理单位已测量。
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
# 只登记三类有限冻结模型;运行侧提供真实证据,声明侧不重新读取来源。
|
|
13
|
+
from dataclasses import dataclass
|
|
14
|
+
from ..core.validation import require_identifier, require_text
|
|
15
|
+
from ..legacy.records import PROFILE_ID, LegacyCANField
|
|
16
|
+
from ..timebase.conversion import require_int64_ns
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _integer(value, name, minimum=0):
|
|
20
|
+
"""校验非负原生整数,拒绝bool和外部整数替代。
|
|
21
|
+
|
|
22
|
+
参数: value为候选值;name为字段名;minimum为含端点下限。返回: None。
|
|
23
|
+
异常: TypeError为非原生int,ValueError为小于下限。
|
|
24
|
+
"""
|
|
25
|
+
if type(value) is not int:
|
|
26
|
+
raise TypeError(name + '需要原生int')
|
|
27
|
+
if value < minimum:
|
|
28
|
+
raise ValueError(name + '低于允许下限')
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _sha256(value, name):
|
|
32
|
+
"""校验64位hex摘要原文,不把路径、版本或随机身份冒充内容SHA。
|
|
33
|
+
|
|
34
|
+
参数: value为候选摘要;name定位字段。返回: None,保大小写原值。
|
|
35
|
+
异常: TypeError/ValueError为类型、长度或非hex字符;不读取文件证明实际内容。
|
|
36
|
+
"""
|
|
37
|
+
if type(value) is not str:
|
|
38
|
+
raise TypeError(name + '需要str')
|
|
39
|
+
if len(value) != 64 or any(char not in '0123456789abcdefABCDEF' for char in value):
|
|
40
|
+
raise ValueError(name + '需要64位hex SHA256')
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _pairs(value, name, hashes=False):
|
|
44
|
+
"""检查版本或vendor摘要的冻结键值对,不能重复键或接受可变字典。
|
|
45
|
+
|
|
46
|
+
参数: value为tuple[tuple[str,str],...];name定位字段;hashes指值是否需要SHA。
|
|
47
|
+
返回: None。异常: TypeError/ValueError为结构、空文本、重复键或非法SHA。
|
|
48
|
+
"""
|
|
49
|
+
if type(value) is not tuple:
|
|
50
|
+
raise TypeError(name + '需要tuple')
|
|
51
|
+
keys = set()
|
|
52
|
+
for pair in value:
|
|
53
|
+
if type(pair) is not tuple or len(pair) != 2 or any(type(item) is not str for item in pair):
|
|
54
|
+
raise TypeError(name + '需要原生文本二元tuple')
|
|
55
|
+
require_text(pair[0], name + '.key')
|
|
56
|
+
require_text(pair[1], name + '.value')
|
|
57
|
+
if pair[0] in keys:
|
|
58
|
+
raise ValueError(name + '键重复')
|
|
59
|
+
keys.add(pair[0])
|
|
60
|
+
if hashes:
|
|
61
|
+
_sha256(pair[1], name + '.sha256')
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
@dataclass(frozen=True)
|
|
65
|
+
class CANUnitCheck:
|
|
66
|
+
"""保原声明单位及同次DBC单位;verified只表示非空原文本完全相同。"""
|
|
67
|
+
|
|
68
|
+
alias: str # 同一运行signal_bindings中的简单别名,不是DBC信号名称。
|
|
69
|
+
input_unit: str # 原解码输入单位,不是额外线性转换后的输出单位。
|
|
70
|
+
dbc_unit: str | None # 同次公开signal.unit原值,None/空字符串均原样保留。
|
|
71
|
+
status: str # verified或declared;不表示物理测量已验。
|
|
72
|
+
|
|
73
|
+
def __post_init__(self):
|
|
74
|
+
"""校验单位比较事实,不去空格、换算或重复施加DBC缩放。
|
|
75
|
+
|
|
76
|
+
参数: 无。返回: None。异常: TypeError/ValueError为字段类型或状态与原单位冲突。
|
|
77
|
+
"""
|
|
78
|
+
require_identifier(self.alias, 'can_unit.alias')
|
|
79
|
+
require_text(self.input_unit, 'can_unit.input_unit')
|
|
80
|
+
if self.dbc_unit is not None and type(self.dbc_unit) is not str:
|
|
81
|
+
raise TypeError('can_unit.dbc_unit需要str或None')
|
|
82
|
+
if type(self.status) is not str or self.status not in ('verified', 'declared'):
|
|
83
|
+
raise ValueError('CAN单位状态仅verified/declared')
|
|
84
|
+
missing = self.dbc_unit is None or self.dbc_unit == ''
|
|
85
|
+
if self.status == 'verified' and (missing or self.dbc_unit != self.input_unit):
|
|
86
|
+
raise ValueError('verified需要非空DBC单位与原input_unit完全相同')
|
|
87
|
+
if self.status == 'declared' and not missing:
|
|
88
|
+
raise ValueError('declared仅用于DBC单位None或空字符串')
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
@dataclass(frozen=True)
|
|
92
|
+
class CANFrameFormatNotice:
|
|
93
|
+
"""保存DBC声明FD但选中实际经典CAN的有限提示,不证明任意原帧均匹配。
|
|
94
|
+
|
|
95
|
+
alias关联本次实际信号声明,其余字段完整保存原定位和同次DBC帧型。
|
|
96
|
+
仅单向差异合法;真实帧仍由读取层原通道/ID/标准/FD校验,不改变原帧。
|
|
97
|
+
"""
|
|
98
|
+
|
|
99
|
+
alias: str # 同次实际signal_bindings简单别名。
|
|
100
|
+
channel: int # 原定位通道,不冒称DBC能证明物理通道。
|
|
101
|
+
signal: str # 同次DBC核对的原信号名称,保全文。
|
|
102
|
+
frame_id: int # 与原显式定位一致的数值报文ID。
|
|
103
|
+
is_extended: bool # 原标准/扩展定位;本兼容不放宽该项。
|
|
104
|
+
dbc_is_fd: bool # 同次DBC声明,唯一允许值为原生True。
|
|
105
|
+
requested_is_fd: bool # 显式或自动识别得到经典CAN,唯一允许False;不改写原帧。
|
|
106
|
+
code: str = 'dbc_fd_classic_selector' # 稳定机器码,不接受其他自由兼容政策。
|
|
107
|
+
|
|
108
|
+
def __post_init__(self):
|
|
109
|
+
"""核固定提示及原定位类型,不访问DBC或把声明当实际帧转换。
|
|
110
|
+
|
|
111
|
+
参数: 无。返回: None。异常: TypeError/ValueError为非法类型、方向或固定code。
|
|
112
|
+
"""
|
|
113
|
+
require_identifier(self.alias, 'can_frame_format.alias')
|
|
114
|
+
LegacyCANField(self.channel, self.signal, self.frame_id,
|
|
115
|
+
self.is_extended, self.requested_is_fd)
|
|
116
|
+
if type(self.dbc_is_fd) is not bool or type(self.is_extended) is not bool:
|
|
117
|
+
raise TypeError('DBC帧型提示需要原生bool')
|
|
118
|
+
if self.dbc_is_fd is not True or self.requested_is_fd is not False:
|
|
119
|
+
raise ValueError('仅兼容DBC FD声明与显式经典CAN定位')
|
|
120
|
+
if type(self.code) is not str or self.code != 'dbc_fd_classic_selector':
|
|
121
|
+
raise ValueError('CAN帧型提示code非法')
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
@dataclass(frozen=True)
|
|
125
|
+
class CANSourceMetadata:
|
|
126
|
+
"""保存一条真实read的有限事实;内部模型校验不认证实际读取或资源释放。"""
|
|
127
|
+
|
|
128
|
+
source: str # 同计划安全来源名。
|
|
129
|
+
session_id: str # 同次分析会话,运行清单另核会话归属。
|
|
130
|
+
legacy_profile: str # 固定sclicer-functions-v1。
|
|
131
|
+
path: str # 原单BLF路径文本,不在元数据模型中resolve。
|
|
132
|
+
dbc_path: str # 同次原load_file路径,不是DBC内容哈希。
|
|
133
|
+
channel: int # 明确单通道,非负原生int。
|
|
134
|
+
read_identity: str # 同次实际read身份,不与随机运行ID或物理行号混淆。
|
|
135
|
+
worker_pid: int # 实际子进程正整数PID,不能用bool表示。
|
|
136
|
+
frame_count: int # 原yield总数,不是投影信号样本数。
|
|
137
|
+
first_ns: int | None # 原帧映射后首坐标;空来源为None。
|
|
138
|
+
last_ns: int | None # 原帧映射后末坐标;不伪造请求domain的终点。
|
|
139
|
+
raw_store_path: str | None # 本次封口原始帧暂存路径;计划不需原帧导出时为None。
|
|
140
|
+
raw_store_sha256: str | None # 仅实际保存原帧时给整流SHA,不冒充原BLF或DBC的SHA。
|
|
141
|
+
raw_spool_bytes: int # 本raw_store累计预留字节,不是RSS或已归还磁盘。
|
|
142
|
+
dependency_versions: tuple[tuple[str, str], ...] # 同次READY版本事实,键唯一。
|
|
143
|
+
vendor_sha256: tuple[tuple[str, str], ...] # 同次三原模块证据,键唯一、值为SHA。
|
|
144
|
+
unit_checks: tuple[CANUnitCheck, ...] # 每别名单位事实,不能重复别名。
|
|
145
|
+
frame_format_notices: tuple[CANFrameFormatNotice, ...] = () # 无差异保空,不新增旧序列化键或费用。
|
|
146
|
+
decode_scope: str = 'all' # 默认不新增旧清单键;requested由同次READY认证。
|
|
147
|
+
decode_frame_ids: tuple[int, ...] = () # requested实际固定ID集合,覆盖本次所需字段和触发报文。
|
|
148
|
+
decoded_values_policy: str = 'all_values-v1' # 旧全字段默认不加清单键;按需只传实际所需字段。
|
|
149
|
+
input_check: str = 'full' # 旧记录默认完整检查,新策略由实际READY确认。
|
|
150
|
+
time_scope: str = 'source' # none/selected/source,首末范围不可混称。
|
|
151
|
+
check_policy_version: str | None = None # 仅新按需策略给版本。
|
|
152
|
+
retained_record_count: int | None = None # 实际保留原记录数。
|
|
153
|
+
full_check_count: int = 0 # 非原生输入完整检查回退数。
|
|
154
|
+
selected_first_ns: int | None = None # 仅selected提供目标首时间。
|
|
155
|
+
selected_last_ns: int | None = None # 目标末时间,不是文件末时间。
|
|
156
|
+
|
|
157
|
+
def __post_init__(self):
|
|
158
|
+
"""核标识、计数/首末、摘要及冻结子记录,不访问原输入或暂存。
|
|
159
|
+
|
|
160
|
+
参数: 无。返回: None。异常: TypeError/ValueError为类型、范围或内部事实冲突,
|
|
161
|
+
OverflowError为非空首末超int64;不把声明校验写成实际EOF/哈希验证成功。
|
|
162
|
+
"""
|
|
163
|
+
require_identifier(self.source, 'can_source.source')
|
|
164
|
+
require_identifier(self.session_id, 'can_source.session_id')
|
|
165
|
+
for name in ('path', 'dbc_path', 'read_identity'):
|
|
166
|
+
require_text(getattr(self, name), 'can_source.' + name)
|
|
167
|
+
if type(self.legacy_profile) is not str or self.legacy_profile != PROFILE_ID:
|
|
168
|
+
raise ValueError('CAN清单仅支持sclicer-functions-v1')
|
|
169
|
+
_integer(self.channel, 'can_source.channel')
|
|
170
|
+
_integer(self.worker_pid, 'can_source.worker_pid', 1)
|
|
171
|
+
_integer(self.frame_count, 'can_source.frame_count')
|
|
172
|
+
_integer(self.raw_spool_bytes, 'can_source.raw_spool_bytes')
|
|
173
|
+
# 明确记录实际解码范围;bool与int相等不能被tuple比较误当成同一策略。
|
|
174
|
+
if type(self.decode_scope) is not str or self.decode_scope not in ('all', 'requested'):
|
|
175
|
+
raise ValueError('CAN解码方式仅all/requested')
|
|
176
|
+
if (type(self.decode_frame_ids) is not tuple or len(self.decode_frame_ids) > 4096
|
|
177
|
+
or any(type(value) is not int or not 0 <= value <= 0x1fffffff for value in self.decode_frame_ids)):
|
|
178
|
+
raise TypeError('CAN固定解码集合需至多4096个29位原生整数的tuple')
|
|
179
|
+
if (any(left >= right for left, right in zip(self.decode_frame_ids, self.decode_frame_ids[1:]))
|
|
180
|
+
or self.decode_scope == 'all' and self.decode_frame_ids):
|
|
181
|
+
raise ValueError('CAN固定解码ID需严格递增,all不另设固定集合')
|
|
182
|
+
# 原requested历史可以保全字段;新字段投影必须明确声明,不能冒称all。
|
|
183
|
+
if (type(self.decoded_values_policy) is not str
|
|
184
|
+
or self.decoded_values_policy not in ('all_values-v1', 'requested_fields-v1')):
|
|
185
|
+
raise ValueError('CAN解码字段策略仅all_values-v1/requested_fields-v1')
|
|
186
|
+
if self.decode_scope == 'all' and self.decoded_values_policy != 'all_values-v1':
|
|
187
|
+
raise ValueError('all解码方式必须保留all_values-v1字段策略')
|
|
188
|
+
# 空来源不制造零长实际观测;非空真实单点可first==last,保int64原坐标。
|
|
189
|
+
if self.input_check not in ('auto', 'full') or self.time_scope not in ('none', 'selected', 'source'):
|
|
190
|
+
raise ValueError('CAN实际检查/时间范围非法')
|
|
191
|
+
if self.input_check == 'full' and self.time_scope != 'source':
|
|
192
|
+
raise ValueError('完整检查必须提供全来源时间范围')
|
|
193
|
+
if self.input_check == 'auto' and self.check_policy_version != 'demand-check-v1':
|
|
194
|
+
raise ValueError('按需检查需要明确策略版本')
|
|
195
|
+
if self.retained_record_count is not None:
|
|
196
|
+
_integer(self.retained_record_count, 'can_source.retained_record_count')
|
|
197
|
+
if self.retained_record_count > self.frame_count:
|
|
198
|
+
raise ValueError('保留记录数超过原读取数')
|
|
199
|
+
_integer(self.full_check_count, 'can_source.full_check_count')
|
|
200
|
+
if self.full_check_count > self.frame_count:
|
|
201
|
+
raise ValueError('完整回退数超过原读取数')
|
|
202
|
+
if self.time_scope != 'selected' and (self.selected_first_ns is not None or self.selected_last_ns is not None):
|
|
203
|
+
raise ValueError('只有目标时间模式能声明目标首末')
|
|
204
|
+
if self.time_scope != 'source':
|
|
205
|
+
if self.first_ns is not None or self.last_ns is not None:
|
|
206
|
+
raise ValueError('未采集全部时间不能声明全来源首末')
|
|
207
|
+
if self.time_scope == 'selected':
|
|
208
|
+
if not self.retained_record_count:
|
|
209
|
+
# 没有目标记录(或没有已核实的目标计数)不能制造目标时间范围。
|
|
210
|
+
if self.selected_first_ns is not None or self.selected_last_ns is not None:
|
|
211
|
+
raise ValueError('没有目标记录不能声明目标首末时间')
|
|
212
|
+
else:
|
|
213
|
+
require_int64_ns(self.selected_first_ns)
|
|
214
|
+
require_int64_ns(self.selected_last_ns)
|
|
215
|
+
if self.selected_first_ns > self.selected_last_ns:
|
|
216
|
+
raise ValueError('目标时间首末回退')
|
|
217
|
+
elif self.frame_count == 0:
|
|
218
|
+
if self.first_ns is not None or self.last_ns is not None:
|
|
219
|
+
raise ValueError('空CAN来源首末必须None')
|
|
220
|
+
else:
|
|
221
|
+
if type(self.first_ns) is not int or type(self.last_ns) is not int:
|
|
222
|
+
raise TypeError('非空CAN首末需要原生int64')
|
|
223
|
+
require_int64_ns(self.first_ns, 'can_source.first_ns')
|
|
224
|
+
require_int64_ns(self.last_ns, 'can_source.last_ns')
|
|
225
|
+
if self.first_ns > self.last_ns:
|
|
226
|
+
raise ValueError('CAN首坐标不能晚于末坐标')
|
|
227
|
+
# 不保存原帧是计划明确选择的事实;不能填假路径或空文件SHA冒充已保存。
|
|
228
|
+
# 三项必须同时表示未保存,实际保留的仓仍严格检查原路径和摘要。
|
|
229
|
+
if self.raw_store_path is None:
|
|
230
|
+
if self.raw_store_sha256 is not None or self.raw_spool_bytes != 0:
|
|
231
|
+
raise ValueError('未保存原帧时路径/SHA必须为None且原帧暂存费用为0')
|
|
232
|
+
else:
|
|
233
|
+
require_text(self.raw_store_path, 'can_source.raw_store_path')
|
|
234
|
+
_sha256(self.raw_store_sha256, 'can_source.raw_store_sha256')
|
|
235
|
+
_pairs(self.dependency_versions, 'can_source.dependency_versions')
|
|
236
|
+
_pairs(self.vendor_sha256, 'can_source.vendor_sha256', hashes=True)
|
|
237
|
+
if type(self.unit_checks) is not tuple or any(type(item) is not CANUnitCheck for item in self.unit_checks):
|
|
238
|
+
raise TypeError('CAN单位清单需要CANUnitCheck tuple')
|
|
239
|
+
if len({item.alias for item in self.unit_checks}) != len(self.unit_checks):
|
|
240
|
+
raise ValueError('CAN单位清单别名重复')
|
|
241
|
+
if (type(self.frame_format_notices) is not tuple
|
|
242
|
+
or any(type(item) is not CANFrameFormatNotice for item in self.frame_format_notices)):
|
|
243
|
+
raise TypeError('CAN帧型提示需要冻结CANFrameFormatNotice tuple')
|
|
244
|
+
aliases = {item.alias for item in self.unit_checks}
|
|
245
|
+
if (len({item.alias for item in self.frame_format_notices}) != len(self.frame_format_notices)
|
|
246
|
+
or any(item.alias not in aliases or item.channel != self.channel for item in self.frame_format_notices)):
|
|
247
|
+
raise ValueError('CAN帧型提示不能重复、跨来源通道或引用未知别名')
|