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,143 @@
|
|
|
1
|
+
"""按需计算每段事件的持续时长,只为周期模式保存必要驱动时间。
|
|
2
|
+
|
|
3
|
+
实际模式直接使用事件范围。固定/DBC需要知道事件两端落在哪对报文中,因而
|
|
4
|
+
保存每条所选驱动的一个整数时间;按索引二分定位,只回读相关记录对。该文件
|
|
5
|
+
没有数值、原帧或另一时间轴,未请求此类统计时不建立;关闭自动删除。
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import heapq
|
|
9
|
+
from ..core.models import Interval
|
|
10
|
+
from ..core.calculations import CalculationDefinition
|
|
11
|
+
from ..core.numeric import ScalarValue
|
|
12
|
+
from ..core.types import SignalDType as D,QualityFlag as Q
|
|
13
|
+
from ..results.errors import ResultClosedError
|
|
14
|
+
from ..results.spool import _reserve_owned_ram,_release_owned_ram,_cleanup_owner
|
|
15
|
+
from .record_time_calculation import RecordTimeCalculation
|
|
16
|
+
from .history import _metadata_bytes
|
|
17
|
+
from ..planning.record_execution import is_event_duration
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class RecordEventDurations:
|
|
21
|
+
"""拥有必要时点文件、尚缺右端的事件及一个短生命周期数值查询。"""
|
|
22
|
+
|
|
23
|
+
def __init__(self,plan,budget,work_dir,steps,consumer,*,indexes=None):
|
|
24
|
+
"""预付有限索引状态,不为actual创建文件。参数: 计划/预算/目录/周期/回调;indexes借用共享必要时点,不在此重复保存。返回: owner。异常: 原构造错误。"""
|
|
25
|
+
self._plan,self._budget,self._path,self._steps,self._consumer=plan,budget,work_dir,steps,consumer
|
|
26
|
+
self._requests=tuple(item for item in plan.calculations if is_event_duration(item))
|
|
27
|
+
self._choices=dict(plan.intervals.resolved)
|
|
28
|
+
self._held_cost=self._fixed_cost=self._pending_cost=0
|
|
29
|
+
self._indexes=indexes
|
|
30
|
+
self._queue=[]
|
|
31
|
+
self._serial=0
|
|
32
|
+
self._calculation=None
|
|
33
|
+
self._closed=self._failed=False
|
|
34
|
+
try:
|
|
35
|
+
_reserve_owned_ram(self,131072+32768*len(self._requests)+32*_metadata_bytes(self._requests),'_fixed_cost')
|
|
36
|
+
except BaseException as error:
|
|
37
|
+
_cleanup_owner(self,error,'record_event_duration_cleanup_owner','事件时长构造')
|
|
38
|
+
raise
|
|
39
|
+
|
|
40
|
+
def _open(self):
|
|
41
|
+
"""拒绝关闭/失败实例。参数: 无。返回: None。异常: ResultClosedError。"""
|
|
42
|
+
if self._closed or self._failed:
|
|
43
|
+
raise ResultClosedError('事件时长已关闭或失败')
|
|
44
|
+
|
|
45
|
+
def observe_group(self,group):
|
|
46
|
+
"""父已更新共享时点索引,尝试完成等待中的事件。参数: 完整组。返回: None。异常: 查询原错。"""
|
|
47
|
+
self._open()
|
|
48
|
+
self._flush_ready()
|
|
49
|
+
|
|
50
|
+
def observe_event(self,event):
|
|
51
|
+
"""只为匹配事件建立必要查询,缺右端时暂存端点和ID。参数: 事件。返回: None。异常: 预算/求值原错。"""
|
|
52
|
+
self._open()
|
|
53
|
+
for request in self._requests:
|
|
54
|
+
if request.scope!='event:'+event.rule.rule_id:
|
|
55
|
+
continue
|
|
56
|
+
end=event.start_ns if event.end_ns is None else event.end_ns
|
|
57
|
+
# 快捷时长与一般事件计算使用同一选择范围;确认等于结束时保留空区间。
|
|
58
|
+
rule=next(item for item in self._plan.rules if item.rule_id==event.rule.rule_id)
|
|
59
|
+
start=event.confirmed_ns if rule.selection_origin=='confirmed' else event.start_ns
|
|
60
|
+
cost=8192+16*_metadata_bytes(event.event_id)
|
|
61
|
+
_reserve_owned_ram(self,cost,'_pending_cost')
|
|
62
|
+
heapq.heappush(self._queue,(end,self._serial,request,event.event_id,start,cost))
|
|
63
|
+
self._serial+=1
|
|
64
|
+
self._flush_ready()
|
|
65
|
+
|
|
66
|
+
def _calculate(self,request,event_id,start_ns,end_ns):
|
|
67
|
+
"""只借取事件两侧及区间内的驱动点,复用原两后端时长核。
|
|
68
|
+
|
|
69
|
+
参数: 请求/父ID/真实端点。返回: None,结果交回调。异常: 构造/数值/发布原错。
|
|
70
|
+
"""
|
|
71
|
+
step=self._steps[request.calculation_id]
|
|
72
|
+
spec=CalculationDefinition(request.calculation_id,'duration',Interval(start_ns,end_ns),request.partial_policy,
|
|
73
|
+
request.unit,'event',request.minimum_coverage)
|
|
74
|
+
try:
|
|
75
|
+
self._calculation=RecordTimeCalculation(self._budget,spec,'1',D.BOOL,step,
|
|
76
|
+
backend=self._plan.execution.backend,batch_intervals=64)
|
|
77
|
+
except BaseException as error:
|
|
78
|
+
self._calculation=getattr(error,'record_time_cleanup_owner',None)
|
|
79
|
+
raise
|
|
80
|
+
value=ScalarValue(True,D.BOOL,True,Q.NONE)
|
|
81
|
+
if step is None:
|
|
82
|
+
if start_ns<end_ns:
|
|
83
|
+
self._calculation.consume(((start_ns,value),(end_ns,value)))
|
|
84
|
+
else:
|
|
85
|
+
driver=self._choices[request.calculation_id].driver
|
|
86
|
+
count=self._indexes.count(driver)
|
|
87
|
+
if count:
|
|
88
|
+
first=self._indexes.lower(driver,start_ns)
|
|
89
|
+
if first==count or first>0 and self._indexes.at(driver,first)>start_ns:
|
|
90
|
+
first-=1
|
|
91
|
+
last=min(count-1,self._indexes.lower(driver,end_ns))
|
|
92
|
+
for index in range(first,last+1):
|
|
93
|
+
self._calculation.consume(((self._indexes.at(driver,index),value),))
|
|
94
|
+
result=self._calculation.finish()
|
|
95
|
+
self._consumer(request,event_id,result)
|
|
96
|
+
self._calculation.close();self._calculation=None
|
|
97
|
+
|
|
98
|
+
def _flush_ready(self,final=False):
|
|
99
|
+
"""保留仍缺右端的请求,其余按必要范围计算;EOF不补记录。
|
|
100
|
+
|
|
101
|
+
参数: final只在真实来源EOF后使用。返回: None。异常: 原查询错,费用留到close。
|
|
102
|
+
"""
|
|
103
|
+
pending=[]
|
|
104
|
+
try:
|
|
105
|
+
while self._queue:
|
|
106
|
+
item=heapq.heappop(self._queue)
|
|
107
|
+
end,serial,request,event_id,start,cost=item
|
|
108
|
+
driver=self._choices[request.calculation_id].driver
|
|
109
|
+
last=None if self._indexes is None or driver is None else self._indexes.last(driver)
|
|
110
|
+
if not final and self._steps[request.calculation_id] is not None and (last is None or last<end):
|
|
111
|
+
pending.append(item)
|
|
112
|
+
continue
|
|
113
|
+
self._calculate(request,event_id,start,end)
|
|
114
|
+
item=None
|
|
115
|
+
_release_owned_ram(self,cost,'_pending_cost')
|
|
116
|
+
except BaseException:
|
|
117
|
+
self._failed=True
|
|
118
|
+
raise
|
|
119
|
+
finally:
|
|
120
|
+
for item in pending:
|
|
121
|
+
heapq.heappush(self._queue,item)
|
|
122
|
+
|
|
123
|
+
def finish(self):
|
|
124
|
+
"""真实EOF后结算未完成范围,不假造周期尾段。参数: 无。返回: None。异常: 原计算错。"""
|
|
125
|
+
self._open()
|
|
126
|
+
self._flush_ready(final=True)
|
|
127
|
+
|
|
128
|
+
@property
|
|
129
|
+
def closed(self):
|
|
130
|
+
"""返回关闭状态。参数: 无。返回: bool。异常: 无。"""
|
|
131
|
+
return self._closed
|
|
132
|
+
|
|
133
|
+
def close(self):
|
|
134
|
+
"""只关闭自己的临时文件,成功后才撤销责任。参数: 无。返回: None。异常: 原关闭错可重试。"""
|
|
135
|
+
if self._closed:
|
|
136
|
+
return
|
|
137
|
+
if self._calculation is not None:
|
|
138
|
+
self._calculation.close();self._calculation=None
|
|
139
|
+
self._queue.clear()
|
|
140
|
+
self._plan=self._requests=self._consumer=self._choices=None
|
|
141
|
+
_release_owned_ram(self,self._pending_cost,'_pending_cost')
|
|
142
|
+
_release_owned_ram(self,self._fixed_cost,'_fixed_cost')
|
|
143
|
+
self._closed=True
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"""只在片段信号导出需要回看时保存所选样本;每行一个值和一个实际时间。
|
|
2
|
+
|
|
3
|
+
别名、来源、单位和枚举标签留在有限声明中,行内用序号引用。
|
|
4
|
+
定长数据按实际时间二分,不构造原文、输入指纹或逐条来源JSON。
|
|
5
|
+
"""
|
|
6
|
+
from struct import Struct
|
|
7
|
+
from tempfile import TemporaryFile
|
|
8
|
+
from ..core.models import SourceRef
|
|
9
|
+
from ..core.numeric import ScalarValue
|
|
10
|
+
from ..core.types import SignalDType as D,QualityFlag as Q
|
|
11
|
+
from ..results.budget import _reserve_owned_ram,_release_owned_ram,_cleanup_owner
|
|
12
|
+
from ..results.errors import ResultClosedError
|
|
13
|
+
from .history import _metadata_bytes
|
|
14
|
+
from .record_sample import RecordSample
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class RecordExportSamples:
|
|
18
|
+
"""拥有一个惰性定长临时文件;范围查询期间只恢复一条所需样本。"""
|
|
19
|
+
def __init__(self,budget,path,definitions,session):
|
|
20
|
+
"""只保有限定义和文件槽。参数: 预算/私有目录/所选定义/会话。返回: owner。异常: 原构造错。"""
|
|
21
|
+
self._budget,self._path=budget,path
|
|
22
|
+
self._held_cost=self._fixed_cost=0
|
|
23
|
+
self._file=None;self._count=0;self._last=None
|
|
24
|
+
self._closed=self._failed=False
|
|
25
|
+
self._definitions=self._names=self._refs=self._codes=self._labels=None
|
|
26
|
+
try:
|
|
27
|
+
_reserve_owned_ram(self,65536+32*_metadata_bytes(definitions),'_fixed_cost')
|
|
28
|
+
self._definitions=definitions
|
|
29
|
+
self._names={d.name:i for i,d in enumerate(definitions)}
|
|
30
|
+
self._refs=tuple(SourceRef(session,d.source,d.field) for d in definitions)
|
|
31
|
+
self._codes=tuple(Struct('>'+{D.FLOAT64:'d',D.INT64:'q',D.UINT64:'Q',D.BOOL:'q',D.ENUM:'q'}[d.dtype]) for d in definitions)
|
|
32
|
+
self._labels=tuple(tuple(dict.fromkeys(label for _,label in d.choices)) if d.dtype is D.ENUM else () for d in definitions)
|
|
33
|
+
self._codec=Struct('>IqQ8sI')
|
|
34
|
+
except BaseException as error:
|
|
35
|
+
_cleanup_owner(self,error,'record_export_samples_cleanup_owner','片段导出样本');raise
|
|
36
|
+
|
|
37
|
+
def append(self,sample):
|
|
38
|
+
"""保存一次所选真实更新,保同刻原序号。参数: HistorySample。返回: None。异常: 顺序/预算/短写。"""
|
|
39
|
+
if self._closed or self._failed:raise ResultClosedError('导出样本已关闭或失败')
|
|
40
|
+
try:
|
|
41
|
+
if self._last is not None and sample.time_ns<self._last:raise ValueError('导出样本时间回退')
|
|
42
|
+
index=self._names[sample.name]
|
|
43
|
+
value=sample.array_value if sample.value.valid else 0
|
|
44
|
+
if self._definitions[index].dtype is D.BOOL:value=int(value)
|
|
45
|
+
data=self._codec.pack(index,sample.time_ns,sample.sequence,self._codes[index].pack(value),int(sample.value.quality))
|
|
46
|
+
self._budget.reserve_spool(len(data))
|
|
47
|
+
if self._file is None:self._file=TemporaryFile(mode='w+b',dir=self._path,prefix='export-samples-')
|
|
48
|
+
self._file.seek(0,2)
|
|
49
|
+
if self._file.write(data)!=len(data):raise OSError('导出样本短写')
|
|
50
|
+
self._count+=1;self._last=sample.time_ns
|
|
51
|
+
except BaseException:
|
|
52
|
+
self._failed=True;raise
|
|
53
|
+
|
|
54
|
+
def _fields(self,index):
|
|
55
|
+
"""只按已登记位置读取一条。参数: 行号。返回: 解包字段。异常: 越界/短读。"""
|
|
56
|
+
if self._closed or self._failed:raise ResultClosedError('导出样本已关闭或失败')
|
|
57
|
+
if not 0<=index<self._count:raise IndexError('导出样本行号越界')
|
|
58
|
+
self._file.seek(index*self._codec.size)
|
|
59
|
+
payload=self._file.read(self._codec.size)
|
|
60
|
+
if len(payload)!=self._codec.size:raise ValueError('导出样本短读')
|
|
61
|
+
return self._codec.unpack(payload)
|
|
62
|
+
|
|
63
|
+
def _lower(self,time_ns):
|
|
64
|
+
"""二分首个不早于time_ns的行。参数: 实际时间。返回: 索引。异常: 原读取错。"""
|
|
65
|
+
lo,hi=0,self._count
|
|
66
|
+
while lo<hi:
|
|
67
|
+
mid=(lo+hi)//2
|
|
68
|
+
if self._fields(mid)[1]<time_ns:lo=mid+1
|
|
69
|
+
else:hi=mid
|
|
70
|
+
return lo
|
|
71
|
+
|
|
72
|
+
def rows(self,interval):
|
|
73
|
+
"""只回读半开片段内所选样本,不全量核验或扫描。参数: Interval。返回: 迭代器。异常: 原读取/模型错。"""
|
|
74
|
+
for row in range(self._lower(interval.start_ns),self._lower(interval.end_ns)):
|
|
75
|
+
index,time,sequence,payload,quality=self._fields(row)
|
|
76
|
+
definition=self._definitions[index];dtype=definition.dtype
|
|
77
|
+
physical=self._codes[index].unpack(payload)[0]
|
|
78
|
+
if dtype is D.BOOL:physical=bool(physical)
|
|
79
|
+
value=self._labels[index][physical] if dtype is D.ENUM and quality==0 else physical
|
|
80
|
+
scalar=ScalarValue(value if quality==0 else None,dtype,quality==0,Q(quality),self._labels[index])
|
|
81
|
+
yield RecordSample(definition.name,time,sequence,scalar,definition.unit,self._refs[index],
|
|
82
|
+
physical if definition.dtype is D.ENUM else None)
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def closed(self):
|
|
86
|
+
"""返回实际资源状态。参数: 无。返回: bool。异常: 无。"""
|
|
87
|
+
return self._closed
|
|
88
|
+
|
|
89
|
+
def close(self):
|
|
90
|
+
"""关闭自有临时文件并释放定义;不碰原输入。参数: 无。返回: None。异常: 原关闭错,可重试。"""
|
|
91
|
+
if self._closed:return
|
|
92
|
+
if self._file is not None:self._file.close();self._file=None
|
|
93
|
+
self._definitions=self._names=self._refs=self._codes=self._labels=None
|
|
94
|
+
_release_owned_ram(self,self._fixed_cost,'_fixed_cost');self._closed=True
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"""只为显式导出接同次读取的帧或样本;复用既有writer和结果发布。
|
|
2
|
+
|
|
3
|
+
会话范围在真实EOF后确定;片段由窗口消费者直接交付,不复制片段表。
|
|
4
|
+
不再次读原日志或解码,默认精简导出不产生逐帧旁表。
|
|
5
|
+
"""
|
|
6
|
+
from ..core.models import Interval
|
|
7
|
+
from .record_signal_export import RecordSignalExport
|
|
8
|
+
from .legacy_frame_samples import LegacyFrameSamples
|
|
9
|
+
from ..results.frame_rebuild import FrameRebuildRead
|
|
10
|
+
from ..results.artifact_exports import ArtifactExportStore
|
|
11
|
+
from ..results.frame_exports import export_can_frames
|
|
12
|
+
from ..results.errors import ResultClosedError
|
|
13
|
+
from ..results.budget import _reserve_owned_ram,_release_owned_ram,_cleanup_owner
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class RecordExports:
|
|
17
|
+
"""拥有导出索引、在线信号写出与当前帧游标;原帧仓由来源游标所有。"""
|
|
18
|
+
def __init__(self,plan,budget,path,cursors):
|
|
19
|
+
"""建立仅显式请求的索引。参数: 计划/预算/新路径/借用来源。返回: owner。异常: 原构造错。"""
|
|
20
|
+
self._plan,self._budget,self._cursors=plan,budget,cursors
|
|
21
|
+
self._held_cost=self._fixed_cost=0
|
|
22
|
+
self._exports=self._reader=self._export_owner=self._signal=self._rebuild=None
|
|
23
|
+
self._closed=self._failed=self._finished=False
|
|
24
|
+
self._option=plan.outputs.can_frames
|
|
25
|
+
try:
|
|
26
|
+
_reserve_owned_ram(self,65536,'_fixed_cost')
|
|
27
|
+
self._require_clock()
|
|
28
|
+
try:
|
|
29
|
+
self._exports=ArtifactExportStore(budget,path,plan.dataset.session_id,plan.metadata.get('device_label','pending'),integrity=plan.diagnostics.integrity)
|
|
30
|
+
except BaseException as error:
|
|
31
|
+
self._exports=getattr(error,'artifact_export_store_cleanup_owner',None);raise
|
|
32
|
+
if plan.outputs.signal_csv is not None:
|
|
33
|
+
try:
|
|
34
|
+
self._signal=RecordSignalExport(plan,budget,cursors,self._exports,path)
|
|
35
|
+
except BaseException as error:
|
|
36
|
+
self._signal=getattr(error,'record_signal_export_cleanup_owner',None);raise
|
|
37
|
+
except BaseException as error:
|
|
38
|
+
_cleanup_owner(self,error,'record_exports_cleanup_owner','记录流原帧导出');raise
|
|
39
|
+
|
|
40
|
+
def _require_clock(self):
|
|
41
|
+
"""多来源片段须有可比时钟;单来源不强求映射。参数: 无。返回: None。异常: 缺同步依据。"""
|
|
42
|
+
plan=self._plan
|
|
43
|
+
options=[]
|
|
44
|
+
if self._option is not None:
|
|
45
|
+
options.append((self._option,{self._option.source}))
|
|
46
|
+
if plan.outputs.signal_csv is not None:
|
|
47
|
+
option=plan.outputs.signal_csv
|
|
48
|
+
options.append((option,{plan.bindings.resolve(n).source for n in option.spec.signals}))
|
|
49
|
+
for option,sources in options:
|
|
50
|
+
if option.scope!='segments':continue
|
|
51
|
+
for window in (w for w in plan.windows if option.window is None or w.window_id==option.window):
|
|
52
|
+
checked_sources=set(sources)
|
|
53
|
+
rule=next(r for r in plan.rules if r.rule_id==window.event)
|
|
54
|
+
names=set(rule.dependencies)
|
|
55
|
+
choice=dict(plan.intervals.resolved)[window.window_id]
|
|
56
|
+
if choice.driver:names.add(choice.driver)
|
|
57
|
+
checked_sources.update(plan.bindings.resolve(n).source for n in names)
|
|
58
|
+
if not names:checked_sources.update(s.name for s in plan.sources)
|
|
59
|
+
evidenced={item.source for item in plan.bindings.synchronization}
|
|
60
|
+
keys=set()
|
|
61
|
+
for source in plan.bindings.sources:
|
|
62
|
+
if source.name not in checked_sources:continue
|
|
63
|
+
clock=source.timebase
|
|
64
|
+
if source.name in evidenced or clock==plan.dataset.timebase or clock.time_type.value=='absolute' and plan.dataset.timebase.time_type.value=='absolute':
|
|
65
|
+
keys.add(('dataset',))
|
|
66
|
+
else:
|
|
67
|
+
keys.add(('utc',) if clock.time_type.value=='absolute' else ('relative',clock.timebase_id,clock.origin))
|
|
68
|
+
if len(keys)>1:raise ValueError('导出与片段缺少共同时间基准')
|
|
69
|
+
|
|
70
|
+
def _export(self,actual,segment_id=None):
|
|
71
|
+
"""借同次封口原帧写一份所需输出。参数: 实际范围/父片段。返回: None。异常: 原消费/发布错。"""
|
|
72
|
+
option=self._option
|
|
73
|
+
cursor=next(c for c in self._cursors if c.source_name==option.source)
|
|
74
|
+
store=cursor._raw_store
|
|
75
|
+
if store is None or store.closed or store.state!='sealed':
|
|
76
|
+
raise ValueError('原帧导出缺少同次封口输入')
|
|
77
|
+
interval=actual or Interval(self._plan.dataset.domain.start_ns,self._plan.dataset.domain.start_ns)
|
|
78
|
+
try:
|
|
79
|
+
if option.resampling is None:
|
|
80
|
+
self._reader=store.iter_frames()
|
|
81
|
+
else:
|
|
82
|
+
context=cursor._dbc_context
|
|
83
|
+
if context is None:raise ValueError('报文重采样缺同次编码定义')
|
|
84
|
+
if cursor.source_kind=='can_blf':
|
|
85
|
+
source=next(s for s in self._plan.sources if s.name==option.source)
|
|
86
|
+
try:
|
|
87
|
+
self._reader=LegacyFrameSamples(store,cursor._message_store,context,self._budget,
|
|
88
|
+
read_identity=cursor._read_identity,session_id=self._plan.dataset.session_id,channel=source.config.channel,trace=False)
|
|
89
|
+
except BaseException as error:
|
|
90
|
+
self._reader=getattr(error,'legacy_frame_samples_cleanup_owner',None);raise
|
|
91
|
+
else:
|
|
92
|
+
self._reader=store.iter_samples()
|
|
93
|
+
try:
|
|
94
|
+
self._rebuild=FrameRebuildRead(self._reader,option.resampling,interval,context.pairs(),self._budget,
|
|
95
|
+
self._exports.path/f'rebuild-{self._exports.count:08d}',backend=self._plan.execution.backend,
|
|
96
|
+
periods=context.periods,integrity=self._plan.diagnostics.integrity,trace=False)
|
|
97
|
+
except BaseException as error:
|
|
98
|
+
self._rebuild=getattr(error,'frame_rebuild_cleanup_owner',None);raise
|
|
99
|
+
self._reader=None
|
|
100
|
+
files=[]
|
|
101
|
+
export_can_frames(self._rebuild or self._reader,option.spec,interval,self._exports.next_path(),self._budget,
|
|
102
|
+
source=option.source,device_label=self._plan.metadata.get('device_label','pending'),compact=True,
|
|
103
|
+
integrity=self._plan.diagnostics.integrity,file_consumer=files.extend)
|
|
104
|
+
if self._rebuild is not None:self._rebuild.close();self._rebuild=None
|
|
105
|
+
if self._reader is not None:self._reader.close();self._reader=None
|
|
106
|
+
self._exports.append('can_frames',option.scope,actual,segment_id=segment_id,completed_files=files)
|
|
107
|
+
except BaseException as error:
|
|
108
|
+
self._export_owner=getattr(error,'export_cleanup_owner',None)
|
|
109
|
+
self._failed=True;error.record_exports_cleanup_owner=self;raise
|
|
110
|
+
|
|
111
|
+
def session(self):
|
|
112
|
+
"""EOF后裁实际会话范围,空输入保持空输出。参数: 无。返回: None。异常: 原导出错。"""
|
|
113
|
+
if self._signal is not None:self._signal.finish()
|
|
114
|
+
if self._option is None or self._option.scope!='session': return
|
|
115
|
+
cursor=next(c for c in self._cursors if c.source_name==self._option.source)
|
|
116
|
+
actual=None
|
|
117
|
+
if cursor.observed_start is not None and cursor.observed_end is not None:
|
|
118
|
+
domain=self._plan.dataset.domain
|
|
119
|
+
start,end=max(domain.start_ns,cursor.observed_start),min(domain.end_ns,cursor.observed_end)
|
|
120
|
+
if start<=end: actual=Interval(start,end)
|
|
121
|
+
self._export(actual)
|
|
122
|
+
|
|
123
|
+
def segment(self,segment):
|
|
124
|
+
"""直接接最终片段,不保存第二份片段历史。参数: CompactSegment。返回: None。异常: 原导出错。"""
|
|
125
|
+
if self._signal is not None:self._signal.segment(segment)
|
|
126
|
+
if self._option is not None and self._option.scope=='segments' and (self._option.window is None or segment.window_id==self._option.window):
|
|
127
|
+
self._export(segment.actual,segment.segment_id)
|
|
128
|
+
|
|
129
|
+
def seal(self):
|
|
130
|
+
"""全部请求完成后封索引。参数: 无。返回: None。异常: 原封口错。"""
|
|
131
|
+
self._exports.seal();self._finished=True
|
|
132
|
+
|
|
133
|
+
def take_exports(self,receiver):
|
|
134
|
+
"""唯一移交已完成结果;失败前责任仍可达。参数: 同预算父owner。返回: None。异常: 状态错。"""
|
|
135
|
+
if not self._finished or self._closed or receiver._budget is not self._budget or receiver._artifact_exports is not None:
|
|
136
|
+
raise ResultClosedError('原帧输出尚不可移交')
|
|
137
|
+
owner=self._exports
|
|
138
|
+
try:
|
|
139
|
+
receiver._artifact_exports=owner
|
|
140
|
+
finally:
|
|
141
|
+
if receiver._artifact_exports is owner: self._exports=None
|
|
142
|
+
|
|
143
|
+
@property
|
|
144
|
+
def closed(self):
|
|
145
|
+
"""返回实际关闭状态。参数: 无。返回: bool。异常: 无。"""
|
|
146
|
+
return self._closed
|
|
147
|
+
|
|
148
|
+
def close(self):
|
|
149
|
+
"""先关当前输出及索引,再释放自有状态;不关闭借用原帧。参数: 无。返回: None。异常: 原关闭错。"""
|
|
150
|
+
if self._closed:return
|
|
151
|
+
for slot in ('_signal','_export_owner','_rebuild','_reader','_exports'):
|
|
152
|
+
owner=getattr(self,slot)
|
|
153
|
+
if owner is not None: owner.close();setattr(self,slot,None)
|
|
154
|
+
self._plan=self._cursors=self._option=None
|
|
155
|
+
_release_owned_ram(self,self._fixed_cost,'_fixed_cost');self._closed=True
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"""在有限内存内累计已求值的驱动记录对,保留实际端点直到比例裁剪完成。
|
|
2
|
+
|
|
3
|
+
输入为已归一化并按驱动同刻政策归组的(time_ns, ScalarValue[, valid_until_ns])有限批;输出仅含
|
|
4
|
+
积分值、单位、完成状态和质量的内部结果。复用原两后端面积及原序误差求和,
|
|
5
|
+
一次只持当前批和一条跨批前值,不创建历史文件、原帧副本、贡献或未知范围列表。
|
|
6
|
+
调用方负责绑定/表达式/有效期判定,并在输入确实结束后调用finish;本组件不
|
|
7
|
+
读取文件或证明来源EOF。实际间隔使用必要更新间的真实差,固定/DBC使用
|
|
8
|
+
所选驱动记录对;有效期都按实际截止裁剪,没有完整记录对时不虚构尾段。
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from dataclasses import dataclass
|
|
12
|
+
|
|
13
|
+
from ..core.integral_sum import require_partial_limit
|
|
14
|
+
from ..core.integral_sum_reference import ReferenceIntegralSum
|
|
15
|
+
from ..core.integral_sum_numpy import NumpyIntegralSum
|
|
16
|
+
from ..core.integral_terms_reference import compute_integral_terms_reference
|
|
17
|
+
from ..core.integral_terms_numpy import compute_integral_terms_numpy
|
|
18
|
+
from ..core.conditional_integral_terms_reference import compute_conditional_integral_terms_reference
|
|
19
|
+
from ..core.conditional_integral_terms_numpy import compute_conditional_integral_terms_numpy
|
|
20
|
+
from ..core.calculations import CalculationDefinition, CalculationSeries, calculation_unit, classify_calculation_value
|
|
21
|
+
from ..core.calculations import classify_coverage
|
|
22
|
+
from ..core.models import Interval
|
|
23
|
+
from ..core.numeric import ScalarValue
|
|
24
|
+
from ..core.record_intervals import require_record_step
|
|
25
|
+
from ..core.types import SignalDType as D, QualityFlag as Q
|
|
26
|
+
from ..results.budget import ResourceBudget, _reserve_owned_ram, _release_owned_ram, _cleanup_owner
|
|
27
|
+
from ..results.errors import ResultClosedError
|
|
28
|
+
from .record_point_buffer import RecordPointBuffer
|
|
29
|
+
from .history import _metadata_bytes
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@dataclass(frozen=True)
|
|
33
|
+
class RecordIntegralResult:
|
|
34
|
+
"""内部积分结果,不附逐条输入、时间对照或默认贡献记录;不充当公开发布清单。"""
|
|
35
|
+
|
|
36
|
+
value: float | None # 已换到请求单位;未知与有效零分开。
|
|
37
|
+
unit: str # 输出单位,仅最终转换一次。
|
|
38
|
+
status: str # 沿既有complete/partial/indeterminate政策。
|
|
39
|
+
reason: str # 正常、观测不足或数值失败等必要原因。
|
|
40
|
+
quality: Q # 输入和数值计算质量,不包含逐条副本。
|
|
41
|
+
coverage_status: str | None = None
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class RecordIntegral(RecordPointBuffer):
|
|
45
|
+
"""拥有有限驱动点缓冲和累计状态;失败后只能关闭,完成后只读结果。
|
|
46
|
+
|
|
47
|
+
consume借用外部有限批;留下的点只含整数时间和冻结数值,费用归本实例。
|
|
48
|
+
同刻冲突须由上游既有同刻政策解决,不能在此任意覆盖或累计零跨度记录。
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
def __init__(self, budget, spec, input_unit, dtype, step_ns, *, backend='numpy',
|
|
52
|
+
batch_intervals=64, partial_limit=4096, conditioned=False):
|
|
53
|
+
"""预付有界状态及点缓冲,数值临时数组在每次归约前另预约。
|
|
54
|
+
|
|
55
|
+
参数: budget共享账本,spec为integral请求;input_unit/dtype为已
|
|
56
|
+
求值列单位/类型;step_ns为None(实际差)或固定/已核实DBC正周期;后端独立选择;
|
|
57
|
+
batch_intervals为1—4096区间数,partial_limit为误差项容量;conditioned指定显式BOOL条件。
|
|
58
|
+
返回: 新owner。异常: 配置/预算/取消错误;构造清理失败通过异常的
|
|
59
|
+
record_integral_cleanup_owner提供重试入口。
|
|
60
|
+
"""
|
|
61
|
+
if not isinstance(budget, ResourceBudget) or not isinstance(spec, CalculationDefinition):
|
|
62
|
+
raise TypeError('记录流积分需要共享预算和CalculationDefinition')
|
|
63
|
+
if spec.operation != 'integral':
|
|
64
|
+
raise ValueError('记录流积分需要integral')
|
|
65
|
+
if backend not in ('reference', 'numpy') or dtype not in (D.INT64, D.UINT64, D.FLOAT64):
|
|
66
|
+
raise ValueError('记录流积分需要明确后端和数值dtype')
|
|
67
|
+
if type(batch_intervals) is not int or not 1 <= batch_intervals <= 4096:
|
|
68
|
+
raise ValueError('记录流区间批上限需要1到4096')
|
|
69
|
+
if type(conditioned) is not bool:
|
|
70
|
+
raise TypeError('条件选择需要bool')
|
|
71
|
+
require_record_step(step_ns, ())
|
|
72
|
+
limit = require_partial_limit(partial_limit)
|
|
73
|
+
self._unit, self._factor = calculation_unit(spec, input_unit)
|
|
74
|
+
self._budget, self._spec, self._input_unit, self._dtype = budget, spec, input_unit, dtype
|
|
75
|
+
self._step_ns, self._limit = step_ns, batch_intervals
|
|
76
|
+
self._conditioned = conditioned
|
|
77
|
+
self._held_cost = self._fixed_cost = self._workspace_cost = 0
|
|
78
|
+
self._closed = self._closing = self._failed = self._finished = False
|
|
79
|
+
self._rows = self._sum = self._result = None
|
|
80
|
+
self._last_time = None
|
|
81
|
+
self._covered_ns = 0
|
|
82
|
+
self._known_ns = self._selected_ns = self._selected_unknown_ns = self._false_ns = 0
|
|
83
|
+
self._quality = Q.NONE
|
|
84
|
+
self._coverage_value_ns=0 if spec.minimum_coverage>0 else None
|
|
85
|
+
try:
|
|
86
|
+
# 固定费覆盖误差求和的有限候选及点缓冲,不按总记录数扩大。
|
|
87
|
+
_reserve_owned_ram(self, 65536 + limit * 256 + (batch_intervals + 1) * 1024
|
|
88
|
+
+ 16 * _metadata_bytes((spec, input_unit)), '_fixed_cost')
|
|
89
|
+
self._rows = []
|
|
90
|
+
self._sum = (ReferenceIntegralSum if backend == 'reference' else NumpyIntegralSum)(limit)
|
|
91
|
+
self._compute = compute_integral_terms_reference if backend == 'reference' else compute_integral_terms_numpy
|
|
92
|
+
if conditioned:
|
|
93
|
+
self._compute = (compute_conditional_integral_terms_reference if backend == 'reference'
|
|
94
|
+
else compute_conditional_integral_terms_numpy)
|
|
95
|
+
except BaseException as exc:
|
|
96
|
+
_cleanup_owner(self, exc, 'record_integral_cleanup_owner', '记录流积分')
|
|
97
|
+
raise
|
|
98
|
+
|
|
99
|
+
def _flush(self):
|
|
100
|
+
"""消费当前完整记录对并留下一个共享端点,首条/末条不凭空增加周期。
|
|
101
|
+
|
|
102
|
+
参数: 无,使用当前自有缓冲。返回: None。异常: 数值结构/预算/取消;
|
|
103
|
+
清理异常不覆盖原错误,临时申请保留在owner供close重试。
|
|
104
|
+
"""
|
|
105
|
+
if len(self._rows) < 2:
|
|
106
|
+
return
|
|
107
|
+
series = terms = None
|
|
108
|
+
primary = None
|
|
109
|
+
try:
|
|
110
|
+
_reserve_owned_ram(self, 65536 + len(self._rows) * 8192, '_workspace_cost')
|
|
111
|
+
times = tuple(item[0] for item in self._rows)
|
|
112
|
+
values = tuple(item[1] for item in self._rows)
|
|
113
|
+
# 截止仅为本批计算所需;不保存来源副本或另一列累计时钟。
|
|
114
|
+
deadlines = (tuple(item[2] for item in self._rows)
|
|
115
|
+
if any(item[2] is not None for item in self._rows) else None)
|
|
116
|
+
conditions = tuple(item[3] for item in self._rows) if self._conditioned else None
|
|
117
|
+
condition_deadlines = (tuple(item[4] for item in self._rows)
|
|
118
|
+
if self._conditioned and any(item[4] is not None for item in self._rows) else None)
|
|
119
|
+
series = CalculationSeries(Interval(times[0], times[-1]), times, values,
|
|
120
|
+
(True,) * len(times), self._input_unit, conditions=conditions)
|
|
121
|
+
# 窗口仍由原spec裁剪,分母保留完整记录对。按请求省去未知范围对象。
|
|
122
|
+
options = {'condition_valid_until_ns': condition_deadlines} if self._conditioned else {}
|
|
123
|
+
terms = self._compute(series, self._spec, step_ns=self._step_ns,
|
|
124
|
+
retain_unknown_ranges=False, valid_until_ns=deadlines, **options)
|
|
125
|
+
self._sum.push_values(terms.areas, terms.valid)
|
|
126
|
+
facts = terms.facts
|
|
127
|
+
if self._coverage_value_ns is not None:
|
|
128
|
+
self._coverage_value_ns+=facts.value_valid_duration_ns
|
|
129
|
+
if facts.actual_window is not None:
|
|
130
|
+
span = facts.actual_window.end_ns - facts.actual_window.start_ns
|
|
131
|
+
self._covered_ns += span
|
|
132
|
+
self._known_ns += facts.condition_known_duration_ns if self._conditioned else span
|
|
133
|
+
self._selected_ns += facts.selected_duration_ns if self._conditioned else facts.value_valid_duration_ns
|
|
134
|
+
self._selected_unknown_ns += (facts.selected_value_unknown_duration_ns if self._conditioned
|
|
135
|
+
else span - facts.value_valid_duration_ns)
|
|
136
|
+
if self._conditioned:
|
|
137
|
+
self._false_ns += facts.false_duration_ns
|
|
138
|
+
self._quality |= facts.quality
|
|
139
|
+
self._rows[:] = self._rows[-1:]
|
|
140
|
+
except BaseException as exc:
|
|
141
|
+
primary = exc
|
|
142
|
+
self._failed = True
|
|
143
|
+
raise
|
|
144
|
+
finally:
|
|
145
|
+
# 断开有限临时列后再退款;释放失败不允许调用方取得成功结果。
|
|
146
|
+
series = terms = times = values = facts = deadlines = conditions = condition_deadlines = options = None
|
|
147
|
+
try:
|
|
148
|
+
_release_owned_ram(self, self._workspace_cost, '_workspace_cost')
|
|
149
|
+
except BaseException as cleanup:
|
|
150
|
+
self._failed = True
|
|
151
|
+
if primary is None:
|
|
152
|
+
raise
|
|
153
|
+
primary.add_note('记录流积分临时费用清理失败:' + type(cleanup).__name__)
|
|
154
|
+
|
|
155
|
+
def finish(self):
|
|
156
|
+
"""输入调用方确认结束后结算最后完整记录对,返回精简内部结果。
|
|
157
|
+
|
|
158
|
+
参数: 无;不能代替读取器EOF/关闭成功的确认。返回: RecordIntegralResult,
|
|
159
|
+
重复调用返回同一结果。异常: 预算/数值结构/取消错误,不发布前缀。
|
|
160
|
+
"""
|
|
161
|
+
self._require_open()
|
|
162
|
+
if self._finished:
|
|
163
|
+
return self._result
|
|
164
|
+
try:
|
|
165
|
+
self._flush()
|
|
166
|
+
number = self._sum.finish(self._unit, self._factor)
|
|
167
|
+
value, status, reason = classify_calculation_value(self._spec, number.value, self._covered_ns,
|
|
168
|
+
self._known_ns, self._selected_ns, self._selected_unknown_ns,
|
|
169
|
+
calculation_failed=number.calculation_failed,
|
|
170
|
+
all_false=self._conditioned and self._covered_ns > 0 and self._false_ns == self._covered_ns)
|
|
171
|
+
coverage=None if self._coverage_value_ns is None else classify_coverage(
|
|
172
|
+
self._spec,self._covered_ns,self._coverage_value_ns,self._known_ns)
|
|
173
|
+
self._result = RecordIntegralResult(value, self._unit, status, reason, self._quality | number.quality,coverage)
|
|
174
|
+
self._finished = True
|
|
175
|
+
return self._result
|
|
176
|
+
except BaseException:
|
|
177
|
+
self._failed = True
|
|
178
|
+
raise
|
|
179
|
+
|
|
180
|
+
@property
|
|
181
|
+
def closed(self):
|
|
182
|
+
"""读取自有费用完全释放状态。参数: 无。返回: bool。异常: 无。"""
|
|
183
|
+
return self._closed
|
|
184
|
+
|
|
185
|
+
def close(self):
|
|
186
|
+
"""释放自有缓冲/数值状态及费用,不操作外部输入和目录。
|
|
187
|
+
|
|
188
|
+
参数: 无。返回: None;重复关闭安全。异常: 预算释放失败可重试,不假报已关闭。
|
|
189
|
+
"""
|
|
190
|
+
if self._closed:
|
|
191
|
+
return
|
|
192
|
+
self._closing = True
|
|
193
|
+
self._rows = self._sum = self._result = None
|
|
194
|
+
_release_owned_ram(self, self._workspace_cost, '_workspace_cost')
|
|
195
|
+
_release_owned_ram(self, self._fixed_cost, '_fixed_cost')
|
|
196
|
+
self._closed = True
|