cgse 2023.38.0__py3-none-any.whl → 2024.1.4__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.
- README.md +27 -0
- bump.py +85 -0
- cgse-2024.1.4.dist-info/METADATA +38 -0
- cgse-2024.1.4.dist-info/RECORD +5 -0
- {cgse-2023.38.0.dist-info → cgse-2024.1.4.dist-info}/WHEEL +1 -2
- cgse-2023.38.0.dist-info/COPYING +0 -674
- cgse-2023.38.0.dist-info/COPYING.LESSER +0 -165
- cgse-2023.38.0.dist-info/METADATA +0 -144
- cgse-2023.38.0.dist-info/RECORD +0 -649
- cgse-2023.38.0.dist-info/entry_points.txt +0 -75
- cgse-2023.38.0.dist-info/top_level.txt +0 -2
- egse/__init__.py +0 -12
- egse/__main__.py +0 -32
- egse/aeu/aeu.py +0 -5235
- egse/aeu/aeu_awg.yaml +0 -265
- egse/aeu/aeu_crio.yaml +0 -273
- egse/aeu/aeu_cs.py +0 -626
- egse/aeu/aeu_devif.py +0 -321
- egse/aeu/aeu_main_ui.py +0 -912
- egse/aeu/aeu_metrics.py +0 -131
- egse/aeu/aeu_protocol.py +0 -463
- egse/aeu/aeu_psu.yaml +0 -204
- egse/aeu/aeu_ui.py +0 -873
- egse/aeu/arbdata/FccdRead.arb +0 -2
- egse/aeu/arbdata/FccdRead_min_points.arb +0 -2
- egse/aeu/arbdata/HeaterSync_FccdRead.arb +0 -2
- egse/aeu/arbdata/HeaterSync_ccdRead25.arb +0 -2
- egse/aeu/arbdata/HeaterSync_ccdRead31_25.arb +0 -2
- egse/aeu/arbdata/HeaterSync_ccdRead37_50.arb +0 -2
- egse/aeu/arbdata/HeaterSync_ccdRead43_75.arb +0 -2
- egse/aeu/arbdata/HeaterSync_ccdRead50.arb +0 -2
- egse/aeu/arbdata/Heater_FccdRead_min_points.arb +0 -2
- egse/aeu/arbdata/ccdRead25.arb +0 -2
- egse/aeu/arbdata/ccdRead25_150ms.arb +0 -2
- egse/aeu/arbdata/ccdRead31_25.arb +0 -2
- egse/aeu/arbdata/ccdRead31_25_150ms.arb +0 -2
- egse/aeu/arbdata/ccdRead37_50.arb +0 -2
- egse/aeu/arbdata/ccdRead37_50_150ms.arb +0 -2
- egse/aeu/arbdata/ccdRead43_75.arb +0 -2
- egse/aeu/arbdata/ccdRead43_75_150ms.arb +0 -2
- egse/aeu/arbdata/ccdRead50.arb +0 -2
- egse/aeu/arbdata/ccdRead50_150ms.arb +0 -2
- egse/alert/__init__.py +0 -1049
- egse/alert/alertman.yaml +0 -37
- egse/alert/alertman_cs.py +0 -234
- egse/alert/alertman_ui.py +0 -603
- egse/alert/gsm/beaglebone.py +0 -138
- egse/alert/gsm/beaglebone.yaml +0 -51
- egse/alert/gsm/beaglebone_cs.py +0 -108
- egse/alert/gsm/beaglebone_devif.py +0 -130
- egse/alert/gsm/beaglebone_protocol.py +0 -48
- egse/bits.py +0 -318
- egse/camera.py +0 -44
- egse/collimator/__init__.py +0 -0
- egse/collimator/fcul/__init__.py +0 -0
- egse/collimator/fcul/ogse.py +0 -1077
- egse/collimator/fcul/ogse.yaml +0 -14
- egse/collimator/fcul/ogse_cs.py +0 -154
- egse/collimator/fcul/ogse_devif.py +0 -358
- egse/collimator/fcul/ogse_protocol.py +0 -129
- egse/collimator/fcul/ogse_sim.py +0 -431
- egse/collimator/fcul/ogse_ui.py +0 -1108
- egse/command.py +0 -699
- egse/config.py +0 -410
- egse/confman/__init__.py +0 -1015
- egse/confman/confman.yaml +0 -67
- egse/confman/confman_cs.py +0 -239
- egse/confman/confman_ui.py +0 -381
- egse/confman/setup_ui.py +0 -565
- egse/control.py +0 -442
- egse/coordinates/__init__.py +0 -531
- egse/coordinates/avoidance.py +0 -103
- egse/coordinates/cslmodel.py +0 -127
- egse/coordinates/laser_tracker_to_dict.py +0 -120
- egse/coordinates/point.py +0 -707
- egse/coordinates/pyplot.py +0 -195
- egse/coordinates/referenceFrame.py +0 -1279
- egse/coordinates/refmodel.py +0 -737
- egse/coordinates/rotationMatrix.py +0 -85
- egse/coordinates/transform3d_addon.py +0 -419
- egse/csl/__init__.py +0 -50
- egse/csl/commanding.py +0 -78
- egse/csl/icons/hexapod-connected-selected.svg +0 -30
- egse/csl/icons/hexapod-connected.svg +0 -30
- egse/csl/icons/hexapod-homing-selected.svg +0 -68
- egse/csl/icons/hexapod-homing.svg +0 -68
- egse/csl/icons/hexapod-retract-selected.svg +0 -56
- egse/csl/icons/hexapod-retract.svg +0 -51
- egse/csl/icons/hexapod-zero-selected.svg +0 -56
- egse/csl/icons/hexapod-zero.svg +0 -56
- egse/csl/icons/logo-puna.svg +0 -92
- egse/csl/icons/stop.svg +0 -1
- egse/csl/initialisation.py +0 -102
- egse/csl/mech_pos_settings.yaml +0 -18
- egse/das.py +0 -1247
- egse/das.yaml +0 -7
- egse/data/conf/SETUP_CSL_00000_170620_150000.yaml +0 -5
- egse/data/conf/SETUP_CSL_00001_170620_151010.yaml +0 -69
- egse/data/conf/SETUP_CSL_00002_170620_151020.yaml +0 -69
- egse/data/conf/SETUP_CSL_00003_170620_151030.yaml +0 -69
- egse/data/conf/SETUP_CSL_00004_170620_151040.yaml +0 -69
- egse/data/conf/SETUP_CSL_00005_170620_151050.yaml +0 -69
- egse/data/conf/SETUP_CSL_00006_170620_151060.yaml +0 -69
- egse/data/conf/SETUP_CSL_00007_170620_151070.yaml +0 -69
- egse/data/conf/SETUP_CSL_00008_170620_151080.yaml +0 -75
- egse/data/conf/SETUP_CSL_00010_210308_083016.yaml +0 -138
- egse/data/conf/SETUP_INTA_00000_170620_150000.yaml +0 -4
- egse/data/conf/SETUP_SRON_00000_170620_150000.yaml +0 -4
- egse/decorators.py +0 -415
- egse/device.py +0 -269
- egse/dpu/__init__.py +0 -2681
- egse/dpu/ccd_ui.py +0 -508
- egse/dpu/dpu.py +0 -786
- egse/dpu/dpu.yaml +0 -153
- egse/dpu/dpu_cs.py +0 -272
- egse/dpu/dpu_ui.py +0 -668
- egse/dpu/fitsgen.py +0 -2077
- egse/dpu/fitsgen_test.py +0 -752
- egse/dpu/fitsgen_ui.py +0 -399
- egse/dpu/hdf5_model.py +0 -332
- egse/dpu/hdf5_ui.py +0 -277
- egse/dpu/hdf5_viewer.py +0 -506
- egse/dpu/hk_ui.py +0 -468
- egse/dpu_commands.py +0 -81
- egse/dsi/constants.py +0 -220
- egse/dsi/esl.py +0 -870
- egse/dsi/rmap.py +0 -1042
- egse/dsi/rmapci.py +0 -37
- egse/dsi/spw.py +0 -154
- egse/dsi/spw_state.py +0 -29
- egse/dummy.py +0 -258
- egse/dyndummy.py +0 -179
- egse/env.py +0 -278
- egse/exceptions.py +0 -88
- egse/fdir/__init__.py +0 -28
- egse/fdir/fdir_manager.py +0 -85
- egse/fdir/fdir_manager.yaml +0 -51
- egse/fdir/fdir_manager_controller.py +0 -228
- egse/fdir/fdir_manager_cs.py +0 -164
- egse/fdir/fdir_manager_interface.py +0 -25
- egse/fdir/fdir_remote.py +0 -73
- egse/fdir/fdir_remote.yaml +0 -37
- egse/fdir/fdir_remote_controller.py +0 -50
- egse/fdir/fdir_remote_cs.py +0 -97
- egse/fdir/fdir_remote_interface.py +0 -14
- egse/fdir/fdir_remote_popup.py +0 -31
- egse/fee/__init__.py +0 -114
- egse/fee/f_fee_register.yaml +0 -43
- egse/fee/fee.py +0 -631
- egse/fee/feesim.py +0 -750
- egse/fee/n_fee_hk.py +0 -761
- egse/fee/nfee.py +0 -187
- egse/filterwheel/__init__.py +0 -4
- egse/filterwheel/eksma/__init__.py +0 -24
- egse/filterwheel/eksma/fw8smc4.py +0 -661
- egse/filterwheel/eksma/fw8smc4.yaml +0 -121
- egse/filterwheel/eksma/fw8smc4_cs.py +0 -144
- egse/filterwheel/eksma/fw8smc4_devif.py +0 -473
- egse/filterwheel/eksma/fw8smc4_protocol.py +0 -81
- egse/filterwheel/eksma/fw8smc4_ui.py +0 -940
- egse/filterwheel/eksma/fw8smc5.py +0 -111
- egse/filterwheel/eksma/fw8smc5.yaml +0 -105
- egse/filterwheel/eksma/fw8smc5_controller.py +0 -307
- egse/filterwheel/eksma/fw8smc5_cs.py +0 -141
- egse/filterwheel/eksma/fw8smc5_interface.py +0 -65
- egse/filterwheel/eksma/fw8smc5_simulator.py +0 -29
- egse/filterwheel/eksma/fw8smc5_ui.py +0 -1068
- egse/filterwheel/eksma/testpythonfw.py +0 -215
- egse/fov/__init__.py +0 -65
- egse/fov/fov_hk.py +0 -712
- egse/fov/fov_ui.py +0 -861
- egse/fov/fov_ui_controller.py +0 -140
- egse/fov/fov_ui_model.py +0 -200
- egse/fov/fov_ui_view.py +0 -345
- egse/gimbal/__init__.py +0 -32
- egse/gimbal/symetrie/__init__.py +0 -26
- egse/gimbal/symetrie/alpha.py +0 -586
- egse/gimbal/symetrie/generic_gimbal_ui.py +0 -1521
- egse/gimbal/symetrie/gimbal.py +0 -877
- egse/gimbal/symetrie/gimbal.yaml +0 -168
- egse/gimbal/symetrie/gimbal_cs.py +0 -183
- egse/gimbal/symetrie/gimbal_protocol.py +0 -135
- egse/gimbal/symetrie/gimbal_ui.py +0 -361
- egse/gimbal/symetrie/pmac.py +0 -1006
- egse/gimbal/symetrie/pmac_regex.py +0 -83
- egse/graph.py +0 -132
- egse/gui/__init__.py +0 -47
- egse/gui/buttons.py +0 -378
- egse/gui/focalplane.py +0 -1281
- egse/gui/formatter.py +0 -10
- egse/gui/led.py +0 -162
- egse/gui/limitswitch.py +0 -143
- egse/gui/mechanisms.py +0 -588
- egse/gui/states.py +0 -148
- egse/gui/stripchart.py +0 -729
- egse/gui/switch.py +0 -112
- egse/h5.py +0 -274
- egse/help/__init__.py +0 -0
- egse/help/help_ui.py +0 -126
- egse/hexapod/__init__.py +0 -32
- egse/hexapod/symetrie/__init__.py +0 -138
- egse/hexapod/symetrie/alpha.py +0 -874
- egse/hexapod/symetrie/dynalpha.py +0 -1387
- egse/hexapod/symetrie/hexapod_ui.py +0 -1516
- egse/hexapod/symetrie/pmac.py +0 -1010
- egse/hexapod/symetrie/pmac_regex.py +0 -83
- egse/hexapod/symetrie/puna.py +0 -1167
- egse/hexapod/symetrie/puna.yaml +0 -193
- egse/hexapod/symetrie/puna_cs.py +0 -196
- egse/hexapod/symetrie/puna_protocol.py +0 -131
- egse/hexapod/symetrie/puna_ui.py +0 -434
- egse/hexapod/symetrie/punaplus.py +0 -107
- egse/hexapod/symetrie/zonda.py +0 -872
- egse/hexapod/symetrie/zonda.yaml +0 -337
- egse/hexapod/symetrie/zonda_cs.py +0 -172
- egse/hexapod/symetrie/zonda_devif.py +0 -415
- egse/hexapod/symetrie/zonda_protocol.py +0 -119
- egse/hexapod/symetrie/zonda_ui.py +0 -449
- egse/hk.py +0 -765
- egse/icons/aeu-cs-start.svg +0 -117
- egse/icons/aeu-cs-stop.svg +0 -118
- egse/icons/aeu-cs.svg +0 -107
- egse/icons/aeu_cs-started.svg +0 -112
- egse/icons/aeu_cs-stopped.svg +0 -112
- egse/icons/aeu_cs.svg +0 -55
- egse/icons/alert.svg +0 -1
- egse/icons/arrow-double-left.png +0 -0
- egse/icons/arrow-double-right.png +0 -0
- egse/icons/arrow-up.svg +0 -11
- egse/icons/backward.svg +0 -1
- egse/icons/busy.svg +0 -1
- egse/icons/cleaning.svg +0 -115
- egse/icons/color-scheme.svg +0 -1
- egse/icons/cs-connected-alert.svg +0 -91
- egse/icons/cs-connected-disabled.svg +0 -43
- egse/icons/cs-connected.svg +0 -89
- egse/icons/cs-not-connected.svg +0 -44
- egse/icons/double-left-arrow.svg +0 -1
- egse/icons/double-right-arrow.svg +0 -1
- egse/icons/erase-disabled.svg +0 -19
- egse/icons/erase.svg +0 -59
- egse/icons/fitsgen-start.svg +0 -47
- egse/icons/fitsgen-stop.svg +0 -48
- egse/icons/fitsgen.svg +0 -1
- egse/icons/forward.svg +0 -1
- egse/icons/fov-hk-start.svg +0 -33
- egse/icons/fov-hk-stop.svg +0 -37
- egse/icons/fov-hk.svg +0 -1
- egse/icons/front-desk.svg +0 -1
- egse/icons/home-actioned.svg +0 -15
- egse/icons/home-disabled.svg +0 -15
- egse/icons/home.svg +0 -13
- egse/icons/info.svg +0 -1
- egse/icons/invalid.png +0 -0
- egse/icons/led-green.svg +0 -20
- egse/icons/led-grey.svg +0 -20
- egse/icons/led-orange.svg +0 -20
- egse/icons/led-red.svg +0 -20
- egse/icons/led-square-green.svg +0 -134
- egse/icons/led-square-grey.svg +0 -134
- egse/icons/led-square-orange.svg +0 -134
- egse/icons/led-square-red.svg +0 -134
- egse/icons/limit-switch-all-green.svg +0 -115
- egse/icons/limit-switch-all-red.svg +0 -117
- egse/icons/limit-switch-el+.svg +0 -116
- egse/icons/limit-switch-el-.svg +0 -117
- egse/icons/location-marker.svg +0 -1
- egse/icons/logo-dpu.svg +0 -48
- egse/icons/logo-gimbal.svg +0 -112
- egse/icons/logo-huber.svg +0 -23
- egse/icons/logo-ogse.svg +0 -31
- egse/icons/logo-puna.svg +0 -92
- egse/icons/logo-tcs.svg +0 -29
- egse/icons/logo-zonda.svg +0 -66
- egse/icons/maximize.svg +0 -1
- egse/icons/meter.svg +0 -1
- egse/icons/more.svg +0 -45
- egse/icons/n-fee-hk-start.svg +0 -24
- egse/icons/n-fee-hk-stop.svg +0 -25
- egse/icons/n-fee-hk.svg +0 -83
- egse/icons/observing-off.svg +0 -46
- egse/icons/observing-on.svg +0 -46
- egse/icons/open-document-hdf5.png +0 -0
- egse/icons/open-document-hdf5.svg +0 -21
- egse/icons/ops-mode.svg +0 -1
- egse/icons/play-green.svg +0 -17
- egse/icons/plugged-disabled.svg +0 -27
- egse/icons/plugged.svg +0 -21
- egse/icons/pm_ui.svg +0 -1
- egse/icons/power-button-green.svg +0 -27
- egse/icons/power-button-red.svg +0 -27
- egse/icons/power-button.svg +0 -27
- egse/icons/radar.svg +0 -1
- egse/icons/radioactive.svg +0 -2
- egse/icons/reload.svg +0 -1
- egse/icons/remote-control-off.svg +0 -28
- egse/icons/remote-control-on.svg +0 -28
- egse/icons/repeat-blue.svg +0 -15
- egse/icons/repeat.svg +0 -1
- egse/icons/settings.svg +0 -1
- egse/icons/shrink.svg +0 -1
- egse/icons/shutter.svg +0 -1
- egse/icons/sign-off.svg +0 -1
- egse/icons/sign-on.svg +0 -1
- egse/icons/sim-mode.svg +0 -1
- egse/icons/small-buttons-go.svg +0 -20
- egse/icons/small-buttons-minus.svg +0 -51
- egse/icons/small-buttons-plus.svg +0 -51
- egse/icons/sponge.svg +0 -220
- egse/icons/start-button-disabled.svg +0 -84
- egse/icons/start-button.svg +0 -50
- egse/icons/stop-button-disabled.svg +0 -84
- egse/icons/stop-button.svg +0 -50
- egse/icons/stop-red.svg +0 -17
- egse/icons/stop.svg +0 -1
- egse/icons/switch-disabled-square.svg +0 -87
- egse/icons/switch-disabled.svg +0 -15
- egse/icons/switch-off-square.svg +0 -87
- egse/icons/switch-off.svg +0 -72
- egse/icons/switch-on-square.svg +0 -87
- egse/icons/switch-on.svg +0 -61
- egse/icons/temperature-control.svg +0 -44
- egse/icons/th_ui_logo.svg +0 -1
- egse/icons/unplugged.svg +0 -23
- egse/icons/unvalid.png +0 -0
- egse/icons/user-interface.svg +0 -1
- egse/icons/vacuum.svg +0 -1
- egse/icons/valid.png +0 -0
- egse/icons/zoom-to-pixel-dark.svg +0 -64
- egse/icons/zoom-to-pixel-white.svg +0 -36
- egse/images/big-rotation-stage.png +0 -0
- egse/images/connected-100.png +0 -0
- egse/images/cross.svg +0 -6
- egse/images/disconnected-100.png +0 -0
- egse/images/gui-icon.png +0 -0
- egse/images/home.svg +0 -6
- egse/images/info-icon.png +0 -0
- egse/images/led-black.svg +0 -89
- egse/images/led-green.svg +0 -85
- egse/images/led-orange.svg +0 -85
- egse/images/led-red.svg +0 -85
- egse/images/load-icon.png +0 -0
- egse/images/load-setup.png +0 -0
- egse/images/load.png +0 -0
- egse/images/pause.png +0 -0
- egse/images/play-button.svg +0 -8
- egse/images/play.png +0 -0
- egse/images/process-status.png +0 -0
- egse/images/restart.png +0 -0
- egse/images/search.png +0 -0
- egse/images/sma.png +0 -0
- egse/images/start.png +0 -0
- egse/images/stop-button.svg +0 -8
- egse/images/stop.png +0 -0
- egse/images/switch-off.svg +0 -48
- egse/images/switch-on.svg +0 -48
- egse/images/undo.png +0 -0
- egse/images/update-button.svg +0 -11
- egse/imageviewer/exposureselection.py +0 -475
- egse/imageviewer/imageviewer.py +0 -198
- egse/imageviewer/matchfocalplane.py +0 -179
- egse/imageviewer/subfieldposition.py +0 -133
- egse/lampcontrol/__init__.py +0 -4
- egse/lampcontrol/beaglebone/beaglebone.py +0 -178
- egse/lampcontrol/beaglebone/beaglebone.yaml +0 -62
- egse/lampcontrol/beaglebone/beaglebone_cs.py +0 -106
- egse/lampcontrol/beaglebone/beaglebone_devif.py +0 -150
- egse/lampcontrol/beaglebone/beaglebone_protocol.py +0 -73
- egse/lampcontrol/energetiq/__init__.py +0 -22
- egse/lampcontrol/energetiq/eq99.yaml +0 -98
- egse/lampcontrol/energetiq/lampEQ99.py +0 -283
- egse/lampcontrol/energetiq/lampEQ99_cs.py +0 -128
- egse/lampcontrol/energetiq/lampEQ99_devif.py +0 -158
- egse/lampcontrol/energetiq/lampEQ99_encode_decode_errors.py +0 -73
- egse/lampcontrol/energetiq/lampEQ99_protocol.py +0 -69
- egse/lampcontrol/energetiq/lampEQ99_ui.py +0 -465
- egse/lib/CentOS-7/EtherSpaceLink_v34_86.dylib +0 -0
- egse/lib/CentOS-8/ESL-RMAP_v34_86.dylib +0 -0
- egse/lib/CentOS-8/EtherSpaceLink_v34_86.dylib +0 -0
- egse/lib/Debian/ESL-RMAP_v34_86.dylib +0 -0
- egse/lib/Debian/EtherSpaceLink_v34_86.dylib +0 -0
- egse/lib/Debian/libetherspacelink_v35_21.dylib +0 -0
- egse/lib/Linux/ESL-RMAP_v34_86.dylib +0 -0
- egse/lib/Linux/EtherSpaceLink_v34_86.dylib +0 -0
- egse/lib/Ubuntu-20/ESL-RMAP_v34_86.dylib +0 -0
- egse/lib/Ubuntu-20/EtherSpaceLink_v34_86.dylib +0 -0
- egse/lib/gssw/python3-gssw_2.2.3+31f63c9f-1_all.deb +0 -0
- egse/lib/macOS/ESL-RMAP_v34_86.dylib +0 -0
- egse/lib/macOS/EtherSpaceLink_v34_86.dylib +0 -0
- egse/lib/ximc/__pycache__/pyximc.cpython-38 2.pyc +0 -0
- egse/lib/ximc/__pycache__/pyximc.cpython-38.pyc +0 -0
- egse/lib/ximc/libximc.framework/Frameworks/libbindy.dylib +0 -0
- egse/lib/ximc/libximc.framework/Frameworks/libxiwrapper.dylib +0 -0
- egse/lib/ximc/libximc.framework/Headers/ximc.h +0 -5510
- egse/lib/ximc/libximc.framework/Resources/Info.plist +0 -42
- egse/lib/ximc/libximc.framework/Resources/keyfile.sqlite +0 -0
- egse/lib/ximc/libximc.framework/libbindy.so +0 -0
- egse/lib/ximc/libximc.framework/libximc +0 -0
- egse/lib/ximc/libximc.framework/libximc.so +0 -0
- egse/lib/ximc/libximc.framework/libximc.so.7.0.0 +0 -0
- egse/lib/ximc/libximc.framework/libxiwrapper.so +0 -0
- egse/lib/ximc/pyximc.py +0 -922
- egse/listener.py +0 -73
- egse/logger/__init__.py +0 -243
- egse/logger/log_cs.py +0 -321
- egse/metrics.py +0 -98
- egse/mixin.py +0 -464
- egse/monitoring.py +0 -95
- egse/ni/alarms/__init__.py +0 -26
- egse/ni/alarms/cdaq9375.py +0 -300
- egse/ni/alarms/cdaq9375.yaml +0 -89
- egse/ni/alarms/cdaq9375_cs.py +0 -130
- egse/ni/alarms/cdaq9375_devif.py +0 -183
- egse/ni/alarms/cdaq9375_protocol.py +0 -48
- egse/obs_inspection.py +0 -163
- egse/observer.py +0 -41
- egse/obsid.py +0 -163
- egse/powermeter/__init__.py +0 -0
- egse/powermeter/ni/__init__.py +0 -38
- egse/powermeter/ni/cdaq9184.py +0 -224
- egse/powermeter/ni/cdaq9184.yaml +0 -73
- egse/powermeter/ni/cdaq9184_cs.py +0 -130
- egse/powermeter/ni/cdaq9184_devif.py +0 -201
- egse/powermeter/ni/cdaq9184_protocol.py +0 -48
- egse/powermeter/ni/cdaq9184_ui.py +0 -544
- egse/powermeter/thorlabs/__init__.py +0 -25
- egse/powermeter/thorlabs/pm100a.py +0 -380
- egse/powermeter/thorlabs/pm100a.yaml +0 -132
- egse/powermeter/thorlabs/pm100a_cs.py +0 -136
- egse/powermeter/thorlabs/pm100a_devif.py +0 -127
- egse/powermeter/thorlabs/pm100a_protocol.py +0 -80
- egse/powermeter/thorlabs/pm100a_ui.py +0 -725
- egse/process.py +0 -451
- egse/procman/__init__.py +0 -811
- egse/procman/cannot_start_process_popup.py +0 -43
- egse/procman/procman.yaml +0 -49
- egse/procman/procman_cs.py +0 -201
- egse/procman/procman_ui.py +0 -2081
- egse/protocol.py +0 -603
- egse/proxy.py +0 -522
- egse/randomwalk.py +0 -140
- egse/reg.py +0 -585
- egse/reload.py +0 -122
- egse/reprocess.py +0 -675
- egse/resource.py +0 -333
- egse/rst.py +0 -135
- egse/search.py +0 -182
- egse/serialdevice.py +0 -190
- egse/services.py +0 -212
- egse/services.yaml +0 -51
- egse/settings.py +0 -379
- egse/settings.yaml +0 -980
- egse/setup.py +0 -1180
- egse/shutter/__init__.py +0 -0
- egse/shutter/thorlabs/__init__.py +0 -19
- egse/shutter/thorlabs/ksc101.py +0 -205
- egse/shutter/thorlabs/ksc101.yaml +0 -105
- egse/shutter/thorlabs/ksc101_cs.py +0 -136
- egse/shutter/thorlabs/ksc101_devif.py +0 -201
- egse/shutter/thorlabs/ksc101_protocol.py +0 -69
- egse/shutter/thorlabs/ksc101_ui.py +0 -548
- egse/shutter/thorlabs/sc10.py +0 -82
- egse/shutter/thorlabs/sc10.yaml +0 -52
- egse/shutter/thorlabs/sc10_controller.py +0 -81
- egse/shutter/thorlabs/sc10_cs.py +0 -108
- egse/shutter/thorlabs/sc10_interface.py +0 -25
- egse/shutter/thorlabs/sc10_simulator.py +0 -30
- egse/simulator.py +0 -41
- egse/slack.py +0 -61
- egse/socketdevice.py +0 -218
- egse/sockets.py +0 -218
- egse/spw.py +0 -1479
- egse/stages/__init__.py +0 -12
- egse/stages/aerotech/ensemble.py +0 -247
- egse/stages/aerotech/ensemble.yaml +0 -205
- egse/stages/aerotech/ensemble_controller.py +0 -275
- egse/stages/aerotech/ensemble_cs.py +0 -110
- egse/stages/aerotech/ensemble_interface.py +0 -132
- egse/stages/aerotech/ensemble_parameters.py +0 -433
- egse/stages/aerotech/ensemble_simulator.py +0 -27
- egse/stages/aerotech/mgse_sim.py +0 -193
- egse/stages/arun/smd3.py +0 -111
- egse/stages/arun/smd3.yaml +0 -68
- egse/stages/arun/smd3_controller.py +0 -472
- egse/stages/arun/smd3_cs.py +0 -112
- egse/stages/arun/smd3_interface.py +0 -53
- egse/stages/arun/smd3_simulator.py +0 -27
- egse/stages/arun/smd3_stop.py +0 -16
- egse/stages/huber/__init__.py +0 -49
- egse/stages/huber/smc9300.py +0 -904
- egse/stages/huber/smc9300.yaml +0 -63
- egse/stages/huber/smc9300_cs.py +0 -178
- egse/stages/huber/smc9300_devif.py +0 -345
- egse/stages/huber/smc9300_protocol.py +0 -111
- egse/stages/huber/smc9300_sim.py +0 -547
- egse/stages/huber/smc9300_ui.py +0 -973
- egse/state.py +0 -173
- egse/statemachine.py +0 -274
- egse/storage/__init__.py +0 -1004
- egse/storage/persistence.py +0 -2295
- egse/storage/storage.yaml +0 -72
- egse/storage/storage_cs.py +0 -214
- egse/styles/dark.qss +0 -343
- egse/styles/default.qss +0 -48
- egse/synoptics/__init__.py +0 -412
- egse/synoptics/syn.yaml +0 -9
- egse/synoptics/syn_cs.py +0 -195
- egse/system.py +0 -1408
- egse/tcs/__init__.py +0 -14
- egse/tcs/tcs.py +0 -874
- egse/tcs/tcs.yaml +0 -14
- egse/tcs/tcs_cs.py +0 -202
- egse/tcs/tcs_devif.py +0 -292
- egse/tcs/tcs_protocol.py +0 -177
- egse/tcs/tcs_sim.py +0 -177
- egse/tcs/tcs_ui.py +0 -543
- egse/tdms.py +0 -171
- egse/tempcontrol/__init__.py +0 -23
- egse/tempcontrol/agilent/agilent34970.py +0 -109
- egse/tempcontrol/agilent/agilent34970.yaml +0 -44
- egse/tempcontrol/agilent/agilent34970_cs.py +0 -116
- egse/tempcontrol/agilent/agilent34970_devif.py +0 -182
- egse/tempcontrol/agilent/agilent34970_protocol.py +0 -99
- egse/tempcontrol/agilent/agilent34972.py +0 -111
- egse/tempcontrol/agilent/agilent34972.yaml +0 -44
- egse/tempcontrol/agilent/agilent34972_cs.py +0 -117
- egse/tempcontrol/agilent/agilent34972_devif.py +0 -189
- egse/tempcontrol/agilent/agilent34972_protocol.py +0 -101
- egse/tempcontrol/beaglebone/beaglebone.py +0 -342
- egse/tempcontrol/beaglebone/beaglebone.yaml +0 -110
- egse/tempcontrol/beaglebone/beaglebone_cs.py +0 -117
- egse/tempcontrol/beaglebone/beaglebone_protocol.py +0 -135
- egse/tempcontrol/beaglebone/beaglebone_ui.py +0 -681
- egse/tempcontrol/digalox/digalox.py +0 -107
- egse/tempcontrol/digalox/digalox.yaml +0 -36
- egse/tempcontrol/digalox/digalox_cs.py +0 -112
- egse/tempcontrol/digalox/digalox_protocol.py +0 -55
- egse/tempcontrol/keithley/__init__.py +0 -33
- egse/tempcontrol/keithley/daq6510.py +0 -662
- egse/tempcontrol/keithley/daq6510.yaml +0 -105
- egse/tempcontrol/keithley/daq6510_cs.py +0 -163
- egse/tempcontrol/keithley/daq6510_devif.py +0 -343
- egse/tempcontrol/keithley/daq6510_protocol.py +0 -78
- egse/tempcontrol/keithley/daq6510_sim.py +0 -186
- egse/tempcontrol/lakeshore/__init__.py +0 -33
- egse/tempcontrol/lakeshore/lsci.py +0 -361
- egse/tempcontrol/lakeshore/lsci.yaml +0 -162
- egse/tempcontrol/lakeshore/lsci_cs.py +0 -174
- egse/tempcontrol/lakeshore/lsci_devif.py +0 -292
- egse/tempcontrol/lakeshore/lsci_protocol.py +0 -73
- egse/tempcontrol/lakeshore/lsci_ui.py +0 -389
- egse/tempcontrol/ni/__init__.py +0 -0
- egse/tempcontrol/spid/spid.py +0 -109
- egse/tempcontrol/spid/spid.yaml +0 -81
- egse/tempcontrol/spid/spid_controller.py +0 -279
- egse/tempcontrol/spid/spid_cs.py +0 -136
- egse/tempcontrol/spid/spid_protocol.py +0 -107
- egse/tempcontrol/spid/spid_ui.py +0 -727
- egse/tempcontrol/srs/__init__.py +0 -22
- egse/tempcontrol/srs/ptc10.py +0 -875
- egse/tempcontrol/srs/ptc10.yaml +0 -227
- egse/tempcontrol/srs/ptc10_cs.py +0 -128
- egse/tempcontrol/srs/ptc10_devif.py +0 -118
- egse/tempcontrol/srs/ptc10_protocol.py +0 -42
- egse/tempcontrol/srs/ptc10_ui.py +0 -906
- egse/ups/apc/apc.py +0 -236
- egse/ups/apc/apc.yaml +0 -45
- egse/ups/apc/apc_cs.py +0 -101
- egse/ups/apc/apc_protocol.py +0 -125
- egse/user.yaml +0 -7
- egse/vacuum/beaglebone/beaglebone.py +0 -149
- egse/vacuum/beaglebone/beaglebone.yaml +0 -44
- egse/vacuum/beaglebone/beaglebone_cs.py +0 -108
- egse/vacuum/beaglebone/beaglebone_devif.py +0 -164
- egse/vacuum/beaglebone/beaglebone_protocol.py +0 -193
- egse/vacuum/beaglebone/beaglebone_ui.py +0 -638
- egse/vacuum/instrutech/igm402.py +0 -92
- egse/vacuum/instrutech/igm402.yaml +0 -90
- egse/vacuum/instrutech/igm402_controller.py +0 -128
- egse/vacuum/instrutech/igm402_cs.py +0 -108
- egse/vacuum/instrutech/igm402_interface.py +0 -49
- egse/vacuum/instrutech/igm402_simulator.py +0 -36
- egse/vacuum/keller/kellerBus.py +0 -256
- egse/vacuum/keller/leo3.py +0 -102
- egse/vacuum/keller/leo3.yaml +0 -38
- egse/vacuum/keller/leo3_controller.py +0 -83
- egse/vacuum/keller/leo3_cs.py +0 -101
- egse/vacuum/keller/leo3_interface.py +0 -33
- egse/vacuum/mks/evision.py +0 -86
- egse/vacuum/mks/evision.yaml +0 -75
- egse/vacuum/mks/evision_cs.py +0 -101
- egse/vacuum/mks/evision_devif.py +0 -316
- egse/vacuum/mks/evision_interface.py +0 -60
- egse/vacuum/mks/evision_simulator.py +0 -24
- egse/vacuum/mks/evision_ui.py +0 -704
- egse/vacuum/pfeiffer/acp40.py +0 -87
- egse/vacuum/pfeiffer/acp40.yaml +0 -60
- egse/vacuum/pfeiffer/acp40_controller.py +0 -117
- egse/vacuum/pfeiffer/acp40_cs.py +0 -109
- egse/vacuum/pfeiffer/acp40_interface.py +0 -40
- egse/vacuum/pfeiffer/acp40_simulator.py +0 -39
- egse/vacuum/pfeiffer/tc400.py +0 -113
- egse/vacuum/pfeiffer/tc400.yaml +0 -83
- egse/vacuum/pfeiffer/tc400_controller.py +0 -140
- egse/vacuum/pfeiffer/tc400_cs.py +0 -109
- egse/vacuum/pfeiffer/tc400_interface.py +0 -70
- egse/vacuum/pfeiffer/tc400_simulator.py +0 -24
- egse/vacuum/pfeiffer/tpg261.py +0 -81
- egse/vacuum/pfeiffer/tpg261.yaml +0 -66
- egse/vacuum/pfeiffer/tpg261_controller.py +0 -150
- egse/vacuum/pfeiffer/tpg261_cs.py +0 -109
- egse/vacuum/pfeiffer/tpg261_interface.py +0 -60
- egse/vacuum/pfeiffer/tpg261_simulator.py +0 -24
- egse/version.py +0 -174
- egse/visitedpositions.py +0 -398
- egse/windowing.py +0 -213
- egse/zmq/__init__.py +0 -28
- egse/zmq/spw.py +0 -160
- egse/zmq_ser.py +0 -41
- scripts/alerts/cold.yaml +0 -278
- scripts/alerts/example_alerts.yaml +0 -54
- scripts/alerts/transition.yaml +0 -14
- scripts/alerts/warm.yaml +0 -49
- scripts/analyse_n_fee_hk_data.py +0 -44
- scripts/check_hdf5_files.py +0 -192
- scripts/check_register_sync.py +0 -47
- scripts/create_hdf5_report.py +0 -295
- scripts/csl_model.py +0 -436
- scripts/csl_restore_setup.py +0 -230
- scripts/export-grafana-dashboards.py +0 -50
- scripts/fdir/cs_recovery/fdir_cs_recovery.py +0 -59
- scripts/fdir/fdir_table.yaml +0 -70
- scripts/fdir/fdir_test_recovery.py +0 -11
- scripts/fdir/hw_recovery/fdir_agilent_hw_recovery.py +0 -73
- scripts/fdir/limit_recovery/fdir_agilent_limit.py +0 -64
- scripts/fdir/limit_recovery/fdir_bb_heater_limit.py +0 -61
- scripts/fdir/limit_recovery/fdir_ensemble_limit.py +0 -33
- scripts/fdir/limit_recovery/fdir_pressure_limit_recovery.py +0 -71
- scripts/fix_csv.py +0 -80
- scripts/n_fee_supply_voltage_calculation.py +0 -92
- scripts/playground.py +0 -30
- scripts/print_hdf5_hk_data.py +0 -68
- scripts/print_register_map.py +0 -43
- scripts/sron/commanding/control_heaters.py +0 -44
- scripts/sron/commanding/pumpdown.py +0 -46
- scripts/sron/commanding/set_pid_setpoint.py +0 -19
- scripts/sron/commanding/shutdown_bbb_heaters.py +0 -10
- scripts/sron/commanding/shutdown_pumps.py +0 -33
- scripts/sron/tm_gen/tm_gen_agilent.py +0 -38
- scripts/sron/tm_gen/tm_gen_heaters.py +0 -4
- scripts/sron/tm_gen/tm_gen_spid.py +0 -13
- scripts/update_operational_cgse.py +0 -268
- scripts/update_operational_cgse_old.py +0 -273
egse/dsi/rmap.py
DELETED
|
@@ -1,1042 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
This module provides Python wrapper functions to (most of) the library functions from the C library ESL-RMAP.c.
|
|
3
|
-
|
|
4
|
-
We use one single Exception specific for these wrapper functions. An RMAPError is thrown whenever the C function
|
|
5
|
-
returns an error from which we can not recover. This allows to cascade the python functions in a try: except: clause
|
|
6
|
-
making the code much more readable.
|
|
7
|
-
|
|
8
|
-
The C code depends heavily on a C structure which we had to re-define using the Structure class provided by ctypes.
|
|
9
|
-
|
|
10
|
-
"""
|
|
11
|
-
|
|
12
|
-
import ctypes
|
|
13
|
-
import logging
|
|
14
|
-
import struct
|
|
15
|
-
from contextlib import contextmanager
|
|
16
|
-
from ctypes import POINTER
|
|
17
|
-
from ctypes import Structure
|
|
18
|
-
from ctypes import c_char_p
|
|
19
|
-
from ctypes import c_int
|
|
20
|
-
from ctypes import c_ubyte
|
|
21
|
-
from ctypes import c_uint
|
|
22
|
-
from ctypes import c_ulonglong
|
|
23
|
-
from ctypes import c_void_p as c_int_p
|
|
24
|
-
from ctypes import cdll
|
|
25
|
-
from pathlib import Path
|
|
26
|
-
from typing import Tuple
|
|
27
|
-
|
|
28
|
-
import egse.dsi.constants as constants
|
|
29
|
-
from egse.config import find_file
|
|
30
|
-
from egse.dsi.constants import esl_rmap_error_codes
|
|
31
|
-
from egse.dsi.esl import esl_flush
|
|
32
|
-
from egse.dsi.esl import esl_get_product_string
|
|
33
|
-
from egse.dsi.esl import esl_p
|
|
34
|
-
from egse.dsi.esl import esl_read_packet
|
|
35
|
-
from egse.dsi.esl import esl_write_packet
|
|
36
|
-
from egse.dsi.esl import pretty_print_packet
|
|
37
|
-
from egse.settings import Settings
|
|
38
|
-
from egse.system import get_os_name
|
|
39
|
-
from egse.system import get_os_version
|
|
40
|
-
|
|
41
|
-
logger = logging.getLogger(__name__)
|
|
42
|
-
|
|
43
|
-
dsi_settings = Settings.load("DSI")
|
|
44
|
-
|
|
45
|
-
# Maintain a transmit and receive buffer
|
|
46
|
-
|
|
47
|
-
rxbuf = ctypes.create_string_buffer(dsi_settings.RX_BUFFER_LENGTH)
|
|
48
|
-
txbuf = ctypes.create_string_buffer(dsi_settings.TX_BUFFER_LENGTH)
|
|
49
|
-
|
|
50
|
-
# Initialize the status variable which is a c pointer that is set by the library routines to
|
|
51
|
-
# pass a status.
|
|
52
|
-
|
|
53
|
-
status = c_int(0)
|
|
54
|
-
status_p = ctypes.pointer(status)
|
|
55
|
-
|
|
56
|
-
# NOTE: These memory areas are currently equal for N-FEE and F-FEE. Don't know if this will
|
|
57
|
-
# change in the future.
|
|
58
|
-
|
|
59
|
-
CRITICAL_AREA_START = 0x0000_0000
|
|
60
|
-
CRITICAL_AREA_END = 0x0000_00FC
|
|
61
|
-
GENERAL_AREA_START = 0x0000_0100
|
|
62
|
-
GENERAL_AREA_END = 0x0000_06FC
|
|
63
|
-
HK_AREA_START = 0x0000_0700
|
|
64
|
-
HK_AREA_END = 0x0000_07FC
|
|
65
|
-
WINDOWING_AREA_START = 0x0080_0000
|
|
66
|
-
WINDOWING_AREA_END = 0x00FF_FFFC
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
class ESL_RMAP(Structure):
|
|
70
|
-
_fields_ = [
|
|
71
|
-
("spw_device", esl_p),
|
|
72
|
-
("target_key", c_ubyte),
|
|
73
|
-
("target_logical_address", c_ubyte),
|
|
74
|
-
("target_spw_address", c_ubyte * 12),
|
|
75
|
-
("target_spw_address_len", c_int),
|
|
76
|
-
("reply_spw_address", c_ubyte * 12),
|
|
77
|
-
("reply_spw_address_len", c_int),
|
|
78
|
-
("initiator_logical_address", c_ubyte),
|
|
79
|
-
("transaction_identifier", c_uint),
|
|
80
|
-
("ESL_RMAP_error", c_int)
|
|
81
|
-
]
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
rmap_p = POINTER(ESL_RMAP)
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
class RMAPError(Exception):
|
|
88
|
-
pass
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
# Depending on the OS, and the OS version, we load the dynamic library from a specific location
|
|
92
|
-
# Only some OS/OS-version combinations are supported.
|
|
93
|
-
|
|
94
|
-
if get_os_name() == 'macos':
|
|
95
|
-
in_dir = 'lib/macOS'
|
|
96
|
-
elif get_os_name() == 'debian':
|
|
97
|
-
in_dir = 'lib/Debian'
|
|
98
|
-
elif get_os_name() == 'centos':
|
|
99
|
-
in_dir = 'lib/CentOS-7' if get_os_version().startswith('7') else 'lib/CentOS-8'
|
|
100
|
-
elif get_os_name() == 'ubuntu':
|
|
101
|
-
in_dir = 'lib/Ubuntu-20' if get_os_version().startswith('20') else 'lib/Linux'
|
|
102
|
-
else:
|
|
103
|
-
in_dir = None
|
|
104
|
-
|
|
105
|
-
dylib_filename = Path(dsi_settings.RMAP_DYLIB_FILENAME)
|
|
106
|
-
|
|
107
|
-
logger.debug(f"Locating shared library {dylib_filename} in dir '{in_dir}'")
|
|
108
|
-
|
|
109
|
-
dylib_filename = find_file(dylib_filename, in_dir=in_dir)
|
|
110
|
-
|
|
111
|
-
logger.debug(f"Loading shared library: {dylib_filename}")
|
|
112
|
-
|
|
113
|
-
if not dylib_filename:
|
|
114
|
-
raise FileNotFoundError(f"Could not find dynamic library: {dylib_filename}")
|
|
115
|
-
|
|
116
|
-
librmap = cdll.LoadLibrary(dylib_filename)
|
|
117
|
-
|
|
118
|
-
# Mapping of functions.
|
|
119
|
-
# Please note that when there is no need to wrap the C library function, we do not take the burden
|
|
120
|
-
|
|
121
|
-
librmap_open = librmap.ESL_RMAP_open
|
|
122
|
-
librmap_open.argtypes = [esl_p]
|
|
123
|
-
librmap_open.restype = rmap_p
|
|
124
|
-
|
|
125
|
-
librmap_set_verbosity = librmap.ESL_RMAP_set_verbosity
|
|
126
|
-
librmap_set_verbosity.argtypes = [c_int]
|
|
127
|
-
|
|
128
|
-
librmap_get_target_key = librmap.ESL_RMAP_get_target_key
|
|
129
|
-
librmap_get_target_key.argtypes = [rmap_p]
|
|
130
|
-
librmap_get_target_key.restype = c_ubyte
|
|
131
|
-
|
|
132
|
-
librmap_set_target_key = librmap.ESL_RMAP_set_target_key
|
|
133
|
-
librmap_set_target_key.argtypes = [rmap_p, c_ubyte]
|
|
134
|
-
|
|
135
|
-
librmap_get_target_logical_address = librmap.ESL_RMAP_get_target_logical_address
|
|
136
|
-
librmap_get_target_logical_address.argtypes = [rmap_p]
|
|
137
|
-
librmap_get_target_logical_address.restype = c_ubyte
|
|
138
|
-
|
|
139
|
-
librmap_set_target_logical_address = librmap.ESL_RMAP_set_target_logical_address
|
|
140
|
-
librmap_set_target_logical_address.argtypes = [rmap_p, c_ubyte]
|
|
141
|
-
|
|
142
|
-
librmap_set_target_spw_address = librmap.ESL_RMAP_set_target_spw_address
|
|
143
|
-
librmap_set_target_spw_address.argtypes = [rmap_p, c_char_p, c_int]
|
|
144
|
-
|
|
145
|
-
librmap_get_initiator_logical_address = librmap.ESL_RMAP_get_initiator_logical_address
|
|
146
|
-
librmap_get_initiator_logical_address.argtypes = [rmap_p]
|
|
147
|
-
librmap_get_initiator_logical_address.restype = c_ubyte
|
|
148
|
-
|
|
149
|
-
librmap_set_initiator_logical_address = librmap.ESL_RMAP_set_initiator_logical_address
|
|
150
|
-
librmap_set_initiator_logical_address.argtypes = [rmap_p, c_ubyte]
|
|
151
|
-
|
|
152
|
-
librmap_crc_check = librmap.RMAP_crc_check
|
|
153
|
-
librmap_crc_check.argtypes = [c_char_p, c_uint, c_uint]
|
|
154
|
-
librmap_crc_check.restype = c_uint
|
|
155
|
-
|
|
156
|
-
librmap_read = librmap.ESL_RMAP_read
|
|
157
|
-
librmap_read.argtypes = [rmap_p, c_ulonglong, c_char_p, c_uint, c_int_p]
|
|
158
|
-
librmap_read.restype = c_int
|
|
159
|
-
|
|
160
|
-
librmap_read_TO = librmap.ESL_RMAP_read_TO
|
|
161
|
-
librmap_read_TO.argtypes = [rmap_p, c_ulonglong, c_char_p, c_uint, c_int_p, c_int]
|
|
162
|
-
librmap_read_TO.restype = c_int
|
|
163
|
-
|
|
164
|
-
librmap_write = librmap.ESL_RMAP_write
|
|
165
|
-
librmap_write.argtypes = [rmap_p, c_ulonglong, c_char_p, c_uint, c_int_p]
|
|
166
|
-
librmap_write.restype = c_int
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
@contextmanager
|
|
170
|
-
def rmap_connection(esl_link):
|
|
171
|
-
"""
|
|
172
|
-
Context manager that opens an RMAP connection on the EtherSpaceLink ESL.
|
|
173
|
-
|
|
174
|
-
Args:
|
|
175
|
-
esl_link (ESL): the ESL structure that defines the connection to the DSI
|
|
176
|
-
|
|
177
|
-
Returns:
|
|
178
|
-
an RMAP link connection
|
|
179
|
-
"""
|
|
180
|
-
yield rmap_open_connection(esl_link)
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
def rmap_open_connection(esl_link):
|
|
184
|
-
|
|
185
|
-
logger.info(f"Open and setup RMAP connection to {esl_get_product_string(esl_link)}")
|
|
186
|
-
|
|
187
|
-
rmap_link = librmap_open(esl_link)
|
|
188
|
-
if not rmap_link:
|
|
189
|
-
raise RMAPError(f"Couldn't open RMAP connection to {esl_get_product_string(esl_link)}")
|
|
190
|
-
|
|
191
|
-
rmap_set_verbosity(1) # 1=normal; 5 or 15 for lots of debugging
|
|
192
|
-
|
|
193
|
-
logger.info("RMAP connection opened successfully.")
|
|
194
|
-
|
|
195
|
-
return rmap_link
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
def rmap_configure(rmap_link: ESL_RMAP, initiator_logical_address,
|
|
199
|
-
target_key=constants.RMAP_TARGET_KEY,
|
|
200
|
-
target_logical_address=constants.RMAP_TARGET_LOGICAL_ADDRESS_DEFAULT):
|
|
201
|
-
"""
|
|
202
|
-
Configure the RMAP EtherSpaceWire link.
|
|
203
|
-
|
|
204
|
-
Args:
|
|
205
|
-
rmap_link: the RMAP link connection
|
|
206
|
-
initiator_logical_address: logical address of the SpaceWire node that starts the transaction
|
|
207
|
-
target_key: the key field used for command authorisation
|
|
208
|
-
target_logical_address: logical address of the target node (default: 0xFE)
|
|
209
|
-
|
|
210
|
-
Returns:
|
|
211
|
-
Nothing
|
|
212
|
-
|
|
213
|
-
"""
|
|
214
|
-
rmap_set_initiator_logical_address(rmap_link, initiator_logical_address)
|
|
215
|
-
rmap_set_target_key(rmap_link, target_key)
|
|
216
|
-
rmap_set_target_logical_address(rmap_link, target_logical_address)
|
|
217
|
-
rmap_set_target_spw_address(rmap_link, b'\x00', 0)
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
# FIXME: Is this code rmap_read() still needed? We now have rmap_read_request()
|
|
221
|
-
# which handles everything this code does, except it doesn't use the ESL_RMAP
|
|
222
|
-
# dynamic library!
|
|
223
|
-
|
|
224
|
-
def rmap_read(rmap_link: ESL_RMAP, address: int, length: int, timeout: int = 1000):
|
|
225
|
-
"""
|
|
226
|
-
Read `length` bytes from the remote memory starting at `address`. If there is no reply
|
|
227
|
-
after the given `timeout`, TODO: WHAT WILL HAPPEN THEN?
|
|
228
|
-
|
|
229
|
-
.. note:: We are using the global ``rxbuf`` read buffer here.
|
|
230
|
-
The content of the buffer will be overwritten by the RMAP read request.
|
|
231
|
-
|
|
232
|
-
Args:
|
|
233
|
-
rmap_link: the RMAP link connection
|
|
234
|
-
address: the start address (32-bit aligned) in the remote memory
|
|
235
|
-
length: the number of bytes to read from the remote memory
|
|
236
|
-
timeout: timeout in milli-seconds
|
|
237
|
-
|
|
238
|
-
Returns:
|
|
239
|
-
the buffer containing the data read from the remote memory.
|
|
240
|
-
|
|
241
|
-
"""
|
|
242
|
-
|
|
243
|
-
data_length = librmap_read_TO(rmap_link, address, rxbuf, length, status_p, timeout)
|
|
244
|
-
|
|
245
|
-
# If data_length < 0 it can have the following values:
|
|
246
|
-
# -1 = status was != 0 indicating a read error, the packet was eaten...discarded?
|
|
247
|
-
# -4 = wrong TLA field in header
|
|
248
|
-
# -5 = wrong TID field in header
|
|
249
|
-
|
|
250
|
-
# FIXME: Think about if we should raise an RMAPError here instead of returning None when result is negative.
|
|
251
|
-
# I would go for an Exception, since we loose the information on the error anyway as code information (
|
|
252
|
-
# None is returned, not data_length), and now the caller must check the return code from this read command.
|
|
253
|
-
|
|
254
|
-
if data_length < 0:
|
|
255
|
-
logger.warning(
|
|
256
|
-
f"Couldn't read data within timeout of {timeout} ms, "
|
|
257
|
-
f"ESL RMAP Error Code = {esl_rmap_error_codes[rmap_link.contents.ESL_RMAP_error]} "
|
|
258
|
-
f"[{rmap_link.contents.ESL_RMAP_error}]"
|
|
259
|
-
)
|
|
260
|
-
return None
|
|
261
|
-
else:
|
|
262
|
-
return rxbuf[:data_length]
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
def rmap_read_request(rmap_link: ESL_RMAP, address: int, length: int, timeout: int = 1000) -> Tuple[int, bytes]:
|
|
266
|
-
"""
|
|
267
|
-
Read `length` bytes from the remote memory starting at `address`.
|
|
268
|
-
|
|
269
|
-
.. todo:: the timeout parameter is currently not implemented
|
|
270
|
-
|
|
271
|
-
Args:
|
|
272
|
-
rmap_link: the RMAP link connection
|
|
273
|
-
address: the start address (32-bit aligned) in the remote memory
|
|
274
|
-
length: the number of bytes to read from the remote memory
|
|
275
|
-
timeout: timeout in milli-seconds
|
|
276
|
-
|
|
277
|
-
Returns:
|
|
278
|
-
A tuple containing the terminator value and the RMAP Reply packet with the data read from the remote memory.
|
|
279
|
-
|
|
280
|
-
"""
|
|
281
|
-
buffer = create_rmap_read_request_packet(rmap_link, address, length)
|
|
282
|
-
|
|
283
|
-
logger.log(5, "Pretty Print Read Request Packet:\n" + pretty_print_packet(buffer))
|
|
284
|
-
|
|
285
|
-
result = esl_write_packet(rmap_link.contents.spw_device, buffer, len(buffer), constants.ESL_EOP)
|
|
286
|
-
if result:
|
|
287
|
-
raise RMAPError(
|
|
288
|
-
f"Couldn't send data within timeout of {timeout} ms, "
|
|
289
|
-
f"ESL RMAP Error Code = {esl_rmap_error_codes[rmap_link.contents.ESL_RMAP_error]} ["
|
|
290
|
-
f"{rmap_link.contents.ESL_RMAP_error}]")
|
|
291
|
-
|
|
292
|
-
result = esl_flush(rmap_link.contents.spw_device)
|
|
293
|
-
if result:
|
|
294
|
-
raise RMAPError(
|
|
295
|
-
f"Couldn't send data or clear buffers, "
|
|
296
|
-
f"ESL RMAP Error Code = {esl_rmap_error_codes[rmap_link.contents.ESL_RMAP_error]} ["
|
|
297
|
-
f"{rmap_link.contents.ESL_RMAP_error}]")
|
|
298
|
-
|
|
299
|
-
# Read the read request reply
|
|
300
|
-
|
|
301
|
-
terminator, rx_buffer = esl_read_packet(rmap_link.contents.spw_device)
|
|
302
|
-
|
|
303
|
-
logger.log(5, "Pretty Print Read Request Reply Packet:\n" + pretty_print_packet(rx_buffer))
|
|
304
|
-
|
|
305
|
-
return terminator, rx_buffer
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
def rmap_write_request(rmap_link: ESL_RMAP,
|
|
309
|
-
address: int, data: bytes, length: int = 4, timeout: int = 1000) -> Tuple[int, bytes]:
|
|
310
|
-
"""
|
|
311
|
-
Sends an RMAP write command over the SpaceWire link.
|
|
312
|
-
|
|
313
|
-
Based on the address this function will decided to send a verified or unverified write request.
|
|
314
|
-
|
|
315
|
-
.. todo:: the timeout parameter is currently not implemented
|
|
316
|
-
|
|
317
|
-
Args:
|
|
318
|
-
rmap_link (ESL_RMAP): the RMAP link connection
|
|
319
|
-
address: the starting memory address to which the data from buffer will be written
|
|
320
|
-
data: the data that will be written into the targets memory
|
|
321
|
-
length: the number of bytes to write (the buffer maybe longer) [default=4]
|
|
322
|
-
timeout: timeout in milliseconds [default=1000]
|
|
323
|
-
|
|
324
|
-
Returns:
|
|
325
|
-
return_code: zero (0) on success.
|
|
326
|
-
|
|
327
|
-
Raises:
|
|
328
|
-
RMAPError: when data can not be written on the target.
|
|
329
|
-
|
|
330
|
-
"""
|
|
331
|
-
|
|
332
|
-
if CRITICAL_AREA_START <= address <= CRITICAL_AREA_END:
|
|
333
|
-
buffer = create_rmap_verified_write_packet(rmap_link, address, data)
|
|
334
|
-
else:
|
|
335
|
-
buffer = create_rmap_unverified_write_packet(rmap_link, address, data, length)
|
|
336
|
-
|
|
337
|
-
logger.log(5, "Pretty Print Write Request Packet:\n" + pretty_print_packet(buffer))
|
|
338
|
-
|
|
339
|
-
result = esl_write_packet(rmap_link.contents.spw_device, buffer, len(buffer), constants.ESL_EOP)
|
|
340
|
-
if result:
|
|
341
|
-
raise RMAPError(
|
|
342
|
-
f"Couldn't send data within timeout of {timeout} ms, "
|
|
343
|
-
f"ESL RMAP Error Code = {esl_rmap_error_codes[rmap_link.contents.ESL_RMAP_error]} ["
|
|
344
|
-
f"{rmap_link.contents.ESL_RMAP_error}]")
|
|
345
|
-
|
|
346
|
-
result = esl_flush(rmap_link.contents.spw_device)
|
|
347
|
-
if result:
|
|
348
|
-
raise RMAPError(
|
|
349
|
-
f"Couldn't send data or clear buffers, "
|
|
350
|
-
f"ESL RMAP Error Code = {esl_rmap_error_codes[rmap_link.contents.ESL_RMAP_error]} ["
|
|
351
|
-
f"{rmap_link.contents.ESL_RMAP_error}]")
|
|
352
|
-
|
|
353
|
-
# Read the write reply
|
|
354
|
-
|
|
355
|
-
terminator, rx_buffer = esl_read_packet(rmap_link.contents.spw_device)
|
|
356
|
-
|
|
357
|
-
logger.log(5, "Pretty Print Write Request Reply Packet:\n" + pretty_print_packet(rx_buffer))
|
|
358
|
-
|
|
359
|
-
return terminator, rx_buffer
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
def create_rmap_read_request_packet(rmap_link: ESL_RMAP, address: int, length: int) -> ctypes.Array:
|
|
363
|
-
"""
|
|
364
|
-
Creates an RMAP Read Request SpaceWire packet.
|
|
365
|
-
|
|
366
|
-
The read request is an RMAP command that read a number of bytes from the FEE register memory.
|
|
367
|
-
|
|
368
|
-
The function returns a ``ctypes`` character array (which is basically a bytes array) that
|
|
369
|
-
can be passed into the EtherSpaceLink library function ``esl_write_packet()``.
|
|
370
|
-
|
|
371
|
-
Address shall be within the 0x0000_0000 and 0x00FF_FFFC. The memory map (register) is divided
|
|
372
|
-
in the following areas:
|
|
373
|
-
|
|
374
|
-
0x0000_0000 - 0x0000_00FC Critical Configuration Area (verified write)
|
|
375
|
-
0x0000_0100 - 0x0000_06FC General Configuration Area (unverified write)
|
|
376
|
-
0x0000_0700 - 0x0000_07FC Housekeeping area
|
|
377
|
-
0x0000_0800 - 0x007F_FFFC Not Supported
|
|
378
|
-
0x0080_0000 - 0x00FF_FFFC Windowing Area (unverified write)
|
|
379
|
-
0x0010_0000 - 0xFFFF_FFFC Not Supported
|
|
380
|
-
|
|
381
|
-
All read requests to the critical area shall have a fixed data length of 4 bytes.
|
|
382
|
-
All read requests to a general area shall have a maximum data length of 256 bytes.
|
|
383
|
-
All read requests to the housekeeping area shall have a maximum data length of 256 bytes.
|
|
384
|
-
All read requests to the windowing area shall have a maximum data length of 4096 bytes.
|
|
385
|
-
|
|
386
|
-
Args:
|
|
387
|
-
rmap_link (ESL_RMAP): the RMAP link connection
|
|
388
|
-
address (int): the FEE register memory address
|
|
389
|
-
length (int): the data length
|
|
390
|
-
|
|
391
|
-
Returns:
|
|
392
|
-
a bytes array containing the full RMAP Read Request packet.
|
|
393
|
-
"""
|
|
394
|
-
|
|
395
|
-
check_address_and_data_length(address, length)
|
|
396
|
-
|
|
397
|
-
buf = ctypes.create_string_buffer(16)
|
|
398
|
-
|
|
399
|
-
# The transaction identifier shall be incremented for each read request
|
|
400
|
-
|
|
401
|
-
tid = update_transaction_identifier(rmap_link)
|
|
402
|
-
|
|
403
|
-
# NOTE: The first bytes would each carry the target SpW address or a destination port,
|
|
404
|
-
# but this is not used for point-to-point connections, so we're safe.
|
|
405
|
-
|
|
406
|
-
buf[0] = 0x51 # Target N-FEE or F-FEE
|
|
407
|
-
buf[1] = 0x01 # RMAP Protocol ID
|
|
408
|
-
buf[2] = 0x4C # Instruction: 0b1001100, RMAP Request, Read, Incrementing address, reply address = 0
|
|
409
|
-
buf[3] = 0xD1 # Destination Key
|
|
410
|
-
buf[4] = 0x50 # Initiator is always the DPU
|
|
411
|
-
buf[5] = (tid >> 8) & 0xFF # MSB of the Transition ID
|
|
412
|
-
buf[6] = tid & 0xFF # LSB of the Transition ID
|
|
413
|
-
buf[7] = 0x00 # Extended address is not used
|
|
414
|
-
buf[8] = (address >> 24) & 0xFF # address (MSB)
|
|
415
|
-
buf[9] = (address >> 16) & 0xFF # address
|
|
416
|
-
buf[10] = (address >> 8) & 0xFF # address
|
|
417
|
-
buf[11] = address & 0xFF # address (LSB)
|
|
418
|
-
buf[12] = (length >> 16) & 0xFF # data length (MSB)
|
|
419
|
-
buf[13] = (length >> 8) & 0xFF # data length
|
|
420
|
-
buf[14] = length & 0xFF # data length (LSB)
|
|
421
|
-
buf[15] = rmap_crc_check(buf, 0, 15) & 0xFF
|
|
422
|
-
return buf
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
def create_rmap_write_reply_packet(rmap_link: ESL_RMAP) -> ctypes.Array:
|
|
426
|
-
pass
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
def create_rmap_read_reply_packet(rmap_link: ESL_RMAP, instruction_field: int, tid: int, status: int,
|
|
430
|
-
buffer: bytes, buffer_length: int) -> ctypes.Array:
|
|
431
|
-
"""
|
|
432
|
-
Creates an RMAP Reply to a RMAP Read Request packet.
|
|
433
|
-
|
|
434
|
-
The function returns a ``ctypes`` character array (which is basically a bytes array) that
|
|
435
|
-
can be passed into the EtherSpaceLink library function ``esl_write_packet()``.
|
|
436
|
-
|
|
437
|
-
Args:
|
|
438
|
-
rmap_link (ESL_RMAP): the RMAP link connection
|
|
439
|
-
instruction_field (int): the instruction field of the RMAP read request packet
|
|
440
|
-
tid (int): the transaction identifier of the read request packet
|
|
441
|
-
status (int): shall be 0 if the read request was successful, contain an error code otherwise.
|
|
442
|
-
TODO: which error code?
|
|
443
|
-
buffer (bytes): the data that was read as indicated by the read request
|
|
444
|
-
buffer_length (int): the data length
|
|
445
|
-
|
|
446
|
-
Returns:
|
|
447
|
-
packet: a ctypes Array containing the full RMAP Reply packet.
|
|
448
|
-
"""
|
|
449
|
-
|
|
450
|
-
buf = ctypes.create_string_buffer(12 + buffer_length + 1)
|
|
451
|
-
|
|
452
|
-
buf[0] = 0x50 # Initiator address N-DPU or F-DPU
|
|
453
|
-
buf[1] = 0x01 # RMAP Protocol ID
|
|
454
|
-
buf[2] = instruction_field & 0x3F # Clear the command bit as this is a reply
|
|
455
|
-
buf[3] = status & 0xFF # Status field: 0 on success
|
|
456
|
-
buf[4] = 0x51 # Target address is always the N-FEE or F-FEE
|
|
457
|
-
buf[5] = (tid >> 8) & 0xFF # MSB of the Transition ID
|
|
458
|
-
buf[6] = tid & 0xFF # LSB of the Transition ID
|
|
459
|
-
buf[7] = 0x00 # Reserved
|
|
460
|
-
buf[8] = (buffer_length >> 16) & 0xFF # data length (MSB)
|
|
461
|
-
buf[9] = (buffer_length >> 8) & 0xFF # data length
|
|
462
|
-
buf[10] = buffer_length & 0xFF # data length (LSB)
|
|
463
|
-
buf[11] = rmap_crc_check(buf, 0, 11) & 0xFF # Header CRC
|
|
464
|
-
|
|
465
|
-
# Note that we assume here that len(buffer) == buffer_length.
|
|
466
|
-
|
|
467
|
-
if len(buffer) != buffer_length:
|
|
468
|
-
logger.warning(
|
|
469
|
-
f"While creating an RMAP read reply packet, the length of the buffer ({len(buffer)}) not equals "
|
|
470
|
-
f"the buffer_length ({buffer_length})"
|
|
471
|
-
)
|
|
472
|
-
|
|
473
|
-
for idx, value in enumerate(buffer):
|
|
474
|
-
buf[12+idx] = value
|
|
475
|
-
|
|
476
|
-
buf[12 + buffer_length] = rmap_crc_check(buf, 12, 12 + buffer_length) & 0xFF # data CRC
|
|
477
|
-
|
|
478
|
-
return buf
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
def create_rmap_verified_write_packet(rmap_link: ESL_RMAP, address: int, data: bytes) -> ctypes.Array:
|
|
482
|
-
"""
|
|
483
|
-
Create an RMAP packet for a verified write request on the FEE. The length of the data is by convention always 4
|
|
484
|
-
bytes and therefore not passed as an argument.
|
|
485
|
-
|
|
486
|
-
Args:
|
|
487
|
-
rmap_link: the RMAP link structure
|
|
488
|
-
address: the start memory address on the FEE register map
|
|
489
|
-
data: the data to be written in the register map at address [4 bytes]
|
|
490
|
-
|
|
491
|
-
Returns:
|
|
492
|
-
packet: a bytes object containing the SpaceWire packet.
|
|
493
|
-
"""
|
|
494
|
-
|
|
495
|
-
if len(data) < 4:
|
|
496
|
-
raise ValueError(f"The data argument should be at least 4 bytes, but it is only {len(data)} bytes.")
|
|
497
|
-
|
|
498
|
-
if address > CRITICAL_AREA_END:
|
|
499
|
-
raise ValueError(f"The address range for critical configuration is [0x00 - 0xFC].")
|
|
500
|
-
|
|
501
|
-
tid = update_transaction_identifier(rmap_link)
|
|
502
|
-
|
|
503
|
-
# Buffer length is fixed at 24 bytes since the data length is fixed at 4 bytes (32 bit addressing)
|
|
504
|
-
|
|
505
|
-
buf = ctypes.create_string_buffer(21)
|
|
506
|
-
offset = 0
|
|
507
|
-
|
|
508
|
-
# The values below are taken from the PLATO N-FEE to N-DPU Interface Requirements Document [PLATO-DLR-PL-ICD-0010]
|
|
509
|
-
|
|
510
|
-
buf[offset+0] = 0x51 # Logical Address
|
|
511
|
-
buf[offset+1] = 0x01 # Protocol ID
|
|
512
|
-
buf[offset+2] = 0x7C # Instruction
|
|
513
|
-
buf[offset+3] = 0xD1 # Key
|
|
514
|
-
buf[offset+4] = 0x50 # Initiator Address
|
|
515
|
-
buf[offset+5] = (tid >> 8) & 0xFF # MSB of the Transition ID
|
|
516
|
-
buf[offset+6] = tid & 0xFF # LSB of the Transition ID
|
|
517
|
-
buf[offset+7] = 0x00 # Extended address
|
|
518
|
-
buf[offset+8] = (address >> 24) & 0xFF # address (MSB)
|
|
519
|
-
buf[offset+9] = (address >> 16) & 0xFF # address
|
|
520
|
-
buf[offset+10] = (address >> 8) & 0xFF # address
|
|
521
|
-
buf[offset+11] = address & 0xFF # address (LSB)
|
|
522
|
-
buf[offset+12] = 0x00 # data length (MSB)
|
|
523
|
-
buf[offset+13] = 0x00 # data length
|
|
524
|
-
buf[offset+14] = 0x04 # data length (LSB)
|
|
525
|
-
buf[offset+15] = rmap_crc_check(buf, 0, 15) & 0xFF # header CRC
|
|
526
|
-
buf[offset+16] = data[0]
|
|
527
|
-
buf[offset+17] = data[1]
|
|
528
|
-
buf[offset+18] = data[2]
|
|
529
|
-
buf[offset+19] = data[3]
|
|
530
|
-
buf[offset+20] = rmap_crc_check(buf, 16, 4) & 0xFF # data CRC
|
|
531
|
-
|
|
532
|
-
return buf
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
def create_rmap_unverified_write_packet(rmap_link: ESL_RMAP, address: int, data: bytes, length: int) -> ctypes.Array:
|
|
536
|
-
"""
|
|
537
|
-
Create an RMAP packet for a unverified write request on the FEE.
|
|
538
|
-
|
|
539
|
-
Args:
|
|
540
|
-
rmap_link: the RMAP link structure
|
|
541
|
-
address: the start memory address on the FEE register map
|
|
542
|
-
data: the data to be written in the register map at address
|
|
543
|
-
length: the length of the data
|
|
544
|
-
|
|
545
|
-
Returns:
|
|
546
|
-
packet: a bytes object containing the SpaceWire packet.
|
|
547
|
-
"""
|
|
548
|
-
|
|
549
|
-
# We can only handle data for which the length >= the given length argument.
|
|
550
|
-
|
|
551
|
-
if len(data) < length:
|
|
552
|
-
raise ValueError(
|
|
553
|
-
f"The length of the data argument ({len(data)}) is smaller than "
|
|
554
|
-
f"the given length argument ({length})."
|
|
555
|
-
)
|
|
556
|
-
|
|
557
|
-
if len(data) > length:
|
|
558
|
-
logger.warning(
|
|
559
|
-
f"The length of the data argument ({len(data)}) is larger than "
|
|
560
|
-
f"the given length argument ({length}). The data will be truncated "
|
|
561
|
-
f"when copied into the packet."
|
|
562
|
-
)
|
|
563
|
-
|
|
564
|
-
if address <= CRITICAL_AREA_END:
|
|
565
|
-
raise ValueError(f"The given address (0x{address:08X}) is in the range for critical configuration is [0x00 - "
|
|
566
|
-
f"0xFC]. Use the verified write function for this.")
|
|
567
|
-
|
|
568
|
-
tid = update_transaction_identifier(rmap_link)
|
|
569
|
-
|
|
570
|
-
# Buffer length is fixed at 24 bytes since the data length is fixed at 4 bytes (32 bit addressing)
|
|
571
|
-
|
|
572
|
-
buf = ctypes.create_string_buffer(16 + length + 1)
|
|
573
|
-
offset = 0
|
|
574
|
-
|
|
575
|
-
buf[offset+0] = 0x51 # Logical Address
|
|
576
|
-
buf[offset+1] = 0x01 # Protocol ID
|
|
577
|
-
buf[offset+2] = 0x6C # Instruction
|
|
578
|
-
buf[offset+3] = 0xD1 # Key
|
|
579
|
-
buf[offset+4] = 0x50 # Initiator Address
|
|
580
|
-
buf[offset+5] = (tid >> 8) & 0xFF # MSB of the Transition ID
|
|
581
|
-
buf[offset+6] = tid & 0xFF # LSB of the Transition ID
|
|
582
|
-
buf[offset+7] = 0x00 # Extended address
|
|
583
|
-
buf[offset+8] = (address >> 24) & 0xFF # address (MSB)
|
|
584
|
-
buf[offset+9] = (address >> 16) & 0xFF # address
|
|
585
|
-
buf[offset+10] = (address >> 8) & 0xFF # address
|
|
586
|
-
buf[offset+11] = address & 0xFF # address (LSB)
|
|
587
|
-
buf[offset+12] = (length >> 16) & 0xFF # data length (MSB)
|
|
588
|
-
buf[offset+13] = (length >> 8) & 0xFF # data length
|
|
589
|
-
buf[offset+14] = length & 0xFF # data length (LSB)
|
|
590
|
-
buf[offset+15] = rmap_crc_check(buf, 0, 15) & 0xFF # header CRC
|
|
591
|
-
|
|
592
|
-
offset = offset + 16
|
|
593
|
-
|
|
594
|
-
for idx, value in enumerate(data):
|
|
595
|
-
buf[offset+idx] = value
|
|
596
|
-
|
|
597
|
-
buf[offset + length] = rmap_crc_check(buf, offset, length) & 0xFF # data CRC
|
|
598
|
-
|
|
599
|
-
return buf
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
def rmap_set_verbosity(flags):
|
|
603
|
-
"""
|
|
604
|
-
Set vebosity of the RMAP API.
|
|
605
|
-
|
|
606
|
-
Report errors by default:
|
|
607
|
-
|
|
608
|
-
* bitval 1 : output textual error messages
|
|
609
|
-
* bitval 2 : output SpaceWire read/write packet tracing
|
|
610
|
-
* bitval 4 : output API function call tracing
|
|
611
|
-
* bitval 8 : output API parameter / data packet tracing
|
|
612
|
-
* bitval 16 : output API data packet tracing
|
|
613
|
-
|
|
614
|
-
Args:
|
|
615
|
-
flags (int): verbosy level
|
|
616
|
-
|
|
617
|
-
Returns:
|
|
618
|
-
None
|
|
619
|
-
|
|
620
|
-
"""
|
|
621
|
-
librmap_set_verbosity(flags)
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
def rmap_get_target_key(rmap_link):
|
|
625
|
-
logger.debug("Calling rmap_get_target_key(rmap_link)")
|
|
626
|
-
return librmap_get_target_key(rmap_link)
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
def rmap_set_target_key(rmap_link, key):
|
|
630
|
-
logger.debug(f"Calling rmap_set_target_key({key})")
|
|
631
|
-
librmap_set_target_key(rmap_link, key)
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
def rmap_get_target_logical_address(rmap_link):
|
|
635
|
-
logger.debug("Calling rmap_get_target_logical_address(rmap_link)")
|
|
636
|
-
return librmap_get_target_logical_address(rmap_link)
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
def rmap_set_target_logical_address(rmap_link, address):
|
|
640
|
-
logger.debug(f"Calling rmap_set_target_logical_address(rmap_link, 0x{address:02X})")
|
|
641
|
-
librmap_set_target_logical_address(rmap_link, address)
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
def rmap_set_target_spw_address(rmap_link, spw_address, spw_address_length):
|
|
645
|
-
logger.debug(f"Calling rmap_set_target_spw_address(rmap_link, spw_address, {spw_address_length})")
|
|
646
|
-
librmap_set_target_spw_address(rmap_link, spw_address, spw_address_length)
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
def rmap_get_initiator_logical_address(rmap_link):
|
|
650
|
-
# logger.debug("Calling rmap_get_initiator_logical_address(rmap_link)")
|
|
651
|
-
return librmap_get_initiator_logical_address(rmap_link)
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
def rmap_set_initiator_logical_address(rmap_link, address):
|
|
655
|
-
# logger.debug(f"Calling rmap_set_initiator_logical_address(rmap_link, 0x{address:02X})")
|
|
656
|
-
librmap_set_initiator_logical_address(rmap_link, address)
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
def rmap_crc_check(data, start, length):
|
|
660
|
-
# logger.debug(f"Calling rmap_crc_check(data, {start}, {length})")
|
|
661
|
-
return librmap_crc_check(data, start, length)
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
class CheckError(RMAPError):
|
|
665
|
-
"""
|
|
666
|
-
Raised when a check fails and you want to pass a status values along with the message.
|
|
667
|
-
"""
|
|
668
|
-
|
|
669
|
-
def __init__(self, message, status):
|
|
670
|
-
self.message = message
|
|
671
|
-
self.status = status
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
def is_rmap(rx_buffer):
|
|
675
|
-
return get_protocol_id(rx_buffer) == constants.RMAP_PROTOCOL_ID
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
# Functions to interpret the Instrument Field
|
|
679
|
-
|
|
680
|
-
def is_reserved(instruction):
|
|
681
|
-
"""The reserved bit of the 2-bit packet type field from the instruction field.
|
|
682
|
-
|
|
683
|
-
For PLATO this bit shall be zero as the 0b10 and 0b11 packet field values are reserved.
|
|
684
|
-
|
|
685
|
-
Returns:
|
|
686
|
-
bit value: 1 or 0.
|
|
687
|
-
"""
|
|
688
|
-
return (instruction & 0b10000000) >> 7
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
def is_command(instruction):
|
|
692
|
-
"""Returns True if the RMAP packet is a command packet."""
|
|
693
|
-
return (instruction & 0b01000000) >> 6
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
def is_reply(instruction):
|
|
697
|
-
"""Returns True if the RMAP packet is a reply to a previous command packet."""
|
|
698
|
-
return not is_command(instruction)
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
def is_write(instruction):
|
|
702
|
-
"""Returns True if the RMAP packet is a write request command packet."""
|
|
703
|
-
return (instruction & 0b00100000) >> 5
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
def is_read(instruction):
|
|
707
|
-
"""Returns True if the RMAP packet is a read request command packet."""
|
|
708
|
-
return not is_write(instruction)
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
def is_verify(instruction):
|
|
712
|
-
"""Returns True if the RMAP packet needs to do a verify before write."""
|
|
713
|
-
return (instruction & 0b00010000) >> 4
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
def is_reply_required(instruction):
|
|
717
|
-
"""Returns True if the reply bit is set in the instruction field.
|
|
718
|
-
|
|
719
|
-
Args:
|
|
720
|
-
instruction (int): the instruction field of an RMAP packet
|
|
721
|
-
|
|
722
|
-
.. note:: the name of this function might be confusing.
|
|
723
|
-
|
|
724
|
-
This function does **not** test if the packet is a reply packet, but it checks
|
|
725
|
-
if the command requests a reply from the target. If you need to test if the
|
|
726
|
-
packet is a command or a reply, use the is_command() or is_reply() function.
|
|
727
|
-
|
|
728
|
-
"""
|
|
729
|
-
return (instruction & 0b00001000) >> 3
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
def is_increment(instruction):
|
|
733
|
-
"""Returns True if the data is written to sequential memory addresses."""
|
|
734
|
-
return (instruction & 0b00000100) >> 2
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
def reply_address_length(instruction):
|
|
738
|
-
"""Returns the content of the replay address length field.
|
|
739
|
-
|
|
740
|
-
The size of the replay address field is then decoded from the following table:
|
|
741
|
-
|
|
742
|
-
Address Field Length | Size of Address Field
|
|
743
|
-
----------------------+-----------------------
|
|
744
|
-
0b00 | 0 bytes
|
|
745
|
-
0b01 | 4 bytes
|
|
746
|
-
0b10 | 8 bytes
|
|
747
|
-
0b11 | 12 bytes
|
|
748
|
-
|
|
749
|
-
"""
|
|
750
|
-
return (instruction & 0b00000011) << 2
|
|
751
|
-
|
|
752
|
-
# Helper Functions ---------------------------------------------------------------------------------
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
def get_protocol_id(rx_buffer):
|
|
756
|
-
return rx_buffer[1]
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
def get_reply_address_field_length(rx_buffer) -> int:
|
|
760
|
-
"""Returns the size of reply address field.
|
|
761
|
-
|
|
762
|
-
This function returns the actual size of the reply address field. It doesn't return the content of the
|
|
763
|
-
reply address length field. If you need that information, use the reply_address_length() function that work on
|
|
764
|
-
the instruction field.
|
|
765
|
-
|
|
766
|
-
Returns:
|
|
767
|
-
length: the size of the reply address field.
|
|
768
|
-
"""
|
|
769
|
-
instruction = get_instruction_field(rx_buffer)
|
|
770
|
-
return reply_address_length(instruction) * 4
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
def get_data(rxbuf) -> bytes:
|
|
774
|
-
"""Return the data from the RMAP packet.
|
|
775
|
-
|
|
776
|
-
Raises:
|
|
777
|
-
ValueError: if there is no data section in the packet (TODO: not yet implemented)
|
|
778
|
-
"""
|
|
779
|
-
instruction_field = get_instruction_field(rxbuf)
|
|
780
|
-
address_length = get_reply_address_field_length(rxbuf)
|
|
781
|
-
data_length = get_data_length(rxbuf)
|
|
782
|
-
|
|
783
|
-
offset = 12 if is_read(instruction_field) else 16
|
|
784
|
-
|
|
785
|
-
return rxbuf[offset + address_length:offset + address_length + data_length]
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
def check_data_crc(rxbuf):
|
|
789
|
-
instruction_field = get_instruction_field(rxbuf)
|
|
790
|
-
address_length = get_reply_address_field_length(rxbuf)
|
|
791
|
-
data_length = get_data_length(rxbuf)
|
|
792
|
-
|
|
793
|
-
offset = 12 if is_read(instruction_field) else 16
|
|
794
|
-
idx = offset + address_length
|
|
795
|
-
|
|
796
|
-
d_crc = rxbuf[idx + data_length]
|
|
797
|
-
c_crc = rmap_crc_check(rxbuf, idx, data_length) & 0xFF
|
|
798
|
-
if d_crc != c_crc:
|
|
799
|
-
raise CheckError(
|
|
800
|
-
f"Data CRC doesn't match calculated CRC, d_crc=0x{d_crc:02X} & c_crc=0x{c_crc:02X}",
|
|
801
|
-
constants.RMAP_GENERAL_ERROR
|
|
802
|
-
)
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
def check_header_crc(rxbuf):
|
|
806
|
-
instruction_field = get_instruction_field(rxbuf)
|
|
807
|
-
if is_command(instruction_field):
|
|
808
|
-
offset = 15
|
|
809
|
-
elif is_write(instruction_field):
|
|
810
|
-
offset = 7
|
|
811
|
-
else:
|
|
812
|
-
offset = 11
|
|
813
|
-
|
|
814
|
-
idx = offset + get_reply_address_field_length(rxbuf)
|
|
815
|
-
h_crc = rxbuf[idx]
|
|
816
|
-
c_crc = rmap_crc_check(rxbuf, 0, idx)
|
|
817
|
-
if h_crc != c_crc:
|
|
818
|
-
raise CheckError("Header CRC doesn't match calculated CRC, h_crc=0x{:X} & c_crc=0x{:X}"
|
|
819
|
-
.format(h_crc, c_crc), constants.RMAP_GENERAL_ERROR)
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
def get_data_length(rxbuf) -> int:
|
|
823
|
-
"""Returns the length of the data in bytes.
|
|
824
|
-
|
|
825
|
-
Raises:
|
|
826
|
-
TypeError: when this method is used on a Write Request Reply packet (which has no
|
|
827
|
-
data length).
|
|
828
|
-
"""
|
|
829
|
-
instruction_field = get_instruction_field(rxbuf)
|
|
830
|
-
|
|
831
|
-
if not is_command(instruction_field) and is_write(instruction_field):
|
|
832
|
-
raise TypeError("There is no data length field for Write Request Reply packets, "
|
|
833
|
-
"asking for the data length is an invalid operation.")
|
|
834
|
-
|
|
835
|
-
offset = 12 if is_command(instruction_field) else 8
|
|
836
|
-
idx = offset + get_reply_address_field_length(rxbuf)
|
|
837
|
-
|
|
838
|
-
# We could use two alternative decoding methods here:
|
|
839
|
-
# int.from_bytes(rxbuf[idx:idx+3], byteorder='big') (timeit=1.166s)
|
|
840
|
-
# struct.unpack('>L', b'\x00' + rxbuf[idx:idx+3])[0] (timeit=0.670s)
|
|
841
|
-
data_length = struct.unpack('>L', b'\x00' + rxbuf[idx:idx + 3])[0]
|
|
842
|
-
return data_length
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
def get_address(rxbuf) -> int:
|
|
846
|
-
"""Returns the address field (including the extended address field if the address is 40-bits).
|
|
847
|
-
|
|
848
|
-
Raises:
|
|
849
|
-
TypeError: when this method is used on a Reply packet (which has no address field).
|
|
850
|
-
"""
|
|
851
|
-
instruction_field = get_instruction_field(rxbuf)
|
|
852
|
-
|
|
853
|
-
if not is_command(instruction_field):
|
|
854
|
-
raise TypeError("There is no address field for Reply packets, asking for the address is "
|
|
855
|
-
"an invalid operation.")
|
|
856
|
-
|
|
857
|
-
idx = 7 + get_reply_address_field_length(rxbuf)
|
|
858
|
-
extended_address = rxbuf[idx]
|
|
859
|
-
idx += 1
|
|
860
|
-
address = struct.unpack('>L', rxbuf[idx:idx + 4])[0]
|
|
861
|
-
if extended_address:
|
|
862
|
-
address = address + (extended_address << 32)
|
|
863
|
-
return address
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
def get_transaction_identifier(rxbuf):
|
|
867
|
-
idx = 5 + get_reply_address_field_length(rxbuf)
|
|
868
|
-
tid = struct.unpack('>h', rxbuf[idx:idx + 2])[0]
|
|
869
|
-
return tid
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
def get_initiator_logical_address(rxbuf):
|
|
873
|
-
idx = 4 + get_reply_address_field_length(rxbuf)
|
|
874
|
-
ila_rxbuf = rxbuf[idx]
|
|
875
|
-
return ila_rxbuf
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
def check_initiator_logical_address(rxbuf, ila):
|
|
879
|
-
ila_rxbuf = get_initiator_logical_address(rxbuf)
|
|
880
|
-
if ila != ila_rxbuf:
|
|
881
|
-
raise CheckError(
|
|
882
|
-
f"Initiator Logical Address doesn't match, ila=0x{ila:02X} & ila_rxbuf=0x{ila_rxbuf:02X}",
|
|
883
|
-
constants.RMAP_GENERAL_ERROR
|
|
884
|
-
)
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
def check_key(rmap_link, rxbuf):
|
|
888
|
-
idx = 3
|
|
889
|
-
key = rmap_get_target_key(rmap_link)
|
|
890
|
-
key_rxbuf = rxbuf[idx]
|
|
891
|
-
if key != key_rxbuf:
|
|
892
|
-
raise CheckError(
|
|
893
|
-
f"Key doesn't match, key={key} & key_rxbuf={key_rxbuf}", constants.RMAP_INVALID_KEY
|
|
894
|
-
)
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
def get_instruction_field(rxbuf):
|
|
898
|
-
idx = 2
|
|
899
|
-
return rxbuf[idx]
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
def check_instruction(rx_buffer) -> None:
|
|
903
|
-
"""
|
|
904
|
-
Check the instruction field for inconsistencies and report the values in the logger at DEBUG level.
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
Args:
|
|
908
|
-
rx_buffer (bytes): The read buffer which contains the SpW packet
|
|
909
|
-
|
|
910
|
-
Raises:
|
|
911
|
-
CheckError: when the reserved bit is not zero,
|
|
912
|
-
|
|
913
|
-
Returns:
|
|
914
|
-
None.
|
|
915
|
-
"""
|
|
916
|
-
# The Instruction Field is the third byte (base=0) of the packet buffer.
|
|
917
|
-
# Description of the Instruction Field can be found in ECSS-E-ST-50-52C.
|
|
918
|
-
|
|
919
|
-
instruction = get_instruction_field(rx_buffer)
|
|
920
|
-
if is_reserved(instruction):
|
|
921
|
-
raise CheckError(
|
|
922
|
-
f"Instruction field [{instruction:08b}] reserved bit is not 0x00",
|
|
923
|
-
constants.RMAP_NOT_IMPLEMENTED_AUTHORISED
|
|
924
|
-
)
|
|
925
|
-
|
|
926
|
-
msg = "RMAP Instruction Field: "
|
|
927
|
-
msg += "Command; " if is_command(instruction) else "Reply; "
|
|
928
|
-
msg += "write; " if is_write(instruction) else "read; "
|
|
929
|
-
msg += "verify; " if is_verify(instruction) else "don't verify; "
|
|
930
|
-
msg += "reply; " if is_reply_required(instruction) else "don't reply; "
|
|
931
|
-
msg += "increment; " if is_increment(instruction) else "no increment; "
|
|
932
|
-
|
|
933
|
-
logger.debug(msg)
|
|
934
|
-
if reply_address_length(instruction):
|
|
935
|
-
logger.debug(f"Reply address length = {reply_address_length(instruction)} bytes.")
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
def check_protocol_id(rxbuf):
|
|
939
|
-
idx = 1
|
|
940
|
-
protocol_id = rxbuf[idx]
|
|
941
|
-
if protocol_id != constants.RMAP_PROTOCOL_ID:
|
|
942
|
-
raise CheckError(
|
|
943
|
-
f"Protocol id is not the expected value {protocol_id}, expected {constants.RMAP_PROTOCOL_ID}",
|
|
944
|
-
constants.RMAP_GENERAL_ERROR)
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
def get_target_logical_address(rmap_link: ESL_RMAP, rxbuf: bytes) -> int:
|
|
948
|
-
tla_idx = 0
|
|
949
|
-
tla_rxbuf = rxbuf[tla_idx]
|
|
950
|
-
return tla_rxbuf
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
def check_target_logical_address(rmap_link, rxbuf, tla):
|
|
954
|
-
tla_rxbuf = get_target_logical_address(rmap_link, rxbuf)
|
|
955
|
-
if tla != tla_rxbuf:
|
|
956
|
-
raise CheckError(
|
|
957
|
-
f"Target Logical Address doesn't match, tla=0x{tla:02X} & rxbuf[0]=0x{tla_rxbuf:02X}",
|
|
958
|
-
constants.RMAP_GENERAL_ERROR
|
|
959
|
-
)
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
def update_transaction_identifier(rmap_link) -> int:
|
|
963
|
-
"""
|
|
964
|
-
Updates the transaction identifier and returns the new value.
|
|
965
|
-
|
|
966
|
-
Args:
|
|
967
|
-
rmap_link (ESL_RMAP): the RMAP link connection
|
|
968
|
-
|
|
969
|
-
Returns:
|
|
970
|
-
the updated transaction identifier (int).
|
|
971
|
-
"""
|
|
972
|
-
tid = rmap_link.contents.transaction_identifier
|
|
973
|
-
tid = (tid + 1) & 0xFFFF
|
|
974
|
-
rmap_link.contents.transaction_identifier = tid
|
|
975
|
-
return tid
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
def check_address_and_data_length(address: int, length: int) -> None:
|
|
979
|
-
"""
|
|
980
|
-
Checks the address and length in the range of memory areas used by the FEE.
|
|
981
|
-
|
|
982
|
-
The ranges are taken from the PLATO-DLR-PL-ICD-0010 N-FEE to N-DPU IRD.
|
|
983
|
-
|
|
984
|
-
Args:
|
|
985
|
-
address (int): the memory address of the FEE Register
|
|
986
|
-
length (int): the number of bytes requested
|
|
987
|
-
|
|
988
|
-
Raises:
|
|
989
|
-
RMAPError: when address + length fall outside any specified area.
|
|
990
|
-
"""
|
|
991
|
-
|
|
992
|
-
# All these restrictions have been relaxed on the N-FEE.
|
|
993
|
-
# We are returning here immediately instead of removing or commenting out the code.
|
|
994
|
-
# These reason is that we can then bring back restriction easier and gradually.
|
|
995
|
-
|
|
996
|
-
return
|
|
997
|
-
|
|
998
|
-
if length % 4:
|
|
999
|
-
raise RMAPError("The requested data length shall be a multiple of 4 bytes.", address, length)
|
|
1000
|
-
|
|
1001
|
-
if address % 4:
|
|
1002
|
-
raise RMAPError("The address shall be a multiple of 4 bytes.", address, length)
|
|
1003
|
-
|
|
1004
|
-
# Note that when checking the given data length, at the defined area end, we can still read 4 bytes.
|
|
1005
|
-
|
|
1006
|
-
if CRITICAL_AREA_START <= address <= CRITICAL_AREA_END:
|
|
1007
|
-
if length != 4:
|
|
1008
|
-
raise RMAPError("Read requests to the critical area have a fixed data length of 4 bytes.",
|
|
1009
|
-
address, length)
|
|
1010
|
-
|
|
1011
|
-
elif GENERAL_AREA_START <= address <= GENERAL_AREA_END:
|
|
1012
|
-
if length > 256:
|
|
1013
|
-
raise RMAPError(f"Read requests to the general area have a maximum data length of 256 bytes.",
|
|
1014
|
-
address, length)
|
|
1015
|
-
if address + length > GENERAL_AREA_END + 4:
|
|
1016
|
-
raise RMAPError(
|
|
1017
|
-
f"The requested data length for the general area is too large.\n"
|
|
1018
|
-
f"The address + length exceeds the general area boundaries.\n", address, length
|
|
1019
|
-
)
|
|
1020
|
-
|
|
1021
|
-
elif HK_AREA_START <= address <= HK_AREA_END:
|
|
1022
|
-
if length > 256:
|
|
1023
|
-
raise RMAPError(f"Read requests to the housekeeping area have a maximum data length of 256 bytes.",
|
|
1024
|
-
address, length)
|
|
1025
|
-
if address + length > HK_AREA_END + 4:
|
|
1026
|
-
raise RMAPError(
|
|
1027
|
-
f"The requested data length for the housekeeping area is too large.\n"
|
|
1028
|
-
f"The address + length exceeds the housekeeping area boundaries.\n", address, length
|
|
1029
|
-
)
|
|
1030
|
-
|
|
1031
|
-
elif WINDOWING_AREA_START <= address <= WINDOWING_AREA_END:
|
|
1032
|
-
if length > 4096:
|
|
1033
|
-
raise RMAPError(f"Read requests to the windowing area have a maximum data length of 4096 bytes.",
|
|
1034
|
-
address, length)
|
|
1035
|
-
if address + length > WINDOWING_AREA_END + 4:
|
|
1036
|
-
raise RMAPError(
|
|
1037
|
-
f"The requested data length for the windowing area is too large.\n"
|
|
1038
|
-
f"The address + length exceeds the windowing area boundaries.\n", address, length
|
|
1039
|
-
)
|
|
1040
|
-
|
|
1041
|
-
else:
|
|
1042
|
-
raise RMAPError(f"Register address for RMAP read requests is invalid.", address, length)
|