test_msgDtype
Tests for PayloadType.__dtype__ - numpy structured dtype mirroring the C struct layout.
- Each test:
Creates a payload object.
Gets a writable numpy view of the underlying C memory via sim_model.getObjectAddress.
Writes values through numpy and asserts the Python wrapper sees them (numpy → Python).
Writes values through the Python wrapper and asserts numpy sees them (Python → numpy).
- Coverage:
Primitive scalars with implicit padding (EpochMsgPayload)
1-D float arrays (AttStateMsgPayload)
2-D float array (SCMassPropsMsgPayload)
Enum field (DeviceStatusMsgPayload)
Char array + 2-D array + scalar (SpicePlanetStateMsgPayload)
Array of nested structs (AccDataMsgPayload)
Pointer field → uint64 in dtype (CameraImageMsgPayload)
Incomplete struct (C++ vectors) → None (JointArrayStateMsgPayload)
- test_msgDtype.test_accDataDtypeLayout()[source]
Check the accelerometer-packet nested dtype layout.
- test_msgDtype.test_accDataDtypeNumpyToPython()[source]
Check numpy writes into accelerometer-packet memory update Python fields.
- test_msgDtype.test_accDataDtypePythonToNumpy()[source]
Check Python accelerometer-packet writes are visible through the dtype view.
- test_msgDtype.test_attStateDtypeLayout()[source]
Check the attitude-state payload dtype layout and vector shapes.
- test_msgDtype.test_attStateDtypeNumpyToPython()[source]
Check numpy writes into attitude-state memory update Python fields.
- test_msgDtype.test_attStateDtypePythonToNumpy()[source]
Check Python attitude-state writes are visible through the dtype view.
- test_msgDtype.test_cameraImageDtypeLayout()[source]
Check the camera-image payload dtype layout and pointer field type.
- test_msgDtype.test_cameraImageDtypeNumpyToPython()[source]
Check numpy writes into camera-image memory update Python fields.
- test_msgDtype.test_cameraImageDtypePythonToNumpy()[source]
Check Python camera-image writes are visible through the dtype view.
- test_msgDtype.test_deviceStatusDtypeNumpyToPython()[source]
Check numpy writes into device-status memory update Python fields.
- test_msgDtype.test_deviceStatusDtypePythonToNumpy()[source]
Check Python device-status writes are visible through the dtype view.
- test_msgDtype.test_epochDtypeLayout()[source]
Check the Epoch payload dtype layout and padding offsets.
- test_msgDtype.test_epochDtypeNumpyToPython()[source]
Check numpy writes into Epoch payload memory update Python fields.
- test_msgDtype.test_epochDtypePythonToNumpy()[source]
Check Python writes to Epoch fields are visible through the dtype view.
- test_msgDtype.test_jointArrayStateDtypeIsNone()[source]
Check payloads with unsupported vector fields expose no numpy dtype.
- test_msgDtype.test_scMassPropsDtypeLayout()[source]
Check spacecraft mass-properties dtype offsets and matrix shape.
- test_msgDtype.test_scMassPropsDtypeNumpyToPython()[source]
Check numpy writes into mass-properties memory update Python fields.
- test_msgDtype.test_scMassPropsDtypePythonToNumpy()[source]
Check Python mass-property writes are visible through the dtype view.
- test_msgDtype.test_spicePlanetDtypeLayout()[source]
Check the SPICE planet-state dtype offsets and string field type.