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,79 @@
|
|
|
1
|
+
"""声明按本条原解码方向值分正负桶,并保存不经转换的选择追溯。
|
|
2
|
+
|
|
3
|
+
LegacyDisjunction给出已绑定别名、positive/negative桶及固定raw_decoded-v1策略。
|
|
4
|
+
运行层须核同一完整消息定位,从当前decoded字典直接取方向原值,不能施加
|
|
5
|
+
SignalDefinition的scale、offset、direction_factor或TTL,也不能补前一次值。
|
|
6
|
+
原生True按正值、False按零;缺字段、非有限值和未选桶的跳过由运行层决定,
|
|
7
|
+
本模块不执行分类、表达式、累计或数值转换。
|
|
8
|
+
|
|
9
|
+
LegacyDisjunctionTrace保存冻结选择器、原field定位、原生方向值和SourceRef。
|
|
10
|
+
None明确表示方向字段缺失;NaN/Inf保留原诊断,不改成零或字符串。模型只核
|
|
11
|
+
结构,不声称来自真实消息、文件EOF或旧ChrgInfo整条调用链。配置和返回追溯
|
|
12
|
+
由调用方拥有;本模块不创建预算、I/O、缓存或NumPy依赖。
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
# 两端共享冻结选择器和追溯,不在计划、结果和运行层各造一套可变字典。
|
|
16
|
+
from dataclasses import dataclass
|
|
17
|
+
|
|
18
|
+
from ..core.models import SourceRef
|
|
19
|
+
from ..core.validation import require_identifier, require_text
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@dataclass(frozen=True)
|
|
23
|
+
class LegacyDisjunction:
|
|
24
|
+
"""选择同条消息的原数值方向桶,不修改表达式贡献的正负号。
|
|
25
|
+
|
|
26
|
+
signal是分析别名,原字段和完整消息定位仍由当前绑定解析;bucket只允许
|
|
27
|
+
positive/negative。该声明不自行拆分指标,也不证明方向在表达式依赖中。
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
signal: str # 已绑定简单别名,可不出现在表达式中。
|
|
31
|
+
bucket: str # positive或negative,各指标独立累计。
|
|
32
|
+
value_policy: str = 'raw_decoded-v1' # 只看原decoded值,不施转换或保持。
|
|
33
|
+
|
|
34
|
+
def __post_init__(self) -> None:
|
|
35
|
+
"""校验安全别名和固定桶/取值策略,不解析来源或输入值。
|
|
36
|
+
|
|
37
|
+
参数: 无,读取三个冻结字段。返回: None,保原生文本原样。
|
|
38
|
+
异常: TypeError为非原生文本;ValueError为别名、桶或策略不支持。
|
|
39
|
+
"""
|
|
40
|
+
# 不按truthiness或str隐式转换选桶,避免配置拼错后悄悄进入另一种策略。
|
|
41
|
+
if type(self.signal) is not str or type(self.bucket) is not str or type(self.value_policy) is not str:
|
|
42
|
+
raise TypeError('disjunction别名、桶和value_policy需要原生str')
|
|
43
|
+
require_identifier(self.signal, 'disjunction.signal')
|
|
44
|
+
if self.bucket not in ('positive', 'negative'):
|
|
45
|
+
raise ValueError('disjunction.bucket仅支持positive或negative')
|
|
46
|
+
if self.value_policy != 'raw_decoded-v1':
|
|
47
|
+
raise ValueError('disjunction.value_policy仅支持raw_decoded-v1')
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
@dataclass(frozen=True)
|
|
51
|
+
class LegacyDisjunctionTrace:
|
|
52
|
+
"""保存本次方向的原定位和值,结构冻结但不假造真实读取证明。
|
|
53
|
+
|
|
54
|
+
raw_value保int/float/bool原类型,None只表示明确缺字段;非有限float不在
|
|
55
|
+
模型层改写或拒绝。source_ref原对象保持,实际CAN逐序身份由运行/结果层核。
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
selection: LegacyDisjunction # 实际指标使用的同一选择器。
|
|
59
|
+
field: str # 原SignalDefinition.field,CAN路径为规范六项定位。
|
|
60
|
+
raw_value: int | float | bool | None # 未归一化方向值;None为缺失。
|
|
61
|
+
source_ref: SourceRef # 同条原消息的真实来源引用。
|
|
62
|
+
|
|
63
|
+
def __post_init__(self) -> None:
|
|
64
|
+
"""核选择器、原字段、原生值及引用一致性,不作数值强制转换。
|
|
65
|
+
|
|
66
|
+
参数: 无,读取冻结追溯字段。返回: None;保NaN/Inf、负零和原bool。
|
|
67
|
+
异常: TypeError为非模型/原生数值;ValueError为原字段与引用不一致。
|
|
68
|
+
"""
|
|
69
|
+
# 选择器必须已由共享模型校验,字段全文保留,不从别名反猜原字典键。
|
|
70
|
+
if type(self.selection) is not LegacyDisjunction or type(self.field) is not str:
|
|
71
|
+
raise TypeError('disjunction追溯需要LegacyDisjunction及原生field文本')
|
|
72
|
+
require_text(self.field, 'disjunction.field')
|
|
73
|
+
# None不代表零或无效浮点;数值原类型限定,拒绝str、enum和NumPy scalar。
|
|
74
|
+
if self.raw_value is not None and type(self.raw_value) not in (int, float, bool):
|
|
75
|
+
raise TypeError('disjunction原值需要原生int/float/bool或明确缺失None')
|
|
76
|
+
if not isinstance(self.source_ref, SourceRef):
|
|
77
|
+
raise TypeError('disjunction追溯需要SourceRef')
|
|
78
|
+
if self.source_ref.field != self.field:
|
|
79
|
+
raise ValueError('disjunction原field与来源引用不一致')
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"""在独立spawn子进程按单次PUT许可调用冻结的原BLF写出链。
|
|
2
|
+
|
|
3
|
+
输入为有界INIT/PUT/FINISH JSON bytes,输出同次READY、逐帧ACK和完成候选。
|
|
4
|
+
INIT才核三份vendor及锁定依赖,独占取得新输出文件,再原样调用一次
|
|
5
|
+
build_writer(str(path),'blf')。每PUT完整恢复同一LegacyRawFrame公开字段并
|
|
6
|
+
构造can.Message,原writer.on_message_received只调用一次,不读源CAN或DBC。
|
|
7
|
+
FINISH仅在原stop成功后发送完成候选;父仍须核真实子退出、句柄及费用收尾。
|
|
8
|
+
|
|
9
|
+
本模块复用CAN读取协议的有界JSON、错误摘要和vendor加载函数,不修改或继承其read
|
|
10
|
+
生命周期。失败保有限远端事实并非零退出,finally只对尚未尝试stop的writer调用
|
|
11
|
+
一次原stop;失败的stop不被静默重试或改写。实际子退出回收未公开旧FD,不能
|
|
12
|
+
据父RAM账本声称旧库、压缩缓存或整进程RSS受限。产物保留,不自动删除失败文件。
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
# 模块导入不加载CAN库或打开输出;只有有效INIT之后才进入原样vendor。
|
|
16
|
+
from importlib import metadata
|
|
17
|
+
import os
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
import platform
|
|
20
|
+
from .records import PROFILE_ID, frame_from_dict
|
|
21
|
+
from .worker import VENDOR_SHA256, _exact, _load_vendor, _receive, _report_error, _send
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
WRITE_DEPENDENCIES = {'python-can': '4.6.1', 'cantools': '39.4.3', 'natsort': '8.4.0'}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _output(packet):
|
|
28
|
+
"""检查唯一INIT及新输出路径,不猜格式或覆盖已有文件。
|
|
29
|
+
|
|
30
|
+
参数: packet为已通过严格JSON边界的dict。返回: resolved新BLF Path。
|
|
31
|
+
异常: TypeError/ValueError为字段、版本、profile、后缀或受保护路径;
|
|
32
|
+
FileExistsError为已有目标,FileNotFoundError为尚无控制器工作根。
|
|
33
|
+
副作用: 仅检查文件系统;真正独占创建仍在writer建立之前执行。
|
|
34
|
+
"""
|
|
35
|
+
_exact(packet, ('op', 'version', 'profile', 'path'))
|
|
36
|
+
if (packet['op'] != 'init' or type(packet['version']) is not int or packet['version'] != 1
|
|
37
|
+
or type(packet['profile']) is not str or packet['profile'] != PROFILE_ID
|
|
38
|
+
or type(packet['path']) is not str):
|
|
39
|
+
raise ValueError('原CAN写出需要init/version1及固定profile路径')
|
|
40
|
+
path = Path(packet['path']).resolve()
|
|
41
|
+
# resolve先于保护检查,不能经目录链接把新产物写进历史快照。
|
|
42
|
+
if path.suffix.lower() != '.blf' or any(part.casefold() == 'refprojects' for part in path.parts):
|
|
43
|
+
raise ValueError('原CAN写出仅支持RefProjects之外的新BLF')
|
|
44
|
+
if path.exists():
|
|
45
|
+
raise FileExistsError(path)
|
|
46
|
+
if not path.parent.is_dir():
|
|
47
|
+
raise FileNotFoundError(path.parent)
|
|
48
|
+
return path
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def _message(can, frame):
|
|
52
|
+
"""把全部原公开写出字段交给原can.Message构造,不添加check或归一化参数。
|
|
53
|
+
|
|
54
|
+
参数: can为原vendor实际导入的模块;frame为已校验LegacyRawFrame。
|
|
55
|
+
返回: 新can.Message,timestamp/data/DLC及全部标志保持原参数。
|
|
56
|
+
异常: 原can.Message构造错误;不以新层猜测修正旧格式限制。
|
|
57
|
+
"""
|
|
58
|
+
if frame.is_rx is None:
|
|
59
|
+
raise ValueError('BLF写出需要收发方向is_rx')
|
|
60
|
+
return can.Message(timestamp=frame.timestamp, arbitration_id=frame.arbitration_id,
|
|
61
|
+
is_extended_id=frame.is_extended_id, is_remote_frame=frame.is_remote_frame,
|
|
62
|
+
is_error_frame=frame.is_error_frame, channel=frame.channel, dlc=frame.dlc,
|
|
63
|
+
data=frame.data, is_fd=frame.is_fd, is_rx=frame.is_rx,
|
|
64
|
+
bitrate_switch=frame.bitrate_switch, error_state_indicator=frame.error_state_indicator)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def worker_main(connection):
|
|
68
|
+
"""作为真实spawn目标,按INIT/单PUT/FINISH顺序调用唯一原writer。
|
|
69
|
+
|
|
70
|
+
参数: connection为父传来的实际duplex端点。返回: 原stop成功并发送候选后None。
|
|
71
|
+
异常: 原错误尽力发送有限ERROR,最终SystemExit(1);管道清理也不能伪成正常退出。
|
|
72
|
+
副作用: 独占创建一个新BLF、一次build_writer、每许可一次on_message_received,
|
|
73
|
+
至多一次stop;不读取输入CAN/DBC,不调parse或为ACK额外写帧。
|
|
74
|
+
"""
|
|
75
|
+
writer = claim = failure = request_id = None
|
|
76
|
+
phase, frame_count, stop_attempted = 'init', 0, False
|
|
77
|
+
try:
|
|
78
|
+
path = _output(_receive(connection))
|
|
79
|
+
phase = 'vendor'
|
|
80
|
+
_, processor, hashes = _load_vendor()
|
|
81
|
+
versions = {'python': platform.python_version(),
|
|
82
|
+
**{name: metadata.version(name) for name in WRITE_DEPENDENCIES}}
|
|
83
|
+
if any(versions[name] != expected for name, expected in WRITE_DEPENDENCIES.items()):
|
|
84
|
+
raise ValueError('原CAN writer依赖不符合已验证profile')
|
|
85
|
+
# xb原子拒绝已有文件;原build_writer只重开本child刚取得的自有空产物。
|
|
86
|
+
phase = 'claim'
|
|
87
|
+
claim = path.open('xb')
|
|
88
|
+
claim.close()
|
|
89
|
+
claim = None
|
|
90
|
+
phase = 'build_writer'
|
|
91
|
+
writer, actual_path = processor.build_writer(str(path), 'blf')
|
|
92
|
+
if actual_path != str(path):
|
|
93
|
+
raise ValueError('原build_writer返回的路径与本次目标不一致')
|
|
94
|
+
_send(connection, {'op': 'ready', 'version': 1, 'profile': PROFILE_ID,
|
|
95
|
+
'worker_pid': os.getpid(), 'dependency_versions': versions, 'vendor_sha256': hashes})
|
|
96
|
+
# 仅收到一条PUT后写一帧;下一许可前不保留当前消息或构造额外帧。
|
|
97
|
+
while True:
|
|
98
|
+
phase, request_id = 'control', None
|
|
99
|
+
packet = _receive(connection)
|
|
100
|
+
if packet.get('op') == 'finish':
|
|
101
|
+
_exact(packet, ('op', 'frame_count'))
|
|
102
|
+
if type(packet['frame_count']) is not int or packet['frame_count'] != frame_count:
|
|
103
|
+
raise ValueError('FINISH帧数与本次原writer确认数量不符')
|
|
104
|
+
phase, stop_attempted = 'stop', True
|
|
105
|
+
writer.stop()
|
|
106
|
+
writer = None
|
|
107
|
+
_send(connection, {'op': 'finished', 'frame_count': frame_count})
|
|
108
|
+
break
|
|
109
|
+
_exact(packet, ('op', 'request_id', 'frame'))
|
|
110
|
+
candidate = packet['request_id']
|
|
111
|
+
request_id = candidate if type(candidate) is int and candidate >= 0 else None
|
|
112
|
+
if packet['op'] != 'put' or request_id is None or request_id != frame_count:
|
|
113
|
+
raise ValueError('PUT许可必须从0严格连续且为原生int')
|
|
114
|
+
phase = 'frame'
|
|
115
|
+
frame = frame_from_dict(packet['frame'])
|
|
116
|
+
message = _message(processor.can, frame)
|
|
117
|
+
phase = 'write'
|
|
118
|
+
writer.on_message_received(message)
|
|
119
|
+
frame_count += 1
|
|
120
|
+
_send(connection, {'op': 'ack', 'request_id': request_id, 'frame_count': frame_count})
|
|
121
|
+
frame = message = None
|
|
122
|
+
except BaseException as exc:
|
|
123
|
+
failure = exc
|
|
124
|
+
_report_error(connection, exc, phase, request_id)
|
|
125
|
+
finally:
|
|
126
|
+
# 失败或父提前断管只结束已有writer;不重发PUT,不重试已经失败的原stop。
|
|
127
|
+
if writer is not None and not stop_attempted:
|
|
128
|
+
try:
|
|
129
|
+
stop_attempted = True
|
|
130
|
+
writer.stop()
|
|
131
|
+
except BaseException as cleanup:
|
|
132
|
+
if failure is None:
|
|
133
|
+
failure = cleanup
|
|
134
|
+
_report_error(connection, cleanup, 'stop', request_id)
|
|
135
|
+
else:
|
|
136
|
+
failure.add_note('原writer.stop附加失败: ' + type(cleanup).__name__)
|
|
137
|
+
for resource, label in ((claim, '新文件声明句柄'), (connection, '子连接')):
|
|
138
|
+
if resource is not None:
|
|
139
|
+
try:
|
|
140
|
+
resource.close()
|
|
141
|
+
except BaseException as cleanup:
|
|
142
|
+
if failure is None:
|
|
143
|
+
failure = cleanup
|
|
144
|
+
else:
|
|
145
|
+
failure.add_note(label + '关闭附加失败: ' + type(cleanup).__name__)
|
|
146
|
+
if failure is not None:
|
|
147
|
+
raise SystemExit(1)
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
"""在独立进程把原始帧交给冻结旧BLF writer,真实收尾后才确认完成。
|
|
2
|
+
|
|
3
|
+
LegacyCANProcessWrite接收共享ResourceBudget和新输出路径,构造只计有限状态、
|
|
4
|
+
核路径而不spawn或执行旧IO。start实际加载锁定依赖/vendor并创建原writer;每次
|
|
5
|
+
write只发一个有界PUT,收到同序ACK才承认该帧,FINISH没有额外帧写入许可。
|
|
6
|
+
finish须原stop成功、实际exitcode0、所有Pipe/Process及自有RAM清完,并核输出
|
|
7
|
+
stat不超过本writer直接预留,才公开finished。提前close、失败或取消不能伪完成。
|
|
8
|
+
|
|
9
|
+
进程/管道/wire/READY/当前帧分别先付并记真实槽;释放前后取消可重试,最高
|
|
10
|
+
can_process_write_cleanup_owner始终指向同一实际owner。磁盘在start前保守预留
|
|
11
|
+
65536 bytes、每PUT前4096 bytes,累计保留且不倒扣;不凭共享余额差接管费用。
|
|
12
|
+
原BLF压缩、库内部缓存及整进程RSS未测,也不承诺文件与源BLF字节一致。
|
|
13
|
+
这里只写控制器新工作根下的新文件,不读源CAN/DBC,不修改原read/records/vendor。
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
# 仅导入标准库和既有轻量协议;真实旧模块与CAN依赖留在独立spawn子内。
|
|
17
|
+
import multiprocessing
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
import platform
|
|
20
|
+
from .export_worker import WRITE_DEPENDENCIES, worker_main
|
|
21
|
+
from .process_read import RemoteLegacyError, _freeze, _wire_metadata_bytes
|
|
22
|
+
from .records import MAX_WIRE_BYTES, PROFILE_ID, LegacyRawFrame, decode_packet, encode_packet, frame_to_dict
|
|
23
|
+
from .worker import VENDOR_SHA256
|
|
24
|
+
from ..results.budget import ResourceBudget
|
|
25
|
+
from ..results.errors import AnalysisError, ResultClosedError
|
|
26
|
+
from ..results.spool import _cleanup_owner, _release_owned_ram, _reserve_owned_ram
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class LegacyCANWriteError(AnalysisError):
|
|
30
|
+
"""报告新外部writer协议或原子进程失败;远端原错仅作为明确事实cause。"""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class LegacyCANProcessWrite:
|
|
34
|
+
"""拥有一个真实writer子进程与独立费用,借用账本但不关闭其他owner。
|
|
35
|
+
|
|
36
|
+
_waiting阻止第二个在途控制包;_process_stopped只由实际exitcode确认。
|
|
37
|
+
_closed表示自有责任结束,_finished还须本次FINISH及输出大小验证成功。
|
|
38
|
+
输出路径和累计spool事实在close后保留,READY借引用在close时解除。
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
def __init__(self, budget, output_path):
|
|
42
|
+
"""预约固定协调状态并检查新路径,不启动进程或创建目标文件。
|
|
43
|
+
|
|
44
|
+
参数: budget为借用ResourceBudget;output_path为控制器已有新工作根下的
|
|
45
|
+
str/Path目标,须为.blf后缀,不能已存在或位于RefProjects。
|
|
46
|
+
返回: 未启动的独立writer。异常: 类型、路径或预算原错;未返回构造的持续
|
|
47
|
+
清理失败附can_process_write_cleanup_owner,同对象恢复后close。
|
|
48
|
+
"""
|
|
49
|
+
if not isinstance(budget, ResourceBudget) or not isinstance(output_path, (str, Path)):
|
|
50
|
+
raise TypeError('原CAN写出需要ResourceBudget和新输出路径')
|
|
51
|
+
# 所有真实资源和交易槽先安装;后续任何预算取消都有本owner可达责任。
|
|
52
|
+
self._budget, self._output_path = budget, None
|
|
53
|
+
self._connection = self._child_connection = self._process = None
|
|
54
|
+
self._worker_pid = self._exit_code = self._metadata = self._pending_reply = self._frame = None
|
|
55
|
+
self._fixed_cost = self._wire_cost = self._pipe_cost = self._process_cost = 0
|
|
56
|
+
self._metadata_cost = self._frame_cost = self._held_cost = self._spool_bytes = 0
|
|
57
|
+
self._puts_issued = self._acks_received = self._frames_written = 0
|
|
58
|
+
self._actual_bytes = None
|
|
59
|
+
self._process_stopped = self._waiting = self._started = self._finish_received = False
|
|
60
|
+
self._closed = self._closing = self._failed = self._finished = False
|
|
61
|
+
try:
|
|
62
|
+
_reserve_owned_ram(self, 1048576, '_fixed_cost')
|
|
63
|
+
if len(str(output_path)) > 8192:
|
|
64
|
+
raise ValueError('原CAN输出路径超过本层有限能力')
|
|
65
|
+
self._output_path = Path(output_path).resolve()
|
|
66
|
+
self._check_path()
|
|
67
|
+
except BaseException as exc:
|
|
68
|
+
self._failed = True
|
|
69
|
+
_cleanup_owner(self, exc, 'can_process_write_cleanup_owner', '原CAN writer构造')
|
|
70
|
+
raise
|
|
71
|
+
|
|
72
|
+
def _check_path(self):
|
|
73
|
+
"""拒绝已有/受保护目标及缺少的新工作根,不创建目录或文件。
|
|
74
|
+
|
|
75
|
+
参数: 无,使用已保存resolved路径。返回: None。
|
|
76
|
+
异常: ValueError为后缀/RefProjects,FileExistsError为已有目标,
|
|
77
|
+
FileNotFoundError为父目录不存在;真正独占创建由child执行。
|
|
78
|
+
"""
|
|
79
|
+
path = self._output_path
|
|
80
|
+
if path.suffix.lower() != '.blf' or any(part.casefold() == 'refprojects' for part in path.parts):
|
|
81
|
+
raise ValueError('原CAN写出仅支持RefProjects之外的新BLF')
|
|
82
|
+
if path.exists():
|
|
83
|
+
raise FileExistsError(path)
|
|
84
|
+
if not path.parent.is_dir():
|
|
85
|
+
raise FileNotFoundError(path.parent)
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def output_path(self):
|
|
89
|
+
"""读取实际新目标。参数: 无。返回: resolved Path或构造前失败时None。异常: 无。"""
|
|
90
|
+
return self._output_path
|
|
91
|
+
|
|
92
|
+
@property
|
|
93
|
+
def closed(self):
|
|
94
|
+
"""读取全部自有责任关闭状态。参数: 无。返回: bool。异常: 无。"""
|
|
95
|
+
return self._closed
|
|
96
|
+
|
|
97
|
+
@property
|
|
98
|
+
def finished(self):
|
|
99
|
+
"""读取完整FINISH事实。参数: 无。返回: bool,失败/提前close为False。异常: 无。"""
|
|
100
|
+
return self._finished
|
|
101
|
+
|
|
102
|
+
@property
|
|
103
|
+
def failed(self):
|
|
104
|
+
"""读取失败诊断状态。参数: 无。返回: bool。异常: 无。"""
|
|
105
|
+
return self._failed
|
|
106
|
+
|
|
107
|
+
@property
|
|
108
|
+
def worker_pid(self):
|
|
109
|
+
"""读取本次真实启动PID。参数: 无。返回: int或None,关闭后保留。异常: 无。"""
|
|
110
|
+
return self._worker_pid
|
|
111
|
+
|
|
112
|
+
@property
|
|
113
|
+
def spool_bytes(self):
|
|
114
|
+
"""读取本writer直接累计磁盘预留。参数: 无。返回: int bytes,不倒扣。异常: 无。"""
|
|
115
|
+
return self._spool_bytes
|
|
116
|
+
|
|
117
|
+
@property
|
|
118
|
+
def counters(self):
|
|
119
|
+
"""区分PUT尝试、合法ACK和本父确认帧数,不用断管推断写入成功。
|
|
120
|
+
|
|
121
|
+
参数: 无。返回: 新dict,取消时puts_issued仅为许可尝试上界。
|
|
122
|
+
异常: 原小容器分配错误;不向child发送额外控制或写入。
|
|
123
|
+
"""
|
|
124
|
+
return {'puts_issued': self._puts_issued, 'acks_received': self._acks_received,
|
|
125
|
+
'frames_written': self._frames_written}
|
|
126
|
+
|
|
127
|
+
@property
|
|
128
|
+
def metadata(self):
|
|
129
|
+
"""借读同次READY事实,不隐式start。参数: 无。返回: 冻结映射,借用至close。
|
|
130
|
+
异常: ResultClosedError为关闭/失败,RuntimeError为尚无实际READY。
|
|
131
|
+
"""
|
|
132
|
+
self._require_open()
|
|
133
|
+
if self._metadata is None:
|
|
134
|
+
raise RuntimeError('原CAN writer尚未READY')
|
|
135
|
+
return self._metadata
|
|
136
|
+
|
|
137
|
+
def _require_open(self):
|
|
138
|
+
"""阻止关闭或失败后继续许可。参数: 无。返回: None。
|
|
139
|
+
异常: ResultClosedError为不可推进;close仍可重复恢复。
|
|
140
|
+
"""
|
|
141
|
+
if self._closed or self._closing or self._failed:
|
|
142
|
+
raise ResultClosedError('原CAN writer已关闭、清理中或失败')
|
|
143
|
+
|
|
144
|
+
def _reserve_spool(self, amount):
|
|
145
|
+
"""逐笔记录本次直接磁盘预留,回调执行后取消也保留真实归属。
|
|
146
|
+
|
|
147
|
+
参数: amount为非负int bytes。返回: None。异常: 原配额/取消,文件及累计值不倒扣。
|
|
148
|
+
"""
|
|
149
|
+
before = self._budget.spool_bytes
|
|
150
|
+
try:
|
|
151
|
+
self._budget.reserve_spool(amount)
|
|
152
|
+
finally:
|
|
153
|
+
if self._budget.spool_bytes == before + amount:
|
|
154
|
+
self._spool_bytes += amount
|
|
155
|
+
|
|
156
|
+
def _fail(self, exc, phase):
|
|
157
|
+
"""以实际父错误为主收尾,普通底层错误包装并保cause及最高恢复owner。
|
|
158
|
+
|
|
159
|
+
参数: exc为原异常;phase为有限业务位置。返回: 不返回。
|
|
160
|
+
异常: KI/SystemExit/AnalysisError原对象,其余LegacyCANWriteError保原cause;
|
|
161
|
+
两次有限cleanup副错只附note,绝不伪称写出完成。
|
|
162
|
+
"""
|
|
163
|
+
self._failed = True
|
|
164
|
+
failure = exc if isinstance(exc, (KeyboardInterrupt, SystemExit, AnalysisError)) else LegacyCANWriteError(
|
|
165
|
+
'原CAN writer' + phase + '失败')
|
|
166
|
+
_cleanup_owner(self, failure, 'can_process_write_cleanup_owner', '原CAN writer')
|
|
167
|
+
if failure is exc:
|
|
168
|
+
raise failure
|
|
169
|
+
raise failure from exc
|
|
170
|
+
|
|
171
|
+
def start(self):
|
|
172
|
+
"""实际创建独立spawn及原writer,READY不包含任何帧许可。
|
|
173
|
+
|
|
174
|
+
参数: 无。返回: self,重复成功调用不重建或重复预留。
|
|
175
|
+
异常: 路径/依赖/管道/协议/配额/预算或父原取消,最高owner按实际槽可恢复。
|
|
176
|
+
"""
|
|
177
|
+
self._require_open()
|
|
178
|
+
if self._started:
|
|
179
|
+
return self
|
|
180
|
+
try:
|
|
181
|
+
self._check_path()
|
|
182
|
+
# 磁盘容量在spawn/原build_writer前预留,空BLF也保65536而非事后认领。
|
|
183
|
+
self._reserve_spool(65536)
|
|
184
|
+
_reserve_owned_ram(self, 128 * MAX_WIRE_BYTES, '_wire_cost')
|
|
185
|
+
_reserve_owned_ram(self, 65536, '_pipe_cost')
|
|
186
|
+
context = multiprocessing.get_context('spawn')
|
|
187
|
+
self._connection, self._child_connection = context.Pipe(duplex=True)
|
|
188
|
+
_reserve_owned_ram(self, 65536, '_process_cost')
|
|
189
|
+
self._process = context.Process(target=worker_main, args=(self._child_connection,),
|
|
190
|
+
name='chronaxis-legacy-can-export')
|
|
191
|
+
try:
|
|
192
|
+
self._process.start()
|
|
193
|
+
finally:
|
|
194
|
+
self._worker_pid = self._process.pid
|
|
195
|
+
self._close_connection('_child_connection')
|
|
196
|
+
reply = self._exchange({'op': 'init', 'version': 1, 'profile': PROFILE_ID,
|
|
197
|
+
'path': str(self._output_path)})
|
|
198
|
+
self._check_ready(reply)
|
|
199
|
+
_reserve_owned_ram(self, 4096 + 16 * _wire_metadata_bytes(reply), '_metadata_cost')
|
|
200
|
+
self._metadata = _freeze(reply)
|
|
201
|
+
self._pending_reply = None
|
|
202
|
+
self._started = True
|
|
203
|
+
return self
|
|
204
|
+
except BaseException as exc:
|
|
205
|
+
self._fail(exc, '初始化')
|
|
206
|
+
|
|
207
|
+
def _check_ready(self, packet):
|
|
208
|
+
"""核同次实际PID及锁定依赖/vendor,不接受bool伪版本或自称READY。
|
|
209
|
+
|
|
210
|
+
参数: packet为decode_packet得到的dict。返回: None。
|
|
211
|
+
异常: LegacyCANWriteError为结构/类型/profile/PID/版本/摘要不符。
|
|
212
|
+
"""
|
|
213
|
+
if (set(packet) != {'op', 'version', 'profile', 'worker_pid', 'dependency_versions', 'vendor_sha256'}
|
|
214
|
+
or packet.get('op') != 'ready' or type(packet.get('version')) is not int or packet['version'] != 1
|
|
215
|
+
or type(packet.get('profile')) is not str or packet['profile'] != PROFILE_ID
|
|
216
|
+
or type(packet.get('worker_pid')) is not int or packet['worker_pid'] != self._worker_pid
|
|
217
|
+
or packet['dependency_versions'] != {'python': platform.python_version(), **WRITE_DEPENDENCIES}
|
|
218
|
+
or packet['vendor_sha256'] != VENDOR_SHA256):
|
|
219
|
+
raise LegacyCANWriteError('原CAN writer READY身份、版本、实际PID或vendor不符')
|
|
220
|
+
|
|
221
|
+
def _exchange(self, packet):
|
|
222
|
+
"""同步交换唯一控制包,禁止第二个在途PUT或把子退出当成ACK。
|
|
223
|
+
|
|
224
|
+
参数: packet为有界控制dict。返回: 严格JSON dict。
|
|
225
|
+
异常: 父原取消/管道/编码错误或LegacyCANWriteError;远端失败以明确
|
|
226
|
+
RemoteLegacyError事实为cause,不能声称跨进程保留异常对象身份。
|
|
227
|
+
"""
|
|
228
|
+
if self._connection is None or self._waiting:
|
|
229
|
+
raise LegacyCANWriteError('原CAN writer连接不可用或已有在途许可')
|
|
230
|
+
payload = encode_packet(packet)
|
|
231
|
+
self._waiting = True
|
|
232
|
+
self._connection.send_bytes(payload)
|
|
233
|
+
while not self._connection.poll(0.05):
|
|
234
|
+
if self._process is not None and self._process.exitcode is not None:
|
|
235
|
+
raise LegacyCANWriteError('原CAN writer未交付完整回应便退出')
|
|
236
|
+
self._pending_reply = self._connection.recv_bytes(MAX_WIRE_BYTES)
|
|
237
|
+
reply = decode_packet(self._pending_reply)
|
|
238
|
+
self._waiting = False
|
|
239
|
+
if reply.get('op') == 'error':
|
|
240
|
+
facts = reply.get('error')
|
|
241
|
+
if (set(reply) != {'op', 'request_id', 'phase', 'error'}
|
|
242
|
+
or type(reply.get('phase')) is not str
|
|
243
|
+
or reply.get('request_id') is not None and type(reply.get('request_id')) is not int
|
|
244
|
+
or reply.get('request_id') != packet.get('request_id')
|
|
245
|
+
or type(facts) is not dict or set(facts) != {'module', 'type', 'message', 'traceback', 'notes'}
|
|
246
|
+
or any(type(facts[key]) is not str for key in ('module', 'type', 'message', 'traceback'))
|
|
247
|
+
or type(facts['notes']) is not list or any(type(note) is not str for note in facts['notes'])):
|
|
248
|
+
raise LegacyCANWriteError('原CAN writer远端错误包缺少明确事实或请求不符')
|
|
249
|
+
remote = RemoteLegacyError(facts, reply['phase'], reply['request_id'])
|
|
250
|
+
raise LegacyCANWriteError('原CAN writer子进程失败') from remote
|
|
251
|
+
return reply
|
|
252
|
+
|
|
253
|
+
def write(self, frame):
|
|
254
|
+
"""完整发送一个原始帧并等唯一ACK,不缓存后继或按ID筛帧。
|
|
255
|
+
|
|
256
|
+
参数: frame为原生LegacyRawFrame,保全部公开字段及原浮点timestamp。
|
|
257
|
+
返回: None,合法ACK后counters增加;无额外on_message_received。
|
|
258
|
+
异常: TypeError为非原模型;原预算/磁盘/取消或writer/协议失败,之后只能close。
|
|
259
|
+
"""
|
|
260
|
+
self._require_open()
|
|
261
|
+
if type(frame) is not LegacyRawFrame:
|
|
262
|
+
raise TypeError('原CAN writer.write需要LegacyRawFrame')
|
|
263
|
+
if frame.is_rx is None:
|
|
264
|
+
raise ValueError('BLF写出需要收发方向is_rx')
|
|
265
|
+
try:
|
|
266
|
+
self.start()
|
|
267
|
+
# 当前记录、hex和wire容器均在复制前付款;只有本owner持有时才保留该槽。
|
|
268
|
+
_reserve_owned_ram(self, 4259840, '_frame_cost')
|
|
269
|
+
self._frame = frame
|
|
270
|
+
self._reserve_spool(4096)
|
|
271
|
+
request_id = self._frames_written
|
|
272
|
+
self._puts_issued += 1
|
|
273
|
+
reply = self._exchange({'op': 'put', 'request_id': request_id, 'frame': frame_to_dict(frame)})
|
|
274
|
+
if (set(reply) != {'op', 'request_id', 'frame_count'} or reply.get('op') != 'ack'
|
|
275
|
+
or type(reply.get('request_id')) is not int or reply['request_id'] != request_id
|
|
276
|
+
or type(reply.get('frame_count')) is not int or reply['frame_count'] != request_id + 1):
|
|
277
|
+
raise LegacyCANWriteError('原CAN writer ACK不属于本次唯一PUT')
|
|
278
|
+
self._acks_received += 1
|
|
279
|
+
self._frames_written += 1
|
|
280
|
+
self._frame = self._pending_reply = None
|
|
281
|
+
_release_owned_ram(self, self._frame_cost, '_frame_cost')
|
|
282
|
+
except BaseException as exc:
|
|
283
|
+
self._fail(exc, '逐帧写出')
|
|
284
|
+
|
|
285
|
+
def finish(self):
|
|
286
|
+
"""完成原stop、真实正常退出及全部费用,再核实际文件未超过预留。
|
|
287
|
+
|
|
288
|
+
参数: 无。返回: self,成功后重复调用不重发FINISH或重写文件。
|
|
289
|
+
异常: 原取消/预算/关闭错误,或LegacyCANWriteError为不完整回应、异常退出
|
|
290
|
+
或实际stat超本writer累计预留;任何失败都不置finished。
|
|
291
|
+
"""
|
|
292
|
+
if self._finished:
|
|
293
|
+
return self
|
|
294
|
+
self._require_open()
|
|
295
|
+
try:
|
|
296
|
+
self.start()
|
|
297
|
+
reply = self._exchange({'op': 'finish', 'frame_count': self._frames_written})
|
|
298
|
+
if (set(reply) != {'op', 'frame_count'} or reply.get('op') != 'finished'
|
|
299
|
+
or type(reply.get('frame_count')) is not int or reply['frame_count'] != self._frames_written):
|
|
300
|
+
raise LegacyCANWriteError('原CAN writer FINISH未确认全部原帧')
|
|
301
|
+
self._finish_received = True
|
|
302
|
+
self.close()
|
|
303
|
+
if self._exit_code != 0:
|
|
304
|
+
raise LegacyCANWriteError('原CAN writer虽发完成候选但未正常退出')
|
|
305
|
+
self._actual_bytes = self._output_path.stat().st_size
|
|
306
|
+
if self._actual_bytes > self._spool_bytes:
|
|
307
|
+
raise LegacyCANWriteError('原BLF实际大小超过本writer保守磁盘预留')
|
|
308
|
+
self._finished = True
|
|
309
|
+
return self
|
|
310
|
+
except BaseException as exc:
|
|
311
|
+
self._fail(exc, '封口')
|
|
312
|
+
|
|
313
|
+
def _close_connection(self, slot):
|
|
314
|
+
"""实际关闭端点后才撤槽。参数: slot为本owner自有端点名。返回: None。
|
|
315
|
+
异常: 原close/取消;执行后异常也按真实closed确认,不丢未关句柄。
|
|
316
|
+
"""
|
|
317
|
+
connection = getattr(self, slot)
|
|
318
|
+
if connection is not None:
|
|
319
|
+
try:
|
|
320
|
+
connection.close()
|
|
321
|
+
finally:
|
|
322
|
+
if connection.closed:
|
|
323
|
+
setattr(self, slot, None)
|
|
324
|
+
|
|
325
|
+
def _close_process(self):
|
|
326
|
+
"""有限等待自己实际进程退出再关句柄,绝不以终止请求代替退出证明。
|
|
327
|
+
|
|
328
|
+
参数: 无。返回: None。异常: 原join/terminate/kill/close或LegacyCANWriteError;
|
|
329
|
+
未确认时保原进程/费用并附稳定退出诊断。显式join上限为.5/.5/5秒,
|
|
330
|
+
Windows kill仍是TerminateProcess,必须实际exitcode非None。
|
|
331
|
+
"""
|
|
332
|
+
process = self._process
|
|
333
|
+
if process is None:
|
|
334
|
+
return
|
|
335
|
+
if not self._process_stopped:
|
|
336
|
+
if process.pid is not None:
|
|
337
|
+
process.join(timeout=.5)
|
|
338
|
+
if process.exitcode is None:
|
|
339
|
+
process.terminate()
|
|
340
|
+
process.join(timeout=.5)
|
|
341
|
+
if process.exitcode is None:
|
|
342
|
+
process.kill()
|
|
343
|
+
process.join(timeout=5.0)
|
|
344
|
+
code = process.exitcode
|
|
345
|
+
if code is None:
|
|
346
|
+
failure = LegacyCANWriteError('尚未确认原CAN writer子进程退出')
|
|
347
|
+
failure.can_process_write_exit_state = {'pid': self._worker_pid, 'exit_code': None,
|
|
348
|
+
'join_wait_limits_seconds': (.5, .5, 5.0)}
|
|
349
|
+
raise failure
|
|
350
|
+
self._exit_code = code
|
|
351
|
+
self._process_stopped = True
|
|
352
|
+
# stopped先存,再实际close;close之后取消也不会再次读取已关闭Process属性。
|
|
353
|
+
process.close()
|
|
354
|
+
self._process = None
|
|
355
|
+
|
|
356
|
+
def close(self):
|
|
357
|
+
"""只关本writer实际IPC/进程和费用,产物与累计磁盘预留保留。
|
|
358
|
+
|
|
359
|
+
参数: 无。返回: None,完成后重复调用幂等。
|
|
360
|
+
异常: 原关闭/预算/取消附can_process_write_cleanup_owner,当前槽供持续恢复;
|
|
361
|
+
提前关闭不发送额外帧或FINISH,不设置finished,不修改借用预算的其他费用。
|
|
362
|
+
"""
|
|
363
|
+
if self._closed:
|
|
364
|
+
return
|
|
365
|
+
self._closing = True
|
|
366
|
+
try:
|
|
367
|
+
self._close_connection('_child_connection')
|
|
368
|
+
self._close_connection('_connection')
|
|
369
|
+
self._close_process()
|
|
370
|
+
self._metadata = self._frame = self._pending_reply = None
|
|
371
|
+
self._waiting = False
|
|
372
|
+
for slot in ('_frame_cost', '_metadata_cost', '_wire_cost', '_pipe_cost', '_process_cost', '_fixed_cost'):
|
|
373
|
+
_release_owned_ram(self, getattr(self, slot), slot)
|
|
374
|
+
self._closed = True
|
|
375
|
+
except BaseException as exc:
|
|
376
|
+
self._failed = True
|
|
377
|
+
exc.can_process_write_cleanup_owner = self
|
|
378
|
+
raise
|