From 6390b5e514e0a6b8c23c0ec0d33ec7bd18740536 Mon Sep 17 00:00:00 2001 From: "Holloway (US), Kenneth R" Date: Wed, 2 Apr 2025 14:48:18 -0500 Subject: [PATCH] Initial full DIS7 package. --- dis/__init__.py | 248 ++ dis/abstract_iffpdu_layer_data.py | 82 + dis/acknowledge_pdu.py | 105 + dis/acknowledge_reliable_pdu.py | 82 + dis/acknowledge_rpdu.py | 105 + dis/acoustic_emitter.py | 98 + dis/action_request_pdu.py | 210 ++ dis/action_request_reliable_pdu.py | 82 + dis/action_request_rpdu.py | 227 ++ dis/action_response_pdu.py | 210 ++ dis/action_response_reliable_pdu.py | 82 + dis/action_response_rpdu.py | 210 ++ dis/aggregate_identifier.py | 90 + dis/aggregate_marking.py | 100 + dis/aggregate_state_pdu.py | 426 +++ dis/aggregate_type.py | 123 + dis/angle_deception.py | 161 + dis/angular_velocity_vector.py | 94 + dis/antenna_location.py | 91 + dis/apa.py | 87 + dis/appearance.py | 95 + dis/appearance_pdu.py | 135 + dis/areal_object_state_pdu.py | 199 ++ dis/articulated_part_vp.py | 111 + dis/articulated_parts_pdu.py | 146 + dis/association.py | 103 + dis/attached_part_vp.py | 111 + dis/attribute.py | 104 + dis/attribute_pdu.py | 189 ++ dis/attribute_record_set.py | 139 + dis/beam_antenna_pattern.py | 132 + dis/beam_data.py | 104 + dis/beam_status.py | 86 + dis/blanking_sector.py | 146 + dis/change_options.py | 83 + dis/clock_time.py | 89 + dis/collision_elastic_pdu.py | 164 + dis/collision_pdu.py | 131 + dis/comment_pdu.py | 147 + dis/comment_reliable_pdu.py | 82 + dis/comment_rpdu.py | 147 + dis/communications_node_id.py | 89 + dis/create_entity_pdu.py | 91 + dis/create_entity_reliable_pdu.py | 82 + dis/create_entity_rpdu.py | 106 + dis/data_filter_record.py | 84 + dis/data_pdu.py | 208 ++ dis/data_query_datum_specification.py | 190 ++ dis/data_query_pdu.py | 208 ++ dis/data_query_reliable_pdu.py | 82 + dis/data_query_rpdu.py | 225 ++ dis/data_reliable_pdu.py | 82 + dis/data_rpdu.py | 220 ++ dis/datum_specification.py | 191 ++ dis/dead_reckoning_parameters.py | 111 + dis/designator_pdu.py | 155 + dis/detonation_pdu.py | 199 ++ dis/directed_energy_area_aimpoint.py | 207 ++ dis/directed_energy_damage.py | 149 + dis/directed_energy_fire_pdu.py | 226 ++ dis/directed_energy_precision_aimpoint.py | 159 + ...irected_energy_target_energy_deposition.py | 95 + ...buted_emissions_regeneration_family_pdu.py | 88 + dis/domain.py | 84 + dis/eefundamental_parameter_data.py | 104 + dis/electromagnetic_emission_pdu.py | 167 + dis/electronic_emitter.py | 157 + dis/emitter_beam.py | 183 + dis/emitter_system.py | 98 + dis/engine_fuel.py | 110 + dis/engine_fuel_reload.py | 125 + dis/entity_association_vp.py | 139 + dis/entity_damage_status_pdu.py | 156 + dis/entity_id.py | 94 + dis/entity_identifier.py | 90 + ...tity_information_interaction_family_pdu.py | 88 + dis/entity_management_family_pdu.py | 88 + dis/entity_marking.py | 107 + dis/entity_state_pdu.py | 209 ++ dis/entity_state_update_pdu.py | 176 + dis/entity_type.py | 119 + dis/entity_type_raw.py | 115 + dis/entity_type_vp.py | 109 + dis/environment.py | 116 + dis/environmental_process_pdu.py | 173 + dis/euler_angles.py | 91 + dis/event_identifier.py | 89 + dis/event_identifier_live_entity.py | 91 + dis/event_report_pdu.py | 210 ++ dis/event_report_reliable_pdu.py | 82 + dis/event_report_rpdu.py | 210 ++ dis/expendable.py | 105 + dis/expendable_descriptor.py | 90 + dis/expendable_reload.py | 105 + dis/explosion_descriptor.py | 102 + dis/false_targets_attribute.py | 155 + dis/fire_pdu.py | 136 + dis/fixed_datum.py | 91 + dis/fundamental_operational_data.py | 131 + dis/grid_axis_descriptor.py | 106 + dis/grid_axis_descriptor_fixed.py | 94 + dis/grid_axis_descriptor_variable.py | 119 + dis/grid_data.py | 93 + dis/grid_data_type0.py | 102 + dis/grid_data_type1.py | 110 + dis/grid_data_type2.py | 106 + dis/gridded_data_pdu.py | 260 ++ dis/group_id.py | 90 + dis/identification_friend_or_foe_pdu.py | 82 + dis/iffdata.py | 105 + dis/iffdata_specification.py | 135 + dis/ifffundamental_parameter_data.py | 125 + dis/iffpdu.py | 162 + dis/iffpdu_layer2data.py | 159 + dis/iffpdu_layer3interrogator_format_data.py | 166 + dis/iffpdu_layer3transponder_format_data.py | 166 + dis/iffpdu_layer4interrogator_format_data.py | 166 + dis/iffpdu_layer4transponder_format_data.py | 166 + dis/iffpdu_layer5data.py | 177 + dis/information_operations_action_pdu.py | 197 ++ dis/information_operations_family_pdu.py | 92 + dis/information_operations_report_pdu.py | 177 + dis/intercom_communications_parameters.py | 106 + dis/intercom_control_pdu.py | 202 ++ dis/intercom_identifier.py | 95 + dis/intercom_reference_id.py | 91 + dis/intercom_signal_pdu.py | 139 + dis/iocomms_node_record.py | 113 + dis/ioeffect_record.py | 136 + dis/iorecord.py | 82 + dis/is_group_of_pdu.py | 170 + dis/is_part_of_pdu.py | 121 + .../AGCandGateStealer/AGCandGateStealer.py | 26 + .../AGCandRGPO/AGCandRGPO.py | 27 + .../AGCandRGPOandVGPO/AGCandRGPOandVGPO.py | 27 + .../AGCandVGPO/AGCandVGPO.py | 27 + dis/jammers/Deception/Analyzer/Analyzer.py | 26 + dis/jammers/Deception/Angle/Angle.py | 26 + .../AngleGateWalkOff/AngleGateWalkOff.py | 27 + .../CooperativeAngleCAJ.py | 27 + .../Deception/Angle/CrossEye/CrossEye.py | 27 + .../CrossPolarization/CrossPolarization.py | 27 + dis/jammers/Deception/Angle/Delta/Delta.py | 27 + .../InverseGainakaInverseAmplitude.py | 27 + .../Deception/Angle/SeaBounced/SeaBounced.py | 27 + .../SweptSquareWaveSSW/SweptSquareWaveSSW.py | 27 + .../Angle/TerrainBounce/TerrainBounce.py | 27 + .../AngleandFalseTarget.py | 26 + .../AngleandVelocityFalseTargetsVFT.py | 27 + .../InverseGainandVFT/InverseGainandVFT.py | 28 + .../SSWandVFT/SSWandVFT.py | 28 + .../RFTandSSW/RFTandSSW.py | 27 + .../RangeFalseTargetsRFTandInverseGain.py | 27 + .../AngleandGateStealer.py | 26 + .../CrossPolarizationRGPOandVGPO.py | 27 + ...rossPolarizationandRangeGatePullOffRGPO.py | 27 + ...sPolarizationandVelocityGatePullOffVGPO.py | 27 + .../InverseGainandRGPO/InverseGainandRGPO.py | 27 + .../InverseGainandRGPOandVGPO.py | 27 + .../InverseGainandVGPO/InverseGainandVGPO.py | 27 + .../RGPOandSSW/RGPOandSSW.py | 27 + .../SSWandVGPO/SSWandVGPO.py | 27 + .../AngleandRandomRangeProgramsRANRAP.py | 26 + .../RANRAPandSSW/RANRAPandSSW.py | 27 + .../AngleandVelocity/AngleandVelocity.py | 26 + .../InverseGainandVBM/InverseGainandVBM.py | 27 + .../AngleandVelocity/SSWandVBM/SSWandVBM.py | 27 + .../AutomaticGainControlAGC.py | 26 + dis/jammers/Deception/Colinear/Colinear.py | 26 + .../ConstantFalseAlarmRate.py | 26 + dis/jammers/Deception/Deception.py | 25 + .../Deception/DoubleCross/DoubleCross.py | 26 + dis/jammers/Deception/DownLink/DownLink.py | 26 + .../CoherentFalseTargets.py | 27 + .../FalseDopplerTargetFDT.py | 27 + .../Deception/FalseTarget/FalseTarget.py | 26 + .../MultipleFalseTargets.py | 27 + .../RangeFalseTargetsRFT.py | 27 + .../FalseTarget/Transponder/Transponder.py | 27 + .../VelocityFalseTargetsVFT.py | 27 + .../Deception/FigureEight/FigureEight.py | 26 + .../ChirpGateStealerCGS.py | 27 + .../Deception/GateStealer/GateStealer.py | 26 + .../GateStealer/RGPOandVGPO/RGPOandVGPO.py | 27 + .../RangeGatePullOffRGPO.py | 27 + .../VGPOakaVelocityGateStealerVGS.py | 27 + .../GateStealerandRepeater.py | 26 + ...aterSweptAmplitudeModulationRSAMandVGPO.py | 27 + .../Deception/GlintEnhance/GlintEnhance.py | 26 + .../ImageFrequency/ImageFrequency.py | 26 + .../JitteredPulseRepetitionFrequency.py | 26 + .../JitteredPulseWidth/JitteredPulseWidth.py | 26 + .../PseudorandomNoisePRN.py | 26 + dis/jammers/Deception/Pulse/Pulse.py | 26 + .../PulseCompressionDeception.py | 26 + .../RandomRangeProgramsRANRAP.py | 26 + .../Deception/Refraction/Refraction.py | 26 + .../ContinuousWaveRepeater.py | 27 + .../MultipleFrequencyRepeaterMFR.py | 27 + .../NarrowBandRepeaterNoiseNBRN.py | 27 + .../RandomDopplerRD/RandomDopplerRD.py | 27 + dis/jammers/Deception/Repeater/Repeater.py | 26 + .../DRFMLevelA/DRFMLevelA.py | 28 + .../DRFMLevelB/DRFMLevelB.py | 28 + .../DRFMLevelC/DRFMLevelC.py | 28 + .../DRFMLevelD/DRFMLevelD.py | 28 + .../DRFMLevelE/DRFMLevelE.py | 28 + ...RepeaterDigitalRadioFrequencyMemoryDRFM.py | 27 + .../Repeater/RepeaterNoise/RepeaterNoise.py | 27 + .../RepeaterSweptAmplitudeModulationRSAM.py | 27 + .../Deception/Scintillation/Scintillation.py | 26 + dis/jammers/Deception/Serrodyne/Serrodyne.py | 26 + dis/jammers/Deception/Velocity/Velocity.py | 26 + .../AngleandFMbyNoise/AngleandFMbyNoise.py | 26 + .../FMbyNoiseandInverseGain.py | 27 + .../FMbyNoiseandSSW/FMbyNoiseandSSW.py | 27 + .../AngleandBarrage/AngleandBarrage.py | 27 + .../BarrageandInverseGain.py | 28 + .../BarrageandSSW/BarrageandSSW.py | 28 + .../AngleandNoise/AngleandNoise.py | 26 + .../AngleandPseudorandomAM.py | 26 + .../InverseGainandPseudorandomAM.py | 27 + .../PseudorandomAMandSSW.py | 27 + .../AngleandSpot/AngleandSpot.py | 26 + .../InverseGainandLowLevelNoise.py | 27 + .../InverseGainandSpotNoise.py | 27 + .../AngleandSpot/SpotandSSW/SpotandSSW.py | 27 + .../DeceptionandNoise/DeceptionandNoise.py | 25 + .../FalseTargetDeceptionandSweptNoise.py | 26 + .../GateStealerandNoise.py | 26 + .../LowLevelNoiseandRGPO.py | 28 + .../NoiseandRGPO/NoiseandRGPO.py | 27 + .../LowLevelNoiseandVGPO.py | 28 + .../NoiseandVGPO/NoiseandVGPO.py | 27 + .../AmplitudeModulationAMNoise.py | 26 + .../Noise/BarrageNoise/BarrageNoise.py | 26 + dis/jammers/Noise/BarrageNoise/Click/Click.py | 27 + .../BarrageNoise/SourceNoise/SourceNoise.py | 27 + .../Noise/BistaticClutter/BistaticClutter.py | 26 + dis/jammers/Noise/Comb/Comb.py | 26 + .../CooperativeBlinkedNoiseCBN.py | 26 + .../Noise/DopplerNoise/DopplerNoise.py | 26 + .../FrequencyModulationFMbyNoise.py | 26 + .../Noise/ImpulseNoise/ImpulseNoise.py | 26 + dis/jammers/Noise/Noise.py | 25 + dis/jammers/Noise/PartialBand/PartialBand.py | 26 + .../Noise/PseudorandomAM/PseudorandomAM.py | 26 + dis/jammers/Noise/PulseNoise/PulseNoise.py | 26 + .../QuasiNoiseakaPseudorandom.py | 26 + .../RangeBinMaskingRBMakaCoverPulse.py | 26 + .../RangeBinMaskingwithVelocityBinMasking.py | 27 + .../NarrowbandRepeaterNoise.py | 27 + .../Noise/RepeaterNoise/RepeaterNoise.py | 26 + .../WideBandRepeaterNoise.py | 27 + .../AutomaticSpotNoiseASJ.py | 27 + .../BlinkingSpotNoise/BlinkingSpotNoise.py | 27 + .../BurstSpotNoise/BurstSpotNoise.py | 27 + .../DopplerSpotNoise/DopplerSpotNoise.py | 27 + .../SkirtFrequency/SkirtFrequency.py | 27 + dis/jammers/Noise/SpotNoise/SpotNoise.py | 26 + .../FrequencySwept/FrequencySwept.py | 27 + .../SweptAM/SweptAM.py | 27 + .../SweptNoiseakaSweptSpotNoiseSweep.py | 26 + .../VelocityBinMaskingVBM.py | 26 + dis/jammers/Special/Special.py | 25 + dis/jammers/Special/SuperJam/SuperJam.py | 26 + dis/jamming_technique.py | 95 + dis/launched_munition_record.py | 115 + dis/layer_header.py | 93 + dis/ledetonation_pdu.py | 149 + dis/lefire_pdu.py | 135 + dis/levector3fixed_byte.py | 94 + dis/linear_object_state_pdu.py | 182 + dis/linear_segment_parameter.py | 140 + dis/live_dead_reckoning_parameters.py | 97 + dis/live_entity_detonation_pdu.py | 82 + dis/live_entity_family_pdu.py | 88 + dis/live_entity_fire_pdu.py | 82 + dis/live_entity_identifier.py | 90 + dis/live_entity_linear_velocity.py | 91 + dis/live_entity_orientation.py | 91 + dis/live_entity_orientation16.py | 91 + dis/live_entity_orientation_error.py | 91 + dis/live_entity_position_error.py | 87 + dis/live_entity_relative_world_coordinates.py | 95 + dis/live_simulation_address.py | 89 + dis/logistics_family_pdu.py | 88 + dis/mine_emplacement_time.py | 87 + dis/mine_entity_identifier.py | 90 + dis/minefield_data_pdu.py | 539 +++ dis/minefield_family_pdu.py | 88 + dis/minefield_identifier.py | 90 + dis/minefield_query_pdu.py | 232 ++ dis/minefield_response_nackpdu.py | 122 + dis/minefield_sensor_type.py | 84 + dis/minefield_state_pdu.py | 246 ++ dis/mode5interrogator_basic_data.py | 110 + dis/mode5transponder_basic_data.py | 126 + dis/mode_sinterrogator_basic_data.py | 124 + dis/mode_stransponder_basic_data.py | 140 + dis/modulation_parameters.py | 93 + dis/modulation_type.py | 103 + dis/munition.py | 107 + dis/munition_descriptor.py | 109 + dis/munition_reload.py | 110 + dis/named_location_identification.py | 91 + dis/objectTypes/ArealObject/ArealObject.py | 31 + .../ArealObject/Obstacle/Minefield/Hasty.py | 34 + .../Obstacle/Minefield/Minefield.py | 33 + .../ArealObject/Obstacle/Minefield/Other.py | 34 + .../Obstacle/Minefield/Prepared.py | 34 + .../Obstacle/Minefield/Scattered.py | 34 + .../Obstacle/Minefield/Solitary.py | 34 + .../ArealObject/Obstacle/Obstacle.py | 32 + .../ArealObject/Obstacle/Other/Other.py | 33 + .../Culturalfeature/Culturalfeature.py | 32 + .../Culturalfeature/TracksTire/TracksTire.py | 33 + .../LinearObject/Culturalfeature/Wire/Wire.py | 33 + .../Culturalfeature/Wire/WireCrush.py | 34 + dis/objectTypes/LinearObject/LinearObject.py | 31 + .../Obstacle/ChainLinkFence/ChainLinkFence.py | 33 + .../Obstacle/ConcertinaWire/ConcertinaWire.py | 33 + .../Obstacle/ConcertinaWire/Other.py | 34 + .../Obstacle/ConcertinaWire/_2Roll.py | 34 + .../Obstacle/ConcertinaWire/_3Roll.py | 34 + .../ConcreteBarrier/ConcreteBarrier.py | 33 + .../LinearObject/Obstacle/Obstacle.py | 32 + .../LinearObject/Obstacle/Other/Other.py | 33 + .../LinearObject/Obstacle/Rut/Rut.py | 33 + .../Obstacle/SpeedBump/SpeedBump.py | 33 + .../LinearObject/Obstacle/TankDitch/Other.py | 34 + .../Obstacle/TankDitch/TankDitch.py | 33 + .../Obstaclebreach/Breach/Breach.py | 33 + .../Obstaclebreach/Breach/Other.py | 34 + .../Obstaclebreach/Obstaclebreach.py | 32 + .../Obstaclebreach/Other/Other.py | 33 + .../MinefieldLaneMarker.py | 33 + .../MinefieldLaneMarker/Other.py | 34 + .../Obstaclemarker/Obstaclemarker.py | 32 + .../Obstaclemarker/Other/Other.py | 33 + .../ExhaustSmoke/ExhaustSmoke.py | 33 + .../Tacticalsmoke/ExhaustSmoke/Other.py | 34 + .../LinearObject/Tacticalsmoke/Other/Other.py | 33 + .../Tacticalsmoke/Tacticalsmoke.py | 32 + .../BuildingRubble/BuildingRubble.py | 33 + .../Culturalfeature/BuildingRubble/Other.py | 34 + .../BuildingStructure/ApartmentBuilding.py | 34 + .../BuildingStructure/BuildingStructure.py | 33 + .../BuildingStructure/Church.py | 34 + .../BuildingStructure/FOBGuardTower.py | 34 + .../BuildingStructure/FOBTrailerOffice.py | 34 + .../BuildingStructure/GovernmentBuilding.py | 34 + .../BuildingStructure/GuardHouse.py | 34 + .../BuildingStructure/Hanger.py | 34 + .../BuildingStructure/IndustrialBuilding.py | 34 + .../BuildingStructure/MicrowaveTower.py | 34 + .../BuildingStructure/Other.py | 34 + .../BuildingStructure/PortaPotty.py | 34 + .../BuildingStructure/PowerPylon.py | 34 + .../BuildingStructure/RadioTVTower.py | 34 + .../BuildingStructure/RadioTower1000ft.py | 34 + .../BuildingStructure/RadioTower100ft.py | 34 + .../BuildingStructure/RadioTower500ft.py | 34 + .../BuildingStructure/School.py | 34 + .../BuildingStructure/TransformerYard.py | 34 + .../BuildingStructure/Windmill.py | 34 + .../ContainerBasedBuilding.py | 33 + .../ContainerBasedBuildingBridgeSingle.py | 34 + .../ContainerBasedBuildingFOB.py | 34 + .../ContainerBasedBuildingHouseDouble.py | 34 + .../ContainerBasedBuildingHouseSingle.py | 34 + ...ontainerBasedBuildingHouseSingleRailing.py | 34 + .../ContainerBasedBuildingMosqueSingle.py | 34 + .../ContainerBasedBuildingStoreSingle.py | 34 + .../Culturalfeature/Culturalfeature.py | 32 + .../DisturbedEarth/DisturbedEarth.py | 33 + .../DisturbedRoad/DisturbedRoad.py | 33 + .../DisturbedRoad/DisturbedRoadAsphalt.py | 34 + .../DisturbedRoad/DisturbedRoadConcrete.py | 34 + .../DisturbedRoad/DisturbedRoadGravel.py | 34 + .../IndustrialProcessingPlant.py | 33 + .../IndustrialProcessingPlant/OilRefinery.py | 34 + .../MOUTBuilding/MOUTBuilding.py | 33 + .../MOUTBuilding/MOUTBuildingApartment.py | 34 + .../MOUTBuilding/MOUTBuildingChurch.py | 34 + .../MOUTBuilding/MOUTBuildingControlTower.py | 34 + .../MOUTBuilding/MOUTBuildingFarmHouse.py | 34 + .../MOUTBuilding/MOUTBuildingFireStation.py | 34 + .../MOUTBuilding/MOUTBuildingGasStation.py | 34 + .../MOUTBuilding/MOUTBuildingHospital.py | 34 + .../MOUTBuilding/MOUTBuildingHouse.py | 34 + .../MOUTBuilding/MOUTBuildingMudbrickHouse.py | 34 + .../MOUTBuilding/MOUTBuildingMudbrickStore.py | 34 + .../MOUTBuildingOfficeBuilding.py | 34 + .../MOUTBuilding/MOUTBuildingPoliceStation.py | 34 + .../MOUTBuilding/MOUTBuildingPowerStation.py | 34 + .../MOUTBuilding/MOUTBuildingSchool.py | 34 + .../MOUTBuilding/MOUTBuildingStore.py | 34 + .../MOUTBuilding/MOUTBuildingWarehouse.py | 34 + .../MOUTBuilding/MOUTBuildingWaterTower.py | 34 + ...tenanceShelterLAMSAviationMaintenanceAM.py | 34 + ...ntenanceShelterLAMSVehicleMaintenanceVM.py | 34 + ...ghtweightMaintenanceEnclosureLMEBradley.py | 34 + .../LightweightMaintenanceEnclosureLMEM1.py | 34 + .../MaintenanceStructure.py | 33 + .../Culturalfeature/Other/Other.py | 33 + .../PointObject/Culturalfeature/Pump/Pump.py | 33 + .../Culturalfeature/Pump/PumpGas.py | 34 + .../PointObject/Culturalfeature/Tent/Tent.py | 33 + .../Culturalfeature/Tent/TentArctic.py | 34 + .../Culturalfeature/Tent/TentBedouin.py | 34 + ...icallyandBiologicalProtectedShelterCBPS.py | 34 + .../Tent/TentExpandableFrame.py | 34 + .../Culturalfeature/Tent/TentFritsche.py | 34 + .../Culturalfeature/Tent/TentKuchi.py | 34 + .../Culturalfeature/Tent/TentLarge.py | 34 + .../Culturalfeature/Tent/TentMedium.py | 34 + ...entModularGeneralPurposeTentSystemMGPTS.py | 34 + .../Culturalfeature/Tent/TentSmall.py | 34 + .../Culturalfeature/Tent/TentTEMPER.py | 34 + .../TreeDeciduous/TreeDeciduous.py | 33 + .../TreeDeciduous/TreeDeciduousLarge.py | 34 + .../TreeDeciduous/TreeDeciduousMedium.py | 34 + .../TreeDeciduous/TreeDeciduousSmall.py | 34 + .../TreeEvergreen/TreeEvergreen.py | 33 + .../TreeEvergreen/TreeEvergreenLarge.py | 34 + .../TreeEvergreen/TreeEvergreenMedium.py | 34 + .../TreeEvergreen/TreeEvergreenSmall.py | 34 + .../UtilityPole/UtilityPole.py | 33 + .../EnvironmentalObject.py | 32 + .../EnvironmentalObject/Flood/Flood.py | 33 + .../EnvironmentalObject/Flood/FloodLarge.py | 34 + .../EnvironmentalObject/Flood/FloodMedium.py | 34 + .../EnvironmentalObject/Flood/FloodSmall.py | 34 + .../PointObject/Obstacle/Abatis/Abatis.py | 33 + .../PointObject/Obstacle/Abatis/Other.py | 34 + .../PointObject/Obstacle/Abatis/_14Tree.py | 34 + .../PointObject/Obstacle/Abatis/_8Tree.py | 34 + .../PointObject/Obstacle/Barrier/Barrier.py | 33 + .../Obstacle/Barrier/BarrierConstruction.py | 34 + .../Barrier/BarrierFenceChain6foot.py | 34 + .../Obstacle/Barrier/BarrierFenceWood6foot.py | 34 + .../BarrierHESCOBasketDoubleStacked.py | 34 + .../Barrier/BarrierHESCOBasketLarge.py | 34 + .../Barrier/BarrierHESCOBasketMedium.py | 34 + .../Barrier/BarrierHESCOBasketSmall.py | 34 + .../Obstacle/Barrier/BarrierJerseyPlastic.py | 34 + .../Obstacle/Barrier/BarrierTexas.py | 34 + .../Obstacle/Barrier/DragonsTeeth.py | 34 + .../PointObject/Obstacle/Crater/Crater.py | 33 + .../PointObject/Obstacle/Crater/Large.py | 34 + .../PointObject/Obstacle/Crater/Medium.py | 34 + .../PointObject/Obstacle/Crater/Other.py | 34 + .../PointObject/Obstacle/Crater/Small.py | 34 + .../PointObject/Obstacle/LogCrib/LogCrib.py | 33 + .../PointObject/Obstacle/LogCrib/Other.py | 34 + .../Obstacle/LogCrib/Rectangular.py | 34 + .../Obstacle/LogCrib/Triangular.py | 34 + .../PointObject/Obstacle/Obstacle.py | 32 + .../PointObject/Obstacle/Other/Other.py | 33 + .../PointObject/Obstacle/PotHole/PotHole.py | 33 + .../PointObject/Obstacle/RockDrop/RockDrop.py | 33 + .../Obstacle/RockDrop/RockDropCovered.py | 34 + .../Obstacle/RockDrop/RockDropUncovered.py | 34 + .../NBCHazardMarker/NBCHazardMarker.py | 33 + .../Obstaclemarker/Obstaclemarker.py | 32 + .../PointObject/Passageway/AVLB/AVLB.py | 33 + .../Passageway/AVLB/JointAssaultBridgeJAB.py | 34 + .../PointObject/Passageway/AVLB/M60A1.py | 34 + .../PointObject/Passageway/AVLB/MTU20.py | 34 + .../PointObject/Passageway/AVLB/Other.py | 34 + .../PointObject/Passageway/Other/Other.py | 33 + .../PointObject/Passageway/Passageway.py | 32 + .../PointObject/Passageway/Pier/Pier.py | 33 + .../Passageway/RibbonBridge/Other.py | 34 + .../Passageway/RibbonBridge/RibbonBridge.py | 33 + .../Passageway/RibbonBridge/_2Lane.py | 34 + .../Passageway/RibbonBridge/_4Lane.py | 34 + .../Passageway/StationaryBridge/Other.py | 34 + .../StationaryBridge/StationaryBridge.py | 33 + .../Passageway/StationaryBridge/_2Lane.py | 34 + .../Passageway/StationaryBridge/_4Lane.py | 34 + dis/objectTypes/PointObject/PointObject.py | 31 + .../CoveredMachineGunBunker.py | 34 + .../HastyFightingPosition.py | 34 + .../InfantryFightingPosition.py | 33 + .../NonCoveredInfantryPosition.py | 34 + .../NonCoveredMachineGunBunker.py | 34 + .../InfantryFightingPosition/Other.py | 34 + .../OverheadCoveredInfantryPosition.py | 34 + .../Preparedposition/Other/Other.py | 33 + .../Preparedposition/Preparedposition.py | 32 + .../VehicleDefilade/ArmoredVehicle.py | 34 + .../VehicleDefilade/FightingVehicle.py | 34 + .../VehicleDefilade/MortarCarrier.py | 34 + .../Preparedposition/VehicleDefilade/Other.py | 34 + .../Preparedposition/VehicleDefilade/Tank.py | 34 + .../VehicleDefilade/VehicleDefilade.py | 33 + .../Tacticalsmoke/AirBurst/AirBurst.py | 33 + .../Tacticalsmoke/AirBurst/Grenade.py | 34 + .../Tacticalsmoke/AirBurst/Other.py | 34 + .../Tacticalsmoke/GroundBurst/Artillery.py | 34 + .../Tacticalsmoke/GroundBurst/GroundBurst.py | 33 + .../Tacticalsmoke/GroundBurst/Other.py | 34 + .../PointObject/Tacticalsmoke/Other/Other.py | 33 + .../TacticalSmokeCanister/M18Green.py | 34 + .../TacticalSmokeCanister/M18Red.py | 34 + .../TacticalSmokeCanister/M18Violet.py | 34 + .../TacticalSmokeCanister/M18Yellow.py | 34 + .../TacticalSmokeCanister/M83White.py | 34 + .../TacticalSmokeCanister.py | 33 + .../Tacticalsmoke/Tacticalsmoke.py | 32 + dis/object_identifier.py | 90 + dis/object_type.py | 103 + dis/ownership_status_record.py | 97 + dis/pdu.py | 115 + dis/pdu_base.py | 95 + dis/pdu_status.py | 84 + dis/point_object_state_pdu.py | 167 + dis/propulsion_system_data.py | 89 + dis/protocol_mode.py | 84 + dis/radio_comms_header.py | 90 + dis/radio_communications_family_pdu.py | 88 + dis/radio_identifier.py | 99 + dis/radio_type.py | 120 + dis/receiver_pdu.py | 119 + dis/record_query_reliable_pdu.py | 82 + dis/record_query_rpdu.py | 171 + dis/record_query_specification.py | 134 + dis/record_reliable_pdu.py | 82 + dis/record_rpdu.py | 165 + dis/record_specification.py | 135 + dis/record_specification_element.py | 134 + dis/relationship.py | 93 + dis/remove_entity_pdu.py | 91 + dis/remove_entity_reliable_pdu.py | 82 + dis/remove_entity_rpdu.py | 106 + dis/repair_complete_pdu.py | 109 + dis/repair_response_pdu.py | 114 + dis/request_id.py | 84 + dis/resupply_cancel_pdu.py | 97 + dis/resupply_offer_pdu.py | 163 + dis/resupply_received_pdu.py | 163 + dis/secondary_operational_data.py | 94 + dis/seespdu.py | 219 ++ dis/sensor.py | 113 + dis/separation_vp.py | 122 + dis/service_request_pdu.py | 163 + dis/set_data_pdu.py | 208 ++ dis/set_data_reliable_pdu.py | 82 + dis/set_data_rpdu.py | 220 ++ dis/set_record_reliable_pdu.py | 82 + dis/set_record_rpdu.py | 166 + dis/shaft_rpm.py | 91 + dis/signal_pdu.py | 134 + dis/silent_entity_system.py | 109 + dis/simulation_address.py | 89 + dis/simulation_identifier.py | 90 + dis/simulation_management_family_pdu.py | 97 + ..._management_with_reliability_family_pdu.py | 97 + dis/siso_ref_010/enums/Acronyms.py | 794 +++++ .../enums/acknowledge_acknowledge_flag.py | 140 + .../enums/acknowledge_response_flag.py | 139 + .../enums/action_request_action_id.py | 187 ++ .../enums/action_response_request_status.py | 149 + ...on_enumerationsfor_subsurface_area_size.py | 121 + .../add_variantsfor_air_category201insect.py | 138 + .../add_variantsfor_land_category200mammal.py | 141 + ...ories_fish_mollusk_crustaceanand_insect.py | 143 + .../enums/aggregate_state_aggregate_kind.py | 141 + .../enums/aggregate_state_aggregate_state.py | 141 + .../enums/aggregate_state_formation.py | 141 + .../enums/aggregate_state_specific.py | 137 + .../enums/aggregate_state_subcategory.py | 158 + .../enums/air_platform_appearance.py | 366 ++ .../enums/air_platform_capabilities.py | 178 + .../enums/aircraft_address_source.py | 137 + .../enums/aircraft_identification_type.py | 138 + dis/siso_ref_010/enums/aircraft_idsource.py | 137 + .../enums/aircraft_present_domain.py | 138 + dis/siso_ref_010/enums/aircraft_type_wake.py | 136 + ...up_size_range_enumerationforall_domains.py | 129 + dis/siso_ref_010/enums/antenna_selection.py | 139 + dis/siso_ref_010/enums/antenna_status.py | 138 + .../enums/apaparameter_index_apastatus.py | 139 + .../appearance_anti_collision_day_night.py | 137 + .../enums/appearance_camouflage_type.py | 139 + dis/siso_ref_010/enums/appearance_canopy.py | 142 + .../enums/appearance_concealed_movement.py | 137 + .../enums/appearance_concealed_position.py | 137 + dis/siso_ref_010/enums/appearance_damage.py | 139 + .../enums/appearance_entityor_object_state.py | 137 + .../enums/appearance_environmental_density.py | 140 + dis/siso_ref_010/enums/appearance_hatch.py | 141 + .../enums/appearance_launcher_operational.py | 137 + .../appearance_life_form_compliance_status.py | 151 + .../enums/appearance_life_form_posture.py | 151 + .../appearance_life_form_weapon_implement.py | 139 + .../enums/appearance_lifeform_health.py | 139 + ...rance_linear_object_lane_marker_visible.py | 138 + ...earance_linear_object_tank_ditch_breach.py | 139 + ...pearance_navigation_position_brightness.py | 137 + dis/siso_ref_010/enums/appearance_nvgmode.py | 137 + .../enums/appearance_object_general_damage.py | 138 + .../appearance_object_general_iedpresent.py | 139 + ...ppearance_object_general_predistributed.py | 137 + ...appearance_object_specific_breach_state.py | 138 + ...ppearance_object_specific_chemical_type.py | 139 + .../enums/appearance_paint_scheme.py | 137 + .../enums/appearance_subsurface_hatch.py | 138 + .../enums/appearance_supply_deployed.py | 139 + .../enums/appearance_trailing_effects.py | 139 + .../areal_object_appearance_minefield.py | 99 + .../enums/articulated_parts_type_class.py | 398 +++ .../enums/articulated_parts_type_metric.py | 152 + .../enums/attached_part_detached_indicator.py | 137 + dis/siso_ref_010/enums/attached_parts.py | 146 + .../enums/australian_category_overlay.py | 141 + .../enums/beam_status_beam_state.py | 137 + .../enums/building_paint_scheme.py | 136 + dis/siso_ref_010/enums/capability_report.py | 144 + .../enums/ccttsincgarsclear_channel.py | 137 + .../enums/ccttsincgarsstartof_message.py | 137 + .../enums/cigiextension_packet_id.py | 120 + ...aterialto_support_non_military_programs.py | 136 + ...1supply_category_supplies_non_doctrinal.py | 140 + ...pply_category_sling_loads_non_doctrinal.py | 147 + .../class1supply_category_subsistence.py | 141 + ...dividual_equipment_tools_admin_supplies.py | 143 + ...pply_category_petroleum_oils_lubricants.py | 139 + ...4supply_category_construction_materials.py | 138 + ...6supply_category_personnel_demand_items.py | 136 + .../class7supply_category_major_items.py | 160 + .../class8supply_category_medical_material.py | 138 + ...ply_category_repair_partsand_components.py | 145 + .../enums/clothing_irsignature.py | 139 + dis/siso_ref_010/enums/collision_type.py | 190 ++ dis/siso_ref_010/enums/color.py | 275 ++ .../component_visual_damage_status_smoke.py | 139 + ...ent_visual_damage_status_surface_damage.py | 139 + dis/siso_ref_010/enums/country.py | 414 +++ dis/siso_ref_010/enums/cover_shroud_status.py | 139 + .../enums/crypto_key_idcrypto_mode.py | 137 + .../enums/cultural_feature_appearance.py | 181 + .../enums/cultural_feature_capabilities.py | 108 + .../enums/cyber_acknowledge_response_type.py | 137 + dis/siso_ref_010/enums/cyber_admin_type.py | 145 + .../enums/cyber_cyber_event_phase_type.py | 141 + .../enums/cyber_data_link_protocol_type.py | 145 + .../enums/cyber_data_status_type.py | 141 + dis/siso_ref_010/enums/cyber_data_type.py | 140 + dis/siso_ref_010/enums/cyber_device_type.py | 149 + .../enums/cyber_encryption_type.py | 141 + .../enums/cyber_hardware_damage_type.py | 138 + .../enums/cyber_hardware_degrade_type.py | 142 + .../enums/cyber_load_rate_type.py | 137 + .../enums/cyber_manipulation_type.py | 138 + dis/siso_ref_010/enums/cyber_message_type.py | 139 + .../enums/cyber_network_protocol_type.py | 142 + .../enums/cyber_operating_system_type.py | 145 + .../enums/cyber_packet_manipulation_type.py | 139 + .../enums/cyber_physical_layer_type.py | 137 + dis/siso_ref_010/enums/cyber_recon_type.py | 210 ++ .../enums/cyber_relationship_type.py | 145 + .../enums/cyber_sensitivity_type.py | 153 + dis/siso_ref_010/enums/cyber_service_type.py | 146 + dis/siso_ref_010/enums/cyber_system_type.py | 139 + dis/siso_ref_010/enums/damage_area.py | 143 + dis/siso_ref_010/enums/data_category.py | 138 + .../enums/dead_reckoning_algorithm.py | 145 + ...age_description_component_damage_status.py | 140 + ...cription_component_visual_damage_status.py | 110 + ...escription_component_visual_smoke_color.py | 139 + dis/siso_ref_010/enums/defire_flags.py | 99 + .../enums/defire_flags_state_update_flag.py | 137 + dis/siso_ref_010/enums/defire_pulse_shape.py | 139 + ...e5saltitude_positive_negative_indicator.py | 137 + .../deprecision_aimpoint_beam_spot_type.py | 138 + .../enums/designator_designator_code.py | 116 + .../enums/designator_system_name.py | 238 ++ dis/siso_ref_010/enums/detonation_result.py | 169 + dis/siso_ref_010/enums/dis_pdu_type.py | 208 ++ .../enums/disattribute_action_code.py | 136 + .../dislive_entity_subprotocol_number.py | 136 + ...atus_active_interrogation_indicator_aii.py | 137 + ...ustatus_coupled_extension_indicator_cei.py | 137 + ...pdustatus_detonation_type_indicator_dti.py | 138 + .../dispdustatus_fire_type_indicator_fti.py | 137 + .../dispdustatus_iffsimulation_mode_ism.py | 137 + ...ustatus_intercom_attached_indicator_iai.py | 138 + .../enums/dispdustatus_lvcindicator_lvc.py | 139 + ...spdustatus_radio_attached_indicator_rai.py | 138 + ...status_transferred_entity_indicator_tei.py | 137 + dis/siso_ref_010/enums/disprotocol_family.py | 149 + dis/siso_ref_010/enums/disprotocol_version.py | 143 + dis/siso_ref_010/enums/drparameters_type.py | 138 + .../enums/eeattribute_state_indicator.py | 138 + .../electromagnetic_emission_beam_function.py | 159 + ...agnetic_emission_state_update_indicator.py | 137 + dis/siso_ref_010/enums/emitter_name.py | 2954 +++++++++++++++++ .../enums/emitter_system_function.py | 217 ++ .../entity_association_association_status.py | 142 + .../entity_association_association_type.py | 150 + .../entity_association_group_member_type.py | 142 + ...y_association_physical_association_type.py | 163 + ...ty_association_physical_connection_type.py | 148 + .../enums/entity_capability_types.py | 161 + ..._damage_status_component_identification.py | 145 + dis/siso_ref_010/enums/entity_kind.py | 145 + .../enums/entity_marking_character_set.py | 139 + .../enums/entity_vprecord_change_indicator.py | 137 + .../enums/environment_record_type_groups.py | 137 + .../enums/environmental_appearance.py | 120 + .../enums/environmental_capabilities.py | 98 + ...nvironmental_process_environment_status.py | 98 + .../enums/environmental_process_model_type.py | 136 + .../environmental_process_record_type.py | 154 + .../enums/environmental_subcategory.py | 141 + .../enums/event_report_event_type.py | 154 + .../enums/expendable_air_category.py | 147 + .../enums/expendable_appearance.py | 204 ++ .../enums/expendable_capabilities.py | 88 + .../enums/expendable_subsurface_category.py | 142 + .../enums/expendable_surface_category.py | 142 + .../enums/explosive_material_categories.py | 180 + .../enums/explosive_material_groups.py | 142 + dis/siso_ref_010/enums/flare_smoke_color.py | 139 + dis/siso_ref_010/enums/flare_smoke_status.py | 138 + dis/siso_ref_010/enums/force_id.py | 166 + dis/siso_ref_010/enums/format_type.py | 149 + dis/siso_ref_010/enums/fuel_location.py | 136 + .../enums/fuel_measurement_units.py | 138 + .../enums/grid_axis_descriptor_axis_type.py | 137 + .../enums/gridded_data_constant_grid.py | 137 + .../enums/gridded_data_coordinate_system.py | 139 + .../enums/gridded_data_data_representation.py | 138 + .../enums/gridded_data_field_number.py | 135 + .../enums/gridded_data_sample_type.py | 136 + .../enums/high_density_track_jam.py | 137 + ...fidelity_havequicktodtransmit_indicator.py | 137 + dis/siso_ref_010/enums/icapabilities.cs | 21 + .../iffalternate_mode4challenge_reply.py | 140 + dis/siso_ref_010/enums/iffapplicable_modes.py | 137 + .../enums/iffdata_record_available.py | 137 + .../enums/ifflayer_specific_information.py | 136 + dis/siso_ref_010/enums/iffsimulation_mode.py | 137 + dis/siso_ref_010/enums/iffsystem_mode.py | 141 + dis/siso_ref_010/enums/iffsystem_name.py | 154 + dis/siso_ref_010/enums/iffsystem_type.py | 150 + .../iffsystem_type1operational_parameter1.py | 136 + .../iffsystem_type1operational_parameter2.py | 136 + .../enums/intercom_control_command.py | 142 + .../intercom_control_communications_class.py | 137 + .../intercom_control_communications_type.py | 140 + .../enums/intercom_control_control_type.py | 141 + ..._control_destination_line_state_command.py | 139 + .../enums/intercom_control_record_type.py | 138 + .../intercom_control_transmit_line_state.py | 138 + .../enums/ioaction_ioaction_phase.py | 142 + .../enums/ioaction_ioaction_type.py | 140 + .../enums/ioaction_iosimulation_source.py | 116 + .../enums/ioaction_iowarfare_type.py | 142 + .../iocomms_node_record_comms_node_type.py | 139 + .../enums/ioeffects_record_ioeffect.py | 140 + .../enums/ioeffects_record_iolink_type.py | 139 + .../enums/ioeffects_record_ioprocess.py | 136 + .../enums/ioeffects_record_iostatus.py | 143 + .../enums/ioreport_ioreport_type.py | 139 + .../is_group_of_grouped_entity_category.py | 145 + .../enums/is_group_of_rest_status.py | 144 + dis/siso_ref_010/enums/is_part_of_nature.py | 146 + dis/siso_ref_010/enums/is_part_of_position.py | 138 + .../enums/is_part_of_station_name.py | 158 + dis/siso_ref_010/enums/island_subcategory.py | 142 + dis/siso_ref_010/enums/islsantenna_type.py | 137 + ...lation_parameters_synchronization_state.py | 140 + ...ters_transmitting_terminal_primary_mode.py | 137 + ...rs_transmitting_terminal_secondary_mode.py | 139 + .../enums/land_platform_appearance.py | 346 ++ .../enums/land_platform_capabilities.py | 158 + dis/siso_ref_010/enums/leaf_coverage.py | 137 + .../enums/level2squitter_status.py | 137 + .../enums/life_form_air_categories.py | 141 + .../enums/life_form_categories_afghanistan.py | 148 + .../enums/life_form_categories_us.py | 158 + .../enums/life_form_extra_personal_data.py | 153 + ...e_form_human_specific_animal_companions.py | 139 + ...orm_human_specific_anti_materiel_rifles.py | 139 + ..._form_human_specific_anti_tank_missiles.py | 210 ++ ...e_form_human_specific_anti_tank_rockets.py | 206 ++ ...life_form_human_specific_assault_rifles.py | 215 ++ .../life_form_human_specific_drone_guns.py | 138 + ...ife_form_human_specific_equipment_class.py | 141 + ...rm_human_specific_equipment_nonspecific.py | 137 + .../life_form_human_specific_flame_rockets.py | 142 + ...life_form_human_specific_flame_throwers.py | 150 + ...e_form_human_specific_grenade_launchers.py | 180 + ..._specific_grenade_launching_machine_gun.py | 155 + .../life_form_human_specific_hand_guns.py | 161 + ...e_form_human_specific_high_power_rifles.py | 145 + .../life_form_human_specific_lasers_class.py | 137 + ...e_form_human_specific_logistics_eqclass.py | 136 + .../life_form_human_specific_machine_guns.py | 223 ++ ...pecific_man_portable_air_defense_system.py | 162 + ...e_form_human_specific_medical_equipment.py | 139 + .../enums/life_form_human_specific_mortars.py | 148 + ...man_specific_personal_electronics_class.py | 138 + ...e_form_human_specific_recoilless_rifles.py | 168 + ...fe_form_human_specific_rocket_launchers.py | 136 + .../life_form_human_specific_shot_guns.py | 274 ++ .../enums/life_form_human_specific_sniper.py | 183 + ...ife_form_human_specific_sub_machine_gun.py | 152 + ..._form_human_specific_weapon_nonspecific.py | 141 + ..._form_human_subcategory_equipment_class.py | 192 ++ .../enums/life_form_land_categories.py | 169 + .../enums/life_form_subsurface_categories.py | 145 + .../enums/life_forms_appearance.py | 279 ++ .../enums/life_forms_capabilities.py | 128 + .../life_forms_subcategory_cisweapons.py | 187 ++ .../life_forms_subcategory_french_weapons.py | 143 + .../life_forms_subcategory_german_weapons.py | 144 + .../life_forms_subcategory_iranian_weapons.py | 137 + .../enums/life_forms_subcategory_ukweapons.py | 147 + .../enums/life_forms_subcategory_usweapons.py | 257 ++ .../enums/life_saving_equipment.py | 119 + .../enums/linear_object_appearance_breach.py | 79 + .../linear_object_appearance_exhaust_smoke.py | 109 + ...object_appearance_minefield_lane_marker.py | 89 + .../linear_object_appearance_speed_bump.py | 110 + ...pearance_tank_ditch_and_concertina_wire.py | 109 + .../enums/linear_object_appearance_wire.py | 109 + .../link1111bdata_terminal_set_indicator.py | 123 + .../enums/link1111bencryption_flag.py | 137 + .../enums/link1111bfidelity_level.py | 138 + .../enums/link1111bmodeof_operation.py | 141 + .../enums/link1111bterminal_mode.py | 138 + .../enums/link11bdata_signaling_rate.py | 141 + dis/siso_ref_010/enums/link11blink_state.py | 140 + .../enums/link11bmessage_sub_type.py | 138 + .../enums/link11bmodeof_operation.py | 139 + .../enums/link11bmodulation_standard.py | 137 + .../enums/link11data_signalling_rate.py | 140 + .../enums/link11message_sub_type.py | 140 + .../enums/link11message_type_identifier.py | 142 + .../link11signal_integration_interval.py | 118 + .../enums/link11signal_waveform.py | 138 + dis/siso_ref_010/enums/link16version.py | 146 + dis/siso_ref_010/enums/material.py | 139 + .../enums/message_type_identifier.py | 143 + .../minefield_appearance_active_status.py | 137 + .../enums/minefield_appearance_lane.py | 137 + .../minefield_appearance_minefield_type.py | 138 + .../enums/minefield_appearance_state.py | 137 + .../enums/minefield_data_fusing.py | 110 + .../enums/minefield_data_paint_scheme.py | 100 + .../enums/minefield_fusing_fuse_type.py | 142 + .../enums/minefield_paint_scheme_algae.py | 139 + .../minefield_paint_scheme_paint_scheme.py | 154 + .../enums/minefield_sensor_types.py | 152 + .../enums/minefield_sensor_types_flir.py | 145 + .../enums/minefield_sensor_types_laser.py | 137 + .../enums/minefield_sensor_types_magnetic.py | 139 + .../minefield_sensor_types_multispectral.py | 136 + .../enums/minefield_sensor_types_optical.py | 147 + .../enums/minefield_sensor_types_physical.py | 138 + .../enums/minefield_sensor_types_radar.py | 141 + .../enums/minefield_sensor_types_sonar.py | 136 + .../minefield_state_appearance_bit_map.py | 122 + .../enums/minefield_state_protocol_mode.py | 137 + dis/siso_ref_010/enums/mode5iffmission.py | 142 + .../enums/mode5level_selection.py | 137 + .../enums/mode5location_errors.py | 137 + .../enums/mode5message_formats_status.py | 137 + dis/siso_ref_010/enums/mode5platform_type.py | 137 + dis/siso_ref_010/enums/mode5reply.py | 139 + .../enums/mode5saltitude_resolution.py | 137 + dis/siso_ref_010/enums/mode5squitter_type.py | 138 + .../enums/mode_caltitude_indicator.py | 137 + .../mode_sinterrogator_identifier_ictype.py | 137 + ...ode_sinterrogator_status_transmit_state.py | 141 + .../enums/mode_ssquitter_record_source.py | 137 + dis/siso_ref_010/enums/mode_ssquitter_type.py | 139 + dis/siso_ref_010/enums/munition_appearance.py | 192 ++ .../enums/munition_capabilities.py | 98 + dis/siso_ref_010/enums/munition_category.py | 139 + .../enums/munition_descriptor_fuse.py | 242 ++ .../enums/munition_descriptor_warhead.py | 231 ++ dis/siso_ref_010/enums/munition_domain.py | 148 + .../enums/munition_expendable_status.py | 138 + dis/siso_ref_010/enums/navigation_source.py | 139 + .../enums/netidrecord_frequency_table.py | 139 + dis/siso_ref_010/enums/netidrecord_mode.py | 138 + .../enums/non_human_life_forms_appearance.py | 120 + dis/siso_ref_010/enums/object_kind.py | 144 + .../enums/object_state_appearance_general.py | 152 + .../object_state_modification_areal_object.py | 88 + ...object_state_modification_linear_object.py | 98 + .../object_state_modification_point_object.py | 98 + dis/siso_ref_010/enums/ownership_status.py | 142 + dis/siso_ref_010/enums/parachute.py | 139 + .../enums/physical_association_type_groups.py | 140 + .../enums/platform_air_category.py | 182 + ...ilian_fixed_wing_aircraft_subcategories.py | 123 + ...tform_air_civilian_glider_subcategories.py | 117 + ...m_air_civilian_helicopter_subcategories.py | 122 + ...n_lighterthan_air_airship_subcategories.py | 119 + ...n_lighterthan_air_balloon_subcategories.py | 120 + ...ht_nonrigid_wing_aircraft_subcategories.py | 120 + ...light_rigid_wing_aircraft_subcategories.py | 117 + dis/siso_ref_010/enums/platform_domain.py | 141 + .../enums/platform_land_bus_subcategories.py | 134 + .../enums/platform_land_car_subcategories.py | 159 + .../enums/platform_land_category.py | 206 ++ ...ruction_specialty_vehicle_subcategories.py | 171 + ...nd_farm_specialty_vehicle_subcategories.py | 124 + .../platform_land_motorcycle_subcategories.py | 123 + ...multiple_unit_cargo_truck_subcategories.py | 118 + ...t_utility_emergency_truck_subcategories.py | 117 + ...latform_land_nonmotorized_subcategories.py | 140 + ...latform_land_recreational_subcategories.py | 130 + ...d_single_unit_cargo_truck_subcategories.py | 147 + ...t_utility_emergency_truck_subcategories.py | 160 + .../platform_land_trailer_subcategories.py | 143 + .../platform_land_trains_subcategories.py | 123 + ...and_utility_emergency_car_subcategories.py | 121 + .../enums/platform_space_category.py | 148 + .../enums/platform_subsurface_category.py | 155 + ...ivilian_semi_submersibles_subcategories.py | 116 + ...urface_civilian_submarine_subcategories.py | 115 + ...face_civilian_submersible_subcategories.py | 115 + .../enums/platform_surface_category.py | 191 ++ ...rm_surface_dry_cargo_ship_subcategories.py | 122 + ...rm_surface_fishing_vessel_subcategories.py | 120 + ...orm_surface_other_vessels_subcategories.py | 128 + ..._surface_passenger_vessel_subcategories.py | 120 + ...surface_private_motorboat_subcategories.py | 119 + ..._surface_private_sailboat_subcategories.py | 119 + ...rm_surface_support_vessel_subcategories.py | 124 + .../platform_surface_tanker_subcategories.py | 124 + ...oint_object_appearance_air_ground_burst.py | 129 + ...point_object_appearance_building_rubble.py | 79 + ...nt_object_appearance_building_structure.py | 110 + .../enums/point_object_appearance_crater.py | 119 + ..._object_appearance_disturbed_earth_road.py | 108 + ...object_appearance_log_crib_abatis_et_al.py | 89 + .../enums/point_object_appearance_pothole.py | 98 + .../point_object_appearance_ribbon_bridge.py | 88 + ...t_appearance_stationary_bridge_and_avlb.py | 79 + .../enums/point_object_appearance_tree.py | 100 + dis/siso_ref_010/enums/q.dat | Bin 0 -> 116 bytes dis/siso_ref_010/enums/radio_appearance.py | 99 + dis/siso_ref_010/enums/radio_capabilities.py | 88 + dis/siso_ref_010/enums/radio_category.py | 179 + dis/siso_ref_010/enums/radio_subcategory.py | 175 + .../enums/receiver_receiver_state.py | 138 + .../enums/record_query_revent_type.py | 137 + dis/siso_ref_010/enums/record_revent_type.py | 136 + .../enums/repair_complete_repair.py | 219 ++ dis/siso_ref_010/enums/repair_groups.py | 145 + .../enums/repair_response_repair_result.py | 140 + dis/siso_ref_010/enums/reply_amplification.py | 139 + .../enums/required_reliability_service.py | 137 + dis/siso_ref_010/enums/season.py | 139 + .../enums/sensor_emitter_appearance.py | 264 ++ .../enums/sensor_emitter_capabilities.py | 118 + .../enums/sensor_emitter_category.py | 152 + .../enums/sensor_on_off_status.py | 137 + ...record_sensor_type_other_active_sensors.py | 136 + ...nsor_record_sensor_type_passive_sensors.py | 204 ++ dis/siso_ref_010/enums/sensor_type_source.py | 141 + .../separation_vppre_entity_indicator.py | 139 + .../separation_vpreasonfor_separation.py | 138 + .../service_request_service_type_requested.py | 140 + .../enums/signal_encoding_class.py | 139 + .../enums/signal_encoding_type.py | 149 + dis/siso_ref_010/enums/signal_tdltype.py | 232 ++ ...nal_user_protocol_identification_number.py | 171 + dis/siso_ref_010/enums/sisostd002version.py | 137 + .../enums/space_platform_appearance.py | 171 + .../enums/space_platform_capabilities.py | 128 + ...dimension_enumerationsfor_air_area_size.py | 121 + ...imension_enumerationsfor_land_area_size.py | 121 + dis/siso_ref_010/enums/spot_chaff_status.py | 138 + .../enums/stop_freeze_frozen_behavior.py | 108 + dis/siso_ref_010/enums/stop_freeze_reason.py | 144 + .../subcategoriesfor_air_category200bird.py | 162 + .../subcategoriesfor_air_category201insect.py | 144 + .../subcategoriesfor_air_category202mammal.py | 138 + ...subcategoriesfor_land_category200mammal.py | 144 + ...ubcategoriesfor_land_category201reptile.py | 158 + ...categoriesfor_land_category202amphibian.py | 139 + ...subcategoriesfor_land_category203insect.py | 142 + ...bcategoriesfor_land_category204arachnid.py | 140 + ...ubcategoriesfor_land_category205mollusk.py | 137 + ...categoriesfor_land_category206marsupial.py | 127 + ...ategoriesfor_subsurface_category200fish.py | 162 + ...egoriesfor_subsurface_category201mammal.py | 194 ++ ...goriesfor_subsurface_category202mollusk.py | 144 + ...iesfor_subsurface_category203crustacean.py | 140 + ...egoriesfor_subsurface_category204insect.py | 137 + .../enums/subsurface_platform_appearance.py | 272 ++ .../enums/subsurface_platform_capabilities.py | 158 + dis/siso_ref_010/enums/supply_appearance.py | 163 + dis/siso_ref_010/enums/supply_capabilities.py | 128 + dis/siso_ref_010/enums/supply_domain.py | 148 + dis/siso_ref_010/enums/supply_fuel_type.py | 126 + .../enums/surface_platform_appearance.py | 252 ++ .../enums/surface_platform_capabilities.py | 158 + dis/siso_ref_010/enums/surveillance_status.py | 139 + .../enums/system_on_off_status.py | 137 + .../enums/tcasacasbasic_advanced_indicator.py | 137 + dis/siso_ref_010/enums/tcasacasindicator.py | 137 + .../enums/tcasacassoftware_version.py | 138 + dis/siso_ref_010/enums/tcasacastype.py | 138 + dis/siso_ref_010/enums/tcasiiitype.py | 137 + dis/siso_ref_010/enums/tilink_type.py | 148 + .../enums/time_slot_allocation_level.py | 140 + dis/siso_ref_010/enums/time_type_source.py | 138 + .../enums/transfer_control_transfer_type.py | 146 + .../enums/transmission_indicator.py | 139 + ...mitter_antenna_pattern_reference_system.py | 137 + .../enums/transmitter_antenna_pattern_type.py | 141 + .../enums/transmitter_crypto_system.py | 150 + ...transmitter_detail_amplitude_modulation.py | 146 + ...er_detail_amplitudeand_angle_modulation.py | 137 + .../transmitter_detail_anglemodulation.py | 140 + ...r_detail_carrier_phase_shift_modulation.py | 136 + ...ansmitter_detail_combination_modulation.py | 137 + .../transmitter_detail_pulse_modulation.py | 139 + .../transmitter_detail_satcommodulation.py | 137 + ...ansmitter_detail_unmodulated_modulation.py | 137 + .../enums/transmitter_input_source.py | 154 + .../enums/transmitter_major_modulation.py | 152 + .../transmitter_modulation_type_system.py | 150 + .../enums/transmitter_transmit_state.py | 138 + .../transponder_interrogator_indicator.py | 137 + dis/siso_ref_010/enums/turn_rate_source.py | 138 + .../uaacoustic_emitter_system_function.py | 140 + .../enums/uaacoustic_system_name.py | 145 + .../uaactive_emission_parameter_index.py | 136 + ...tional_passive_activity_parameter_index.py | 136 + .../enums/uapassive_parameter_index.py | 136 + .../enums/uapropulsion_plant_configuration.py | 99 + ...lsion_plant_configuration_configuration.py | 142 + dis/siso_ref_010/enums/uascan_pattern.py | 141 + .../enums/uastate_change_update_indicator.py | 137 + .../enums/variable_parameter_record_type.py | 140 + .../enums/variable_record_type.py | 1400 ++++++++ .../enums/variantsfor_air_category200bird.py | 139 + ...eptiles_amphibians_insectsand_arachnids.py | 140 + ...ariantsfor_subsurface_category201mammal.py | 137 + dis/standard_variable_record.py | 104 + dis/standard_variable_specification.py | 135 + dis/start_resume_pdu.py | 102 + dis/start_resume_reliable_pdu.py | 82 + dis/start_resume_rpdu.py | 117 + dis/stop_freeze_pdu.py | 116 + dis/stop_freeze_reliable_pdu.py | 82 + dis/stop_freeze_rpdu.py | 123 + dis/storage_fuel.py | 110 + dis/storage_fuel_reload.py | 125 + dis/supplemental_emission_entity_state_pdu.py | 82 + dis/supply_quantity.py | 90 + dis/synthetic_environment_family_pdu.py | 88 + dis/system_identifier.py | 106 + dis/time_space_position_information_pdu.py | 82 + dis/total_record_sets.py | 89 + dis/track_jam_data.py | 95 + dis/transfer_ownership_pdu.py | 127 + dis/transmitter_pdu.py | 289 ++ dis/tspipdu.py | 154 + dis/uabeam.py | 98 + dis/uaemitter.py | 157 + dis/uafundamental_parameter.py | 113 + dis/unattached_identifier.py | 90 + dis/underwater_acoustic_pdu.py | 289 ++ dis/unsigned_disinteger.py | 84 + dis/utils/DataInputStream.py | 48 + dis/utils/DataOutputStream.py | 49 + dis/utils/PduFactory.py | 106 + dis/utils/RangeCoordinates.py | 402 +++ dis/utils/__init__.py | 2 + dis/variable_datum.py | 106 + dis/variable_parameter.py | 100 + dis/variable_transmitter_parameters.py | 105 + dis/vector2float.py | 89 + dis/vector3double.py | 99 + dis/vector3float.py | 94 + dis/vectoring_nozzle_system.py | 89 + dis/warfare_family_pdu.py | 88 + 1090 files changed, 118638 insertions(+) create mode 100644 dis/__init__.py create mode 100644 dis/abstract_iffpdu_layer_data.py create mode 100644 dis/acknowledge_pdu.py create mode 100644 dis/acknowledge_reliable_pdu.py create mode 100644 dis/acknowledge_rpdu.py create mode 100644 dis/acoustic_emitter.py create mode 100644 dis/action_request_pdu.py create mode 100644 dis/action_request_reliable_pdu.py create mode 100644 dis/action_request_rpdu.py create mode 100644 dis/action_response_pdu.py create mode 100644 dis/action_response_reliable_pdu.py create mode 100644 dis/action_response_rpdu.py create mode 100644 dis/aggregate_identifier.py create mode 100644 dis/aggregate_marking.py create mode 100644 dis/aggregate_state_pdu.py create mode 100644 dis/aggregate_type.py create mode 100644 dis/angle_deception.py create mode 100644 dis/angular_velocity_vector.py create mode 100644 dis/antenna_location.py create mode 100644 dis/apa.py create mode 100644 dis/appearance.py create mode 100644 dis/appearance_pdu.py create mode 100644 dis/areal_object_state_pdu.py create mode 100644 dis/articulated_part_vp.py create mode 100644 dis/articulated_parts_pdu.py create mode 100644 dis/association.py create mode 100644 dis/attached_part_vp.py create mode 100644 dis/attribute.py create mode 100644 dis/attribute_pdu.py create mode 100644 dis/attribute_record_set.py create mode 100644 dis/beam_antenna_pattern.py create mode 100644 dis/beam_data.py create mode 100644 dis/beam_status.py create mode 100644 dis/blanking_sector.py create mode 100644 dis/change_options.py create mode 100644 dis/clock_time.py create mode 100644 dis/collision_elastic_pdu.py create mode 100644 dis/collision_pdu.py create mode 100644 dis/comment_pdu.py create mode 100644 dis/comment_reliable_pdu.py create mode 100644 dis/comment_rpdu.py create mode 100644 dis/communications_node_id.py create mode 100644 dis/create_entity_pdu.py create mode 100644 dis/create_entity_reliable_pdu.py create mode 100644 dis/create_entity_rpdu.py create mode 100644 dis/data_filter_record.py create mode 100644 dis/data_pdu.py create mode 100644 dis/data_query_datum_specification.py create mode 100644 dis/data_query_pdu.py create mode 100644 dis/data_query_reliable_pdu.py create mode 100644 dis/data_query_rpdu.py create mode 100644 dis/data_reliable_pdu.py create mode 100644 dis/data_rpdu.py create mode 100644 dis/datum_specification.py create mode 100644 dis/dead_reckoning_parameters.py create mode 100644 dis/designator_pdu.py create mode 100644 dis/detonation_pdu.py create mode 100644 dis/directed_energy_area_aimpoint.py create mode 100644 dis/directed_energy_damage.py create mode 100644 dis/directed_energy_fire_pdu.py create mode 100644 dis/directed_energy_precision_aimpoint.py create mode 100644 dis/directed_energy_target_energy_deposition.py create mode 100644 dis/distributed_emissions_regeneration_family_pdu.py create mode 100644 dis/domain.py create mode 100644 dis/eefundamental_parameter_data.py create mode 100644 dis/electromagnetic_emission_pdu.py create mode 100644 dis/electronic_emitter.py create mode 100644 dis/emitter_beam.py create mode 100644 dis/emitter_system.py create mode 100644 dis/engine_fuel.py create mode 100644 dis/engine_fuel_reload.py create mode 100644 dis/entity_association_vp.py create mode 100644 dis/entity_damage_status_pdu.py create mode 100644 dis/entity_id.py create mode 100644 dis/entity_identifier.py create mode 100644 dis/entity_information_interaction_family_pdu.py create mode 100644 dis/entity_management_family_pdu.py create mode 100644 dis/entity_marking.py create mode 100644 dis/entity_state_pdu.py create mode 100644 dis/entity_state_update_pdu.py create mode 100644 dis/entity_type.py create mode 100644 dis/entity_type_raw.py create mode 100644 dis/entity_type_vp.py create mode 100644 dis/environment.py create mode 100644 dis/environmental_process_pdu.py create mode 100644 dis/euler_angles.py create mode 100644 dis/event_identifier.py create mode 100644 dis/event_identifier_live_entity.py create mode 100644 dis/event_report_pdu.py create mode 100644 dis/event_report_reliable_pdu.py create mode 100644 dis/event_report_rpdu.py create mode 100644 dis/expendable.py create mode 100644 dis/expendable_descriptor.py create mode 100644 dis/expendable_reload.py create mode 100644 dis/explosion_descriptor.py create mode 100644 dis/false_targets_attribute.py create mode 100644 dis/fire_pdu.py create mode 100644 dis/fixed_datum.py create mode 100644 dis/fundamental_operational_data.py create mode 100644 dis/grid_axis_descriptor.py create mode 100644 dis/grid_axis_descriptor_fixed.py create mode 100644 dis/grid_axis_descriptor_variable.py create mode 100644 dis/grid_data.py create mode 100644 dis/grid_data_type0.py create mode 100644 dis/grid_data_type1.py create mode 100644 dis/grid_data_type2.py create mode 100644 dis/gridded_data_pdu.py create mode 100644 dis/group_id.py create mode 100644 dis/identification_friend_or_foe_pdu.py create mode 100644 dis/iffdata.py create mode 100644 dis/iffdata_specification.py create mode 100644 dis/ifffundamental_parameter_data.py create mode 100644 dis/iffpdu.py create mode 100644 dis/iffpdu_layer2data.py create mode 100644 dis/iffpdu_layer3interrogator_format_data.py create mode 100644 dis/iffpdu_layer3transponder_format_data.py create mode 100644 dis/iffpdu_layer4interrogator_format_data.py create mode 100644 dis/iffpdu_layer4transponder_format_data.py create mode 100644 dis/iffpdu_layer5data.py create mode 100644 dis/information_operations_action_pdu.py create mode 100644 dis/information_operations_family_pdu.py create mode 100644 dis/information_operations_report_pdu.py create mode 100644 dis/intercom_communications_parameters.py create mode 100644 dis/intercom_control_pdu.py create mode 100644 dis/intercom_identifier.py create mode 100644 dis/intercom_reference_id.py create mode 100644 dis/intercom_signal_pdu.py create mode 100644 dis/iocomms_node_record.py create mode 100644 dis/ioeffect_record.py create mode 100644 dis/iorecord.py create mode 100644 dis/is_group_of_pdu.py create mode 100644 dis/is_part_of_pdu.py create mode 100644 dis/jammers/Deception/AGCandGateStealer/AGCandGateStealer.py create mode 100644 dis/jammers/Deception/AGCandGateStealer/AGCandRGPO/AGCandRGPO.py create mode 100644 dis/jammers/Deception/AGCandGateStealer/AGCandRGPOandVGPO/AGCandRGPOandVGPO.py create mode 100644 dis/jammers/Deception/AGCandGateStealer/AGCandVGPO/AGCandVGPO.py create mode 100644 dis/jammers/Deception/Analyzer/Analyzer.py create mode 100644 dis/jammers/Deception/Angle/Angle.py create mode 100644 dis/jammers/Deception/Angle/AngleGateWalkOff/AngleGateWalkOff.py create mode 100644 dis/jammers/Deception/Angle/CooperativeAngleCAJ/CooperativeAngleCAJ.py create mode 100644 dis/jammers/Deception/Angle/CrossEye/CrossEye.py create mode 100644 dis/jammers/Deception/Angle/CrossPolarization/CrossPolarization.py create mode 100644 dis/jammers/Deception/Angle/Delta/Delta.py create mode 100644 dis/jammers/Deception/Angle/InverseGainakaInverseAmplitude/InverseGainakaInverseAmplitude.py create mode 100644 dis/jammers/Deception/Angle/SeaBounced/SeaBounced.py create mode 100644 dis/jammers/Deception/Angle/SweptSquareWaveSSW/SweptSquareWaveSSW.py create mode 100644 dis/jammers/Deception/Angle/TerrainBounce/TerrainBounce.py create mode 100644 dis/jammers/Deception/AngleandFalseTarget/AngleandFalseTarget.py create mode 100644 dis/jammers/Deception/AngleandFalseTarget/AngleandVelocityFalseTargetsVFT/AngleandVelocityFalseTargetsVFT.py create mode 100644 dis/jammers/Deception/AngleandFalseTarget/AngleandVelocityFalseTargetsVFT/InverseGainandVFT/InverseGainandVFT.py create mode 100644 dis/jammers/Deception/AngleandFalseTarget/AngleandVelocityFalseTargetsVFT/SSWandVFT/SSWandVFT.py create mode 100644 dis/jammers/Deception/AngleandFalseTarget/RFTandSSW/RFTandSSW.py create mode 100644 dis/jammers/Deception/AngleandFalseTarget/RangeFalseTargetsRFTandInverseGain/RangeFalseTargetsRFTandInverseGain.py create mode 100644 dis/jammers/Deception/AngleandGateStealer/AngleandGateStealer.py create mode 100644 dis/jammers/Deception/AngleandGateStealer/CrossPolarizationRGPOandVGPO/CrossPolarizationRGPOandVGPO.py create mode 100644 dis/jammers/Deception/AngleandGateStealer/CrossPolarizationandRangeGatePullOffRGPO/CrossPolarizationandRangeGatePullOffRGPO.py create mode 100644 dis/jammers/Deception/AngleandGateStealer/CrossPolarizationandVelocityGatePullOffVGPO/CrossPolarizationandVelocityGatePullOffVGPO.py create mode 100644 dis/jammers/Deception/AngleandGateStealer/InverseGainandRGPO/InverseGainandRGPO.py create mode 100644 dis/jammers/Deception/AngleandGateStealer/InverseGainandRGPOandVGPO/InverseGainandRGPOandVGPO.py create mode 100644 dis/jammers/Deception/AngleandGateStealer/InverseGainandVGPO/InverseGainandVGPO.py create mode 100644 dis/jammers/Deception/AngleandGateStealer/RGPOandSSW/RGPOandSSW.py create mode 100644 dis/jammers/Deception/AngleandGateStealer/SSWandVGPO/SSWandVGPO.py create mode 100644 dis/jammers/Deception/AngleandRandomRangeProgramsRANRAP/AngleandRandomRangeProgramsRANRAP.py create mode 100644 dis/jammers/Deception/AngleandRandomRangeProgramsRANRAP/RANRAPandSSW/RANRAPandSSW.py create mode 100644 dis/jammers/Deception/AngleandVelocity/AngleandVelocity.py create mode 100644 dis/jammers/Deception/AngleandVelocity/InverseGainandVBM/InverseGainandVBM.py create mode 100644 dis/jammers/Deception/AngleandVelocity/SSWandVBM/SSWandVBM.py create mode 100644 dis/jammers/Deception/AutomaticGainControlAGC/AutomaticGainControlAGC.py create mode 100644 dis/jammers/Deception/Colinear/Colinear.py create mode 100644 dis/jammers/Deception/ConstantFalseAlarmRate/ConstantFalseAlarmRate.py create mode 100644 dis/jammers/Deception/Deception.py create mode 100644 dis/jammers/Deception/DoubleCross/DoubleCross.py create mode 100644 dis/jammers/Deception/DownLink/DownLink.py create mode 100644 dis/jammers/Deception/FalseTarget/CoherentFalseTargets/CoherentFalseTargets.py create mode 100644 dis/jammers/Deception/FalseTarget/FalseDopplerTargetFDT/FalseDopplerTargetFDT.py create mode 100644 dis/jammers/Deception/FalseTarget/FalseTarget.py create mode 100644 dis/jammers/Deception/FalseTarget/MultipleFalseTargets/MultipleFalseTargets.py create mode 100644 dis/jammers/Deception/FalseTarget/RangeFalseTargetsRFT/RangeFalseTargetsRFT.py create mode 100644 dis/jammers/Deception/FalseTarget/Transponder/Transponder.py create mode 100644 dis/jammers/Deception/FalseTarget/VelocityFalseTargetsVFT/VelocityFalseTargetsVFT.py create mode 100644 dis/jammers/Deception/FigureEight/FigureEight.py create mode 100644 dis/jammers/Deception/GateStealer/ChirpGateStealerCGS/ChirpGateStealerCGS.py create mode 100644 dis/jammers/Deception/GateStealer/GateStealer.py create mode 100644 dis/jammers/Deception/GateStealer/RGPOandVGPO/RGPOandVGPO.py create mode 100644 dis/jammers/Deception/GateStealer/RangeGatePullOffRGPO/RangeGatePullOffRGPO.py create mode 100644 dis/jammers/Deception/GateStealer/VGPOakaVelocityGateStealerVGS/VGPOakaVelocityGateStealerVGS.py create mode 100644 dis/jammers/Deception/GateStealerandRepeater/GateStealerandRepeater.py create mode 100644 dis/jammers/Deception/GateStealerandRepeater/RepeaterSweptAmplitudeModulationRSAMandVGPO/RepeaterSweptAmplitudeModulationRSAMandVGPO.py create mode 100644 dis/jammers/Deception/GlintEnhance/GlintEnhance.py create mode 100644 dis/jammers/Deception/ImageFrequency/ImageFrequency.py create mode 100644 dis/jammers/Deception/JitteredPulseRepetitionFrequency/JitteredPulseRepetitionFrequency.py create mode 100644 dis/jammers/Deception/JitteredPulseWidth/JitteredPulseWidth.py create mode 100644 dis/jammers/Deception/PseudorandomNoisePRN/PseudorandomNoisePRN.py create mode 100644 dis/jammers/Deception/Pulse/Pulse.py create mode 100644 dis/jammers/Deception/PulseCompressionDeception/PulseCompressionDeception.py create mode 100644 dis/jammers/Deception/RandomRangeProgramsRANRAP/RandomRangeProgramsRANRAP.py create mode 100644 dis/jammers/Deception/Refraction/Refraction.py create mode 100644 dis/jammers/Deception/Repeater/ContinuousWaveRepeater/ContinuousWaveRepeater.py create mode 100644 dis/jammers/Deception/Repeater/MultipleFrequencyRepeaterMFR/MultipleFrequencyRepeaterMFR.py create mode 100644 dis/jammers/Deception/Repeater/NarrowBandRepeaterNoiseNBRN/NarrowBandRepeaterNoiseNBRN.py create mode 100644 dis/jammers/Deception/Repeater/RandomDopplerRD/RandomDopplerRD.py create mode 100644 dis/jammers/Deception/Repeater/Repeater.py create mode 100644 dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelA/DRFMLevelA.py create mode 100644 dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelB/DRFMLevelB.py create mode 100644 dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelC/DRFMLevelC.py create mode 100644 dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelD/DRFMLevelD.py create mode 100644 dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelE/DRFMLevelE.py create mode 100644 dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/RepeaterDigitalRadioFrequencyMemoryDRFM.py create mode 100644 dis/jammers/Deception/Repeater/RepeaterNoise/RepeaterNoise.py create mode 100644 dis/jammers/Deception/Repeater/RepeaterSweptAmplitudeModulationRSAM/RepeaterSweptAmplitudeModulationRSAM.py create mode 100644 dis/jammers/Deception/Scintillation/Scintillation.py create mode 100644 dis/jammers/Deception/Serrodyne/Serrodyne.py create mode 100644 dis/jammers/Deception/Velocity/Velocity.py create mode 100644 dis/jammers/DeceptionandNoise/AngleandFMbyNoise/AngleandFMbyNoise.py create mode 100644 dis/jammers/DeceptionandNoise/AngleandFMbyNoise/FMbyNoiseandInverseGain/FMbyNoiseandInverseGain.py create mode 100644 dis/jammers/DeceptionandNoise/AngleandFMbyNoise/FMbyNoiseandSSW/FMbyNoiseandSSW.py create mode 100644 dis/jammers/DeceptionandNoise/AngleandNoise/AngleandBarrage/AngleandBarrage.py create mode 100644 dis/jammers/DeceptionandNoise/AngleandNoise/AngleandBarrage/BarrageandInverseGain/BarrageandInverseGain.py create mode 100644 dis/jammers/DeceptionandNoise/AngleandNoise/AngleandBarrage/BarrageandSSW/BarrageandSSW.py create mode 100644 dis/jammers/DeceptionandNoise/AngleandNoise/AngleandNoise.py create mode 100644 dis/jammers/DeceptionandNoise/AngleandPseudorandomAM/AngleandPseudorandomAM.py create mode 100644 dis/jammers/DeceptionandNoise/AngleandPseudorandomAM/InverseGainandPseudorandomAM/InverseGainandPseudorandomAM.py create mode 100644 dis/jammers/DeceptionandNoise/AngleandPseudorandomAM/PseudorandomAMandSSW/PseudorandomAMandSSW.py create mode 100644 dis/jammers/DeceptionandNoise/AngleandSpot/AngleandSpot.py create mode 100644 dis/jammers/DeceptionandNoise/AngleandSpot/InverseGainandLowLevelNoise/InverseGainandLowLevelNoise.py create mode 100644 dis/jammers/DeceptionandNoise/AngleandSpot/InverseGainandSpotNoise/InverseGainandSpotNoise.py create mode 100644 dis/jammers/DeceptionandNoise/AngleandSpot/SpotandSSW/SpotandSSW.py create mode 100644 dis/jammers/DeceptionandNoise/DeceptionandNoise.py create mode 100644 dis/jammers/DeceptionandNoise/FalseTargetDeceptionandSweptNoise/FalseTargetDeceptionandSweptNoise.py create mode 100644 dis/jammers/DeceptionandNoise/GateStealerandNoise/GateStealerandNoise.py create mode 100644 dis/jammers/DeceptionandNoise/GateStealerandNoise/NoiseandRGPO/LowLevelNoiseandRGPO/LowLevelNoiseandRGPO.py create mode 100644 dis/jammers/DeceptionandNoise/GateStealerandNoise/NoiseandRGPO/NoiseandRGPO.py create mode 100644 dis/jammers/DeceptionandNoise/GateStealerandNoise/NoiseandVGPO/LowLevelNoiseandVGPO/LowLevelNoiseandVGPO.py create mode 100644 dis/jammers/DeceptionandNoise/GateStealerandNoise/NoiseandVGPO/NoiseandVGPO.py create mode 100644 dis/jammers/Noise/AmplitudeModulationAMNoise/AmplitudeModulationAMNoise.py create mode 100644 dis/jammers/Noise/BarrageNoise/BarrageNoise.py create mode 100644 dis/jammers/Noise/BarrageNoise/Click/Click.py create mode 100644 dis/jammers/Noise/BarrageNoise/SourceNoise/SourceNoise.py create mode 100644 dis/jammers/Noise/BistaticClutter/BistaticClutter.py create mode 100644 dis/jammers/Noise/Comb/Comb.py create mode 100644 dis/jammers/Noise/CooperativeBlinkedNoiseCBN/CooperativeBlinkedNoiseCBN.py create mode 100644 dis/jammers/Noise/DopplerNoise/DopplerNoise.py create mode 100644 dis/jammers/Noise/FrequencyModulationFMbyNoise/FrequencyModulationFMbyNoise.py create mode 100644 dis/jammers/Noise/ImpulseNoise/ImpulseNoise.py create mode 100644 dis/jammers/Noise/Noise.py create mode 100644 dis/jammers/Noise/PartialBand/PartialBand.py create mode 100644 dis/jammers/Noise/PseudorandomAM/PseudorandomAM.py create mode 100644 dis/jammers/Noise/PulseNoise/PulseNoise.py create mode 100644 dis/jammers/Noise/QuasiNoiseakaPseudorandom/QuasiNoiseakaPseudorandom.py create mode 100644 dis/jammers/Noise/RangeBinMaskingRBMakaCoverPulse/RangeBinMaskingRBMakaCoverPulse.py create mode 100644 dis/jammers/Noise/RangeBinMaskingRBMakaCoverPulse/RangeBinMaskingwithVelocityBinMasking/RangeBinMaskingwithVelocityBinMasking.py create mode 100644 dis/jammers/Noise/RepeaterNoise/NarrowbandRepeaterNoise/NarrowbandRepeaterNoise.py create mode 100644 dis/jammers/Noise/RepeaterNoise/RepeaterNoise.py create mode 100644 dis/jammers/Noise/RepeaterNoise/WideBandRepeaterNoise/WideBandRepeaterNoise.py create mode 100644 dis/jammers/Noise/SpotNoise/AutomaticSpotNoiseASJ/AutomaticSpotNoiseASJ.py create mode 100644 dis/jammers/Noise/SpotNoise/BlinkingSpotNoise/BlinkingSpotNoise.py create mode 100644 dis/jammers/Noise/SpotNoise/BurstSpotNoise/BurstSpotNoise.py create mode 100644 dis/jammers/Noise/SpotNoise/DopplerSpotNoise/DopplerSpotNoise.py create mode 100644 dis/jammers/Noise/SpotNoise/SkirtFrequency/SkirtFrequency.py create mode 100644 dis/jammers/Noise/SpotNoise/SpotNoise.py create mode 100644 dis/jammers/Noise/SweptNoiseakaSweptSpotNoiseSweep/FrequencySwept/FrequencySwept.py create mode 100644 dis/jammers/Noise/SweptNoiseakaSweptSpotNoiseSweep/SweptAM/SweptAM.py create mode 100644 dis/jammers/Noise/SweptNoiseakaSweptSpotNoiseSweep/SweptNoiseakaSweptSpotNoiseSweep.py create mode 100644 dis/jammers/Noise/VelocityBinMaskingVBM/VelocityBinMaskingVBM.py create mode 100644 dis/jammers/Special/Special.py create mode 100644 dis/jammers/Special/SuperJam/SuperJam.py create mode 100644 dis/jamming_technique.py create mode 100644 dis/launched_munition_record.py create mode 100644 dis/layer_header.py create mode 100644 dis/ledetonation_pdu.py create mode 100644 dis/lefire_pdu.py create mode 100644 dis/levector3fixed_byte.py create mode 100644 dis/linear_object_state_pdu.py create mode 100644 dis/linear_segment_parameter.py create mode 100644 dis/live_dead_reckoning_parameters.py create mode 100644 dis/live_entity_detonation_pdu.py create mode 100644 dis/live_entity_family_pdu.py create mode 100644 dis/live_entity_fire_pdu.py create mode 100644 dis/live_entity_identifier.py create mode 100644 dis/live_entity_linear_velocity.py create mode 100644 dis/live_entity_orientation.py create mode 100644 dis/live_entity_orientation16.py create mode 100644 dis/live_entity_orientation_error.py create mode 100644 dis/live_entity_position_error.py create mode 100644 dis/live_entity_relative_world_coordinates.py create mode 100644 dis/live_simulation_address.py create mode 100644 dis/logistics_family_pdu.py create mode 100644 dis/mine_emplacement_time.py create mode 100644 dis/mine_entity_identifier.py create mode 100644 dis/minefield_data_pdu.py create mode 100644 dis/minefield_family_pdu.py create mode 100644 dis/minefield_identifier.py create mode 100644 dis/minefield_query_pdu.py create mode 100644 dis/minefield_response_nackpdu.py create mode 100644 dis/minefield_sensor_type.py create mode 100644 dis/minefield_state_pdu.py create mode 100644 dis/mode5interrogator_basic_data.py create mode 100644 dis/mode5transponder_basic_data.py create mode 100644 dis/mode_sinterrogator_basic_data.py create mode 100644 dis/mode_stransponder_basic_data.py create mode 100644 dis/modulation_parameters.py create mode 100644 dis/modulation_type.py create mode 100644 dis/munition.py create mode 100644 dis/munition_descriptor.py create mode 100644 dis/munition_reload.py create mode 100644 dis/named_location_identification.py create mode 100644 dis/objectTypes/ArealObject/ArealObject.py create mode 100644 dis/objectTypes/ArealObject/Obstacle/Minefield/Hasty.py create mode 100644 dis/objectTypes/ArealObject/Obstacle/Minefield/Minefield.py create mode 100644 dis/objectTypes/ArealObject/Obstacle/Minefield/Other.py create mode 100644 dis/objectTypes/ArealObject/Obstacle/Minefield/Prepared.py create mode 100644 dis/objectTypes/ArealObject/Obstacle/Minefield/Scattered.py create mode 100644 dis/objectTypes/ArealObject/Obstacle/Minefield/Solitary.py create mode 100644 dis/objectTypes/ArealObject/Obstacle/Obstacle.py create mode 100644 dis/objectTypes/ArealObject/Obstacle/Other/Other.py create mode 100644 dis/objectTypes/LinearObject/Culturalfeature/Culturalfeature.py create mode 100644 dis/objectTypes/LinearObject/Culturalfeature/TracksTire/TracksTire.py create mode 100644 dis/objectTypes/LinearObject/Culturalfeature/Wire/Wire.py create mode 100644 dis/objectTypes/LinearObject/Culturalfeature/Wire/WireCrush.py create mode 100644 dis/objectTypes/LinearObject/LinearObject.py create mode 100644 dis/objectTypes/LinearObject/Obstacle/ChainLinkFence/ChainLinkFence.py create mode 100644 dis/objectTypes/LinearObject/Obstacle/ConcertinaWire/ConcertinaWire.py create mode 100644 dis/objectTypes/LinearObject/Obstacle/ConcertinaWire/Other.py create mode 100644 dis/objectTypes/LinearObject/Obstacle/ConcertinaWire/_2Roll.py create mode 100644 dis/objectTypes/LinearObject/Obstacle/ConcertinaWire/_3Roll.py create mode 100644 dis/objectTypes/LinearObject/Obstacle/ConcreteBarrier/ConcreteBarrier.py create mode 100644 dis/objectTypes/LinearObject/Obstacle/Obstacle.py create mode 100644 dis/objectTypes/LinearObject/Obstacle/Other/Other.py create mode 100644 dis/objectTypes/LinearObject/Obstacle/Rut/Rut.py create mode 100644 dis/objectTypes/LinearObject/Obstacle/SpeedBump/SpeedBump.py create mode 100644 dis/objectTypes/LinearObject/Obstacle/TankDitch/Other.py create mode 100644 dis/objectTypes/LinearObject/Obstacle/TankDitch/TankDitch.py create mode 100644 dis/objectTypes/LinearObject/Obstaclebreach/Breach/Breach.py create mode 100644 dis/objectTypes/LinearObject/Obstaclebreach/Breach/Other.py create mode 100644 dis/objectTypes/LinearObject/Obstaclebreach/Obstaclebreach.py create mode 100644 dis/objectTypes/LinearObject/Obstaclebreach/Other/Other.py create mode 100644 dis/objectTypes/LinearObject/Obstaclemarker/MinefieldLaneMarker/MinefieldLaneMarker.py create mode 100644 dis/objectTypes/LinearObject/Obstaclemarker/MinefieldLaneMarker/Other.py create mode 100644 dis/objectTypes/LinearObject/Obstaclemarker/Obstaclemarker.py create mode 100644 dis/objectTypes/LinearObject/Obstaclemarker/Other/Other.py create mode 100644 dis/objectTypes/LinearObject/Tacticalsmoke/ExhaustSmoke/ExhaustSmoke.py create mode 100644 dis/objectTypes/LinearObject/Tacticalsmoke/ExhaustSmoke/Other.py create mode 100644 dis/objectTypes/LinearObject/Tacticalsmoke/Other/Other.py create mode 100644 dis/objectTypes/LinearObject/Tacticalsmoke/Tacticalsmoke.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingRubble/BuildingRubble.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingRubble/Other.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/ApartmentBuilding.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/BuildingStructure.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/Church.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/FOBGuardTower.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/FOBTrailerOffice.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/GovernmentBuilding.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/GuardHouse.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/Hanger.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/IndustrialBuilding.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/MicrowaveTower.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/Other.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/PortaPotty.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/PowerPylon.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/RadioTVTower.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/RadioTower1000ft.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/RadioTower100ft.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/RadioTower500ft.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/School.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/TransformerYard.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/Windmill.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuilding.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingBridgeSingle.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingFOB.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingHouseDouble.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingHouseSingle.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingHouseSingleRailing.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingMosqueSingle.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingStoreSingle.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/Culturalfeature.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/DisturbedEarth/DisturbedEarth.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/DisturbedRoad/DisturbedRoad.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/DisturbedRoad/DisturbedRoadAsphalt.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/DisturbedRoad/DisturbedRoadConcrete.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/DisturbedRoad/DisturbedRoadGravel.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/IndustrialProcessingPlant/IndustrialProcessingPlant.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/IndustrialProcessingPlant/OilRefinery.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuilding.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingApartment.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingChurch.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingControlTower.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingFarmHouse.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingFireStation.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingGasStation.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingHospital.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingHouse.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingMudbrickHouse.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingMudbrickStore.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingOfficeBuilding.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingPoliceStation.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingPowerStation.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingSchool.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingStore.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingWarehouse.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingWaterTower.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/LargeAreaMaintenanceShelterLAMSAviationMaintenanceAM.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/LargeAreaMaintenanceShelterLAMSVehicleMaintenanceVM.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/LightweightMaintenanceEnclosureLMEBradley.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/LightweightMaintenanceEnclosureLMEM1.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/MaintenanceStructure.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/Other/Other.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/Pump/Pump.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/Pump/PumpGas.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/Tent/Tent.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/Tent/TentArctic.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/Tent/TentBedouin.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/Tent/TentChemicallyandBiologicalProtectedShelterCBPS.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/Tent/TentExpandableFrame.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/Tent/TentFritsche.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/Tent/TentKuchi.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/Tent/TentLarge.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/Tent/TentMedium.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/Tent/TentModularGeneralPurposeTentSystemMGPTS.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/Tent/TentSmall.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/Tent/TentTEMPER.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/TreeDeciduous/TreeDeciduous.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/TreeDeciduous/TreeDeciduousLarge.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/TreeDeciduous/TreeDeciduousMedium.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/TreeDeciduous/TreeDeciduousSmall.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/TreeEvergreen/TreeEvergreen.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/TreeEvergreen/TreeEvergreenLarge.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/TreeEvergreen/TreeEvergreenMedium.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/TreeEvergreen/TreeEvergreenSmall.py create mode 100644 dis/objectTypes/PointObject/Culturalfeature/UtilityPole/UtilityPole.py create mode 100644 dis/objectTypes/PointObject/EnvironmentalObject/EnvironmentalObject.py create mode 100644 dis/objectTypes/PointObject/EnvironmentalObject/Flood/Flood.py create mode 100644 dis/objectTypes/PointObject/EnvironmentalObject/Flood/FloodLarge.py create mode 100644 dis/objectTypes/PointObject/EnvironmentalObject/Flood/FloodMedium.py create mode 100644 dis/objectTypes/PointObject/EnvironmentalObject/Flood/FloodSmall.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Abatis/Abatis.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Abatis/Other.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Abatis/_14Tree.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Abatis/_8Tree.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Barrier/Barrier.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Barrier/BarrierConstruction.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Barrier/BarrierFenceChain6foot.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Barrier/BarrierFenceWood6foot.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Barrier/BarrierHESCOBasketDoubleStacked.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Barrier/BarrierHESCOBasketLarge.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Barrier/BarrierHESCOBasketMedium.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Barrier/BarrierHESCOBasketSmall.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Barrier/BarrierJerseyPlastic.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Barrier/BarrierTexas.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Barrier/DragonsTeeth.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Crater/Crater.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Crater/Large.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Crater/Medium.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Crater/Other.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Crater/Small.py create mode 100644 dis/objectTypes/PointObject/Obstacle/LogCrib/LogCrib.py create mode 100644 dis/objectTypes/PointObject/Obstacle/LogCrib/Other.py create mode 100644 dis/objectTypes/PointObject/Obstacle/LogCrib/Rectangular.py create mode 100644 dis/objectTypes/PointObject/Obstacle/LogCrib/Triangular.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Obstacle.py create mode 100644 dis/objectTypes/PointObject/Obstacle/Other/Other.py create mode 100644 dis/objectTypes/PointObject/Obstacle/PotHole/PotHole.py create mode 100644 dis/objectTypes/PointObject/Obstacle/RockDrop/RockDrop.py create mode 100644 dis/objectTypes/PointObject/Obstacle/RockDrop/RockDropCovered.py create mode 100644 dis/objectTypes/PointObject/Obstacle/RockDrop/RockDropUncovered.py create mode 100644 dis/objectTypes/PointObject/Obstaclemarker/NBCHazardMarker/NBCHazardMarker.py create mode 100644 dis/objectTypes/PointObject/Obstaclemarker/Obstaclemarker.py create mode 100644 dis/objectTypes/PointObject/Passageway/AVLB/AVLB.py create mode 100644 dis/objectTypes/PointObject/Passageway/AVLB/JointAssaultBridgeJAB.py create mode 100644 dis/objectTypes/PointObject/Passageway/AVLB/M60A1.py create mode 100644 dis/objectTypes/PointObject/Passageway/AVLB/MTU20.py create mode 100644 dis/objectTypes/PointObject/Passageway/AVLB/Other.py create mode 100644 dis/objectTypes/PointObject/Passageway/Other/Other.py create mode 100644 dis/objectTypes/PointObject/Passageway/Passageway.py create mode 100644 dis/objectTypes/PointObject/Passageway/Pier/Pier.py create mode 100644 dis/objectTypes/PointObject/Passageway/RibbonBridge/Other.py create mode 100644 dis/objectTypes/PointObject/Passageway/RibbonBridge/RibbonBridge.py create mode 100644 dis/objectTypes/PointObject/Passageway/RibbonBridge/_2Lane.py create mode 100644 dis/objectTypes/PointObject/Passageway/RibbonBridge/_4Lane.py create mode 100644 dis/objectTypes/PointObject/Passageway/StationaryBridge/Other.py create mode 100644 dis/objectTypes/PointObject/Passageway/StationaryBridge/StationaryBridge.py create mode 100644 dis/objectTypes/PointObject/Passageway/StationaryBridge/_2Lane.py create mode 100644 dis/objectTypes/PointObject/Passageway/StationaryBridge/_4Lane.py create mode 100644 dis/objectTypes/PointObject/PointObject.py create mode 100644 dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/CoveredMachineGunBunker.py create mode 100644 dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/HastyFightingPosition.py create mode 100644 dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/InfantryFightingPosition.py create mode 100644 dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/NonCoveredInfantryPosition.py create mode 100644 dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/NonCoveredMachineGunBunker.py create mode 100644 dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/Other.py create mode 100644 dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/OverheadCoveredInfantryPosition.py create mode 100644 dis/objectTypes/PointObject/Preparedposition/Other/Other.py create mode 100644 dis/objectTypes/PointObject/Preparedposition/Preparedposition.py create mode 100644 dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/ArmoredVehicle.py create mode 100644 dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/FightingVehicle.py create mode 100644 dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/MortarCarrier.py create mode 100644 dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/Other.py create mode 100644 dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/Tank.py create mode 100644 dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/VehicleDefilade.py create mode 100644 dis/objectTypes/PointObject/Tacticalsmoke/AirBurst/AirBurst.py create mode 100644 dis/objectTypes/PointObject/Tacticalsmoke/AirBurst/Grenade.py create mode 100644 dis/objectTypes/PointObject/Tacticalsmoke/AirBurst/Other.py create mode 100644 dis/objectTypes/PointObject/Tacticalsmoke/GroundBurst/Artillery.py create mode 100644 dis/objectTypes/PointObject/Tacticalsmoke/GroundBurst/GroundBurst.py create mode 100644 dis/objectTypes/PointObject/Tacticalsmoke/GroundBurst/Other.py create mode 100644 dis/objectTypes/PointObject/Tacticalsmoke/Other/Other.py create mode 100644 dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M18Green.py create mode 100644 dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M18Red.py create mode 100644 dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M18Violet.py create mode 100644 dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M18Yellow.py create mode 100644 dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M83White.py create mode 100644 dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/TacticalSmokeCanister.py create mode 100644 dis/objectTypes/PointObject/Tacticalsmoke/Tacticalsmoke.py create mode 100644 dis/object_identifier.py create mode 100644 dis/object_type.py create mode 100644 dis/ownership_status_record.py create mode 100644 dis/pdu.py create mode 100644 dis/pdu_base.py create mode 100644 dis/pdu_status.py create mode 100644 dis/point_object_state_pdu.py create mode 100644 dis/propulsion_system_data.py create mode 100644 dis/protocol_mode.py create mode 100644 dis/radio_comms_header.py create mode 100644 dis/radio_communications_family_pdu.py create mode 100644 dis/radio_identifier.py create mode 100644 dis/radio_type.py create mode 100644 dis/receiver_pdu.py create mode 100644 dis/record_query_reliable_pdu.py create mode 100644 dis/record_query_rpdu.py create mode 100644 dis/record_query_specification.py create mode 100644 dis/record_reliable_pdu.py create mode 100644 dis/record_rpdu.py create mode 100644 dis/record_specification.py create mode 100644 dis/record_specification_element.py create mode 100644 dis/relationship.py create mode 100644 dis/remove_entity_pdu.py create mode 100644 dis/remove_entity_reliable_pdu.py create mode 100644 dis/remove_entity_rpdu.py create mode 100644 dis/repair_complete_pdu.py create mode 100644 dis/repair_response_pdu.py create mode 100644 dis/request_id.py create mode 100644 dis/resupply_cancel_pdu.py create mode 100644 dis/resupply_offer_pdu.py create mode 100644 dis/resupply_received_pdu.py create mode 100644 dis/secondary_operational_data.py create mode 100644 dis/seespdu.py create mode 100644 dis/sensor.py create mode 100644 dis/separation_vp.py create mode 100644 dis/service_request_pdu.py create mode 100644 dis/set_data_pdu.py create mode 100644 dis/set_data_reliable_pdu.py create mode 100644 dis/set_data_rpdu.py create mode 100644 dis/set_record_reliable_pdu.py create mode 100644 dis/set_record_rpdu.py create mode 100644 dis/shaft_rpm.py create mode 100644 dis/signal_pdu.py create mode 100644 dis/silent_entity_system.py create mode 100644 dis/simulation_address.py create mode 100644 dis/simulation_identifier.py create mode 100644 dis/simulation_management_family_pdu.py create mode 100644 dis/simulation_management_with_reliability_family_pdu.py create mode 100644 dis/siso_ref_010/enums/Acronyms.py create mode 100644 dis/siso_ref_010/enums/acknowledge_acknowledge_flag.py create mode 100644 dis/siso_ref_010/enums/acknowledge_response_flag.py create mode 100644 dis/siso_ref_010/enums/action_request_action_id.py create mode 100644 dis/siso_ref_010/enums/action_response_request_status.py create mode 100644 dis/siso_ref_010/enums/add_specific_dimension_enumerationsfor_subsurface_area_size.py create mode 100644 dis/siso_ref_010/enums/add_variantsfor_air_category201insect.py create mode 100644 dis/siso_ref_010/enums/add_variantsfor_land_category200mammal.py create mode 100644 dis/siso_ref_010/enums/add_variantsfor_subsurface_categories_fish_mollusk_crustaceanand_insect.py create mode 100644 dis/siso_ref_010/enums/aggregate_state_aggregate_kind.py create mode 100644 dis/siso_ref_010/enums/aggregate_state_aggregate_state.py create mode 100644 dis/siso_ref_010/enums/aggregate_state_formation.py create mode 100644 dis/siso_ref_010/enums/aggregate_state_specific.py create mode 100644 dis/siso_ref_010/enums/aggregate_state_subcategory.py create mode 100644 dis/siso_ref_010/enums/air_platform_appearance.py create mode 100644 dis/siso_ref_010/enums/air_platform_capabilities.py create mode 100644 dis/siso_ref_010/enums/aircraft_address_source.py create mode 100644 dis/siso_ref_010/enums/aircraft_identification_type.py create mode 100644 dis/siso_ref_010/enums/aircraft_idsource.py create mode 100644 dis/siso_ref_010/enums/aircraft_present_domain.py create mode 100644 dis/siso_ref_010/enums/aircraft_type_wake.py create mode 100644 dis/siso_ref_010/enums/animal_lifeform_group_size_range_enumerationforall_domains.py create mode 100644 dis/siso_ref_010/enums/antenna_selection.py create mode 100644 dis/siso_ref_010/enums/antenna_status.py create mode 100644 dis/siso_ref_010/enums/apaparameter_index_apastatus.py create mode 100644 dis/siso_ref_010/enums/appearance_anti_collision_day_night.py create mode 100644 dis/siso_ref_010/enums/appearance_camouflage_type.py create mode 100644 dis/siso_ref_010/enums/appearance_canopy.py create mode 100644 dis/siso_ref_010/enums/appearance_concealed_movement.py create mode 100644 dis/siso_ref_010/enums/appearance_concealed_position.py create mode 100644 dis/siso_ref_010/enums/appearance_damage.py create mode 100644 dis/siso_ref_010/enums/appearance_entityor_object_state.py create mode 100644 dis/siso_ref_010/enums/appearance_environmental_density.py create mode 100644 dis/siso_ref_010/enums/appearance_hatch.py create mode 100644 dis/siso_ref_010/enums/appearance_launcher_operational.py create mode 100644 dis/siso_ref_010/enums/appearance_life_form_compliance_status.py create mode 100644 dis/siso_ref_010/enums/appearance_life_form_posture.py create mode 100644 dis/siso_ref_010/enums/appearance_life_form_weapon_implement.py create mode 100644 dis/siso_ref_010/enums/appearance_lifeform_health.py create mode 100644 dis/siso_ref_010/enums/appearance_linear_object_lane_marker_visible.py create mode 100644 dis/siso_ref_010/enums/appearance_linear_object_tank_ditch_breach.py create mode 100644 dis/siso_ref_010/enums/appearance_navigation_position_brightness.py create mode 100644 dis/siso_ref_010/enums/appearance_nvgmode.py create mode 100644 dis/siso_ref_010/enums/appearance_object_general_damage.py create mode 100644 dis/siso_ref_010/enums/appearance_object_general_iedpresent.py create mode 100644 dis/siso_ref_010/enums/appearance_object_general_predistributed.py create mode 100644 dis/siso_ref_010/enums/appearance_object_specific_breach_state.py create mode 100644 dis/siso_ref_010/enums/appearance_object_specific_chemical_type.py create mode 100644 dis/siso_ref_010/enums/appearance_paint_scheme.py create mode 100644 dis/siso_ref_010/enums/appearance_subsurface_hatch.py create mode 100644 dis/siso_ref_010/enums/appearance_supply_deployed.py create mode 100644 dis/siso_ref_010/enums/appearance_trailing_effects.py create mode 100644 dis/siso_ref_010/enums/areal_object_appearance_minefield.py create mode 100644 dis/siso_ref_010/enums/articulated_parts_type_class.py create mode 100644 dis/siso_ref_010/enums/articulated_parts_type_metric.py create mode 100644 dis/siso_ref_010/enums/attached_part_detached_indicator.py create mode 100644 dis/siso_ref_010/enums/attached_parts.py create mode 100644 dis/siso_ref_010/enums/australian_category_overlay.py create mode 100644 dis/siso_ref_010/enums/beam_status_beam_state.py create mode 100644 dis/siso_ref_010/enums/building_paint_scheme.py create mode 100644 dis/siso_ref_010/enums/capability_report.py create mode 100644 dis/siso_ref_010/enums/ccttsincgarsclear_channel.py create mode 100644 dis/siso_ref_010/enums/ccttsincgarsstartof_message.py create mode 100644 dis/siso_ref_010/enums/cigiextension_packet_id.py create mode 100644 dis/siso_ref_010/enums/class10supply_category_materialto_support_non_military_programs.py create mode 100644 dis/siso_ref_010/enums/class11supply_category_supplies_non_doctrinal.py create mode 100644 dis/siso_ref_010/enums/class12supply_category_sling_loads_non_doctrinal.py create mode 100644 dis/siso_ref_010/enums/class1supply_category_subsistence.py create mode 100644 dis/siso_ref_010/enums/class2supply_category_clothing_individual_equipment_tools_admin_supplies.py create mode 100644 dis/siso_ref_010/enums/class3supply_category_petroleum_oils_lubricants.py create mode 100644 dis/siso_ref_010/enums/class4supply_category_construction_materials.py create mode 100644 dis/siso_ref_010/enums/class6supply_category_personnel_demand_items.py create mode 100644 dis/siso_ref_010/enums/class7supply_category_major_items.py create mode 100644 dis/siso_ref_010/enums/class8supply_category_medical_material.py create mode 100644 dis/siso_ref_010/enums/class9supply_category_repair_partsand_components.py create mode 100644 dis/siso_ref_010/enums/clothing_irsignature.py create mode 100644 dis/siso_ref_010/enums/collision_type.py create mode 100644 dis/siso_ref_010/enums/color.py create mode 100644 dis/siso_ref_010/enums/component_visual_damage_status_smoke.py create mode 100644 dis/siso_ref_010/enums/component_visual_damage_status_surface_damage.py create mode 100644 dis/siso_ref_010/enums/country.py create mode 100644 dis/siso_ref_010/enums/cover_shroud_status.py create mode 100644 dis/siso_ref_010/enums/crypto_key_idcrypto_mode.py create mode 100644 dis/siso_ref_010/enums/cultural_feature_appearance.py create mode 100644 dis/siso_ref_010/enums/cultural_feature_capabilities.py create mode 100644 dis/siso_ref_010/enums/cyber_acknowledge_response_type.py create mode 100644 dis/siso_ref_010/enums/cyber_admin_type.py create mode 100644 dis/siso_ref_010/enums/cyber_cyber_event_phase_type.py create mode 100644 dis/siso_ref_010/enums/cyber_data_link_protocol_type.py create mode 100644 dis/siso_ref_010/enums/cyber_data_status_type.py create mode 100644 dis/siso_ref_010/enums/cyber_data_type.py create mode 100644 dis/siso_ref_010/enums/cyber_device_type.py create mode 100644 dis/siso_ref_010/enums/cyber_encryption_type.py create mode 100644 dis/siso_ref_010/enums/cyber_hardware_damage_type.py create mode 100644 dis/siso_ref_010/enums/cyber_hardware_degrade_type.py create mode 100644 dis/siso_ref_010/enums/cyber_load_rate_type.py create mode 100644 dis/siso_ref_010/enums/cyber_manipulation_type.py create mode 100644 dis/siso_ref_010/enums/cyber_message_type.py create mode 100644 dis/siso_ref_010/enums/cyber_network_protocol_type.py create mode 100644 dis/siso_ref_010/enums/cyber_operating_system_type.py create mode 100644 dis/siso_ref_010/enums/cyber_packet_manipulation_type.py create mode 100644 dis/siso_ref_010/enums/cyber_physical_layer_type.py create mode 100644 dis/siso_ref_010/enums/cyber_recon_type.py create mode 100644 dis/siso_ref_010/enums/cyber_relationship_type.py create mode 100644 dis/siso_ref_010/enums/cyber_sensitivity_type.py create mode 100644 dis/siso_ref_010/enums/cyber_service_type.py create mode 100644 dis/siso_ref_010/enums/cyber_system_type.py create mode 100644 dis/siso_ref_010/enums/damage_area.py create mode 100644 dis/siso_ref_010/enums/data_category.py create mode 100644 dis/siso_ref_010/enums/dead_reckoning_algorithm.py create mode 100644 dis/siso_ref_010/enums/dedamage_description_component_damage_status.py create mode 100644 dis/siso_ref_010/enums/dedamage_description_component_visual_damage_status.py create mode 100644 dis/siso_ref_010/enums/dedamage_description_component_visual_smoke_color.py create mode 100644 dis/siso_ref_010/enums/defire_flags.py create mode 100644 dis/siso_ref_010/enums/defire_flags_state_update_flag.py create mode 100644 dis/siso_ref_010/enums/defire_pulse_shape.py create mode 100644 dis/siso_ref_010/enums/delta_mode5saltitude_positive_negative_indicator.py create mode 100644 dis/siso_ref_010/enums/deprecision_aimpoint_beam_spot_type.py create mode 100644 dis/siso_ref_010/enums/designator_designator_code.py create mode 100644 dis/siso_ref_010/enums/designator_system_name.py create mode 100644 dis/siso_ref_010/enums/detonation_result.py create mode 100644 dis/siso_ref_010/enums/dis_pdu_type.py create mode 100644 dis/siso_ref_010/enums/disattribute_action_code.py create mode 100644 dis/siso_ref_010/enums/dislive_entity_subprotocol_number.py create mode 100644 dis/siso_ref_010/enums/dispdustatus_active_interrogation_indicator_aii.py create mode 100644 dis/siso_ref_010/enums/dispdustatus_coupled_extension_indicator_cei.py create mode 100644 dis/siso_ref_010/enums/dispdustatus_detonation_type_indicator_dti.py create mode 100644 dis/siso_ref_010/enums/dispdustatus_fire_type_indicator_fti.py create mode 100644 dis/siso_ref_010/enums/dispdustatus_iffsimulation_mode_ism.py create mode 100644 dis/siso_ref_010/enums/dispdustatus_intercom_attached_indicator_iai.py create mode 100644 dis/siso_ref_010/enums/dispdustatus_lvcindicator_lvc.py create mode 100644 dis/siso_ref_010/enums/dispdustatus_radio_attached_indicator_rai.py create mode 100644 dis/siso_ref_010/enums/dispdustatus_transferred_entity_indicator_tei.py create mode 100644 dis/siso_ref_010/enums/disprotocol_family.py create mode 100644 dis/siso_ref_010/enums/disprotocol_version.py create mode 100644 dis/siso_ref_010/enums/drparameters_type.py create mode 100644 dis/siso_ref_010/enums/eeattribute_state_indicator.py create mode 100644 dis/siso_ref_010/enums/electromagnetic_emission_beam_function.py create mode 100644 dis/siso_ref_010/enums/electromagnetic_emission_state_update_indicator.py create mode 100644 dis/siso_ref_010/enums/emitter_name.py create mode 100644 dis/siso_ref_010/enums/emitter_system_function.py create mode 100644 dis/siso_ref_010/enums/entity_association_association_status.py create mode 100644 dis/siso_ref_010/enums/entity_association_association_type.py create mode 100644 dis/siso_ref_010/enums/entity_association_group_member_type.py create mode 100644 dis/siso_ref_010/enums/entity_association_physical_association_type.py create mode 100644 dis/siso_ref_010/enums/entity_association_physical_connection_type.py create mode 100644 dis/siso_ref_010/enums/entity_capability_types.py create mode 100644 dis/siso_ref_010/enums/entity_damage_status_component_identification.py create mode 100644 dis/siso_ref_010/enums/entity_kind.py create mode 100644 dis/siso_ref_010/enums/entity_marking_character_set.py create mode 100644 dis/siso_ref_010/enums/entity_vprecord_change_indicator.py create mode 100644 dis/siso_ref_010/enums/environment_record_type_groups.py create mode 100644 dis/siso_ref_010/enums/environmental_appearance.py create mode 100644 dis/siso_ref_010/enums/environmental_capabilities.py create mode 100644 dis/siso_ref_010/enums/environmental_process_environment_status.py create mode 100644 dis/siso_ref_010/enums/environmental_process_model_type.py create mode 100644 dis/siso_ref_010/enums/environmental_process_record_type.py create mode 100644 dis/siso_ref_010/enums/environmental_subcategory.py create mode 100644 dis/siso_ref_010/enums/event_report_event_type.py create mode 100644 dis/siso_ref_010/enums/expendable_air_category.py create mode 100644 dis/siso_ref_010/enums/expendable_appearance.py create mode 100644 dis/siso_ref_010/enums/expendable_capabilities.py create mode 100644 dis/siso_ref_010/enums/expendable_subsurface_category.py create mode 100644 dis/siso_ref_010/enums/expendable_surface_category.py create mode 100644 dis/siso_ref_010/enums/explosive_material_categories.py create mode 100644 dis/siso_ref_010/enums/explosive_material_groups.py create mode 100644 dis/siso_ref_010/enums/flare_smoke_color.py create mode 100644 dis/siso_ref_010/enums/flare_smoke_status.py create mode 100644 dis/siso_ref_010/enums/force_id.py create mode 100644 dis/siso_ref_010/enums/format_type.py create mode 100644 dis/siso_ref_010/enums/fuel_location.py create mode 100644 dis/siso_ref_010/enums/fuel_measurement_units.py create mode 100644 dis/siso_ref_010/enums/grid_axis_descriptor_axis_type.py create mode 100644 dis/siso_ref_010/enums/gridded_data_constant_grid.py create mode 100644 dis/siso_ref_010/enums/gridded_data_coordinate_system.py create mode 100644 dis/siso_ref_010/enums/gridded_data_data_representation.py create mode 100644 dis/siso_ref_010/enums/gridded_data_field_number.py create mode 100644 dis/siso_ref_010/enums/gridded_data_sample_type.py create mode 100644 dis/siso_ref_010/enums/high_density_track_jam.py create mode 100644 dis/siso_ref_010/enums/high_fidelity_havequicktodtransmit_indicator.py create mode 100644 dis/siso_ref_010/enums/icapabilities.cs create mode 100644 dis/siso_ref_010/enums/iffalternate_mode4challenge_reply.py create mode 100644 dis/siso_ref_010/enums/iffapplicable_modes.py create mode 100644 dis/siso_ref_010/enums/iffdata_record_available.py create mode 100644 dis/siso_ref_010/enums/ifflayer_specific_information.py create mode 100644 dis/siso_ref_010/enums/iffsimulation_mode.py create mode 100644 dis/siso_ref_010/enums/iffsystem_mode.py create mode 100644 dis/siso_ref_010/enums/iffsystem_name.py create mode 100644 dis/siso_ref_010/enums/iffsystem_type.py create mode 100644 dis/siso_ref_010/enums/iffsystem_type1operational_parameter1.py create mode 100644 dis/siso_ref_010/enums/iffsystem_type1operational_parameter2.py create mode 100644 dis/siso_ref_010/enums/intercom_control_command.py create mode 100644 dis/siso_ref_010/enums/intercom_control_communications_class.py create mode 100644 dis/siso_ref_010/enums/intercom_control_communications_type.py create mode 100644 dis/siso_ref_010/enums/intercom_control_control_type.py create mode 100644 dis/siso_ref_010/enums/intercom_control_destination_line_state_command.py create mode 100644 dis/siso_ref_010/enums/intercom_control_record_type.py create mode 100644 dis/siso_ref_010/enums/intercom_control_transmit_line_state.py create mode 100644 dis/siso_ref_010/enums/ioaction_ioaction_phase.py create mode 100644 dis/siso_ref_010/enums/ioaction_ioaction_type.py create mode 100644 dis/siso_ref_010/enums/ioaction_iosimulation_source.py create mode 100644 dis/siso_ref_010/enums/ioaction_iowarfare_type.py create mode 100644 dis/siso_ref_010/enums/iocomms_node_record_comms_node_type.py create mode 100644 dis/siso_ref_010/enums/ioeffects_record_ioeffect.py create mode 100644 dis/siso_ref_010/enums/ioeffects_record_iolink_type.py create mode 100644 dis/siso_ref_010/enums/ioeffects_record_ioprocess.py create mode 100644 dis/siso_ref_010/enums/ioeffects_record_iostatus.py create mode 100644 dis/siso_ref_010/enums/ioreport_ioreport_type.py create mode 100644 dis/siso_ref_010/enums/is_group_of_grouped_entity_category.py create mode 100644 dis/siso_ref_010/enums/is_group_of_rest_status.py create mode 100644 dis/siso_ref_010/enums/is_part_of_nature.py create mode 100644 dis/siso_ref_010/enums/is_part_of_position.py create mode 100644 dis/siso_ref_010/enums/is_part_of_station_name.py create mode 100644 dis/siso_ref_010/enums/island_subcategory.py create mode 100644 dis/siso_ref_010/enums/islsantenna_type.py create mode 100644 dis/siso_ref_010/enums/jtidsmidsmodulation_parameters_synchronization_state.py create mode 100644 dis/siso_ref_010/enums/jtidsmidsmodulation_parameters_transmitting_terminal_primary_mode.py create mode 100644 dis/siso_ref_010/enums/jtidsmidsmodulation_parameters_transmitting_terminal_secondary_mode.py create mode 100644 dis/siso_ref_010/enums/land_platform_appearance.py create mode 100644 dis/siso_ref_010/enums/land_platform_capabilities.py create mode 100644 dis/siso_ref_010/enums/leaf_coverage.py create mode 100644 dis/siso_ref_010/enums/level2squitter_status.py create mode 100644 dis/siso_ref_010/enums/life_form_air_categories.py create mode 100644 dis/siso_ref_010/enums/life_form_categories_afghanistan.py create mode 100644 dis/siso_ref_010/enums/life_form_categories_us.py create mode 100644 dis/siso_ref_010/enums/life_form_extra_personal_data.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_animal_companions.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_anti_materiel_rifles.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_anti_tank_missiles.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_anti_tank_rockets.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_assault_rifles.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_drone_guns.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_equipment_class.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_equipment_nonspecific.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_flame_rockets.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_flame_throwers.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_grenade_launchers.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_grenade_launching_machine_gun.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_hand_guns.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_high_power_rifles.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_lasers_class.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_logistics_eqclass.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_machine_guns.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_man_portable_air_defense_system.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_medical_equipment.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_mortars.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_personal_electronics_class.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_recoilless_rifles.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_rocket_launchers.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_shot_guns.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_sniper.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_sub_machine_gun.py create mode 100644 dis/siso_ref_010/enums/life_form_human_specific_weapon_nonspecific.py create mode 100644 dis/siso_ref_010/enums/life_form_human_subcategory_equipment_class.py create mode 100644 dis/siso_ref_010/enums/life_form_land_categories.py create mode 100644 dis/siso_ref_010/enums/life_form_subsurface_categories.py create mode 100644 dis/siso_ref_010/enums/life_forms_appearance.py create mode 100644 dis/siso_ref_010/enums/life_forms_capabilities.py create mode 100644 dis/siso_ref_010/enums/life_forms_subcategory_cisweapons.py create mode 100644 dis/siso_ref_010/enums/life_forms_subcategory_french_weapons.py create mode 100644 dis/siso_ref_010/enums/life_forms_subcategory_german_weapons.py create mode 100644 dis/siso_ref_010/enums/life_forms_subcategory_iranian_weapons.py create mode 100644 dis/siso_ref_010/enums/life_forms_subcategory_ukweapons.py create mode 100644 dis/siso_ref_010/enums/life_forms_subcategory_usweapons.py create mode 100644 dis/siso_ref_010/enums/life_saving_equipment.py create mode 100644 dis/siso_ref_010/enums/linear_object_appearance_breach.py create mode 100644 dis/siso_ref_010/enums/linear_object_appearance_exhaust_smoke.py create mode 100644 dis/siso_ref_010/enums/linear_object_appearance_minefield_lane_marker.py create mode 100644 dis/siso_ref_010/enums/linear_object_appearance_speed_bump.py create mode 100644 dis/siso_ref_010/enums/linear_object_appearance_tank_ditch_and_concertina_wire.py create mode 100644 dis/siso_ref_010/enums/linear_object_appearance_wire.py create mode 100644 dis/siso_ref_010/enums/link1111bdata_terminal_set_indicator.py create mode 100644 dis/siso_ref_010/enums/link1111bencryption_flag.py create mode 100644 dis/siso_ref_010/enums/link1111bfidelity_level.py create mode 100644 dis/siso_ref_010/enums/link1111bmodeof_operation.py create mode 100644 dis/siso_ref_010/enums/link1111bterminal_mode.py create mode 100644 dis/siso_ref_010/enums/link11bdata_signaling_rate.py create mode 100644 dis/siso_ref_010/enums/link11blink_state.py create mode 100644 dis/siso_ref_010/enums/link11bmessage_sub_type.py create mode 100644 dis/siso_ref_010/enums/link11bmodeof_operation.py create mode 100644 dis/siso_ref_010/enums/link11bmodulation_standard.py create mode 100644 dis/siso_ref_010/enums/link11data_signalling_rate.py create mode 100644 dis/siso_ref_010/enums/link11message_sub_type.py create mode 100644 dis/siso_ref_010/enums/link11message_type_identifier.py create mode 100644 dis/siso_ref_010/enums/link11signal_integration_interval.py create mode 100644 dis/siso_ref_010/enums/link11signal_waveform.py create mode 100644 dis/siso_ref_010/enums/link16version.py create mode 100644 dis/siso_ref_010/enums/material.py create mode 100644 dis/siso_ref_010/enums/message_type_identifier.py create mode 100644 dis/siso_ref_010/enums/minefield_appearance_active_status.py create mode 100644 dis/siso_ref_010/enums/minefield_appearance_lane.py create mode 100644 dis/siso_ref_010/enums/minefield_appearance_minefield_type.py create mode 100644 dis/siso_ref_010/enums/minefield_appearance_state.py create mode 100644 dis/siso_ref_010/enums/minefield_data_fusing.py create mode 100644 dis/siso_ref_010/enums/minefield_data_paint_scheme.py create mode 100644 dis/siso_ref_010/enums/minefield_fusing_fuse_type.py create mode 100644 dis/siso_ref_010/enums/minefield_paint_scheme_algae.py create mode 100644 dis/siso_ref_010/enums/minefield_paint_scheme_paint_scheme.py create mode 100644 dis/siso_ref_010/enums/minefield_sensor_types.py create mode 100644 dis/siso_ref_010/enums/minefield_sensor_types_flir.py create mode 100644 dis/siso_ref_010/enums/minefield_sensor_types_laser.py create mode 100644 dis/siso_ref_010/enums/minefield_sensor_types_magnetic.py create mode 100644 dis/siso_ref_010/enums/minefield_sensor_types_multispectral.py create mode 100644 dis/siso_ref_010/enums/minefield_sensor_types_optical.py create mode 100644 dis/siso_ref_010/enums/minefield_sensor_types_physical.py create mode 100644 dis/siso_ref_010/enums/minefield_sensor_types_radar.py create mode 100644 dis/siso_ref_010/enums/minefield_sensor_types_sonar.py create mode 100644 dis/siso_ref_010/enums/minefield_state_appearance_bit_map.py create mode 100644 dis/siso_ref_010/enums/minefield_state_protocol_mode.py create mode 100644 dis/siso_ref_010/enums/mode5iffmission.py create mode 100644 dis/siso_ref_010/enums/mode5level_selection.py create mode 100644 dis/siso_ref_010/enums/mode5location_errors.py create mode 100644 dis/siso_ref_010/enums/mode5message_formats_status.py create mode 100644 dis/siso_ref_010/enums/mode5platform_type.py create mode 100644 dis/siso_ref_010/enums/mode5reply.py create mode 100644 dis/siso_ref_010/enums/mode5saltitude_resolution.py create mode 100644 dis/siso_ref_010/enums/mode5squitter_type.py create mode 100644 dis/siso_ref_010/enums/mode_caltitude_indicator.py create mode 100644 dis/siso_ref_010/enums/mode_sinterrogator_identifier_ictype.py create mode 100644 dis/siso_ref_010/enums/mode_sinterrogator_status_transmit_state.py create mode 100644 dis/siso_ref_010/enums/mode_ssquitter_record_source.py create mode 100644 dis/siso_ref_010/enums/mode_ssquitter_type.py create mode 100644 dis/siso_ref_010/enums/munition_appearance.py create mode 100644 dis/siso_ref_010/enums/munition_capabilities.py create mode 100644 dis/siso_ref_010/enums/munition_category.py create mode 100644 dis/siso_ref_010/enums/munition_descriptor_fuse.py create mode 100644 dis/siso_ref_010/enums/munition_descriptor_warhead.py create mode 100644 dis/siso_ref_010/enums/munition_domain.py create mode 100644 dis/siso_ref_010/enums/munition_expendable_status.py create mode 100644 dis/siso_ref_010/enums/navigation_source.py create mode 100644 dis/siso_ref_010/enums/netidrecord_frequency_table.py create mode 100644 dis/siso_ref_010/enums/netidrecord_mode.py create mode 100644 dis/siso_ref_010/enums/non_human_life_forms_appearance.py create mode 100644 dis/siso_ref_010/enums/object_kind.py create mode 100644 dis/siso_ref_010/enums/object_state_appearance_general.py create mode 100644 dis/siso_ref_010/enums/object_state_modification_areal_object.py create mode 100644 dis/siso_ref_010/enums/object_state_modification_linear_object.py create mode 100644 dis/siso_ref_010/enums/object_state_modification_point_object.py create mode 100644 dis/siso_ref_010/enums/ownership_status.py create mode 100644 dis/siso_ref_010/enums/parachute.py create mode 100644 dis/siso_ref_010/enums/physical_association_type_groups.py create mode 100644 dis/siso_ref_010/enums/platform_air_category.py create mode 100644 dis/siso_ref_010/enums/platform_air_civilian_fixed_wing_aircraft_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_air_civilian_glider_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_air_civilian_helicopter_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_air_civilian_lighterthan_air_airship_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_air_civilian_lighterthan_air_balloon_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_air_civilian_ultralight_nonrigid_wing_aircraft_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_air_civilian_ultralight_rigid_wing_aircraft_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_domain.py create mode 100644 dis/siso_ref_010/enums/platform_land_bus_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_land_car_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_land_category.py create mode 100644 dis/siso_ref_010/enums/platform_land_construction_specialty_vehicle_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_land_farm_specialty_vehicle_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_land_motorcycle_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_land_multiple_unit_cargo_truck_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_land_multiple_unit_utility_emergency_truck_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_land_nonmotorized_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_land_recreational_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_land_single_unit_cargo_truck_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_land_single_unit_utility_emergency_truck_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_land_trailer_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_land_trains_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_land_utility_emergency_car_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_space_category.py create mode 100644 dis/siso_ref_010/enums/platform_subsurface_category.py create mode 100644 dis/siso_ref_010/enums/platform_subsurface_civilian_semi_submersibles_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_subsurface_civilian_submarine_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_subsurface_civilian_submersible_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_surface_category.py create mode 100644 dis/siso_ref_010/enums/platform_surface_dry_cargo_ship_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_surface_fishing_vessel_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_surface_other_vessels_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_surface_passenger_vessel_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_surface_private_motorboat_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_surface_private_sailboat_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_surface_support_vessel_subcategories.py create mode 100644 dis/siso_ref_010/enums/platform_surface_tanker_subcategories.py create mode 100644 dis/siso_ref_010/enums/point_object_appearance_air_ground_burst.py create mode 100644 dis/siso_ref_010/enums/point_object_appearance_building_rubble.py create mode 100644 dis/siso_ref_010/enums/point_object_appearance_building_structure.py create mode 100644 dis/siso_ref_010/enums/point_object_appearance_crater.py create mode 100644 dis/siso_ref_010/enums/point_object_appearance_disturbed_earth_road.py create mode 100644 dis/siso_ref_010/enums/point_object_appearance_log_crib_abatis_et_al.py create mode 100644 dis/siso_ref_010/enums/point_object_appearance_pothole.py create mode 100644 dis/siso_ref_010/enums/point_object_appearance_ribbon_bridge.py create mode 100644 dis/siso_ref_010/enums/point_object_appearance_stationary_bridge_and_avlb.py create mode 100644 dis/siso_ref_010/enums/point_object_appearance_tree.py create mode 100644 dis/siso_ref_010/enums/q.dat create mode 100644 dis/siso_ref_010/enums/radio_appearance.py create mode 100644 dis/siso_ref_010/enums/radio_capabilities.py create mode 100644 dis/siso_ref_010/enums/radio_category.py create mode 100644 dis/siso_ref_010/enums/radio_subcategory.py create mode 100644 dis/siso_ref_010/enums/receiver_receiver_state.py create mode 100644 dis/siso_ref_010/enums/record_query_revent_type.py create mode 100644 dis/siso_ref_010/enums/record_revent_type.py create mode 100644 dis/siso_ref_010/enums/repair_complete_repair.py create mode 100644 dis/siso_ref_010/enums/repair_groups.py create mode 100644 dis/siso_ref_010/enums/repair_response_repair_result.py create mode 100644 dis/siso_ref_010/enums/reply_amplification.py create mode 100644 dis/siso_ref_010/enums/required_reliability_service.py create mode 100644 dis/siso_ref_010/enums/season.py create mode 100644 dis/siso_ref_010/enums/sensor_emitter_appearance.py create mode 100644 dis/siso_ref_010/enums/sensor_emitter_capabilities.py create mode 100644 dis/siso_ref_010/enums/sensor_emitter_category.py create mode 100644 dis/siso_ref_010/enums/sensor_on_off_status.py create mode 100644 dis/siso_ref_010/enums/sensor_record_sensor_type_other_active_sensors.py create mode 100644 dis/siso_ref_010/enums/sensor_record_sensor_type_passive_sensors.py create mode 100644 dis/siso_ref_010/enums/sensor_type_source.py create mode 100644 dis/siso_ref_010/enums/separation_vppre_entity_indicator.py create mode 100644 dis/siso_ref_010/enums/separation_vpreasonfor_separation.py create mode 100644 dis/siso_ref_010/enums/service_request_service_type_requested.py create mode 100644 dis/siso_ref_010/enums/signal_encoding_class.py create mode 100644 dis/siso_ref_010/enums/signal_encoding_type.py create mode 100644 dis/siso_ref_010/enums/signal_tdltype.py create mode 100644 dis/siso_ref_010/enums/signal_user_protocol_identification_number.py create mode 100644 dis/siso_ref_010/enums/sisostd002version.py create mode 100644 dis/siso_ref_010/enums/space_platform_appearance.py create mode 100644 dis/siso_ref_010/enums/space_platform_capabilities.py create mode 100644 dis/siso_ref_010/enums/specific_dimension_enumerationsfor_air_area_size.py create mode 100644 dis/siso_ref_010/enums/specific_dimension_enumerationsfor_land_area_size.py create mode 100644 dis/siso_ref_010/enums/spot_chaff_status.py create mode 100644 dis/siso_ref_010/enums/stop_freeze_frozen_behavior.py create mode 100644 dis/siso_ref_010/enums/stop_freeze_reason.py create mode 100644 dis/siso_ref_010/enums/subcategoriesfor_air_category200bird.py create mode 100644 dis/siso_ref_010/enums/subcategoriesfor_air_category201insect.py create mode 100644 dis/siso_ref_010/enums/subcategoriesfor_air_category202mammal.py create mode 100644 dis/siso_ref_010/enums/subcategoriesfor_land_category200mammal.py create mode 100644 dis/siso_ref_010/enums/subcategoriesfor_land_category201reptile.py create mode 100644 dis/siso_ref_010/enums/subcategoriesfor_land_category202amphibian.py create mode 100644 dis/siso_ref_010/enums/subcategoriesfor_land_category203insect.py create mode 100644 dis/siso_ref_010/enums/subcategoriesfor_land_category204arachnid.py create mode 100644 dis/siso_ref_010/enums/subcategoriesfor_land_category205mollusk.py create mode 100644 dis/siso_ref_010/enums/subcategoriesfor_land_category206marsupial.py create mode 100644 dis/siso_ref_010/enums/subcategoriesfor_subsurface_category200fish.py create mode 100644 dis/siso_ref_010/enums/subcategoriesfor_subsurface_category201mammal.py create mode 100644 dis/siso_ref_010/enums/subcategoriesfor_subsurface_category202mollusk.py create mode 100644 dis/siso_ref_010/enums/subcategoriesfor_subsurface_category203crustacean.py create mode 100644 dis/siso_ref_010/enums/subcategoriesfor_subsurface_category204insect.py create mode 100644 dis/siso_ref_010/enums/subsurface_platform_appearance.py create mode 100644 dis/siso_ref_010/enums/subsurface_platform_capabilities.py create mode 100644 dis/siso_ref_010/enums/supply_appearance.py create mode 100644 dis/siso_ref_010/enums/supply_capabilities.py create mode 100644 dis/siso_ref_010/enums/supply_domain.py create mode 100644 dis/siso_ref_010/enums/supply_fuel_type.py create mode 100644 dis/siso_ref_010/enums/surface_platform_appearance.py create mode 100644 dis/siso_ref_010/enums/surface_platform_capabilities.py create mode 100644 dis/siso_ref_010/enums/surveillance_status.py create mode 100644 dis/siso_ref_010/enums/system_on_off_status.py create mode 100644 dis/siso_ref_010/enums/tcasacasbasic_advanced_indicator.py create mode 100644 dis/siso_ref_010/enums/tcasacasindicator.py create mode 100644 dis/siso_ref_010/enums/tcasacassoftware_version.py create mode 100644 dis/siso_ref_010/enums/tcasacastype.py create mode 100644 dis/siso_ref_010/enums/tcasiiitype.py create mode 100644 dis/siso_ref_010/enums/tilink_type.py create mode 100644 dis/siso_ref_010/enums/time_slot_allocation_level.py create mode 100644 dis/siso_ref_010/enums/time_type_source.py create mode 100644 dis/siso_ref_010/enums/transfer_control_transfer_type.py create mode 100644 dis/siso_ref_010/enums/transmission_indicator.py create mode 100644 dis/siso_ref_010/enums/transmitter_antenna_pattern_reference_system.py create mode 100644 dis/siso_ref_010/enums/transmitter_antenna_pattern_type.py create mode 100644 dis/siso_ref_010/enums/transmitter_crypto_system.py create mode 100644 dis/siso_ref_010/enums/transmitter_detail_amplitude_modulation.py create mode 100644 dis/siso_ref_010/enums/transmitter_detail_amplitudeand_angle_modulation.py create mode 100644 dis/siso_ref_010/enums/transmitter_detail_anglemodulation.py create mode 100644 dis/siso_ref_010/enums/transmitter_detail_carrier_phase_shift_modulation.py create mode 100644 dis/siso_ref_010/enums/transmitter_detail_combination_modulation.py create mode 100644 dis/siso_ref_010/enums/transmitter_detail_pulse_modulation.py create mode 100644 dis/siso_ref_010/enums/transmitter_detail_satcommodulation.py create mode 100644 dis/siso_ref_010/enums/transmitter_detail_unmodulated_modulation.py create mode 100644 dis/siso_ref_010/enums/transmitter_input_source.py create mode 100644 dis/siso_ref_010/enums/transmitter_major_modulation.py create mode 100644 dis/siso_ref_010/enums/transmitter_modulation_type_system.py create mode 100644 dis/siso_ref_010/enums/transmitter_transmit_state.py create mode 100644 dis/siso_ref_010/enums/transponder_interrogator_indicator.py create mode 100644 dis/siso_ref_010/enums/turn_rate_source.py create mode 100644 dis/siso_ref_010/enums/uaacoustic_emitter_system_function.py create mode 100644 dis/siso_ref_010/enums/uaacoustic_system_name.py create mode 100644 dis/siso_ref_010/enums/uaactive_emission_parameter_index.py create mode 100644 dis/siso_ref_010/enums/uaadditional_passive_activity_parameter_index.py create mode 100644 dis/siso_ref_010/enums/uapassive_parameter_index.py create mode 100644 dis/siso_ref_010/enums/uapropulsion_plant_configuration.py create mode 100644 dis/siso_ref_010/enums/uapropulsion_plant_configuration_configuration.py create mode 100644 dis/siso_ref_010/enums/uascan_pattern.py create mode 100644 dis/siso_ref_010/enums/uastate_change_update_indicator.py create mode 100644 dis/siso_ref_010/enums/variable_parameter_record_type.py create mode 100644 dis/siso_ref_010/enums/variable_record_type.py create mode 100644 dis/siso_ref_010/enums/variantsfor_air_category200bird.py create mode 100644 dis/siso_ref_010/enums/variantsfor_land_categories_reptiles_amphibians_insectsand_arachnids.py create mode 100644 dis/siso_ref_010/enums/variantsfor_subsurface_category201mammal.py create mode 100644 dis/standard_variable_record.py create mode 100644 dis/standard_variable_specification.py create mode 100644 dis/start_resume_pdu.py create mode 100644 dis/start_resume_reliable_pdu.py create mode 100644 dis/start_resume_rpdu.py create mode 100644 dis/stop_freeze_pdu.py create mode 100644 dis/stop_freeze_reliable_pdu.py create mode 100644 dis/stop_freeze_rpdu.py create mode 100644 dis/storage_fuel.py create mode 100644 dis/storage_fuel_reload.py create mode 100644 dis/supplemental_emission_entity_state_pdu.py create mode 100644 dis/supply_quantity.py create mode 100644 dis/synthetic_environment_family_pdu.py create mode 100644 dis/system_identifier.py create mode 100644 dis/time_space_position_information_pdu.py create mode 100644 dis/total_record_sets.py create mode 100644 dis/track_jam_data.py create mode 100644 dis/transfer_ownership_pdu.py create mode 100644 dis/transmitter_pdu.py create mode 100644 dis/tspipdu.py create mode 100644 dis/uabeam.py create mode 100644 dis/uaemitter.py create mode 100644 dis/uafundamental_parameter.py create mode 100644 dis/unattached_identifier.py create mode 100644 dis/underwater_acoustic_pdu.py create mode 100644 dis/unsigned_disinteger.py create mode 100644 dis/utils/DataInputStream.py create mode 100644 dis/utils/DataOutputStream.py create mode 100644 dis/utils/PduFactory.py create mode 100644 dis/utils/RangeCoordinates.py create mode 100644 dis/utils/__init__.py create mode 100644 dis/variable_datum.py create mode 100644 dis/variable_parameter.py create mode 100644 dis/variable_transmitter_parameters.py create mode 100644 dis/vector2float.py create mode 100644 dis/vector3double.py create mode 100644 dis/vector3float.py create mode 100644 dis/vectoring_nozzle_system.py create mode 100644 dis/warfare_family_pdu.py diff --git a/dis/__init__.py b/dis/__init__.py new file mode 100644 index 0000000..15fca9e --- /dev/null +++ b/dis/__init__.py @@ -0,0 +1,248 @@ +import sys +sys.path.append('dis') +sys.path.append('dis/utils') +sys.path.append('dis/siso_ref_010/enums') + +from dis.acknowledge_pdu import AcknowledgePdu +from dis.acknowledge_reliable_pdu import AcknowledgeReliablePdu +from dis.acknowledge_rpdu import AcknowledgeRPdu +from dis.acoustic_emitter import AcousticEmitter +from dis.action_request_pdu import ActionRequestPdu +from dis.action_request_reliable_pdu import ActionRequestReliablePdu +from dis.action_request_rpdu import ActionRequestRPdu +from dis.action_response_pdu import ActionResponsePdu +from dis.action_response_reliable_pdu import ActionResponseReliablePdu +from dis.action_response_rpdu import ActionResponseRPdu +from dis.aggregate_identifier import AggregateIdentifier +from dis.aggregate_marking import AggregateMarking +from dis.aggregate_state_pdu import AggregateStatePdu +from dis.aggregate_type import AggregateType +from dis.angle_deception import AngleDeception +from dis.angular_velocity_vector import AngularVelocityVector +from dis.antenna_location import AntennaLocation +from dis.apa import APA +from dis.appearance_pdu import AppearancePdu +from dis.appearance import Appearance +from dis.areal_object_state_pdu import ArealObjectStatePdu +from dis.articulated_parts_pdu import ArticulatedPartsPdu +from dis.articulated_part_vp import ArticulatedPartVP +from dis.association import Association +from dis.attached_part_vp import AttachedPartVP +from dis.attribute_pdu import AttributePdu +from dis.attribute import Attribute +from dis.attribute_record_set import AttributeRecordSet +from dis.beam_antenna_pattern import BeamAntennaPattern +from dis.beam_data import BeamData +from dis.beam_status import BeamStatus +from dis.blanking_sector import BlankingSector +from dis.change_options import ChangeOptions +from dis.clock_time import ClockTime +from dis.collision_elastic_pdu import CollisionElasticPdu +from dis.collision_pdu import CollisionPdu +from dis.comment_pdu import CommentPdu +from dis.comment_reliable_pdu import CommentReliablePdu +from dis.comment_rpdu import CommentRPdu +from dis.communications_node_id import CommunicationsNodeID +from dis.create_entity_pdu import CreateEntityPdu +from dis.create_entity_reliable_pdu import CreateEntityReliablePdu +from dis.create_entity_rpdu import CreateEntityRPdu +from dis.data_filter_record import DataFilterRecord +from dis.data_pdu import DataPdu +from dis.data_query_datum_specification import DataQueryDatumSpecification +from dis.data_query_pdu import DataQueryPdu +from dis.data_query_reliable_pdu import DataQueryReliablePdu +from dis.data_query_rpdu import DataQueryRPdu +from dis.data_reliable_pdu import DataReliablePdu +from dis.data_rpdu import DataRPdu +from dis.datum_specification import DatumSpecification +from dis.dead_reckoning_parameters import DeadReckoningParameters +from dis.designator_pdu import DesignatorPdu +from dis.detonation_pdu import DetonationPdu +from dis.directed_energy_area_aimpoint import DirectedEnergyAreaAimpoint +from dis.directed_energy_damage import DirectedEnergyDamage +from dis.directed_energy_fire_pdu import DirectedEnergyFirePdu +from dis.directed_energy_precision_aimpoint import DirectedEnergyPrecisionAimpoint +from dis.directed_energy_target_energy_deposition import DirectedEnergyTargetEnergyDeposition +from dis.distributed_emissions_regeneration_family_pdu import DistributedEmissionsRegenerationFamilyPdu +from dis.domain import Domain +from dis.eefundamental_parameter_data import EEFundamentalParameterData +from dis.electromagnetic_emission_pdu import ElectromagneticEmissionPdu +from dis.electronic_emitter import ElectronicEmitter +from dis.emitter_beam import EmitterBeam +from dis.emitter_system import EmitterSystem +from dis.engine_fuel import EngineFuel +from dis.engine_fuel_reload import EngineFuelReload +from dis.entity_association_vp import EntityAssociationVP +from dis.entity_damage_status_pdu import EntityDamageStatusPdu +from dis.entity_identifier import EntityIdentifier +from dis.entity_id import EntityID +from dis.entity_information_interaction_family_pdu import EntityInformationInteractionFamilyPdu +from dis.entity_management_family_pdu import EntityManagementFamilyPdu +from dis.entity_marking import EntityMarking +from dis.entity_state_pdu import EntityStatePdu +from dis.entity_state_update_pdu import EntityStateUpdatePdu +from dis.entity_type import EntityType +from dis.entity_type_raw import EntityTypeRaw +from dis.entity_type_vp import EntityTypeVP +from dis.environmental_process_pdu import EnvironmentalProcessPdu +from dis.environment import Environment +from dis.euler_angles import EulerAngles +from dis.event_identifier_live_entity import EventIdentifierLiveEntity +from dis.event_identifier import EventIdentifier +from dis.event_report_pdu import EventReportPdu +from dis.event_report_reliable_pdu import EventReportReliablePdu +from dis.event_report_rpdu import EventReportRPdu +from dis.expendable_descriptor import ExpendableDescriptor +from dis.expendable import Expendable +from dis.expendable_reload import ExpendableReload +from dis.explosion_descriptor import ExplosionDescriptor +from dis.false_targets_attribute import FalseTargetsAttribute +from dis.fire_pdu import FirePdu +from dis.fixed_datum import FixedDatum +from dis.fundamental_operational_data import FundamentalOperationalData +from dis.grid_axis_descriptor_fixed import GridAxisDescriptorFixed +from dis.grid_axis_descriptor import GridAxisDescriptor +from dis.grid_axis_descriptor_variable import GridAxisDescriptorVariable +from dis.grid_data import GridData +from dis.grid_data_type0 import GridDataType0 +from dis.grid_data_type1 import GridDataType1 +from dis.grid_data_type2 import GridDataType2 +from dis.gridded_data_pdu import GriddedDataPdu +from dis.group_id import GroupID +from dis.identification_friend_or_foe_pdu import IdentificationFriendOrFoePdu +from dis.iffdata import IFFData +from dis.iffdata_specification import IFFDataSpecification +from dis.ifffundamental_parameter_data import IFFFundamentalParameterData +from dis.iffpdu_layer2data import IFFPduLayer2Data +from dis.iffpdu import IFFPdu +from dis.information_operations_action_pdu import InformationOperationsActionPdu +from dis.information_operations_family_pdu import InformationOperationsFamilyPdu +from dis.information_operations_report_pdu import InformationOperationsReportPdu +from dis.intercom_communications_parameters import IntercomCommunicationsParameters +from dis.intercom_control_pdu import IntercomControlPdu +from dis.intercom_identifier import IntercomIdentifier +from dis.intercom_reference_id import IntercomReferenceID +from dis.intercom_signal_pdu import IntercomSignalPdu +from dis.iocomms_node_record import IOCommsNodeRecord +from dis.ioeffect_record import IOEffectRecord +from dis.iorecord import IORecord +from dis.is_group_of_pdu import IsGroupOfPdu +from dis.is_part_of_pdu import IsPartOfPdu +from dis.jamming_technique import JammingTechnique +from dis.launched_munition_record import LaunchedMunitionRecord +from dis.layer_header import LayerHeader +from dis.ledetonation_pdu import LEDetonationPdu +from dis.lefire_pdu import LEFirePdu +from dis.levector3fixed_byte import LEVector3FixedByte +from dis.linear_object_state_pdu import LinearObjectStatePdu +from dis.linear_segment_parameter import LinearSegmentParameter +from dis.live_dead_reckoning_parameters import LiveDeadReckoningParameters +from dis.live_entity_detonation_pdu import LiveEntityDetonationPdu +from dis.live_entity_family_pdu import LiveEntityFamilyPdu +from dis.live_entity_fire_pdu import LiveEntityFirePdu +from dis.live_entity_identifier import LiveEntityIdentifier +from dis.live_entity_linear_velocity import LiveEntityLinearVelocity +from dis.live_entity_orientation16 import LiveEntityOrientation16 +from dis.live_entity_orientation_error import LiveEntityOrientationError +from dis.live_entity_orientation import LiveEntityOrientation +from dis.live_entity_position_error import LiveEntityPositionError +from dis.live_entity_relative_world_coordinates import LiveEntityRelativeWorldCoordinates +from dis.live_simulation_address import LiveSimulationAddress +from dis.logistics_family_pdu import LogisticsFamilyPdu +from dis.mine_emplacement_time import MineEmplacementTime +from dis.mine_entity_identifier import MineEntityIdentifier +from dis.minefield_data_pdu import MinefieldDataPdu +from dis.minefield_family_pdu import MinefieldFamilyPdu +from dis.minefield_identifier import MinefieldIdentifier +from dis.minefield_query_pdu import MinefieldQueryPdu +from dis.minefield_response_nackpdu import MinefieldResponseNACKPdu +from dis.minefield_sensor_type import MinefieldSensorType +from dis.minefield_state_pdu import MinefieldStatePdu +from dis.modulation_parameters import ModulationParameters +from dis.modulation_type import ModulationType +from dis.munition_descriptor import MunitionDescriptor +from dis.munition import Munition +from dis.munition_reload import MunitionReload +from dis.named_location_identification import NamedLocationIdentification +from dis.object_identifier import ObjectIdentifier +from dis.object_type import ObjectType +from dis.ownership_status_record import OwnershipStatusRecord +from dis.pdu_base import PduBase +from dis.pdu import Pdu +from dis.pdu_status import PduStatus +from dis.point_object_state_pdu import PointObjectStatePdu +from dis.propulsion_system_data import PropulsionSystemData +from dis.protocol_mode import ProtocolMode +from dis.radio_comms_header import RadioCommsHeader +from dis.radio_communications_family_pdu import RadioCommunicationsFamilyPdu +from dis.radio_identifier import RadioIdentifier +from dis.radio_type import RadioType +from dis.receiver_pdu import ReceiverPdu +from dis.record_query_reliable_pdu import RecordQueryReliablePdu +from dis.record_query_rpdu import RecordQueryRPdu +from dis.record_query_specification import RecordQuerySpecification +from dis.record_reliable_pdu import RecordReliablePdu +from dis.record_rpdu import RecordRPdu +from dis.record_specification_element import RecordSpecificationElement +from dis.record_specification import RecordSpecification +from dis.relationship import Relationship +from dis.remove_entity_pdu import RemoveEntityPdu +from dis.remove_entity_reliable_pdu import RemoveEntityReliablePdu +from dis.remove_entity_rpdu import RemoveEntityRPdu +from dis.repair_complete_pdu import RepairCompletePdu +from dis.repair_response_pdu import RepairResponsePdu +from dis.request_id import RequestID +from dis.resupply_cancel_pdu import ResupplyCancelPdu +from dis.resupply_offer_pdu import ResupplyOfferPdu +from dis.resupply_received_pdu import ResupplyReceivedPdu +from dis.secondary_operational_data import SecondaryOperationalData +from dis.seespdu import SEESPdu +from dis.sensor import Sensor +from dis.separation_vp import SeparationVP +from dis.service_request_pdu import ServiceRequestPdu +from dis.set_data_pdu import SetDataPdu +from dis.set_data_reliable_pdu import SetDataReliablePdu +from dis.set_data_rpdu import SetDataRPdu +from dis.set_record_reliable_pdu import SetRecordReliablePdu +from dis.set_record_rpdu import SetRecordRPdu +from dis.shaft_rpm import ShaftRPM +from dis.signal_pdu import SignalPdu +from dis.silent_entity_system import SilentEntitySystem +from dis.simulation_address import SimulationAddress +from dis.simulation_identifier import SimulationIdentifier +from dis.simulation_management_family_pdu import SimulationManagementFamilyPdu +from dis.simulation_management_with_reliability_family_pdu import SimulationManagementWithReliabilityFamilyPdu +from dis.standard_variable_record import StandardVariableRecord +from dis.standard_variable_specification import StandardVariableSpecification +from dis.start_resume_pdu import StartResumePdu +from dis.start_resume_reliable_pdu import StartResumeReliablePdu +from dis.start_resume_rpdu import StartResumeRPdu +from dis.stop_freeze_pdu import StopFreezePdu +from dis.stop_freeze_reliable_pdu import StopFreezeReliablePdu +from dis.stop_freeze_rpdu import StopFreezeRPdu +from dis.storage_fuel import StorageFuel +from dis.storage_fuel_reload import StorageFuelReload +from dis.supplemental_emission_entity_state_pdu import SupplementalEmissionEntityStatePdu +from dis.supply_quantity import SupplyQuantity +from dis.synthetic_environment_family_pdu import SyntheticEnvironmentFamilyPdu +from dis.system_identifier import SystemIdentifier +from dis.time_space_position_information_pdu import TimeSpacePositionInformationPdu +from dis.total_record_sets import TotalRecordSets +from dis.track_jam_data import TrackJamData +from dis.transfer_ownership_pdu import TransferOwnershipPdu +from dis.transmitter_pdu import TransmitterPdu +from dis.tspipdu import TSPIPdu +from dis.uabeam import UABeam +from dis.uaemitter import UAEmitter +from dis.uafundamental_parameter import UAFundamentalParameter +from dis.unattached_identifier import UnattachedIdentifier +from dis.underwater_acoustic_pdu import UnderwaterAcousticPdu +from dis.unsigned_disinteger import UnsignedDISInteger +from dis.variable_datum import VariableDatum +from dis.variable_parameter import VariableParameter +from dis.variable_transmitter_parameters import VariableTransmitterParameters +from dis.vector2float import Vector2Float +from dis.vector3double import Vector3Double +from dis.vector3float import Vector3Float +from dis.vectoring_nozzle_system import VectoringNozzleSystem +from dis.warfare_family_pdu import WarfareFamilyPdu diff --git a/dis/abstract_iffpdu_layer_data.py b/dis/abstract_iffpdu_layer_data.py new file mode 100644 index 0000000..0669394 --- /dev/null +++ b/dis/abstract_iffpdu_layer_data.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class AbstractIFFPduLayerData( object ): + """7.6.5.1 Abstract base class for IFFPduLayerData classes""" + + def __init__(self): + """ Initializer for AbstractIFFPduLayerData""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/acknowledge_pdu.py b/dis/acknowledge_pdu.py new file mode 100644 index 0000000..b8ecf9b --- /dev/null +++ b/dis/acknowledge_pdu.py @@ -0,0 +1,105 @@ +from enum import Enum + +from .simulation_management_family_pdu import SimulationManagementFamilyPdu +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .siso_ref_010.enums.acknowledge_acknowledge_flag import AcknowledgeAcknowledgeFlag +from .siso_ref_010.enums.acknowledge_response_flag import AcknowledgeResponseFlag + +class AcknowledgePdu( SimulationManagementFamilyPdu ): + """7.5.6 Acknowledges the receipt of a Start/Resume PDU, Stop/Freeze PDU, Create Entity PDU, or Remove Entity PDU. See 5.6.5.6.""" + + def __init__(self): + """ Initializer for AcknowledgePdu""" + super().__init__() + # /** type of message being acknowledged uid 69 */ + self.acknowledgeFlag = AcknowledgeAcknowledgeFlag.default + + # /** Whether or not the receiving entity was able to comply with the request uid 70 */ + self.responseFlag = AcknowledgeResponseFlag.default + + """ Request ID that is unique""" + self.requestID = 0 + self.pduType = DisPduType.acknowledge + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "AcknowledgeAcknowledgeFlag : " + self.acknowledgeFlag.get_description + "(" + (str(int(self.acknowledgeFlag))) + ")" + "\n" + outputString += "AcknowledgeResponseFlag : " + self.responseFlag.get_description + "(" + (str(int(self.responseFlag))) + ")" + "\n" + outputString += "RequestID : " + str(self.requestID) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( AcknowledgePdu, self ).serialize(outputStream) + self.serialize_enum(self.acknowledgeFlag,outputStream) + self.serialize_enum(self.responseFlag,outputStream) + outputStream.write_int(int(self.requestID)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( AcknowledgePdu, self).parse(inputStream) + self.acknowledgeFlag = AcknowledgeAcknowledgeFlag.get_enum(self.parse_enum(self.acknowledgeFlag,inputStream)) + self.responseFlag = AcknowledgeResponseFlag.get_enum(self.parse_enum(self.responseFlag,inputStream)) + self.requestID = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/acknowledge_reliable_pdu.py b/dis/acknowledge_reliable_pdu.py new file mode 100644 index 0000000..7aa2d57 --- /dev/null +++ b/dis/acknowledge_reliable_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class AcknowledgeReliablePdu( object ): + """Alias, more descriptive name for AcknowledgeRPdu.""" + + def __init__(self): + """ Initializer for AcknowledgeReliablePdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/acknowledge_rpdu.py b/dis/acknowledge_rpdu.py new file mode 100644 index 0000000..4bc6b9a --- /dev/null +++ b/dis/acknowledge_rpdu.py @@ -0,0 +1,105 @@ +from enum import Enum + +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .simulation_management_with_reliability_family_pdu import SimulationManagementWithReliabilityFamilyPdu +from .siso_ref_010.enums.acknowledge_acknowledge_flag import AcknowledgeAcknowledgeFlag +from .siso_ref_010.enums.acknowledge_response_flag import AcknowledgeResponseFlag + +class AcknowledgeRPdu( SimulationManagementWithReliabilityFamilyPdu ): + """5.12.4.6 Serves the same function as the Acknowledge PDU but is used to acknowledge the receipt of a Create Entity-R PDU, a Remove Entity-R PDU, a Start/Resume-R PDU, or a Stop/Freeze-R PDU.""" + + def __init__(self): + """ Initializer for AcknowledgeRPdu""" + super().__init__() + # /** ack flags uid 69 */ + self.acknowledgeFlag = AcknowledgeAcknowledgeFlag.default + + # /** response flags uid 70 */ + self.responseFlag = AcknowledgeResponseFlag.default + + """ Request ID provides a unique identifier""" + self.requestID = 0 + self.pduType = DisPduType.acknowledge_reliable + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "AcknowledgeAcknowledgeFlag : " + self.acknowledgeFlag.get_description + "(" + (str(int(self.acknowledgeFlag))) + ")" + "\n" + outputString += "AcknowledgeResponseFlag : " + self.responseFlag.get_description + "(" + (str(int(self.responseFlag))) + ")" + "\n" + outputString += "RequestID : " + str(self.requestID) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( AcknowledgeRPdu, self ).serialize(outputStream) + self.serialize_enum(self.acknowledgeFlag,outputStream) + self.serialize_enum(self.responseFlag,outputStream) + outputStream.write_int(int(self.requestID)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( AcknowledgeRPdu, self).parse(inputStream) + self.acknowledgeFlag = AcknowledgeAcknowledgeFlag.get_enum(self.parse_enum(self.acknowledgeFlag,inputStream)) + self.responseFlag = AcknowledgeResponseFlag.get_enum(self.parse_enum(self.responseFlag,inputStream)) + self.requestID = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/acoustic_emitter.py b/dis/acoustic_emitter.py new file mode 100644 index 0000000..a86ec6f --- /dev/null +++ b/dis/acoustic_emitter.py @@ -0,0 +1,98 @@ +from enum import Enum + +from .siso_ref_010.enums.uaacoustic_emitter_system_function import UAAcousticEmitterSystemFunction +from .siso_ref_010.enums.uaacoustic_system_name import UAAcousticSystemName + +class AcousticEmitter( object ): + """Information about a specific UA emitter. Section 6.2.2.""" + + def __init__(self): + """ Initializer for AcousticEmitter""" + # /** The system for a particular UA emitter, and an enumeration uid 144 */ + self.acousticSystemName = UAAcousticSystemName.default + + # /** The function of the acoustic system uid 145 */ + self.acousticFunction = UAAcousticEmitterSystemFunction.default + + """ The UA emitter identification number relative to a specific system""" + self.acousticIDNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "UAAcousticSystemName : " + self.acousticSystemName.get_description + "(" + (str(int(self.acousticSystemName))) + ")" + "\n" + outputString += "UAAcousticEmitterSystemFunction : " + self.acousticFunction.get_description + "(" + (str(int(self.acousticFunction))) + ")" + "\n" + outputString += "AcousticIDNumber : " + str(self.acousticIDNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.acousticSystemName,outputStream) + self.serialize_enum(self.acousticFunction,outputStream) + outputStream.write_byte(int(self.acousticIDNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.acousticSystemName = UAAcousticSystemName.get_enum(self.parse_enum(self.acousticSystemName,inputStream)) + self.acousticFunction = UAAcousticEmitterSystemFunction.get_enum(self.parse_enum(self.acousticFunction,inputStream)) + self.acousticIDNumber = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/action_request_pdu.py b/dis/action_request_pdu.py new file mode 100644 index 0000000..4cd9c0c --- /dev/null +++ b/dis/action_request_pdu.py @@ -0,0 +1,210 @@ +from enum import Enum + +from .simulation_management_family_pdu import SimulationManagementFamilyPdu +from .variable_datum import VariableDatum +from .siso_ref_010.enums.action_request_action_id import ActionRequestActionID +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .fixed_datum import FixedDatum + +class ActionRequestPdu( SimulationManagementFamilyPdu ): + """ 7.5.7 A request from a Simulation Manager (SM) to a managed entity to perform a specified action. See 5.6.5.7""" + + def __init__(self): + """ Initializer for ActionRequestPdu""" + super().__init__() + """ identifies the request being made by the simulation manager""" + self.requestID = 0 + # /** identifies the particular action being requested(see Section 7 of SISO-REF-010). uid 71 */ + self.actionID = ActionRequestActionID.default + + """ Number of fixed datum records""" + self.numberOfFixedDatumRecords = 0 + """ Number of variable datum records, handled automatically by marshaller at run time (and not modifiable by end-user programmers)""" + self.numberOfVariableDatumRecords = 0 + """ variable length list of fixed datums""" + self._fixedDatums = [] + """ variable length list of variable length datums""" + self._variableDatums = [] + self.pduType = DisPduType.action_request + + + def get_numberOfFixedDatumRecords(self): + return len(self._fixedDatums) + def set_numberOfFixedDatumRecords(self, value): + numberOfFixedDatumRecords = value + + + def get_numberOfVariableDatumRecords(self): + return len(self._variableDatums) + def set_numberOfVariableDatumRecords(self, value): + numberOfVariableDatumRecords = value + + + def get_fixedDatums(self): + return self._fixedDatums + def set_fixedDatums(self, value): + self._fixedDatums = value + fixedDatums = property(get_fixedDatums, set_fixedDatums) + + + def add_fixedDatums(self, value : FixedDatum): + self._fixedDatums.append(value) + + + """ + /// Name : fixedDatums + /// UID : + /// Type : FixedDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of fixed datums + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_variableDatums(self): + return self._variableDatums + def set_variableDatums(self, value): + self._variableDatums = value + variableDatums = property(get_variableDatums, set_variableDatums) + + + def add_variableDatums(self, value : VariableDatum): + self._variableDatums.append(value) + + + """ + /// Name : variableDatums + /// UID : + /// Type : VariableDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of variable length datums + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RequestID : " + str(self.requestID) + "\n" + outputString += "ActionRequestActionID : " + self.actionID.get_description + "(" + (str(int(self.actionID))) + ")" + "\n" + outputString += "NumberOfFixedDatumRecords : " + str(len(self._fixedDatums)) + "\n" + outputString += "NumberOfVariableDatumRecords : " + str(len(self._variableDatums)) + "\n" + outputString += "FixedDatums : " + "\n" + for idx in range(0, len(self._fixedDatums)): + outputString += self._fixedDatums[idx].to_string() + + outputString += "VariableDatums : " + "\n" + for idx in range(0, len(self._variableDatums)): + outputString += self._variableDatums[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( ActionRequestPdu, self ).serialize(outputStream) + outputStream.write_int(int(self.requestID)) + self.serialize_enum(self.actionID,outputStream) + outputStream.write_int( len(self._fixedDatums)) + outputStream.write_int( len(self._variableDatums)) + for anObj in self._fixedDatums: + anObj.serialize(outputStream) + + for anObj in self._variableDatums: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( ActionRequestPdu, self).parse(inputStream) + self.requestID = inputStream.read_int() + self.actionID = ActionRequestActionID.get_enum(self.parse_enum(self.actionID,inputStream)) + self.numberOfFixedDatumRecords = inputStream.read_int() + self.numberOfVariableDatumRecords = inputStream.read_int() + for idx in range(0, self.numberOfFixedDatumRecords): + element = FixedDatum() + element.parse(inputStream) + self._fixedDatums.append(element) + + for idx in range(0, self.numberOfVariableDatumRecords): + element = VariableDatum() + element.parse(inputStream) + self._variableDatums.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/action_request_reliable_pdu.py b/dis/action_request_reliable_pdu.py new file mode 100644 index 0000000..3667846 --- /dev/null +++ b/dis/action_request_reliable_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class ActionRequestReliablePdu( object ): + """Alias, more descriptive name for ActionRequestRPdu.""" + + def __init__(self): + """ Initializer for ActionRequestReliablePdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/action_request_rpdu.py b/dis/action_request_rpdu.py new file mode 100644 index 0000000..904a673 --- /dev/null +++ b/dis/action_request_rpdu.py @@ -0,0 +1,227 @@ +from enum import Enum + +from .variable_datum import VariableDatum +from .siso_ref_010.enums.action_request_action_id import ActionRequestActionID +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .siso_ref_010.enums.required_reliability_service import RequiredReliabilityService +from .fixed_datum import FixedDatum +from .simulation_management_with_reliability_family_pdu import SimulationManagementWithReliabilityFamilyPdu + +class ActionRequestRPdu( SimulationManagementWithReliabilityFamilyPdu ): + """5.12.4.7 Serves the same function as the Action Request PDU but with the addition of reliability service levels.""" + + def __init__(self): + """ Initializer for ActionRequestRPdu""" + super().__init__() + # /** level of reliability service used for this transaction uid 74 */ + self.requiredReliabilityService = RequiredReliabilityService.default + + """ padding""" + self.pad1 = 0 + """ padding""" + self.pad2 = 0 + """ request ID provides a unique identifier""" + self.requestID = 0 + # /** request ID provides a unique identifier uid 71 */ + self.actionID = ActionRequestActionID.default + + """ Fixed datum record count""" + self.numberOfFixedDatumRecords = 0 + """ variable datum record count""" + self.numberOfVariableDatumRecords = 0 + """ Fixed datum records""" + self._fixedDatumRecords = [] + """ Variable datum records""" + self._variableDatumRecords = [] + self.pduType = DisPduType.action_request_reliable + + + def get_numberOfFixedDatumRecords(self): + return len(self._fixedDatumRecords) + def set_numberOfFixedDatumRecords(self, value): + numberOfFixedDatumRecords = value + + + def get_numberOfVariableDatumRecords(self): + return len(self._variableDatumRecords) + def set_numberOfVariableDatumRecords(self, value): + numberOfVariableDatumRecords = value + + + def get_fixedDatumRecords(self): + return self._fixedDatumRecords + def set_fixedDatumRecords(self, value): + self._fixedDatumRecords = value + fixedDatumRecords = property(get_fixedDatumRecords, set_fixedDatumRecords) + + + def add_fixedDatumRecords(self, value : FixedDatum): + self._fixedDatumRecords.append(value) + + + """ + /// Name : fixedDatumRecords + /// UID : + /// Type : FixedDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Fixed datum records + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_variableDatumRecords(self): + return self._variableDatumRecords + def set_variableDatumRecords(self, value): + self._variableDatumRecords = value + variableDatumRecords = property(get_variableDatumRecords, set_variableDatumRecords) + + + def add_variableDatumRecords(self, value : VariableDatum): + self._variableDatumRecords.append(value) + + + """ + /// Name : variableDatumRecords + /// UID : + /// Type : VariableDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Variable datum records + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RequiredReliabilityService : " + self.requiredReliabilityService.get_description + "(" + (str(int(self.requiredReliabilityService))) + ")" + "\n" + outputString += "Pad1 : " + str(self.pad1) + "\n" + outputString += "Pad2 : " + str(self.pad2) + "\n" + outputString += "RequestID : " + str(self.requestID) + "\n" + outputString += "ActionRequestActionID : " + self.actionID.get_description + "(" + (str(int(self.actionID))) + ")" + "\n" + outputString += "NumberOfFixedDatumRecords : " + str(len(self._fixedDatumRecords)) + "\n" + outputString += "NumberOfVariableDatumRecords : " + str(len(self._variableDatumRecords)) + "\n" + outputString += "FixedDatumRecords : " + "\n" + for idx in range(0, len(self._fixedDatumRecords)): + outputString += self._fixedDatumRecords[idx].to_string() + + outputString += "VariableDatumRecords : " + "\n" + for idx in range(0, len(self._variableDatumRecords)): + outputString += self._variableDatumRecords[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( ActionRequestRPdu, self ).serialize(outputStream) + self.serialize_enum(self.requiredReliabilityService,outputStream) + outputStream.write_byte(int(self.pad1)) + outputStream.write_short(int(self.pad2)) + outputStream.write_int(int(self.requestID)) + self.serialize_enum(self.actionID,outputStream) + outputStream.write_int( len(self._fixedDatumRecords)) + outputStream.write_int( len(self._variableDatumRecords)) + for anObj in self._fixedDatumRecords: + anObj.serialize(outputStream) + + for anObj in self._variableDatumRecords: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( ActionRequestRPdu, self).parse(inputStream) + self.requiredReliabilityService = RequiredReliabilityService.get_enum(self.parse_enum(self.requiredReliabilityService,inputStream)) + self.pad1 = inputStream.read_byte() + self.pad2 = inputStream.read_short() + self.requestID = inputStream.read_int() + self.actionID = ActionRequestActionID.get_enum(self.parse_enum(self.actionID,inputStream)) + self.numberOfFixedDatumRecords = inputStream.read_int() + self.numberOfVariableDatumRecords = inputStream.read_int() + for idx in range(0, self.numberOfFixedDatumRecords): + element = FixedDatum() + element.parse(inputStream) + self._fixedDatumRecords.append(element) + + for idx in range(0, self.numberOfVariableDatumRecords): + element = VariableDatum() + element.parse(inputStream) + self._variableDatumRecords.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 9 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/action_response_pdu.py b/dis/action_response_pdu.py new file mode 100644 index 0000000..ca7e96f --- /dev/null +++ b/dis/action_response_pdu.py @@ -0,0 +1,210 @@ +from enum import Enum + +from .siso_ref_010.enums.action_response_request_status import ActionResponseRequestStatus +from .simulation_management_family_pdu import SimulationManagementFamilyPdu +from .variable_datum import VariableDatum +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .fixed_datum import FixedDatum + +class ActionResponsePdu( SimulationManagementFamilyPdu ): + """Section 7.5.8. When an entity receives an Action Request PDU, that entity shall acknowledge the receipt of the Action Request PDU with an Action Response PDU. See 5.6.5.8.""" + + def __init__(self): + """ Initializer for ActionResponsePdu""" + super().__init__() + """ Request ID that is unique""" + self.requestID = 0 + # /** Status of response uid 72 */ + self.requestStatus = ActionResponseRequestStatus.default + + """ Number of fixed datum records""" + self.numberOfFixedDatumRecords = 0 + """ Number of variable datum records, handled automatically by marshaller at run time (and not modifiable by end-user programmers)""" + self.numberOfVariableDatumRecords = 0 + """ fixed length list of fixed datums""" + self._fixedDatums = [] + """ variable length list of variable length datums""" + self._variableDatums = [] + self.pduType = DisPduType.action_response + + + def get_numberOfFixedDatumRecords(self): + return len(self._fixedDatums) + def set_numberOfFixedDatumRecords(self, value): + numberOfFixedDatumRecords = value + + + def get_numberOfVariableDatumRecords(self): + return len(self._variableDatums) + def set_numberOfVariableDatumRecords(self, value): + numberOfVariableDatumRecords = value + + + def get_fixedDatums(self): + return self._fixedDatums + def set_fixedDatums(self, value): + self._fixedDatums = value + fixedDatums = property(get_fixedDatums, set_fixedDatums) + + + def add_fixedDatums(self, value : FixedDatum): + self._fixedDatums.append(value) + + + """ + /// Name : fixedDatums + /// UID : + /// Type : FixedDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : fixed length list of fixed datums + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_variableDatums(self): + return self._variableDatums + def set_variableDatums(self, value): + self._variableDatums = value + variableDatums = property(get_variableDatums, set_variableDatums) + + + def add_variableDatums(self, value : VariableDatum): + self._variableDatums.append(value) + + + """ + /// Name : variableDatums + /// UID : + /// Type : VariableDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of variable length datums + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RequestID : " + str(self.requestID) + "\n" + outputString += "ActionResponseRequestStatus : " + self.requestStatus.get_description + "(" + (str(int(self.requestStatus))) + ")" + "\n" + outputString += "NumberOfFixedDatumRecords : " + str(len(self._fixedDatums)) + "\n" + outputString += "NumberOfVariableDatumRecords : " + str(len(self._variableDatums)) + "\n" + outputString += "FixedDatums : " + "\n" + for idx in range(0, len(self._fixedDatums)): + outputString += self._fixedDatums[idx].to_string() + + outputString += "VariableDatums : " + "\n" + for idx in range(0, len(self._variableDatums)): + outputString += self._variableDatums[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( ActionResponsePdu, self ).serialize(outputStream) + outputStream.write_int(int(self.requestID)) + self.serialize_enum(self.requestStatus,outputStream) + outputStream.write_int( len(self._fixedDatums)) + outputStream.write_int( len(self._variableDatums)) + for anObj in self._fixedDatums: + anObj.serialize(outputStream) + + for anObj in self._variableDatums: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( ActionResponsePdu, self).parse(inputStream) + self.requestID = inputStream.read_int() + self.requestStatus = ActionResponseRequestStatus.get_enum(self.parse_enum(self.requestStatus,inputStream)) + self.numberOfFixedDatumRecords = inputStream.read_int() + self.numberOfVariableDatumRecords = inputStream.read_int() + for idx in range(0, self.numberOfFixedDatumRecords): + element = FixedDatum() + element.parse(inputStream) + self._fixedDatums.append(element) + + for idx in range(0, self.numberOfVariableDatumRecords): + element = VariableDatum() + element.parse(inputStream) + self._variableDatums.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/action_response_reliable_pdu.py b/dis/action_response_reliable_pdu.py new file mode 100644 index 0000000..e904ce4 --- /dev/null +++ b/dis/action_response_reliable_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class ActionResponseReliablePdu( object ): + """Alias, more descriptive name for ActionResponseRPdu.""" + + def __init__(self): + """ Initializer for ActionResponseReliablePdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/action_response_rpdu.py b/dis/action_response_rpdu.py new file mode 100644 index 0000000..a960d86 --- /dev/null +++ b/dis/action_response_rpdu.py @@ -0,0 +1,210 @@ +from enum import Enum + +from .siso_ref_010.enums.action_response_request_status import ActionResponseRequestStatus +from .variable_datum import VariableDatum +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .fixed_datum import FixedDatum +from .simulation_management_with_reliability_family_pdu import SimulationManagementWithReliabilityFamilyPdu + +class ActionResponseRPdu( SimulationManagementWithReliabilityFamilyPdu ): + """5.12.4.8 Serves the same function as the Action Response PDU (see 5.6.5.8.1) but is used to acknowledge the receipt of an Action Request-R PDU.""" + + def __init__(self): + """ Initializer for ActionResponseRPdu""" + super().__init__() + """ request ID provides a unique identifier""" + self.requestID = 0 + # /** status of response uid 72 */ + self.responseStatus = ActionResponseRequestStatus.default + + """ Fixed datum record count""" + self.numberOfFixedDatumRecords = 0 + """ variable datum record count""" + self.numberOfVariableDatumRecords = 0 + """ Fixed datum records""" + self._fixedDatumRecords = [] + """ Variable datum records""" + self._variableDatumRecords = [] + self.pduType = DisPduType.action_response_reliable + + + def get_numberOfFixedDatumRecords(self): + return len(self._fixedDatumRecords) + def set_numberOfFixedDatumRecords(self, value): + numberOfFixedDatumRecords = value + + + def get_numberOfVariableDatumRecords(self): + return len(self._variableDatumRecords) + def set_numberOfVariableDatumRecords(self, value): + numberOfVariableDatumRecords = value + + + def get_fixedDatumRecords(self): + return self._fixedDatumRecords + def set_fixedDatumRecords(self, value): + self._fixedDatumRecords = value + fixedDatumRecords = property(get_fixedDatumRecords, set_fixedDatumRecords) + + + def add_fixedDatumRecords(self, value : FixedDatum): + self._fixedDatumRecords.append(value) + + + """ + /// Name : fixedDatumRecords + /// UID : + /// Type : FixedDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Fixed datum records + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_variableDatumRecords(self): + return self._variableDatumRecords + def set_variableDatumRecords(self, value): + self._variableDatumRecords = value + variableDatumRecords = property(get_variableDatumRecords, set_variableDatumRecords) + + + def add_variableDatumRecords(self, value : VariableDatum): + self._variableDatumRecords.append(value) + + + """ + /// Name : variableDatumRecords + /// UID : + /// Type : VariableDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Variable datum records + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RequestID : " + str(self.requestID) + "\n" + outputString += "ActionResponseRequestStatus : " + self.responseStatus.get_description + "(" + (str(int(self.responseStatus))) + ")" + "\n" + outputString += "NumberOfFixedDatumRecords : " + str(len(self._fixedDatumRecords)) + "\n" + outputString += "NumberOfVariableDatumRecords : " + str(len(self._variableDatumRecords)) + "\n" + outputString += "FixedDatumRecords : " + "\n" + for idx in range(0, len(self._fixedDatumRecords)): + outputString += self._fixedDatumRecords[idx].to_string() + + outputString += "VariableDatumRecords : " + "\n" + for idx in range(0, len(self._variableDatumRecords)): + outputString += self._variableDatumRecords[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( ActionResponseRPdu, self ).serialize(outputStream) + outputStream.write_int(int(self.requestID)) + self.serialize_enum(self.responseStatus,outputStream) + outputStream.write_int( len(self._fixedDatumRecords)) + outputStream.write_int( len(self._variableDatumRecords)) + for anObj in self._fixedDatumRecords: + anObj.serialize(outputStream) + + for anObj in self._variableDatumRecords: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( ActionResponseRPdu, self).parse(inputStream) + self.requestID = inputStream.read_int() + self.responseStatus = ActionResponseRequestStatus.get_enum(self.parse_enum(self.responseStatus,inputStream)) + self.numberOfFixedDatumRecords = inputStream.read_int() + self.numberOfVariableDatumRecords = inputStream.read_int() + for idx in range(0, self.numberOfFixedDatumRecords): + element = FixedDatum() + element.parse(inputStream) + self._fixedDatumRecords.append(element) + + for idx in range(0, self.numberOfVariableDatumRecords): + element = VariableDatum() + element.parse(inputStream) + self._variableDatumRecords.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/aggregate_identifier.py b/dis/aggregate_identifier.py new file mode 100644 index 0000000..dd69741 --- /dev/null +++ b/dis/aggregate_identifier.py @@ -0,0 +1,90 @@ +from enum import Enum + +from .simulation_address import SimulationAddress + +class AggregateIdentifier( object ): + """The unique designation of each aggregate in an exercise is specified by an aggregate identifier record. The aggregate ID is not an entity and shall not be treated as such. Section 6.2.3.""" + + def __init__(self): + """ Initializer for AggregateIdentifier""" + """ Simulation address, i.e. site and application, the first two fields of the entity ID provides a unique identifier""" + self.simulationAddress = SimulationAddress() + """ The aggregate ID provides a unique identifier""" + self.aggregateID = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "SimulationAddress :" + "\n" + self.simulationAddress.to_string() + "\n" + outputString += "AggregateID : " + str(self.aggregateID) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.simulationAddress.serialize(outputStream) + outputStream.write_short(int(self.aggregateID)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.simulationAddress.parse(inputStream) + self.aggregateID = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/aggregate_marking.py b/dis/aggregate_marking.py new file mode 100644 index 0000000..95e8760 --- /dev/null +++ b/dis/aggregate_marking.py @@ -0,0 +1,100 @@ +from enum import Enum + +from .siso_ref_010.enums.entity_marking_character_set import EntityMarkingCharacterSet + +class AggregateMarking( object ): + """Specifies the character set used in the first byte, followed by up to 31 characters of text data. Section 6.2.4. """ + + def __init__(self): + """ Initializer for AggregateMarking""" + # /** The character set uid 45 */ + self.characterSet = EntityMarkingCharacterSet.default + + """ The characters""" + self.characters = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + + def to_string(self) ->str: + outputString = "" + outputString += "EntityMarkingCharacterSet : " + self.characterSet.get_description + "(" + (str(int(self.characterSet))) + ")" + "\n" + outputString += "Characters : " + "\n" + for idx in range(0, len(self.characters)): + outputString += str(self.characters[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.characterSet,outputStream) + for idx in range(0, 31): + outputStream.write_unsigned_byte( self.characters[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.characterSet = EntityMarkingCharacterSet.get_enum(self.parse_enum(self.characterSet,inputStream)) + self.characters = [0]*31 + for idx in range(0, 31): + val = inputStream.read_unsigned_byte() + self.characters[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/aggregate_state_pdu.py b/dis/aggregate_state_pdu.py new file mode 100644 index 0000000..a620321 --- /dev/null +++ b/dis/aggregate_state_pdu.py @@ -0,0 +1,426 @@ +from enum import Enum + +from .variable_datum import VariableDatum +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .vector3float import Vector3Float +from .siso_ref_010.enums.aggregate_state_formation import AggregateStateFormation +from .entity_id import EntityID +from .siso_ref_010.enums.aggregate_state_aggregate_state import AggregateStateAggregateState +from .entity_management_family_pdu import EntityManagementFamilyPdu +from .siso_ref_010.enums.force_id import ForceID +from .entity_type import EntityType +from .aggregate_identifier import AggregateIdentifier +from .vector3double import Vector3Double +from .aggregate_marking import AggregateMarking +from .aggregate_type import AggregateType + +class AggregateStatePdu( EntityManagementFamilyPdu ): + """5.9.2.2 The Aggregate State PDU shall be used to communicate the state and other pertinent information about an aggregated unit.""" + + def __init__(self): + """ Initializer for AggregateStatePdu""" + super().__init__() + """ ID of aggregated entities""" + self.aggregateID = AggregateIdentifier() + # /** force ID provides a unique identifier uid 6 */ + self.forceID = ForceID.default + + # /** state of aggregate uid 204 */ + self.aggregateState = AggregateStateAggregateState.default + + """ entity type of the aggregated entities""" + self.aggregateType = AggregateType() + # /** formation of aggregated entities uid 205 */ + self.formation = AggregateStateFormation.default + + """ marking for aggregate; first char is charset type, rest is char data""" + self.aggregateMarking = AggregateMarking() + """ dimensions of bounding box for the aggregated entities, origin at the center of mass""" + self.dimensions = Vector3Float() + """ orientation of the bounding box""" + self.orientation = Vector3Float() + """ center of mass of the aggregation""" + self.centerOfMass = Vector3Double() + """ velocity of aggregation""" + self.velocity = Vector3Float() + """ number of aggregates""" + self.numberOfDisAggregates = 0 + """ number of entities""" + self.numberOfDisEntities = 0 + """ number of silent aggregate types""" + self.numberOfSilentAggregateTypes = 0 + """ Number of silent entity types, handled automatically by marshaller at run time (and not modifiable by end-user programmers)""" + self.numberOfSilentEntityTypes = 0 + """ aggregates list""" + self._aggregateIDList = [] + """ entity ID list""" + self._entityIDList = [] + self.padTo32 = [0] * 32 + """ silent entity types""" + self._silentAggregateSystemList = [] + """ silent entity types""" + self._silentEntitySystemList = [] + """ Number of variable datum records, handled automatically by marshaller at run time (and not modifiable by end-user programmers)""" + self.numberOfVariableDatumRecords = 0 + """ variableDatums""" + self._variableDatumList = [] + self.pduType = DisPduType.aggregate_state + + + def get_numberOfDisAggregates(self): + return len(self._aggregateIDList) + def set_numberOfDisAggregates(self, value): + numberOfDisAggregates = value + + + def get_numberOfDisEntities(self): + return len(self._entityIDList) + def set_numberOfDisEntities(self, value): + numberOfDisEntities = value + + + def get_numberOfSilentAggregateTypes(self): + return len(self._silentAggregateSystemList) + def set_numberOfSilentAggregateTypes(self, value): + numberOfSilentAggregateTypes = value + + + def get_numberOfSilentEntityTypes(self): + return len(self._silentEntitySystemList) + def set_numberOfSilentEntityTypes(self, value): + numberOfSilentEntityTypes = value + + + def get_aggregateIDList(self): + return self._aggregateIDList + def set_aggregateIDList(self, value): + self._aggregateIDList = value + aggregateIDList = property(get_aggregateIDList, set_aggregateIDList) + + + def add_aggregateIDList(self, value : AggregateIdentifier): + self._aggregateIDList.append(value) + + + """ + /// Name : aggregateIDList + /// UID : + /// Type : AggregateIdentifier + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : aggregates list + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_entityIDList(self): + return self._entityIDList + def set_entityIDList(self, value): + self._entityIDList = value + entityIDList = property(get_entityIDList, set_entityIDList) + + + def add_entityIDList(self, value : EntityID): + self._entityIDList.append(value) + + + """ + /// Name : entityIDList + /// UID : + /// Type : EntityID + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : entity ID list + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_silentAggregateSystemList(self): + return self._silentAggregateSystemList + def set_silentAggregateSystemList(self, value): + self._silentAggregateSystemList = value + silentAggregateSystemList = property(get_silentAggregateSystemList, set_silentAggregateSystemList) + + + def add_silentAggregateSystemList(self, value : EntityType): + self._silentAggregateSystemList.append(value) + + + """ + /// Name : silentAggregateSystemList + /// UID : + /// Type : EntityType + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : silent entity types + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_silentEntitySystemList(self): + return self._silentEntitySystemList + def set_silentEntitySystemList(self, value): + self._silentEntitySystemList = value + silentEntitySystemList = property(get_silentEntitySystemList, set_silentEntitySystemList) + + + def add_silentEntitySystemList(self, value : EntityType): + self._silentEntitySystemList.append(value) + + + """ + /// Name : silentEntitySystemList + /// UID : + /// Type : EntityType + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : silent entity types + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_numberOfVariableDatumRecords(self): + return len(self._variableDatumList) + def set_numberOfVariableDatumRecords(self, value): + numberOfVariableDatumRecords = value + + + def get_variableDatumList(self): + return self._variableDatumList + def set_variableDatumList(self, value): + self._variableDatumList = value + variableDatumList = property(get_variableDatumList, set_variableDatumList) + + + def add_variableDatumList(self, value : VariableDatum): + self._variableDatumList.append(value) + + + """ + /// Name : variableDatumList + /// UID : + /// Type : VariableDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variableDatums + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "AggregateID :" + "\n" + self.aggregateID.to_string() + "\n" + outputString += "ForceID : " + self.forceID.get_description + "(" + (str(int(self.forceID))) + ")" + "\n" + outputString += "AggregateStateAggregateState : " + self.aggregateState.get_description + "(" + (str(int(self.aggregateState))) + ")" + "\n" + outputString += "AggregateType :" + "\n" + self.aggregateType.to_string() + "\n" + outputString += "AggregateStateFormation : " + self.formation.get_description + "(" + (str(int(self.formation))) + ")" + "\n" + outputString += "AggregateMarking :" + "\n" + self.aggregateMarking.to_string() + "\n" + outputString += "Dimensions :" + "\n" + self.dimensions.to_string() + "\n" + outputString += "Orientation :" + "\n" + self.orientation.to_string() + "\n" + outputString += "CenterOfMass :" + "\n" + self.centerOfMass.to_string() + "\n" + outputString += "Velocity :" + "\n" + self.velocity.to_string() + "\n" + outputString += "NumberOfDisAggregates : " + str(len(self._aggregateIDList)) + "\n" + outputString += "NumberOfDisEntities : " + str(len(self._entityIDList)) + "\n" + outputString += "NumberOfSilentAggregateTypes : " + str(len(self._silentAggregateSystemList)) + "\n" + outputString += "NumberOfSilentEntityTypes : " + str(len(self._silentEntitySystemList)) + "\n" + outputString += "AggregateIDList : " + "\n" + for idx in range(0, len(self._aggregateIDList)): + outputString += self._aggregateIDList[idx].to_string() + + outputString += "EntityIDList : " + "\n" + for idx in range(0, len(self._entityIDList)): + outputString += self._entityIDList[idx].to_string() + + outputString += "SilentAggregateSystemList : " + "\n" + for idx in range(0, len(self._silentAggregateSystemList)): + outputString += self._silentAggregateSystemList[idx].to_string() + + outputString += "SilentEntitySystemList : " + "\n" + for idx in range(0, len(self._silentEntitySystemList)): + outputString += self._silentEntitySystemList[idx].to_string() + + outputString += "NumberOfVariableDatumRecords : " + str(len(self._variableDatumList)) + "\n" + outputString += "VariableDatumList : " + "\n" + for idx in range(0, len(self._variableDatumList)): + outputString += self._variableDatumList[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( AggregateStatePdu, self ).serialize(outputStream) + self.aggregateID.serialize(outputStream) + self.serialize_enum(self.forceID,outputStream) + self.serialize_enum(self.aggregateState,outputStream) + self.aggregateType.serialize(outputStream) + self.serialize_enum(self.formation,outputStream) + self.aggregateMarking.serialize(outputStream) + self.dimensions.serialize(outputStream) + self.orientation.serialize(outputStream) + self.centerOfMass.serialize(outputStream) + self.velocity.serialize(outputStream) + outputStream.write_short( len(self._aggregateIDList)) + outputStream.write_short( len(self._entityIDList)) + outputStream.write_short( len(self._silentAggregateSystemList)) + outputStream.write_short( len(self._silentEntitySystemList)) + for anObj in self._aggregateIDList: + anObj.serialize(outputStream) + + for anObj in self._entityIDList: + anObj.serialize(outputStream) + + for anObj in self._silentAggregateSystemList: + anObj.serialize(outputStream) + + for anObj in self._silentEntitySystemList: + anObj.serialize(outputStream) + + outputStream.write_int( len(self._variableDatumList)) + for anObj in self._variableDatumList: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( AggregateStatePdu, self).parse(inputStream) + self.aggregateID.parse(inputStream) + self.forceID = ForceID.get_enum(self.parse_enum(self.forceID,inputStream)) + self.aggregateState = AggregateStateAggregateState.get_enum(self.parse_enum(self.aggregateState,inputStream)) + self.aggregateType.parse(inputStream) + self.formation = AggregateStateFormation.get_enum(self.parse_enum(self.formation,inputStream)) + self.aggregateMarking.parse(inputStream) + self.dimensions.parse(inputStream) + self.orientation.parse(inputStream) + self.centerOfMass.parse(inputStream) + self.velocity.parse(inputStream) + self.numberOfDisAggregates = inputStream.read_short() + self.numberOfDisEntities = inputStream.read_short() + self.numberOfSilentAggregateTypes = inputStream.read_short() + self.numberOfSilentEntityTypes = inputStream.read_short() + for idx in range(0, self.numberOfDisAggregates): + element = AggregateIdentifier() + element.parse(inputStream) + self._aggregateIDList.append(element) + + for idx in range(0, self.numberOfDisEntities): + element = EntityID() + element.parse(inputStream) + self._entityIDList.append(element) + + for idx in range(0, self.numberOfSilentAggregateTypes): + element = EntityType() + element.parse(inputStream) + self._silentAggregateSystemList.append(element) + + for idx in range(0, self.numberOfSilentEntityTypes): + element = EntityType() + element.parse(inputStream) + self._silentEntitySystemList.append(element) + + self.numberOfVariableDatumRecords = inputStream.read_int() + for idx in range(0, self.numberOfVariableDatumRecords): + element = VariableDatum() + element.parse(inputStream) + self._variableDatumList.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 21 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/aggregate_type.py b/dis/aggregate_type.py new file mode 100644 index 0000000..899a0e9 --- /dev/null +++ b/dis/aggregate_type.py @@ -0,0 +1,123 @@ +from enum import Enum + +from .siso_ref_010.enums.aggregate_state_specific import AggregateStateSpecific +from .siso_ref_010.enums.country import Country +from .siso_ref_010.enums.aggregate_state_aggregate_kind import AggregateStateAggregateKind +from .siso_ref_010.enums.platform_domain import PlatformDomain +from .siso_ref_010.enums.aggregate_state_subcategory import AggregateStateSubcategory + +class AggregateType( object ): + """Identifies the type and organization of an aggregate. Section 6.2.5""" + + def __init__(self): + """ Initializer for AggregateType""" + # /** Grouping criterion used to group the aggregate. Enumeration from EBV document uid 206 */ + self.aggregateKind = AggregateStateAggregateKind.default + + # /** Domain of entity (air, surface, subsurface, space, etc.) where zero means domain does not apply. uid 8 */ + self.domain = PlatformDomain.default + + # /** country to which the design of the entity is attributed uid 29 */ + self.country = Country.default + + """ category of entity""" + self.category = 0 + # /** subcategory of entity uid 208 */ + self.subcategory = AggregateStateSubcategory.default + + # /** specific info based on subcategory field. specific is a reserved word in sql. uid 209 */ + self.specificInfo = AggregateStateSpecific.default + + self.extra = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "AggregateStateAggregateKind : " + self.aggregateKind.get_description + "(" + (str(int(self.aggregateKind))) + ")" + "\n" + outputString += "PlatformDomain : " + self.domain.get_description + "(" + (str(int(self.domain))) + ")" + "\n" + outputString += "Country : " + self.country.get_description + "(" + (str(int(self.country))) + ")" + "\n" + outputString += "Category : " + str(self.category) + "\n" + outputString += "AggregateStateSubcategory : " + self.subcategory.get_description + "(" + (str(int(self.subcategory))) + ")" + "\n" + outputString += "AggregateStateSpecific : " + self.specificInfo.get_description + "(" + (str(int(self.specificInfo))) + ")" + "\n" + outputString += "Extra : " + str(self.extra) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.aggregateKind,outputStream) + self.serialize_enum(self.domain,outputStream) + self.serialize_enum(self.country,outputStream) + outputStream.write_byte(int(self.category)) + self.serialize_enum(self.subcategory,outputStream) + self.serialize_enum(self.specificInfo,outputStream) + outputStream.write_byte(int(self.extra)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.aggregateKind = AggregateStateAggregateKind.get_enum(self.parse_enum(self.aggregateKind,inputStream)) + self.domain = PlatformDomain.get_enum(self.parse_enum(self.domain,inputStream)) + self.country = Country.get_enum(self.parse_enum(self.country,inputStream)) + self.category = inputStream.read_byte() + self.subcategory = AggregateStateSubcategory.get_enum(self.parse_enum(self.subcategory,inputStream)) + self.specificInfo = AggregateStateSpecific.get_enum(self.parse_enum(self.specificInfo,inputStream)) + self.extra = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 7 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/angle_deception.py b/dis/angle_deception.py new file mode 100644 index 0000000..2a2cc8d --- /dev/null +++ b/dis/angle_deception.py @@ -0,0 +1,161 @@ +from enum import Enum + +from .siso_ref_010.enums.eeattribute_state_indicator import EEAttributeStateIndicator + +class AngleDeception( object ): + """The Angle Deception attribute record may be used to communicate discrete values that are associated with angle deception jamming that cannot be referenced to an emitter mode. The values provided in the record records (provided in the associated Electromagnetic Emission PDU). (The victim radar beams are those that are targeted by the jammer.) Section 6.2.21.2.2""" + + def __init__(self): + """ Initializer for AngleDeception""" + """ record type""" + self.recordType = 3501 + """ The length of the record in octets.""" + self.recordLength = 48 + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + """ indicates the emitter system for which the angle deception values are applicable. """ + self.emitterNumber = 0 + """ indicates the jamming beam for which the angle deception values are applicable.""" + self.beamNumber = 0 + # /** This field shall be used to indicate if angle deception data have changed since issuance of the last Angle Deception attribute record for this beam, if the Angle Deception attribute record is part of a heartbeat update to meet periodic update requirements or if the angle deception data for the beam has ceased. uid 300 */ + self.stateIndicator = EEAttributeStateIndicator.default + + """ padding""" + self.padding2 = 0 + """ This field indicates the relative azimuth angle at which the deceptive radar returns are centered. This angle is measured in the X-Y plane of the victim radar's entity coordinate system (see 1.4.3). This angle is measured in radians from the victim radar entity's azimuth for the true jam- mer position to the center of the range of azimuths in which deceptive radar returns are perceived as shown in Figure 43. Positive and negative values indicate that the perceived positions of the jammer are right and left of the true position of the jammer, respectively. The range of permissible values is -PI to PI""" + self.azimuthOffset = 0.0 + """ indicates the range of azimuths (in radians) through which the deceptive radar returns are perceived, centered on the azimuth offset as shown in Figure 43. The range of permissible values is 0 to 2PI radians""" + self.azimuthWidth = 0.0 + """ This field indicates the rate (in radians per second) at which the Azimuth Offset value is changing. Positive and negative values indicate that the Azimuth Offset is moving to the right or left, respectively.""" + self.azimuthPullRate = 0.0 + """ This field indicates the rate (in radians per second squared) at which the Azimuth Pull Rate value is changing. Azimuth Pull Acceleration is defined as positive to the right and negative to the left.""" + self.azimuthPullAcceleration = 0.0 + """ This field indicates the relative elevation angle at which the deceptive radar returns begin. This angle is measured as an angle with respect to the X-Y plane of the victim radar's entity coordinate system (see 1.4.3). This angle is measured in radians from the victim radar entity's eleva- tion for the true jammer position to the center of the range of elevations in which deceptive radar returns are perceived as shown in Figure 44. Positive and negative values indicate that the perceived positions of the jammer are above and below the true position of the jammer, respectively. The range of permissible values is -PI/2 to PI/2""" + self.elevationOffset = 0.0 + """ This field indicates the range of elevations (in radians) through which the decep- tive radar returns are perceived, centered on the elevation offset as shown in Figure 44. The range of permissible values is 0 to PI radians""" + self.elevationWidth = 0.0 + """ This field indicates the rate (in radians per second) at which the Elevation Off- set value is changing. Positive and negative values indicate that the Elevation Offset is moving up or down, respectively. """ + self.elevationPullRate = 0.0 + """ This field indicates the rate (in radians per second squared) at which the Elevation Pull Rate value is changing. Elevation Pull Acceleration is defined as positive to upward and negative downward. """ + self.elevationPullAcceleration = 0.0 + """ """ + self.padding3 = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "RecordType : " + str(self.recordType) + "\n" + outputString += "RecordLength : " + str(self.recordLength) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "EmitterNumber : " + str(self.emitterNumber) + "\n" + outputString += "BeamNumber : " + str(self.beamNumber) + "\n" + outputString += "EEAttributeStateIndicator : " + self.stateIndicator.get_description + "(" + (str(int(self.stateIndicator))) + ")" + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + outputString += "AzimuthOffset : " + str(self.azimuthOffset) + "\n" + outputString += "AzimuthWidth : " + str(self.azimuthWidth) + "\n" + outputString += "AzimuthPullRate : " + str(self.azimuthPullRate) + "\n" + outputString += "AzimuthPullAcceleration : " + str(self.azimuthPullAcceleration) + "\n" + outputString += "ElevationOffset : " + str(self.elevationOffset) + "\n" + outputString += "ElevationWidth : " + str(self.elevationWidth) + "\n" + outputString += "ElevationPullRate : " + str(self.elevationPullRate) + "\n" + outputString += "ElevationPullAcceleration : " + str(self.elevationPullAcceleration) + "\n" + outputString += "Padding3 : " + str(self.padding3) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int(int(self.recordType)) + outputStream.write_short(int(self.recordLength)) + outputStream.write_short(int(self.padding)) + outputStream.write_byte(int(self.emitterNumber)) + outputStream.write_byte(int(self.beamNumber)) + self.serialize_enum(self.stateIndicator,outputStream) + outputStream.write_byte(int(self.padding2)) + outputStream.write_float(int(self.azimuthOffset)) + outputStream.write_float(int(self.azimuthWidth)) + outputStream.write_float(int(self.azimuthPullRate)) + outputStream.write_float(int(self.azimuthPullAcceleration)) + outputStream.write_float(int(self.elevationOffset)) + outputStream.write_float(int(self.elevationWidth)) + outputStream.write_float(int(self.elevationPullRate)) + outputStream.write_float(int(self.elevationPullAcceleration)) + outputStream.write_int(int(self.padding3)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordType = inputStream.read_int() + self.recordLength = inputStream.read_short() + self.padding = inputStream.read_short() + self.emitterNumber = inputStream.read_byte() + self.beamNumber = inputStream.read_byte() + self.stateIndicator = EEAttributeStateIndicator.get_enum(self.parse_enum(self.stateIndicator,inputStream)) + self.padding2 = inputStream.read_byte() + self.azimuthOffset = inputStream.read_float() + self.azimuthWidth = inputStream.read_float() + self.azimuthPullRate = inputStream.read_float() + self.azimuthPullAcceleration = inputStream.read_float() + self.elevationOffset = inputStream.read_float() + self.elevationWidth = inputStream.read_float() + self.elevationPullRate = inputStream.read_float() + self.elevationPullAcceleration = inputStream.read_float() + self.padding3 = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 16 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/angular_velocity_vector.py b/dis/angular_velocity_vector.py new file mode 100644 index 0000000..dccb5a1 --- /dev/null +++ b/dis/angular_velocity_vector.py @@ -0,0 +1,94 @@ +from enum import Enum + + +class AngularVelocityVector( object ): + """Angular velocity measured in radians per second out each of the entity's own coordinate axes. Order of measurement is angular velocity around the x, y, and z axis of the entity. The positive direction is determined by the right hand rule. Section 6.2.7""" + + def __init__(self): + """ Initializer for AngularVelocityVector""" + """ velocity about the x axis""" + self.x = 0 + """ velocity about the y axis""" + self.y = 0 + """ velocity about the zaxis""" + self.z = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "X : " + str(self.x) + "\n" + outputString += "Y : " + str(self.y) + "\n" + outputString += "Z : " + str(self.z) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_float(int(self.x)) + outputStream.write_float(int(self.y)) + outputStream.write_float(int(self.z)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.x = inputStream.read_float() + self.y = inputStream.read_float() + self.z = inputStream.read_float() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/antenna_location.py b/dis/antenna_location.py new file mode 100644 index 0000000..ecf2d64 --- /dev/null +++ b/dis/antenna_location.py @@ -0,0 +1,91 @@ +from enum import Enum + +from .vector3float import Vector3Float +from .vector3double import Vector3Double + +class AntennaLocation( object ): + """Location of the radiating portion of the antenna, specified in world coordinates and entity coordinates. Section 6.2.8""" + + def __init__(self): + """ Initializer for AntennaLocation""" + """ Location of the radiating portion of the antenna in world coordinates""" + self.antennaLocation = Vector3Double() + """ Location of the radiating portion of the antenna in entity coordinates""" + self.relativeAntennaLocation = Vector3Float() + + def to_string(self) ->str: + outputString = "" + outputString += "AntennaLocation :" + "\n" + self.antennaLocation.to_string() + "\n" + outputString += "RelativeAntennaLocation :" + "\n" + self.relativeAntennaLocation.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.antennaLocation.serialize(outputStream) + self.relativeAntennaLocation.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.antennaLocation.parse(inputStream) + self.relativeAntennaLocation.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/apa.py b/dis/apa.py new file mode 100644 index 0000000..e617573 --- /dev/null +++ b/dis/apa.py @@ -0,0 +1,87 @@ +from enum import Enum + + +class APA( object ): + """Additional Passive Activity for use by Underwater Acoustic (UA) PDU. Section 7.6.4""" + + def __init__(self): + """ Initializer for APA""" + self.parameterIndex = 0 + self.value = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "ParameterIndex : " + str(self.parameterIndex) + "\n" + outputString += "Value : " + str(self.value) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.parameterIndex)) + outputStream.write_short(int(self.value)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.parameterIndex = inputStream.read_short() + self.value = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/appearance.py b/dis/appearance.py new file mode 100644 index 0000000..0694374 --- /dev/null +++ b/dis/appearance.py @@ -0,0 +1,95 @@ +from enum import Enum + + +class Appearance( object ): + """used in AppearancePdu""" + + def __init__(self): + """ Initializer for Appearance""" + self.visual = 0 + self.ir = 0 + self.em = 0 + self.audio = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "Visual : " + str(self.visual) + "\n" + outputString += "Ir : " + str(self.ir) + "\n" + outputString += "Em : " + str(self.em) + "\n" + outputString += "Audio : " + str(self.audio) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int(int(self.visual)) + outputStream.write_int(int(self.ir)) + outputStream.write_int(int(self.em)) + outputStream.write_int(int(self.audio)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.visual = inputStream.read_int() + self.ir = inputStream.read_int() + self.em = inputStream.read_int() + self.audio = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/appearance_pdu.py b/dis/appearance_pdu.py new file mode 100644 index 0000000..6542ad7 --- /dev/null +++ b/dis/appearance_pdu.py @@ -0,0 +1,135 @@ +from enum import Enum + +from .siso_ref_010.enums.force_id import ForceID +from .entity_type import EntityType +from .appearance import Appearance +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .entity_marking import EntityMarking +from .live_entity_family_pdu import LiveEntityFamilyPdu +from .entity_id import EntityID +from .siso_ref_010.enums.land_platform_capabilities import LandPlatformCapabilities +from .siso_ref_010.enums.entity_capability_types import EntityCapabilityTypes + +class AppearancePdu( LiveEntityFamilyPdu ): + """9.4.3 Communicate information about the appearance of a live entity.""" + + def __init__(self): + """ Initializer for AppearancePdu""" + super().__init__() + # liveEntityId is an undescribed parameter... + self.liveEntityId = EntityID() + """ 16-bit bit field""" + self.appearanceFlags = 0 + # /** uid 6 */ + self.forceId = ForceID.default + + # entityType is an undescribed parameter... + self.entityType = EntityType() + # alternateEntityType is an undescribed parameter... + self.alternateEntityType = EntityType() + # entityMarking is an undescribed parameter... + self.entityMarking = EntityMarking() + # uid 55 + self.capabilities = LandPlatformCapabilities() + + # appearanceFields is an undescribed parameter... + self.appearanceFields = Appearance() + self.pduType = DisPduType.appearance + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "LiveEntityId :" + "\n" + self.liveEntityId.to_string() + "\n" + outputString += "AppearanceFlags : " + str(self.appearanceFlags) + "\n" + outputString += "ForceID : " + self.forceId.get_description + "(" + (str(int(self.forceId))) + ")" + "\n" + outputString += "EntityType :" + "\n" + self.entityType.to_string() + "\n" + outputString += "AlternateEntityType :" + "\n" + self.alternateEntityType.to_string() + "\n" + outputString += "EntityMarking :" + "\n" + self.entityMarking.to_string() + "\n" + outputString += "EntityCapabilities : " + str(self.capabilities) + "\n" + outputString += "AppearanceFields :" + "\n" + self.appearanceFields.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( AppearancePdu, self ).serialize(outputStream) + self.liveEntityId.serialize(outputStream) + outputStream.write_short(int(self.appearanceFlags)) + self.serialize_enum(self.forceId,outputStream) + self.entityType.serialize(outputStream) + self.alternateEntityType.serialize(outputStream) + self.entityMarking.serialize(outputStream) + outputStream.write_unsigned_int(int(self.capabilities.asbyte)) + self.appearanceFields.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( AppearancePdu, self).parse(inputStream) + self.liveEntityId.parse(inputStream) + self.appearanceFlags = inputStream.read_short() + self.forceId = ForceID.get_enum(self.parse_enum(self.forceId,inputStream)) + self.entityType.parse(inputStream) + self.alternateEntityType.parse(inputStream) + self.entityMarking.parse(inputStream) + self.capabilities.asbyte = inputStream.read_unsigned_int() + self.appearanceFields.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 8 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/areal_object_state_pdu.py b/dis/areal_object_state_pdu.py new file mode 100644 index 0000000..5802823 --- /dev/null +++ b/dis/areal_object_state_pdu.py @@ -0,0 +1,199 @@ +from enum import Enum + +from .siso_ref_010.enums.force_id import ForceID +from .object_identifier import ObjectIdentifier +from .object_type import ObjectType +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .synthetic_environment_family_pdu import SyntheticEnvironmentFamilyPdu +from .siso_ref_010.enums.object_state_modification_areal_object import ObjectStateModificationArealObject +from .vector3double import Vector3Double +from .simulation_address import SimulationAddress + +class ArealObjectStatePdu( SyntheticEnvironmentFamilyPdu ): + """7.10.6 Used to communicate detailed information about the addition/modification of a synthetic environment object that is geometrically anchored to the terrain with a set of three or more points that come to a closure.""" + + def __init__(self): + """ Initializer for ArealObjectStatePdu""" + super().__init__() + """ Object in synthetic environment""" + self.objectID = ObjectIdentifier() + """ Object with which this point object is associated""" + self.referencedObjectID = ObjectIdentifier() + """ unique update number of each state transition of an object""" + self.updateNumber = 0 + # /** force ID provides a unique identifier uid 6 */ + self.forceID = ForceID.default + + # modifications enumeration uid 242 + self.modifications = ObjectStateModificationArealObject() + + """ Object type""" + self.objectType = ObjectType() + """ Object appearance""" + self.specificObjectAppearance = 0 + """ Object appearance""" + self.generalObjectAppearance = 0 + """ Number of points""" + self.numberOfPoints = 0 + """ requesterID""" + self.requesterID = SimulationAddress() + """ receiver ID provides a unique identifier""" + self.receivingID = SimulationAddress() + """ location of object""" + self._objectLocation = [] + self.pduType = DisPduType.areal_object_state + + + def get_numberOfPoints(self): + return len(self._objectLocation) + def set_numberOfPoints(self, value): + numberOfPoints = value + + + def get_objectLocation(self): + return self._objectLocation + def set_objectLocation(self, value): + self._objectLocation = value + objectLocation = property(get_objectLocation, set_objectLocation) + + + def add_objectLocation(self, value : Vector3Double): + self._objectLocation.append(value) + + + """ + /// Name : objectLocation + /// UID : + /// Type : Vector3Double + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : location of object + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "ObjectID :" + "\n" + self.objectID.to_string() + "\n" + outputString += "ReferencedObjectID :" + "\n" + self.referencedObjectID.to_string() + "\n" + outputString += "UpdateNumber : " + str(self.updateNumber) + "\n" + outputString += "ForceID : " + self.forceID.get_description + "(" + (str(int(self.forceID))) + ")" + "\n" + outputString += "ObjectStateModificationArealObject : " + str(self.modifications) + "\n" + outputString += "ObjectType :" + "\n" + self.objectType.to_string() + "\n" + outputString += "SpecificObjectAppearance : " + str(self.specificObjectAppearance) + "\n" + outputString += "GeneralObjectAppearance : " + str(self.generalObjectAppearance) + "\n" + outputString += "NumberOfPoints : " + str(len(self._objectLocation)) + "\n" + outputString += "RequesterID :" + "\n" + self.requesterID.to_string() + "\n" + outputString += "ReceivingID :" + "\n" + self.receivingID.to_string() + "\n" + outputString += "ObjectLocation : " + "\n" + for idx in range(0, len(self._objectLocation)): + outputString += self._objectLocation[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( ArealObjectStatePdu, self ).serialize(outputStream) + self.objectID.serialize(outputStream) + self.referencedObjectID.serialize(outputStream) + outputStream.write_short(int(self.updateNumber)) + self.serialize_enum(self.forceID,outputStream) + outputStream.write_unsigned_int(int(self.modifications.asbyte)) + self.objectType.serialize(outputStream) + outputStream.write_int(int(self.specificObjectAppearance)) + outputStream.write_short(int(self.generalObjectAppearance)) + outputStream.write_short( len(self._objectLocation)) + self.requesterID.serialize(outputStream) + self.receivingID.serialize(outputStream) + for anObj in self._objectLocation: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( ArealObjectStatePdu, self).parse(inputStream) + self.objectID.parse(inputStream) + self.referencedObjectID.parse(inputStream) + self.updateNumber = inputStream.read_short() + self.forceID = ForceID.get_enum(self.parse_enum(self.forceID,inputStream)) + self.modifications.asbyte = inputStream.read_unsigned_int() + self.objectType.parse(inputStream) + self.specificObjectAppearance = inputStream.read_int() + self.generalObjectAppearance = inputStream.read_short() + self.numberOfPoints = inputStream.read_short() + self.requesterID.parse(inputStream) + self.receivingID.parse(inputStream) + for idx in range(0, self.numberOfPoints): + element = Vector3Double() + element.parse(inputStream) + self._objectLocation.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 12 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/articulated_part_vp.py b/dis/articulated_part_vp.py new file mode 100644 index 0000000..d38fded --- /dev/null +++ b/dis/articulated_part_vp.py @@ -0,0 +1,111 @@ +from enum import Enum + +from .siso_ref_010.enums.variable_parameter_record_type import VariableParameterRecordType + +class ArticulatedPartVP( object ): + """ articulated parts for movable parts and a combination of moveable/attached parts of an entity. Section 6.2.94.2""" + + def __init__(self): + """ Initializer for ArticulatedPartVP""" + # /** The identification of the Variable Parameter record. Enumeration from EBV uid 56 */ + self.recordType = VariableParameterRecordType.articulated_part + + """ indicate the change of any parameter for any articulated part. Starts at zero, incremented for each change """ + self.changeIndicator = 0 + """ The identification of the articulated part to which this articulation parameter is attached. This field shall be specified by a 16-bit unsigned integer. This field shall contain the value zero if the articulated part is attached directly to the entity.""" + self.partAttachedTo = 0 + """ The type of parameter represented, 32-bit enumeration""" + self.parameterType = 0 + """ The definition of the 64-bits shall be determined based on the type of parameter specified in the Parameter Type field """ + self.parameterValue = 0.0 + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "VariableParameterRecordType : " + self.recordType.get_description + "(" + (str(int(self.recordType))) + ")" + "\n" + outputString += "ChangeIndicator : " + str(self.changeIndicator) + "\n" + outputString += "PartAttachedTo : " + str(self.partAttachedTo) + "\n" + outputString += "ParameterType : " + str(self.parameterType) + "\n" + outputString += "ParameterValue : " + str(self.parameterValue) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.recordType,outputStream) + outputStream.write_byte(int(self.changeIndicator)) + outputStream.write_short(int(self.partAttachedTo)) + outputStream.write_int(int(self.parameterType)) + outputStream.write_float(int(self.parameterValue)) + outputStream.write_int(int(self.padding)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordType = VariableParameterRecordType.get_enum(self.parse_enum(self.recordType,inputStream)) + self.changeIndicator = inputStream.read_byte() + self.partAttachedTo = inputStream.read_short() + self.parameterType = inputStream.read_int() + self.parameterValue = inputStream.read_float() + self.padding = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/articulated_parts_pdu.py b/dis/articulated_parts_pdu.py new file mode 100644 index 0000000..eede342 --- /dev/null +++ b/dis/articulated_parts_pdu.py @@ -0,0 +1,146 @@ +from enum import Enum + +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .live_entity_family_pdu import LiveEntityFamilyPdu +from .variable_parameter import VariableParameter +from .entity_id import EntityID + +class ArticulatedPartsPdu( LiveEntityFamilyPdu ): + """9.4.4 Communicate information about an entity’s articulated and attached parts.""" + + def __init__(self): + """ Initializer for ArticulatedPartsPdu""" + super().__init__() + # liveEntityId is an undescribed parameter... + self.liveEntityId = EntityID() + self.numberOfParameterRecords = 0 + self._variableParameters = [] + self.pduType = DisPduType.articulated_parts + + + def get_numberOfParameterRecords(self): + return len(self._variableParameters) + def set_numberOfParameterRecords(self, value): + numberOfParameterRecords = value + + + def get_variableParameters(self): + return self._variableParameters + def set_variableParameters(self, value): + self._variableParameters = value + variableParameters = property(get_variableParameters, set_variableParameters) + + + def add_variableParameters(self, value : VariableParameter): + self._variableParameters.append(value) + + + """ + /// Name : variableParameters + /// UID : + /// Type : VariableParameter + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : null + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "LiveEntityId :" + "\n" + self.liveEntityId.to_string() + "\n" + outputString += "NumberOfParameterRecords : " + str(len(self._variableParameters)) + "\n" + outputString += "VariableParameters : " + "\n" + for idx in range(0, len(self._variableParameters)): + outputString += self._variableParameters[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( ArticulatedPartsPdu, self ).serialize(outputStream) + self.liveEntityId.serialize(outputStream) + outputStream.write_byte( len(self._variableParameters)) + for anObj in self._variableParameters: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( ArticulatedPartsPdu, self).parse(inputStream) + self.liveEntityId.parse(inputStream) + self.numberOfParameterRecords = inputStream.read_byte() + for idx in range(0, self.numberOfParameterRecords): + element = VariableParameter() + element.parse(inputStream) + self._variableParameters.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/association.py b/dis/association.py new file mode 100644 index 0000000..33a7888 --- /dev/null +++ b/dis/association.py @@ -0,0 +1,103 @@ +from enum import Enum + +from .entity_identifier import EntityIdentifier +from .siso_ref_010.enums.entity_association_association_type import EntityAssociationAssociationType +from .vector3double import Vector3Double + +class Association( object ): + """An entity's associations with other entities and/or locations. For each association, this record shall specify the type of the association, the associated entity's EntityID and/or the associated location's world coordinates. This record may be used (optionally) in a transfer transaction to send internal state data from the divesting simulation to the acquiring simulation (see 5.9.4). This record may also be used for other purposes. Section 6.2.9""" + + def __init__(self): + """ Initializer for Association""" + # /** This field shall indicate the type of association. It shall be represented by an 8-bit enumeration. Values for this field are found in Section 14 of SISO-REF-010 330 */ + self.associationType = EntityAssociationAssociationType.default + + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + """ identity of associated entity. If none, NO_SPECIFIC_ENTITY""" + self.associatedEntityID = EntityIdentifier() + """ location, in world coordinates""" + self.associatedLocation = Vector3Double() + + def to_string(self) ->str: + outputString = "" + outputString += "EntityAssociationAssociationType : " + self.associationType.get_description + "(" + (str(int(self.associationType))) + ")" + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "AssociatedEntityID :" + "\n" + self.associatedEntityID.to_string() + "\n" + outputString += "AssociatedLocation :" + "\n" + self.associatedLocation.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.associationType,outputStream) + outputStream.write_byte(int(self.padding)) + self.associatedEntityID.serialize(outputStream) + self.associatedLocation.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.associationType = EntityAssociationAssociationType.get_enum(self.parse_enum(self.associationType,inputStream)) + self.padding = inputStream.read_byte() + self.associatedEntityID.parse(inputStream) + self.associatedLocation.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/attached_part_vp.py b/dis/attached_part_vp.py new file mode 100644 index 0000000..1179c6f --- /dev/null +++ b/dis/attached_part_vp.py @@ -0,0 +1,111 @@ +from enum import Enum + +from .entity_type import EntityType +from .siso_ref_010.enums.attached_part_detached_indicator import AttachedPartDetachedIndicator +from .siso_ref_010.enums.variable_parameter_record_type import VariableParameterRecordType +from .siso_ref_010.enums.attached_parts import AttachedParts + +class AttachedPartVP( object ): + """Removable parts that may be attached to an entity. Section 6.2.93.3""" + + def __init__(self): + """ Initializer for AttachedPartVP""" + # /** The identification of the Variable Parameter record. Enumeration from EBV uid 56 */ + self.recordType = VariableParameterRecordType.attached_part + + # /** 0 = attached, 1 = detached. See I.2.3.1 for state transition diagram uid 415 */ + self.detachedIndicator = AttachedPartDetachedIndicator.default + + """ The identification of the articulated part to which this articulation parameter is attached. This field shall be specified by a 16-bit unsigned integer. This field shall contain the value zero if the articulated part is attached directly to the entity.""" + self.partAttachedTo = 0 + # /** The location or station to which the part is attached uid 57 */ + self.parameterType = AttachedParts.default + + """ The definition of the 64-bits shall be determined based on the type of parameter specified in the Parameter Type field """ + self.attachedPartType = EntityType() + + def to_string(self) ->str: + outputString = "" + outputString += "VariableParameterRecordType : " + self.recordType.get_description + "(" + (str(int(self.recordType))) + ")" + "\n" + outputString += "AttachedPartDetachedIndicator : " + self.detachedIndicator.get_description + "(" + (str(int(self.detachedIndicator))) + ")" + "\n" + outputString += "PartAttachedTo : " + str(self.partAttachedTo) + "\n" + outputString += "AttachedParts : " + self.parameterType.get_description + "(" + (str(int(self.parameterType))) + ")" + "\n" + outputString += "AttachedPartType :" + "\n" + self.attachedPartType.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.recordType,outputStream) + self.serialize_enum(self.detachedIndicator,outputStream) + outputStream.write_short(int(self.partAttachedTo)) + self.serialize_enum(self.parameterType,outputStream) + self.attachedPartType.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordType = VariableParameterRecordType.get_enum(self.parse_enum(self.recordType,inputStream)) + self.detachedIndicator = AttachedPartDetachedIndicator.get_enum(self.parse_enum(self.detachedIndicator,inputStream)) + self.partAttachedTo = inputStream.read_short() + self.parameterType = AttachedParts.get_enum(self.parse_enum(self.parameterType,inputStream)) + self.attachedPartType.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 5 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/attribute.py b/dis/attribute.py new file mode 100644 index 0000000..1b50602 --- /dev/null +++ b/dis/attribute.py @@ -0,0 +1,104 @@ +from enum import Enum + + +class Attribute( object ): + """Used to convey information for one or more attributes. Attributes conform to the standard variable record format of 6.2.82. Section 6.2.10.""" + + def __init__(self): + """ Initializer for Attribute""" + """ The record type for this attribute. Enumeration""" + self.recordType = 0 + """ Total length of the record in octets, including padding. The record shall end on a 64-bit boundary after any padding. = 6 + K + P""" + self.recordLength = 0 + """ The attribute data format conforming to that specified by the record type. K bytes long""" + self.recordSpecificFields = [] + self.padding = [0] * 64 + + def to_string(self) ->str: + outputString = "" + outputString += "RecordType : " + str(self.recordType) + "\n" + outputString += "RecordLength : " + str(self.recordLength) + "\n" + outputString += "RecordSpecificFields : " + "\n" + for idx in range(0, len(self.recordSpecificFields)): + outputString += str(self.recordSpecificFields[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int(int(self.recordType)) + outputStream.write_short(int(self.recordLength)) + for idx in range(0, 0): + outputStream.write_unsigned_byte( self.recordSpecificFields[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordType = inputStream.read_int() + self.recordLength = inputStream.read_short() + self.recordSpecificFields = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_byte() + self.recordSpecificFields[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/attribute_pdu.py b/dis/attribute_pdu.py new file mode 100644 index 0000000..c9519bb --- /dev/null +++ b/dis/attribute_pdu.py @@ -0,0 +1,189 @@ +from enum import Enum + +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .entity_information_interaction_family_pdu import EntityInformationInteractionFamilyPdu +from .siso_ref_010.enums.variable_record_type import VariableRecordType +from .siso_ref_010.enums.disattribute_action_code import DISAttributeActionCode +from .attribute_record_set import AttributeRecordSet +from .simulation_address import SimulationAddress +from .siso_ref_010.enums.disprotocol_family import DISProtocolFamily + +class AttributePdu( EntityInformationInteractionFamilyPdu ): + """7.2.6. Information about individual attributes for a particular entity, other object, or event may be communicated using an Attribute PDU. The Attribute PDU shall not be used to exchange data available in any other PDU except where explicitly mentioned in the PDU issuance instructions within this standard. See 5.3.6.""" + + def __init__(self): + """ Initializer for AttributePdu""" + super().__init__() + """ This field shall identify the simulation issuing the Attribute PDU. It shall be represented by a Simulation Address record (see 6.2.79).""" + self.originatingSimulationAddress = SimulationAddress() + """ Padding""" + self.padding1 = 0 + """ Padding""" + self.padding2 = 0 + # /** This field shall represent the type of the PDU that is being extended or updated, if applicable. It shall be represented by an 8-bit enumeration. uid 4 */ + self.attributeRecordPduType = DisPduType.default + + # /** This field shall indicate the Protocol Version associated with the Attribute Record PDU Type. It shall be represented by an 8-bit enumeration. uid 5 */ + self.attributeRecordProtocolVersion = DISProtocolFamily.default + + # /** This field shall contain the Attribute record type of the Attribute records in the PDU if they all have the same Attribute record type. It shall be represented by a 32-bit enumeration. uid 66 Variable Record Type values are defined by VariableRecordType enumerations */ + self.masterAttributeRecordType = VariableRecordType.default + + # /** This field shall identify the action code applicable to this Attribute PDU. The Action Code shall apply to all Attribute records contained in the PDU. It shall be represented by an 8-bit enumeration. uid 295 */ + self.actionCode = DISAttributeActionCode.default + + """ Padding""" + self.padding3 = 0 + """ This field shall specify the number of Attribute Record Sets that make up the remainder of the PDU. It shall be represented by a 16-bit unsigned integer.""" + self.numberAttributeRecordSet = 0 + self._attributeRecordSets = [] + self.pduType = DisPduType.attribute + + + def get_numberAttributeRecordSet(self): + return len(self._attributeRecordSets) + def set_numberAttributeRecordSet(self, value): + numberAttributeRecordSet = value + + + def get_attributeRecordSets(self): + return self._attributeRecordSets + def set_attributeRecordSets(self, value): + self._attributeRecordSets = value + attributeRecordSets = property(get_attributeRecordSets, set_attributeRecordSets) + + + def add_attributeRecordSets(self, value : AttributeRecordSet): + self._attributeRecordSets.append(value) + + + """ + /// Name : attributeRecordSets + /// UID : + /// Type : AttributeRecordSet + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : null + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "OriginatingSimulationAddress :" + "\n" + self.originatingSimulationAddress.to_string() + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + outputString += "DisPduType : " + self.attributeRecordPduType.get_description + "(" + (str(int(self.attributeRecordPduType))) + ")" + "\n" + outputString += "DISProtocolFamily : " + self.attributeRecordProtocolVersion.get_description + "(" + (str(int(self.attributeRecordProtocolVersion))) + ")" + "\n" + outputString += "VariableRecordType : " + self.masterAttributeRecordType.get_description + "(" + (str(int(self.masterAttributeRecordType))) + ")" + "\n" + outputString += "DISAttributeActionCode : " + self.actionCode.get_description + "(" + (str(int(self.actionCode))) + ")" + "\n" + outputString += "Padding3 : " + str(self.padding3) + "\n" + outputString += "NumberAttributeRecordSet : " + str(len(self._attributeRecordSets)) + "\n" + outputString += "AttributeRecordSets : " + "\n" + for idx in range(0, len(self._attributeRecordSets)): + outputString += self._attributeRecordSets[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( AttributePdu, self ).serialize(outputStream) + self.originatingSimulationAddress.serialize(outputStream) + outputStream.write_int(int(self.padding1)) + outputStream.write_short(int(self.padding2)) + self.serialize_enum(self.attributeRecordPduType,outputStream) + self.serialize_enum(self.attributeRecordProtocolVersion,outputStream) + self.serialize_enum(self.masterAttributeRecordType,outputStream) + self.serialize_enum(self.actionCode,outputStream) + outputStream.write_byte(int(self.padding3)) + outputStream.write_short( len(self._attributeRecordSets)) + for anObj in self._attributeRecordSets: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( AttributePdu, self).parse(inputStream) + self.originatingSimulationAddress.parse(inputStream) + self.padding1 = inputStream.read_int() + self.padding2 = inputStream.read_short() + self.attributeRecordPduType = DisPduType.get_enum(self.parse_enum(self.attributeRecordPduType,inputStream)) + self.attributeRecordProtocolVersion = DISProtocolFamily.get_enum(self.parse_enum(self.attributeRecordProtocolVersion,inputStream)) + self.masterAttributeRecordType = VariableRecordType.get_enum(self.parse_enum(self.masterAttributeRecordType,inputStream)) + self.actionCode = DISAttributeActionCode.get_enum(self.parse_enum(self.actionCode,inputStream)) + self.padding3 = inputStream.read_byte() + self.numberAttributeRecordSet = inputStream.read_short() + for idx in range(0, self.numberAttributeRecordSet): + element = AttributeRecordSet() + element.parse(inputStream) + self._attributeRecordSets.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 10 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/attribute_record_set.py b/dis/attribute_record_set.py new file mode 100644 index 0000000..4c8054c --- /dev/null +++ b/dis/attribute_record_set.py @@ -0,0 +1,139 @@ +from enum import Enum + +from .attribute import Attribute +from .entity_id import EntityID + +class AttributeRecordSet( object ): + """Each Attribute Record Set shall contain the following information: the Entity or Object ID to which all Attribute records in the set apply, plus one or more Attribute records""" + + def __init__(self): + """ Initializer for AttributeRecordSet""" + # entityId is an undescribed parameter... + self.entityId = EntityID() + self.numberOfAttributeRecords = 0 + self._attributeRecords = [] + + + def get_numberOfAttributeRecords(self): + return len(self._attributeRecords) + def set_numberOfAttributeRecords(self, value): + numberOfAttributeRecords = value + + + def get_attributeRecords(self): + return self._attributeRecords + def set_attributeRecords(self, value): + self._attributeRecords = value + attributeRecords = property(get_attributeRecords, set_attributeRecords) + + + def add_attributeRecords(self, value : Attribute): + self._attributeRecords.append(value) + + + """ + /// Name : attributeRecords + /// UID : + /// Type : Attribute + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : null + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += "EntityId :" + "\n" + self.entityId.to_string() + "\n" + outputString += "NumberOfAttributeRecords : " + str(len(self._attributeRecords)) + "\n" + outputString += "AttributeRecords : " + "\n" + for idx in range(0, len(self._attributeRecords)): + outputString += self._attributeRecords[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.entityId.serialize(outputStream) + outputStream.write_short( len(self._attributeRecords)) + for anObj in self._attributeRecords: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.entityId.parse(inputStream) + self.numberOfAttributeRecords = inputStream.read_short() + for idx in range(0, self.numberOfAttributeRecords): + element = Attribute() + element.parse(inputStream) + self._attributeRecords.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/beam_antenna_pattern.py b/dis/beam_antenna_pattern.py new file mode 100644 index 0000000..78ba9f5 --- /dev/null +++ b/dis/beam_antenna_pattern.py @@ -0,0 +1,132 @@ +from enum import Enum + +from .siso_ref_010.enums.transmitter_antenna_pattern_reference_system import TransmitterAntennaPatternReferenceSystem +from .euler_angles import EulerAngles + +class BeamAntennaPattern( object ): + """Used when the antenna pattern type field has a value of 1. Specifies the direction, pattern, and polarization of radiation from an antenna. Section 6.2.9.2""" + + def __init__(self): + """ Initializer for BeamAntennaPattern""" + """ The rotation that transforms the reference coordinate sytem into the beam coordinate system. Either world coordinates or entity coordinates may be used as the reference coordinate system, as specified by the reference system field of the antenna pattern record.""" + self.beamDirection = EulerAngles() + """ Full width of the beam to the -3dB power density points in the x-y plane of the beam coordinnate system. Elevation beamwidth is represented by a 32-bit floating point number in units of radians.""" + self.azimuthBeamwidth = 0 + """ This field shall specify the full width of the beam to the –3 dB power density points in the x-z plane of the beam coordinate system. Elevation beamwidth shall be represented by a 32-bit floating point number in units of radians.""" + self.elevationBeamwidth = 0 + # /** The reference coordinate system wrt which beam direction is specified. This field should not change over the duration of an exercise. World coordindate systemis prefered for exercises. The entity coordinate system should be used only when highly directional antennas must be precisely modeled. uid 168 */ + self.referenceSystem = TransmitterAntennaPatternReferenceSystem.default + + """ Padding""" + self.padding1 = 0 + """ Padding""" + self.padding2 = 0 + """ This field shall specify the magnitude of the Z-component (in beam coordinates) of the Electrical field at some arbitrary single point in the main beam and in the far field of the antenna. """ + self.ez = 0.0 + """ This field shall specify the magnitude of the X-component (in beam coordinates) of the Electri- cal field at some arbitrary single point in the main beam and in the far field of the antenna.""" + self.ex = 0.0 + """ This field shall specify the phase angle between EZ and EX in radians. If fully omni-direc- tional antenna is modeled using beam pattern type one, the omni-directional antenna shall be repre- sented by beam direction Euler angles psi, theta, and phi of zero, an azimuth beamwidth of 2PI, and an elevation beamwidth of PI""" + self.phase = 0.0 + """ padding""" + self.padding3 = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "BeamDirection :" + "\n" + self.beamDirection.to_string() + "\n" + outputString += "AzimuthBeamwidth : " + str(self.azimuthBeamwidth) + "\n" + outputString += "ElevationBeamwidth : " + str(self.elevationBeamwidth) + "\n" + outputString += "TransmitterAntennaPatternReferenceSystem : " + self.referenceSystem.get_description + "(" + (str(int(self.referenceSystem))) + ")" + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + outputString += "Ez : " + str(self.ez) + "\n" + outputString += "Ex : " + str(self.ex) + "\n" + outputString += "Phase : " + str(self.phase) + "\n" + outputString += "Padding3 : " + str(self.padding3) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.beamDirection.serialize(outputStream) + outputStream.write_float(int(self.azimuthBeamwidth)) + outputStream.write_float(int(self.elevationBeamwidth)) + self.serialize_enum(self.referenceSystem,outputStream) + outputStream.write_byte(int(self.padding1)) + outputStream.write_short(int(self.padding2)) + outputStream.write_float(int(self.ez)) + outputStream.write_float(int(self.ex)) + outputStream.write_float(int(self.phase)) + outputStream.write_int(int(self.padding3)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.beamDirection.parse(inputStream) + self.azimuthBeamwidth = inputStream.read_float() + self.elevationBeamwidth = inputStream.read_float() + self.referenceSystem = TransmitterAntennaPatternReferenceSystem.get_enum(self.parse_enum(self.referenceSystem,inputStream)) + self.padding1 = inputStream.read_byte() + self.padding2 = inputStream.read_short() + self.ez = inputStream.read_float() + self.ex = inputStream.read_float() + self.phase = inputStream.read_float() + self.padding3 = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 10 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/beam_data.py b/dis/beam_data.py new file mode 100644 index 0000000..205b206 --- /dev/null +++ b/dis/beam_data.py @@ -0,0 +1,104 @@ +from enum import Enum + + +class BeamData( object ): + """Describes the scan volue of an emitter beam. Section 6.2.11.""" + + def __init__(self): + """ Initializer for BeamData""" + """ Specifies the beam azimuth an elevation centers and corresponding half-angles to describe the scan volume""" + self.beamAzimuthCenter = 0.0 + """ Specifies the beam azimuth sweep to determine scan volume""" + self.beamAzimuthSweep = 0.0 + """ Specifies the beam elevation center to determine scan volume""" + self.beamElevationCenter = 0.0 + """ Specifies the beam elevation sweep to determine scan volume""" + self.beamElevationSweep = 0.0 + """ allows receiver to synchronize its regenerated scan pattern to that of the emmitter. Specifies the percentage of time a scan is through its pattern from its origion.""" + self.beamSweepSync = 0.0 + + def to_string(self) ->str: + outputString = "" + outputString += "BeamAzimuthCenter : " + str(self.beamAzimuthCenter) + "\n" + outputString += "BeamAzimuthSweep : " + str(self.beamAzimuthSweep) + "\n" + outputString += "BeamElevationCenter : " + str(self.beamElevationCenter) + "\n" + outputString += "BeamElevationSweep : " + str(self.beamElevationSweep) + "\n" + outputString += "BeamSweepSync : " + str(self.beamSweepSync) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_float(int(self.beamAzimuthCenter)) + outputStream.write_float(int(self.beamAzimuthSweep)) + outputStream.write_float(int(self.beamElevationCenter)) + outputStream.write_float(int(self.beamElevationSweep)) + outputStream.write_float(int(self.beamSweepSync)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.beamAzimuthCenter = inputStream.read_float() + self.beamAzimuthSweep = inputStream.read_float() + self.beamElevationCenter = inputStream.read_float() + self.beamElevationSweep = inputStream.read_float() + self.beamSweepSync = inputStream.read_float() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 5 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/beam_status.py b/dis/beam_status.py new file mode 100644 index 0000000..ad23862 --- /dev/null +++ b/dis/beam_status.py @@ -0,0 +1,86 @@ +from enum import Enum + +from .siso_ref_010.enums.beam_status_beam_state import BeamStatusBeamState + +class BeamStatus( object ): + """Information related to the status of a beam. This is contained in the beam status field of the electromagnitec emission PDU. The first bit determines whether the beam is active (0) or deactivated (1). Section 6.2.12.""" + + def __init__(self): + """ Initializer for BeamStatus""" + # /** First bit zero means beam is active, first bit = 1 means deactivated. The rest is padding. 318 */ + self.beamState = BeamStatusBeamState.default + + + def to_string(self) ->str: + outputString = "" + outputString += "BeamStatusBeamState : " + self.beamState.get_description + "(" + (str(int(self.beamState))) + ")" + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.beamState,outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.beamState = BeamStatusBeamState.get_enum(self.parse_enum(self.beamState,inputStream)) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 1 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/blanking_sector.py b/dis/blanking_sector.py new file mode 100644 index 0000000..8930420 --- /dev/null +++ b/dis/blanking_sector.py @@ -0,0 +1,146 @@ +from enum import Enum + +from .siso_ref_010.enums.eeattribute_state_indicator import EEAttributeStateIndicator + +class BlankingSector( object ): + """The Blanking Sector attribute record may be used to convey persistent areas within a scan volume where emitter power for a specific active emitter beam is reduced to an insignificant value. Section 6.2.21.2""" + + def __init__(self): + """ Initializer for BlankingSector""" + """ record type""" + self.recordType = 3500 + """ The length of the Blanking Sector attribute record in octets.""" + self.recordLength = 40 + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + """ indicates the emitter system for which the blanking sector values are applicable""" + self.emitterNumber = 0 + """ indicates the beam for which the blanking sector values are applicable.""" + self.beamNumber = 0 + # /** indicate if blanking sector data have changed since issuance of the last Blanking Sector attribute record for this beam, if the Blanking Sector attribute record beam has ceased uid 300 */ + self.stateIndicator = EEAttributeStateIndicator.default + + """ Padding""" + self.padding2 = 0 + """ This field is provided to indicate the left-most azimuth (clockwise in radians) for which emitted power is reduced. This angle is measured in the X-Y plane of the radar's entity coor- dinate system (see 1.4.3). The range of permissible values is 0 to 2PI, with zero pointing in the X- direction. """ + self.leftAzimuth = 0.0 + """ Indicate the right-most azimuth (clockwise in radians) for which emitted power is reduced. This angle is measured in the X-Y plane of the radar's entity coordinate system (see 1.4.3). The range of permissible values is 0 to 2PI , with zero pointing in the X- direction.""" + self.rightAzimuth = 0.0 + """ This field is provided to indicate the lowest elevation (in radians) for which emit- ted power is reduced. This angle is measured positive upward with respect to the X-Y plane of the radar's entity coordinate system (see 1.4.3). The range of permissible values is -PI/2 to PI/2""" + self.lowerElevation = 0.0 + """ This field is provided to indicate the highest elevation (in radians) for which emitted power is reduced. This angle is measured positive upward with respect to the X-Y plane of the radar's entitycoordinatesystem(see1.4.3). The range of permissible values is -PI/2 to PI/2""" + self.upperElevation = 0.0 + """ This field shall specify the residual effective radiated power in the blanking sector in dBm. """ + self.residualPower = 0.0 + """ Padding, 32-bits""" + self.padding3 = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "RecordType : " + str(self.recordType) + "\n" + outputString += "RecordLength : " + str(self.recordLength) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "EmitterNumber : " + str(self.emitterNumber) + "\n" + outputString += "BeamNumber : " + str(self.beamNumber) + "\n" + outputString += "EEAttributeStateIndicator : " + self.stateIndicator.get_description + "(" + (str(int(self.stateIndicator))) + ")" + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + outputString += "LeftAzimuth : " + str(self.leftAzimuth) + "\n" + outputString += "RightAzimuth : " + str(self.rightAzimuth) + "\n" + outputString += "LowerElevation : " + str(self.lowerElevation) + "\n" + outputString += "UpperElevation : " + str(self.upperElevation) + "\n" + outputString += "ResidualPower : " + str(self.residualPower) + "\n" + outputString += "Padding3 : " + str(self.padding3) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int(int(self.recordType)) + outputStream.write_short(int(self.recordLength)) + outputStream.write_short(int(self.padding)) + outputStream.write_byte(int(self.emitterNumber)) + outputStream.write_byte(int(self.beamNumber)) + self.serialize_enum(self.stateIndicator,outputStream) + outputStream.write_byte(int(self.padding2)) + outputStream.write_float(int(self.leftAzimuth)) + outputStream.write_float(int(self.rightAzimuth)) + outputStream.write_float(int(self.lowerElevation)) + outputStream.write_float(int(self.upperElevation)) + outputStream.write_float(int(self.residualPower)) + outputStream.write_long(int(self.padding3)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordType = inputStream.read_int() + self.recordLength = inputStream.read_short() + self.padding = inputStream.read_short() + self.emitterNumber = inputStream.read_byte() + self.beamNumber = inputStream.read_byte() + self.stateIndicator = EEAttributeStateIndicator.get_enum(self.parse_enum(self.stateIndicator,inputStream)) + self.padding2 = inputStream.read_byte() + self.leftAzimuth = inputStream.read_float() + self.rightAzimuth = inputStream.read_float() + self.lowerElevation = inputStream.read_float() + self.upperElevation = inputStream.read_float() + self.residualPower = inputStream.read_float() + self.padding3 = inputStream.read_long() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 13 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/change_options.py b/dis/change_options.py new file mode 100644 index 0000000..9e93e82 --- /dev/null +++ b/dis/change_options.py @@ -0,0 +1,83 @@ +from enum import Enum + + +class ChangeOptions( object ): + """This is a bitfield. See section 6.2.13 aka B.2.41""" + + def __init__(self): + """ Initializer for ChangeOptions""" + self.value = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "Value : " + str(self.value) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_byte(int(self.value)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.value = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 1 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/clock_time.py b/dis/clock_time.py new file mode 100644 index 0000000..fe61b31 --- /dev/null +++ b/dis/clock_time.py @@ -0,0 +1,89 @@ +from enum import Enum + + +class ClockTime( object ): + """Time measurements that exceed one hour are represented by this record. The first field is the hours since the unix epoch (Jan 1 1970, used by most Unix systems and java) and the second field the timestamp units since the top of the hour. Section 6.2.14""" + + def __init__(self): + """ Initializer for ClockTime""" + """ Hours in UTC""" + self.hour = 0 + """ Time past the hour""" + self.timePastHour = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "Hour : " + str(self.hour) + "\n" + outputString += "TimePastHour : " + str(self.timePastHour) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int(int(self.hour)) + outputStream.write_int(int(self.timePastHour)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.hour = inputStream.read_int() + self.timePastHour = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/collision_elastic_pdu.py b/dis/collision_elastic_pdu.py new file mode 100644 index 0000000..59b9047 --- /dev/null +++ b/dis/collision_elastic_pdu.py @@ -0,0 +1,164 @@ +from enum import Enum + +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .entity_information_interaction_family_pdu import EntityInformationInteractionFamilyPdu +from .vector3float import Vector3Float +from .entity_id import EntityID +from .event_identifier import EventIdentifier + +class CollisionElasticPdu( EntityInformationInteractionFamilyPdu ): + """7.2.4 Information about elastic collisions in a DIS exercise shall be communicated using a Collision-Elastic PDU. See 5.3.4.""" + + def __init__(self): + """ Initializer for CollisionElasticPdu""" + super().__init__() + """ This field shall identify the entity that is issuing the PDU and shall be represented by an Entity Identifier record (see 6.2.28)""" + self.issuingEntityID = EntityID() + """ This field shall identify the entity that has collided with the issuing entity. This field shall be a valid identifier of an entity or server capable of responding to the receipt of this Collision-Elastic PDU. This field shall be represented by an Entity Identifier record (see 6.2.28).""" + self.collidingEntityID = EntityID() + """ This field shall contain an identification generated by the issuing simulation application to associate related collision events. This field shall be represented by an Event Identifier record (see 6.2.34).""" + self.collisionEventID = EventIdentifier() + """ some padding""" + self.pad = 0 + """ This field shall contain the velocity at the time the collision is detected at the point the collision is detected. The velocity shall be represented in world coordinates. This field shall be represented by the Linear Velocity Vector record [see 6.2.95 item c)]""" + self.contactVelocity = Vector3Float() + """ This field shall contain the mass of the issuing entity and shall be represented by a 32-bit floating point number representing kilograms""" + self.mass = 0.0 + """ This field shall specify the location of the collision with respect to the entity with which the issuing entity collided. This field shall be represented by an Entity Coordinate Vector record [see 6.2.95 item a)].""" + self.locationOfImpact = Vector3Float() + """ These six records represent the six independent components of a positive semi-definite matrix formed by pre-multiplying and post-multiplying the tensor of inertia, by the anti-symmetric matrix generated by the moment arm, and shall be represented by 32-bit floating point numbers (see 5.3.4.4)""" + self.collisionIntermediateResultXX = 0.0 + """ tensor values""" + self.collisionIntermediateResultXY = 0.0 + """ tensor values""" + self.collisionIntermediateResultXZ = 0.0 + """ tensor values""" + self.collisionIntermediateResultYY = 0.0 + """ tensor values""" + self.collisionIntermediateResultYZ = 0.0 + """ tensor values""" + self.collisionIntermediateResultZZ = 0.0 + """ This record shall represent the normal vector to the surface at the point of collision detection. The surface normal shall be represented in world coordinates. This field shall be represented by an Entity Coordinate Vector record [see 6.2.95 item a)].""" + self.unitSurfaceNormal = Vector3Float() + """ This field shall represent the degree to which energy is conserved in a collision and shall be represented by a 32-bit floating point number. In addition, it represents a free parameter by which simulation application developers may "tune" their collision interactions.""" + self.coefficientOfRestitution = 0.0 + self.pduType = DisPduType.collision_elastic + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "IssuingEntityID :" + "\n" + self.issuingEntityID.to_string() + "\n" + outputString += "CollidingEntityID :" + "\n" + self.collidingEntityID.to_string() + "\n" + outputString += "CollisionEventID :" + "\n" + self.collisionEventID.to_string() + "\n" + outputString += "Pad : " + str(self.pad) + "\n" + outputString += "ContactVelocity :" + "\n" + self.contactVelocity.to_string() + "\n" + outputString += "Mass : " + str(self.mass) + "\n" + outputString += "LocationOfImpact :" + "\n" + self.locationOfImpact.to_string() + "\n" + outputString += "CollisionIntermediateResultXX : " + str(self.collisionIntermediateResultXX) + "\n" + outputString += "CollisionIntermediateResultXY : " + str(self.collisionIntermediateResultXY) + "\n" + outputString += "CollisionIntermediateResultXZ : " + str(self.collisionIntermediateResultXZ) + "\n" + outputString += "CollisionIntermediateResultYY : " + str(self.collisionIntermediateResultYY) + "\n" + outputString += "CollisionIntermediateResultYZ : " + str(self.collisionIntermediateResultYZ) + "\n" + outputString += "CollisionIntermediateResultZZ : " + str(self.collisionIntermediateResultZZ) + "\n" + outputString += "UnitSurfaceNormal :" + "\n" + self.unitSurfaceNormal.to_string() + "\n" + outputString += "CoefficientOfRestitution : " + str(self.coefficientOfRestitution) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( CollisionElasticPdu, self ).serialize(outputStream) + self.issuingEntityID.serialize(outputStream) + self.collidingEntityID.serialize(outputStream) + self.collisionEventID.serialize(outputStream) + outputStream.write_short(int(self.pad)) + self.contactVelocity.serialize(outputStream) + outputStream.write_float(int(self.mass)) + self.locationOfImpact.serialize(outputStream) + outputStream.write_float(int(self.collisionIntermediateResultXX)) + outputStream.write_float(int(self.collisionIntermediateResultXY)) + outputStream.write_float(int(self.collisionIntermediateResultXZ)) + outputStream.write_float(int(self.collisionIntermediateResultYY)) + outputStream.write_float(int(self.collisionIntermediateResultYZ)) + outputStream.write_float(int(self.collisionIntermediateResultZZ)) + self.unitSurfaceNormal.serialize(outputStream) + outputStream.write_float(int(self.coefficientOfRestitution)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( CollisionElasticPdu, self).parse(inputStream) + self.issuingEntityID.parse(inputStream) + self.collidingEntityID.parse(inputStream) + self.collisionEventID.parse(inputStream) + self.pad = inputStream.read_short() + self.contactVelocity.parse(inputStream) + self.mass = inputStream.read_float() + self.locationOfImpact.parse(inputStream) + self.collisionIntermediateResultXX = inputStream.read_float() + self.collisionIntermediateResultXY = inputStream.read_float() + self.collisionIntermediateResultXZ = inputStream.read_float() + self.collisionIntermediateResultYY = inputStream.read_float() + self.collisionIntermediateResultYZ = inputStream.read_float() + self.collisionIntermediateResultZZ = inputStream.read_float() + self.unitSurfaceNormal.parse(inputStream) + self.coefficientOfRestitution = inputStream.read_float() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 15 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/collision_pdu.py b/dis/collision_pdu.py new file mode 100644 index 0000000..95fb94a --- /dev/null +++ b/dis/collision_pdu.py @@ -0,0 +1,131 @@ +from enum import Enum + +from .siso_ref_010.enums.collision_type import CollisionType +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .entity_information_interaction_family_pdu import EntityInformationInteractionFamilyPdu +from .vector3float import Vector3Float +from .entity_id import EntityID +from .event_identifier import EventIdentifier + +class CollisionPdu( EntityInformationInteractionFamilyPdu ): + """7.2.3 Collisions between entities shall be communicated by issuing a Collision PDU. See 5.3.3.""" + + def __init__(self): + """ Initializer for CollisionPdu""" + super().__init__() + """ This field shall identify the entity that is issuing the PDU, and shall be represented by an Entity Identifier record (see 6.2.28).""" + self.issuingEntityID = EntityID() + """ This field shall identify the entity that has collided with the issuing entity (see 5.3.3.4). This field shall be represented by an Entity Identifier record (see 6.2.28).""" + self.collidingEntityID = EntityID() + """ This field shall contain an identification generated by the issuing simulation application to associate related collision events. This field shall be represented by an Event Identifier record (see 6.2.34).""" + self.eventID = EventIdentifier() + # /** This field shall identify the type of collision. The Collision Type field shall be represented by an 8-bit record of enumerations uid 189 */ + self.collisionType = CollisionType.default + + """ some padding""" + self.pad = 0 + """ This field shall contain the velocity (at the time the collision is detected) of the issuing entity. The velocity shall be represented in world coordinates. This field shall be represented by the Linear Velocity Vector record [see 6.2.95 item c)].""" + self.velocity = Vector3Float() + """ This field shall contain the mass of the issuing entity, and shall be represented by a 32-bit floating point number representing kilograms.""" + self.mass = 0.0 + """ This field shall specify the location of the collision with respect to the entity with which the issuing entity collided. The Location field shall be represented by an Entity Coordinate Vector record [see 6.2.95 item a)].""" + self.location = Vector3Float() + self.pduType = DisPduType.collision + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "IssuingEntityID :" + "\n" + self.issuingEntityID.to_string() + "\n" + outputString += "CollidingEntityID :" + "\n" + self.collidingEntityID.to_string() + "\n" + outputString += "EventID :" + "\n" + self.eventID.to_string() + "\n" + outputString += "CollisionType : " + self.collisionType.get_description + "(" + (str(int(self.collisionType))) + ")" + "\n" + outputString += "Pad : " + str(self.pad) + "\n" + outputString += "Velocity :" + "\n" + self.velocity.to_string() + "\n" + outputString += "Mass : " + str(self.mass) + "\n" + outputString += "Location :" + "\n" + self.location.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( CollisionPdu, self ).serialize(outputStream) + self.issuingEntityID.serialize(outputStream) + self.collidingEntityID.serialize(outputStream) + self.eventID.serialize(outputStream) + self.serialize_enum(self.collisionType,outputStream) + outputStream.write_byte(int(self.pad)) + self.velocity.serialize(outputStream) + outputStream.write_float(int(self.mass)) + self.location.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( CollisionPdu, self).parse(inputStream) + self.issuingEntityID.parse(inputStream) + self.collidingEntityID.parse(inputStream) + self.eventID.parse(inputStream) + self.collisionType = CollisionType.get_enum(self.parse_enum(self.collisionType,inputStream)) + self.pad = inputStream.read_byte() + self.velocity.parse(inputStream) + self.mass = inputStream.read_float() + self.location.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 8 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/comment_pdu.py b/dis/comment_pdu.py new file mode 100644 index 0000000..dab3469 --- /dev/null +++ b/dis/comment_pdu.py @@ -0,0 +1,147 @@ +from enum import Enum + +from .simulation_management_family_pdu import SimulationManagementFamilyPdu +from .variable_datum import VariableDatum +from .siso_ref_010.enums.dis_pdu_type import DisPduType + +class CommentPdu( SimulationManagementFamilyPdu ): + """7.5.13 Used to enter arbitrary messages (character strings, for example). See 5.6.5.13""" + + def __init__(self): + """ Initializer for CommentPdu""" + super().__init__() + """ Number of fixed datum records, not used in this Pdu""" + self.numberOfFixedDatumRecords = 0 + """ Number of variable datum records, handled automatically by marshaller at run time (and not modifiable by end-user programmers)""" + self.numberOfVariableDatumRecords = 0 + """ variable length list of variable length datums""" + self._variableDatums = [] + self.pduType = DisPduType.comment + + + def get_numberOfVariableDatumRecords(self): + return len(self._variableDatums) + def set_numberOfVariableDatumRecords(self, value): + numberOfVariableDatumRecords = value + + + def get_variableDatums(self): + return self._variableDatums + def set_variableDatums(self, value): + self._variableDatums = value + variableDatums = property(get_variableDatums, set_variableDatums) + + + def add_variableDatums(self, value : VariableDatum): + self._variableDatums.append(value) + + + """ + /// Name : variableDatums + /// UID : + /// Type : VariableDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of variable length datums + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "NumberOfFixedDatumRecords : " + str(self.numberOfFixedDatumRecords) + "\n" + outputString += "NumberOfVariableDatumRecords : " + str(len(self._variableDatums)) + "\n" + outputString += "VariableDatums : " + "\n" + for idx in range(0, len(self._variableDatums)): + outputString += self._variableDatums[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( CommentPdu, self ).serialize(outputStream) + outputStream.write_int(int(self.numberOfFixedDatumRecords)) + outputStream.write_int( len(self._variableDatums)) + for anObj in self._variableDatums: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( CommentPdu, self).parse(inputStream) + self.numberOfFixedDatumRecords = inputStream.read_int() + self.numberOfVariableDatumRecords = inputStream.read_int() + for idx in range(0, self.numberOfVariableDatumRecords): + element = VariableDatum() + element.parse(inputStream) + self._variableDatums.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/comment_reliable_pdu.py b/dis/comment_reliable_pdu.py new file mode 100644 index 0000000..ea28804 --- /dev/null +++ b/dis/comment_reliable_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class CommentReliablePdu( object ): + """Alias, more descriptive name for CommentRPdu.""" + + def __init__(self): + """ Initializer for CommentReliablePdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/comment_rpdu.py b/dis/comment_rpdu.py new file mode 100644 index 0000000..652398b --- /dev/null +++ b/dis/comment_rpdu.py @@ -0,0 +1,147 @@ +from enum import Enum + +from .variable_datum import VariableDatum +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .simulation_management_with_reliability_family_pdu import SimulationManagementWithReliabilityFamilyPdu + +class CommentRPdu( SimulationManagementWithReliabilityFamilyPdu ): + """5.12.4.13 Serves the same function as the Comment PDU.""" + + def __init__(self): + """ Initializer for CommentRPdu""" + super().__init__() + """ Fixed datum record count, not used in this Pdu""" + self.numberOfFixedDatumRecords = 0 + """ variable datum record count""" + self.numberOfVariableDatumRecords = 0 + """ Variable datum records""" + self._variableDatumRecords = [] + self.pduType = DisPduType.comment_reliable + + + def get_numberOfVariableDatumRecords(self): + return len(self._variableDatumRecords) + def set_numberOfVariableDatumRecords(self, value): + numberOfVariableDatumRecords = value + + + def get_variableDatumRecords(self): + return self._variableDatumRecords + def set_variableDatumRecords(self, value): + self._variableDatumRecords = value + variableDatumRecords = property(get_variableDatumRecords, set_variableDatumRecords) + + + def add_variableDatumRecords(self, value : VariableDatum): + self._variableDatumRecords.append(value) + + + """ + /// Name : variableDatumRecords + /// UID : + /// Type : VariableDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Variable datum records + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "NumberOfFixedDatumRecords : " + str(self.numberOfFixedDatumRecords) + "\n" + outputString += "NumberOfVariableDatumRecords : " + str(len(self._variableDatumRecords)) + "\n" + outputString += "VariableDatumRecords : " + "\n" + for idx in range(0, len(self._variableDatumRecords)): + outputString += self._variableDatumRecords[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( CommentRPdu, self ).serialize(outputStream) + outputStream.write_int(int(self.numberOfFixedDatumRecords)) + outputStream.write_int( len(self._variableDatumRecords)) + for anObj in self._variableDatumRecords: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( CommentRPdu, self).parse(inputStream) + self.numberOfFixedDatumRecords = inputStream.read_int() + self.numberOfVariableDatumRecords = inputStream.read_int() + for idx in range(0, self.numberOfVariableDatumRecords): + element = VariableDatum() + element.parse(inputStream) + self._variableDatumRecords.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/communications_node_id.py b/dis/communications_node_id.py new file mode 100644 index 0000000..c59cdeb --- /dev/null +++ b/dis/communications_node_id.py @@ -0,0 +1,89 @@ +from enum import Enum + +from .entity_id import EntityID + +class CommunicationsNodeID( object ): + """Identity of a communications node. Section 6.2.48.4""" + + def __init__(self): + """ Initializer for CommunicationsNodeID""" + # entityID is an undescribed parameter... + self.entityID = EntityID() + self.elementID = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "EntityID :" + "\n" + self.entityID.to_string() + "\n" + outputString += "ElementID : " + str(self.elementID) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.entityID.serialize(outputStream) + outputStream.write_short(int(self.elementID)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.entityID.parse(inputStream) + self.elementID = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/create_entity_pdu.py b/dis/create_entity_pdu.py new file mode 100644 index 0000000..38895e2 --- /dev/null +++ b/dis/create_entity_pdu.py @@ -0,0 +1,91 @@ +from enum import Enum + +from .simulation_management_family_pdu import SimulationManagementFamilyPdu +from .siso_ref_010.enums.dis_pdu_type import DisPduType + +class CreateEntityPdu( SimulationManagementFamilyPdu ): + """Section 7.5.2. The creation of a new entity shall be communicated using a Create Entity PDU. See 5.6.5.2.""" + + def __init__(self): + """ Initializer for CreateEntityPdu""" + super().__init__() + """ Identifier for the request. See 6.2.75""" + self.requestID = 0 + self.pduType = DisPduType.create_entity + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RequestID : " + str(self.requestID) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( CreateEntityPdu, self ).serialize(outputStream) + outputStream.write_int(int(self.requestID)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( CreateEntityPdu, self).parse(inputStream) + self.requestID = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 1 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/create_entity_reliable_pdu.py b/dis/create_entity_reliable_pdu.py new file mode 100644 index 0000000..a6e8bfb --- /dev/null +++ b/dis/create_entity_reliable_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class CreateEntityReliablePdu( object ): + """Alias, more descriptive name for CreateEntityRPdu.""" + + def __init__(self): + """ Initializer for CreateEntityReliablePdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/create_entity_rpdu.py b/dis/create_entity_rpdu.py new file mode 100644 index 0000000..cf4042b --- /dev/null +++ b/dis/create_entity_rpdu.py @@ -0,0 +1,106 @@ +from enum import Enum + +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .siso_ref_010.enums.required_reliability_service import RequiredReliabilityService +from .simulation_management_with_reliability_family_pdu import SimulationManagementWithReliabilityFamilyPdu + +class CreateEntityRPdu( SimulationManagementWithReliabilityFamilyPdu ): + """5.12.4.2 Serves the same function as the Create Entity PDU but with the addition of reliability service levels.""" + + def __init__(self): + """ Initializer for CreateEntityRPdu""" + super().__init__() + # /** level of reliability service used for this transaction uid 74 */ + self.requiredReliabilityService = RequiredReliabilityService.default + + self.pad1 = 0 + self.pad2 = 0 + """ Request ID provides a unique identifier""" + self.requestID = 0 + self.pduType = DisPduType.create_entity_reliable + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RequiredReliabilityService : " + self.requiredReliabilityService.get_description + "(" + (str(int(self.requiredReliabilityService))) + ")" + "\n" + outputString += "Pad1 : " + str(self.pad1) + "\n" + outputString += "Pad2 : " + str(self.pad2) + "\n" + outputString += "RequestID : " + str(self.requestID) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( CreateEntityRPdu, self ).serialize(outputStream) + self.serialize_enum(self.requiredReliabilityService,outputStream) + outputStream.write_byte(int(self.pad1)) + outputStream.write_short(int(self.pad2)) + outputStream.write_int(int(self.requestID)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( CreateEntityRPdu, self).parse(inputStream) + self.requiredReliabilityService = RequiredReliabilityService.get_enum(self.parse_enum(self.requiredReliabilityService,inputStream)) + self.pad1 = inputStream.read_byte() + self.pad2 = inputStream.read_short() + self.requestID = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/data_filter_record.py b/dis/data_filter_record.py new file mode 100644 index 0000000..bd65344 --- /dev/null +++ b/dis/data_filter_record.py @@ -0,0 +1,84 @@ +from enum import Enum + + +class DataFilterRecord( object ): + """identify which of the optional data fields are contained in the Minefield Data PDU or requested in the Minefield Query PDU. This is a 32-bit record. For each field, true denotes that the data is requested or present and false denotes that the data is neither requested nor present. Section 6.2.16""" + + def __init__(self): + """ Initializer for DataFilterRecord""" + """ Bitflags field""" + self.bitFlags = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "BitFlags : " + str(self.bitFlags) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int(int(self.bitFlags)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.bitFlags = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 12 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/data_pdu.py b/dis/data_pdu.py new file mode 100644 index 0000000..eaa0432 --- /dev/null +++ b/dis/data_pdu.py @@ -0,0 +1,208 @@ +from enum import Enum + +from .simulation_management_family_pdu import SimulationManagementFamilyPdu +from .variable_datum import VariableDatum +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .fixed_datum import FixedDatum + +class DataPdu( SimulationManagementFamilyPdu ): + """7.5.11 Information issued in response to a Data Query PDU or Set Data PDU. Section 5.6.5.11""" + + def __init__(self): + """ Initializer for DataPdu""" + super().__init__() + """ ID of request""" + self.requestID = 0 + """ padding""" + self.padding1 = 0 + """ Number of fixed datum records""" + self.numberOfFixedDatumRecords = 0 + """ Number of variable datum records, handled automatically by marshaller at run time (and not modifiable by end-user programmers)""" + self.numberOfVariableDatumRecords = 0 + """ variable length list of fixed datums""" + self._fixedDatums = [] + """ variable length list of variable length datums""" + self._variableDatums = [] + self.pduType = DisPduType.data + + + def get_numberOfFixedDatumRecords(self): + return len(self._fixedDatums) + def set_numberOfFixedDatumRecords(self, value): + numberOfFixedDatumRecords = value + + + def get_numberOfVariableDatumRecords(self): + return len(self._variableDatums) + def set_numberOfVariableDatumRecords(self, value): + numberOfVariableDatumRecords = value + + + def get_fixedDatums(self): + return self._fixedDatums + def set_fixedDatums(self, value): + self._fixedDatums = value + fixedDatums = property(get_fixedDatums, set_fixedDatums) + + + def add_fixedDatums(self, value : FixedDatum): + self._fixedDatums.append(value) + + + """ + /// Name : fixedDatums + /// UID : + /// Type : FixedDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of fixed datums + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_variableDatums(self): + return self._variableDatums + def set_variableDatums(self, value): + self._variableDatums = value + variableDatums = property(get_variableDatums, set_variableDatums) + + + def add_variableDatums(self, value : VariableDatum): + self._variableDatums.append(value) + + + """ + /// Name : variableDatums + /// UID : + /// Type : VariableDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of variable length datums + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RequestID : " + str(self.requestID) + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "NumberOfFixedDatumRecords : " + str(len(self._fixedDatums)) + "\n" + outputString += "NumberOfVariableDatumRecords : " + str(len(self._variableDatums)) + "\n" + outputString += "FixedDatums : " + "\n" + for idx in range(0, len(self._fixedDatums)): + outputString += self._fixedDatums[idx].to_string() + + outputString += "VariableDatums : " + "\n" + for idx in range(0, len(self._variableDatums)): + outputString += self._variableDatums[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( DataPdu, self ).serialize(outputStream) + outputStream.write_int(int(self.requestID)) + outputStream.write_int(int(self.padding1)) + outputStream.write_int( len(self._fixedDatums)) + outputStream.write_int( len(self._variableDatums)) + for anObj in self._fixedDatums: + anObj.serialize(outputStream) + + for anObj in self._variableDatums: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( DataPdu, self).parse(inputStream) + self.requestID = inputStream.read_int() + self.padding1 = inputStream.read_int() + self.numberOfFixedDatumRecords = inputStream.read_int() + self.numberOfVariableDatumRecords = inputStream.read_int() + for idx in range(0, self.numberOfFixedDatumRecords): + element = FixedDatum() + element.parse(inputStream) + self._fixedDatums.append(element) + + for idx in range(0, self.numberOfVariableDatumRecords): + element = VariableDatum() + element.parse(inputStream) + self._variableDatums.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/data_query_datum_specification.py b/dis/data_query_datum_specification.py new file mode 100644 index 0000000..cf1b874 --- /dev/null +++ b/dis/data_query_datum_specification.py @@ -0,0 +1,190 @@ +from enum import Enum + +from .unsigned_disinteger import UnsignedDISInteger + +class DataQueryDatumSpecification( object ): + """List of fixed and variable datum records. Section 6.2.17 """ + + def __init__(self): + """ Initializer for DataQueryDatumSpecification""" + """ Number of fixed datums""" + self.numberOfFixedDatums = 0 + """ Number of variable datums""" + self.numberOfVariableDatums = 0 + """ variable length list fixed datum IDs""" + self._fixedDatumIDList = [] + """ variable length list variable datum IDs""" + self._variableDatumIDList = [] + + + def get_numberOfFixedDatums(self): + return len(self._fixedDatumIDList) + def set_numberOfFixedDatums(self, value): + numberOfFixedDatums = value + + + def get_numberOfVariableDatums(self): + return len(self._variableDatumIDList) + def set_numberOfVariableDatums(self, value): + numberOfVariableDatums = value + + + def get_fixedDatumIDList(self): + return self._fixedDatumIDList + def set_fixedDatumIDList(self, value): + self._fixedDatumIDList = value + fixedDatumIDList = property(get_fixedDatumIDList, set_fixedDatumIDList) + + + def add_fixedDatumIDList(self, value : UnsignedDISInteger): + self._fixedDatumIDList.append(value) + + + """ + /// Name : fixedDatumIDList + /// UID : + /// Type : UnsignedDISInteger + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list fixed datum IDs + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_variableDatumIDList(self): + return self._variableDatumIDList + def set_variableDatumIDList(self, value): + self._variableDatumIDList = value + variableDatumIDList = property(get_variableDatumIDList, set_variableDatumIDList) + + + def add_variableDatumIDList(self, value : UnsignedDISInteger): + self._variableDatumIDList.append(value) + + + """ + /// Name : variableDatumIDList + /// UID : + /// Type : UnsignedDISInteger + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list variable datum IDs + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += "NumberOfFixedDatums : " + str(len(self._fixedDatumIDList)) + "\n" + outputString += "NumberOfVariableDatums : " + str(len(self._variableDatumIDList)) + "\n" + outputString += "FixedDatumIDList : " + "\n" + for idx in range(0, len(self._fixedDatumIDList)): + outputString += self._fixedDatumIDList[idx].to_string() + + outputString += "VariableDatumIDList : " + "\n" + for idx in range(0, len(self._variableDatumIDList)): + outputString += self._variableDatumIDList[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int( len(self._fixedDatumIDList)) + outputStream.write_int( len(self._variableDatumIDList)) + for anObj in self._fixedDatumIDList: + anObj.serialize(outputStream) + + for anObj in self._variableDatumIDList: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.numberOfFixedDatums = inputStream.read_int() + self.numberOfVariableDatums = inputStream.read_int() + for idx in range(0, self.numberOfFixedDatums): + element = UnsignedDISInteger() + element.parse(inputStream) + self._fixedDatumIDList.append(element) + + for idx in range(0, self.numberOfVariableDatums): + element = UnsignedDISInteger() + element.parse(inputStream) + self._variableDatumIDList.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/data_query_pdu.py b/dis/data_query_pdu.py new file mode 100644 index 0000000..338adc9 --- /dev/null +++ b/dis/data_query_pdu.py @@ -0,0 +1,208 @@ +from enum import Enum + +from .simulation_management_family_pdu import SimulationManagementFamilyPdu +from .variable_datum import VariableDatum +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .fixed_datum import FixedDatum + +class DataQueryPdu( SimulationManagementFamilyPdu ): + """Section 7.5.9. A request for data from an entity shall be communicated by issuing a Data Query PDU. See 5.6.5.9""" + + def __init__(self): + """ Initializer for DataQueryPdu""" + super().__init__() + """ ID of request""" + self.requestID = 0 + """ time issues between issues of Data PDUs. Zero means send once only.""" + self.timeInterval = 0 + """ Number of fixed datum records""" + self.numberOfFixedDatumRecords = 0 + """ Number of variable datum records, handled automatically by marshaller at run time (and not modifiable by end-user programmers)""" + self.numberOfVariableDatumRecords = 0 + """ variable length list of fixed datums""" + self._fixedDatums = [] + """ variable length list of variable length datums""" + self._variableDatums = [] + self.pduType = DisPduType.data_query + + + def get_numberOfFixedDatumRecords(self): + return len(self._fixedDatums) + def set_numberOfFixedDatumRecords(self, value): + numberOfFixedDatumRecords = value + + + def get_numberOfVariableDatumRecords(self): + return len(self._variableDatums) + def set_numberOfVariableDatumRecords(self, value): + numberOfVariableDatumRecords = value + + + def get_fixedDatums(self): + return self._fixedDatums + def set_fixedDatums(self, value): + self._fixedDatums = value + fixedDatums = property(get_fixedDatums, set_fixedDatums) + + + def add_fixedDatums(self, value : FixedDatum): + self._fixedDatums.append(value) + + + """ + /// Name : fixedDatums + /// UID : + /// Type : FixedDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of fixed datums + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_variableDatums(self): + return self._variableDatums + def set_variableDatums(self, value): + self._variableDatums = value + variableDatums = property(get_variableDatums, set_variableDatums) + + + def add_variableDatums(self, value : VariableDatum): + self._variableDatums.append(value) + + + """ + /// Name : variableDatums + /// UID : + /// Type : VariableDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of variable length datums + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RequestID : " + str(self.requestID) + "\n" + outputString += "TimeInterval : " + str(self.timeInterval) + "\n" + outputString += "NumberOfFixedDatumRecords : " + str(len(self._fixedDatums)) + "\n" + outputString += "NumberOfVariableDatumRecords : " + str(len(self._variableDatums)) + "\n" + outputString += "FixedDatums : " + "\n" + for idx in range(0, len(self._fixedDatums)): + outputString += self._fixedDatums[idx].to_string() + + outputString += "VariableDatums : " + "\n" + for idx in range(0, len(self._variableDatums)): + outputString += self._variableDatums[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( DataQueryPdu, self ).serialize(outputStream) + outputStream.write_int(int(self.requestID)) + outputStream.write_int(int(self.timeInterval)) + outputStream.write_int( len(self._fixedDatums)) + outputStream.write_int( len(self._variableDatums)) + for anObj in self._fixedDatums: + anObj.serialize(outputStream) + + for anObj in self._variableDatums: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( DataQueryPdu, self).parse(inputStream) + self.requestID = inputStream.read_int() + self.timeInterval = inputStream.read_int() + self.numberOfFixedDatumRecords = inputStream.read_int() + self.numberOfVariableDatumRecords = inputStream.read_int() + for idx in range(0, self.numberOfFixedDatumRecords): + element = FixedDatum() + element.parse(inputStream) + self._fixedDatums.append(element) + + for idx in range(0, self.numberOfVariableDatumRecords): + element = VariableDatum() + element.parse(inputStream) + self._variableDatums.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/data_query_reliable_pdu.py b/dis/data_query_reliable_pdu.py new file mode 100644 index 0000000..f04f179 --- /dev/null +++ b/dis/data_query_reliable_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class DataQueryReliablePdu( object ): + """Alias, more descriptive name for DataQueryRPdu.""" + + def __init__(self): + """ Initializer for DataQueryReliablePdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/data_query_rpdu.py b/dis/data_query_rpdu.py new file mode 100644 index 0000000..6a584a1 --- /dev/null +++ b/dis/data_query_rpdu.py @@ -0,0 +1,225 @@ +from enum import Enum + +from .variable_datum import VariableDatum +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .siso_ref_010.enums.required_reliability_service import RequiredReliabilityService +from .fixed_datum import FixedDatum +from .simulation_management_with_reliability_family_pdu import SimulationManagementWithReliabilityFamilyPdu + +class DataQueryRPdu( SimulationManagementWithReliabilityFamilyPdu ): + """5.12.4.9 Serves the same function as the Data Query PDU but with the addition of reliability service levels""" + + def __init__(self): + """ Initializer for DataQueryRPdu""" + super().__init__() + # /** level of reliability service used for this transaction uid 74 */ + self.requiredReliabilityService = RequiredReliabilityService.default + + """ padding""" + self.pad1 = 0 + """ padding""" + self.pad2 = 0 + """ request ID provides a unique identifier""" + self.requestID = 0 + """ time interval between issuing data query PDUs""" + self.timeInterval = 0 + """ Fixed datum record count""" + self.numberOfFixedDatumRecords = 0 + """ variable datum record count""" + self.numberOfVariableDatumRecords = 0 + """ Fixed datum records""" + self._fixedDatumRecords = [] + """ Variable datum records""" + self._variableDatumRecords = [] + self.pduType = DisPduType.data_query_reliable + + + def get_numberOfFixedDatumRecords(self): + return len(self._fixedDatumRecords) + def set_numberOfFixedDatumRecords(self, value): + numberOfFixedDatumRecords = value + + + def get_numberOfVariableDatumRecords(self): + return len(self._variableDatumRecords) + def set_numberOfVariableDatumRecords(self, value): + numberOfVariableDatumRecords = value + + + def get_fixedDatumRecords(self): + return self._fixedDatumRecords + def set_fixedDatumRecords(self, value): + self._fixedDatumRecords = value + fixedDatumRecords = property(get_fixedDatumRecords, set_fixedDatumRecords) + + + def add_fixedDatumRecords(self, value : FixedDatum): + self._fixedDatumRecords.append(value) + + + """ + /// Name : fixedDatumRecords + /// UID : + /// Type : FixedDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Fixed datum records + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_variableDatumRecords(self): + return self._variableDatumRecords + def set_variableDatumRecords(self, value): + self._variableDatumRecords = value + variableDatumRecords = property(get_variableDatumRecords, set_variableDatumRecords) + + + def add_variableDatumRecords(self, value : VariableDatum): + self._variableDatumRecords.append(value) + + + """ + /// Name : variableDatumRecords + /// UID : + /// Type : VariableDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Variable datum records + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RequiredReliabilityService : " + self.requiredReliabilityService.get_description + "(" + (str(int(self.requiredReliabilityService))) + ")" + "\n" + outputString += "Pad1 : " + str(self.pad1) + "\n" + outputString += "Pad2 : " + str(self.pad2) + "\n" + outputString += "RequestID : " + str(self.requestID) + "\n" + outputString += "TimeInterval : " + str(self.timeInterval) + "\n" + outputString += "NumberOfFixedDatumRecords : " + str(len(self._fixedDatumRecords)) + "\n" + outputString += "NumberOfVariableDatumRecords : " + str(len(self._variableDatumRecords)) + "\n" + outputString += "FixedDatumRecords : " + "\n" + for idx in range(0, len(self._fixedDatumRecords)): + outputString += self._fixedDatumRecords[idx].to_string() + + outputString += "VariableDatumRecords : " + "\n" + for idx in range(0, len(self._variableDatumRecords)): + outputString += self._variableDatumRecords[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( DataQueryRPdu, self ).serialize(outputStream) + self.serialize_enum(self.requiredReliabilityService,outputStream) + outputStream.write_byte(int(self.pad1)) + outputStream.write_short(int(self.pad2)) + outputStream.write_int(int(self.requestID)) + outputStream.write_int(int(self.timeInterval)) + outputStream.write_int( len(self._fixedDatumRecords)) + outputStream.write_int( len(self._variableDatumRecords)) + for anObj in self._fixedDatumRecords: + anObj.serialize(outputStream) + + for anObj in self._variableDatumRecords: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( DataQueryRPdu, self).parse(inputStream) + self.requiredReliabilityService = RequiredReliabilityService.get_enum(self.parse_enum(self.requiredReliabilityService,inputStream)) + self.pad1 = inputStream.read_byte() + self.pad2 = inputStream.read_short() + self.requestID = inputStream.read_int() + self.timeInterval = inputStream.read_int() + self.numberOfFixedDatumRecords = inputStream.read_int() + self.numberOfVariableDatumRecords = inputStream.read_int() + for idx in range(0, self.numberOfFixedDatumRecords): + element = FixedDatum() + element.parse(inputStream) + self._fixedDatumRecords.append(element) + + for idx in range(0, self.numberOfVariableDatumRecords): + element = VariableDatum() + element.parse(inputStream) + self._variableDatumRecords.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 9 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/data_reliable_pdu.py b/dis/data_reliable_pdu.py new file mode 100644 index 0000000..33feec6 --- /dev/null +++ b/dis/data_reliable_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class DataReliablePdu( object ): + """Alias, more descriptive name for DataRPdu.""" + + def __init__(self): + """ Initializer for DataReliablePdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/data_rpdu.py b/dis/data_rpdu.py new file mode 100644 index 0000000..13ffba3 --- /dev/null +++ b/dis/data_rpdu.py @@ -0,0 +1,220 @@ +from enum import Enum + +from .variable_datum import VariableDatum +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .siso_ref_010.enums.required_reliability_service import RequiredReliabilityService +from .fixed_datum import FixedDatum +from .simulation_management_with_reliability_family_pdu import SimulationManagementWithReliabilityFamilyPdu + +class DataRPdu( SimulationManagementWithReliabilityFamilyPdu ): + """5.12.4.11 Serves the same function as the Data PDU but with the addition of reliability service levels and is used in response to a Data Query-R PDU, a Data-R PDU, or a Set Data-R PDU.""" + + def __init__(self): + """ Initializer for DataRPdu""" + super().__init__() + """ Request ID provides a unique identifier""" + self.requestID = 0 + # /** level of reliability service used for this transaction uid 74 */ + self.requiredReliabilityService = RequiredReliabilityService.default + + """ padding""" + self.pad1 = 0 + """ padding""" + self.pad2 = 0 + """ Fixed datum record count""" + self.numberOfFixedDatumRecords = 0 + """ variable datum record count""" + self.numberOfVariableDatumRecords = 0 + """ Fixed datum records""" + self._fixedDatumRecords = [] + """ Variable datum records""" + self._variableDatumRecords = [] + self.pduType = DisPduType.data_reliable + + + def get_numberOfFixedDatumRecords(self): + return len(self._fixedDatumRecords) + def set_numberOfFixedDatumRecords(self, value): + numberOfFixedDatumRecords = value + + + def get_numberOfVariableDatumRecords(self): + return len(self._variableDatumRecords) + def set_numberOfVariableDatumRecords(self, value): + numberOfVariableDatumRecords = value + + + def get_fixedDatumRecords(self): + return self._fixedDatumRecords + def set_fixedDatumRecords(self, value): + self._fixedDatumRecords = value + fixedDatumRecords = property(get_fixedDatumRecords, set_fixedDatumRecords) + + + def add_fixedDatumRecords(self, value : FixedDatum): + self._fixedDatumRecords.append(value) + + + """ + /// Name : fixedDatumRecords + /// UID : + /// Type : FixedDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Fixed datum records + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_variableDatumRecords(self): + return self._variableDatumRecords + def set_variableDatumRecords(self, value): + self._variableDatumRecords = value + variableDatumRecords = property(get_variableDatumRecords, set_variableDatumRecords) + + + def add_variableDatumRecords(self, value : VariableDatum): + self._variableDatumRecords.append(value) + + + """ + /// Name : variableDatumRecords + /// UID : + /// Type : VariableDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Variable datum records + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RequestID : " + str(self.requestID) + "\n" + outputString += "RequiredReliabilityService : " + self.requiredReliabilityService.get_description + "(" + (str(int(self.requiredReliabilityService))) + ")" + "\n" + outputString += "Pad1 : " + str(self.pad1) + "\n" + outputString += "Pad2 : " + str(self.pad2) + "\n" + outputString += "NumberOfFixedDatumRecords : " + str(len(self._fixedDatumRecords)) + "\n" + outputString += "NumberOfVariableDatumRecords : " + str(len(self._variableDatumRecords)) + "\n" + outputString += "FixedDatumRecords : " + "\n" + for idx in range(0, len(self._fixedDatumRecords)): + outputString += self._fixedDatumRecords[idx].to_string() + + outputString += "VariableDatumRecords : " + "\n" + for idx in range(0, len(self._variableDatumRecords)): + outputString += self._variableDatumRecords[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( DataRPdu, self ).serialize(outputStream) + outputStream.write_int(int(self.requestID)) + self.serialize_enum(self.requiredReliabilityService,outputStream) + outputStream.write_byte(int(self.pad1)) + outputStream.write_short(int(self.pad2)) + outputStream.write_int( len(self._fixedDatumRecords)) + outputStream.write_int( len(self._variableDatumRecords)) + for anObj in self._fixedDatumRecords: + anObj.serialize(outputStream) + + for anObj in self._variableDatumRecords: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( DataRPdu, self).parse(inputStream) + self.requestID = inputStream.read_int() + self.requiredReliabilityService = RequiredReliabilityService.get_enum(self.parse_enum(self.requiredReliabilityService,inputStream)) + self.pad1 = inputStream.read_byte() + self.pad2 = inputStream.read_short() + self.numberOfFixedDatumRecords = inputStream.read_int() + self.numberOfVariableDatumRecords = inputStream.read_int() + for idx in range(0, self.numberOfFixedDatumRecords): + element = FixedDatum() + element.parse(inputStream) + self._fixedDatumRecords.append(element) + + for idx in range(0, self.numberOfVariableDatumRecords): + element = VariableDatum() + element.parse(inputStream) + self._variableDatumRecords.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 8 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/datum_specification.py b/dis/datum_specification.py new file mode 100644 index 0000000..a448af2 --- /dev/null +++ b/dis/datum_specification.py @@ -0,0 +1,191 @@ +from enum import Enum + +from .variable_datum import VariableDatum +from .fixed_datum import FixedDatum + +class DatumSpecification( object ): + """List of fixed and variable datum records. Section 6.2.18 """ + + def __init__(self): + """ Initializer for DatumSpecification""" + """ Number of fixed datums""" + self.numberOfFixedDatums = 0 + """ Number of variable datums""" + self.numberOfVariableDatums = 0 + """ variable length list fixed datums""" + self._fixedDatumIDList = [] + """ variable length list of variable datums""" + self._variableDatumIDList = [] + + + def get_numberOfFixedDatums(self): + return len(self._fixedDatumIDList) + def set_numberOfFixedDatums(self, value): + numberOfFixedDatums = value + + + def get_numberOfVariableDatums(self): + return len(self._variableDatumIDList) + def set_numberOfVariableDatums(self, value): + numberOfVariableDatums = value + + + def get_fixedDatumIDList(self): + return self._fixedDatumIDList + def set_fixedDatumIDList(self, value): + self._fixedDatumIDList = value + fixedDatumIDList = property(get_fixedDatumIDList, set_fixedDatumIDList) + + + def add_fixedDatumIDList(self, value : FixedDatum): + self._fixedDatumIDList.append(value) + + + """ + /// Name : fixedDatumIDList + /// UID : + /// Type : FixedDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list fixed datums + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_variableDatumIDList(self): + return self._variableDatumIDList + def set_variableDatumIDList(self, value): + self._variableDatumIDList = value + variableDatumIDList = property(get_variableDatumIDList, set_variableDatumIDList) + + + def add_variableDatumIDList(self, value : VariableDatum): + self._variableDatumIDList.append(value) + + + """ + /// Name : variableDatumIDList + /// UID : + /// Type : VariableDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of variable datums + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += "NumberOfFixedDatums : " + str(len(self._fixedDatumIDList)) + "\n" + outputString += "NumberOfVariableDatums : " + str(len(self._variableDatumIDList)) + "\n" + outputString += "FixedDatumIDList : " + "\n" + for idx in range(0, len(self._fixedDatumIDList)): + outputString += self._fixedDatumIDList[idx].to_string() + + outputString += "VariableDatumIDList : " + "\n" + for idx in range(0, len(self._variableDatumIDList)): + outputString += self._variableDatumIDList[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int( len(self._fixedDatumIDList)) + outputStream.write_int( len(self._variableDatumIDList)) + for anObj in self._fixedDatumIDList: + anObj.serialize(outputStream) + + for anObj in self._variableDatumIDList: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.numberOfFixedDatums = inputStream.read_int() + self.numberOfVariableDatums = inputStream.read_int() + for idx in range(0, self.numberOfFixedDatums): + element = FixedDatum() + element.parse(inputStream) + self._fixedDatumIDList.append(element) + + for idx in range(0, self.numberOfVariableDatums): + element = VariableDatum() + element.parse(inputStream) + self._variableDatumIDList.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/dead_reckoning_parameters.py b/dis/dead_reckoning_parameters.py new file mode 100644 index 0000000..a13950d --- /dev/null +++ b/dis/dead_reckoning_parameters.py @@ -0,0 +1,111 @@ +from enum import Enum + +from .siso_ref_010.enums.dead_reckoning_algorithm import DeadReckoningAlgorithm +from .vector3float import Vector3Float + +class DeadReckoningParameters( object ): + """Not specified in the standard. This is used by the ESPDU""" + + def __init__(self): + """ Initializer for DeadReckoningParameters""" + # /** Algorithm to use in computing dead reckoning. See EBV doc. uid 44 */ + self.deadReckoningAlgorithm = DeadReckoningAlgorithm.default + + """ Dead reckoning parameters. Contents depends on algorithm.""" + self.parameters = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + """ Linear acceleration of the entity""" + self.entityLinearAcceleration = Vector3Float() + """ Angular velocity of the entity""" + self.entityAngularVelocity = Vector3Float() + + def to_string(self) ->str: + outputString = "" + outputString += "DeadReckoningAlgorithm : " + self.deadReckoningAlgorithm.get_description + "(" + (str(int(self.deadReckoningAlgorithm))) + ")" + "\n" + outputString += "Parameters : " + "\n" + for idx in range(0, len(self.parameters)): + outputString += str(self.parameters[idx]) + + outputString += "EntityLinearAcceleration :" + "\n" + self.entityLinearAcceleration.to_string() + "\n" + outputString += "EntityAngularVelocity :" + "\n" + self.entityAngularVelocity.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.deadReckoningAlgorithm,outputStream) + for idx in range(0, 15): + outputStream.write_unsigned_byte( self.parameters[ idx ] ); + + self.entityLinearAcceleration.serialize(outputStream) + self.entityAngularVelocity.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.deadReckoningAlgorithm = DeadReckoningAlgorithm.get_enum(self.parse_enum(self.deadReckoningAlgorithm,inputStream)) + self.parameters = [0]*15 + for idx in range(0, 15): + val = inputStream.read_unsigned_byte() + self.parameters[ idx ] = val + + self.entityLinearAcceleration.parse(inputStream) + self.entityAngularVelocity.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/designator_pdu.py b/dis/designator_pdu.py new file mode 100644 index 0000000..32a931a --- /dev/null +++ b/dis/designator_pdu.py @@ -0,0 +1,155 @@ +from enum import Enum + +from .siso_ref_010.enums.designator_designator_code import DesignatorDesignatorCode +from .siso_ref_010.enums.designator_system_name import DesignatorSystemName +from .siso_ref_010.enums.dead_reckoning_algorithm import DeadReckoningAlgorithm +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .vector3float import Vector3Float +from .vector3double import Vector3Double +from .entity_id import EntityID +from .distributed_emissions_regeneration_family_pdu import DistributedEmissionsRegenerationFamilyPdu + +class DesignatorPdu( DistributedEmissionsRegenerationFamilyPdu ): + """7.6.3 Handles designating operations. See 5.3.7.2.""" + + def __init__(self): + """ Initializer for DesignatorPdu""" + super().__init__() + """ ID of the entity designating""" + self.designatingEntityID = EntityID() + # /** This field shall specify a unique emitter database number assigned to differentiate between otherwise similar or identical emitter beams within an emitter system. uid 80 */ + self.codeName = DesignatorSystemName.default + + """ ID of the entity being designated""" + self.designatedEntityID = EntityID() + # /** This field shall identify the designator code being used by the designating entity uid 81 */ + self.designatorCode = DesignatorDesignatorCode.default + + """ This field shall identify the designator output power in watts""" + self.designatorPower = 0.0 + """ This field shall identify the designator wavelength in units of microns""" + self.designatorWavelength = 0.0 + """ designtor spot wrt the designated entity""" + self.designatorSpotWrtDesignated = Vector3Float() + """ designtor spot wrt the designated entity""" + self.designatorSpotLocation = Vector3Double() + # /** Dead reckoning algorithm uid 44 */ + self.deadReckoningAlgorithm = DeadReckoningAlgorithm.default + + """ padding""" + self.padding1 = 0 + """ padding""" + self.padding2 = 0 + """ linear accelleration of entity""" + self.entityLinearAcceleration = Vector3Float() + self.pduType = DisPduType.designator + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "DesignatingEntityID :" + "\n" + self.designatingEntityID.to_string() + "\n" + outputString += "DesignatorSystemName : " + self.codeName.get_description + "(" + (str(int(self.codeName))) + ")" + "\n" + outputString += "DesignatedEntityID :" + "\n" + self.designatedEntityID.to_string() + "\n" + outputString += "DesignatorDesignatorCode : " + self.designatorCode.get_description + "(" + (str(int(self.designatorCode))) + ")" + "\n" + outputString += "DesignatorPower : " + str(self.designatorPower) + "\n" + outputString += "DesignatorWavelength : " + str(self.designatorWavelength) + "\n" + outputString += "DesignatorSpotWrtDesignated :" + "\n" + self.designatorSpotWrtDesignated.to_string() + "\n" + outputString += "DesignatorSpotLocation :" + "\n" + self.designatorSpotLocation.to_string() + "\n" + outputString += "DeadReckoningAlgorithm : " + self.deadReckoningAlgorithm.get_description + "(" + (str(int(self.deadReckoningAlgorithm))) + ")" + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + outputString += "EntityLinearAcceleration :" + "\n" + self.entityLinearAcceleration.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( DesignatorPdu, self ).serialize(outputStream) + self.designatingEntityID.serialize(outputStream) + self.serialize_enum(self.codeName,outputStream) + self.designatedEntityID.serialize(outputStream) + self.serialize_enum(self.designatorCode,outputStream) + outputStream.write_float(int(self.designatorPower)) + outputStream.write_float(int(self.designatorWavelength)) + self.designatorSpotWrtDesignated.serialize(outputStream) + self.designatorSpotLocation.serialize(outputStream) + self.serialize_enum(self.deadReckoningAlgorithm,outputStream) + outputStream.write_byte(int(self.padding1)) + outputStream.write_short(int(self.padding2)) + self.entityLinearAcceleration.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( DesignatorPdu, self).parse(inputStream) + self.designatingEntityID.parse(inputStream) + self.codeName = DesignatorSystemName.get_enum(self.parse_enum(self.codeName,inputStream)) + self.designatedEntityID.parse(inputStream) + self.designatorCode = DesignatorDesignatorCode.get_enum(self.parse_enum(self.designatorCode,inputStream)) + self.designatorPower = inputStream.read_float() + self.designatorWavelength = inputStream.read_float() + self.designatorSpotWrtDesignated.parse(inputStream) + self.designatorSpotLocation.parse(inputStream) + self.deadReckoningAlgorithm = DeadReckoningAlgorithm.get_enum(self.parse_enum(self.deadReckoningAlgorithm,inputStream)) + self.padding1 = inputStream.read_byte() + self.padding2 = inputStream.read_short() + self.entityLinearAcceleration.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 12 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/detonation_pdu.py b/dis/detonation_pdu.py new file mode 100644 index 0000000..a6dd0bc --- /dev/null +++ b/dis/detonation_pdu.py @@ -0,0 +1,199 @@ +from enum import Enum + +from .siso_ref_010.enums.detonation_result import DetonationResult +from .munition_descriptor import MunitionDescriptor +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .vector3float import Vector3Float +from .warfare_family_pdu import WarfareFamilyPdu +from .vector3double import Vector3Double +from .variable_parameter import VariableParameter +from .entity_id import EntityID +from .event_identifier import EventIdentifier + +class DetonationPdu( WarfareFamilyPdu ): + """7.3.3 Used to communicate the detonation or impact of munitions, as well as non-munition explosions, the burst or initial bloom of chaff, and the ignition of a flare.""" + + def __init__(self): + """ Initializer for DetonationPdu""" + super().__init__() + """ ID of the entity that shot""" + self.sourceEntityID = EntityID() + """ ID of the entity that is being shot at""" + self.targetEntityID = EntityID() + """ ID of the expendable entity, Section 7.3.3 """ + self.explodingEntityID = EntityID() + """ ID of event, Section 7.3.3""" + self.eventID = EventIdentifier() + """ velocity of the munition immediately before detonation/impact, Section 7.3.3 """ + self.velocity = Vector3Float() + """ location of the munition detonation, the expendable detonation, Section 7.3.3 """ + self.locationInWorldCoordinates = Vector3Double() + """ Describes the detonation represented, Section 7.3.3 """ + self.descriptor = MunitionDescriptor() + """ Velocity of the ammunition, Section 7.3.3 """ + self.locationOfEntityCoordinates = Vector3Float() + # /** result of the detonation, Section 7.3.3 uid 62 */ + self.detonationResult = DetonationResult.default + + """ How many articulation parameters we have, Section 7.3.3 """ + self.numberOfVariableParameters = 0 + """ padding""" + self.pad = 0 + """ specify the parameter values for each Variable Parameter record, Section 7.3.3 """ + self._variableParameters = [] + self.pduType = DisPduType.detonation + + + def get_numberOfVariableParameters(self): + return len(self._variableParameters) + def set_numberOfVariableParameters(self, value): + numberOfVariableParameters = value + + + def get_variableParameters(self): + return self._variableParameters + def set_variableParameters(self, value): + self._variableParameters = value + variableParameters = property(get_variableParameters, set_variableParameters) + + + def add_variableParameters(self, value : VariableParameter): + self._variableParameters.append(value) + + + """ + /// Name : variableParameters + /// UID : + /// Type : VariableParameter + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : specify the parameter values for each Variable Parameter record, Section 7.3.3 + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "SourceEntityID :" + "\n" + self.sourceEntityID.to_string() + "\n" + outputString += "TargetEntityID :" + "\n" + self.targetEntityID.to_string() + "\n" + outputString += "ExplodingEntityID :" + "\n" + self.explodingEntityID.to_string() + "\n" + outputString += "EventID :" + "\n" + self.eventID.to_string() + "\n" + outputString += "Velocity :" + "\n" + self.velocity.to_string() + "\n" + outputString += "LocationInWorldCoordinates :" + "\n" + self.locationInWorldCoordinates.to_string() + "\n" + outputString += "Descriptor :" + "\n" + self.descriptor.to_string() + "\n" + outputString += "LocationOfEntityCoordinates :" + "\n" + self.locationOfEntityCoordinates.to_string() + "\n" + outputString += "DetonationResult : " + self.detonationResult.get_description + "(" + (str(int(self.detonationResult))) + ")" + "\n" + outputString += "NumberOfVariableParameters : " + str(len(self._variableParameters)) + "\n" + outputString += "Pad : " + str(self.pad) + "\n" + outputString += "VariableParameters : " + "\n" + for idx in range(0, len(self._variableParameters)): + outputString += self._variableParameters[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( DetonationPdu, self ).serialize(outputStream) + self.sourceEntityID.serialize(outputStream) + self.targetEntityID.serialize(outputStream) + self.explodingEntityID.serialize(outputStream) + self.eventID.serialize(outputStream) + self.velocity.serialize(outputStream) + self.locationInWorldCoordinates.serialize(outputStream) + self.descriptor.serialize(outputStream) + self.locationOfEntityCoordinates.serialize(outputStream) + self.serialize_enum(self.detonationResult,outputStream) + outputStream.write_byte( len(self._variableParameters)) + outputStream.write_short(int(self.pad)) + for anObj in self._variableParameters: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( DetonationPdu, self).parse(inputStream) + self.sourceEntityID.parse(inputStream) + self.targetEntityID.parse(inputStream) + self.explodingEntityID.parse(inputStream) + self.eventID.parse(inputStream) + self.velocity.parse(inputStream) + self.locationInWorldCoordinates.parse(inputStream) + self.descriptor.parse(inputStream) + self.locationOfEntityCoordinates.parse(inputStream) + self.detonationResult = DetonationResult.get_enum(self.parse_enum(self.detonationResult,inputStream)) + self.numberOfVariableParameters = inputStream.read_byte() + self.pad = inputStream.read_short() + for idx in range(0, self.numberOfVariableParameters): + element = VariableParameter() + element.parse(inputStream) + self._variableParameters.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 12 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/directed_energy_area_aimpoint.py b/dis/directed_energy_area_aimpoint.py new file mode 100644 index 0000000..c6a4f3f --- /dev/null +++ b/dis/directed_energy_area_aimpoint.py @@ -0,0 +1,207 @@ +from enum import Enum + +from .beam_antenna_pattern import BeamAntennaPattern +from .directed_energy_target_energy_deposition import DirectedEnergyTargetEnergyDeposition + +class DirectedEnergyAreaAimpoint( object ): + """DE Precision Aimpoint Record. Section 6.2.20.2""" + + def __init__(self): + """ Initializer for DirectedEnergyAreaAimpoint""" + """ Type of Record enumeration""" + self.recordType = 4001 + """ Length of Record""" + self.recordLength = 0 + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + """ Number of beam antenna pattern records""" + self.beamAntennaPatternRecordCount = 0 + """ Number of DE target energy depositon records""" + self.directedEnergyTargetEnergyDepositionRecordCount = 0 + """ list of beam antenna records. See 6.2.9.2""" + self._beamAntennaParameterList = [] + """ list of DE target deposition records. See 6.2.21.4""" + self._directedEnergyTargetEnergyDepositionRecordList = [] + self.padding2 = [0] * 64 + + + def get_beamAntennaPatternRecordCount(self): + return len(self._beamAntennaParameterList) + def set_beamAntennaPatternRecordCount(self, value): + beamAntennaPatternRecordCount = value + + + def get_directedEnergyTargetEnergyDepositionRecordCount(self): + return len(self._directedEnergyTargetEnergyDepositionRecordList) + def set_directedEnergyTargetEnergyDepositionRecordCount(self, value): + directedEnergyTargetEnergyDepositionRecordCount = value + + + def get_beamAntennaParameterList(self): + return self._beamAntennaParameterList + def set_beamAntennaParameterList(self, value): + self._beamAntennaParameterList = value + beamAntennaParameterList = property(get_beamAntennaParameterList, set_beamAntennaParameterList) + + + def add_beamAntennaParameterList(self, value : BeamAntennaPattern): + self._beamAntennaParameterList.append(value) + + + """ + /// Name : beamAntennaParameterList + /// UID : + /// Type : BeamAntennaPattern + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : list of beam antenna records. See 6.2.9.2 + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_directedEnergyTargetEnergyDepositionRecordList(self): + return self._directedEnergyTargetEnergyDepositionRecordList + def set_directedEnergyTargetEnergyDepositionRecordList(self, value): + self._directedEnergyTargetEnergyDepositionRecordList = value + directedEnergyTargetEnergyDepositionRecordList = property(get_directedEnergyTargetEnergyDepositionRecordList, set_directedEnergyTargetEnergyDepositionRecordList) + + + def add_directedEnergyTargetEnergyDepositionRecordList(self, value : DirectedEnergyTargetEnergyDeposition): + self._directedEnergyTargetEnergyDepositionRecordList.append(value) + + + """ + /// Name : directedEnergyTargetEnergyDepositionRecordList + /// UID : + /// Type : DirectedEnergyTargetEnergyDeposition + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : list of DE target deposition records. See 6.2.21.4 + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += "RecordType : " + str(self.recordType) + "\n" + outputString += "RecordLength : " + str(self.recordLength) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "BeamAntennaPatternRecordCount : " + str(len(self._beamAntennaParameterList)) + "\n" + outputString += "DirectedEnergyTargetEnergyDepositionRecordCount : " + str(len(self._directedEnergyTargetEnergyDepositionRecordList)) + "\n" + outputString += "BeamAntennaParameterList : " + "\n" + for idx in range(0, len(self._beamAntennaParameterList)): + outputString += self._beamAntennaParameterList[idx].to_string() + + outputString += "DirectedEnergyTargetEnergyDepositionRecordList : " + "\n" + for idx in range(0, len(self._directedEnergyTargetEnergyDepositionRecordList)): + outputString += self._directedEnergyTargetEnergyDepositionRecordList[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int(int(self.recordType)) + outputStream.write_short(int(self.recordLength)) + outputStream.write_short(int(self.padding)) + outputStream.write_short( len(self._beamAntennaParameterList)) + outputStream.write_short( len(self._directedEnergyTargetEnergyDepositionRecordList)) + for anObj in self._beamAntennaParameterList: + anObj.serialize(outputStream) + + for anObj in self._directedEnergyTargetEnergyDepositionRecordList: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordType = inputStream.read_int() + self.recordLength = inputStream.read_short() + self.padding = inputStream.read_short() + self.beamAntennaPatternRecordCount = inputStream.read_short() + self.directedEnergyTargetEnergyDepositionRecordCount = inputStream.read_short() + for idx in range(0, self.beamAntennaPatternRecordCount): + element = BeamAntennaPattern() + element.parse(inputStream) + self._beamAntennaParameterList.append(element) + + for idx in range(0, self.directedEnergyTargetEnergyDepositionRecordCount): + element = DirectedEnergyTargetEnergyDeposition() + element.parse(inputStream) + self._directedEnergyTargetEnergyDepositionRecordList.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 8 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/directed_energy_damage.py b/dis/directed_energy_damage.py new file mode 100644 index 0000000..0c1e92d --- /dev/null +++ b/dis/directed_energy_damage.py @@ -0,0 +1,149 @@ +from enum import Enum + +from .siso_ref_010.enums.dedamage_description_component_damage_status import DEDamageDescriptionComponentDamageStatus +from .siso_ref_010.enums.dedamage_description_component_visual_smoke_color import DEDamageDescriptionComponentVisualSmokeColor +from .vector3float import Vector3Float +from .siso_ref_010.enums.dedamage_description_component_visual_damage_status import DEDamageDescriptionComponentVisualDamageStatus +from .event_identifier import EventIdentifier +from .siso_ref_010.enums.entity_damage_status_component_identification import EntityDamageStatusComponentIdentification + +class DirectedEnergyDamage( object ): + """Damage sustained by an entity due to directed energy. Location of the damage based on a relative x,y,z location from the center of the entity. Section 6.2.15.2""" + + def __init__(self): + """ Initializer for DirectedEnergyDamage""" + """ DE Record Type.""" + self.recordType = 4500 + """ DE Record Length (bytes)""" + self.recordLength = 40 + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + """ location of damage, relative to center of entity""" + self.damageLocation = Vector3Float() + """ Size of damaged area, in meters""" + self.damageDiameter = 0.0 + """ average temp of the damaged area, in degrees celsius. If firing entitty does not model this, use a value of -273.15""" + self.temperature = -273.15 + # /** enumeration uid 314 */ + self.componentIdentification = EntityDamageStatusComponentIdentification.default + + # /** enumeration uid 315 */ + self.componentDamageStatus = DEDamageDescriptionComponentDamageStatus.default + + # enumeration uid 317 + self.componentVisualDamageStatus = DEDamageDescriptionComponentVisualDamageStatus() + + # /** enumeration uid 316 */ + self.componentVisualSmokeColor = DEDamageDescriptionComponentVisualSmokeColor.default + + """ For any component damage resulting this field shall be set to the fire event ID from that PDU.""" + self.fireEventID = EventIdentifier() + """ padding""" + self.padding2 = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "RecordType : " + str(self.recordType) + "\n" + outputString += "RecordLength : " + str(self.recordLength) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "DamageLocation :" + "\n" + self.damageLocation.to_string() + "\n" + outputString += "DamageDiameter : " + str(self.damageDiameter) + "\n" + outputString += "Temperature : " + str(self.temperature) + "\n" + outputString += "EntityDamageStatusComponentIdentification : " + self.componentIdentification.get_description + "(" + (str(int(self.componentIdentification))) + ")" + "\n" + outputString += "DEDamageDescriptionComponentDamageStatus : " + self.componentDamageStatus.get_description + "(" + (str(int(self.componentDamageStatus))) + ")" + "\n" + outputString += "DEDamageDescriptionComponentVisualDamageStatus : " + str(self.componentVisualDamageStatus) + "\n" + outputString += "DEDamageDescriptionComponentVisualSmokeColor : " + self.componentVisualSmokeColor.get_description + "(" + (str(int(self.componentVisualSmokeColor))) + ")" + "\n" + outputString += "FireEventID :" + "\n" + self.fireEventID.to_string() + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int(int(self.recordType)) + outputStream.write_short(int(self.recordLength)) + outputStream.write_short(int(self.padding)) + self.damageLocation.serialize(outputStream) + outputStream.write_float(int(self.damageDiameter)) + outputStream.write_float(int(self.temperature)) + self.serialize_enum(self.componentIdentification,outputStream) + self.serialize_enum(self.componentDamageStatus,outputStream) + outputStream.write_unsigned_int(int(self.componentVisualDamageStatus.asbyte)) + self.serialize_enum(self.componentVisualSmokeColor,outputStream) + self.fireEventID.serialize(outputStream) + outputStream.write_short(int(self.padding2)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordType = inputStream.read_int() + self.recordLength = inputStream.read_short() + self.padding = inputStream.read_short() + self.damageLocation.parse(inputStream) + self.damageDiameter = inputStream.read_float() + self.temperature = inputStream.read_float() + self.componentIdentification = EntityDamageStatusComponentIdentification.get_enum(self.parse_enum(self.componentIdentification,inputStream)) + self.componentDamageStatus = DEDamageDescriptionComponentDamageStatus.get_enum(self.parse_enum(self.componentDamageStatus,inputStream)) + self.componentVisualDamageStatus.asbyte = inputStream.read_unsigned_int() + self.componentVisualSmokeColor = DEDamageDescriptionComponentVisualSmokeColor.get_enum(self.parse_enum(self.componentVisualSmokeColor,inputStream)) + self.fireEventID.parse(inputStream) + self.padding2 = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 12 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/directed_energy_fire_pdu.py b/dis/directed_energy_fire_pdu.py new file mode 100644 index 0000000..72cea26 --- /dev/null +++ b/dis/directed_energy_fire_pdu.py @@ -0,0 +1,226 @@ +from enum import Enum + +from .siso_ref_010.enums.defire_pulse_shape import DEFirePulseShape +from .entity_type import EntityType +from .clock_time import ClockTime +from .siso_ref_010.enums.defire_flags import DEFireFlags +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .vector3float import Vector3Float +from .warfare_family_pdu import WarfareFamilyPdu +from .entity_id import EntityID +from .event_identifier import EventIdentifier +from .standard_variable_specification import StandardVariableSpecification + +class DirectedEnergyFirePdu( WarfareFamilyPdu ): + """7.3.4 Used to communicate the firing of a directed energy weapon.""" + + def __init__(self): + """ Initializer for DirectedEnergyFirePdu""" + super().__init__() + """ ID of the entity that shot""" + self.firingEntityID = EntityID() + # eventID is an undescribed parameter... + self.eventID = EventIdentifier() + """ Field shall identify the munition type enumeration for the DE weapon beam, Section 7.3.4 """ + self.munitionType = EntityType() + """ Field shall indicate the simulation time at start of the shot, Section 7.3.4 """ + self.shotStartTime = ClockTime() + """ Field shall indicate the current cumulative duration of the shot, Section 7.3.4 """ + self.commulativeShotTime = 0.0 + """ Field shall identify the location of the DE weapon aperture/emitter, Section 7.3.4 """ + self.apertureEmitterLocation = Vector3Float() + """ Field shall identify the beam diameter at the aperture/emitter, Section 7.3.4 """ + self.apertureDiameter = 0.0 + """ Field shall identify the emissions wavelength in units of meters, Section 7.3.4 """ + self.wavelength = 0.0 + self.pad1 = 0 + self.pulseRepititionFrequency = 0.0 + """ field shall identify the pulse width emissions in units of seconds, Section 7.3.4""" + self.pulseWidth = 0.0 + # 16bit Boolean field shall contain various flags to indicate status information needed to process a DE, Section 7.3.4 uid 313 + self.flags = DEFireFlags() + + # /** Field shall identify the pulse shape and shall be represented as an 8-bit enumeration, Section 7.3.4 uid 312 */ + self.pulseShape = DEFirePulseShape.default + + self.pad2 = 0 + self.pad3 = 0 + self.pad4 = 0 + """ Field shall specify the number of DE records, Section 7.3.4 """ + self.numberOfDERecords = 0 + """ Fields shall contain one or more DE records, records shall conform to the variable record format (Section6.2.82), Section 7.3.4""" + self._dERecords = [] + self.pduType = DisPduType.directed_energy_fire + + + def get_numberOfDERecords(self): + return len(self._dERecords) + def set_numberOfDERecords(self, value): + numberOfDERecords = value + + + def get_dERecords(self): + return self._dERecords + def set_dERecords(self, value): + self._dERecords = value + dERecords = property(get_dERecords, set_dERecords) + + + def add_dERecords(self, value : StandardVariableSpecification): + self._dERecords.append(value) + + + """ + /// Name : dERecords + /// UID : + /// Type : StandardVariableSpecification + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Fields shall contain one or more DE records, records shall conform to the variable record format (Section6.2.82), Section 7.3.4 + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "FiringEntityID :" + "\n" + self.firingEntityID.to_string() + "\n" + outputString += "EventID :" + "\n" + self.eventID.to_string() + "\n" + outputString += "MunitionType :" + "\n" + self.munitionType.to_string() + "\n" + outputString += "ShotStartTime :" + "\n" + self.shotStartTime.to_string() + "\n" + outputString += "CommulativeShotTime : " + str(self.commulativeShotTime) + "\n" + outputString += "ApertureEmitterLocation :" + "\n" + self.apertureEmitterLocation.to_string() + "\n" + outputString += "ApertureDiameter : " + str(self.apertureDiameter) + "\n" + outputString += "Wavelength : " + str(self.wavelength) + "\n" + outputString += "Pad1 : " + str(self.pad1) + "\n" + outputString += "PulseRepititionFrequency : " + str(self.pulseRepititionFrequency) + "\n" + outputString += "PulseWidth : " + str(self.pulseWidth) + "\n" + outputString += "DEFireFlags : " + str(self.flags) + "\n" + outputString += "DEFirePulseShape : " + self.pulseShape.get_description + "(" + (str(int(self.pulseShape))) + ")" + "\n" + outputString += "Pad2 : " + str(self.pad2) + "\n" + outputString += "Pad3 : " + str(self.pad3) + "\n" + outputString += "Pad4 : " + str(self.pad4) + "\n" + outputString += "NumberOfDERecords : " + str(len(self._dERecords)) + "\n" + outputString += "DERecords : " + "\n" + for idx in range(0, len(self._dERecords)): + outputString += self._dERecords[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( DirectedEnergyFirePdu, self ).serialize(outputStream) + self.firingEntityID.serialize(outputStream) + self.eventID.serialize(outputStream) + self.munitionType.serialize(outputStream) + self.shotStartTime.serialize(outputStream) + outputStream.write_float(int(self.commulativeShotTime)) + self.apertureEmitterLocation.serialize(outputStream) + outputStream.write_float(int(self.apertureDiameter)) + outputStream.write_float(int(self.wavelength)) + outputStream.write_int(int(self.pad1)) + outputStream.write_float(int(self.pulseRepititionFrequency)) + outputStream.write_float(int(self.pulseWidth)) + outputStream.write_unsigned_int(int(self.flags.asbyte)) + self.serialize_enum(self.pulseShape,outputStream) + outputStream.write_byte(int(self.pad2)) + outputStream.write_int(int(self.pad3)) + outputStream.write_short(int(self.pad4)) + outputStream.write_short( len(self._dERecords)) + for anObj in self._dERecords: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( DirectedEnergyFirePdu, self).parse(inputStream) + self.firingEntityID.parse(inputStream) + self.eventID.parse(inputStream) + self.munitionType.parse(inputStream) + self.shotStartTime.parse(inputStream) + self.commulativeShotTime = inputStream.read_float() + self.apertureEmitterLocation.parse(inputStream) + self.apertureDiameter = inputStream.read_float() + self.wavelength = inputStream.read_float() + self.pad1 = inputStream.read_int() + self.pulseRepititionFrequency = inputStream.read_float() + self.pulseWidth = inputStream.read_float() + self.flags.asbyte = inputStream.read_unsigned_int() + self.pulseShape = DEFirePulseShape.get_enum(self.parse_enum(self.pulseShape,inputStream)) + self.pad2 = inputStream.read_byte() + self.pad3 = inputStream.read_int() + self.pad4 = inputStream.read_short() + self.numberOfDERecords = inputStream.read_short() + for idx in range(0, self.numberOfDERecords): + element = StandardVariableSpecification() + element.parse(inputStream) + self._dERecords.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 18 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/directed_energy_precision_aimpoint.py b/dis/directed_energy_precision_aimpoint.py new file mode 100644 index 0000000..32e336d --- /dev/null +++ b/dis/directed_energy_precision_aimpoint.py @@ -0,0 +1,159 @@ +from enum import Enum + +from .vector3float import Vector3Float +from .vector3double import Vector3Double +from .siso_ref_010.enums.deprecision_aimpoint_beam_spot_type import DEPrecisionAimpointBeamSpotType +from .entity_id import EntityID + +class DirectedEnergyPrecisionAimpoint( object ): + """DE Precision Aimpoint Record. Section 6.2.20.3""" + + def __init__(self): + """ Initializer for DirectedEnergyPrecisionAimpoint""" + """ Type of Record""" + self.recordType = 4000 + """ Length of Record""" + self.recordLength = 88 + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + """ Position of Target Spot in World Coordinates.""" + self.targetSpotLocation = Vector3Double() + """ Position (meters) of Target Spot relative to Entity Position.""" + self.targetSpotEntityLocation = Vector3Float() + """ Velocity (meters/sec) of Target Spot.""" + self.targetSpotVelocity = Vector3Float() + """ Acceleration (meters/sec/sec) of Target Spot.""" + self.targetSpotAcceleration = Vector3Float() + """ Unique ID of the target entity.""" + self.targetEntityID = EntityID() + """ Target Component ID ENUM, same as in DamageDescriptionRecord.""" + self.targetComponentID = 0 + # /** Spot Shape ENUM. uid 311 */ + self.beamSpotType = DEPrecisionAimpointBeamSpotType.default + + """ Beam Spot Cross Section Semi-Major Axis.""" + self.beamSpotCrossSectionSemiMajorAxis = 0 + """ Beam Spot Cross Section Semi-Major Axis.""" + self.beamSpotCrossSectionSemiMinorAxis = 0 + """ Beam Spot Cross Section Orientation Angle.""" + self.beamSpotCrossSectionOrientationAngle = 0 + """ Peak irradiance""" + self.peakIrradiance = 0 + """ padding""" + self.padding2 = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "RecordType : " + str(self.recordType) + "\n" + outputString += "RecordLength : " + str(self.recordLength) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "TargetSpotLocation :" + "\n" + self.targetSpotLocation.to_string() + "\n" + outputString += "TargetSpotEntityLocation :" + "\n" + self.targetSpotEntityLocation.to_string() + "\n" + outputString += "TargetSpotVelocity :" + "\n" + self.targetSpotVelocity.to_string() + "\n" + outputString += "TargetSpotAcceleration :" + "\n" + self.targetSpotAcceleration.to_string() + "\n" + outputString += "TargetEntityID :" + "\n" + self.targetEntityID.to_string() + "\n" + outputString += "TargetComponentID : " + str(self.targetComponentID) + "\n" + outputString += "DEPrecisionAimpointBeamSpotType : " + self.beamSpotType.get_description + "(" + (str(int(self.beamSpotType))) + ")" + "\n" + outputString += "BeamSpotCrossSectionSemiMajorAxis : " + str(self.beamSpotCrossSectionSemiMajorAxis) + "\n" + outputString += "BeamSpotCrossSectionSemiMinorAxis : " + str(self.beamSpotCrossSectionSemiMinorAxis) + "\n" + outputString += "BeamSpotCrossSectionOrientationAngle : " + str(self.beamSpotCrossSectionOrientationAngle) + "\n" + outputString += "PeakIrradiance : " + str(self.peakIrradiance) + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int(int(self.recordType)) + outputStream.write_short(int(self.recordLength)) + outputStream.write_short(int(self.padding)) + self.targetSpotLocation.serialize(outputStream) + self.targetSpotEntityLocation.serialize(outputStream) + self.targetSpotVelocity.serialize(outputStream) + self.targetSpotAcceleration.serialize(outputStream) + self.targetEntityID.serialize(outputStream) + outputStream.write_byte(int(self.targetComponentID)) + self.serialize_enum(self.beamSpotType,outputStream) + outputStream.write_float(int(self.beamSpotCrossSectionSemiMajorAxis)) + outputStream.write_float(int(self.beamSpotCrossSectionSemiMinorAxis)) + outputStream.write_float(int(self.beamSpotCrossSectionOrientationAngle)) + outputStream.write_float(int(self.peakIrradiance)) + outputStream.write_int(int(self.padding2)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordType = inputStream.read_int() + self.recordLength = inputStream.read_short() + self.padding = inputStream.read_short() + self.targetSpotLocation.parse(inputStream) + self.targetSpotEntityLocation.parse(inputStream) + self.targetSpotVelocity.parse(inputStream) + self.targetSpotAcceleration.parse(inputStream) + self.targetEntityID.parse(inputStream) + self.targetComponentID = inputStream.read_byte() + self.beamSpotType = DEPrecisionAimpointBeamSpotType.get_enum(self.parse_enum(self.beamSpotType,inputStream)) + self.beamSpotCrossSectionSemiMajorAxis = inputStream.read_float() + self.beamSpotCrossSectionSemiMinorAxis = inputStream.read_float() + self.beamSpotCrossSectionOrientationAngle = inputStream.read_float() + self.peakIrradiance = inputStream.read_float() + self.padding2 = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 15 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/directed_energy_target_energy_deposition.py b/dis/directed_energy_target_energy_deposition.py new file mode 100644 index 0000000..0f6f80c --- /dev/null +++ b/dis/directed_energy_target_energy_deposition.py @@ -0,0 +1,95 @@ +from enum import Enum + +from .entity_id import EntityID + +class DirectedEnergyTargetEnergyDeposition( object ): + """DE energy depostion properties for a target entity. Section 6.2.20.4""" + + def __init__(self): + """ Initializer for DirectedEnergyTargetEnergyDeposition""" + """ Unique ID of the target entity.""" + self.targetEntityID = EntityID() + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + """ Peak irradiance""" + self.peakIrradiance = 0.0 + + def to_string(self) ->str: + outputString = "" + outputString += "TargetEntityID :" + "\n" + self.targetEntityID.to_string() + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "PeakIrradiance : " + str(self.peakIrradiance) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.targetEntityID.serialize(outputStream) + outputStream.write_short(int(self.padding)) + outputStream.write_float(int(self.peakIrradiance)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.targetEntityID.parse(inputStream) + self.padding = inputStream.read_short() + self.peakIrradiance = inputStream.read_float() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/distributed_emissions_regeneration_family_pdu.py b/dis/distributed_emissions_regeneration_family_pdu.py new file mode 100644 index 0000000..d5c5cc8 --- /dev/null +++ b/dis/distributed_emissions_regeneration_family_pdu.py @@ -0,0 +1,88 @@ +from enum import Enum + +from .pdu_base import PduBase +from .siso_ref_010.enums.disprotocol_family import DISProtocolFamily + +class DistributedEmissionsRegenerationFamilyPdu( PduBase ): + """Section 5.3.7. Electronic Emissions. Abstract superclass for distributed emissions PDU""" + + def __init__(self): + """ Initializer for DistributedEmissionsRegenerationFamilyPdu""" + super().__init__() + self.protocolFamily = DISProtocolFamily.distributed_emission_regeneration + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( DistributedEmissionsRegenerationFamilyPdu, self ).serialize(outputStream) + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( DistributedEmissionsRegenerationFamilyPdu, self).parse(inputStream) + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/domain.py b/dis/domain.py new file mode 100644 index 0000000..bc9196c --- /dev/null +++ b/dis/domain.py @@ -0,0 +1,84 @@ +from enum import Enum + + +class Domain( object ): + """A special class to contain and act as a super class for Domain enumerations.""" + + def __init__(self): + """ Initializer for Domain""" + """ domain field containing enumeration value. See SISO enumerations for PlatformDomain uid 8, MunitionDomain uid 14 and SupplyDomain uid 600.""" + self.value = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "Value : " + str(self.value) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_byte(int(self.value)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.value = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 1 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/eefundamental_parameter_data.py b/dis/eefundamental_parameter_data.py new file mode 100644 index 0000000..6b8895e --- /dev/null +++ b/dis/eefundamental_parameter_data.py @@ -0,0 +1,104 @@ +from enum import Enum + + +class EEFundamentalParameterData( object ): + """Contains electromagnetic emission regeneration parameters that are variable throught a scenario. Section 6.2.22.""" + + def __init__(self): + """ Initializer for EEFundamentalParameterData""" + """ center frequency of the emission in hertz.""" + self.frequency = 0.0 + """ Bandwidth of the frequencies corresponding to the fequency field.""" + self.frequencyRange = 0.0 + """ Effective radiated power for the emission in DdBm. For a radar noise jammer, indicates the peak of the transmitted power.""" + self.effectiveRadiatedPower = 0.0 + """ Average repetition frequency of the emission in hertz.""" + self.pulseRepetitionFrequency = 0.0 + """ Average pulse width of the emission in microseconds.""" + self.pulseWidth = 0.0 + + def to_string(self) ->str: + outputString = "" + outputString += "Frequency : " + str(self.frequency) + "\n" + outputString += "FrequencyRange : " + str(self.frequencyRange) + "\n" + outputString += "EffectiveRadiatedPower : " + str(self.effectiveRadiatedPower) + "\n" + outputString += "PulseRepetitionFrequency : " + str(self.pulseRepetitionFrequency) + "\n" + outputString += "PulseWidth : " + str(self.pulseWidth) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_float(int(self.frequency)) + outputStream.write_float(int(self.frequencyRange)) + outputStream.write_float(int(self.effectiveRadiatedPower)) + outputStream.write_float(int(self.pulseRepetitionFrequency)) + outputStream.write_float(int(self.pulseWidth)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.frequency = inputStream.read_float() + self.frequencyRange = inputStream.read_float() + self.effectiveRadiatedPower = inputStream.read_float() + self.pulseRepetitionFrequency = inputStream.read_float() + self.pulseWidth = inputStream.read_float() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 5 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/electromagnetic_emission_pdu.py b/dis/electromagnetic_emission_pdu.py new file mode 100644 index 0000000..4546cf5 --- /dev/null +++ b/dis/electromagnetic_emission_pdu.py @@ -0,0 +1,167 @@ +from enum import Enum + +from .electronic_emitter import ElectronicEmitter +from .siso_ref_010.enums.electromagnetic_emission_state_update_indicator import ElectromagneticEmissionStateUpdateIndicator +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .entity_id import EntityID +from .event_identifier import EventIdentifier +from .distributed_emissions_regeneration_family_pdu import DistributedEmissionsRegenerationFamilyPdu + +class ElectromagneticEmissionPdu( DistributedEmissionsRegenerationFamilyPdu ): + """7.6.2 Communicate active electromagnetic emissions, including radar and radar-related electronic warfare (e.g., jamming). Exceptions include IFF interrogations and replies, navigation aids, voice, beacon and data radio communications, directed energy weapons, and laser ranging and designation systems, which are handled by other PDUs. Section 5.3.7.1.""" + + def __init__(self): + """ Initializer for ElectromagneticEmissionPdu""" + super().__init__() + """ ID of the entity emitting""" + self.emittingEntityID = EntityID() + """ ID of event""" + self.eventID = EventIdentifier() + # /** This field shall be used to indicate if the data in the PDU represents a state update or just data that has changed since issuance of the last Electromagnetic Emission PDU [relative to the identified entity and emission system(s)]. uid 77 */ + self.stateUpdateIndicator = ElectromagneticEmissionStateUpdateIndicator.default + + """ This field shall specify the number of emission systems being described in the current PDU.""" + self.numberOfSystems = 0 + """ padding""" + self.paddingForEmissionsPdu = 0 + """ Electronic emmissions systems""" + self._systems = [] + self.pduType = DisPduType.electromagnetic_emission + self.paddingForEmissionsPdu = 0 + + + def get_numberOfSystems(self): + return len(self._systems) + def set_numberOfSystems(self, value): + numberOfSystems = value + + + def get_systems(self): + return self._systems + def set_systems(self, value): + self._systems = value + systems = property(get_systems, set_systems) + + + def add_systems(self, value : ElectronicEmitter): + self._systems.append(value) + + + """ + /// Name : systems + /// UID : + /// Type : ElectronicEmitter + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Electronic emmissions systems + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "EmittingEntityID :" + "\n" + self.emittingEntityID.to_string() + "\n" + outputString += "EventID :" + "\n" + self.eventID.to_string() + "\n" + outputString += "ElectromagneticEmissionStateUpdateIndicator : " + self.stateUpdateIndicator.get_description + "(" + (str(int(self.stateUpdateIndicator))) + ")" + "\n" + outputString += "NumberOfSystems : " + str(len(self._systems)) + "\n" + outputString += "PaddingForEmissionsPdu : " + str(self.paddingForEmissionsPdu) + "\n" + outputString += "Systems : " + "\n" + for idx in range(0, len(self._systems)): + outputString += self._systems[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( ElectromagneticEmissionPdu, self ).serialize(outputStream) + self.emittingEntityID.serialize(outputStream) + self.eventID.serialize(outputStream) + self.serialize_enum(self.stateUpdateIndicator,outputStream) + outputStream.write_byte( len(self._systems)) + outputStream.write_short(int(self.paddingForEmissionsPdu)) + for anObj in self._systems: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( ElectromagneticEmissionPdu, self).parse(inputStream) + self.emittingEntityID.parse(inputStream) + self.eventID.parse(inputStream) + self.stateUpdateIndicator = ElectromagneticEmissionStateUpdateIndicator.get_enum(self.parse_enum(self.stateUpdateIndicator,inputStream)) + self.numberOfSystems = inputStream.read_byte() + self.paddingForEmissionsPdu = inputStream.read_short() + for idx in range(0, self.numberOfSystems): + element = ElectronicEmitter() + element.parse(inputStream) + self._systems.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/electronic_emitter.py b/dis/electronic_emitter.py new file mode 100644 index 0000000..6bf92ac --- /dev/null +++ b/dis/electronic_emitter.py @@ -0,0 +1,157 @@ +from enum import Enum + +from .emitter_system import EmitterSystem +from .emitter_beam import EmitterBeam +from .vector3float import Vector3Float + +class ElectronicEmitter( object ): + """A device that is able to discharge detectable electromagnetic energy.""" + + def __init__(self): + """ Initializer for ElectronicEmitter""" + """ this field shall specify the length of this emitter system's data in 32-bit words.""" + self.systemDataLength = 0 + """ the number of beams being described in the current PDU for the emitter system being described. """ + self.numberOfBeams = 0 + """ padding""" + self.padding = 0 + """ information about a particular emitter system and shall be represented by an Emitter System record (see 6.2.23).""" + self.emitterSystem = EmitterSystem() + """ the location of the antenna beam source with respect to the emitting entity's coordinate system. This location shall be the origin of the emitter coordinate system that shall have the same orientation as the entity coordinate system. This field shall be represented by an Entity Coordinate Vector record see 6.2.95 """ + self.location = Vector3Float() + """ Electronic emission beams""" + self._beams = [] + + + def get_numberOfBeams(self): + return len(self._beams) + def set_numberOfBeams(self, value): + numberOfBeams = value + + + def get_beams(self): + return self._beams + def set_beams(self, value): + self._beams = value + beams = property(get_beams, set_beams) + + + def add_beams(self, value : EmitterBeam): + self._beams.append(value) + + + """ + /// Name : beams + /// UID : + /// Type : EmitterBeam + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Electronic emission beams + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += "SystemDataLength : " + str(self.systemDataLength) + "\n" + outputString += "NumberOfBeams : " + str(len(self._beams)) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "EmitterSystem :" + "\n" + self.emitterSystem.to_string() + "\n" + outputString += "Location :" + "\n" + self.location.to_string() + "\n" + outputString += "Beams : " + "\n" + for idx in range(0, len(self._beams)): + outputString += self._beams[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_byte(int(self.systemDataLength)) + outputStream.write_byte( len(self._beams)) + outputStream.write_short(int(self.padding)) + self.emitterSystem.serialize(outputStream) + self.location.serialize(outputStream) + for anObj in self._beams: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.systemDataLength = inputStream.read_byte() + self.numberOfBeams = inputStream.read_byte() + self.padding = inputStream.read_short() + self.emitterSystem.parse(inputStream) + self.location.parse(inputStream) + for idx in range(0, self.numberOfBeams): + element = EmitterBeam() + element.parse(inputStream) + self._beams.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/emitter_beam.py b/dis/emitter_beam.py new file mode 100644 index 0000000..436341e --- /dev/null +++ b/dis/emitter_beam.py @@ -0,0 +1,183 @@ +from enum import Enum + +from .beam_status import BeamStatus +from .eefundamental_parameter_data import EEFundamentalParameterData +from .track_jam_data import TrackJamData +from .beam_data import BeamData +from .siso_ref_010.enums.electromagnetic_emission_beam_function import ElectromagneticEmissionBeamFunction +from .jamming_technique import JammingTechnique +from .siso_ref_010.enums.high_density_track_jam import HighDensityTrackJam + +class EmitterBeam( object ): + """Emitter beams focused emissions from an electromagnetic or active acoustic transmitter. The beam is defined by the main lobe of the antenna pattern.""" + + def __init__(self): + """ Initializer for EmitterBeam""" + self.beamDataLength = 0 + self.beamNumber = 0 + self.beamParameterIndex = 0 + # fundamentalParameterData is an undescribed parameter... + self.fundamentalParameterData = EEFundamentalParameterData() + # beamData is an undescribed parameter... + self.beamData = BeamData() + # /** uid 78 */ + self.beamFunction = ElectromagneticEmissionBeamFunction.default + + self.numberOfTargets = 0 + # /** uid 79 */ + self.highDensityTrackJam = HighDensityTrackJam.default + + # beamStatus is an undescribed parameter... + self.beamStatus = BeamStatus() + # jammingTechnique is an undescribed parameter... + self.jammingTechnique = JammingTechnique() + self._trackJamData = [] + + + def get_numberOfTargets(self): + return len(self._trackJamData) + def set_numberOfTargets(self, value): + numberOfTargets = value + + + def get_trackJamData(self): + return self._trackJamData + def set_trackJamData(self, value): + self._trackJamData = value + trackJamData = property(get_trackJamData, set_trackJamData) + + + def add_trackJamData(self, value : TrackJamData): + self._trackJamData.append(value) + + + """ + /// Name : trackJamData + /// UID : + /// Type : TrackJamData + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : null + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += "BeamDataLength : " + str(self.beamDataLength) + "\n" + outputString += "BeamNumber : " + str(self.beamNumber) + "\n" + outputString += "BeamParameterIndex : " + str(self.beamParameterIndex) + "\n" + outputString += "FundamentalParameterData :" + "\n" + self.fundamentalParameterData.to_string() + "\n" + outputString += "BeamData :" + "\n" + self.beamData.to_string() + "\n" + outputString += "ElectromagneticEmissionBeamFunction : " + self.beamFunction.get_description + "(" + (str(int(self.beamFunction))) + ")" + "\n" + outputString += "NumberOfTargets : " + str(len(self._trackJamData)) + "\n" + outputString += "HighDensityTrackJam : " + self.highDensityTrackJam.get_description + "(" + (str(int(self.highDensityTrackJam))) + ")" + "\n" + outputString += "BeamStatus :" + "\n" + self.beamStatus.to_string() + "\n" + outputString += "JammingTechnique :" + "\n" + self.jammingTechnique.to_string() + "\n" + outputString += "TrackJamData : " + "\n" + for idx in range(0, len(self._trackJamData)): + outputString += self._trackJamData[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_byte(int(self.beamDataLength)) + outputStream.write_byte(int(self.beamNumber)) + outputStream.write_short(int(self.beamParameterIndex)) + self.fundamentalParameterData.serialize(outputStream) + self.beamData.serialize(outputStream) + self.serialize_enum(self.beamFunction,outputStream) + outputStream.write_byte( len(self._trackJamData)) + self.serialize_enum(self.highDensityTrackJam,outputStream) + self.beamStatus.serialize(outputStream) + self.jammingTechnique.serialize(outputStream) + for anObj in self._trackJamData: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.beamDataLength = inputStream.read_byte() + self.beamNumber = inputStream.read_byte() + self.beamParameterIndex = inputStream.read_short() + self.fundamentalParameterData.parse(inputStream) + self.beamData.parse(inputStream) + self.beamFunction = ElectromagneticEmissionBeamFunction.get_enum(self.parse_enum(self.beamFunction,inputStream)) + self.numberOfTargets = inputStream.read_byte() + self.highDensityTrackJam = HighDensityTrackJam.get_enum(self.parse_enum(self.highDensityTrackJam,inputStream)) + self.beamStatus.parse(inputStream) + self.jammingTechnique.parse(inputStream) + for idx in range(0, self.numberOfTargets): + element = TrackJamData() + element.parse(inputStream) + self._trackJamData.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 11 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/emitter_system.py b/dis/emitter_system.py new file mode 100644 index 0000000..2e51630 --- /dev/null +++ b/dis/emitter_system.py @@ -0,0 +1,98 @@ +from enum import Enum + +from .siso_ref_010.enums.emitter_name import EmitterName +from .siso_ref_010.enums.emitter_system_function import EmitterSystemFunction + +class EmitterSystem( object ): + """This field shall specify information about a particular emitter system. Section 6.2.23.""" + + def __init__(self): + """ Initializer for EmitterSystem""" + # /** Name of the emitter, 16-bit enumeration uid 75 */ + self.emitterName = EmitterName.default + + # /** function of the emitter, 8-bit enumeration uid 76 */ + self.emitterFunction = EmitterSystemFunction.default + + """ emitter ID, 8-bit enumeration""" + self.emitterIDNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "EmitterName : " + self.emitterName.get_description + "(" + (str(int(self.emitterName))) + ")" + "\n" + outputString += "EmitterSystemFunction : " + self.emitterFunction.get_description + "(" + (str(int(self.emitterFunction))) + ")" + "\n" + outputString += "EmitterIDNumber : " + str(self.emitterIDNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.emitterName,outputStream) + self.serialize_enum(self.emitterFunction,outputStream) + outputStream.write_byte(int(self.emitterIDNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.emitterName = EmitterName.get_enum(self.parse_enum(self.emitterName,inputStream)) + self.emitterFunction = EmitterSystemFunction.get_enum(self.parse_enum(self.emitterFunction,inputStream)) + self.emitterIDNumber = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/engine_fuel.py b/dis/engine_fuel.py new file mode 100644 index 0000000..f109555 --- /dev/null +++ b/dis/engine_fuel.py @@ -0,0 +1,110 @@ +from enum import Enum + +from .siso_ref_010.enums.fuel_measurement_units import FuelMeasurementUnits +from .siso_ref_010.enums.fuel_location import FuelLocation +from .siso_ref_010.enums.supply_fuel_type import SupplyFuelType + +class EngineFuel( object ): + """Information about an entity's engine fuel. Section 6.2.24.""" + + def __init__(self): + """ Initializer for EngineFuel""" + """ Fuel quantity, units specified by next field""" + self.fuelQuantity = 0 + # /** Units in which the fuel is measured uid 328 */ + self.fuelMeasurementUnits = FuelMeasurementUnits.default + + # /** Type of fuel uid 413 */ + self.fuelType = SupplyFuelType.default + + # /** Location of fuel as related to entity. See section 14 of EBV document uid 329 */ + self.fuelLocation = FuelLocation.default + + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "FuelQuantity : " + str(self.fuelQuantity) + "\n" + outputString += "FuelMeasurementUnits : " + self.fuelMeasurementUnits.get_description + "(" + (str(int(self.fuelMeasurementUnits))) + ")" + "\n" + outputString += "SupplyFuelType : " + self.fuelType.get_description + "(" + (str(int(self.fuelType))) + ")" + "\n" + outputString += "FuelLocation : " + self.fuelLocation.get_description + "(" + (str(int(self.fuelLocation))) + ")" + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int(int(self.fuelQuantity)) + self.serialize_enum(self.fuelMeasurementUnits,outputStream) + self.serialize_enum(self.fuelType,outputStream) + self.serialize_enum(self.fuelLocation,outputStream) + outputStream.write_byte(int(self.padding)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.fuelQuantity = inputStream.read_int() + self.fuelMeasurementUnits = FuelMeasurementUnits.get_enum(self.parse_enum(self.fuelMeasurementUnits,inputStream)) + self.fuelType = SupplyFuelType.get_enum(self.parse_enum(self.fuelType,inputStream)) + self.fuelLocation = FuelLocation.get_enum(self.parse_enum(self.fuelLocation,inputStream)) + self.padding = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 5 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/engine_fuel_reload.py b/dis/engine_fuel_reload.py new file mode 100644 index 0000000..224f5a5 --- /dev/null +++ b/dis/engine_fuel_reload.py @@ -0,0 +1,125 @@ +from enum import Enum + +from .siso_ref_010.enums.fuel_measurement_units import FuelMeasurementUnits +from .siso_ref_010.enums.fuel_location import FuelLocation +from .siso_ref_010.enums.supply_fuel_type import SupplyFuelType + +class EngineFuelReload( object ): + """For each type or location of engine fuell, this record specifies the type, location, fuel measurement units, and reload quantity and maximum quantity. Section 6.2.25.""" + + def __init__(self): + """ Initializer for EngineFuelReload""" + """ standard quantity of fuel loaded""" + self.standardQuantity = 0 + """ maximum quantity of fuel loaded""" + self.maximumQuantity = 0 + """ seconds normally required to to reload standard qty""" + self.standardQuantityReloadTime = 0 + """ seconds normally required to to reload maximum qty""" + self.maximumQuantityReloadTime = 0 + # /** Units of measure uid 328 */ + self.fuelMeasurmentUnits = FuelMeasurementUnits.default + + # /** uid 413 */ + self.fuelType = SupplyFuelType.default + + # /** fuel location as related to the entity uid 329 */ + self.fuelLocation = FuelLocation.default + + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "StandardQuantity : " + str(self.standardQuantity) + "\n" + outputString += "MaximumQuantity : " + str(self.maximumQuantity) + "\n" + outputString += "StandardQuantityReloadTime : " + str(self.standardQuantityReloadTime) + "\n" + outputString += "MaximumQuantityReloadTime : " + str(self.maximumQuantityReloadTime) + "\n" + outputString += "FuelMeasurementUnits : " + self.fuelMeasurmentUnits.get_description + "(" + (str(int(self.fuelMeasurmentUnits))) + ")" + "\n" + outputString += "SupplyFuelType : " + self.fuelType.get_description + "(" + (str(int(self.fuelType))) + ")" + "\n" + outputString += "FuelLocation : " + self.fuelLocation.get_description + "(" + (str(int(self.fuelLocation))) + ")" + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int(int(self.standardQuantity)) + outputStream.write_int(int(self.maximumQuantity)) + outputStream.write_int(int(self.standardQuantityReloadTime)) + outputStream.write_int(int(self.maximumQuantityReloadTime)) + self.serialize_enum(self.fuelMeasurmentUnits,outputStream) + self.serialize_enum(self.fuelType,outputStream) + self.serialize_enum(self.fuelLocation,outputStream) + outputStream.write_byte(int(self.padding)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.standardQuantity = inputStream.read_int() + self.maximumQuantity = inputStream.read_int() + self.standardQuantityReloadTime = inputStream.read_int() + self.maximumQuantityReloadTime = inputStream.read_int() + self.fuelMeasurmentUnits = FuelMeasurementUnits.get_enum(self.parse_enum(self.fuelMeasurmentUnits,inputStream)) + self.fuelType = SupplyFuelType.get_enum(self.parse_enum(self.fuelType,inputStream)) + self.fuelLocation = FuelLocation.get_enum(self.parse_enum(self.fuelLocation,inputStream)) + self.padding = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 8 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/entity_association_vp.py b/dis/entity_association_vp.py new file mode 100644 index 0000000..42c7b5d --- /dev/null +++ b/dis/entity_association_vp.py @@ -0,0 +1,139 @@ +from enum import Enum + +from .siso_ref_010.enums.entity_association_group_member_type import EntityAssociationGroupMemberType +from .siso_ref_010.enums.is_part_of_station_name import IsPartOfStationName +from .siso_ref_010.enums.entity_vprecord_change_indicator import EntityVPRecordChangeIndicator +from .siso_ref_010.enums.entity_association_physical_connection_type import EntityAssociationPhysicalConnectionType +from .siso_ref_010.enums.variable_parameter_record_type import VariableParameterRecordType +from .siso_ref_010.enums.entity_association_association_status import EntityAssociationAssociationStatus +from .siso_ref_010.enums.entity_association_physical_association_type import EntityAssociationPhysicalAssociationType +from .entity_id import EntityID + +class EntityAssociationVP( object ): + """Association or disassociation of two entities. Section 6.2.94.4.3""" + + def __init__(self): + """ Initializer for EntityAssociationVP""" + # /** The identification of the Variable Parameter record. Enumeration from EBV uid 56 */ + self.recordType = VariableParameterRecordType.entity_association + + # /** Indicates if this VP has changed since last issuance uid 320 */ + self.changeIndicator = EntityVPRecordChangeIndicator.default + + # /** Indicates association status between two entities uid 319 */ + self.associationStatus = EntityAssociationAssociationStatus.default + + # /** Type of association; 8-bit enum uid 323 */ + self.associationType = EntityAssociationPhysicalAssociationType.default + + """ Object ID of entity associated with this entity""" + self.entityID = EntityID() + # /** Station location on one's own entity uid 212 */ + self.ownStationLocation = IsPartOfStationName.default + + # /** Type of physical connection uid 324 */ + self.physicalConnectionType = EntityAssociationPhysicalConnectionType.default + + # /** Type of member the entity is within the group uid 321 */ + self.groupMemberType = EntityAssociationGroupMemberType.default + + """ Group if any to which the entity belongs""" + self.groupNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "VariableParameterRecordType : " + self.recordType.get_description + "(" + (str(int(self.recordType))) + ")" + "\n" + outputString += "EntityVPRecordChangeIndicator : " + self.changeIndicator.get_description + "(" + (str(int(self.changeIndicator))) + ")" + "\n" + outputString += "EntityAssociationAssociationType : " + self.associationStatus.get_description + "(" + (str(int(self.associationStatus))) + ")" + "\n" + outputString += "EntityAssociationPhysicalAssociationType : " + self.associationType.get_description + "(" + (str(int(self.associationType))) + ")" + "\n" + outputString += "EntityID :" + "\n" + self.entityID.to_string() + "\n" + outputString += "IsPartOfStationName : " + self.ownStationLocation.get_description + "(" + (str(int(self.ownStationLocation))) + ")" + "\n" + outputString += "EntityAssociationPhysicalConnectionType : " + self.physicalConnectionType.get_description + "(" + (str(int(self.physicalConnectionType))) + ")" + "\n" + outputString += "EntityAssociationGroupMemberType : " + self.groupMemberType.get_description + "(" + (str(int(self.groupMemberType))) + ")" + "\n" + outputString += "GroupNumber : " + str(self.groupNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.recordType,outputStream) + self.serialize_enum(self.changeIndicator,outputStream) + self.serialize_enum(self.associationStatus,outputStream) + self.serialize_enum(self.associationType,outputStream) + self.entityID.serialize(outputStream) + self.serialize_enum(self.ownStationLocation,outputStream) + self.serialize_enum(self.physicalConnectionType,outputStream) + self.serialize_enum(self.groupMemberType,outputStream) + outputStream.write_short(int(self.groupNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordType = VariableParameterRecordType.get_enum(self.parse_enum(self.recordType,inputStream)) + self.changeIndicator = EntityVPRecordChangeIndicator.get_enum(self.parse_enum(self.changeIndicator,inputStream)) + self.associationStatus = EntityAssociationAssociationType.get_enum(self.parse_enum(self.associationStatus,inputStream)) + self.associationType = EntityAssociationPhysicalAssociationType.get_enum(self.parse_enum(self.associationType,inputStream)) + self.entityID.parse(inputStream) + self.ownStationLocation = IsPartOfStationName.get_enum(self.parse_enum(self.ownStationLocation,inputStream)) + self.physicalConnectionType = EntityAssociationPhysicalConnectionType.get_enum(self.parse_enum(self.physicalConnectionType,inputStream)) + self.groupMemberType = EntityAssociationGroupMemberType.get_enum(self.parse_enum(self.groupMemberType,inputStream)) + self.groupNumber = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 9 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/entity_damage_status_pdu.py b/dis/entity_damage_status_pdu.py new file mode 100644 index 0000000..88a4187 --- /dev/null +++ b/dis/entity_damage_status_pdu.py @@ -0,0 +1,156 @@ +from enum import Enum + +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .warfare_family_pdu import WarfareFamilyPdu +from .entity_id import EntityID +from .directed_energy_damage import DirectedEnergyDamage + +class EntityDamageStatusPdu( WarfareFamilyPdu ): + """7.3.5 Used to communicate detailed damage information sustained by an entity regardless of the source of the damage.""" + + def __init__(self): + """ Initializer for EntityDamageStatusPdu""" + super().__init__() + """ Field shall identify the damaged entity (see 6.2.28), Section 7.3.4""" + self.damagedEntityID = EntityID() + self.padding1 = 0 + self.padding2 = 0 + """ field shall specify the number of Damage Description records, Section 7.3.5""" + self.numberOfDamageDescription = 0 + """ Fields shall contain one or more Damage Description records (see 6.2.17) and may contain other Standard Variable records, Section 7.3.5""" + self._damageDescriptionRecords = [] + self.pduType = DisPduType.entity_damage_status + + + def get_numberOfDamageDescription(self): + return len(self._damageDescriptionRecords) + def set_numberOfDamageDescription(self, value): + numberOfDamageDescription = value + + + def get_damageDescriptionRecords(self): + return self._damageDescriptionRecords + def set_damageDescriptionRecords(self, value): + self._damageDescriptionRecords = value + damageDescriptionRecords = property(get_damageDescriptionRecords, set_damageDescriptionRecords) + + + def add_damageDescriptionRecords(self, value : DirectedEnergyDamage): + self._damageDescriptionRecords.append(value) + + + """ + /// Name : damageDescriptionRecords + /// UID : + /// Type : DirectedEnergyDamage + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Fields shall contain one or more Damage Description records (see 6.2.17) and may contain other Standard Variable records, Section 7.3.5 + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "DamagedEntityID :" + "\n" + self.damagedEntityID.to_string() + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + outputString += "NumberOfDamageDescription : " + str(len(self._damageDescriptionRecords)) + "\n" + outputString += "DamageDescriptionRecords : " + "\n" + for idx in range(0, len(self._damageDescriptionRecords)): + outputString += self._damageDescriptionRecords[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( EntityDamageStatusPdu, self ).serialize(outputStream) + self.damagedEntityID.serialize(outputStream) + outputStream.write_short(int(self.padding1)) + outputStream.write_short(int(self.padding2)) + outputStream.write_short( len(self._damageDescriptionRecords)) + for anObj in self._damageDescriptionRecords: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( EntityDamageStatusPdu, self).parse(inputStream) + self.damagedEntityID.parse(inputStream) + self.padding1 = inputStream.read_short() + self.padding2 = inputStream.read_short() + self.numberOfDamageDescription = inputStream.read_short() + for idx in range(0, self.numberOfDamageDescription): + element = DirectedEnergyDamage() + element.parse(inputStream) + self._damageDescriptionRecords.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 5 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/entity_id.py b/dis/entity_id.py new file mode 100644 index 0000000..dfaf5dc --- /dev/null +++ b/dis/entity_id.py @@ -0,0 +1,94 @@ +from enum import Enum + + +class EntityID( object ): + """Unique identifier triplet for this entity. Also referred to as EntityIdentifier""" + + def __init__(self): + """ Initializer for EntityID""" + """ Site ID values are unique identification number for originating site, often corresponding to an internet address. Site ID values are agreed upon by individual simulations.""" + self.siteID = 0 + """ Application ID values are unique identification number for originating application at a given site. Application ID values are sssigned by individual sites.""" + self.applicationID = 0 + """ Entity ID values are unique identification number for s givent entity in the originating application at a given site. Entity ID values are sssigned by individual simulation programs.""" + self.entityID = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "SiteID : " + str(self.siteID) + "\n" + outputString += "ApplicationID : " + str(self.applicationID) + "\n" + outputString += "EntityID : " + str(self.entityID) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.siteID)) + outputStream.write_short(int(self.applicationID)) + outputStream.write_short(int(self.entityID)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.siteID = inputStream.read_short() + self.applicationID = inputStream.read_short() + self.entityID = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/entity_identifier.py b/dis/entity_identifier.py new file mode 100644 index 0000000..60bf360 --- /dev/null +++ b/dis/entity_identifier.py @@ -0,0 +1,90 @@ +from enum import Enum + +from .simulation_address import SimulationAddress + +class EntityIdentifier( object ): + """Entity Identifier. Unique ID for entities in the world. Consists of an simulation address and a entity number. Section 6.2.28.""" + + def __init__(self): + """ Initializer for EntityIdentifier""" + """ Site and application IDs""" + self.simulationAddress = SimulationAddress() + """ Entity number""" + self.entityNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "SimulationAddress :" + "\n" + self.simulationAddress.to_string() + "\n" + outputString += "EntityNumber : " + str(self.entityNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.simulationAddress.serialize(outputStream) + outputStream.write_short(int(self.entityNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.simulationAddress.parse(inputStream) + self.entityNumber = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/entity_information_interaction_family_pdu.py b/dis/entity_information_interaction_family_pdu.py new file mode 100644 index 0000000..3c79298 --- /dev/null +++ b/dis/entity_information_interaction_family_pdu.py @@ -0,0 +1,88 @@ +from enum import Enum + +from .pdu_base import PduBase +from .siso_ref_010.enums.disprotocol_family import DISProtocolFamily + +class EntityInformationInteractionFamilyPdu( PduBase ): + """Section 5.3.3. Common superclass for EntityState, Collision, collision-elastic, and entity state update PDUs.""" + + def __init__(self): + """ Initializer for EntityInformationInteractionFamilyPdu""" + super().__init__() + self.protocolFamily = DISProtocolFamily.entity_information_interaction + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( EntityInformationInteractionFamilyPdu, self ).serialize(outputStream) + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( EntityInformationInteractionFamilyPdu, self).parse(inputStream) + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/entity_management_family_pdu.py b/dis/entity_management_family_pdu.py new file mode 100644 index 0000000..9a044b2 --- /dev/null +++ b/dis/entity_management_family_pdu.py @@ -0,0 +1,88 @@ +from enum import Enum + +from .pdu_base import PduBase +from .siso_ref_010.enums.disprotocol_family import DISProtocolFamily + +class EntityManagementFamilyPdu( PduBase ): + """ Managment of grouping of PDUs, and more. Section 7.8""" + + def __init__(self): + """ Initializer for EntityManagementFamilyPdu""" + super().__init__() + self.protocolFamily = DISProtocolFamily.entity_management + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( EntityManagementFamilyPdu, self ).serialize(outputStream) + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( EntityManagementFamilyPdu, self).parse(inputStream) + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/entity_marking.py b/dis/entity_marking.py new file mode 100644 index 0000000..33820d4 --- /dev/null +++ b/dis/entity_marking.py @@ -0,0 +1,107 @@ +from enum import Enum + +from .siso_ref_010.enums.entity_marking_character_set import EntityMarkingCharacterSet + +class EntityMarking( object ): + """Specifies the character set used in the first byte, followed by 11 characters of text data. Section 6.29""" + + def __init__(self): + """ Initializer for EntityMarking""" + # /** The character set uid 45 */ + self.characterSet = EntityMarkingCharacterSet.default + + """ The characters""" + self.characters = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + + def to_string(self) ->str: + outputString = "" + outputString += "EntityMarkingCharacterSet : " + self.characterSet.get_description + "(" + (str(int(self.characterSet))) + ")" + "\n" + outputString += "Characters : " + "\n" + for idx in range(0, len(self.characters)): + outputString += str(chr(self.characters[idx])) + + return outputString + + def set_string(self, new_str): + for idx in range(0, 11): + if idx < len(new_str): + self.characters[idx] = ord(new_str[idx]) + else: + self.characters[idx] = 0 + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.characterSet,outputStream) + for idx in range(0, 11): + outputStream.write_unsigned_byte( self.characters[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.characterSet = EntityMarkingCharacterSet.get_enum(self.parse_enum(self.characterSet,inputStream)) + self.characters = [0]*11 + for idx in range(0, 11): + val = inputStream.read_unsigned_byte() + self.characters[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/entity_state_pdu.py b/dis/entity_state_pdu.py new file mode 100644 index 0000000..eb39264 --- /dev/null +++ b/dis/entity_state_pdu.py @@ -0,0 +1,209 @@ +from enum import Enum + +from .euler_angles import EulerAngles +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .entity_information_interaction_family_pdu import EntityInformationInteractionFamilyPdu +from .vector3float import Vector3Float +from .dead_reckoning_parameters import DeadReckoningParameters +from .variable_parameter import VariableParameter +from .entity_id import EntityID +from .siso_ref_010.enums.entity_capability_types import EntityCapabilityTypes +from .siso_ref_010.enums.force_id import ForceID +from .entity_type import EntityType +from .entity_marking import EntityMarking +from .vector3double import Vector3Double +from .siso_ref_010.enums.land_platform_capabilities import LandPlatformCapabilities + +class EntityStatePdu( EntityInformationInteractionFamilyPdu ): + """ 7.2.2. Represents the position and state of one entity in the world. See 5.3.2.""" + + def __init__(self): + """ Initializer for EntityStatePdu""" + super().__init__() + """ Unique ID for an entity that is tied to this state information""" + self.entityID = EntityID() + # /** What force this entity is affiliated with, eg red, blue, neutral, etc uid 6 */ + self.forceId = ForceID.default + + """ How many variable parameters are in the variable length list. In earlier versions of DIS these were known as articulation parameters""" + self.numberOfVariableParameters = 0 + """ Describes the type of entity in the world""" + self.entityType = EntityType() + # alternativeEntityType is an undescribed parameter... + self.alternativeEntityType = EntityType() + """ Describes the speed of the entity in the world""" + self.entityLinearVelocity = Vector3Float() + """ describes the location of the entity in the world""" + self.entityLocation = Vector3Double() + """ describes the orientation of the entity, in euler angles with units of radians""" + self.entityOrientation = EulerAngles() + """ a series of bit flags that are used to help draw the entity, such as smoking, on fire, etc.""" + self.entityAppearance = 0 + """ parameters used for dead reckoning""" + self.deadReckoningParameters = DeadReckoningParameters() + """ 11 characters that can be used for entity identification, debugging, or to draw unique strings on the side of entities in the world""" + self.marking = EntityMarking() + # a series of bit flags uid 55 + self.capabilities = LandPlatformCapabilities() + + """ variable length list of variable parameters. In earlier DIS versions this was articulation parameters.""" + self._variableParameters = [] + self.pduType = DisPduType.entity_state + + + def get_numberOfVariableParameters(self): + return len(self._variableParameters) + def set_numberOfVariableParameters(self, value): + numberOfVariableParameters = value + + + def get_variableParameters(self): + return self._variableParameters + def set_variableParameters(self, value): + self._variableParameters = value + variableParameters = property(get_variableParameters, set_variableParameters) + + + def add_variableParameters(self, value : VariableParameter): + self._variableParameters.append(value) + + + """ + /// Name : variableParameters + /// UID : + /// Type : VariableParameter + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of variable parameters. In earlier DIS versions this was articulation parameters. + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "EntityID :" + "\n" + self.entityID.to_string() + "\n" + outputString += "ForceID : " + self.forceId.get_description + "(" + (str(int(self.forceId))) + ")" + "\n" + outputString += "NumberOfVariableParameters : " + str(len(self._variableParameters)) + "\n" + outputString += "EntityType :" + "\n" + self.entityType.to_string() + "\n" + outputString += "AlternativeEntityType :" + "\n" + self.alternativeEntityType.to_string() + "\n" + outputString += "EntityLinearVelocity :" + "\n" + self.entityLinearVelocity.to_string() + "\n" + outputString += "EntityLocation :" + "\n" + self.entityLocation.to_string() + "\n" + outputString += "EntityOrientation :" + "\n" + self.entityOrientation.to_string() + "\n" + outputString += "EntityAppearance : " + str(self.entityAppearance) + "\n" + outputString += "DeadReckoningParameters :" + "\n" + self.deadReckoningParameters.to_string() + "\n" + outputString += "Marking :" + "\n" + self.marking.to_string() + "\n" + outputString += "EntityCapabilities : " + str(self.capabilities) + "\n" + outputString += "VariableParameters : " + "\n" + for idx in range(0, len(self._variableParameters)): + outputString += self._variableParameters[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( EntityStatePdu, self ).serialize(outputStream) + self.entityID.serialize(outputStream) + self.serialize_enum(self.forceId,outputStream) + outputStream.write_byte( len(self._variableParameters)) + self.entityType.serialize(outputStream) + self.alternativeEntityType.serialize(outputStream) + self.entityLinearVelocity.serialize(outputStream) + self.entityLocation.serialize(outputStream) + self.entityOrientation.serialize(outputStream) + outputStream.write_int(int(self.entityAppearance)) + self.deadReckoningParameters.serialize(outputStream) + self.marking.serialize(outputStream) + outputStream.write_unsigned_int(int(self.capabilities.asbyte)) + for anObj in self._variableParameters: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( EntityStatePdu, self).parse(inputStream) + self.entityID.parse(inputStream) + self.forceId = ForceID.get_enum(self.parse_enum(self.forceId,inputStream)) + self.numberOfVariableParameters = inputStream.read_byte() + self.entityType.parse(inputStream) + self.alternativeEntityType.parse(inputStream) + self.entityLinearVelocity.parse(inputStream) + self.entityLocation.parse(inputStream) + self.entityOrientation.parse(inputStream) + self.entityAppearance = inputStream.read_int() + self.deadReckoningParameters.parse(inputStream) + self.marking.parse(inputStream) + self.capabilities.asbyte = inputStream.read_unsigned_int() + for idx in range(0, self.numberOfVariableParameters): + element = VariableParameter() + element.parse(inputStream) + self._variableParameters.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 13 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/entity_state_update_pdu.py b/dis/entity_state_update_pdu.py new file mode 100644 index 0000000..5aac9f1 --- /dev/null +++ b/dis/entity_state_update_pdu.py @@ -0,0 +1,176 @@ +from enum import Enum + +from .euler_angles import EulerAngles +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .entity_information_interaction_family_pdu import EntityInformationInteractionFamilyPdu +from .vector3float import Vector3Float +from .vector3double import Vector3Double +from .variable_parameter import VariableParameter +from .entity_id import EntityID + +class EntityStateUpdatePdu( EntityInformationInteractionFamilyPdu ): + """7.2.5. Nonstatic information about a particular entity may be communicated by issuing an Entity State Update PDU. 5.3.5.""" + + def __init__(self): + """ Initializer for EntityStateUpdatePdu""" + super().__init__() + """ This field shall identify the entity issuing the PDU, and shall be represented by an Entity Identifier record (see 6.2.28).""" + self.entityID = EntityID() + """ Padding""" + self.padding1 = 0 + """ This field shall specify the number of variable parameters present. This field shall be represented by an 8-bit unsigned integer (see Annex I).""" + self.numberOfVariableParameters = 0 + """ This field shall specify an entity's linear velocity. The coordinate system for an entity's linear velocity depends on the dead reckoning algorithm used. This field shall be represented by a Linear Velocity Vector record [see 6.2.95 item c)]).""" + self.entityLinearVelocity = Vector3Float() + """ This field shall specify an entity's physical location in the simulated world and shall be represented by a World Coordinates record (see 6.2.97).""" + self.entityLocation = Vector3Double() + """ This field shall specify an entity's orientation with units of radians and shall be represented by an Euler Angles record (see 6.2.33).""" + self.entityOrientation = EulerAngles() + """ This field shall specify the dynamic changes to the entity's appearance attributes. This field shall be represented by an Entity Appearance record (see 6.2.26).""" + self.entityAppearance = 0 + """ This field shall specify the parameter values for each Variable Parameter record that is included (see 6.2.93 and Annex I).""" + self._variableParameters = [] + self.pduType = DisPduType.entity_state_update + + + def get_numberOfVariableParameters(self): + return len(self._variableParameters) + def set_numberOfVariableParameters(self, value): + numberOfVariableParameters = value + + + def get_variableParameters(self): + return self._variableParameters + def set_variableParameters(self, value): + self._variableParameters = value + variableParameters = property(get_variableParameters, set_variableParameters) + + + def add_variableParameters(self, value : VariableParameter): + self._variableParameters.append(value) + + + """ + /// Name : variableParameters + /// UID : + /// Type : VariableParameter + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : This field shall specify the parameter values for each Variable Parameter record that is included (see 6.2.93 and Annex I). + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "EntityID :" + "\n" + self.entityID.to_string() + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "NumberOfVariableParameters : " + str(len(self._variableParameters)) + "\n" + outputString += "EntityLinearVelocity :" + "\n" + self.entityLinearVelocity.to_string() + "\n" + outputString += "EntityLocation :" + "\n" + self.entityLocation.to_string() + "\n" + outputString += "EntityOrientation :" + "\n" + self.entityOrientation.to_string() + "\n" + outputString += "EntityAppearance : " + str(self.entityAppearance) + "\n" + outputString += "VariableParameters : " + "\n" + for idx in range(0, len(self._variableParameters)): + outputString += self._variableParameters[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( EntityStateUpdatePdu, self ).serialize(outputStream) + self.entityID.serialize(outputStream) + outputStream.write_byte(int(self.padding1)) + outputStream.write_byte( len(self._variableParameters)) + self.entityLinearVelocity.serialize(outputStream) + self.entityLocation.serialize(outputStream) + self.entityOrientation.serialize(outputStream) + outputStream.write_int(int(self.entityAppearance)) + for anObj in self._variableParameters: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( EntityStateUpdatePdu, self).parse(inputStream) + self.entityID.parse(inputStream) + self.padding1 = inputStream.read_byte() + self.numberOfVariableParameters = inputStream.read_byte() + self.entityLinearVelocity.parse(inputStream) + self.entityLocation.parse(inputStream) + self.entityOrientation.parse(inputStream) + self.entityAppearance = inputStream.read_int() + for idx in range(0, self.numberOfVariableParameters): + element = VariableParameter() + element.parse(inputStream) + self._variableParameters.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 8 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/entity_type.py b/dis/entity_type.py new file mode 100644 index 0000000..59e8312 --- /dev/null +++ b/dis/entity_type.py @@ -0,0 +1,119 @@ +from enum import Enum + +from .siso_ref_010.enums.entity_kind import EntityKind +from .siso_ref_010.enums.country import Country +from .domain import Domain + +class EntityType( object ): + """Identifies the type of Entity""" + + def __init__(self): + """ Initializer for EntityType""" + # /** Kind of entity uid 7 */ + self.entityKind = EntityKind.default + + # TODO - Process the default value for a CLASSREF type + """ Domain of entity (air, surface, subsurface, space, etc.)""" + self.domain = Domain() + # /** country to which the design of the entity is attributed uid 29 */ + self.country = Country.default + + """ category of entity""" + self.category = 0 + """ subcategory based on category""" + self.subCategory = 0 + """ specific info based on subcategory""" + self.specific = 0 + self.extra = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "EntityKind : " + self.entityKind.get_description + "(" + (str(int(self.entityKind))) + ")" + "\n" + outputString += "Domain :" + "\n" + self.domain.to_string() + "\n" + outputString += "Country : " + self.country.get_description + "(" + (str(int(self.country))) + ")" + "\n" + outputString += "Category : " + str(self.category) + "\n" + outputString += "SubCategory : " + str(self.subCategory) + "\n" + outputString += "Specific : " + str(self.specific) + "\n" + outputString += "Extra : " + str(self.extra) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.entityKind,outputStream) + self.domain.serialize(outputStream) + self.serialize_enum(self.country,outputStream) + outputStream.write_byte(int(self.category)) + outputStream.write_byte(int(self.subCategory)) + outputStream.write_byte(int(self.specific)) + outputStream.write_byte(int(self.extra)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.entityKind = EntityKind.get_enum(self.parse_enum(self.entityKind,inputStream)) + self.domain.parse(inputStream) + self.country = Country.get_enum(self.parse_enum(self.country,inputStream)) + self.category = inputStream.read_byte() + self.subCategory = inputStream.read_byte() + self.specific = inputStream.read_byte() + self.extra = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 7 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/entity_type_raw.py b/dis/entity_type_raw.py new file mode 100644 index 0000000..dbbf685 --- /dev/null +++ b/dis/entity_type_raw.py @@ -0,0 +1,115 @@ +from enum import Enum + +from .siso_ref_010.enums.entity_kind import EntityKind + +class EntityTypeRaw( object ): + """Identifies the type of Entity""" + + def __init__(self): + """ Initializer for EntityTypeRaw""" + # /** Kind of entity uid 7 */ + self.entityKind = EntityKind.default + + """ Domain of entity (air, surface, subsurface, space, etc.)""" + self.domain = 0 + """ country to which the design of the entity is attributed""" + self.country = 0 + """ category of entity""" + self.category = 0 + """ subcategory of entity""" + self.subCategory = 0 + """ specific info based on subcategory field. Renamed from specific because that is a reserved word in SQL.""" + self.specific = 0 + self.extra = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "EntityKind : " + self.entityKind.get_description + "(" + (str(int(self.entityKind))) + ")" + "\n" + outputString += "Domain : " + str(self.domain) + "\n" + outputString += "Country : " + str(self.country) + "\n" + outputString += "Category : " + str(self.category) + "\n" + outputString += "SubCategory : " + str(self.subCategory) + "\n" + outputString += "Specific : " + str(self.specific) + "\n" + outputString += "Extra : " + str(self.extra) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.entityKind,outputStream) + outputStream.write_byte(int(self.domain)) + outputStream.write_short(int(self.country)) + outputStream.write_byte(int(self.category)) + outputStream.write_byte(int(self.subCategory)) + outputStream.write_byte(int(self.specific)) + outputStream.write_byte(int(self.extra)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.entityKind = EntityKind.get_enum(self.parse_enum(self.entityKind,inputStream)) + self.domain = inputStream.read_byte() + self.country = inputStream.read_short() + self.category = inputStream.read_byte() + self.subCategory = inputStream.read_byte() + self.specific = inputStream.read_byte() + self.extra = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 7 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/entity_type_vp.py b/dis/entity_type_vp.py new file mode 100644 index 0000000..6478d7b --- /dev/null +++ b/dis/entity_type_vp.py @@ -0,0 +1,109 @@ +from enum import Enum + +from .entity_type import EntityType +from .siso_ref_010.enums.entity_vprecord_change_indicator import EntityVPRecordChangeIndicator +from .siso_ref_010.enums.variable_parameter_record_type import VariableParameterRecordType + +class EntityTypeVP( object ): + """Association or disassociation of two entities. Section 6.2.94.5""" + + def __init__(self): + """ Initializer for EntityTypeVP""" + # /** The identification of the Variable Parameter record. uid 56 */ + self.recordType = VariableParameterRecordType.entity_type + + # /** Indicates if this VP has changed since last issuance uid 320 */ + self.changeIndicator = EntityVPRecordChangeIndicator.default + + """ """ + self.entityType = EntityType() + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + """ padding""" + self.padding1 = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "VariableParameterRecordType : " + self.recordType.get_description + "(" + (str(int(self.recordType))) + ")" + "\n" + outputString += "EntityVPRecordChangeIndicator : " + self.changeIndicator.get_description + "(" + (str(int(self.changeIndicator))) + ")" + "\n" + outputString += "EntityType :" + "\n" + self.entityType.to_string() + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.recordType,outputStream) + self.serialize_enum(self.changeIndicator,outputStream) + self.entityType.serialize(outputStream) + outputStream.write_short(int(self.padding)) + outputStream.write_int(int(self.padding1)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordType = VariableParameterRecordType.get_enum(self.parse_enum(self.recordType,inputStream)) + self.changeIndicator = EntityVPRecordChangeIndicator.get_enum(self.parse_enum(self.changeIndicator,inputStream)) + self.entityType.parse(inputStream) + self.padding = inputStream.read_short() + self.padding1 = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 5 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/environment.py b/dis/environment.py new file mode 100644 index 0000000..c61f10d --- /dev/null +++ b/dis/environment.py @@ -0,0 +1,116 @@ +from enum import Enum + +from .siso_ref_010.enums.environmental_process_record_type import EnvironmentalProcessRecordType + +class Environment( object ): + """ Information about a geometry, a state associated with a geometry, a bounding volume, or an associated entity ID. 6.2.31, not fully defined. 'The current definitions can be found in DIS PCR 240'""" + + def __init__(self): + """ Initializer for Environment""" + # /** Record type uid 250 */ + self.environmentType = EnvironmentalProcessRecordType.default + + """ length, in bits""" + self.length = 0 + """ Identify the sequentially numbered record index""" + self.index = 0 + """ padding""" + self.padding1 = 0 + """ Geometry or state record""" + self.geometry = [] + self.padding2 = [0] * 64 + + def to_string(self) ->str: + outputString = "" + outputString += "EnvironmentalProcessRecordType : " + self.environmentType.get_description + "(" + (str(int(self.environmentType))) + ")" + "\n" + outputString += "Length : " + str(self.length) + "\n" + outputString += "Index : " + str(self.index) + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "Geometry : " + "\n" + for idx in range(0, len(self.geometry)): + outputString += str(self.geometry[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.environmentType,outputStream) + outputStream.write_short(int(self.length)) + outputStream.write_byte(int(self.index)) + outputStream.write_byte(int(self.padding1)) + for idx in range(0, 0): + outputStream.write_unsigned_byte( self.geometry[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.environmentType = EnvironmentalProcessRecordType.get_enum(self.parse_enum(self.environmentType,inputStream)) + self.length = inputStream.read_short() + self.index = inputStream.read_byte() + self.padding1 = inputStream.read_byte() + self.geometry = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_byte() + self.geometry[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/environmental_process_pdu.py b/dis/environmental_process_pdu.py new file mode 100644 index 0000000..5d77eae --- /dev/null +++ b/dis/environmental_process_pdu.py @@ -0,0 +1,173 @@ +from enum import Enum + +from .environment import Environment +from .object_identifier import ObjectIdentifier +from .entity_type import EntityType +from .siso_ref_010.enums.environmental_process_model_type import EnvironmentalProcessModelType +from .siso_ref_010.enums.environmental_process_environment_status import EnvironmentalProcessEnvironmentStatus +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .synthetic_environment_family_pdu import SyntheticEnvironmentFamilyPdu + +class EnvironmentalProcessPdu( SyntheticEnvironmentFamilyPdu ): + """7.10.2 Used to communicate information about environmental effects and processes.""" + + def __init__(self): + """ Initializer for EnvironmentalProcessPdu""" + super().__init__() + """ Environmental process ID provides a unique identifier""" + self.environementalProcessID = ObjectIdentifier() + """ Environment type""" + self.environmentType = EntityType() + # /** model type uid 248 */ + self.modelType = EnvironmentalProcessModelType.default + + # Environment status uid 249 + self.environmentStatus = EnvironmentalProcessEnvironmentStatus() + + """ number of environment records """ + self.numberOfEnvironmentRecords = 0 + """ PDU sequence number for the environmental process if pdu sequencing required""" + self.sequenceNumber = 0 + """ environmemt records""" + self._environmentRecords = [] + self.pduType = DisPduType.environmental_process + + + def get_numberOfEnvironmentRecords(self): + return len(self._environmentRecords) + def set_numberOfEnvironmentRecords(self, value): + numberOfEnvironmentRecords = value + + + def get_environmentRecords(self): + return self._environmentRecords + def set_environmentRecords(self, value): + self._environmentRecords = value + environmentRecords = property(get_environmentRecords, set_environmentRecords) + + + def add_environmentRecords(self, value : Environment): + self._environmentRecords.append(value) + + + """ + /// Name : environmentRecords + /// UID : + /// Type : Environment + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : environmemt records + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "EnvironementalProcessID :" + "\n" + self.environementalProcessID.to_string() + "\n" + outputString += "EnvironmentType :" + "\n" + self.environmentType.to_string() + "\n" + outputString += "EnvironmentalProcessModelType : " + self.modelType.get_description + "(" + (str(int(self.modelType))) + ")" + "\n" + outputString += "EnvironmentalProcessEnvironmentStatus : " + str(self.environmentStatus) + "\n" + outputString += "NumberOfEnvironmentRecords : " + str(len(self._environmentRecords)) + "\n" + outputString += "SequenceNumber : " + str(self.sequenceNumber) + "\n" + outputString += "EnvironmentRecords : " + "\n" + for idx in range(0, len(self._environmentRecords)): + outputString += self._environmentRecords[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( EnvironmentalProcessPdu, self ).serialize(outputStream) + self.environementalProcessID.serialize(outputStream) + self.environmentType.serialize(outputStream) + self.serialize_enum(self.modelType,outputStream) + outputStream.write_unsigned_int(int(self.environmentStatus.asbyte)) + outputStream.write_short( len(self._environmentRecords)) + outputStream.write_short(int(self.sequenceNumber)) + for anObj in self._environmentRecords: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( EnvironmentalProcessPdu, self).parse(inputStream) + self.environementalProcessID.parse(inputStream) + self.environmentType.parse(inputStream) + self.modelType = EnvironmentalProcessModelType.get_enum(self.parse_enum(self.modelType,inputStream)) + self.environmentStatus.asbyte = inputStream.read_unsigned_int() + self.numberOfEnvironmentRecords = inputStream.read_short() + self.sequenceNumber = inputStream.read_short() + for idx in range(0, self.numberOfEnvironmentRecords): + element = Environment() + element.parse(inputStream) + self._environmentRecords.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 7 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/euler_angles.py b/dis/euler_angles.py new file mode 100644 index 0000000..99aa778 --- /dev/null +++ b/dis/euler_angles.py @@ -0,0 +1,91 @@ +from enum import Enum + + +class EulerAngles( object ): + """Three floating point values representing an orientation, psi, theta, and phi, aka the euler angles, in radians. Section 6.2.33""" + + def __init__(self): + """ Initializer for EulerAngles""" + self.psi = 0.0 + self.theta = 0.0 + self.phi = 0.0 + + def to_string(self) ->str: + outputString = "" + outputString += "Psi : " + str(self.psi) + "\n" + outputString += "Theta : " + str(self.theta) + "\n" + outputString += "Phi : " + str(self.phi) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_float(int(self.psi)) + outputStream.write_float(int(self.theta)) + outputStream.write_float(int(self.phi)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.psi = inputStream.read_float() + self.theta = inputStream.read_float() + self.phi = inputStream.read_float() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/event_identifier.py b/dis/event_identifier.py new file mode 100644 index 0000000..6ab5b96 --- /dev/null +++ b/dis/event_identifier.py @@ -0,0 +1,89 @@ +from enum import Enum + +from .simulation_address import SimulationAddress + +class EventIdentifier( object ): + """Identifies an event in the world. Use this format for every PDU EXCEPT the LiveEntityPdu. Section 6.2.34.""" + + def __init__(self): + """ Initializer for EventIdentifier""" + """ Site and application IDs""" + self.simulationAddress = SimulationAddress() + self.eventNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "SimulationAddress :" + "\n" + self.simulationAddress.to_string() + "\n" + outputString += "EventNumber : " + str(self.eventNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.simulationAddress.serialize(outputStream) + outputStream.write_short(int(self.eventNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.simulationAddress.parse(inputStream) + self.eventNumber = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/event_identifier_live_entity.py b/dis/event_identifier_live_entity.py new file mode 100644 index 0000000..3490faa --- /dev/null +++ b/dis/event_identifier_live_entity.py @@ -0,0 +1,91 @@ +from enum import Enum + + +class EventIdentifierLiveEntity( object ): + """Identifies an event in the world. Use this format for ONLY the LiveEntityPdu. Section 6.2.34.""" + + def __init__(self): + """ Initializer for EventIdentifierLiveEntity""" + self.siteNumber = 0 + self.applicationNumber = 0 + self.eventNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "SiteNumber : " + str(self.siteNumber) + "\n" + outputString += "ApplicationNumber : " + str(self.applicationNumber) + "\n" + outputString += "EventNumber : " + str(self.eventNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_byte(int(self.siteNumber)) + outputStream.write_byte(int(self.applicationNumber)) + outputStream.write_short(int(self.eventNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.siteNumber = inputStream.read_byte() + self.applicationNumber = inputStream.read_byte() + self.eventNumber = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/event_report_pdu.py b/dis/event_report_pdu.py new file mode 100644 index 0000000..12b678b --- /dev/null +++ b/dis/event_report_pdu.py @@ -0,0 +1,210 @@ +from enum import Enum + +from .siso_ref_010.enums.event_report_event_type import EventReportEventType +from .simulation_management_family_pdu import SimulationManagementFamilyPdu +from .variable_datum import VariableDatum +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .fixed_datum import FixedDatum + +class EventReportPdu( SimulationManagementFamilyPdu ): + """7.5.12 A managed entity shall report the occurrence of a significant event to the simulation manager (SM) using an Event Report PDU. See 5.6.5.12.""" + + def __init__(self): + """ Initializer for EventReportPdu""" + super().__init__() + # /** Type of event uid 73 */ + self.eventType = EventReportEventType.default + + """ padding""" + self.padding1 = 0 + """ Number of fixed datum records""" + self.numberOfFixedDatumRecords = 0 + """ Number of variable datum records, handled automatically by marshaller at run time (and not modifiable by end-user programmers)""" + self.numberOfVariableDatumRecords = 0 + """ variable length list of fixed datums""" + self._fixedDatums = [] + """ variable length list of variable length datums""" + self._variableDatums = [] + self.pduType = DisPduType.event_report + + + def get_numberOfFixedDatumRecords(self): + return len(self._fixedDatums) + def set_numberOfFixedDatumRecords(self, value): + numberOfFixedDatumRecords = value + + + def get_numberOfVariableDatumRecords(self): + return len(self._variableDatums) + def set_numberOfVariableDatumRecords(self, value): + numberOfVariableDatumRecords = value + + + def get_fixedDatums(self): + return self._fixedDatums + def set_fixedDatums(self, value): + self._fixedDatums = value + fixedDatums = property(get_fixedDatums, set_fixedDatums) + + + def add_fixedDatums(self, value : FixedDatum): + self._fixedDatums.append(value) + + + """ + /// Name : fixedDatums + /// UID : + /// Type : FixedDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of fixed datums + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_variableDatums(self): + return self._variableDatums + def set_variableDatums(self, value): + self._variableDatums = value + variableDatums = property(get_variableDatums, set_variableDatums) + + + def add_variableDatums(self, value : VariableDatum): + self._variableDatums.append(value) + + + """ + /// Name : variableDatums + /// UID : + /// Type : VariableDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of variable length datums + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "EventReportEventType : " + self.eventType.get_description + "(" + (str(int(self.eventType))) + ")" + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "NumberOfFixedDatumRecords : " + str(len(self._fixedDatums)) + "\n" + outputString += "NumberOfVariableDatumRecords : " + str(len(self._variableDatums)) + "\n" + outputString += "FixedDatums : " + "\n" + for idx in range(0, len(self._fixedDatums)): + outputString += self._fixedDatums[idx].to_string() + + outputString += "VariableDatums : " + "\n" + for idx in range(0, len(self._variableDatums)): + outputString += self._variableDatums[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( EventReportPdu, self ).serialize(outputStream) + self.serialize_enum(self.eventType,outputStream) + outputStream.write_int(int(self.padding1)) + outputStream.write_int( len(self._fixedDatums)) + outputStream.write_int( len(self._variableDatums)) + for anObj in self._fixedDatums: + anObj.serialize(outputStream) + + for anObj in self._variableDatums: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( EventReportPdu, self).parse(inputStream) + self.eventType = EventReportEventType.get_enum(self.parse_enum(self.eventType,inputStream)) + self.padding1 = inputStream.read_int() + self.numberOfFixedDatumRecords = inputStream.read_int() + self.numberOfVariableDatumRecords = inputStream.read_int() + for idx in range(0, self.numberOfFixedDatumRecords): + element = FixedDatum() + element.parse(inputStream) + self._fixedDatums.append(element) + + for idx in range(0, self.numberOfVariableDatumRecords): + element = VariableDatum() + element.parse(inputStream) + self._variableDatums.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/event_report_reliable_pdu.py b/dis/event_report_reliable_pdu.py new file mode 100644 index 0000000..6f841c2 --- /dev/null +++ b/dis/event_report_reliable_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class EventReportReliablePdu( object ): + """Alias, more descriptive name for EventReportRPdu.""" + + def __init__(self): + """ Initializer for EventReportReliablePdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/event_report_rpdu.py b/dis/event_report_rpdu.py new file mode 100644 index 0000000..aa1725e --- /dev/null +++ b/dis/event_report_rpdu.py @@ -0,0 +1,210 @@ +from enum import Enum + +from .siso_ref_010.enums.event_report_event_type import EventReportEventType +from .variable_datum import VariableDatum +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .fixed_datum import FixedDatum +from .simulation_management_with_reliability_family_pdu import SimulationManagementWithReliabilityFamilyPdu + +class EventReportRPdu( SimulationManagementWithReliabilityFamilyPdu ): + """5.12.4.12 Contains the same information as found in the Event Report PDU.""" + + def __init__(self): + """ Initializer for EventReportRPdu""" + super().__init__() + # /** Event type uid 73 */ + self.eventType = EventReportEventType.default + + """ padding""" + self.pad1 = 0 + """ Fixed datum record count""" + self.numberOfFixedDatumRecords = 0 + """ variable datum record count""" + self.numberOfVariableDatumRecords = 0 + """ Fixed datum records""" + self._fixedDatumRecords = [] + """ Variable datum records""" + self._variableDatumRecords = [] + self.pduType = DisPduType.event_report_reliable + + + def get_numberOfFixedDatumRecords(self): + return len(self._fixedDatumRecords) + def set_numberOfFixedDatumRecords(self, value): + numberOfFixedDatumRecords = value + + + def get_numberOfVariableDatumRecords(self): + return len(self._variableDatumRecords) + def set_numberOfVariableDatumRecords(self, value): + numberOfVariableDatumRecords = value + + + def get_fixedDatumRecords(self): + return self._fixedDatumRecords + def set_fixedDatumRecords(self, value): + self._fixedDatumRecords = value + fixedDatumRecords = property(get_fixedDatumRecords, set_fixedDatumRecords) + + + def add_fixedDatumRecords(self, value : FixedDatum): + self._fixedDatumRecords.append(value) + + + """ + /// Name : fixedDatumRecords + /// UID : + /// Type : FixedDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Fixed datum records + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_variableDatumRecords(self): + return self._variableDatumRecords + def set_variableDatumRecords(self, value): + self._variableDatumRecords = value + variableDatumRecords = property(get_variableDatumRecords, set_variableDatumRecords) + + + def add_variableDatumRecords(self, value : VariableDatum): + self._variableDatumRecords.append(value) + + + """ + /// Name : variableDatumRecords + /// UID : + /// Type : VariableDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Variable datum records + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "EventReportEventType : " + self.eventType.get_description + "(" + (str(int(self.eventType))) + ")" + "\n" + outputString += "Pad1 : " + str(self.pad1) + "\n" + outputString += "NumberOfFixedDatumRecords : " + str(len(self._fixedDatumRecords)) + "\n" + outputString += "NumberOfVariableDatumRecords : " + str(len(self._variableDatumRecords)) + "\n" + outputString += "FixedDatumRecords : " + "\n" + for idx in range(0, len(self._fixedDatumRecords)): + outputString += self._fixedDatumRecords[idx].to_string() + + outputString += "VariableDatumRecords : " + "\n" + for idx in range(0, len(self._variableDatumRecords)): + outputString += self._variableDatumRecords[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( EventReportRPdu, self ).serialize(outputStream) + self.serialize_enum(self.eventType,outputStream) + outputStream.write_int(int(self.pad1)) + outputStream.write_int( len(self._fixedDatumRecords)) + outputStream.write_int( len(self._variableDatumRecords)) + for anObj in self._fixedDatumRecords: + anObj.serialize(outputStream) + + for anObj in self._variableDatumRecords: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( EventReportRPdu, self).parse(inputStream) + self.eventType = EventReportEventType.get_enum(self.parse_enum(self.eventType,inputStream)) + self.pad1 = inputStream.read_int() + self.numberOfFixedDatumRecords = inputStream.read_int() + self.numberOfVariableDatumRecords = inputStream.read_int() + for idx in range(0, self.numberOfFixedDatumRecords): + element = FixedDatum() + element.parse(inputStream) + self._fixedDatumRecords.append(element) + + for idx in range(0, self.numberOfVariableDatumRecords): + element = VariableDatum() + element.parse(inputStream) + self._variableDatumRecords.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/expendable.py b/dis/expendable.py new file mode 100644 index 0000000..f80e74d --- /dev/null +++ b/dis/expendable.py @@ -0,0 +1,105 @@ +from enum import Enum + +from .entity_type import EntityType +from .siso_ref_010.enums.munition_expendable_status import MunitionExpendableStatus + +class Expendable( object ): + """An entity's expendable (chaff, flares, etc.) information. Section 6.2.36""" + + def __init__(self): + """ Initializer for Expendable""" + """ Type of expendable""" + self.expendable = EntityType() + self.station = 0 + self.quantity = 0 + # /** uid 327 */ + self.expendableStatus = MunitionExpendableStatus.default + + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "Expendable :" + "\n" + self.expendable.to_string() + "\n" + outputString += "Station : " + str(self.station) + "\n" + outputString += "Quantity : " + str(self.quantity) + "\n" + outputString += "MunitionExpendableStatus : " + self.expendableStatus.get_description + "(" + (str(int(self.expendableStatus))) + ")" + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.expendable.serialize(outputStream) + outputStream.write_int(int(self.station)) + outputStream.write_short(int(self.quantity)) + self.serialize_enum(self.expendableStatus,outputStream) + outputStream.write_byte(int(self.padding)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.expendable.parse(inputStream) + self.station = inputStream.read_int() + self.quantity = inputStream.read_short() + self.expendableStatus = MunitionExpendableStatus.get_enum(self.parse_enum(self.expendableStatus,inputStream)) + self.padding = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 5 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/expendable_descriptor.py b/dis/expendable_descriptor.py new file mode 100644 index 0000000..3ae0f28 --- /dev/null +++ b/dis/expendable_descriptor.py @@ -0,0 +1,90 @@ +from enum import Enum + +from .entity_type import EntityType + +class ExpendableDescriptor( object ): + """Burst of chaff or expendible device. Section 6.2.19.4""" + + def __init__(self): + """ Initializer for ExpendableDescriptor""" + """ Type of the object that exploded""" + self.expendableType = EntityType() + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "ExpendableType :" + "\n" + self.expendableType.to_string() + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.expendableType.serialize(outputStream) + outputStream.write_long(int(self.padding)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.expendableType.parse(inputStream) + self.padding = inputStream.read_long() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/expendable_reload.py b/dis/expendable_reload.py new file mode 100644 index 0000000..6001566 --- /dev/null +++ b/dis/expendable_reload.py @@ -0,0 +1,105 @@ +from enum import Enum + +from .entity_type import EntityType + +class ExpendableReload( object ): + """An entity's expendable (chaff, flares, etc.) information. Section 6.2.37""" + + def __init__(self): + """ Initializer for ExpendableReload""" + """ Type of expendable""" + self.expendable = EntityType() + self.station = 0 + self.standardQuantity = 0 + self.maximumQuantity = 0 + self.standardQuantityReloadTime = 0 + self.maximumQuantityReloadTime = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "Expendable :" + "\n" + self.expendable.to_string() + "\n" + outputString += "Station : " + str(self.station) + "\n" + outputString += "StandardQuantity : " + str(self.standardQuantity) + "\n" + outputString += "MaximumQuantity : " + str(self.maximumQuantity) + "\n" + outputString += "StandardQuantityReloadTime : " + str(self.standardQuantityReloadTime) + "\n" + outputString += "MaximumQuantityReloadTime : " + str(self.maximumQuantityReloadTime) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.expendable.serialize(outputStream) + outputStream.write_int(int(self.station)) + outputStream.write_short(int(self.standardQuantity)) + outputStream.write_short(int(self.maximumQuantity)) + outputStream.write_int(int(self.standardQuantityReloadTime)) + outputStream.write_int(int(self.maximumQuantityReloadTime)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.expendable.parse(inputStream) + self.station = inputStream.read_int() + self.standardQuantity = inputStream.read_short() + self.maximumQuantity = inputStream.read_short() + self.standardQuantityReloadTime = inputStream.read_int() + self.maximumQuantityReloadTime = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/explosion_descriptor.py b/dis/explosion_descriptor.py new file mode 100644 index 0000000..a28f892 --- /dev/null +++ b/dis/explosion_descriptor.py @@ -0,0 +1,102 @@ +from enum import Enum + +from .entity_type import EntityType +from .siso_ref_010.enums.explosive_material_categories import ExplosiveMaterialCategories + +class ExplosionDescriptor( object ): + """Explosion of a non-munition. Section 6.2.19.3""" + + def __init__(self): + """ Initializer for ExplosionDescriptor""" + """ Type of the object that exploded. See 6.2.30""" + self.explodingObject = EntityType() + # /** Material that exploded. Can be grain dust, tnt, gasoline, etc. Enumeration uid 310 */ + self.explosiveMaterial = ExplosiveMaterialCategories.default + + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + """ Force of explosion, in equivalent KG of TNT""" + self.explosiveForce = 0.0 + + def to_string(self) ->str: + outputString = "" + outputString += "ExplodingObject :" + "\n" + self.explodingObject.to_string() + "\n" + outputString += "ExplosiveMaterialCategories : " + self.explosiveMaterial.get_description + "(" + (str(int(self.explosiveMaterial))) + ")" + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "ExplosiveForce : " + str(self.explosiveForce) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.explodingObject.serialize(outputStream) + self.serialize_enum(self.explosiveMaterial,outputStream) + outputStream.write_short(int(self.padding)) + outputStream.write_float(int(self.explosiveForce)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.explodingObject.parse(inputStream) + self.explosiveMaterial = ExplosiveMaterialCategories.get_enum(self.parse_enum(self.explosiveMaterial,inputStream)) + self.padding = inputStream.read_short() + self.explosiveForce = inputStream.read_float() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/false_targets_attribute.py b/dis/false_targets_attribute.py new file mode 100644 index 0000000..bb02d02 --- /dev/null +++ b/dis/false_targets_attribute.py @@ -0,0 +1,155 @@ +from enum import Enum + +from .siso_ref_010.enums.eeattribute_state_indicator import EEAttributeStateIndicator + +class FalseTargetsAttribute( object ): + """The False Targets attribute record shall be used to communicate discrete values that are associated with false targets jamming that cannot be referenced to an emitter mode. The values provided in the False Targets attri- bute record shall be considered valid only for the victim radar beams listed in the jamming beam's Track/Jam Data records (provided in the associated Electromagnetic Emission PDU). Section 6.2.21.3""" + + def __init__(self): + """ Initializer for FalseTargetsAttribute""" + """ record type""" + self.recordType = 3502 + """ The length of the record in octets.""" + self.recordLength = 40 + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + """ This field indicates the emitter system generating the false targets.""" + self.emitterNumber = 0 + """ This field indicates the jamming beam generating the false targets. """ + self.beamNumber = 0 + # /** This field shall be used to indicate if false target data have changed since issuance of the last False Targets attribute record for this beam, if the False Targets attribute record is part of a heartbeat update to meet periodic update requirements or if false target data for the beam has ceased. uid 300 */ + self.stateIndicator = EEAttributeStateIndicator.default + + """ padding""" + self.padding2 = 0 + self.padding3 = 0 + """ This field indicates the jamming beam generating the false targets. """ + self.falseTargetCount = 0 + """ This field shall specify the speed (in meters per second) at which false targets move toward the victim radar. Negative values shall indicate a velocity away from the victim radar. """ + self.walkSpeed = 0.0 + """ This field shall specify the rate (in meters per second squared) at which false tar- gets accelerate toward the victim radar. Negative values shall indicate an acceleration direction away from the victim radar. """ + self.walkAcceleration = 0.0 + """ This field shall specify the distance (in meters) that a false target is to walk before it pauses in range. """ + self.maximumWalkDistance = 0.0 + """ This field shall specify the time (in seconds) that a false target is to be held at the Maxi- mum Walk Distance before it resets to its initial position. """ + self.keepTime = 0.0 + """ This field shall specify the distance between false targets in meters. Positive values for this field shall indicate that second and subsequent false targets are initially placed at increasing ranges from the victim radar. """ + self.echoSpacing = 0.0 + """ Sets the position of the first false target relative to the jamming entity in meters.""" + self.firstTargetOffset = 0.0 + + def to_string(self) ->str: + outputString = "" + outputString += "RecordType : " + str(self.recordType) + "\n" + outputString += "RecordLength : " + str(self.recordLength) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "EmitterNumber : " + str(self.emitterNumber) + "\n" + outputString += "BeamNumber : " + str(self.beamNumber) + "\n" + outputString += "EEAttributeStateIndicator : " + self.stateIndicator.get_description + "(" + (str(int(self.stateIndicator))) + ")" + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + outputString += "Padding3 : " + str(self.padding3) + "\n" + outputString += "FalseTargetCount : " + str(self.falseTargetCount) + "\n" + outputString += "WalkSpeed : " + str(self.walkSpeed) + "\n" + outputString += "WalkAcceleration : " + str(self.walkAcceleration) + "\n" + outputString += "MaximumWalkDistance : " + str(self.maximumWalkDistance) + "\n" + outputString += "KeepTime : " + str(self.keepTime) + "\n" + outputString += "EchoSpacing : " + str(self.echoSpacing) + "\n" + outputString += "FirstTargetOffset : " + str(self.firstTargetOffset) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int(int(self.recordType)) + outputStream.write_short(int(self.recordLength)) + outputStream.write_short(int(self.padding)) + outputStream.write_byte(int(self.emitterNumber)) + outputStream.write_byte(int(self.beamNumber)) + self.serialize_enum(self.stateIndicator,outputStream) + outputStream.write_byte(int(self.padding2)) + outputStream.write_short(int(self.padding3)) + outputStream.write_short(int(self.falseTargetCount)) + outputStream.write_float(int(self.walkSpeed)) + outputStream.write_float(int(self.walkAcceleration)) + outputStream.write_float(int(self.maximumWalkDistance)) + outputStream.write_float(int(self.keepTime)) + outputStream.write_float(int(self.echoSpacing)) + outputStream.write_float(int(self.firstTargetOffset)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordType = inputStream.read_int() + self.recordLength = inputStream.read_short() + self.padding = inputStream.read_short() + self.emitterNumber = inputStream.read_byte() + self.beamNumber = inputStream.read_byte() + self.stateIndicator = EEAttributeStateIndicator.get_enum(self.parse_enum(self.stateIndicator,inputStream)) + self.padding2 = inputStream.read_byte() + self.padding3 = inputStream.read_short() + self.falseTargetCount = inputStream.read_short() + self.walkSpeed = inputStream.read_float() + self.walkAcceleration = inputStream.read_float() + self.maximumWalkDistance = inputStream.read_float() + self.keepTime = inputStream.read_float() + self.echoSpacing = inputStream.read_float() + self.firstTargetOffset = inputStream.read_float() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 15 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/fire_pdu.py b/dis/fire_pdu.py new file mode 100644 index 0000000..150be3a --- /dev/null +++ b/dis/fire_pdu.py @@ -0,0 +1,136 @@ +from enum import Enum + +from .munition_descriptor import MunitionDescriptor +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .vector3float import Vector3Float +from .warfare_family_pdu import WarfareFamilyPdu +from .vector3double import Vector3Double +from .entity_id import EntityID +from .event_identifier import EventIdentifier + +class FirePdu( WarfareFamilyPdu ): + """7.3.2 Used to communicate the firing of a weapon or expendable.""" + + def __init__(self): + """ Initializer for FirePdu""" + super().__init__() + """ ID of the entity that shot""" + self.firingEntityID = EntityID() + """ ID of the entity that is being shot at""" + self.targetEntityID = EntityID() + """ This field shall specify the entity identification of the fired munition or expendable. This field shall be represented by an Entity Identifier record (see 6.2.28).""" + self.munitionExpendibleID = EntityID() + """ This field shall contain an identification generated by the firing entity to associate related firing and detonation events. This field shall be represented by an Event Identifier record (see 6.2.34).""" + self.eventID = EventIdentifier() + """ This field shall identify the fire mission (see 5.4.3.3). This field shall be represented by a 32-bit unsigned integer.""" + self.fireMissionIndex = 0 + """ This field shall specify the location, in world coordinates, from which the munition was launched, and shall be represented by a World Coordinates record (see 6.2.97).""" + self.locationInWorldCoordinates = Vector3Double() + """ This field shall describe the firing or launch of a munition or expendable represented by one of the following types of Descriptor records: Munition Descriptor (6.2.20.2) or Expendable Descriptor (6.2.20.4).""" + self.descriptor = MunitionDescriptor() + """ This field shall specify the velocity of the fired munition at the point when the issuing simulation application intends the externally visible effects of the launch (e.g. exhaust plume or muzzle blast) to first become apparent. The velocity shall be represented in world coordinates. This field shall be represented by a Linear Velocity Vector record [see 6.2.95 item c)].""" + self.velocity = Vector3Float() + """ This field shall specify the range that an entity's fire control system has assumed in computing the fire control solution. This field shall be represented by a 32-bit floating point number in meters. For systems where range is unknown or unavailable, this field shall contain a value of zero.""" + self.range = 0.0 + self.pduType = DisPduType.fire + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "FiringEntityID :" + "\n" + self.firingEntityID.to_string() + "\n" + outputString += "TargetEntityID :" + "\n" + self.targetEntityID.to_string() + "\n" + outputString += "MunitionExpendibleID :" + "\n" + self.munitionExpendibleID.to_string() + "\n" + outputString += "EventID :" + "\n" + self.eventID.to_string() + "\n" + outputString += "FireMissionIndex : " + str(self.fireMissionIndex) + "\n" + outputString += "LocationInWorldCoordinates :" + "\n" + self.locationInWorldCoordinates.to_string() + "\n" + outputString += "Descriptor :" + "\n" + self.descriptor.to_string() + "\n" + outputString += "Velocity :" + "\n" + self.velocity.to_string() + "\n" + outputString += "Range : " + str(self.range) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( FirePdu, self ).serialize(outputStream) + self.firingEntityID.serialize(outputStream) + self.targetEntityID.serialize(outputStream) + self.munitionExpendibleID.serialize(outputStream) + self.eventID.serialize(outputStream) + outputStream.write_int(int(self.fireMissionIndex)) + self.locationInWorldCoordinates.serialize(outputStream) + self.descriptor.serialize(outputStream) + self.velocity.serialize(outputStream) + outputStream.write_float(int(self.range)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( FirePdu, self).parse(inputStream) + self.firingEntityID.parse(inputStream) + self.targetEntityID.parse(inputStream) + self.munitionExpendibleID.parse(inputStream) + self.eventID.parse(inputStream) + self.fireMissionIndex = inputStream.read_int() + self.locationInWorldCoordinates.parse(inputStream) + self.descriptor.parse(inputStream) + self.velocity.parse(inputStream) + self.range = inputStream.read_float() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 9 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/fixed_datum.py b/dis/fixed_datum.py new file mode 100644 index 0000000..b490ce0 --- /dev/null +++ b/dis/fixed_datum.py @@ -0,0 +1,91 @@ +from enum import Enum + +from .siso_ref_010.enums.variable_record_type import VariableRecordType + +class FixedDatum( object ): + """Fixed Datum Record. Section 6.2.37""" + + def __init__(self): + """ Initializer for FixedDatum""" + # /** ID of the fixed datum, an enumeration uid 66 Variable Record Type values are defined by VariableRecordType enumerations */ + self.fixedDatumID = VariableRecordType.default + + """ Value for the fixed datum""" + self.fixedDatumValue = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "VariableRecordType : " + self.fixedDatumID.get_description + "(" + (str(int(self.fixedDatumID))) + ")" + "\n" + outputString += "FixedDatumValue : " + str(self.fixedDatumValue) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.fixedDatumID,outputStream) + outputStream.write_int(int(self.fixedDatumValue)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.fixedDatumID = VariableRecordType.get_enum(self.parse_enum(self.fixedDatumID,inputStream)) + self.fixedDatumValue = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/fundamental_operational_data.py b/dis/fundamental_operational_data.py new file mode 100644 index 0000000..45dfdab --- /dev/null +++ b/dis/fundamental_operational_data.py @@ -0,0 +1,131 @@ +from enum import Enum + +from .siso_ref_010.enums.system_on_off_status import SystemOnOffStatus + +class FundamentalOperationalData( object ): + """Basic operational data for IFF. Section 6.2.39""" + + def __init__(self): + """ Initializer for FundamentalOperationalData""" + # /** system status, IEEE DIS 7 defined uid 2120 */ + self.systemStatus = SystemOnOffStatus.default + + """ data field 1""" + self.dataField1 = 0 + """ eight boolean fields""" + self.informationLayers = 0 + """ enumeration""" + self.dataField2 = 0 + """ parameter, enumeration""" + self.parameter1 = 0 + """ parameter, enumeration""" + self.parameter2 = 0 + """ parameter, enumeration""" + self.parameter3 = 0 + """ parameter, enumeration""" + self.parameter4 = 0 + """ parameter, enumeration""" + self.parameter5 = 0 + """ parameter, enumeration""" + self.parameter6 = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "SystemOnOffStatus : " + self.systemStatus.get_description + "(" + (str(int(self.systemStatus))) + ")" + "\n" + outputString += "DataField1 : " + str(self.dataField1) + "\n" + outputString += "InformationLayers : " + str(self.informationLayers) + "\n" + outputString += "DataField2 : " + str(self.dataField2) + "\n" + outputString += "Parameter1 : " + str(self.parameter1) + "\n" + outputString += "Parameter2 : " + str(self.parameter2) + "\n" + outputString += "Parameter3 : " + str(self.parameter3) + "\n" + outputString += "Parameter4 : " + str(self.parameter4) + "\n" + outputString += "Parameter5 : " + str(self.parameter5) + "\n" + outputString += "Parameter6 : " + str(self.parameter6) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.systemStatus,outputStream) + outputStream.write_byte(int(self.dataField1)) + outputStream.write_byte(int(self.informationLayers)) + outputStream.write_byte(int(self.dataField2)) + outputStream.write_short(int(self.parameter1)) + outputStream.write_short(int(self.parameter2)) + outputStream.write_short(int(self.parameter3)) + outputStream.write_short(int(self.parameter4)) + outputStream.write_short(int(self.parameter5)) + outputStream.write_short(int(self.parameter6)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.systemStatus = SystemOnOffStatus.get_enum(self.parse_enum(self.systemStatus,inputStream)) + self.dataField1 = inputStream.read_byte() + self.informationLayers = inputStream.read_byte() + self.dataField2 = inputStream.read_byte() + self.parameter1 = inputStream.read_short() + self.parameter2 = inputStream.read_short() + self.parameter3 = inputStream.read_short() + self.parameter4 = inputStream.read_short() + self.parameter5 = inputStream.read_short() + self.parameter6 = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 10 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/grid_axis_descriptor.py b/dis/grid_axis_descriptor.py new file mode 100644 index 0000000..09bb4a5 --- /dev/null +++ b/dis/grid_axis_descriptor.py @@ -0,0 +1,106 @@ +from enum import Enum + +from .siso_ref_010.enums.grid_axis_descriptor_axis_type import GridAxisDescriptorAxisType + +class GridAxisDescriptor( object ): + """Detailed information about the grid dimensions (axes) and coordinates for environmental state variables""" + + def __init__(self): + """ Initializer for GridAxisDescriptor""" + """ coordinate of the grid origin or initial value""" + self.domainInitialXi = 0.0 + """ coordinate of the endpoint or final value""" + self.domainFinalXi = 0.0 + """ The number of grid points along the Xi domain axis for the enviornmental state data""" + self.domainPointsXi = 0 + """ interleaf factor along the domain axis.""" + self.interleafFactor = 0 + # /** type of grid axis uid 377 */ + self.axisType = GridAxisDescriptorAxisType.default + + + def to_string(self) ->str: + outputString = "" + outputString += "DomainInitialXi : " + str(self.domainInitialXi) + "\n" + outputString += "DomainFinalXi : " + str(self.domainFinalXi) + "\n" + outputString += "DomainPointsXi : " + str(self.domainPointsXi) + "\n" + outputString += "InterleafFactor : " + str(self.interleafFactor) + "\n" + outputString += "GridAxisDescriptorAxisType : " + self.axisType.get_description + "(" + (str(int(self.axisType))) + ")" + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_double(int(self.domainInitialXi)) + outputStream.write_double(int(self.domainFinalXi)) + outputStream.write_short(int(self.domainPointsXi)) + outputStream.write_byte(int(self.interleafFactor)) + self.serialize_enum(self.axisType,outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.domainInitialXi = inputStream.read_double() + self.domainFinalXi = inputStream.read_double() + self.domainPointsXi = inputStream.read_short() + self.interleafFactor = inputStream.read_byte() + self.axisType = GridAxisDescriptorAxisType.get_enum(self.parse_enum(self.axisType,inputStream)) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 5 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/grid_axis_descriptor_fixed.py b/dis/grid_axis_descriptor_fixed.py new file mode 100644 index 0000000..5fa4443 --- /dev/null +++ b/dis/grid_axis_descriptor_fixed.py @@ -0,0 +1,94 @@ +from enum import Enum + +from .grid_axis_descriptor import GridAxisDescriptor + +class GridAxisDescriptorFixed( GridAxisDescriptor ): + """Grid axis record for fixed data. Section 6.2.41""" + + def __init__(self): + """ Initializer for GridAxisDescriptorFixed""" + super().__init__() + """ Number of grid locations along Xi axis""" + self.numberOfPointsOnXiAxis = 0 + """ initial grid point for the current pdu""" + self.initialIndex = 0 + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "NumberOfPointsOnXiAxis : " + str(self.numberOfPointsOnXiAxis) + "\n" + outputString += "InitialIndex : " + str(self.initialIndex) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( GridAxisDescriptorFixed, self ).serialize(outputStream) + outputStream.write_short(int(self.numberOfPointsOnXiAxis)) + outputStream.write_short(int(self.initialIndex)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( GridAxisDescriptorFixed, self).parse(inputStream) + self.numberOfPointsOnXiAxis = inputStream.read_short() + self.initialIndex = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/grid_axis_descriptor_variable.py b/dis/grid_axis_descriptor_variable.py new file mode 100644 index 0000000..343335a --- /dev/null +++ b/dis/grid_axis_descriptor_variable.py @@ -0,0 +1,119 @@ +from enum import Enum + +from .grid_axis_descriptor import GridAxisDescriptor + +class GridAxisDescriptorVariable( GridAxisDescriptor ): + """Grid axis descriptor fo variable spacing axis data.""" + + def __init__(self): + """ Initializer for GridAxisDescriptorVariable""" + super().__init__() + """ Number of grid locations along Xi axis""" + self.numberOfPointsOnXiAxis = 0 + """ initial grid point for the current pdu""" + self.initialIndex = 0 + """ value that linearly scales the coordinates of the grid locations for the xi axis""" + self.coordinateScaleXi = 0.0 + """ The constant offset value that shall be applied to the grid locations for the xi axis""" + self.coordinateOffsetXi = 0.0 + """ list of coordinates""" + self.xiValues = [] + self.padding = [0] * 64 + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "NumberOfPointsOnXiAxis : " + str(self.numberOfPointsOnXiAxis) + "\n" + outputString += "InitialIndex : " + str(self.initialIndex) + "\n" + outputString += "CoordinateScaleXi : " + str(self.coordinateScaleXi) + "\n" + outputString += "CoordinateOffsetXi : " + str(self.coordinateOffsetXi) + "\n" + outputString += "XiValues : " + "\n" + for idx in range(0, len(self.xiValues)): + outputString += str(self.xiValues[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( GridAxisDescriptorVariable, self ).serialize(outputStream) + outputStream.write_short(int(self.numberOfPointsOnXiAxis)) + outputStream.write_short(int(self.initialIndex)) + outputStream.write_double(int(self.coordinateScaleXi)) + outputStream.write_double(int(self.coordinateOffsetXi)) + for idx in range(0, 0): + outputStream.write_unsigned_short( self.xiValues[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( GridAxisDescriptorVariable, self).parse(inputStream) + self.numberOfPointsOnXiAxis = inputStream.read_short() + self.initialIndex = inputStream.read_short() + self.coordinateScaleXi = inputStream.read_double() + self.coordinateOffsetXi = inputStream.read_double() + self.xiValues = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_short() + self.xiValues[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/grid_data.py b/dis/grid_data.py new file mode 100644 index 0000000..811c2c4 --- /dev/null +++ b/dis/grid_data.py @@ -0,0 +1,93 @@ +from enum import Enum + +from .siso_ref_010.enums.gridded_data_data_representation import GriddedDataDataRepresentation +from .siso_ref_010.enums.gridded_data_sample_type import GriddedDataSampleType + +class GridData( object ): + """6.2.41, table 68""" + + def __init__(self): + """ Initializer for GridData""" + # /** uid 246 */ + self.sampleType = GriddedDataSampleType.default + + # /** uid 247 */ + self.dataRepresentation = GriddedDataDataRepresentation.default + + + def to_string(self) ->str: + outputString = "" + outputString += "GriddedDataSampleType : " + self.sampleType.get_description + "(" + (str(int(self.sampleType))) + ")" + "\n" + outputString += "GriddedDataDataRepresentation : " + self.dataRepresentation.get_description + "(" + (str(int(self.dataRepresentation))) + ")" + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.sampleType,outputStream) + self.serialize_enum(self.dataRepresentation,outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.sampleType = GriddedDataSampleType.get_enum(self.parse_enum(self.sampleType,inputStream)) + self.dataRepresentation = GriddedDataDataRepresentation.get_enum(self.parse_enum(self.dataRepresentation,inputStream)) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/grid_data_type0.py b/dis/grid_data_type0.py new file mode 100644 index 0000000..7b9ee20 --- /dev/null +++ b/dis/grid_data_type0.py @@ -0,0 +1,102 @@ +from enum import Enum + +from .grid_data import GridData + +class GridDataType0( GridData ): + """6.2.41, table 68""" + + def __init__(self): + """ Initializer for GridDataType0""" + super().__init__() + self.numberOfBytes = 0 + self.dataValues = [] + self.padding = [0] * 16 + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "NumberOfBytes : " + str(self.numberOfBytes) + "\n" + outputString += "DataValues : " + "\n" + for idx in range(0, len(self.dataValues)): + outputString += str(self.dataValues[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( GridDataType0, self ).serialize(outputStream) + outputStream.write_short(int(self.numberOfBytes)) + for idx in range(0, 0): + outputStream.write_unsigned_byte( self.dataValues[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( GridDataType0, self).parse(inputStream) + self.numberOfBytes = inputStream.read_short() + self.dataValues = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_byte() + self.dataValues[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/grid_data_type1.py b/dis/grid_data_type1.py new file mode 100644 index 0000000..d346745 --- /dev/null +++ b/dis/grid_data_type1.py @@ -0,0 +1,110 @@ +from enum import Enum + +from .grid_data import GridData + +class GridDataType1( GridData ): + """6.2.41, table 69""" + + def __init__(self): + """ Initializer for GridDataType1""" + super().__init__() + self.fieldScale = 0.0 + self.fieldOffset = 0.0 + self.numberOfValues = 0 + self.dataValues = [] + self.padding = [0] * 32 + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "FieldScale : " + str(self.fieldScale) + "\n" + outputString += "FieldOffset : " + str(self.fieldOffset) + "\n" + outputString += "NumberOfValues : " + str(self.numberOfValues) + "\n" + outputString += "DataValues : " + "\n" + for idx in range(0, len(self.dataValues)): + outputString += str(self.dataValues[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( GridDataType1, self ).serialize(outputStream) + outputStream.write_float(int(self.fieldScale)) + outputStream.write_float(int(self.fieldOffset)) + outputStream.write_short(int(self.numberOfValues)) + for idx in range(0, 0): + outputStream.write_unsigned_short( self.dataValues[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( GridDataType1, self).parse(inputStream) + self.fieldScale = inputStream.read_float() + self.fieldOffset = inputStream.read_float() + self.numberOfValues = inputStream.read_short() + self.dataValues = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_short() + self.dataValues[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 5 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/grid_data_type2.py b/dis/grid_data_type2.py new file mode 100644 index 0000000..3c4cfa7 --- /dev/null +++ b/dis/grid_data_type2.py @@ -0,0 +1,106 @@ +from enum import Enum + +from .grid_data import GridData + +class GridDataType2( GridData ): + """6.2.41, table 70""" + + def __init__(self): + """ Initializer for GridDataType2""" + super().__init__() + self.numberOfValues = 0 + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + self.dataValues = [] + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "NumberOfValues : " + str(self.numberOfValues) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "DataValues : " + "\n" + for idx in range(0, len(self.dataValues)): + outputString += str(self.dataValues[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( GridDataType2, self ).serialize(outputStream) + outputStream.write_short(int(self.numberOfValues)) + outputStream.write_short(int(self.padding)) + for idx in range(0, 0): + outputStream.write_float( self.dataValues[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( GridDataType2, self).parse(inputStream) + self.numberOfValues = inputStream.read_short() + self.padding = inputStream.read_short() + self.dataValues = [0]*0 + for idx in range(0, 0): + val = inputStream.read_float() + self.dataValues[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/gridded_data_pdu.py b/dis/gridded_data_pdu.py new file mode 100644 index 0000000..d43fbff --- /dev/null +++ b/dis/gridded_data_pdu.py @@ -0,0 +1,260 @@ +from enum import Enum + +from .grid_axis_descriptor import GridAxisDescriptor +from .entity_type import EntityType +from .euler_angles import EulerAngles +from .clock_time import ClockTime +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .grid_data import GridData +from .synthetic_environment_family_pdu import SyntheticEnvironmentFamilyPdu +from .siso_ref_010.enums.gridded_data_coordinate_system import GriddedDataCoordinateSystem +from .siso_ref_010.enums.gridded_data_constant_grid import GriddedDataConstantGrid +from .simulation_identifier import SimulationIdentifier + +class GriddedDataPdu( SyntheticEnvironmentFamilyPdu ): + """7.10.3 Used to communicate information about global, spatially varying environmental effects.""" + + def __init__(self): + """ Initializer for GriddedDataPdu""" + super().__init__() + """ environmental simulation application ID provides a unique identifier""" + self.environmentalSimulationApplicationID = SimulationIdentifier() + """ unique identifier for each piece of environmental data""" + self.fieldNumber = 0 + """ sequence number for the total set of PDUS used to transmit the data""" + self.pduNumber = 0 + """ Total number of PDUS used to transmit the data""" + self.pduTotal = 0 + # /** coordinate system of the grid uid 244 */ + self.coordinateSystem = GriddedDataCoordinateSystem.default + + """ number of grid axes for the environmental data""" + self.numberOfGridAxes = 0 + # /** are domain grid axes identidal to those of the priveious domain update? uid 245 */ + self.constantGrid = GriddedDataConstantGrid.default + + """ type of environment""" + self.environmentType = EntityType() + """ orientation of the data grid""" + self.orientation = EulerAngles() + """ valid time of the enviormental data sample, 64-bit unsigned int""" + self.sampleTime = ClockTime() + """ total number of all data values for all pdus for an environmental sample""" + self.totalValues = 0 + """ total number of data values at each grid point.""" + self.vectorDimension = 0 + """ padding""" + self.padding1 = 0 + """ padding""" + self.padding2 = 0 + """ """ + self._gridAxisDescriptors = [] + """ """ + self._gridDataRecords = [] + self.pduType = DisPduType.gridded_data + + + def get_numberOfGridAxes(self): + return len(self._gridDataRecords) + def set_numberOfGridAxes(self, value): + numberOfGridAxes = value + + + def get_gridAxisDescriptors(self): + return self._gridAxisDescriptors + def set_gridAxisDescriptors(self, value): + self._gridAxisDescriptors = value + gridAxisDescriptors = property(get_gridAxisDescriptors, set_gridAxisDescriptors) + + + def add_gridAxisDescriptors(self, value : GridAxisDescriptor): + self._gridAxisDescriptors.append(value) + + + """ + /// Name : gridAxisDescriptors + /// UID : + /// Type : GridAxisDescriptor + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_gridDataRecords(self): + return self._gridDataRecords + def set_gridDataRecords(self, value): + self._gridDataRecords = value + gridDataRecords = property(get_gridDataRecords, set_gridDataRecords) + + + def add_gridDataRecords(self, value : GridData): + self._gridDataRecords.append(value) + + + """ + /// Name : gridDataRecords + /// UID : + /// Type : GridData + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "EnvironmentalSimulationApplicationID :" + "\n" + self.environmentalSimulationApplicationID.to_string() + "\n" + outputString += "FieldNumber : " + str(self.fieldNumber) + "\n" + outputString += "PduNumber : " + str(self.pduNumber) + "\n" + outputString += "PduTotal : " + str(self.pduTotal) + "\n" + outputString += "GriddedDataCoordinateSystem : " + self.coordinateSystem.get_description + "(" + (str(int(self.coordinateSystem))) + ")" + "\n" + outputString += "NumberOfGridAxes : " + str(len(self._gridDataRecords)) + "\n" + outputString += "GriddedDataConstantGrid : " + self.constantGrid.get_description + "(" + (str(int(self.constantGrid))) + ")" + "\n" + outputString += "EnvironmentType :" + "\n" + self.environmentType.to_string() + "\n" + outputString += "Orientation :" + "\n" + self.orientation.to_string() + "\n" + outputString += "SampleTime :" + "\n" + self.sampleTime.to_string() + "\n" + outputString += "TotalValues : " + str(self.totalValues) + "\n" + outputString += "VectorDimension : " + str(self.vectorDimension) + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + outputString += "GridAxisDescriptors : " + "\n" + for idx in range(0, len(self._gridAxisDescriptors)): + outputString += self._gridAxisDescriptors[idx].to_string() + + outputString += "GridDataRecords : " + "\n" + for idx in range(0, len(self._gridDataRecords)): + outputString += self._gridDataRecords[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( GriddedDataPdu, self ).serialize(outputStream) + self.environmentalSimulationApplicationID.serialize(outputStream) + outputStream.write_short(int(self.fieldNumber)) + outputStream.write_short(int(self.pduNumber)) + outputStream.write_short(int(self.pduTotal)) + self.serialize_enum(self.coordinateSystem,outputStream) + outputStream.write_byte( len(self._gridDataRecords)) + self.serialize_enum(self.constantGrid,outputStream) + self.environmentType.serialize(outputStream) + self.orientation.serialize(outputStream) + self.sampleTime.serialize(outputStream) + outputStream.write_int(int(self.totalValues)) + outputStream.write_byte(int(self.vectorDimension)) + outputStream.write_byte(int(self.padding1)) + outputStream.write_short(int(self.padding2)) + for anObj in self._gridAxisDescriptors: + anObj.serialize(outputStream) + + for anObj in self._gridDataRecords: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( GriddedDataPdu, self).parse(inputStream) + self.environmentalSimulationApplicationID.parse(inputStream) + self.fieldNumber = inputStream.read_short() + self.pduNumber = inputStream.read_short() + self.pduTotal = inputStream.read_short() + self.coordinateSystem = GriddedDataCoordinateSystem.get_enum(self.parse_enum(self.coordinateSystem,inputStream)) + self.numberOfGridAxes = inputStream.read_byte() + self.constantGrid = GriddedDataConstantGrid.get_enum(self.parse_enum(self.constantGrid,inputStream)) + self.environmentType.parse(inputStream) + self.orientation.parse(inputStream) + self.sampleTime.parse(inputStream) + self.totalValues = inputStream.read_int() + self.vectorDimension = inputStream.read_byte() + self.padding1 = inputStream.read_byte() + self.padding2 = inputStream.read_short() + for idx in range(0, self.numberOfGridAxes): + element = GridAxisDescriptor() + element.parse(inputStream) + self._gridAxisDescriptors.append(element) + + for idx in range(0, self.numberOfGridAxes): + element = GridData() + element.parse(inputStream) + self._gridDataRecords.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 16 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/group_id.py b/dis/group_id.py new file mode 100644 index 0000000..1eaad68 --- /dev/null +++ b/dis/group_id.py @@ -0,0 +1,90 @@ +from enum import Enum + +from .simulation_address import SimulationAddress + +class GroupID( object ): + """Unique designation of a group of entities contained in the isGroupOfPdu. Represents a group of entities rather than a single entity. Section 6.2.43""" + + def __init__(self): + """ Initializer for GroupID""" + """ Simulation address (site and application number)""" + self.simulationAddress = SimulationAddress() + """ group number""" + self.groupNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "SimulationAddress :" + "\n" + self.simulationAddress.to_string() + "\n" + outputString += "GroupNumber : " + str(self.groupNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.simulationAddress.serialize(outputStream) + outputStream.write_short(int(self.groupNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.simulationAddress.parse(inputStream) + self.groupNumber = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/identification_friend_or_foe_pdu.py b/dis/identification_friend_or_foe_pdu.py new file mode 100644 index 0000000..45fdb5b --- /dev/null +++ b/dis/identification_friend_or_foe_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class IdentificationFriendOrFoePdu( object ): + """alias, more descriptive name for an IFFPdu.""" + + def __init__(self): + """ Initializer for IdentificationFriendOrFoePdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/iffdata.py b/dis/iffdata.py new file mode 100644 index 0000000..da538f5 --- /dev/null +++ b/dis/iffdata.py @@ -0,0 +1,105 @@ +from enum import Enum + +from .siso_ref_010.enums.variable_record_type import VariableRecordType + +class IFFData( object ): + """repeating element in IFF Data specification record""" + + def __init__(self): + """ Initializer for IFFData""" + # /** enumeration for type of record uid 66 Variable Record Type values are defined by VariableRecordType enumerations */ + self.recordType = VariableRecordType.default + + """ length of record, including padding""" + self.recordLength = 0 + self.recordSpecificFields = [] + self.padding = [0] * 32 + + def to_string(self) ->str: + outputString = "" + outputString += "VariableRecordType : " + self.recordType.get_description + "(" + (str(int(self.recordType))) + ")" + "\n" + outputString += "RecordLength : " + str(self.recordLength) + "\n" + outputString += "RecordSpecificFields : " + "\n" + for idx in range(0, len(self.recordSpecificFields)): + outputString += str(self.recordSpecificFields[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.recordType,outputStream) + outputStream.write_short(int(self.recordLength)) + for idx in range(0, 0): + outputStream.write_unsigned_byte( self.recordSpecificFields[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordType = VariableRecordType.get_enum(self.parse_enum(self.recordType,inputStream)) + self.recordLength = inputStream.read_short() + self.recordSpecificFields = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_byte() + self.recordSpecificFields[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/iffdata_specification.py b/dis/iffdata_specification.py new file mode 100644 index 0000000..355bde0 --- /dev/null +++ b/dis/iffdata_specification.py @@ -0,0 +1,135 @@ +from enum import Enum + +from .iffdata import IFFData + +class IFFDataSpecification( object ): + """Requires hand coding to be useful. Section 6.2.43""" + + def __init__(self): + """ Initializer for IFFDataSpecification""" + """ Number of IFF records""" + self.numberOfIFFDataRecords = 0 + """ IFF data records""" + self._iffDataRecords = [] + + + def get_numberOfIFFDataRecords(self): + return len(self._iffDataRecords) + def set_numberOfIFFDataRecords(self, value): + numberOfIFFDataRecords = value + + + def get_iffDataRecords(self): + return self._iffDataRecords + def set_iffDataRecords(self, value): + self._iffDataRecords = value + iffDataRecords = property(get_iffDataRecords, set_iffDataRecords) + + + def add_iffDataRecords(self, value : IFFData): + self._iffDataRecords.append(value) + + + """ + /// Name : iffDataRecords + /// UID : + /// Type : IFFData + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : IFF data records + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += "NumberOfIFFDataRecords : " + str(len(self._iffDataRecords)) + "\n" + outputString += "IffDataRecords : " + "\n" + for idx in range(0, len(self._iffDataRecords)): + outputString += self._iffDataRecords[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short( len(self._iffDataRecords)) + for anObj in self._iffDataRecords: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.numberOfIFFDataRecords = inputStream.read_short() + for idx in range(0, self.numberOfIFFDataRecords): + element = IFFData() + element.parse(inputStream) + self._iffDataRecords.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/ifffundamental_parameter_data.py b/dis/ifffundamental_parameter_data.py new file mode 100644 index 0000000..66ab5b6 --- /dev/null +++ b/dis/ifffundamental_parameter_data.py @@ -0,0 +1,125 @@ +from enum import Enum + +from .siso_ref_010.enums.iffapplicable_modes import IFFApplicableModes + +class IFFFundamentalParameterData( object ): + """Fundamental IFF atc data. Section 6.2.44""" + + def __init__(self): + """ Initializer for IFFFundamentalParameterData""" + """ ERP""" + self.erp = 0.0 + """ frequency""" + self.frequency = 0.0 + """ pgrf""" + self.pgrf = 0.0 + """ Pulse width""" + self.pulseWidth = 0.0 + """ Burst length""" + self.burstLength = 0 + # /** Applicable modes enumeration uid 339 */ + self.applicableModes = IFFApplicableModes.default + + """ System-specific data""" + self.systemSpecificData = [ 0, 0, 0] + + def to_string(self) ->str: + outputString = "" + outputString += "Erp : " + str(self.erp) + "\n" + outputString += "Frequency : " + str(self.frequency) + "\n" + outputString += "Pgrf : " + str(self.pgrf) + "\n" + outputString += "PulseWidth : " + str(self.pulseWidth) + "\n" + outputString += "BurstLength : " + str(self.burstLength) + "\n" + outputString += "IFFApplicableModes : " + self.applicableModes.get_description + "(" + (str(int(self.applicableModes))) + ")" + "\n" + outputString += "SystemSpecificData : " + "\n" + for idx in range(0, len(self.systemSpecificData)): + outputString += str(self.systemSpecificData[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_float(int(self.erp)) + outputStream.write_float(int(self.frequency)) + outputStream.write_float(int(self.pgrf)) + outputStream.write_float(int(self.pulseWidth)) + outputStream.write_int(int(self.burstLength)) + self.serialize_enum(self.applicableModes,outputStream) + for idx in range(0, 3): + outputStream.write_unsigned_byte( self.systemSpecificData[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.erp = inputStream.read_float() + self.frequency = inputStream.read_float() + self.pgrf = inputStream.read_float() + self.pulseWidth = inputStream.read_float() + self.burstLength = inputStream.read_int() + self.applicableModes = IFFApplicableModes.get_enum(self.parse_enum(self.applicableModes,inputStream)) + self.systemSpecificData = [0]*3 + for idx in range(0, 3): + val = inputStream.read_unsigned_byte() + self.systemSpecificData[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 7 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/iffpdu.py b/dis/iffpdu.py new file mode 100644 index 0000000..7be2afa --- /dev/null +++ b/dis/iffpdu.py @@ -0,0 +1,162 @@ +from enum import Enum + +from .iffpdu_layer3interrogator_format_data import IFFPduLayer3InterrogatorFormatData +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .vector3float import Vector3Float +from .entity_id import EntityID +from .event_identifier import EventIdentifier +from .distributed_emissions_regeneration_family_pdu import DistributedEmissionsRegenerationFamilyPdu +from .iffpdu_layer4interrogator_format_data import IFFPduLayer4InterrogatorFormatData +from .iffpdu_layer2data import IFFPduLayer2Data +from .fundamental_operational_data import FundamentalOperationalData +from .system_identifier import SystemIdentifier +from .iffpdu_layer4transponder_format_data import IFFPduLayer4TransponderFormatData +from .iffpdu_layer5data import IFFPduLayer5Data +from .iffpdu_layer3transponder_format_data import IFFPduLayer3TransponderFormatData + +class IFFPdu( DistributedEmissionsRegenerationFamilyPdu ): + """7.6.5.1 Information about military and civilian interrogators, transponders, and specific other electronic systems. See 5.7.6""" + + def __init__(self): + """ Initializer for IFFPdu""" + super().__init__() + """ ID of the entity that is the source of the emissions. Part of Layer 1 basic system data 7.6.5.2.""" + self.emittingEntityId = EntityID() + """ Number generated by the issuing simulation to associate realted events. Part of Layer 1 basic system data 7.6.5.2.""" + self.eventID = EventIdentifier() + """ Location wrt entity. There is some ambiguity in the standard here, but this is the order it is listed in the table. Part of Layer 1 basic system data 7.6.5.2.""" + self.location = Vector3Float() + """ System ID information. Part of Layer 1 basic system data 7.6.5.2.""" + self.systemID = SystemIdentifier() + """ Part of Layer 1 basic system data 7.6.5.2.""" + self.systemDesignator = 0 + """ Part of Layer 1 basic system data 7.6.5.2.""" + self.systemSpecificData = 0 + """ Fundamental parameters. Part of Layer 1 basic system data 7.6.5.2.""" + self.fundamentalParameters = FundamentalOperationalData() + """ IFF pdu layer 2 data""" + self.iFFPduLayer2Data = IFFPduLayer2Data() + """ IFF pdu layer 3 transponder format data""" + self.iFFPduLayer3TransponderFormatData = IFFPduLayer3TransponderFormatData() + """ IFF pdu layer 3 interrogator format data""" + self.iFFPduLayer3InterrogatorFormatData = IFFPduLayer3InterrogatorFormatData() + """ IFF pdu layer 4 interrogator format data""" + self.iFFPduLayer4InterrogatorFormatData = IFFPduLayer4InterrogatorFormatData() + """ IFF pdu layer 4 transponder format data""" + self.iFFPduLayer4TransponderFormatData = IFFPduLayer4TransponderFormatData() + """ IFF pdu layer 5 data communications""" + self.iFFPduLayer5Data = IFFPduLayer5Data() + self.pduType = DisPduType.identification_friend_or_foe + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "EmittingEntityId :" + "\n" + self.emittingEntityId.to_string() + "\n" + outputString += "EventID :" + "\n" + self.eventID.to_string() + "\n" + outputString += "Location :" + "\n" + self.location.to_string() + "\n" + outputString += "SystemID :" + "\n" + self.systemID.to_string() + "\n" + outputString += "SystemDesignator : " + str(self.systemDesignator) + "\n" + outputString += "SystemSpecificData : " + str(self.systemSpecificData) + "\n" + outputString += "FundamentalParameters :" + "\n" + self.fundamentalParameters.to_string() + "\n" + outputString += "IFFPduLayer2Data :" + "\n" + self.iFFPduLayer2Data.to_string() + "\n" + outputString += "IFFPduLayer3TransponderFormatData :" + "\n" + self.iFFPduLayer3TransponderFormatData.to_string() + "\n" + outputString += "IFFPduLayer3InterrogatorFormatData :" + "\n" + self.iFFPduLayer3InterrogatorFormatData.to_string() + "\n" + outputString += "IFFPduLayer4InterrogatorFormatData :" + "\n" + self.iFFPduLayer4InterrogatorFormatData.to_string() + "\n" + outputString += "IFFPduLayer4TransponderFormatData :" + "\n" + self.iFFPduLayer4TransponderFormatData.to_string() + "\n" + outputString += "IFFPduLayer5Data :" + "\n" + self.iFFPduLayer5Data.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( IFFPdu, self ).serialize(outputStream) + self.emittingEntityId.serialize(outputStream) + self.eventID.serialize(outputStream) + self.location.serialize(outputStream) + self.systemID.serialize(outputStream) + outputStream.write_byte(int(self.systemDesignator)) + outputStream.write_byte(int(self.systemSpecificData)) + self.fundamentalParameters.serialize(outputStream) + self.iFFPduLayer2Data.serialize(outputStream) + self.iFFPduLayer3TransponderFormatData.serialize(outputStream) + self.iFFPduLayer3InterrogatorFormatData.serialize(outputStream) + self.iFFPduLayer4InterrogatorFormatData.serialize(outputStream) + self.iFFPduLayer4TransponderFormatData.serialize(outputStream) + self.iFFPduLayer5Data.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( IFFPdu, self).parse(inputStream) + self.emittingEntityId.parse(inputStream) + self.eventID.parse(inputStream) + self.location.parse(inputStream) + self.systemID.parse(inputStream) + self.systemDesignator = inputStream.read_byte() + self.systemSpecificData = inputStream.read_byte() + self.fundamentalParameters.parse(inputStream) + self.iFFPduLayer2Data.parse(inputStream) + self.iFFPduLayer3TransponderFormatData.parse(inputStream) + self.iFFPduLayer3InterrogatorFormatData.parse(inputStream) + self.iFFPduLayer4InterrogatorFormatData.parse(inputStream) + self.iFFPduLayer4TransponderFormatData.parse(inputStream) + self.iFFPduLayer5Data.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 13 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/iffpdu_layer2data.py b/dis/iffpdu_layer2data.py new file mode 100644 index 0000000..58b8b22 --- /dev/null +++ b/dis/iffpdu_layer2data.py @@ -0,0 +1,159 @@ +from enum import Enum + +from .layer_header import LayerHeader +from .beam_data import BeamData +from .ifffundamental_parameter_data import IFFFundamentalParameterData +from .abstract_iffpdu_layer_data import AbstractIFFPduLayerData + +class IFFPduLayer2Data( AbstractIFFPduLayerData ): + """7.6.5.3 Layer 2 emissions data""" + + def __init__(self): + """ Initializer for IFFPduLayer2Data""" + super().__init__() + """ Layer header""" + self.layerHeader = LayerHeader() + """ Beam data""" + self.beamData = BeamData() + self.secondaryOpParameter1 = 0 + self.secondaryOpParameter2 = 0 + self.numberOfIFFFundamentalParameterDataRecordsParameters = 0 + """ Variable length list of fundamental parameters.""" + self._IFFFundamentalParameterDataRecord = [] + + + def get_numberOfIFFFundamentalParameterDataRecordsParameters(self): + return len(self._IFFFundamentalParameterDataRecord) + def set_numberOfIFFFundamentalParameterDataRecordsParameters(self, value): + numberOfIFFFundamentalParameterDataRecordsParameters = value + + + def get_IFFFundamentalParameterDataRecord(self): + return self._IFFFundamentalParameterDataRecord + def set_IFFFundamentalParameterDataRecord(self, value): + self._IFFFundamentalParameterDataRecord = value + IFFFundamentalParameterDataRecord = property(get_IFFFundamentalParameterDataRecord, set_IFFFundamentalParameterDataRecord) + + + def add_IFFFundamentalParameterDataRecord(self, value : IFFFundamentalParameterData): + self._IFFFundamentalParameterDataRecord.append(value) + + + """ + /// Name : IFFFundamentalParameterDataRecord + /// UID : + /// Type : IFFFundamentalParameterData + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Variable length list of fundamental parameters. + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "LayerHeader :" + "\n" + self.layerHeader.to_string() + "\n" + outputString += "BeamData :" + "\n" + self.beamData.to_string() + "\n" + outputString += "SecondaryOpParameter1 : " + str(self.secondaryOpParameter1) + "\n" + outputString += "SecondaryOpParameter2 : " + str(self.secondaryOpParameter2) + "\n" + outputString += "NumberOfIFFFundamentalParameterDataRecordsParameters : " + str(len(self._IFFFundamentalParameterDataRecord)) + "\n" + outputString += "IFFFundamentalParameterDataRecord : " + "\n" + for idx in range(0, len(self._IFFFundamentalParameterDataRecord)): + outputString += self._IFFFundamentalParameterDataRecord[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( IFFPduLayer2Data, self ).serialize(outputStream) + self.layerHeader.serialize(outputStream) + self.beamData.serialize(outputStream) + outputStream.write_byte(int(self.secondaryOpParameter1)) + outputStream.write_byte(int(self.secondaryOpParameter2)) + outputStream.write_short( len(self._IFFFundamentalParameterDataRecord)) + for anObj in self._IFFFundamentalParameterDataRecord: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( IFFPduLayer2Data, self).parse(inputStream) + self.layerHeader.parse(inputStream) + self.beamData.parse(inputStream) + self.secondaryOpParameter1 = inputStream.read_byte() + self.secondaryOpParameter2 = inputStream.read_byte() + self.numberOfIFFFundamentalParameterDataRecordsParameters = inputStream.read_short() + for idx in range(0, self.numberOfIFFFundamentalParameterDataRecordsParameters): + element = IFFFundamentalParameterData() + element.parse(inputStream) + self._IFFFundamentalParameterDataRecord.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/iffpdu_layer3interrogator_format_data.py b/dis/iffpdu_layer3interrogator_format_data.py new file mode 100644 index 0000000..8506ca2 --- /dev/null +++ b/dis/iffpdu_layer3interrogator_format_data.py @@ -0,0 +1,166 @@ +from enum import Enum + +from .layer_header import LayerHeader +from .mode5interrogator_basic_data import Mode5InterrogatorBasicData +from .iffdata_specification import IFFDataSpecification +from .abstract_iffpdu_layer_data import AbstractIFFPduLayerData + +class IFFPduLayer3InterrogatorFormatData( AbstractIFFPduLayerData ): + """7.6.5.4.2 Layer 3 Mode 5 interrogator format""" + + def __init__(self): + """ Initializer for IFFPduLayer3InterrogatorFormatData""" + super().__init__() + """ Layer header""" + self.layerHeader = LayerHeader() + """ 6.2.80 Site number, part of reporting simulation field""" + self.siteNumber = 0 + """ 6.2.80 Application number, part of reporting simulation field""" + self.applicationNumber = 0 + """ Mode 5 interrogator basic data""" + self.mode5InterrogatorBasicData = Mode5InterrogatorBasicData() + """ Padding""" + self.padding = 0 + self.numberOfIFFFundamentalParameterDataRecordsParameters = 0 + """ Variable length list of fundamental parameters.""" + self._IFFFundamentalParameterDataRecord = [] + + + def get_numberOfIFFFundamentalParameterDataRecordsParameters(self): + return len(self._IFFFundamentalParameterDataRecord) + def set_numberOfIFFFundamentalParameterDataRecordsParameters(self, value): + numberOfIFFFundamentalParameterDataRecordsParameters = value + + + def get_IFFFundamentalParameterDataRecord(self): + return self._IFFFundamentalParameterDataRecord + def set_IFFFundamentalParameterDataRecord(self, value): + self._IFFFundamentalParameterDataRecord = value + IFFFundamentalParameterDataRecord = property(get_IFFFundamentalParameterDataRecord, set_IFFFundamentalParameterDataRecord) + + + def add_IFFFundamentalParameterDataRecord(self, value : IFFDataSpecification): + self._IFFFundamentalParameterDataRecord.append(value) + + + """ + /// Name : IFFFundamentalParameterDataRecord + /// UID : + /// Type : IFFDataSpecification + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Variable length list of fundamental parameters. + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "LayerHeader :" + "\n" + self.layerHeader.to_string() + "\n" + outputString += "SiteNumber : " + str(self.siteNumber) + "\n" + outputString += "ApplicationNumber : " + str(self.applicationNumber) + "\n" + outputString += "Mode5InterrogatorBasicData :" + "\n" + self.mode5InterrogatorBasicData.to_string() + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "NumberOfIFFFundamentalParameterDataRecordsParameters : " + str(len(self._IFFFundamentalParameterDataRecord)) + "\n" + outputString += "IFFFundamentalParameterDataRecord : " + "\n" + for idx in range(0, len(self._IFFFundamentalParameterDataRecord)): + outputString += self._IFFFundamentalParameterDataRecord[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( IFFPduLayer3InterrogatorFormatData, self ).serialize(outputStream) + self.layerHeader.serialize(outputStream) + outputStream.write_short(int(self.siteNumber)) + outputStream.write_short(int(self.applicationNumber)) + self.mode5InterrogatorBasicData.serialize(outputStream) + outputStream.write_short(int(self.padding)) + outputStream.write_short( len(self._IFFFundamentalParameterDataRecord)) + for anObj in self._IFFFundamentalParameterDataRecord: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( IFFPduLayer3InterrogatorFormatData, self).parse(inputStream) + self.layerHeader.parse(inputStream) + self.siteNumber = inputStream.read_short() + self.applicationNumber = inputStream.read_short() + self.mode5InterrogatorBasicData.parse(inputStream) + self.padding = inputStream.read_short() + self.numberOfIFFFundamentalParameterDataRecordsParameters = inputStream.read_short() + for idx in range(0, self.numberOfIFFFundamentalParameterDataRecordsParameters): + element = IFFDataSpecification() + element.parse(inputStream) + self._IFFFundamentalParameterDataRecord.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 7 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/iffpdu_layer3transponder_format_data.py b/dis/iffpdu_layer3transponder_format_data.py new file mode 100644 index 0000000..775af66 --- /dev/null +++ b/dis/iffpdu_layer3transponder_format_data.py @@ -0,0 +1,166 @@ +from enum import Enum + +from .layer_header import LayerHeader +from .mode5transponder_basic_data import Mode5TransponderBasicData +from .iffdata_specification import IFFDataSpecification +from .abstract_iffpdu_layer_data import AbstractIFFPduLayerData + +class IFFPduLayer3TransponderFormatData( AbstractIFFPduLayerData ): + """7.6.5.4.3 Layer 3 Mode 5 transponder format""" + + def __init__(self): + """ Initializer for IFFPduLayer3TransponderFormatData""" + super().__init__() + """ Layer header""" + self.layerHeader = LayerHeader() + """ 6.2.80 Site number, part of reporting simulation field""" + self.siteNumber = 0 + """ 6.2.80 Application number, part of reporting simulation field""" + self.applicationNumber = 0 + """ Mode 5 transponder basic data""" + self.mode5TransponderBasicData = Mode5TransponderBasicData() + """ Padding""" + self.padding = 0 + self.numberOfIFFFundamentalParameterDataRecordsParameters = 0 + """ Variable length list of fundamental parameters.""" + self._IFFFundamentalParameterDataRecord = [] + + + def get_numberOfIFFFundamentalParameterDataRecordsParameters(self): + return len(self._IFFFundamentalParameterDataRecord) + def set_numberOfIFFFundamentalParameterDataRecordsParameters(self, value): + numberOfIFFFundamentalParameterDataRecordsParameters = value + + + def get_IFFFundamentalParameterDataRecord(self): + return self._IFFFundamentalParameterDataRecord + def set_IFFFundamentalParameterDataRecord(self, value): + self._IFFFundamentalParameterDataRecord = value + IFFFundamentalParameterDataRecord = property(get_IFFFundamentalParameterDataRecord, set_IFFFundamentalParameterDataRecord) + + + def add_IFFFundamentalParameterDataRecord(self, value : IFFDataSpecification): + self._IFFFundamentalParameterDataRecord.append(value) + + + """ + /// Name : IFFFundamentalParameterDataRecord + /// UID : + /// Type : IFFDataSpecification + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Variable length list of fundamental parameters. + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "LayerHeader :" + "\n" + self.layerHeader.to_string() + "\n" + outputString += "SiteNumber : " + str(self.siteNumber) + "\n" + outputString += "ApplicationNumber : " + str(self.applicationNumber) + "\n" + outputString += "Mode5TransponderBasicData :" + "\n" + self.mode5TransponderBasicData.to_string() + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "NumberOfIFFFundamentalParameterDataRecordsParameters : " + str(len(self._IFFFundamentalParameterDataRecord)) + "\n" + outputString += "IFFFundamentalParameterDataRecord : " + "\n" + for idx in range(0, len(self._IFFFundamentalParameterDataRecord)): + outputString += self._IFFFundamentalParameterDataRecord[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( IFFPduLayer3TransponderFormatData, self ).serialize(outputStream) + self.layerHeader.serialize(outputStream) + outputStream.write_short(int(self.siteNumber)) + outputStream.write_short(int(self.applicationNumber)) + self.mode5TransponderBasicData.serialize(outputStream) + outputStream.write_short(int(self.padding)) + outputStream.write_short( len(self._IFFFundamentalParameterDataRecord)) + for anObj in self._IFFFundamentalParameterDataRecord: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( IFFPduLayer3TransponderFormatData, self).parse(inputStream) + self.layerHeader.parse(inputStream) + self.siteNumber = inputStream.read_short() + self.applicationNumber = inputStream.read_short() + self.mode5TransponderBasicData.parse(inputStream) + self.padding = inputStream.read_short() + self.numberOfIFFFundamentalParameterDataRecordsParameters = inputStream.read_short() + for idx in range(0, self.numberOfIFFFundamentalParameterDataRecordsParameters): + element = IFFDataSpecification() + element.parse(inputStream) + self._IFFFundamentalParameterDataRecord.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 7 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/iffpdu_layer4interrogator_format_data.py b/dis/iffpdu_layer4interrogator_format_data.py new file mode 100644 index 0000000..ee312a1 --- /dev/null +++ b/dis/iffpdu_layer4interrogator_format_data.py @@ -0,0 +1,166 @@ +from enum import Enum + +from .layer_header import LayerHeader +from .mode_sinterrogator_basic_data import ModeSInterrogatorBasicData +from .iffdata_specification import IFFDataSpecification +from .abstract_iffpdu_layer_data import AbstractIFFPduLayerData + +class IFFPduLayer4InterrogatorFormatData( AbstractIFFPduLayerData ): + """7.6.5.5.2 Layer 4 Mode S interrogator format""" + + def __init__(self): + """ Initializer for IFFPduLayer4InterrogatorFormatData""" + super().__init__() + """ Layer header""" + self.layerHeader = LayerHeader() + """ 6.2.80 Site number, part of reporting simulation field""" + self.siteNumber = 0 + """ 6.2.80 Application number, part of reporting simulation field""" + self.applicationNumber = 0 + """ Mode S interrogator basic data""" + self.modeSInterrogatorBasicData = ModeSInterrogatorBasicData() + """ Padding""" + self.padding = 0 + self.numberOfIFFFundamentalParameterDataRecordsParameters = 0 + """ Variable length list of fundamental parameters.""" + self._IFFFundamentalParameterDataRecord = [] + + + def get_numberOfIFFFundamentalParameterDataRecordsParameters(self): + return len(self._IFFFundamentalParameterDataRecord) + def set_numberOfIFFFundamentalParameterDataRecordsParameters(self, value): + numberOfIFFFundamentalParameterDataRecordsParameters = value + + + def get_IFFFundamentalParameterDataRecord(self): + return self._IFFFundamentalParameterDataRecord + def set_IFFFundamentalParameterDataRecord(self, value): + self._IFFFundamentalParameterDataRecord = value + IFFFundamentalParameterDataRecord = property(get_IFFFundamentalParameterDataRecord, set_IFFFundamentalParameterDataRecord) + + + def add_IFFFundamentalParameterDataRecord(self, value : IFFDataSpecification): + self._IFFFundamentalParameterDataRecord.append(value) + + + """ + /// Name : IFFFundamentalParameterDataRecord + /// UID : + /// Type : IFFDataSpecification + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Variable length list of fundamental parameters. + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "LayerHeader :" + "\n" + self.layerHeader.to_string() + "\n" + outputString += "SiteNumber : " + str(self.siteNumber) + "\n" + outputString += "ApplicationNumber : " + str(self.applicationNumber) + "\n" + outputString += "ModeSInterrogatorBasicData :" + "\n" + self.modeSInterrogatorBasicData.to_string() + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "NumberOfIFFFundamentalParameterDataRecordsParameters : " + str(len(self._IFFFundamentalParameterDataRecord)) + "\n" + outputString += "IFFFundamentalParameterDataRecord : " + "\n" + for idx in range(0, len(self._IFFFundamentalParameterDataRecord)): + outputString += self._IFFFundamentalParameterDataRecord[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( IFFPduLayer4InterrogatorFormatData, self ).serialize(outputStream) + self.layerHeader.serialize(outputStream) + outputStream.write_short(int(self.siteNumber)) + outputStream.write_short(int(self.applicationNumber)) + self.modeSInterrogatorBasicData.serialize(outputStream) + outputStream.write_short(int(self.padding)) + outputStream.write_short( len(self._IFFFundamentalParameterDataRecord)) + for anObj in self._IFFFundamentalParameterDataRecord: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( IFFPduLayer4InterrogatorFormatData, self).parse(inputStream) + self.layerHeader.parse(inputStream) + self.siteNumber = inputStream.read_short() + self.applicationNumber = inputStream.read_short() + self.modeSInterrogatorBasicData.parse(inputStream) + self.padding = inputStream.read_short() + self.numberOfIFFFundamentalParameterDataRecordsParameters = inputStream.read_short() + for idx in range(0, self.numberOfIFFFundamentalParameterDataRecordsParameters): + element = IFFDataSpecification() + element.parse(inputStream) + self._IFFFundamentalParameterDataRecord.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 7 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/iffpdu_layer4transponder_format_data.py b/dis/iffpdu_layer4transponder_format_data.py new file mode 100644 index 0000000..3bb956d --- /dev/null +++ b/dis/iffpdu_layer4transponder_format_data.py @@ -0,0 +1,166 @@ +from enum import Enum + +from .layer_header import LayerHeader +from .mode_stransponder_basic_data import ModeSTransponderBasicData +from .iffdata_specification import IFFDataSpecification +from .abstract_iffpdu_layer_data import AbstractIFFPduLayerData + +class IFFPduLayer4TransponderFormatData( AbstractIFFPduLayerData ): + """7.6.5.5.3 Layer 4 Mode S transponder format""" + + def __init__(self): + """ Initializer for IFFPduLayer4TransponderFormatData""" + super().__init__() + """ Layer header""" + self.layerHeader = LayerHeader() + """ 6.2.80 Site number, part of reporting simulation field""" + self.siteNumber = 0 + """ 6.2.80 Application number, part of reporting simulation field""" + self.applicationNumber = 0 + """ Mode S transponder basic data""" + self.modeSTransponderBasicData = ModeSTransponderBasicData() + """ Padding""" + self.padding = 0 + self.numberOfIFFFundamentalParameterDataRecordsParameters = 0 + """ Variable length list of fundamental parameters.""" + self._IFFFundamentalParameterDataRecord = [] + + + def get_numberOfIFFFundamentalParameterDataRecordsParameters(self): + return len(self._IFFFundamentalParameterDataRecord) + def set_numberOfIFFFundamentalParameterDataRecordsParameters(self, value): + numberOfIFFFundamentalParameterDataRecordsParameters = value + + + def get_IFFFundamentalParameterDataRecord(self): + return self._IFFFundamentalParameterDataRecord + def set_IFFFundamentalParameterDataRecord(self, value): + self._IFFFundamentalParameterDataRecord = value + IFFFundamentalParameterDataRecord = property(get_IFFFundamentalParameterDataRecord, set_IFFFundamentalParameterDataRecord) + + + def add_IFFFundamentalParameterDataRecord(self, value : IFFDataSpecification): + self._IFFFundamentalParameterDataRecord.append(value) + + + """ + /// Name : IFFFundamentalParameterDataRecord + /// UID : + /// Type : IFFDataSpecification + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Variable length list of fundamental parameters. + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "LayerHeader :" + "\n" + self.layerHeader.to_string() + "\n" + outputString += "SiteNumber : " + str(self.siteNumber) + "\n" + outputString += "ApplicationNumber : " + str(self.applicationNumber) + "\n" + outputString += "ModeSTransponderBasicData :" + "\n" + self.modeSTransponderBasicData.to_string() + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "NumberOfIFFFundamentalParameterDataRecordsParameters : " + str(len(self._IFFFundamentalParameterDataRecord)) + "\n" + outputString += "IFFFundamentalParameterDataRecord : " + "\n" + for idx in range(0, len(self._IFFFundamentalParameterDataRecord)): + outputString += self._IFFFundamentalParameterDataRecord[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( IFFPduLayer4TransponderFormatData, self ).serialize(outputStream) + self.layerHeader.serialize(outputStream) + outputStream.write_short(int(self.siteNumber)) + outputStream.write_short(int(self.applicationNumber)) + self.modeSTransponderBasicData.serialize(outputStream) + outputStream.write_short(int(self.padding)) + outputStream.write_short( len(self._IFFFundamentalParameterDataRecord)) + for anObj in self._IFFFundamentalParameterDataRecord: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( IFFPduLayer4TransponderFormatData, self).parse(inputStream) + self.layerHeader.parse(inputStream) + self.siteNumber = inputStream.read_short() + self.applicationNumber = inputStream.read_short() + self.modeSTransponderBasicData.parse(inputStream) + self.padding = inputStream.read_short() + self.numberOfIFFFundamentalParameterDataRecordsParameters = inputStream.read_short() + for idx in range(0, self.numberOfIFFFundamentalParameterDataRecordsParameters): + element = IFFDataSpecification() + element.parse(inputStream) + self._IFFFundamentalParameterDataRecord.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 7 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/iffpdu_layer5data.py b/dis/iffpdu_layer5data.py new file mode 100644 index 0000000..9c62055 --- /dev/null +++ b/dis/iffpdu_layer5data.py @@ -0,0 +1,177 @@ +from enum import Enum + +from .layer_header import LayerHeader +from .siso_ref_010.enums.data_category import DataCategory +from .iffdata_specification import IFFDataSpecification +from .abstract_iffpdu_layer_data import AbstractIFFPduLayerData + +class IFFPduLayer5Data( AbstractIFFPduLayerData ): + """7.6.5.6. Layer 5 data communications""" + + def __init__(self): + """ Initializer for IFFPduLayer5Data""" + super().__init__() + """ Layer header""" + self.layerHeader = LayerHeader() + """ 6.2.80 Site number, part of reporting simulation field""" + self.siteNumber = 0 + """ 6.2.80 Application number, part of reporting simulation field""" + self.applicationNumber = 0 + """ Padding""" + self.padding = 0 + """ Eight boolean fields. See 6.2.45.""" + self.applicableLayers = 0 + # /** Data category uid 369 */ + self.dataCategory = DataCategory.default + + """ Padding""" + self.padding2 = 0 + self.numberOfIFFFundamentalParameterDataRecordsParameters = 0 + """ Variable length list of fundamental parameters.""" + self._IFFFundamentalParameterDataRecord = [] + + + def get_numberOfIFFFundamentalParameterDataRecordsParameters(self): + return len(self._IFFFundamentalParameterDataRecord) + def set_numberOfIFFFundamentalParameterDataRecordsParameters(self, value): + numberOfIFFFundamentalParameterDataRecordsParameters = value + + + def get_IFFFundamentalParameterDataRecord(self): + return self._IFFFundamentalParameterDataRecord + def set_IFFFundamentalParameterDataRecord(self, value): + self._IFFFundamentalParameterDataRecord = value + IFFFundamentalParameterDataRecord = property(get_IFFFundamentalParameterDataRecord, set_IFFFundamentalParameterDataRecord) + + + def add_IFFFundamentalParameterDataRecord(self, value : IFFDataSpecification): + self._IFFFundamentalParameterDataRecord.append(value) + + + """ + /// Name : IFFFundamentalParameterDataRecord + /// UID : + /// Type : IFFDataSpecification + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Variable length list of fundamental parameters. + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "LayerHeader :" + "\n" + self.layerHeader.to_string() + "\n" + outputString += "SiteNumber : " + str(self.siteNumber) + "\n" + outputString += "ApplicationNumber : " + str(self.applicationNumber) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "ApplicableLayers : " + str(self.applicableLayers) + "\n" + outputString += "DataCategory : " + self.dataCategory.get_description + "(" + (str(int(self.dataCategory))) + ")" + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + outputString += "NumberOfIFFFundamentalParameterDataRecordsParameters : " + str(len(self._IFFFundamentalParameterDataRecord)) + "\n" + outputString += "IFFFundamentalParameterDataRecord : " + "\n" + for idx in range(0, len(self._IFFFundamentalParameterDataRecord)): + outputString += self._IFFFundamentalParameterDataRecord[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( IFFPduLayer5Data, self ).serialize(outputStream) + self.layerHeader.serialize(outputStream) + outputStream.write_short(int(self.siteNumber)) + outputStream.write_short(int(self.applicationNumber)) + outputStream.write_short(int(self.padding)) + outputStream.write_byte(int(self.applicableLayers)) + self.serialize_enum(self.dataCategory,outputStream) + outputStream.write_short(int(self.padding2)) + outputStream.write_short( len(self._IFFFundamentalParameterDataRecord)) + for anObj in self._IFFFundamentalParameterDataRecord: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( IFFPduLayer5Data, self).parse(inputStream) + self.layerHeader.parse(inputStream) + self.siteNumber = inputStream.read_short() + self.applicationNumber = inputStream.read_short() + self.padding = inputStream.read_short() + self.applicableLayers = inputStream.read_byte() + self.dataCategory = DataCategory.get_enum(self.parse_enum(self.dataCategory,inputStream)) + self.padding2 = inputStream.read_short() + self.numberOfIFFFundamentalParameterDataRecordsParameters = inputStream.read_short() + for idx in range(0, self.numberOfIFFFundamentalParameterDataRecordsParameters): + element = IFFDataSpecification() + element.parse(inputStream) + self._IFFFundamentalParameterDataRecord.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 9 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/information_operations_action_pdu.py b/dis/information_operations_action_pdu.py new file mode 100644 index 0000000..265f7bf --- /dev/null +++ b/dis/information_operations_action_pdu.py @@ -0,0 +1,197 @@ +from enum import Enum + +from .siso_ref_010.enums.ioaction_iosimulation_source import IOActionIOSimulationSource +from .siso_ref_010.enums.ioaction_ioaction_phase import IOActionIOActionPhase +from .iorecord import IORecord +from .siso_ref_010.enums.ioaction_iowarfare_type import IOActionIOWarfareType +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .information_operations_family_pdu import InformationOperationsFamilyPdu +from .entity_id import EntityID +from .siso_ref_010.enums.ioaction_ioaction_type import IOActionIOActionType + +class InformationOperationsActionPdu( InformationOperationsFamilyPdu ): + """5.13.3.1 Used to communicate an IO attack or the effects of an IO attack on one or more target entities.""" + + def __init__(self): + """ Initializer for InformationOperationsActionPdu""" + super().__init__() + """ the simulation to which this PDU is addressed""" + self.receivingSimID = EntityID() + """ request ID provides a unique identifier""" + self.requestID = 0 + # /** uid 285 */ + self.IOWarfareType = IOActionIOWarfareType.default + + # /** uid 286 */ + self.IOSimulationSource = IOActionIOSimulationSource.default + + # /** uid 287 */ + self.IOActionType = IOActionIOActionType.default + + # /** uid 288 */ + self.IOActionPhase = IOActionIOActionPhase.default + + self.padding1 = 0 + # ioAttackerID is an undescribed parameter... + self.ioAttackerID = EntityID() + # ioPrimaryTargetID is an undescribed parameter... + self.ioPrimaryTargetID = EntityID() + self.padding2 = 0 + self.numberOfIORecords = 0 + self._ioRecords = [] + self.pduType = DisPduType.information_operations_action + + + def get_numberOfIORecords(self): + return len(self._ioRecords) + def set_numberOfIORecords(self, value): + numberOfIORecords = value + + + def get_ioRecords(self): + return self._ioRecords + def set_ioRecords(self, value): + self._ioRecords = value + ioRecords = property(get_ioRecords, set_ioRecords) + + + def add_ioRecords(self, value : IORecord): + self._ioRecords.append(value) + + + """ + /// Name : ioRecords + /// UID : + /// Type : IORecord + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : null + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "ReceivingSimID :" + "\n" + self.receivingSimID.to_string() + "\n" + outputString += "RequestID : " + str(self.requestID) + "\n" + outputString += "IOActionIOWarfareType : " + self.IOWarfareType.get_description + "(" + (str(int(self.IOWarfareType))) + ")" + "\n" + outputString += "IOActionIOSimulationSource : " + self.IOSimulationSource.get_description + "(" + (str(int(self.IOSimulationSource))) + ")" + "\n" + outputString += "IOActionIOActionType : " + self.IOActionType.get_description + "(" + (str(int(self.IOActionType))) + ")" + "\n" + outputString += "IOActionIOActionPhase : " + self.IOActionPhase.get_description + "(" + (str(int(self.IOActionPhase))) + ")" + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "IoAttackerID :" + "\n" + self.ioAttackerID.to_string() + "\n" + outputString += "IoPrimaryTargetID :" + "\n" + self.ioPrimaryTargetID.to_string() + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + outputString += "NumberOfIORecords : " + str(len(self._ioRecords)) + "\n" + outputString += "IoRecords : " + "\n" + for idx in range(0, len(self._ioRecords)): + outputString += self._ioRecords[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( InformationOperationsActionPdu, self ).serialize(outputStream) + self.receivingSimID.serialize(outputStream) + outputStream.write_int(int(self.requestID)) + self.serialize_enum(self.IOWarfareType,outputStream) + self.serialize_enum(self.IOSimulationSource,outputStream) + self.serialize_enum(self.IOActionType,outputStream) + self.serialize_enum(self.IOActionPhase,outputStream) + outputStream.write_int(int(self.padding1)) + self.ioAttackerID.serialize(outputStream) + self.ioPrimaryTargetID.serialize(outputStream) + outputStream.write_short(int(self.padding2)) + outputStream.write_short( len(self._ioRecords)) + for anObj in self._ioRecords: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( InformationOperationsActionPdu, self).parse(inputStream) + self.receivingSimID.parse(inputStream) + self.requestID = inputStream.read_int() + self.IOWarfareType = IOActionIOWarfareType.get_enum(self.parse_enum(self.IOWarfareType,inputStream)) + self.IOSimulationSource = IOActionIOSimulationSource.get_enum(self.parse_enum(self.IOSimulationSource,inputStream)) + self.IOActionType = IOActionIOActionType.get_enum(self.parse_enum(self.IOActionType,inputStream)) + self.IOActionPhase = IOActionIOActionPhase.get_enum(self.parse_enum(self.IOActionPhase,inputStream)) + self.padding1 = inputStream.read_int() + self.ioAttackerID.parse(inputStream) + self.ioPrimaryTargetID.parse(inputStream) + self.padding2 = inputStream.read_short() + self.numberOfIORecords = inputStream.read_short() + for idx in range(0, self.numberOfIORecords): + element = IORecord() + element.parse(inputStream) + self._ioRecords.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 12 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/information_operations_family_pdu.py b/dis/information_operations_family_pdu.py new file mode 100644 index 0000000..54af087 --- /dev/null +++ b/dis/information_operations_family_pdu.py @@ -0,0 +1,92 @@ +from enum import Enum + +from .entity_id import EntityID +from .pdu_base import PduBase +from .siso_ref_010.enums.disprotocol_family import DISProtocolFamily + +class InformationOperationsFamilyPdu( PduBase ): + """Information operations (IO) are the integrated employment of electronic warfare (EW), computer network operations (CNO), psychological operations (PSYOP), military deception (MILDEC), and operations security (OPSEC), along with specific supporting capabilities, to influence, disrupt, corrupt, or otherwise affect enemy information and decision making while protecting friendly information operations.""" + + def __init__(self): + """ Initializer for InformationOperationsFamilyPdu""" + super().__init__() + """ Object originating the request""" + self.originatingSimID = EntityID() + self.protocolFamily = DISProtocolFamily.information_operations + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "OriginatingSimID :" + "\n" + self.originatingSimID.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( InformationOperationsFamilyPdu, self ).serialize(outputStream) + self.originatingSimID.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( InformationOperationsFamilyPdu, self).parse(inputStream) + self.originatingSimID.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 1 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/information_operations_report_pdu.py b/dis/information_operations_report_pdu.py new file mode 100644 index 0000000..71e6843 --- /dev/null +++ b/dis/information_operations_report_pdu.py @@ -0,0 +1,177 @@ +from enum import Enum + +from .siso_ref_010.enums.ioaction_iosimulation_source import IOActionIOSimulationSource +from .iorecord import IORecord +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .siso_ref_010.enums.ioreport_ioreport_type import IOReportIOReportType +from .information_operations_family_pdu import InformationOperationsFamilyPdu +from .entity_id import EntityID + +class InformationOperationsReportPdu( InformationOperationsFamilyPdu ): + """5.13.4.1 Used to communicate the effects of an IO attack on one or more target entities.""" + + def __init__(self): + """ Initializer for InformationOperationsReportPdu""" + super().__init__() + # /** uid 286 */ + self.ioSimSource = IOActionIOSimulationSource.default + + # /** request ID provides a unique identifier uid 289 */ + self.ioReportType = IOReportIOReportType.default + + self.padding1 = 0 + # ioAttackerID is an undescribed parameter... + self.ioAttackerID = EntityID() + # ioPrimaryTargetID is an undescribed parameter... + self.ioPrimaryTargetID = EntityID() + self.padding2 = 0 + self.padding3 = 0 + self.numberOfIORecords = 0 + self._ioRecords = [] + self.pduType = DisPduType.information_operations_report + + + def get_numberOfIORecords(self): + return len(self._ioRecords) + def set_numberOfIORecords(self, value): + numberOfIORecords = value + + + def get_ioRecords(self): + return self._ioRecords + def set_ioRecords(self, value): + self._ioRecords = value + ioRecords = property(get_ioRecords, set_ioRecords) + + + def add_ioRecords(self, value : IORecord): + self._ioRecords.append(value) + + + """ + /// Name : ioRecords + /// UID : + /// Type : IORecord + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : null + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "IOActionIOSimulationSource : " + self.ioSimSource.get_description + "(" + (str(int(self.ioSimSource))) + ")" + "\n" + outputString += "IOReportIOReportType : " + self.ioReportType.get_description + "(" + (str(int(self.ioReportType))) + ")" + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "IoAttackerID :" + "\n" + self.ioAttackerID.to_string() + "\n" + outputString += "IoPrimaryTargetID :" + "\n" + self.ioPrimaryTargetID.to_string() + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + outputString += "Padding3 : " + str(self.padding3) + "\n" + outputString += "NumberOfIORecords : " + str(len(self._ioRecords)) + "\n" + outputString += "IoRecords : " + "\n" + for idx in range(0, len(self._ioRecords)): + outputString += self._ioRecords[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( InformationOperationsReportPdu, self ).serialize(outputStream) + self.serialize_enum(self.ioSimSource,outputStream) + self.serialize_enum(self.ioReportType,outputStream) + outputStream.write_byte(int(self.padding1)) + self.ioAttackerID.serialize(outputStream) + self.ioPrimaryTargetID.serialize(outputStream) + outputStream.write_short(int(self.padding2)) + outputStream.write_short(int(self.padding3)) + outputStream.write_short( len(self._ioRecords)) + for anObj in self._ioRecords: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( InformationOperationsReportPdu, self).parse(inputStream) + self.ioSimSource = IOActionIOSimulationSource.get_enum(self.parse_enum(self.ioSimSource,inputStream)) + self.ioReportType = IOReportIOReportType.get_enum(self.parse_enum(self.ioReportType,inputStream)) + self.padding1 = inputStream.read_byte() + self.ioAttackerID.parse(inputStream) + self.ioPrimaryTargetID.parse(inputStream) + self.padding2 = inputStream.read_short() + self.padding3 = inputStream.read_short() + self.numberOfIORecords = inputStream.read_short() + for idx in range(0, self.numberOfIORecords): + element = IORecord() + element.parse(inputStream) + self._ioRecords.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 9 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/intercom_communications_parameters.py b/dis/intercom_communications_parameters.py new file mode 100644 index 0000000..6a85a82 --- /dev/null +++ b/dis/intercom_communications_parameters.py @@ -0,0 +1,106 @@ +from enum import Enum + +from .siso_ref_010.enums.intercom_control_record_type import IntercomControlRecordType + +class IntercomCommunicationsParameters( object ): + """Intercom communications parameters. Section 6.2.46""" + + def __init__(self): + """ Initializer for IntercomCommunicationsParameters""" + # /** Type of intercom parameters record uid 185 */ + self.recordType = IntercomControlRecordType.default + + """ length of record""" + self.recordLength = 0 + """ This is a placeholder.""" + self.recordSpecificField = [] + self.padding = [0] * 32 + + def to_string(self) ->str: + outputString = "" + outputString += "IntercomControlRecordType : " + self.recordType.get_description + "(" + (str(int(self.recordType))) + ")" + "\n" + outputString += "RecordLength : " + str(self.recordLength) + "\n" + outputString += "RecordSpecificField : " + "\n" + for idx in range(0, len(self.recordSpecificField)): + outputString += str(self.recordSpecificField[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.recordType,outputStream) + outputStream.write_short(int(self.recordLength)) + for idx in range(0, 0): + outputStream.write_unsigned_byte( self.recordSpecificField[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordType = IntercomControlRecordType.get_enum(self.parse_enum(self.recordType,inputStream)) + self.recordLength = inputStream.read_short() + self.recordSpecificField = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_byte() + self.recordSpecificField[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/intercom_control_pdu.py b/dis/intercom_control_pdu.py new file mode 100644 index 0000000..59878a4 --- /dev/null +++ b/dis/intercom_control_pdu.py @@ -0,0 +1,202 @@ +from enum import Enum + +from .siso_ref_010.enums.intercom_control_control_type import IntercomControlControlType +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .siso_ref_010.enums.intercom_control_command import IntercomControlCommand +from .radio_communications_family_pdu import RadioCommunicationsFamilyPdu +from .intercom_communications_parameters import IntercomCommunicationsParameters +from .entity_id import EntityID +from .siso_ref_010.enums.intercom_control_transmit_line_state import IntercomControlTransmitLineState + +class IntercomControlPdu( RadioCommunicationsFamilyPdu ): + """5.8.7 Communicates the state of a particular intercom device, request an action of another intercom device, or respond to an action request.""" + + def __init__(self): + """ Initializer for IntercomControlPdu""" + super().__init__() + # /** control type uid 180 */ + self.controlType = IntercomControlControlType.default + + """ control type""" + self.communicationsChannelType = 0 + """ Source entity ID, this can also be ObjectIdentifier or UnattachedIdentifier""" + self.sourceEntityID = EntityID() + """ The specific intercom device being simulated within an entity.""" + self.sourceIntercomNumber = 0 + """ Line number to which the intercom control refers""" + self.sourceLineID = 0 + """ priority of this message relative to transmissons from other intercom devices""" + self.transmitPriority = 0 + # /** current transmit state of the line uid 183 */ + self.transmitLineState = IntercomControlTransmitLineState.default + + # /** detailed type requested. uid 182 */ + self.command = IntercomControlCommand.default + + """ eid of the entity that has created this intercom channel, same comments as sourceEntityId""" + self.masterIntercomReferenceID = EntityID() + """ specific intercom device that has created this intercom channel""" + self.masterIntercomNumber = 0 + self.masterChannelID = 0 + """ number of intercom parameters""" + self.intercomParametersLength = 0 + self._intercomParameters = [] + self.pduType = DisPduType.intercom_control + + + def get_intercomParametersLength(self): + return len(self._intercomParameters) + def set_intercomParametersLength(self, value): + intercomParametersLength = value + + + def get_intercomParameters(self): + return self._intercomParameters + def set_intercomParameters(self, value): + self._intercomParameters = value + intercomParameters = property(get_intercomParameters, set_intercomParameters) + + + def add_intercomParameters(self, value : IntercomCommunicationsParameters): + self._intercomParameters.append(value) + + + """ + /// Name : intercomParameters + /// UID : + /// Type : IntercomCommunicationsParameters + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : null + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "IntercomControlControlType : " + self.controlType.get_description + "(" + (str(int(self.controlType))) + ")" + "\n" + outputString += "CommunicationsChannelType : " + str(self.communicationsChannelType) + "\n" + outputString += "SourceEntityID :" + "\n" + self.sourceEntityID.to_string() + "\n" + outputString += "SourceIntercomNumber : " + str(self.sourceIntercomNumber) + "\n" + outputString += "SourceLineID : " + str(self.sourceLineID) + "\n" + outputString += "TransmitPriority : " + str(self.transmitPriority) + "\n" + outputString += "IntercomControlTransmitLineState : " + self.transmitLineState.get_description + "(" + (str(int(self.transmitLineState))) + ")" + "\n" + outputString += "IntercomControlCommand : " + self.command.get_description + "(" + (str(int(self.command))) + ")" + "\n" + outputString += "MasterIntercomReferenceID :" + "\n" + self.masterIntercomReferenceID.to_string() + "\n" + outputString += "MasterIntercomNumber : " + str(self.masterIntercomNumber) + "\n" + outputString += "MasterChannelID : " + str(self.masterChannelID) + "\n" + outputString += "IntercomParametersLength : " + str(len(self._intercomParameters)) + "\n" + outputString += "IntercomParameters : " + "\n" + for idx in range(0, len(self._intercomParameters)): + outputString += self._intercomParameters[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( IntercomControlPdu, self ).serialize(outputStream) + self.serialize_enum(self.controlType,outputStream) + outputStream.write_byte(int(self.communicationsChannelType)) + self.sourceEntityID.serialize(outputStream) + outputStream.write_short(int(self.sourceIntercomNumber)) + outputStream.write_byte(int(self.sourceLineID)) + outputStream.write_byte(int(self.transmitPriority)) + self.serialize_enum(self.transmitLineState,outputStream) + self.serialize_enum(self.command,outputStream) + self.masterIntercomReferenceID.serialize(outputStream) + outputStream.write_short(int(self.masterIntercomNumber)) + outputStream.write_short(int(self.masterChannelID)) + outputStream.write_int( len(self._intercomParameters)) + for anObj in self._intercomParameters: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( IntercomControlPdu, self).parse(inputStream) + self.controlType = IntercomControlControlType.get_enum(self.parse_enum(self.controlType,inputStream)) + self.communicationsChannelType = inputStream.read_byte() + self.sourceEntityID.parse(inputStream) + self.sourceIntercomNumber = inputStream.read_short() + self.sourceLineID = inputStream.read_byte() + self.transmitPriority = inputStream.read_byte() + self.transmitLineState = IntercomControlTransmitLineState.get_enum(self.parse_enum(self.transmitLineState,inputStream)) + self.command = IntercomControlCommand.get_enum(self.parse_enum(self.command,inputStream)) + self.masterIntercomReferenceID.parse(inputStream) + self.masterIntercomNumber = inputStream.read_short() + self.masterChannelID = inputStream.read_short() + self.intercomParametersLength = inputStream.read_int() + for idx in range(0, self.intercomParametersLength): + element = IntercomCommunicationsParameters() + element.parse(inputStream) + self._intercomParameters.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 13 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/intercom_identifier.py b/dis/intercom_identifier.py new file mode 100644 index 0000000..3a44ec0 --- /dev/null +++ b/dis/intercom_identifier.py @@ -0,0 +1,95 @@ +from enum import Enum + + +class IntercomIdentifier( object ): + """Unique designation of an attached or unattached intercom in an event or exercirse. Section 6.2.48""" + + def __init__(self): + """ Initializer for IntercomIdentifier""" + self.siteNumber = 0 + self.applicationNumber = 0 + self.referenceNumber = 0 + self.intercomNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "SiteNumber : " + str(self.siteNumber) + "\n" + outputString += "ApplicationNumber : " + str(self.applicationNumber) + "\n" + outputString += "ReferenceNumber : " + str(self.referenceNumber) + "\n" + outputString += "IntercomNumber : " + str(self.intercomNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.siteNumber)) + outputStream.write_short(int(self.applicationNumber)) + outputStream.write_short(int(self.referenceNumber)) + outputStream.write_short(int(self.intercomNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.siteNumber = inputStream.read_short() + self.applicationNumber = inputStream.read_short() + self.referenceNumber = inputStream.read_short() + self.intercomNumber = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/intercom_reference_id.py b/dis/intercom_reference_id.py new file mode 100644 index 0000000..f74421f --- /dev/null +++ b/dis/intercom_reference_id.py @@ -0,0 +1,91 @@ +from enum import Enum + + +class IntercomReferenceID( object ): + """unique reference ID for this intercom""" + + def __init__(self): + """ Initializer for IntercomReferenceID""" + self.siteNumber = 0 + self.applicationNumber = 0 + self.referenceNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "SiteNumber : " + str(self.siteNumber) + "\n" + outputString += "ApplicationNumber : " + str(self.applicationNumber) + "\n" + outputString += "ReferenceNumber : " + str(self.referenceNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.siteNumber)) + outputStream.write_short(int(self.applicationNumber)) + outputStream.write_short(int(self.referenceNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.siteNumber = inputStream.read_short() + self.applicationNumber = inputStream.read_short() + self.referenceNumber = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/intercom_signal_pdu.py b/dis/intercom_signal_pdu.py new file mode 100644 index 0000000..9962040 --- /dev/null +++ b/dis/intercom_signal_pdu.py @@ -0,0 +1,139 @@ +from enum import Enum + +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .radio_communications_family_pdu import RadioCommunicationsFamilyPdu +from .siso_ref_010.enums.signal_tdltype import SignalTDLType +from .intercom_reference_id import IntercomReferenceID + +class IntercomSignalPdu( RadioCommunicationsFamilyPdu ): + """5.8.6 Conveys the audio or digital data that is used to communicate between simulated intercom devices""" + + def __init__(self): + """ Initializer for IntercomSignalPdu""" + super().__init__() + """ The unique designation of an attached or unattached intercom in an event or exercise""" + self.intercomReferenceID = IntercomReferenceID() + """ ID of communications device""" + self.intercomNumber = 0 + """ encoding scheme""" + self.encodingScheme = 0 + # /** tactical data link type uid 178 */ + self.tdlType = SignalTDLType.default + + """ sample rate""" + self.sampleRate = 0 + """ data length""" + self.dataLength = 0 + """ samples""" + self.samples = 0 + """ data bytes""" + self.data = [] + self.padTo32 = [0] * 32 + self.pduType = DisPduType.intercom_signal + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "IntercomReferenceID :" + "\n" + self.intercomReferenceID.to_string() + "\n" + outputString += "IntercomNumber : " + str(self.intercomNumber) + "\n" + outputString += "EncodingScheme : " + str(self.encodingScheme) + "\n" + outputString += "SignalTDLType : " + self.tdlType.get_description + "(" + (str(int(self.tdlType))) + ")" + "\n" + outputString += "SampleRate : " + str(self.sampleRate) + "\n" + outputString += "DataLength : " + str(self.dataLength) + "\n" + outputString += "Samples : " + str(self.samples) + "\n" + outputString += "Data : " + "\n" + for idx in range(0, len(self.data)): + outputString += str(self.data[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( IntercomSignalPdu, self ).serialize(outputStream) + self.intercomReferenceID.serialize(outputStream) + outputStream.write_short(int(self.intercomNumber)) + outputStream.write_short(int(self.encodingScheme)) + self.serialize_enum(self.tdlType,outputStream) + outputStream.write_int(int(self.sampleRate)) + outputStream.write_short(int(self.dataLength)) + outputStream.write_short(int(self.samples)) + for idx in range(0, 0): + outputStream.write_unsigned_byte( self.data[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( IntercomSignalPdu, self).parse(inputStream) + self.intercomReferenceID.parse(inputStream) + self.intercomNumber = inputStream.read_short() + self.encodingScheme = inputStream.read_short() + self.tdlType = SignalTDLType.get_enum(self.parse_enum(self.tdlType,inputStream)) + self.sampleRate = inputStream.read_int() + self.dataLength = inputStream.read_short() + self.samples = inputStream.read_short() + self.data = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_byte() + self.data[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 9 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/iocomms_node_record.py b/dis/iocomms_node_record.py new file mode 100644 index 0000000..d34d0e9 --- /dev/null +++ b/dis/iocomms_node_record.py @@ -0,0 +1,113 @@ +from enum import Enum + +from .iorecord import IORecord +from .siso_ref_010.enums.iocomms_node_record_comms_node_type import IOCommsNodeRecordCommsNodeType +from .siso_ref_010.enums.variable_record_type import VariableRecordType +from .communications_node_id import CommunicationsNodeID + +class IOCommsNodeRecord( IORecord ): + """6.2.48.2""" + + def __init__(self): + """ Initializer for IOCommsNodeRecord""" + super().__init__() + # /** uid 66 Variable Record Type values are defined by VariableRecordType enumerations */ + self.recordType = VariableRecordType.io_communications_node + + self.recordLength = 0 + # /** uid 294 */ + self.commsNodeType = IOCommsNodeRecordCommsNodeType.default + + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + # commsNodeId is an undescribed parameter... + self.commsNodeId = CommunicationsNodeID() + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "VariableRecordType : " + self.recordType.get_description + "(" + (str(int(self.recordType))) + ")" + "\n" + outputString += "RecordLength : " + str(self.recordLength) + "\n" + outputString += "IOCommsNodeRecordCommsNodeType : " + self.commsNodeType.get_description + "(" + (str(int(self.commsNodeType))) + ")" + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "CommsNodeId :" + "\n" + self.commsNodeId.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( IOCommsNodeRecord, self ).serialize(outputStream) + self.serialize_enum(self.recordType,outputStream) + outputStream.write_short(int(self.recordLength)) + self.serialize_enum(self.commsNodeType,outputStream) + outputStream.write_byte(int(self.padding)) + self.commsNodeId.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( IOCommsNodeRecord, self).parse(inputStream) + self.recordType = VariableRecordType.get_enum(self.parse_enum(self.recordType,inputStream)) + self.recordLength = inputStream.read_short() + self.commsNodeType = IOCommsNodeRecordCommsNodeType.get_enum(self.parse_enum(self.commsNodeType,inputStream)) + self.padding = inputStream.read_byte() + self.commsNodeId.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 5 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/ioeffect_record.py b/dis/ioeffect_record.py new file mode 100644 index 0000000..2a970ab --- /dev/null +++ b/dis/ioeffect_record.py @@ -0,0 +1,136 @@ +from enum import Enum + +from .siso_ref_010.enums.ioeffects_record_ioeffect import IOEffectsRecordIOEffect +from .siso_ref_010.enums.ioeffects_record_ioprocess import IOEffectsRecordIOProcess +from .iorecord import IORecord +from .siso_ref_010.enums.variable_record_type import VariableRecordType +from .siso_ref_010.enums.ioeffects_record_iostatus import IOEffectsRecordIOStatus +from .siso_ref_010.enums.ioeffects_record_iolink_type import IOEffectsRecordIOLinkType + +class IOEffectRecord( IORecord ): + """6.2.48.3""" + + def __init__(self): + """ Initializer for IOEffectRecord""" + super().__init__() + # /** uid 66 Variable Record Type values are defined by VariableRecordType enumerations */ + self.recordType = VariableRecordType.io_effect + + self.recordLength = 0 + # /** uid 290 */ + self.ioStatus = IOEffectsRecordIOStatus.default + + # /** uid 291 */ + self.ioLinkType = IOEffectsRecordIOLinkType.default + + # /** uid 292 */ + self.ioEffect = IOEffectsRecordIOEffect.default + + self.ioEffectDutyCycle = 0 + self.ioEffectDuration = 0 + # /** uid 293 */ + self.ioProcess = IOEffectsRecordIOProcess.default + + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "VariableRecordType : " + self.recordType.get_description + "(" + (str(int(self.recordType))) + ")" + "\n" + outputString += "RecordLength : " + str(self.recordLength) + "\n" + outputString += "IOEffectsRecordIOStatus : " + self.ioStatus.get_description + "(" + (str(int(self.ioStatus))) + ")" + "\n" + outputString += "IOEffectsRecordIOLinkType : " + self.ioLinkType.get_description + "(" + (str(int(self.ioLinkType))) + ")" + "\n" + outputString += "IOEffectsRecordIOEffect : " + self.ioEffect.get_description + "(" + (str(int(self.ioEffect))) + ")" + "\n" + outputString += "IoEffectDutyCycle : " + str(self.ioEffectDutyCycle) + "\n" + outputString += "IoEffectDuration : " + str(self.ioEffectDuration) + "\n" + outputString += "IOEffectsRecordIOProcess : " + self.ioProcess.get_description + "(" + (str(int(self.ioProcess))) + ")" + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( IOEffectRecord, self ).serialize(outputStream) + self.serialize_enum(self.recordType,outputStream) + outputStream.write_short(int(self.recordLength)) + self.serialize_enum(self.ioStatus,outputStream) + self.serialize_enum(self.ioLinkType,outputStream) + self.serialize_enum(self.ioEffect,outputStream) + outputStream.write_byte(int(self.ioEffectDutyCycle)) + outputStream.write_short(int(self.ioEffectDuration)) + self.serialize_enum(self.ioProcess,outputStream) + outputStream.write_short(int(self.padding)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( IOEffectRecord, self).parse(inputStream) + self.recordType = VariableRecordType.get_enum(self.parse_enum(self.recordType,inputStream)) + self.recordLength = inputStream.read_short() + self.ioStatus = IOEffectsRecordIOStatus.get_enum(self.parse_enum(self.ioStatus,inputStream)) + self.ioLinkType = IOEffectsRecordIOLinkType.get_enum(self.parse_enum(self.ioLinkType,inputStream)) + self.ioEffect = IOEffectsRecordIOEffect.get_enum(self.parse_enum(self.ioEffect,inputStream)) + self.ioEffectDutyCycle = inputStream.read_byte() + self.ioEffectDuration = inputStream.read_short() + self.ioProcess = IOEffectsRecordIOProcess.get_enum(self.parse_enum(self.ioProcess,inputStream)) + self.padding = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 9 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/iorecord.py b/dis/iorecord.py new file mode 100644 index 0000000..f00a756 --- /dev/null +++ b/dis/iorecord.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class IORecord( object ): + """6.2.48""" + + def __init__(self): + """ Initializer for IORecord""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/is_group_of_pdu.py b/dis/is_group_of_pdu.py new file mode 100644 index 0000000..47e5e65 --- /dev/null +++ b/dis/is_group_of_pdu.py @@ -0,0 +1,170 @@ +from enum import Enum + +from .variable_datum import VariableDatum +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .siso_ref_010.enums.is_group_of_grouped_entity_category import IsGroupOfGroupedEntityCategory +from .entity_id import EntityID +from .entity_management_family_pdu import EntityManagementFamilyPdu + +class IsGroupOfPdu( EntityManagementFamilyPdu ): + """5.9.3.1 The IsGroupOf PDU shall communicate information about the individual states of a group of entities, including state information that is necessary for the receiving simulation applications to represent the issuing group of entities in the simulation applications’ own simulation.""" + + def __init__(self): + """ Initializer for IsGroupOfPdu""" + super().__init__() + """ ID of aggregated entities""" + self.groupEntityID = EntityID() + # /** type of entities constituting the group uid 213 */ + self.groupedEntityCategory = IsGroupOfGroupedEntityCategory.default + + """ Number of individual entities constituting the group""" + self.numberOfGroupedEntities = 0 + """ padding""" + self.pad = 0 + """ latitude""" + self.latitude = 0.0 + """ longitude""" + self.longitude = 0.0 + """ GED records about each individual entity in the group. Bad specing--the Group Entity Descriptions are not described.""" + self._groupedEntityDescriptions = [] + self.pduType = DisPduType.isgroupof + + + def get_numberOfGroupedEntities(self): + return len(self._groupedEntityDescriptions) + def set_numberOfGroupedEntities(self, value): + numberOfGroupedEntities = value + + + def get_groupedEntityDescriptions(self): + return self._groupedEntityDescriptions + def set_groupedEntityDescriptions(self, value): + self._groupedEntityDescriptions = value + groupedEntityDescriptions = property(get_groupedEntityDescriptions, set_groupedEntityDescriptions) + + + def add_groupedEntityDescriptions(self, value : VariableDatum): + self._groupedEntityDescriptions.append(value) + + + """ + /// Name : groupedEntityDescriptions + /// UID : + /// Type : VariableDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : GED records about each individual entity in the group. Bad specing--the Group Entity Descriptions are not described. + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "GroupEntityID :" + "\n" + self.groupEntityID.to_string() + "\n" + outputString += "IsGroupOfGroupedEntityCategory : " + self.groupedEntityCategory.get_description + "(" + (str(int(self.groupedEntityCategory))) + ")" + "\n" + outputString += "NumberOfGroupedEntities : " + str(len(self._groupedEntityDescriptions)) + "\n" + outputString += "Pad : " + str(self.pad) + "\n" + outputString += "Latitude : " + str(self.latitude) + "\n" + outputString += "Longitude : " + str(self.longitude) + "\n" + outputString += "GroupedEntityDescriptions : " + "\n" + for idx in range(0, len(self._groupedEntityDescriptions)): + outputString += self._groupedEntityDescriptions[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( IsGroupOfPdu, self ).serialize(outputStream) + self.groupEntityID.serialize(outputStream) + self.serialize_enum(self.groupedEntityCategory,outputStream) + outputStream.write_byte( len(self._groupedEntityDescriptions)) + outputStream.write_int(int(self.pad)) + outputStream.write_double(int(self.latitude)) + outputStream.write_double(int(self.longitude)) + for anObj in self._groupedEntityDescriptions: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( IsGroupOfPdu, self).parse(inputStream) + self.groupEntityID.parse(inputStream) + self.groupedEntityCategory = IsGroupOfGroupedEntityCategory.get_enum(self.parse_enum(self.groupedEntityCategory,inputStream)) + self.numberOfGroupedEntities = inputStream.read_byte() + self.pad = inputStream.read_int() + self.latitude = inputStream.read_double() + self.longitude = inputStream.read_double() + for idx in range(0, self.numberOfGroupedEntities): + element = VariableDatum() + element.parse(inputStream) + self._groupedEntityDescriptions.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 7 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/is_part_of_pdu.py b/dis/is_part_of_pdu.py new file mode 100644 index 0000000..2d1c273 --- /dev/null +++ b/dis/is_part_of_pdu.py @@ -0,0 +1,121 @@ +from enum import Enum + +from .entity_type import EntityType +from .named_location_identification import NamedLocationIdentification +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .vector3float import Vector3Float +from .entity_id import EntityID +from .relationship import Relationship +from .entity_management_family_pdu import EntityManagementFamilyPdu + +class IsPartOfPdu( EntityManagementFamilyPdu ): + """5.9.5 Used to request hierarchical linkage of separately hosted simulation entities""" + + def __init__(self): + """ Initializer for IsPartOfPdu""" + super().__init__() + """ ID of entity originating PDU""" + self.orginatingEntityID = EntityID() + """ ID of entity receiving PDU""" + self.receivingEntityID = EntityID() + """ relationship of joined parts""" + self.relationship = Relationship() + """ location of part; centroid of part in host's coordinate system. x=range, y=bearing, z=0""" + self.partLocation = Vector3Float() + """ named location""" + self.namedLocationID = NamedLocationIdentification() + """ entity type""" + self.partEntityType = EntityType() + self.pduType = DisPduType.ispartof + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "OrginatingEntityID :" + "\n" + self.orginatingEntityID.to_string() + "\n" + outputString += "ReceivingEntityID :" + "\n" + self.receivingEntityID.to_string() + "\n" + outputString += "Relationship :" + "\n" + self.relationship.to_string() + "\n" + outputString += "PartLocation :" + "\n" + self.partLocation.to_string() + "\n" + outputString += "NamedLocationID :" + "\n" + self.namedLocationID.to_string() + "\n" + outputString += "PartEntityType :" + "\n" + self.partEntityType.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( IsPartOfPdu, self ).serialize(outputStream) + self.orginatingEntityID.serialize(outputStream) + self.receivingEntityID.serialize(outputStream) + self.relationship.serialize(outputStream) + self.partLocation.serialize(outputStream) + self.namedLocationID.serialize(outputStream) + self.partEntityType.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( IsPartOfPdu, self).parse(inputStream) + self.orginatingEntityID.parse(inputStream) + self.receivingEntityID.parse(inputStream) + self.relationship.parse(inputStream) + self.partLocation.parse(inputStream) + self.namedLocationID.parse(inputStream) + self.partEntityType.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/jammers/Deception/AGCandGateStealer/AGCandGateStealer.py b/dis/jammers/Deception/AGCandGateStealer/AGCandGateStealer.py new file mode 100644 index 0000000..4fde4bc --- /dev/null +++ b/dis/jammers/Deception/AGCandGateStealer/AGCandGateStealer.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AGCandGateStealer; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class AGCandGateStealer(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 40 // AGC and Gate Stealer diff --git a/dis/jammers/Deception/AGCandGateStealer/AGCandRGPO/AGCandRGPO.py b/dis/jammers/Deception/AGCandGateStealer/AGCandRGPO/AGCandRGPO.py new file mode 100644 index 0000000..3dafc73 --- /dev/null +++ b/dis/jammers/Deception/AGCandGateStealer/AGCandRGPO/AGCandRGPO.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AGCandGateStealer.AGCandRGPO; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class AGCandRGPO(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 40 // AGC and Gate Stealer + self.subCategory = 5 // AGC and RGPO diff --git a/dis/jammers/Deception/AGCandGateStealer/AGCandRGPOandVGPO/AGCandRGPOandVGPO.py b/dis/jammers/Deception/AGCandGateStealer/AGCandRGPOandVGPO/AGCandRGPOandVGPO.py new file mode 100644 index 0000000..31023c7 --- /dev/null +++ b/dis/jammers/Deception/AGCandGateStealer/AGCandRGPOandVGPO/AGCandRGPOandVGPO.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AGCandGateStealer.AGCandRGPOandVGPO; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class AGCandRGPOandVGPO(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 40 // AGC and Gate Stealer + self.subCategory = 15 // AGC and RGPO and VGPO diff --git a/dis/jammers/Deception/AGCandGateStealer/AGCandVGPO/AGCandVGPO.py b/dis/jammers/Deception/AGCandGateStealer/AGCandVGPO/AGCandVGPO.py new file mode 100644 index 0000000..7eab571 --- /dev/null +++ b/dis/jammers/Deception/AGCandGateStealer/AGCandVGPO/AGCandVGPO.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AGCandGateStealer.AGCandVGPO; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class AGCandVGPO(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 40 // AGC and Gate Stealer + self.subCategory = 10 // AGC and VGPO diff --git a/dis/jammers/Deception/Analyzer/Analyzer.py b/dis/jammers/Deception/Analyzer/Analyzer.py new file mode 100644 index 0000000..12417bf --- /dev/null +++ b/dis/jammers/Deception/Analyzer/Analyzer.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Analyzer; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class Analyzer(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 5 // Analyzer diff --git a/dis/jammers/Deception/Angle/Angle.py b/dis/jammers/Deception/Angle/Angle.py new file mode 100644 index 0000000..f8141b3 --- /dev/null +++ b/dis/jammers/Deception/Angle/Angle.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Angle; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class Angle(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 10 // Angle diff --git a/dis/jammers/Deception/Angle/AngleGateWalkOff/AngleGateWalkOff.py b/dis/jammers/Deception/Angle/AngleGateWalkOff/AngleGateWalkOff.py new file mode 100644 index 0000000..808a6af --- /dev/null +++ b/dis/jammers/Deception/Angle/AngleGateWalkOff/AngleGateWalkOff.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Angle.AngleGateWalkOff; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class AngleGateWalkOff(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 10 // Angle + self.subCategory = 5 // Angle Gate Walk-Off diff --git a/dis/jammers/Deception/Angle/CooperativeAngleCAJ/CooperativeAngleCAJ.py b/dis/jammers/Deception/Angle/CooperativeAngleCAJ/CooperativeAngleCAJ.py new file mode 100644 index 0000000..cbba831 --- /dev/null +++ b/dis/jammers/Deception/Angle/CooperativeAngleCAJ/CooperativeAngleCAJ.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Angle.CooperativeAngleCAJ; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class CooperativeAngleCAJ(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 10 // Angle + self.subCategory = 10 // Cooperative Angle (CAJ) diff --git a/dis/jammers/Deception/Angle/CrossEye/CrossEye.py b/dis/jammers/Deception/Angle/CrossEye/CrossEye.py new file mode 100644 index 0000000..5bf622b --- /dev/null +++ b/dis/jammers/Deception/Angle/CrossEye/CrossEye.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Angle.CrossEye; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class CrossEye(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 10 // Angle + self.subCategory = 15 // Cross-Eye diff --git a/dis/jammers/Deception/Angle/CrossPolarization/CrossPolarization.py b/dis/jammers/Deception/Angle/CrossPolarization/CrossPolarization.py new file mode 100644 index 0000000..f640335 --- /dev/null +++ b/dis/jammers/Deception/Angle/CrossPolarization/CrossPolarization.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Angle.CrossPolarization; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class CrossPolarization(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 10 // Angle + self.subCategory = 20 // Cross-Polarization diff --git a/dis/jammers/Deception/Angle/Delta/Delta.py b/dis/jammers/Deception/Angle/Delta/Delta.py new file mode 100644 index 0000000..f807add --- /dev/null +++ b/dis/jammers/Deception/Angle/Delta/Delta.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Angle.Delta; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class Delta(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 10 // Angle + self.subCategory = 25 // Delta diff --git a/dis/jammers/Deception/Angle/InverseGainakaInverseAmplitude/InverseGainakaInverseAmplitude.py b/dis/jammers/Deception/Angle/InverseGainakaInverseAmplitude/InverseGainakaInverseAmplitude.py new file mode 100644 index 0000000..a98036e --- /dev/null +++ b/dis/jammers/Deception/Angle/InverseGainakaInverseAmplitude/InverseGainakaInverseAmplitude.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Angle.InverseGainakaInverseAmplitude; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class InverseGainakaInverseAmplitude(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 10 // Angle + self.subCategory = 30 // Inverse Gain (aka Inverse Amplitude) diff --git a/dis/jammers/Deception/Angle/SeaBounced/SeaBounced.py b/dis/jammers/Deception/Angle/SeaBounced/SeaBounced.py new file mode 100644 index 0000000..4e1bbd9 --- /dev/null +++ b/dis/jammers/Deception/Angle/SeaBounced/SeaBounced.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Angle.SeaBounced; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class SeaBounced(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 10 // Angle + self.subCategory = 35 // Sea-Bounced diff --git a/dis/jammers/Deception/Angle/SweptSquareWaveSSW/SweptSquareWaveSSW.py b/dis/jammers/Deception/Angle/SweptSquareWaveSSW/SweptSquareWaveSSW.py new file mode 100644 index 0000000..01007e9 --- /dev/null +++ b/dis/jammers/Deception/Angle/SweptSquareWaveSSW/SweptSquareWaveSSW.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Angle.SweptSquareWaveSSW; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class SweptSquareWaveSSW(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 10 // Angle + self.subCategory = 40 // Swept Square Wave (SSW) diff --git a/dis/jammers/Deception/Angle/TerrainBounce/TerrainBounce.py b/dis/jammers/Deception/Angle/TerrainBounce/TerrainBounce.py new file mode 100644 index 0000000..c395d40 --- /dev/null +++ b/dis/jammers/Deception/Angle/TerrainBounce/TerrainBounce.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Angle.TerrainBounce; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class TerrainBounce(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 10 // Angle + self.subCategory = 45 // Terrain Bounce diff --git a/dis/jammers/Deception/AngleandFalseTarget/AngleandFalseTarget.py b/dis/jammers/Deception/AngleandFalseTarget/AngleandFalseTarget.py new file mode 100644 index 0000000..eb82044 --- /dev/null +++ b/dis/jammers/Deception/AngleandFalseTarget/AngleandFalseTarget.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandFalseTarget; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class AngleandFalseTarget(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 20 // Angle and False Target diff --git a/dis/jammers/Deception/AngleandFalseTarget/AngleandVelocityFalseTargetsVFT/AngleandVelocityFalseTargetsVFT.py b/dis/jammers/Deception/AngleandFalseTarget/AngleandVelocityFalseTargetsVFT/AngleandVelocityFalseTargetsVFT.py new file mode 100644 index 0000000..980eb4a --- /dev/null +++ b/dis/jammers/Deception/AngleandFalseTarget/AngleandVelocityFalseTargetsVFT/AngleandVelocityFalseTargetsVFT.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandFalseTarget.AngleandVelocityFalseTargetsVFT; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class AngleandVelocityFalseTargetsVFT(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 20 // Angle and False Target + self.subCategory = 5 // Angle and Velocity False Targets (VFT) diff --git a/dis/jammers/Deception/AngleandFalseTarget/AngleandVelocityFalseTargetsVFT/InverseGainandVFT/InverseGainandVFT.py b/dis/jammers/Deception/AngleandFalseTarget/AngleandVelocityFalseTargetsVFT/InverseGainandVFT/InverseGainandVFT.py new file mode 100644 index 0000000..6fa741e --- /dev/null +++ b/dis/jammers/Deception/AngleandFalseTarget/AngleandVelocityFalseTargetsVFT/InverseGainandVFT/InverseGainandVFT.py @@ -0,0 +1,28 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandFalseTarget.AngleandVelocityFalseTargetsVFT.InverseGainandVFT; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class InverseGainandVFT(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 20 // Angle and False Target + self.subCategory = 5 // Angle and Velocity False Targets (VFT) + self.specific = 5 // Inverse Gain and VFT diff --git a/dis/jammers/Deception/AngleandFalseTarget/AngleandVelocityFalseTargetsVFT/SSWandVFT/SSWandVFT.py b/dis/jammers/Deception/AngleandFalseTarget/AngleandVelocityFalseTargetsVFT/SSWandVFT/SSWandVFT.py new file mode 100644 index 0000000..6afc786 --- /dev/null +++ b/dis/jammers/Deception/AngleandFalseTarget/AngleandVelocityFalseTargetsVFT/SSWandVFT/SSWandVFT.py @@ -0,0 +1,28 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandFalseTarget.AngleandVelocityFalseTargetsVFT.SSWandVFT; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class SSWandVFT(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 20 // Angle and False Target + self.subCategory = 5 // Angle and Velocity False Targets (VFT) + self.specific = 10 // SSW and VFT diff --git a/dis/jammers/Deception/AngleandFalseTarget/RFTandSSW/RFTandSSW.py b/dis/jammers/Deception/AngleandFalseTarget/RFTandSSW/RFTandSSW.py new file mode 100644 index 0000000..4443924 --- /dev/null +++ b/dis/jammers/Deception/AngleandFalseTarget/RFTandSSW/RFTandSSW.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandFalseTarget.RFTandSSW; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class RFTandSSW(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 20 // Angle and False Target + self.subCategory = 15 // RFT and SSW diff --git a/dis/jammers/Deception/AngleandFalseTarget/RangeFalseTargetsRFTandInverseGain/RangeFalseTargetsRFTandInverseGain.py b/dis/jammers/Deception/AngleandFalseTarget/RangeFalseTargetsRFTandInverseGain/RangeFalseTargetsRFTandInverseGain.py new file mode 100644 index 0000000..aa54df4 --- /dev/null +++ b/dis/jammers/Deception/AngleandFalseTarget/RangeFalseTargetsRFTandInverseGain/RangeFalseTargetsRFTandInverseGain.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandFalseTarget.RangeFalseTargetsRFTandInverseGain; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class RangeFalseTargetsRFTandInverseGain(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 20 // Angle and False Target + self.subCategory = 10 // Range False Targets (RFT) and Inverse Gain diff --git a/dis/jammers/Deception/AngleandGateStealer/AngleandGateStealer.py b/dis/jammers/Deception/AngleandGateStealer/AngleandGateStealer.py new file mode 100644 index 0000000..e7f43e3 --- /dev/null +++ b/dis/jammers/Deception/AngleandGateStealer/AngleandGateStealer.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandGateStealer; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class AngleandGateStealer(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 15 // Angle and Gate Stealer diff --git a/dis/jammers/Deception/AngleandGateStealer/CrossPolarizationRGPOandVGPO/CrossPolarizationRGPOandVGPO.py b/dis/jammers/Deception/AngleandGateStealer/CrossPolarizationRGPOandVGPO/CrossPolarizationRGPOandVGPO.py new file mode 100644 index 0000000..7600424 --- /dev/null +++ b/dis/jammers/Deception/AngleandGateStealer/CrossPolarizationRGPOandVGPO/CrossPolarizationRGPOandVGPO.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandGateStealer.CrossPolarizationRGPOandVGPO; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class CrossPolarizationRGPOandVGPO(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 15 // Angle and Gate Stealer + self.subCategory = 15 // Cross-Polarization, RGPO and VGPO diff --git a/dis/jammers/Deception/AngleandGateStealer/CrossPolarizationandRangeGatePullOffRGPO/CrossPolarizationandRangeGatePullOffRGPO.py b/dis/jammers/Deception/AngleandGateStealer/CrossPolarizationandRangeGatePullOffRGPO/CrossPolarizationandRangeGatePullOffRGPO.py new file mode 100644 index 0000000..614c960 --- /dev/null +++ b/dis/jammers/Deception/AngleandGateStealer/CrossPolarizationandRangeGatePullOffRGPO/CrossPolarizationandRangeGatePullOffRGPO.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandGateStealer.CrossPolarizationandRangeGatePullOffRGPO; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class CrossPolarizationandRangeGatePullOffRGPO(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 15 // Angle and Gate Stealer + self.subCategory = 5 // Cross-Polarization and Range Gate Pull-Off (RGPO) diff --git a/dis/jammers/Deception/AngleandGateStealer/CrossPolarizationandVelocityGatePullOffVGPO/CrossPolarizationandVelocityGatePullOffVGPO.py b/dis/jammers/Deception/AngleandGateStealer/CrossPolarizationandVelocityGatePullOffVGPO/CrossPolarizationandVelocityGatePullOffVGPO.py new file mode 100644 index 0000000..0ce3079 --- /dev/null +++ b/dis/jammers/Deception/AngleandGateStealer/CrossPolarizationandVelocityGatePullOffVGPO/CrossPolarizationandVelocityGatePullOffVGPO.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandGateStealer.CrossPolarizationandVelocityGatePullOffVGPO; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class CrossPolarizationandVelocityGatePullOffVGPO(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 15 // Angle and Gate Stealer + self.subCategory = 10 // Cross-Polarization and Velocity Gate Pull-Off (VGPO) diff --git a/dis/jammers/Deception/AngleandGateStealer/InverseGainandRGPO/InverseGainandRGPO.py b/dis/jammers/Deception/AngleandGateStealer/InverseGainandRGPO/InverseGainandRGPO.py new file mode 100644 index 0000000..e2eeaa4 --- /dev/null +++ b/dis/jammers/Deception/AngleandGateStealer/InverseGainandRGPO/InverseGainandRGPO.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandGateStealer.InverseGainandRGPO; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class InverseGainandRGPO(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 15 // Angle and Gate Stealer + self.subCategory = 20 // Inverse Gain and RGPO diff --git a/dis/jammers/Deception/AngleandGateStealer/InverseGainandRGPOandVGPO/InverseGainandRGPOandVGPO.py b/dis/jammers/Deception/AngleandGateStealer/InverseGainandRGPOandVGPO/InverseGainandRGPOandVGPO.py new file mode 100644 index 0000000..ec5aa0d --- /dev/null +++ b/dis/jammers/Deception/AngleandGateStealer/InverseGainandRGPOandVGPO/InverseGainandRGPOandVGPO.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandGateStealer.InverseGainandRGPOandVGPO; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class InverseGainandRGPOandVGPO(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 15 // Angle and Gate Stealer + self.subCategory = 25 // Inverse Gain and RGPO and VGPO diff --git a/dis/jammers/Deception/AngleandGateStealer/InverseGainandVGPO/InverseGainandVGPO.py b/dis/jammers/Deception/AngleandGateStealer/InverseGainandVGPO/InverseGainandVGPO.py new file mode 100644 index 0000000..f964243 --- /dev/null +++ b/dis/jammers/Deception/AngleandGateStealer/InverseGainandVGPO/InverseGainandVGPO.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandGateStealer.InverseGainandVGPO; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class InverseGainandVGPO(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 15 // Angle and Gate Stealer + self.subCategory = 30 // Inverse Gain and VGPO diff --git a/dis/jammers/Deception/AngleandGateStealer/RGPOandSSW/RGPOandSSW.py b/dis/jammers/Deception/AngleandGateStealer/RGPOandSSW/RGPOandSSW.py new file mode 100644 index 0000000..956ccac --- /dev/null +++ b/dis/jammers/Deception/AngleandGateStealer/RGPOandSSW/RGPOandSSW.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandGateStealer.RGPOandSSW; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class RGPOandSSW(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 15 // Angle and Gate Stealer + self.subCategory = 35 // RGPO and SSW diff --git a/dis/jammers/Deception/AngleandGateStealer/SSWandVGPO/SSWandVGPO.py b/dis/jammers/Deception/AngleandGateStealer/SSWandVGPO/SSWandVGPO.py new file mode 100644 index 0000000..4796e31 --- /dev/null +++ b/dis/jammers/Deception/AngleandGateStealer/SSWandVGPO/SSWandVGPO.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandGateStealer.SSWandVGPO; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class SSWandVGPO(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 15 // Angle and Gate Stealer + self.subCategory = 40 // SSW and VGPO diff --git a/dis/jammers/Deception/AngleandRandomRangeProgramsRANRAP/AngleandRandomRangeProgramsRANRAP.py b/dis/jammers/Deception/AngleandRandomRangeProgramsRANRAP/AngleandRandomRangeProgramsRANRAP.py new file mode 100644 index 0000000..278f05f --- /dev/null +++ b/dis/jammers/Deception/AngleandRandomRangeProgramsRANRAP/AngleandRandomRangeProgramsRANRAP.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandRandomRangeProgramsRANRAP; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class AngleandRandomRangeProgramsRANRAP(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 25 // Angle and Random Range Programs (RANRAP) diff --git a/dis/jammers/Deception/AngleandRandomRangeProgramsRANRAP/RANRAPandSSW/RANRAPandSSW.py b/dis/jammers/Deception/AngleandRandomRangeProgramsRANRAP/RANRAPandSSW/RANRAPandSSW.py new file mode 100644 index 0000000..db91322 --- /dev/null +++ b/dis/jammers/Deception/AngleandRandomRangeProgramsRANRAP/RANRAPandSSW/RANRAPandSSW.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandRandomRangeProgramsRANRAP.RANRAPandSSW; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class RANRAPandSSW(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 25 // Angle and Random Range Programs (RANRAP) + self.subCategory = 5 // RANRAP and SSW diff --git a/dis/jammers/Deception/AngleandVelocity/AngleandVelocity.py b/dis/jammers/Deception/AngleandVelocity/AngleandVelocity.py new file mode 100644 index 0000000..ee54a15 --- /dev/null +++ b/dis/jammers/Deception/AngleandVelocity/AngleandVelocity.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandVelocity; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class AngleandVelocity(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 30 // Angle and Velocity diff --git a/dis/jammers/Deception/AngleandVelocity/InverseGainandVBM/InverseGainandVBM.py b/dis/jammers/Deception/AngleandVelocity/InverseGainandVBM/InverseGainandVBM.py new file mode 100644 index 0000000..57f5401 --- /dev/null +++ b/dis/jammers/Deception/AngleandVelocity/InverseGainandVBM/InverseGainandVBM.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandVelocity.InverseGainandVBM; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class InverseGainandVBM(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 30 // Angle and Velocity + self.subCategory = 5 // Inverse Gain and VBM diff --git a/dis/jammers/Deception/AngleandVelocity/SSWandVBM/SSWandVBM.py b/dis/jammers/Deception/AngleandVelocity/SSWandVBM/SSWandVBM.py new file mode 100644 index 0000000..838ffcd --- /dev/null +++ b/dis/jammers/Deception/AngleandVelocity/SSWandVBM/SSWandVBM.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AngleandVelocity.SSWandVBM; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class SSWandVBM(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 30 // Angle and Velocity + self.subCategory = 10 // SSW and VBM diff --git a/dis/jammers/Deception/AutomaticGainControlAGC/AutomaticGainControlAGC.py b/dis/jammers/Deception/AutomaticGainControlAGC/AutomaticGainControlAGC.py new file mode 100644 index 0000000..7264867 --- /dev/null +++ b/dis/jammers/Deception/AutomaticGainControlAGC/AutomaticGainControlAGC.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.AutomaticGainControlAGC; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class AutomaticGainControlAGC(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 35 // Automatic Gain Control (AGC) diff --git a/dis/jammers/Deception/Colinear/Colinear.py b/dis/jammers/Deception/Colinear/Colinear.py new file mode 100644 index 0000000..11a6564 --- /dev/null +++ b/dis/jammers/Deception/Colinear/Colinear.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Colinear; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class Colinear(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 45 // Colinear diff --git a/dis/jammers/Deception/ConstantFalseAlarmRate/ConstantFalseAlarmRate.py b/dis/jammers/Deception/ConstantFalseAlarmRate/ConstantFalseAlarmRate.py new file mode 100644 index 0000000..42aa728 --- /dev/null +++ b/dis/jammers/Deception/ConstantFalseAlarmRate/ConstantFalseAlarmRate.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.ConstantFalseAlarmRate; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class ConstantFalseAlarmRate(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 50 // Constant False Alarm Rate diff --git a/dis/jammers/Deception/Deception.py b/dis/jammers/Deception/Deception.py new file mode 100644 index 0000000..c42acb1 --- /dev/null +++ b/dis/jammers/Deception/Deception.py @@ -0,0 +1,25 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class Deception(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception diff --git a/dis/jammers/Deception/DoubleCross/DoubleCross.py b/dis/jammers/Deception/DoubleCross/DoubleCross.py new file mode 100644 index 0000000..7b9ef69 --- /dev/null +++ b/dis/jammers/Deception/DoubleCross/DoubleCross.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.DoubleCross; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class DoubleCross(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 55 // Double Cross diff --git a/dis/jammers/Deception/DownLink/DownLink.py b/dis/jammers/Deception/DownLink/DownLink.py new file mode 100644 index 0000000..bdb23cc --- /dev/null +++ b/dis/jammers/Deception/DownLink/DownLink.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.DownLink; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class DownLink(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 60 // Down Link diff --git a/dis/jammers/Deception/FalseTarget/CoherentFalseTargets/CoherentFalseTargets.py b/dis/jammers/Deception/FalseTarget/CoherentFalseTargets/CoherentFalseTargets.py new file mode 100644 index 0000000..7b513e0 --- /dev/null +++ b/dis/jammers/Deception/FalseTarget/CoherentFalseTargets/CoherentFalseTargets.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.FalseTarget.CoherentFalseTargets; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class CoherentFalseTargets(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 65 // False Target + self.subCategory = 5 // Coherent False Targets diff --git a/dis/jammers/Deception/FalseTarget/FalseDopplerTargetFDT/FalseDopplerTargetFDT.py b/dis/jammers/Deception/FalseTarget/FalseDopplerTargetFDT/FalseDopplerTargetFDT.py new file mode 100644 index 0000000..f3dc32c --- /dev/null +++ b/dis/jammers/Deception/FalseTarget/FalseDopplerTargetFDT/FalseDopplerTargetFDT.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.FalseTarget.FalseDopplerTargetFDT; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class FalseDopplerTargetFDT(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 65 // False Target + self.subCategory = 10 // False Doppler Target (FDT) diff --git a/dis/jammers/Deception/FalseTarget/FalseTarget.py b/dis/jammers/Deception/FalseTarget/FalseTarget.py new file mode 100644 index 0000000..69151b3 --- /dev/null +++ b/dis/jammers/Deception/FalseTarget/FalseTarget.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.FalseTarget; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class FalseTarget(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 65 // False Target diff --git a/dis/jammers/Deception/FalseTarget/MultipleFalseTargets/MultipleFalseTargets.py b/dis/jammers/Deception/FalseTarget/MultipleFalseTargets/MultipleFalseTargets.py new file mode 100644 index 0000000..17423f4 --- /dev/null +++ b/dis/jammers/Deception/FalseTarget/MultipleFalseTargets/MultipleFalseTargets.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.FalseTarget.MultipleFalseTargets; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class MultipleFalseTargets(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 65 // False Target + self.subCategory = 15 // Multiple False Targets diff --git a/dis/jammers/Deception/FalseTarget/RangeFalseTargetsRFT/RangeFalseTargetsRFT.py b/dis/jammers/Deception/FalseTarget/RangeFalseTargetsRFT/RangeFalseTargetsRFT.py new file mode 100644 index 0000000..fa8a83d --- /dev/null +++ b/dis/jammers/Deception/FalseTarget/RangeFalseTargetsRFT/RangeFalseTargetsRFT.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.FalseTarget.RangeFalseTargetsRFT; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class RangeFalseTargetsRFT(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 65 // False Target + self.subCategory = 20 // Range False Targets (RFT) diff --git a/dis/jammers/Deception/FalseTarget/Transponder/Transponder.py b/dis/jammers/Deception/FalseTarget/Transponder/Transponder.py new file mode 100644 index 0000000..40f2d91 --- /dev/null +++ b/dis/jammers/Deception/FalseTarget/Transponder/Transponder.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.FalseTarget.Transponder; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class Transponder(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 65 // False Target + self.subCategory = 25 // Transponder diff --git a/dis/jammers/Deception/FalseTarget/VelocityFalseTargetsVFT/VelocityFalseTargetsVFT.py b/dis/jammers/Deception/FalseTarget/VelocityFalseTargetsVFT/VelocityFalseTargetsVFT.py new file mode 100644 index 0000000..fa3061e --- /dev/null +++ b/dis/jammers/Deception/FalseTarget/VelocityFalseTargetsVFT/VelocityFalseTargetsVFT.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.FalseTarget.VelocityFalseTargetsVFT; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class VelocityFalseTargetsVFT(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 65 // False Target + self.subCategory = 30 // Velocity False Targets (VFT) diff --git a/dis/jammers/Deception/FigureEight/FigureEight.py b/dis/jammers/Deception/FigureEight/FigureEight.py new file mode 100644 index 0000000..c792c57 --- /dev/null +++ b/dis/jammers/Deception/FigureEight/FigureEight.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.FigureEight; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class FigureEight(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 70 // Figure Eight diff --git a/dis/jammers/Deception/GateStealer/ChirpGateStealerCGS/ChirpGateStealerCGS.py b/dis/jammers/Deception/GateStealer/ChirpGateStealerCGS/ChirpGateStealerCGS.py new file mode 100644 index 0000000..d744029 --- /dev/null +++ b/dis/jammers/Deception/GateStealer/ChirpGateStealerCGS/ChirpGateStealerCGS.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.GateStealer.ChirpGateStealerCGS; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class ChirpGateStealerCGS(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 75 // Gate Stealer + self.subCategory = 5 // Chirp Gate Stealer (CGS) diff --git a/dis/jammers/Deception/GateStealer/GateStealer.py b/dis/jammers/Deception/GateStealer/GateStealer.py new file mode 100644 index 0000000..4177dbf --- /dev/null +++ b/dis/jammers/Deception/GateStealer/GateStealer.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.GateStealer; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class GateStealer(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 75 // Gate Stealer diff --git a/dis/jammers/Deception/GateStealer/RGPOandVGPO/RGPOandVGPO.py b/dis/jammers/Deception/GateStealer/RGPOandVGPO/RGPOandVGPO.py new file mode 100644 index 0000000..b907a89 --- /dev/null +++ b/dis/jammers/Deception/GateStealer/RGPOandVGPO/RGPOandVGPO.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.GateStealer.RGPOandVGPO; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class RGPOandVGPO(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 75 // Gate Stealer + self.subCategory = 15 // RGPO and VGPO diff --git a/dis/jammers/Deception/GateStealer/RangeGatePullOffRGPO/RangeGatePullOffRGPO.py b/dis/jammers/Deception/GateStealer/RangeGatePullOffRGPO/RangeGatePullOffRGPO.py new file mode 100644 index 0000000..b2f9e8e --- /dev/null +++ b/dis/jammers/Deception/GateStealer/RangeGatePullOffRGPO/RangeGatePullOffRGPO.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.GateStealer.RangeGatePullOffRGPO; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class RangeGatePullOffRGPO(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 75 // Gate Stealer + self.subCategory = 10 // Range Gate Pull-Off (RGPO) diff --git a/dis/jammers/Deception/GateStealer/VGPOakaVelocityGateStealerVGS/VGPOakaVelocityGateStealerVGS.py b/dis/jammers/Deception/GateStealer/VGPOakaVelocityGateStealerVGS/VGPOakaVelocityGateStealerVGS.py new file mode 100644 index 0000000..86f51e6 --- /dev/null +++ b/dis/jammers/Deception/GateStealer/VGPOakaVelocityGateStealerVGS/VGPOakaVelocityGateStealerVGS.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.GateStealer.VGPOakaVelocityGateStealerVGS; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class VGPOakaVelocityGateStealerVGS(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 75 // Gate Stealer + self.subCategory = 20 // VGPO (aka Velocity Gate Stealer, VGS) diff --git a/dis/jammers/Deception/GateStealerandRepeater/GateStealerandRepeater.py b/dis/jammers/Deception/GateStealerandRepeater/GateStealerandRepeater.py new file mode 100644 index 0000000..6412bb7 --- /dev/null +++ b/dis/jammers/Deception/GateStealerandRepeater/GateStealerandRepeater.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.GateStealerandRepeater; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class GateStealerandRepeater(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 80 // Gate Stealer and Repeater diff --git a/dis/jammers/Deception/GateStealerandRepeater/RepeaterSweptAmplitudeModulationRSAMandVGPO/RepeaterSweptAmplitudeModulationRSAMandVGPO.py b/dis/jammers/Deception/GateStealerandRepeater/RepeaterSweptAmplitudeModulationRSAMandVGPO/RepeaterSweptAmplitudeModulationRSAMandVGPO.py new file mode 100644 index 0000000..cd4aa0d --- /dev/null +++ b/dis/jammers/Deception/GateStealerandRepeater/RepeaterSweptAmplitudeModulationRSAMandVGPO/RepeaterSweptAmplitudeModulationRSAMandVGPO.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.GateStealerandRepeater.RepeaterSweptAmplitudeModulationRSAMandVGPO; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class RepeaterSweptAmplitudeModulationRSAMandVGPO(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 80 // Gate Stealer and Repeater + self.subCategory = 5 // Repeater Swept Amplitude Modulation (RSAM) and VGPO diff --git a/dis/jammers/Deception/GlintEnhance/GlintEnhance.py b/dis/jammers/Deception/GlintEnhance/GlintEnhance.py new file mode 100644 index 0000000..e546544 --- /dev/null +++ b/dis/jammers/Deception/GlintEnhance/GlintEnhance.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.GlintEnhance; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class GlintEnhance(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 85 // Glint Enhance diff --git a/dis/jammers/Deception/ImageFrequency/ImageFrequency.py b/dis/jammers/Deception/ImageFrequency/ImageFrequency.py new file mode 100644 index 0000000..215231a --- /dev/null +++ b/dis/jammers/Deception/ImageFrequency/ImageFrequency.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.ImageFrequency; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class ImageFrequency(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 90 // Image Frequency diff --git a/dis/jammers/Deception/JitteredPulseRepetitionFrequency/JitteredPulseRepetitionFrequency.py b/dis/jammers/Deception/JitteredPulseRepetitionFrequency/JitteredPulseRepetitionFrequency.py new file mode 100644 index 0000000..746c1e7 --- /dev/null +++ b/dis/jammers/Deception/JitteredPulseRepetitionFrequency/JitteredPulseRepetitionFrequency.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.JitteredPulseRepetitionFrequency; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class JitteredPulseRepetitionFrequency(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 95 // Jittered Pulse Repetition Frequency diff --git a/dis/jammers/Deception/JitteredPulseWidth/JitteredPulseWidth.py b/dis/jammers/Deception/JitteredPulseWidth/JitteredPulseWidth.py new file mode 100644 index 0000000..dd0523e --- /dev/null +++ b/dis/jammers/Deception/JitteredPulseWidth/JitteredPulseWidth.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.JitteredPulseWidth; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class JitteredPulseWidth(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 100 // Jittered Pulse Width diff --git a/dis/jammers/Deception/PseudorandomNoisePRN/PseudorandomNoisePRN.py b/dis/jammers/Deception/PseudorandomNoisePRN/PseudorandomNoisePRN.py new file mode 100644 index 0000000..b5d71be --- /dev/null +++ b/dis/jammers/Deception/PseudorandomNoisePRN/PseudorandomNoisePRN.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.PseudorandomNoisePRN; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class PseudorandomNoisePRN(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 105 // Pseudorandom Noise (PRN) diff --git a/dis/jammers/Deception/Pulse/Pulse.py b/dis/jammers/Deception/Pulse/Pulse.py new file mode 100644 index 0000000..ceaffa6 --- /dev/null +++ b/dis/jammers/Deception/Pulse/Pulse.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Pulse; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class Pulse(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 110 // Pulse diff --git a/dis/jammers/Deception/PulseCompressionDeception/PulseCompressionDeception.py b/dis/jammers/Deception/PulseCompressionDeception/PulseCompressionDeception.py new file mode 100644 index 0000000..c87fc07 --- /dev/null +++ b/dis/jammers/Deception/PulseCompressionDeception/PulseCompressionDeception.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.PulseCompressionDeception; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class PulseCompressionDeception(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 115 // Pulse Compression Deception diff --git a/dis/jammers/Deception/RandomRangeProgramsRANRAP/RandomRangeProgramsRANRAP.py b/dis/jammers/Deception/RandomRangeProgramsRANRAP/RandomRangeProgramsRANRAP.py new file mode 100644 index 0000000..5b890c4 --- /dev/null +++ b/dis/jammers/Deception/RandomRangeProgramsRANRAP/RandomRangeProgramsRANRAP.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.RandomRangeProgramsRANRAP; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class RandomRangeProgramsRANRAP(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 120 // Random Range Programs (RANRAP) diff --git a/dis/jammers/Deception/Refraction/Refraction.py b/dis/jammers/Deception/Refraction/Refraction.py new file mode 100644 index 0000000..13f9aad --- /dev/null +++ b/dis/jammers/Deception/Refraction/Refraction.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Refraction; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class Refraction(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 125 // Refraction diff --git a/dis/jammers/Deception/Repeater/ContinuousWaveRepeater/ContinuousWaveRepeater.py b/dis/jammers/Deception/Repeater/ContinuousWaveRepeater/ContinuousWaveRepeater.py new file mode 100644 index 0000000..25b06ea --- /dev/null +++ b/dis/jammers/Deception/Repeater/ContinuousWaveRepeater/ContinuousWaveRepeater.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Repeater.ContinuousWaveRepeater; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class ContinuousWaveRepeater(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 130 // Repeater + self.subCategory = 5 // Continuous Wave Repeater diff --git a/dis/jammers/Deception/Repeater/MultipleFrequencyRepeaterMFR/MultipleFrequencyRepeaterMFR.py b/dis/jammers/Deception/Repeater/MultipleFrequencyRepeaterMFR/MultipleFrequencyRepeaterMFR.py new file mode 100644 index 0000000..05e0b9f --- /dev/null +++ b/dis/jammers/Deception/Repeater/MultipleFrequencyRepeaterMFR/MultipleFrequencyRepeaterMFR.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Repeater.MultipleFrequencyRepeaterMFR; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class MultipleFrequencyRepeaterMFR(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 130 // Repeater + self.subCategory = 15 // Multiple Frequency Repeater (MFR) diff --git a/dis/jammers/Deception/Repeater/NarrowBandRepeaterNoiseNBRN/NarrowBandRepeaterNoiseNBRN.py b/dis/jammers/Deception/Repeater/NarrowBandRepeaterNoiseNBRN/NarrowBandRepeaterNoiseNBRN.py new file mode 100644 index 0000000..552e94f --- /dev/null +++ b/dis/jammers/Deception/Repeater/NarrowBandRepeaterNoiseNBRN/NarrowBandRepeaterNoiseNBRN.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Repeater.NarrowBandRepeaterNoiseNBRN; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class NarrowBandRepeaterNoiseNBRN(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 130 // Repeater + self.subCategory = 20 // Narrow Band Repeater Noise (NBRN) diff --git a/dis/jammers/Deception/Repeater/RandomDopplerRD/RandomDopplerRD.py b/dis/jammers/Deception/Repeater/RandomDopplerRD/RandomDopplerRD.py new file mode 100644 index 0000000..09471b0 --- /dev/null +++ b/dis/jammers/Deception/Repeater/RandomDopplerRD/RandomDopplerRD.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Repeater.RandomDopplerRD; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class RandomDopplerRD(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 130 // Repeater + self.subCategory = 25 // Random Doppler (RD) diff --git a/dis/jammers/Deception/Repeater/Repeater.py b/dis/jammers/Deception/Repeater/Repeater.py new file mode 100644 index 0000000..773fa67 --- /dev/null +++ b/dis/jammers/Deception/Repeater/Repeater.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Repeater; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class Repeater(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 130 // Repeater diff --git a/dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelA/DRFMLevelA.py b/dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelA/DRFMLevelA.py new file mode 100644 index 0000000..b86e9ea --- /dev/null +++ b/dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelA/DRFMLevelA.py @@ -0,0 +1,28 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Repeater.RepeaterDigitalRadioFrequencyMemoryDRFM.DRFMLevelA; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class DRFMLevelA(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 130 // Repeater + self.subCategory = 30 // Repeater Digital Radio Frequency Memory (DRFM) + self.specific = 1 // DRFM Level A diff --git a/dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelB/DRFMLevelB.py b/dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelB/DRFMLevelB.py new file mode 100644 index 0000000..b3388ec --- /dev/null +++ b/dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelB/DRFMLevelB.py @@ -0,0 +1,28 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Repeater.RepeaterDigitalRadioFrequencyMemoryDRFM.DRFMLevelB; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class DRFMLevelB(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 130 // Repeater + self.subCategory = 30 // Repeater Digital Radio Frequency Memory (DRFM) + self.specific = 2 // DRFM Level B diff --git a/dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelC/DRFMLevelC.py b/dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelC/DRFMLevelC.py new file mode 100644 index 0000000..d945324 --- /dev/null +++ b/dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelC/DRFMLevelC.py @@ -0,0 +1,28 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Repeater.RepeaterDigitalRadioFrequencyMemoryDRFM.DRFMLevelC; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class DRFMLevelC(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 130 // Repeater + self.subCategory = 30 // Repeater Digital Radio Frequency Memory (DRFM) + self.specific = 3 // DRFM Level C diff --git a/dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelD/DRFMLevelD.py b/dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelD/DRFMLevelD.py new file mode 100644 index 0000000..32fbcad --- /dev/null +++ b/dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelD/DRFMLevelD.py @@ -0,0 +1,28 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Repeater.RepeaterDigitalRadioFrequencyMemoryDRFM.DRFMLevelD; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class DRFMLevelD(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 130 // Repeater + self.subCategory = 30 // Repeater Digital Radio Frequency Memory (DRFM) + self.specific = 4 // DRFM Level D diff --git a/dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelE/DRFMLevelE.py b/dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelE/DRFMLevelE.py new file mode 100644 index 0000000..3fed3a7 --- /dev/null +++ b/dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/DRFMLevelE/DRFMLevelE.py @@ -0,0 +1,28 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Repeater.RepeaterDigitalRadioFrequencyMemoryDRFM.DRFMLevelE; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class DRFMLevelE(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 130 // Repeater + self.subCategory = 30 // Repeater Digital Radio Frequency Memory (DRFM) + self.specific = 5 // DRFM Level E diff --git a/dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/RepeaterDigitalRadioFrequencyMemoryDRFM.py b/dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/RepeaterDigitalRadioFrequencyMemoryDRFM.py new file mode 100644 index 0000000..04b981b --- /dev/null +++ b/dis/jammers/Deception/Repeater/RepeaterDigitalRadioFrequencyMemoryDRFM/RepeaterDigitalRadioFrequencyMemoryDRFM.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Repeater.RepeaterDigitalRadioFrequencyMemoryDRFM; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class RepeaterDigitalRadioFrequencyMemoryDRFM(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 130 // Repeater + self.subCategory = 30 // Repeater Digital Radio Frequency Memory (DRFM) diff --git a/dis/jammers/Deception/Repeater/RepeaterNoise/RepeaterNoise.py b/dis/jammers/Deception/Repeater/RepeaterNoise/RepeaterNoise.py new file mode 100644 index 0000000..9377385 --- /dev/null +++ b/dis/jammers/Deception/Repeater/RepeaterNoise/RepeaterNoise.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Repeater.RepeaterNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class RepeaterNoise(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 130 // Repeater + self.subCategory = 10 // Repeater Noise diff --git a/dis/jammers/Deception/Repeater/RepeaterSweptAmplitudeModulationRSAM/RepeaterSweptAmplitudeModulationRSAM.py b/dis/jammers/Deception/Repeater/RepeaterSweptAmplitudeModulationRSAM/RepeaterSweptAmplitudeModulationRSAM.py new file mode 100644 index 0000000..5115d3f --- /dev/null +++ b/dis/jammers/Deception/Repeater/RepeaterSweptAmplitudeModulationRSAM/RepeaterSweptAmplitudeModulationRSAM.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Repeater.RepeaterSweptAmplitudeModulationRSAM; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class RepeaterSweptAmplitudeModulationRSAM(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 130 // Repeater + self.subCategory = 35 // Repeater Swept Amplitude Modulation (RSAM) diff --git a/dis/jammers/Deception/Scintillation/Scintillation.py b/dis/jammers/Deception/Scintillation/Scintillation.py new file mode 100644 index 0000000..a4f2ef2 --- /dev/null +++ b/dis/jammers/Deception/Scintillation/Scintillation.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Scintillation; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class Scintillation(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 135 // Scintillation diff --git a/dis/jammers/Deception/Serrodyne/Serrodyne.py b/dis/jammers/Deception/Serrodyne/Serrodyne.py new file mode 100644 index 0000000..f2558ad --- /dev/null +++ b/dis/jammers/Deception/Serrodyne/Serrodyne.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Serrodyne; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class Serrodyne(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 140 // Serrodyne diff --git a/dis/jammers/Deception/Velocity/Velocity.py b/dis/jammers/Deception/Velocity/Velocity.py new file mode 100644 index 0000000..d3452c0 --- /dev/null +++ b/dis/jammers/Deception/Velocity/Velocity.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Deception.Velocity; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class Velocity(JammingTechnique): + def __init__(self): + self.kind = 2 // Deception + self.category = 145 // Velocity diff --git a/dis/jammers/DeceptionandNoise/AngleandFMbyNoise/AngleandFMbyNoise.py b/dis/jammers/DeceptionandNoise/AngleandFMbyNoise/AngleandFMbyNoise.py new file mode 100644 index 0000000..8d3400f --- /dev/null +++ b/dis/jammers/DeceptionandNoise/AngleandFMbyNoise/AngleandFMbyNoise.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.AngleandFMbyNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class AngleandFMbyNoise(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 10 // Angle and FM by Noise diff --git a/dis/jammers/DeceptionandNoise/AngleandFMbyNoise/FMbyNoiseandInverseGain/FMbyNoiseandInverseGain.py b/dis/jammers/DeceptionandNoise/AngleandFMbyNoise/FMbyNoiseandInverseGain/FMbyNoiseandInverseGain.py new file mode 100644 index 0000000..78a992d --- /dev/null +++ b/dis/jammers/DeceptionandNoise/AngleandFMbyNoise/FMbyNoiseandInverseGain/FMbyNoiseandInverseGain.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.AngleandFMbyNoise.FMbyNoiseandInverseGain; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class FMbyNoiseandInverseGain(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 10 // Angle and FM by Noise + self.subCategory = 5 // FM by Noise and Inverse Gain diff --git a/dis/jammers/DeceptionandNoise/AngleandFMbyNoise/FMbyNoiseandSSW/FMbyNoiseandSSW.py b/dis/jammers/DeceptionandNoise/AngleandFMbyNoise/FMbyNoiseandSSW/FMbyNoiseandSSW.py new file mode 100644 index 0000000..31391ea --- /dev/null +++ b/dis/jammers/DeceptionandNoise/AngleandFMbyNoise/FMbyNoiseandSSW/FMbyNoiseandSSW.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.AngleandFMbyNoise.FMbyNoiseandSSW; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class FMbyNoiseandSSW(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 10 // Angle and FM by Noise + self.subCategory = 10 // FM by Noise and SSW diff --git a/dis/jammers/DeceptionandNoise/AngleandNoise/AngleandBarrage/AngleandBarrage.py b/dis/jammers/DeceptionandNoise/AngleandNoise/AngleandBarrage/AngleandBarrage.py new file mode 100644 index 0000000..31f9c2e --- /dev/null +++ b/dis/jammers/DeceptionandNoise/AngleandNoise/AngleandBarrage/AngleandBarrage.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.AngleandNoise.AngleandBarrage; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class AngleandBarrage(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 5 // Angle and Noise + self.subCategory = 5 // Angle and Barrage diff --git a/dis/jammers/DeceptionandNoise/AngleandNoise/AngleandBarrage/BarrageandInverseGain/BarrageandInverseGain.py b/dis/jammers/DeceptionandNoise/AngleandNoise/AngleandBarrage/BarrageandInverseGain/BarrageandInverseGain.py new file mode 100644 index 0000000..afc5424 --- /dev/null +++ b/dis/jammers/DeceptionandNoise/AngleandNoise/AngleandBarrage/BarrageandInverseGain/BarrageandInverseGain.py @@ -0,0 +1,28 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.AngleandNoise.AngleandBarrage.BarrageandInverseGain; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class BarrageandInverseGain(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 5 // Angle and Noise + self.subCategory = 5 // Angle and Barrage + self.specific = 5 // Barrage and Inverse Gain diff --git a/dis/jammers/DeceptionandNoise/AngleandNoise/AngleandBarrage/BarrageandSSW/BarrageandSSW.py b/dis/jammers/DeceptionandNoise/AngleandNoise/AngleandBarrage/BarrageandSSW/BarrageandSSW.py new file mode 100644 index 0000000..b6fcd19 --- /dev/null +++ b/dis/jammers/DeceptionandNoise/AngleandNoise/AngleandBarrage/BarrageandSSW/BarrageandSSW.py @@ -0,0 +1,28 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.AngleandNoise.AngleandBarrage.BarrageandSSW; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class BarrageandSSW(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 5 // Angle and Noise + self.subCategory = 5 // Angle and Barrage + self.specific = 10 // Barrage and SSW diff --git a/dis/jammers/DeceptionandNoise/AngleandNoise/AngleandNoise.py b/dis/jammers/DeceptionandNoise/AngleandNoise/AngleandNoise.py new file mode 100644 index 0000000..0abd639 --- /dev/null +++ b/dis/jammers/DeceptionandNoise/AngleandNoise/AngleandNoise.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.AngleandNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class AngleandNoise(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 5 // Angle and Noise diff --git a/dis/jammers/DeceptionandNoise/AngleandPseudorandomAM/AngleandPseudorandomAM.py b/dis/jammers/DeceptionandNoise/AngleandPseudorandomAM/AngleandPseudorandomAM.py new file mode 100644 index 0000000..49f3c1f --- /dev/null +++ b/dis/jammers/DeceptionandNoise/AngleandPseudorandomAM/AngleandPseudorandomAM.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.AngleandPseudorandomAM; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class AngleandPseudorandomAM(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 15 // Angle and Pseudorandom AM diff --git a/dis/jammers/DeceptionandNoise/AngleandPseudorandomAM/InverseGainandPseudorandomAM/InverseGainandPseudorandomAM.py b/dis/jammers/DeceptionandNoise/AngleandPseudorandomAM/InverseGainandPseudorandomAM/InverseGainandPseudorandomAM.py new file mode 100644 index 0000000..c555be5 --- /dev/null +++ b/dis/jammers/DeceptionandNoise/AngleandPseudorandomAM/InverseGainandPseudorandomAM/InverseGainandPseudorandomAM.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.AngleandPseudorandomAM.InverseGainandPseudorandomAM; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class InverseGainandPseudorandomAM(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 15 // Angle and Pseudorandom AM + self.subCategory = 5 // Inverse Gain and Pseudorandom AM diff --git a/dis/jammers/DeceptionandNoise/AngleandPseudorandomAM/PseudorandomAMandSSW/PseudorandomAMandSSW.py b/dis/jammers/DeceptionandNoise/AngleandPseudorandomAM/PseudorandomAMandSSW/PseudorandomAMandSSW.py new file mode 100644 index 0000000..66bfc22 --- /dev/null +++ b/dis/jammers/DeceptionandNoise/AngleandPseudorandomAM/PseudorandomAMandSSW/PseudorandomAMandSSW.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.AngleandPseudorandomAM.PseudorandomAMandSSW; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class PseudorandomAMandSSW(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 15 // Angle and Pseudorandom AM + self.subCategory = 10 // Pseudorandom AM and SSW diff --git a/dis/jammers/DeceptionandNoise/AngleandSpot/AngleandSpot.py b/dis/jammers/DeceptionandNoise/AngleandSpot/AngleandSpot.py new file mode 100644 index 0000000..ed21f33 --- /dev/null +++ b/dis/jammers/DeceptionandNoise/AngleandSpot/AngleandSpot.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.AngleandSpot; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class AngleandSpot(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 20 // Angle and Spot diff --git a/dis/jammers/DeceptionandNoise/AngleandSpot/InverseGainandLowLevelNoise/InverseGainandLowLevelNoise.py b/dis/jammers/DeceptionandNoise/AngleandSpot/InverseGainandLowLevelNoise/InverseGainandLowLevelNoise.py new file mode 100644 index 0000000..38c30f3 --- /dev/null +++ b/dis/jammers/DeceptionandNoise/AngleandSpot/InverseGainandLowLevelNoise/InverseGainandLowLevelNoise.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.AngleandSpot.InverseGainandLowLevelNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class InverseGainandLowLevelNoise(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 20 // Angle and Spot + self.subCategory = 5 // Inverse Gain and Low Level Noise diff --git a/dis/jammers/DeceptionandNoise/AngleandSpot/InverseGainandSpotNoise/InverseGainandSpotNoise.py b/dis/jammers/DeceptionandNoise/AngleandSpot/InverseGainandSpotNoise/InverseGainandSpotNoise.py new file mode 100644 index 0000000..8dfaa5d --- /dev/null +++ b/dis/jammers/DeceptionandNoise/AngleandSpot/InverseGainandSpotNoise/InverseGainandSpotNoise.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.AngleandSpot.InverseGainandSpotNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class InverseGainandSpotNoise(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 20 // Angle and Spot + self.subCategory = 10 // Inverse Gain and Spot Noise diff --git a/dis/jammers/DeceptionandNoise/AngleandSpot/SpotandSSW/SpotandSSW.py b/dis/jammers/DeceptionandNoise/AngleandSpot/SpotandSSW/SpotandSSW.py new file mode 100644 index 0000000..5c60492 --- /dev/null +++ b/dis/jammers/DeceptionandNoise/AngleandSpot/SpotandSSW/SpotandSSW.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.AngleandSpot.SpotandSSW; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class SpotandSSW(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 20 // Angle and Spot + self.subCategory = 15 // Spot and SSW diff --git a/dis/jammers/DeceptionandNoise/DeceptionandNoise.py b/dis/jammers/DeceptionandNoise/DeceptionandNoise.py new file mode 100644 index 0000000..bf45fa8 --- /dev/null +++ b/dis/jammers/DeceptionandNoise/DeceptionandNoise.py @@ -0,0 +1,25 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class DeceptionandNoise(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise diff --git a/dis/jammers/DeceptionandNoise/FalseTargetDeceptionandSweptNoise/FalseTargetDeceptionandSweptNoise.py b/dis/jammers/DeceptionandNoise/FalseTargetDeceptionandSweptNoise/FalseTargetDeceptionandSweptNoise.py new file mode 100644 index 0000000..d80752e --- /dev/null +++ b/dis/jammers/DeceptionandNoise/FalseTargetDeceptionandSweptNoise/FalseTargetDeceptionandSweptNoise.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.FalseTargetDeceptionandSweptNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class FalseTargetDeceptionandSweptNoise(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 30 // False Target Deception and Swept Noise diff --git a/dis/jammers/DeceptionandNoise/GateStealerandNoise/GateStealerandNoise.py b/dis/jammers/DeceptionandNoise/GateStealerandNoise/GateStealerandNoise.py new file mode 100644 index 0000000..a4e5122 --- /dev/null +++ b/dis/jammers/DeceptionandNoise/GateStealerandNoise/GateStealerandNoise.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.GateStealerandNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class GateStealerandNoise(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 25 // Gate Stealer and Noise diff --git a/dis/jammers/DeceptionandNoise/GateStealerandNoise/NoiseandRGPO/LowLevelNoiseandRGPO/LowLevelNoiseandRGPO.py b/dis/jammers/DeceptionandNoise/GateStealerandNoise/NoiseandRGPO/LowLevelNoiseandRGPO/LowLevelNoiseandRGPO.py new file mode 100644 index 0000000..61048cc --- /dev/null +++ b/dis/jammers/DeceptionandNoise/GateStealerandNoise/NoiseandRGPO/LowLevelNoiseandRGPO/LowLevelNoiseandRGPO.py @@ -0,0 +1,28 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.GateStealerandNoise.NoiseandRGPO.LowLevelNoiseandRGPO; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class LowLevelNoiseandRGPO(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 25 // Gate Stealer and Noise + self.subCategory = 5 // Noise and RGPO + self.specific = 5 // Low Level Noise and RGPO diff --git a/dis/jammers/DeceptionandNoise/GateStealerandNoise/NoiseandRGPO/NoiseandRGPO.py b/dis/jammers/DeceptionandNoise/GateStealerandNoise/NoiseandRGPO/NoiseandRGPO.py new file mode 100644 index 0000000..e00494a --- /dev/null +++ b/dis/jammers/DeceptionandNoise/GateStealerandNoise/NoiseandRGPO/NoiseandRGPO.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.GateStealerandNoise.NoiseandRGPO; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class NoiseandRGPO(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 25 // Gate Stealer and Noise + self.subCategory = 5 // Noise and RGPO diff --git a/dis/jammers/DeceptionandNoise/GateStealerandNoise/NoiseandVGPO/LowLevelNoiseandVGPO/LowLevelNoiseandVGPO.py b/dis/jammers/DeceptionandNoise/GateStealerandNoise/NoiseandVGPO/LowLevelNoiseandVGPO/LowLevelNoiseandVGPO.py new file mode 100644 index 0000000..c65f82b --- /dev/null +++ b/dis/jammers/DeceptionandNoise/GateStealerandNoise/NoiseandVGPO/LowLevelNoiseandVGPO/LowLevelNoiseandVGPO.py @@ -0,0 +1,28 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.GateStealerandNoise.NoiseandVGPO.LowLevelNoiseandVGPO; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class LowLevelNoiseandVGPO(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 25 // Gate Stealer and Noise + self.subCategory = 10 // Noise and VGPO + self.specific = 5 // Low Level Noise and VGPO diff --git a/dis/jammers/DeceptionandNoise/GateStealerandNoise/NoiseandVGPO/NoiseandVGPO.py b/dis/jammers/DeceptionandNoise/GateStealerandNoise/NoiseandVGPO/NoiseandVGPO.py new file mode 100644 index 0000000..65bab44 --- /dev/null +++ b/dis/jammers/DeceptionandNoise/GateStealerandNoise/NoiseandVGPO/NoiseandVGPO.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.DeceptionandNoise.GateStealerandNoise.NoiseandVGPO; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class NoiseandVGPO(JammingTechnique): + def __init__(self): + self.kind = 3 // Deception and Noise + self.category = 25 // Gate Stealer and Noise + self.subCategory = 10 // Noise and VGPO diff --git a/dis/jammers/Noise/AmplitudeModulationAMNoise/AmplitudeModulationAMNoise.py b/dis/jammers/Noise/AmplitudeModulationAMNoise/AmplitudeModulationAMNoise.py new file mode 100644 index 0000000..f5e8824 --- /dev/null +++ b/dis/jammers/Noise/AmplitudeModulationAMNoise/AmplitudeModulationAMNoise.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.AmplitudeModulationAMNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class AmplitudeModulationAMNoise(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 5 // Amplitude Modulation (AM) Noise diff --git a/dis/jammers/Noise/BarrageNoise/BarrageNoise.py b/dis/jammers/Noise/BarrageNoise/BarrageNoise.py new file mode 100644 index 0000000..1470699 --- /dev/null +++ b/dis/jammers/Noise/BarrageNoise/BarrageNoise.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.BarrageNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class BarrageNoise(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 10 // Barrage Noise diff --git a/dis/jammers/Noise/BarrageNoise/Click/Click.py b/dis/jammers/Noise/BarrageNoise/Click/Click.py new file mode 100644 index 0000000..e6cd617 --- /dev/null +++ b/dis/jammers/Noise/BarrageNoise/Click/Click.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.BarrageNoise.Click; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class Click(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 10 // Barrage Noise + self.subCategory = 5 // Click diff --git a/dis/jammers/Noise/BarrageNoise/SourceNoise/SourceNoise.py b/dis/jammers/Noise/BarrageNoise/SourceNoise/SourceNoise.py new file mode 100644 index 0000000..31bb236 --- /dev/null +++ b/dis/jammers/Noise/BarrageNoise/SourceNoise/SourceNoise.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.BarrageNoise.SourceNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class SourceNoise(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 10 // Barrage Noise + self.subCategory = 10 // Source Noise diff --git a/dis/jammers/Noise/BistaticClutter/BistaticClutter.py b/dis/jammers/Noise/BistaticClutter/BistaticClutter.py new file mode 100644 index 0000000..f88571d --- /dev/null +++ b/dis/jammers/Noise/BistaticClutter/BistaticClutter.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.BistaticClutter; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class BistaticClutter(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 15 // Bistatic Clutter diff --git a/dis/jammers/Noise/Comb/Comb.py b/dis/jammers/Noise/Comb/Comb.py new file mode 100644 index 0000000..c21e15e --- /dev/null +++ b/dis/jammers/Noise/Comb/Comb.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.Comb; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class Comb(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 20 // Comb diff --git a/dis/jammers/Noise/CooperativeBlinkedNoiseCBN/CooperativeBlinkedNoiseCBN.py b/dis/jammers/Noise/CooperativeBlinkedNoiseCBN/CooperativeBlinkedNoiseCBN.py new file mode 100644 index 0000000..7e4ed5d --- /dev/null +++ b/dis/jammers/Noise/CooperativeBlinkedNoiseCBN/CooperativeBlinkedNoiseCBN.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.CooperativeBlinkedNoiseCBN; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class CooperativeBlinkedNoiseCBN(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 25 // Cooperative Blinked Noise (CBN) diff --git a/dis/jammers/Noise/DopplerNoise/DopplerNoise.py b/dis/jammers/Noise/DopplerNoise/DopplerNoise.py new file mode 100644 index 0000000..fc9ec50 --- /dev/null +++ b/dis/jammers/Noise/DopplerNoise/DopplerNoise.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.DopplerNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class DopplerNoise(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 30 // Doppler Noise diff --git a/dis/jammers/Noise/FrequencyModulationFMbyNoise/FrequencyModulationFMbyNoise.py b/dis/jammers/Noise/FrequencyModulationFMbyNoise/FrequencyModulationFMbyNoise.py new file mode 100644 index 0000000..c130764 --- /dev/null +++ b/dis/jammers/Noise/FrequencyModulationFMbyNoise/FrequencyModulationFMbyNoise.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.FrequencyModulationFMbyNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class FrequencyModulationFMbyNoise(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 35 // Frequency Modulation (FM) by Noise diff --git a/dis/jammers/Noise/ImpulseNoise/ImpulseNoise.py b/dis/jammers/Noise/ImpulseNoise/ImpulseNoise.py new file mode 100644 index 0000000..fcd2873 --- /dev/null +++ b/dis/jammers/Noise/ImpulseNoise/ImpulseNoise.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.ImpulseNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class ImpulseNoise(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 40 // Impulse Noise diff --git a/dis/jammers/Noise/Noise.py b/dis/jammers/Noise/Noise.py new file mode 100644 index 0000000..43168b1 --- /dev/null +++ b/dis/jammers/Noise/Noise.py @@ -0,0 +1,25 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class Noise(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise diff --git a/dis/jammers/Noise/PartialBand/PartialBand.py b/dis/jammers/Noise/PartialBand/PartialBand.py new file mode 100644 index 0000000..6e7c05a --- /dev/null +++ b/dis/jammers/Noise/PartialBand/PartialBand.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.PartialBand; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class PartialBand(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 45 // Partial Band diff --git a/dis/jammers/Noise/PseudorandomAM/PseudorandomAM.py b/dis/jammers/Noise/PseudorandomAM/PseudorandomAM.py new file mode 100644 index 0000000..f6e61bc --- /dev/null +++ b/dis/jammers/Noise/PseudorandomAM/PseudorandomAM.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.PseudorandomAM; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class PseudorandomAM(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 50 // Pseudorandom AM diff --git a/dis/jammers/Noise/PulseNoise/PulseNoise.py b/dis/jammers/Noise/PulseNoise/PulseNoise.py new file mode 100644 index 0000000..6d1dd2f --- /dev/null +++ b/dis/jammers/Noise/PulseNoise/PulseNoise.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.PulseNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class PulseNoise(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 55 // Pulse Noise diff --git a/dis/jammers/Noise/QuasiNoiseakaPseudorandom/QuasiNoiseakaPseudorandom.py b/dis/jammers/Noise/QuasiNoiseakaPseudorandom/QuasiNoiseakaPseudorandom.py new file mode 100644 index 0000000..c38f4d7 --- /dev/null +++ b/dis/jammers/Noise/QuasiNoiseakaPseudorandom/QuasiNoiseakaPseudorandom.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.QuasiNoiseakaPseudorandom; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class QuasiNoiseakaPseudorandom(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 60 // Quasi-Noise (aka Pseudorandom) diff --git a/dis/jammers/Noise/RangeBinMaskingRBMakaCoverPulse/RangeBinMaskingRBMakaCoverPulse.py b/dis/jammers/Noise/RangeBinMaskingRBMakaCoverPulse/RangeBinMaskingRBMakaCoverPulse.py new file mode 100644 index 0000000..f86ed0d --- /dev/null +++ b/dis/jammers/Noise/RangeBinMaskingRBMakaCoverPulse/RangeBinMaskingRBMakaCoverPulse.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.RangeBinMaskingRBMakaCoverPulse; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class RangeBinMaskingRBMakaCoverPulse(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 65 // Range Bin Masking (RBM) (aka Cover Pulse) diff --git a/dis/jammers/Noise/RangeBinMaskingRBMakaCoverPulse/RangeBinMaskingwithVelocityBinMasking/RangeBinMaskingwithVelocityBinMasking.py b/dis/jammers/Noise/RangeBinMaskingRBMakaCoverPulse/RangeBinMaskingwithVelocityBinMasking/RangeBinMaskingwithVelocityBinMasking.py new file mode 100644 index 0000000..42e1e3d --- /dev/null +++ b/dis/jammers/Noise/RangeBinMaskingRBMakaCoverPulse/RangeBinMaskingwithVelocityBinMasking/RangeBinMaskingwithVelocityBinMasking.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.RangeBinMaskingRBMakaCoverPulse.RangeBinMaskingwithVelocityBinMasking; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class RangeBinMaskingwithVelocityBinMasking(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 65 // Range Bin Masking (RBM) (aka Cover Pulse) + self.subCategory = 5 // Range Bin Masking with Velocity Bin Masking diff --git a/dis/jammers/Noise/RepeaterNoise/NarrowbandRepeaterNoise/NarrowbandRepeaterNoise.py b/dis/jammers/Noise/RepeaterNoise/NarrowbandRepeaterNoise/NarrowbandRepeaterNoise.py new file mode 100644 index 0000000..bb1f962 --- /dev/null +++ b/dis/jammers/Noise/RepeaterNoise/NarrowbandRepeaterNoise/NarrowbandRepeaterNoise.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.RepeaterNoise.NarrowbandRepeaterNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class NarrowbandRepeaterNoise(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 70 // Repeater Noise + self.subCategory = 5 // Narrowband Repeater Noise diff --git a/dis/jammers/Noise/RepeaterNoise/RepeaterNoise.py b/dis/jammers/Noise/RepeaterNoise/RepeaterNoise.py new file mode 100644 index 0000000..bc44d52 --- /dev/null +++ b/dis/jammers/Noise/RepeaterNoise/RepeaterNoise.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.RepeaterNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class RepeaterNoise(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 70 // Repeater Noise diff --git a/dis/jammers/Noise/RepeaterNoise/WideBandRepeaterNoise/WideBandRepeaterNoise.py b/dis/jammers/Noise/RepeaterNoise/WideBandRepeaterNoise/WideBandRepeaterNoise.py new file mode 100644 index 0000000..7fe2087 --- /dev/null +++ b/dis/jammers/Noise/RepeaterNoise/WideBandRepeaterNoise/WideBandRepeaterNoise.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.RepeaterNoise.WideBandRepeaterNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class WideBandRepeaterNoise(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 70 // Repeater Noise + self.subCategory = 10 // Wide Band Repeater Noise diff --git a/dis/jammers/Noise/SpotNoise/AutomaticSpotNoiseASJ/AutomaticSpotNoiseASJ.py b/dis/jammers/Noise/SpotNoise/AutomaticSpotNoiseASJ/AutomaticSpotNoiseASJ.py new file mode 100644 index 0000000..592ce47 --- /dev/null +++ b/dis/jammers/Noise/SpotNoise/AutomaticSpotNoiseASJ/AutomaticSpotNoiseASJ.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.SpotNoise.AutomaticSpotNoiseASJ; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class AutomaticSpotNoiseASJ(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 75 // Spot Noise + self.subCategory = 5 // Automatic Spot Noise (ASJ) diff --git a/dis/jammers/Noise/SpotNoise/BlinkingSpotNoise/BlinkingSpotNoise.py b/dis/jammers/Noise/SpotNoise/BlinkingSpotNoise/BlinkingSpotNoise.py new file mode 100644 index 0000000..8757867 --- /dev/null +++ b/dis/jammers/Noise/SpotNoise/BlinkingSpotNoise/BlinkingSpotNoise.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.SpotNoise.BlinkingSpotNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class BlinkingSpotNoise(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 75 // Spot Noise + self.subCategory = 10 // Blinking Spot Noise diff --git a/dis/jammers/Noise/SpotNoise/BurstSpotNoise/BurstSpotNoise.py b/dis/jammers/Noise/SpotNoise/BurstSpotNoise/BurstSpotNoise.py new file mode 100644 index 0000000..1d72bf1 --- /dev/null +++ b/dis/jammers/Noise/SpotNoise/BurstSpotNoise/BurstSpotNoise.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.SpotNoise.BurstSpotNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class BurstSpotNoise(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 75 // Spot Noise + self.subCategory = 15 // Burst Spot Noise diff --git a/dis/jammers/Noise/SpotNoise/DopplerSpotNoise/DopplerSpotNoise.py b/dis/jammers/Noise/SpotNoise/DopplerSpotNoise/DopplerSpotNoise.py new file mode 100644 index 0000000..81a68f5 --- /dev/null +++ b/dis/jammers/Noise/SpotNoise/DopplerSpotNoise/DopplerSpotNoise.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.SpotNoise.DopplerSpotNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class DopplerSpotNoise(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 75 // Spot Noise + self.subCategory = 20 // Doppler Spot Noise diff --git a/dis/jammers/Noise/SpotNoise/SkirtFrequency/SkirtFrequency.py b/dis/jammers/Noise/SpotNoise/SkirtFrequency/SkirtFrequency.py new file mode 100644 index 0000000..a2789b7 --- /dev/null +++ b/dis/jammers/Noise/SpotNoise/SkirtFrequency/SkirtFrequency.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.SpotNoise.SkirtFrequency; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class SkirtFrequency(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 75 // Spot Noise + self.subCategory = 25 // Skirt Frequency diff --git a/dis/jammers/Noise/SpotNoise/SpotNoise.py b/dis/jammers/Noise/SpotNoise/SpotNoise.py new file mode 100644 index 0000000..b1fa133 --- /dev/null +++ b/dis/jammers/Noise/SpotNoise/SpotNoise.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.SpotNoise; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class SpotNoise(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 75 // Spot Noise diff --git a/dis/jammers/Noise/SweptNoiseakaSweptSpotNoiseSweep/FrequencySwept/FrequencySwept.py b/dis/jammers/Noise/SweptNoiseakaSweptSpotNoiseSweep/FrequencySwept/FrequencySwept.py new file mode 100644 index 0000000..d649df1 --- /dev/null +++ b/dis/jammers/Noise/SweptNoiseakaSweptSpotNoiseSweep/FrequencySwept/FrequencySwept.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.SweptNoiseakaSweptSpotNoiseSweep.FrequencySwept; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class FrequencySwept(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 80 // Swept Noise (aka Swept Spot Noise, Sweep) + self.subCategory = 5 // Frequency Swept diff --git a/dis/jammers/Noise/SweptNoiseakaSweptSpotNoiseSweep/SweptAM/SweptAM.py b/dis/jammers/Noise/SweptNoiseakaSweptSpotNoiseSweep/SweptAM/SweptAM.py new file mode 100644 index 0000000..f4b77e7 --- /dev/null +++ b/dis/jammers/Noise/SweptNoiseakaSweptSpotNoiseSweep/SweptAM/SweptAM.py @@ -0,0 +1,27 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.SweptNoiseakaSweptSpotNoiseSweep.SweptAM; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class SweptAM(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 80 // Swept Noise (aka Swept Spot Noise, Sweep) + self.subCategory = 10 // Swept AM diff --git a/dis/jammers/Noise/SweptNoiseakaSweptSpotNoiseSweep/SweptNoiseakaSweptSpotNoiseSweep.py b/dis/jammers/Noise/SweptNoiseakaSweptSpotNoiseSweep/SweptNoiseakaSweptSpotNoiseSweep.py new file mode 100644 index 0000000..65d5bd9 --- /dev/null +++ b/dis/jammers/Noise/SweptNoiseakaSweptSpotNoiseSweep/SweptNoiseakaSweptSpotNoiseSweep.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.SweptNoiseakaSweptSpotNoiseSweep; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class SweptNoiseakaSweptSpotNoiseSweep(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 80 // Swept Noise (aka Swept Spot Noise, Sweep) diff --git a/dis/jammers/Noise/VelocityBinMaskingVBM/VelocityBinMaskingVBM.py b/dis/jammers/Noise/VelocityBinMaskingVBM/VelocityBinMaskingVBM.py new file mode 100644 index 0000000..43badae --- /dev/null +++ b/dis/jammers/Noise/VelocityBinMaskingVBM/VelocityBinMaskingVBM.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Noise.VelocityBinMaskingVBM; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class VelocityBinMaskingVBM(JammingTechnique): + def __init__(self): + self.kind = 1 // Noise + self.category = 85 // Velocity Bin Masking (VBM) diff --git a/dis/jammers/Special/Special.py b/dis/jammers/Special/Special.py new file mode 100644 index 0000000..80816cc --- /dev/null +++ b/dis/jammers/Special/Special.py @@ -0,0 +1,25 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Special; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class Special(JammingTechnique): + def __init__(self): + self.kind = 4 // Special diff --git a/dis/jammers/Special/SuperJam/SuperJam.py b/dis/jammers/Special/SuperJam/SuperJam.py new file mode 100644 index 0000000..604929e --- /dev/null +++ b/dis/jammers/Special/SuperJam/SuperJam.py @@ -0,0 +1,26 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" +""" +/** + * autogenerated using string template jammertechnique.txt + * package edu.nps.moves.dis7.jammers.Special.SuperJam; + * + * SISO-REF-010-v34 (2024-10-15) + * + * Jamming technique uid: 284 + */ +""" + +from JammingTechnique import JammingTechnique + +class SuperJam(JammingTechnique): + def __init__(self): + self.kind = 4 // Special + self.category = 1 // Super Jam diff --git a/dis/jamming_technique.py b/dis/jamming_technique.py new file mode 100644 index 0000000..e1624b6 --- /dev/null +++ b/dis/jamming_technique.py @@ -0,0 +1,95 @@ +from enum import Enum + + +class JammingTechnique( object ): + """Jamming technique. Section 6.2.49, uid 284""" + + def __init__(self): + """ Initializer for JammingTechnique""" + self.kind = 0 + self.category = 0 + self.subCategory = 0 + self.specific = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "Kind : " + str(self.kind) + "\n" + outputString += "Category : " + str(self.category) + "\n" + outputString += "SubCategory : " + str(self.subCategory) + "\n" + outputString += "Specific : " + str(self.specific) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_byte(int(self.kind)) + outputStream.write_byte(int(self.category)) + outputStream.write_byte(int(self.subCategory)) + outputStream.write_byte(int(self.specific)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.kind = inputStream.read_byte() + self.category = inputStream.read_byte() + self.subCategory = inputStream.read_byte() + self.specific = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/launched_munition_record.py b/dis/launched_munition_record.py new file mode 100644 index 0000000..0f7d035 --- /dev/null +++ b/dis/launched_munition_record.py @@ -0,0 +1,115 @@ +from enum import Enum + +from .vector3double import Vector3Double +from .event_identifier import EventIdentifier +from .entity_id import EntityID + +class LaunchedMunitionRecord( object ): + """Identity of a communications node. Section 6.2.50""" + + def __init__(self): + """ Initializer for LaunchedMunitionRecord""" + # fireEventID is an undescribed parameter... + self.fireEventID = EventIdentifier() + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + # firingEntityID is an undescribed parameter... + self.firingEntityID = EntityID() + self.padding2 = 0 + # targetEntityID is an undescribed parameter... + self.targetEntityID = EntityID() + self.padding3 = 0 + # targetLocation is an undescribed parameter... + self.targetLocation = Vector3Double() + + def to_string(self) ->str: + outputString = "" + outputString += "FireEventID :" + "\n" + self.fireEventID.to_string() + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "FiringEntityID :" + "\n" + self.firingEntityID.to_string() + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + outputString += "TargetEntityID :" + "\n" + self.targetEntityID.to_string() + "\n" + outputString += "Padding3 : " + str(self.padding3) + "\n" + outputString += "TargetLocation :" + "\n" + self.targetLocation.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.fireEventID.serialize(outputStream) + outputStream.write_short(int(self.padding)) + self.firingEntityID.serialize(outputStream) + outputStream.write_short(int(self.padding2)) + self.targetEntityID.serialize(outputStream) + outputStream.write_short(int(self.padding3)) + self.targetLocation.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.fireEventID.parse(inputStream) + self.padding = inputStream.read_short() + self.firingEntityID.parse(inputStream) + self.padding2 = inputStream.read_short() + self.targetEntityID.parse(inputStream) + self.padding3 = inputStream.read_short() + self.targetLocation.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 7 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/layer_header.py b/dis/layer_header.py new file mode 100644 index 0000000..4a442b1 --- /dev/null +++ b/dis/layer_header.py @@ -0,0 +1,93 @@ +from enum import Enum + + +class LayerHeader( object ): + """The identification of the additional information layer number, layer-specific information, and the length of the layer. Section 6.2.51""" + + def __init__(self): + """ Initializer for LayerHeader""" + self.layerNumber = 0 + """ field shall specify layer-specific information that varies by System Type (see 6.2.86) and Layer Number.""" + self.layerSpecificInformation = 0 + """ This field shall specify the length in octets of the layer, including the Layer Header record""" + self.length = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "LayerNumber : " + str(self.layerNumber) + "\n" + outputString += "LayerSpecificInformation : " + str(self.layerSpecificInformation) + "\n" + outputString += "Length : " + str(self.length) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_byte(int(self.layerNumber)) + outputStream.write_byte(int(self.layerSpecificInformation)) + outputStream.write_short(int(self.length)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.layerNumber = inputStream.read_byte() + self.layerSpecificInformation = inputStream.read_byte() + self.length = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/ledetonation_pdu.py b/dis/ledetonation_pdu.py new file mode 100644 index 0000000..92cca89 --- /dev/null +++ b/dis/ledetonation_pdu.py @@ -0,0 +1,149 @@ +from enum import Enum + +from .munition_descriptor import MunitionDescriptor +from .live_entity_linear_velocity import LiveEntityLinearVelocity +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .live_entity_orientation16 import LiveEntityOrientation16 +from .live_entity_family_pdu import LiveEntityFamilyPdu +from .entity_id import EntityID +from .event_identifier import EventIdentifier +from .live_entity_relative_world_coordinates import LiveEntityRelativeWorldCoordinates + +class LEDetonationPdu( LiveEntityFamilyPdu ): + """9.4.6 Communicate information associated with the impact or detonation of a munition.""" + + def __init__(self): + """ Initializer for LEDetonationPdu""" + super().__init__() + # firingLiveEntityId is an undescribed parameter... + self.firingLiveEntityId = EntityID() + self.detonationFlag1 = 0 + self.detonationFlag2 = 0 + # targetLiveEntityId is an undescribed parameter... + self.targetLiveEntityId = EntityID() + # munitionLiveEntityId is an undescribed parameter... + self.munitionLiveEntityId = EntityID() + # eventId is an undescribed parameter... + self.eventId = EventIdentifier() + # worldLocation is an undescribed parameter... + self.worldLocation = LiveEntityRelativeWorldCoordinates() + # velocity is an undescribed parameter... + self.velocity = LiveEntityLinearVelocity() + """ spec error? 16-bit fields vs. 8-bit in TspiPdu?""" + self.munitionOrientation = LiveEntityOrientation16() + # munitionDescriptor is an undescribed parameter... + self.munitionDescriptor = MunitionDescriptor() + # entityLocation is an undescribed parameter... + self.entityLocation = LiveEntityLinearVelocity() + self.detonationResult = 0 + self.pduType = DisPduType.live_entity_detonation + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "FiringLiveEntityId :" + "\n" + self.firingLiveEntityId.to_string() + "\n" + outputString += "DetonationFlag1 : " + str(self.detonationFlag1) + "\n" + outputString += "DetonationFlag2 : " + str(self.detonationFlag2) + "\n" + outputString += "TargetLiveEntityId :" + "\n" + self.targetLiveEntityId.to_string() + "\n" + outputString += "MunitionLiveEntityId :" + "\n" + self.munitionLiveEntityId.to_string() + "\n" + outputString += "EventId :" + "\n" + self.eventId.to_string() + "\n" + outputString += "WorldLocation :" + "\n" + self.worldLocation.to_string() + "\n" + outputString += "Velocity :" + "\n" + self.velocity.to_string() + "\n" + outputString += "MunitionOrientation :" + "\n" + self.munitionOrientation.to_string() + "\n" + outputString += "MunitionDescriptor :" + "\n" + self.munitionDescriptor.to_string() + "\n" + outputString += "EntityLocation :" + "\n" + self.entityLocation.to_string() + "\n" + outputString += "DetonationResult : " + str(self.detonationResult) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( LEDetonationPdu, self ).serialize(outputStream) + self.firingLiveEntityId.serialize(outputStream) + outputStream.write_byte(int(self.detonationFlag1)) + outputStream.write_byte(int(self.detonationFlag2)) + self.targetLiveEntityId.serialize(outputStream) + self.munitionLiveEntityId.serialize(outputStream) + self.eventId.serialize(outputStream) + self.worldLocation.serialize(outputStream) + self.velocity.serialize(outputStream) + self.munitionOrientation.serialize(outputStream) + self.munitionDescriptor.serialize(outputStream) + self.entityLocation.serialize(outputStream) + outputStream.write_byte(int(self.detonationResult)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( LEDetonationPdu, self).parse(inputStream) + self.firingLiveEntityId.parse(inputStream) + self.detonationFlag1 = inputStream.read_byte() + self.detonationFlag2 = inputStream.read_byte() + self.targetLiveEntityId.parse(inputStream) + self.munitionLiveEntityId.parse(inputStream) + self.eventId.parse(inputStream) + self.worldLocation.parse(inputStream) + self.velocity.parse(inputStream) + self.munitionOrientation.parse(inputStream) + self.munitionDescriptor.parse(inputStream) + self.entityLocation.parse(inputStream) + self.detonationResult = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 12 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/lefire_pdu.py b/dis/lefire_pdu.py new file mode 100644 index 0000000..facbee6 --- /dev/null +++ b/dis/lefire_pdu.py @@ -0,0 +1,135 @@ +from enum import Enum + +from .munition_descriptor import MunitionDescriptor +from .live_entity_linear_velocity import LiveEntityLinearVelocity +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .live_entity_family_pdu import LiveEntityFamilyPdu +from .entity_id import EntityID +from .event_identifier import EventIdentifier +from .live_entity_relative_world_coordinates import LiveEntityRelativeWorldCoordinates + +class LEFirePdu( LiveEntityFamilyPdu ): + """9.4.5 Representation of weapons fire in a DIS exercise involving LEs.""" + + def __init__(self): + """ Initializer for LEFirePdu""" + super().__init__() + # firingLiveEntityId is an undescribed parameter... + self.firingLiveEntityId = EntityID() + """ Bits defined in IEEE Standard""" + self.flags = 0 + # targetLiveEntityId is an undescribed parameter... + self.targetLiveEntityId = EntityID() + # munitionLiveEntityId is an undescribed parameter... + self.munitionLiveEntityId = EntityID() + # eventId is an undescribed parameter... + self.eventId = EventIdentifier() + # location is an undescribed parameter... + self.location = LiveEntityRelativeWorldCoordinates() + # munitionDescriptor is an undescribed parameter... + self.munitionDescriptor = MunitionDescriptor() + # velocity is an undescribed parameter... + self.velocity = LiveEntityLinearVelocity() + self.range = 0 + self.pduType = DisPduType.live_entity_fire + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "FiringLiveEntityId :" + "\n" + self.firingLiveEntityId.to_string() + "\n" + outputString += "Flags : " + str(self.flags) + "\n" + outputString += "TargetLiveEntityId :" + "\n" + self.targetLiveEntityId.to_string() + "\n" + outputString += "MunitionLiveEntityId :" + "\n" + self.munitionLiveEntityId.to_string() + "\n" + outputString += "EventId :" + "\n" + self.eventId.to_string() + "\n" + outputString += "Location :" + "\n" + self.location.to_string() + "\n" + outputString += "MunitionDescriptor :" + "\n" + self.munitionDescriptor.to_string() + "\n" + outputString += "Velocity :" + "\n" + self.velocity.to_string() + "\n" + outputString += "Range : " + str(self.range) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( LEFirePdu, self ).serialize(outputStream) + self.firingLiveEntityId.serialize(outputStream) + outputStream.write_byte(int(self.flags)) + self.targetLiveEntityId.serialize(outputStream) + self.munitionLiveEntityId.serialize(outputStream) + self.eventId.serialize(outputStream) + self.location.serialize(outputStream) + self.munitionDescriptor.serialize(outputStream) + self.velocity.serialize(outputStream) + outputStream.write_short(int(self.range)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( LEFirePdu, self).parse(inputStream) + self.firingLiveEntityId.parse(inputStream) + self.flags = inputStream.read_byte() + self.targetLiveEntityId.parse(inputStream) + self.munitionLiveEntityId.parse(inputStream) + self.eventId.parse(inputStream) + self.location.parse(inputStream) + self.munitionDescriptor.parse(inputStream) + self.velocity.parse(inputStream) + self.range = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 9 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/levector3fixed_byte.py b/dis/levector3fixed_byte.py new file mode 100644 index 0000000..101430c --- /dev/null +++ b/dis/levector3fixed_byte.py @@ -0,0 +1,94 @@ +from enum import Enum + + +class LEVector3FixedByte( object ): + """3 x 8-bit fixed binary""" + + def __init__(self): + """ Initializer for LEVector3FixedByte""" + """ X value""" + self.x = 0 + """ y Value""" + self.y = 0 + """ Z value""" + self.z = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "X : " + str(self.x) + "\n" + outputString += "Y : " + str(self.y) + "\n" + outputString += "Z : " + str(self.z) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_byte(int(self.x)) + outputStream.write_byte(int(self.y)) + outputStream.write_byte(int(self.z)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.x = inputStream.read_byte() + self.y = inputStream.read_byte() + self.z = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/linear_object_state_pdu.py b/dis/linear_object_state_pdu.py new file mode 100644 index 0000000..8b43d06 --- /dev/null +++ b/dis/linear_object_state_pdu.py @@ -0,0 +1,182 @@ +from enum import Enum + +from .siso_ref_010.enums.force_id import ForceID +from .object_identifier import ObjectIdentifier +from .object_type import ObjectType +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .synthetic_environment_family_pdu import SyntheticEnvironmentFamilyPdu +from .simulation_address import SimulationAddress +from .linear_segment_parameter import LinearSegmentParameter + +class LinearObjectStatePdu( SyntheticEnvironmentFamilyPdu ): + """7.10.5 Used to communicate detailed information about the addition/modification of a synthetic environment object that is geometrically anchored to the terrain with one point and has size and orientation.""" + + def __init__(self): + """ Initializer for LinearObjectStatePdu""" + super().__init__() + """ Object in synthetic environment""" + self.objectID = ObjectIdentifier() + """ Object with which this point object is associated""" + self.referencedObjectID = ObjectIdentifier() + """ unique update number of each state transition of an object""" + self.updateNumber = 0 + # /** force ID provides a unique identifier uid 6 */ + self.forceID = ForceID.default + + """ number of linear segment parameters""" + self.numberOfLinearSegments = 0 + """ requesterID""" + self.requesterID = SimulationAddress() + """ receiver ID provides a unique identifier""" + self.receivingID = SimulationAddress() + """ Object type""" + self.objectType = ObjectType() + """ Linear segment parameters""" + self._linearSegmentParameters = [] + self.pduType = DisPduType.linear_object_state + + + def get_numberOfLinearSegments(self): + return len(self._linearSegmentParameters) + def set_numberOfLinearSegments(self, value): + numberOfLinearSegments = value + + + def get_linearSegmentParameters(self): + return self._linearSegmentParameters + def set_linearSegmentParameters(self, value): + self._linearSegmentParameters = value + linearSegmentParameters = property(get_linearSegmentParameters, set_linearSegmentParameters) + + + def add_linearSegmentParameters(self, value : LinearSegmentParameter): + self._linearSegmentParameters.append(value) + + + """ + /// Name : linearSegmentParameters + /// UID : + /// Type : LinearSegmentParameter + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Linear segment parameters + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "ObjectID :" + "\n" + self.objectID.to_string() + "\n" + outputString += "ReferencedObjectID :" + "\n" + self.referencedObjectID.to_string() + "\n" + outputString += "UpdateNumber : " + str(self.updateNumber) + "\n" + outputString += "ForceID : " + self.forceID.get_description + "(" + (str(int(self.forceID))) + ")" + "\n" + outputString += "NumberOfLinearSegments : " + str(len(self._linearSegmentParameters)) + "\n" + outputString += "RequesterID :" + "\n" + self.requesterID.to_string() + "\n" + outputString += "ReceivingID :" + "\n" + self.receivingID.to_string() + "\n" + outputString += "ObjectType :" + "\n" + self.objectType.to_string() + "\n" + outputString += "LinearSegmentParameters : " + "\n" + for idx in range(0, len(self._linearSegmentParameters)): + outputString += self._linearSegmentParameters[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( LinearObjectStatePdu, self ).serialize(outputStream) + self.objectID.serialize(outputStream) + self.referencedObjectID.serialize(outputStream) + outputStream.write_short(int(self.updateNumber)) + self.serialize_enum(self.forceID,outputStream) + outputStream.write_byte( len(self._linearSegmentParameters)) + self.requesterID.serialize(outputStream) + self.receivingID.serialize(outputStream) + self.objectType.serialize(outputStream) + for anObj in self._linearSegmentParameters: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( LinearObjectStatePdu, self).parse(inputStream) + self.objectID.parse(inputStream) + self.referencedObjectID.parse(inputStream) + self.updateNumber = inputStream.read_short() + self.forceID = ForceID.get_enum(self.parse_enum(self.forceID,inputStream)) + self.numberOfLinearSegments = inputStream.read_byte() + self.requesterID.parse(inputStream) + self.receivingID.parse(inputStream) + self.objectType.parse(inputStream) + for idx in range(0, self.numberOfLinearSegments): + element = LinearSegmentParameter() + element.parse(inputStream) + self._linearSegmentParameters.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 9 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/linear_segment_parameter.py b/dis/linear_segment_parameter.py new file mode 100644 index 0000000..2876022 --- /dev/null +++ b/dis/linear_segment_parameter.py @@ -0,0 +1,140 @@ +from enum import Enum + +from .siso_ref_010.enums.object_state_appearance_general import ObjectStateAppearanceGeneral +from .euler_angles import EulerAngles +from .vector3double import Vector3Double +from .siso_ref_010.enums.object_state_modification_linear_object import ObjectStateModificationLinearObject + +class LinearSegmentParameter( object ): + """The specification of an individual segment of a linear segment synthetic environment object in a Linear Object State PDU Section 6.2.52""" + + def __init__(self): + """ Initializer for LinearSegmentParameter""" + """ The individual segment of the linear segment""" + self.segmentNumber = 0 + # whether a modification has been made to the point object's location or orientation UID 241 + self.segmentModification = ObjectStateModificationLinearObject() + + # general dynamic appearance attributes of the segment. This record shall be defined as a 16-bit record of enumerations. The values defined for this record are included in Section 12 of SISO-REF-010. UID 229 + self.generalSegmentAppearance = ObjectStateAppearanceGeneral() + + """ This field shall specify specific dynamic appearance attributes of the segment. This record shall be defined as a 32-bit record of enumerations.""" + self.specificSegmentAppearance = 0 + """ This field shall specify the location of the linear segment in the simulated world and shall be represented by a World Coordinates record """ + self.segmentLocation = Vector3Double() + """ orientation of the linear segment about the segment location and shall be represented by a Euler Angles record """ + self.segmentOrientation = EulerAngles() + """ length of the linear segment, in meters, extending in the positive X direction""" + self.segmentLength = 0.0 + """ The total width of the linear segment, in meters, shall be specified by a 16-bit unsigned integer. One-half of the width shall extend in the positive Y direction, and one-half of the width shall extend in the negative Y direction.""" + self.segmentWidth = 0.0 + """ The height of the linear segment, in meters, above ground shall be specified by a 16-bit unsigned integer.""" + self.segmentHeight = 0.0 + """ The depth of the linear segment, in meters, below ground level """ + self.segmentDepth = 0.0 + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "SegmentNumber : " + str(self.segmentNumber) + "\n" + outputString += "ObjectStateModificationLinearObject : " + str(self.segmentModification) + "\n" + outputString += "ObjectStateAppearanceGeneral : " + str(self.generalSegmentAppearance) + "\n" + outputString += "SpecificSegmentAppearance : " + str(self.specificSegmentAppearance) + "\n" + outputString += "SegmentLocation :" + "\n" + self.segmentLocation.to_string() + "\n" + outputString += "SegmentOrientation :" + "\n" + self.segmentOrientation.to_string() + "\n" + outputString += "SegmentLength : " + str(self.segmentLength) + "\n" + outputString += "SegmentWidth : " + str(self.segmentWidth) + "\n" + outputString += "SegmentHeight : " + str(self.segmentHeight) + "\n" + outputString += "SegmentDepth : " + str(self.segmentDepth) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_byte(int(self.segmentNumber)) + outputStream.write_unsigned_int(int(self.segmentModification.asbyte)) + outputStream.write_unsigned_int(int(self.generalSegmentAppearance.asbyte)) + outputStream.write_int(int(self.specificSegmentAppearance)) + self.segmentLocation.serialize(outputStream) + self.segmentOrientation.serialize(outputStream) + outputStream.write_float(int(self.segmentLength)) + outputStream.write_float(int(self.segmentWidth)) + outputStream.write_float(int(self.segmentHeight)) + outputStream.write_float(int(self.segmentDepth)) + outputStream.write_int(int(self.padding)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.segmentNumber = inputStream.read_byte() + self.segmentModification.asbyte = inputStream.read_unsigned_int() + self.generalSegmentAppearance.asbyte = inputStream.read_unsigned_int() + self.specificSegmentAppearance = inputStream.read_int() + self.segmentLocation.parse(inputStream) + self.segmentOrientation.parse(inputStream) + self.segmentLength = inputStream.read_float() + self.segmentWidth = inputStream.read_float() + self.segmentHeight = inputStream.read_float() + self.segmentDepth = inputStream.read_float() + self.padding = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 11 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/live_dead_reckoning_parameters.py b/dis/live_dead_reckoning_parameters.py new file mode 100644 index 0000000..5cec248 --- /dev/null +++ b/dis/live_dead_reckoning_parameters.py @@ -0,0 +1,97 @@ +from enum import Enum + +from .siso_ref_010.enums.dead_reckoning_algorithm import DeadReckoningAlgorithm +from .levector3fixed_byte import LEVector3FixedByte + +class LiveDeadReckoningParameters( object ): + """16-bit fixed binaries""" + + def __init__(self): + """ Initializer for LiveDeadReckoningParameters""" + # /** uid 44 */ + self.deadReckoningAlgorithm = DeadReckoningAlgorithm.default + + # entityLinearAcceleration is an undescribed parameter... + self.entityLinearAcceleration = LEVector3FixedByte() + # entityAngularVelocity is an undescribed parameter... + self.entityAngularVelocity = LEVector3FixedByte() + + def to_string(self) ->str: + outputString = "" + outputString += "DeadReckoningAlgorithm : " + self.deadReckoningAlgorithm.get_description + "(" + (str(int(self.deadReckoningAlgorithm))) + ")" + "\n" + outputString += "EntityLinearAcceleration :" + "\n" + self.entityLinearAcceleration.to_string() + "\n" + outputString += "EntityAngularVelocity :" + "\n" + self.entityAngularVelocity.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.deadReckoningAlgorithm,outputStream) + self.entityLinearAcceleration.serialize(outputStream) + self.entityAngularVelocity.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.deadReckoningAlgorithm = DeadReckoningAlgorithm.get_enum(self.parse_enum(self.deadReckoningAlgorithm,inputStream)) + self.entityLinearAcceleration.parse(inputStream) + self.entityAngularVelocity.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/live_entity_detonation_pdu.py b/dis/live_entity_detonation_pdu.py new file mode 100644 index 0000000..f19fdc9 --- /dev/null +++ b/dis/live_entity_detonation_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class LiveEntityDetonationPdu( object ): + """Alias, more descriptive name for LEDetonationPdu.""" + + def __init__(self): + """ Initializer for LiveEntityDetonationPdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/live_entity_family_pdu.py b/dis/live_entity_family_pdu.py new file mode 100644 index 0000000..06825d1 --- /dev/null +++ b/dis/live_entity_family_pdu.py @@ -0,0 +1,88 @@ +from enum import Enum + +from .pdu import Pdu +from .siso_ref_010.enums.disprotocol_family import DISProtocolFamily + +class LiveEntityFamilyPdu( Pdu ): + """Does not inherit from PduBase. See section 9.""" + + def __init__(self): + """ Initializer for LiveEntityFamilyPdu""" + super().__init__() + self.protocolFamily = DISProtocolFamily.live_entity_le_information_interaction + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( LiveEntityFamilyPdu, self ).serialize(outputStream) + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( LiveEntityFamilyPdu, self).parse(inputStream) + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/live_entity_fire_pdu.py b/dis/live_entity_fire_pdu.py new file mode 100644 index 0000000..eddde06 --- /dev/null +++ b/dis/live_entity_fire_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class LiveEntityFirePdu( object ): + """Alias, more descriptive name for LEFirePdu.""" + + def __init__(self): + """ Initializer for LiveEntityFirePdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/live_entity_identifier.py b/dis/live_entity_identifier.py new file mode 100644 index 0000000..9a053b5 --- /dev/null +++ b/dis/live_entity_identifier.py @@ -0,0 +1,90 @@ +from enum import Enum + +from .live_simulation_address import LiveSimulationAddress + +class LiveEntityIdentifier( object ): + """The unique designation of each entity in an event or exercise that is contained in a Live Entity PDU. Section 6.2.54 """ + + def __init__(self): + """ Initializer for LiveEntityIdentifier""" + """ Live Simulation Address record (see 6.2.54) """ + self.liveSimulationAddress = LiveSimulationAddress() + """ Live entity number """ + self.entityNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "LiveSimulationAddress :" + "\n" + self.liveSimulationAddress.to_string() + "\n" + outputString += "EntityNumber : " + str(self.entityNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.liveSimulationAddress.serialize(outputStream) + outputStream.write_short(int(self.entityNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.liveSimulationAddress.parse(inputStream) + self.entityNumber = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/live_entity_linear_velocity.py b/dis/live_entity_linear_velocity.py new file mode 100644 index 0000000..a2ea5f5 --- /dev/null +++ b/dis/live_entity_linear_velocity.py @@ -0,0 +1,91 @@ +from enum import Enum + + +class LiveEntityLinearVelocity( object ): + """16-bit fixed binaries""" + + def __init__(self): + """ Initializer for LiveEntityLinearVelocity""" + self.xComponent = 0 + self.yComponent = 0 + self.zComponent = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "XComponent : " + str(self.xComponent) + "\n" + outputString += "YComponent : " + str(self.yComponent) + "\n" + outputString += "ZComponent : " + str(self.zComponent) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.xComponent)) + outputStream.write_short(int(self.yComponent)) + outputStream.write_short(int(self.zComponent)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.xComponent = inputStream.read_short() + self.yComponent = inputStream.read_short() + self.zComponent = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/live_entity_orientation.py b/dis/live_entity_orientation.py new file mode 100644 index 0000000..838768a --- /dev/null +++ b/dis/live_entity_orientation.py @@ -0,0 +1,91 @@ +from enum import Enum + + +class LiveEntityOrientation( object ): + """8-bit fixed binaries""" + + def __init__(self): + """ Initializer for LiveEntityOrientation""" + self.psi = 0 + self.theta = 0 + self.phi = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "Psi : " + str(self.psi) + "\n" + outputString += "Theta : " + str(self.theta) + "\n" + outputString += "Phi : " + str(self.phi) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_byte(int(self.psi)) + outputStream.write_byte(int(self.theta)) + outputStream.write_byte(int(self.phi)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.psi = inputStream.read_byte() + self.theta = inputStream.read_byte() + self.phi = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/live_entity_orientation16.py b/dis/live_entity_orientation16.py new file mode 100644 index 0000000..e543565 --- /dev/null +++ b/dis/live_entity_orientation16.py @@ -0,0 +1,91 @@ +from enum import Enum + + +class LiveEntityOrientation16( object ): + """16-bit fixed binaries""" + + def __init__(self): + """ Initializer for LiveEntityOrientation16""" + self.psi = 0 + self.theta = 0 + self.phi = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "Psi : " + str(self.psi) + "\n" + outputString += "Theta : " + str(self.theta) + "\n" + outputString += "Phi : " + str(self.phi) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.psi)) + outputStream.write_short(int(self.theta)) + outputStream.write_short(int(self.phi)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.psi = inputStream.read_short() + self.theta = inputStream.read_short() + self.phi = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/live_entity_orientation_error.py b/dis/live_entity_orientation_error.py new file mode 100644 index 0000000..e80525e --- /dev/null +++ b/dis/live_entity_orientation_error.py @@ -0,0 +1,91 @@ +from enum import Enum + + +class LiveEntityOrientationError( object ): + """16-bit fixed binaries""" + + def __init__(self): + """ Initializer for LiveEntityOrientationError""" + self.azimuthError = 0 + self.elevationError = 0 + self.rotationError = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "AzimuthError : " + str(self.azimuthError) + "\n" + outputString += "ElevationError : " + str(self.elevationError) + "\n" + outputString += "RotationError : " + str(self.rotationError) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.azimuthError)) + outputStream.write_short(int(self.elevationError)) + outputStream.write_short(int(self.rotationError)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.azimuthError = inputStream.read_short() + self.elevationError = inputStream.read_short() + self.rotationError = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/live_entity_position_error.py b/dis/live_entity_position_error.py new file mode 100644 index 0000000..12967f7 --- /dev/null +++ b/dis/live_entity_position_error.py @@ -0,0 +1,87 @@ +from enum import Enum + + +class LiveEntityPositionError( object ): + """16-bit fixed binaries""" + + def __init__(self): + """ Initializer for LiveEntityPositionError""" + self.horizontalError = 0 + self.verticalError = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "HorizontalError : " + str(self.horizontalError) + "\n" + outputString += "VerticalError : " + str(self.verticalError) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.horizontalError)) + outputStream.write_short(int(self.verticalError)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.horizontalError = inputStream.read_short() + self.verticalError = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/live_entity_relative_world_coordinates.py b/dis/live_entity_relative_world_coordinates.py new file mode 100644 index 0000000..f87b7f2 --- /dev/null +++ b/dis/live_entity_relative_world_coordinates.py @@ -0,0 +1,95 @@ +from enum import Enum + + +class LiveEntityRelativeWorldCoordinates( object ): + """16-bit fixed binaries""" + + def __init__(self): + """ Initializer for LiveEntityRelativeWorldCoordinates""" + self.referencePoint = 0 + self.deltaX = 0 + self.deltaY = 0 + self.deltaZ = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "ReferencePoint : " + str(self.referencePoint) + "\n" + outputString += "DeltaX : " + str(self.deltaX) + "\n" + outputString += "DeltaY : " + str(self.deltaY) + "\n" + outputString += "DeltaZ : " + str(self.deltaZ) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.referencePoint)) + outputStream.write_short(int(self.deltaX)) + outputStream.write_short(int(self.deltaY)) + outputStream.write_short(int(self.deltaZ)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.referencePoint = inputStream.read_short() + self.deltaX = inputStream.read_short() + self.deltaY = inputStream.read_short() + self.deltaZ = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/live_simulation_address.py b/dis/live_simulation_address.py new file mode 100644 index 0000000..7a0cf8f --- /dev/null +++ b/dis/live_simulation_address.py @@ -0,0 +1,89 @@ +from enum import Enum + + +class LiveSimulationAddress( object ): + """A simulation's designation associated with all Live Entity IDs contained in Live Entity PDUs. Section 6.2.55 """ + + def __init__(self): + """ Initializer for LiveSimulationAddress""" + """ facility, installation, organizational unit or geographic location may have multiple sites associated with it. The Site Number is the first component of the Live Simulation Address, which defines a live simulation.""" + self.liveSiteNumber = 0 + """ An application associated with a live site is termed a live application. Each live application participating in an event """ + self.liveApplicationNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "LiveSiteNumber : " + str(self.liveSiteNumber) + "\n" + outputString += "LiveApplicationNumber : " + str(self.liveApplicationNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_byte(int(self.liveSiteNumber)) + outputStream.write_byte(int(self.liveApplicationNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.liveSiteNumber = inputStream.read_byte() + self.liveApplicationNumber = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/logistics_family_pdu.py b/dis/logistics_family_pdu.py new file mode 100644 index 0000000..2a7ae45 --- /dev/null +++ b/dis/logistics_family_pdu.py @@ -0,0 +1,88 @@ +from enum import Enum + +from .pdu_base import PduBase +from .siso_ref_010.enums.disprotocol_family import DISProtocolFamily + +class LogisticsFamilyPdu( PduBase ): + """Abstract superclass for logistics PDUs. Section 7.4""" + + def __init__(self): + """ Initializer for LogisticsFamilyPdu""" + super().__init__() + self.protocolFamily = DISProtocolFamily.logistics + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( LogisticsFamilyPdu, self ).serialize(outputStream) + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( LogisticsFamilyPdu, self).parse(inputStream) + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/mine_emplacement_time.py b/dis/mine_emplacement_time.py new file mode 100644 index 0000000..da08247 --- /dev/null +++ b/dis/mine_emplacement_time.py @@ -0,0 +1,87 @@ +from enum import Enum + + +class MineEmplacementTime( object ): + """simulation time of emplacement of the mine""" + + def __init__(self): + """ Initializer for MineEmplacementTime""" + self.hour = 0 + self.timePastTheHour = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "Hour : " + str(self.hour) + "\n" + outputString += "TimePastTheHour : " + str(self.timePastTheHour) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int(int(self.hour)) + outputStream.write_int(int(self.timePastTheHour)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.hour = inputStream.read_int() + self.timePastTheHour = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/mine_entity_identifier.py b/dis/mine_entity_identifier.py new file mode 100644 index 0000000..a60f731 --- /dev/null +++ b/dis/mine_entity_identifier.py @@ -0,0 +1,90 @@ +from enum import Enum + +from .simulation_address import SimulationAddress + +class MineEntityIdentifier( object ): + """The unique designation of a mine contained in the Minefield Data PDU. No espdus are issued for mine entities. Section 6.2.55 """ + + def __init__(self): + """ Initializer for MineEntityIdentifier""" + """ """ + self.simulationAddress = SimulationAddress() + """ """ + self.mineEntityNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "SimulationAddress :" + "\n" + self.simulationAddress.to_string() + "\n" + outputString += "MineEntityNumber : " + str(self.mineEntityNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.simulationAddress.serialize(outputStream) + outputStream.write_short(int(self.mineEntityNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.simulationAddress.parse(inputStream) + self.mineEntityNumber = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/minefield_data_pdu.py b/dis/minefield_data_pdu.py new file mode 100644 index 0000000..9868798 --- /dev/null +++ b/dis/minefield_data_pdu.py @@ -0,0 +1,539 @@ +from enum import Enum + +from .data_filter_record import DataFilterRecord +from .minefield_sensor_type import MinefieldSensorType +from .mine_emplacement_time import MineEmplacementTime +from .entity_type import EntityType +from .euler_angles import EulerAngles +from .siso_ref_010.enums.minefield_data_paint_scheme import MinefieldDataPaintScheme +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .minefield_family_pdu import MinefieldFamilyPdu +from .vector3float import Vector3Float +from .minefield_identifier import MinefieldIdentifier +from .simulation_identifier import SimulationIdentifier +from .siso_ref_010.enums.minefield_data_fusing import MinefieldDataFusing + +class MinefieldDataPdu( MinefieldFamilyPdu ): + """5.10.4 Information about the location and status of a collection of mines in a minefield is conveyed through the Minefield Data PDU on an individual mine basis.""" + + def __init__(self): + """ Initializer for MinefieldDataPdu""" + super().__init__() + """ Minefield ID provides a unique identifier""" + self.minefieldID = MinefieldIdentifier() + """ ID of entity making request""" + self.requestingEntityID = SimulationIdentifier() + """ Minefield sequence number""" + self.minefieldSequenceNumbeer = 0 + """ request ID provides a unique identifier""" + self.requestID = 0 + """ pdu sequence number""" + self.pduSequenceNumber = 0 + """ number of pdus in response""" + self.numberOfPdus = 0 + """ how many mines are in this PDU""" + self.numberOfMinesInThisPdu = 0 + """ how many sensor type are in this PDU""" + self.numberOfSensorTypes = 0 + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + """ 32 boolean field""" + self.dataFilter = DataFilterRecord() + """ Mine type""" + self.mineType = EntityType() + """ Sensor types, each 16-bits long""" + self._sensorTypes = [] + self.padTo32 = [0] * 32 + """ Mine locations""" + self._mineLocation = [] + self.groundBurialDepthOffset = [] + self.waterBurialDepthOffset = [] + self.snowBurialDepthOffset = [] + self._mineOrientation = [] + self.thermalContrast = [] + self.reflectance = [] + self._mineEmplacementTime = [] + self.mineEntityNumber = [] + """ uid 192""" + self._fusing = [] + self.scalarDetectionCoefficient = [] + """ uid 202""" + self._paintScheme = [] + self.padTo32_2 = [0] * 32 + self.numberOfTripDetonationWires = [] + self.padTo32_3 = [0] * 32 + self.numberOfVertices = [] + self.pduType = DisPduType.minefield_data + + + def get_numberOfSensorTypes(self): + return len(self._sensorTypes) + def set_numberOfSensorTypes(self, value): + numberOfSensorTypes = value + + + def get_sensorTypes(self): + return self._sensorTypes + def set_sensorTypes(self, value): + self._sensorTypes = value + sensorTypes = property(get_sensorTypes, set_sensorTypes) + + + def add_sensorTypes(self, value : MinefieldSensorType): + self._sensorTypes.append(value) + + + """ + /// Name : sensorTypes + /// UID : + /// Type : MinefieldSensorType + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Sensor types, each 16-bits long + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_mineLocation(self): + return self._mineLocation + def set_mineLocation(self, value): + self._mineLocation = value + mineLocation = property(get_mineLocation, set_mineLocation) + + + def add_mineLocation(self, value : Vector3Float): + self._mineLocation.append(value) + + + """ + /// Name : mineLocation + /// UID : + /// Type : Vector3Float + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Mine locations + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_mineOrientation(self): + return self._mineOrientation + def set_mineOrientation(self, value): + self._mineOrientation = value + mineOrientation = property(get_mineOrientation, set_mineOrientation) + + + def add_mineOrientation(self, value : EulerAngles): + self._mineOrientation.append(value) + + + """ + /// Name : mineOrientation + /// UID : + /// Type : EulerAngles + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : null + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_mineEmplacementTime(self): + return self._mineEmplacementTime + def set_mineEmplacementTime(self, value): + self._mineEmplacementTime = value + mineEmplacementTime = property(get_mineEmplacementTime, set_mineEmplacementTime) + + + def add_mineEmplacementTime(self, value : MineEmplacementTime): + self._mineEmplacementTime.append(value) + + + """ + /// Name : mineEmplacementTime + /// UID : + /// Type : MineEmplacementTime + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : null + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_fusing(self): + return self._fusing + def set_fusing(self, value): + self._fusing = value + fusing = property(get_fusing, set_fusing) + + + def add_fusing(self, value : MinefieldDataFusing): + self._fusing.append(value) + + + """ + /// Name : fusing + /// UID : 192 + /// Type : MinefieldDataFusing + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : uid 192 + /// default value : null + /// is Bitfield : true + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : SISO_BITFIELD + /// underlying Type : N/A + """ + + + + + def get_paintScheme(self): + return self._paintScheme + def set_paintScheme(self, value): + self._paintScheme = value + paintScheme = property(get_paintScheme, set_paintScheme) + + + def add_paintScheme(self, value : MinefieldDataPaintScheme): + self._paintScheme.append(value) + + + """ + /// Name : paintScheme + /// UID : 202 + /// Type : MinefieldDataPaintScheme + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : uid 202 + /// default value : null + /// is Bitfield : true + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : SISO_BITFIELD + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "MinefieldID :" + "\n" + self.minefieldID.to_string() + "\n" + outputString += "RequestingEntityID :" + "\n" + self.requestingEntityID.to_string() + "\n" + outputString += "MinefieldSequenceNumbeer : " + str(self.minefieldSequenceNumbeer) + "\n" + outputString += "RequestID : " + str(self.requestID) + "\n" + outputString += "PduSequenceNumber : " + str(self.pduSequenceNumber) + "\n" + outputString += "NumberOfPdus : " + str(self.numberOfPdus) + "\n" + outputString += "NumberOfMinesInThisPdu : " + str(self.numberOfMinesInThisPdu) + "\n" + outputString += "NumberOfSensorTypes : " + str(len(self._sensorTypes)) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "DataFilter :" + "\n" + self.dataFilter.to_string() + "\n" + outputString += "MineType :" + "\n" + self.mineType.to_string() + "\n" + outputString += "SensorTypes : " + "\n" + for idx in range(0, len(self._sensorTypes)): + outputString += self._sensorTypes[idx].to_string() + + outputString += "MineLocation : " + "\n" + for idx in range(0, len(self._mineLocation)): + outputString += self._mineLocation[idx].to_string() + + outputString += "GroundBurialDepthOffset : " + "\n" + for idx in range(0, len(self.groundBurialDepthOffset)): + outputString += str(self.groundBurialDepthOffset[idx]) + + outputString += "WaterBurialDepthOffset : " + "\n" + for idx in range(0, len(self.waterBurialDepthOffset)): + outputString += str(self.waterBurialDepthOffset[idx]) + + outputString += "SnowBurialDepthOffset : " + "\n" + for idx in range(0, len(self.snowBurialDepthOffset)): + outputString += str(self.snowBurialDepthOffset[idx]) + + outputString += "MineOrientation : " + "\n" + for idx in range(0, len(self._mineOrientation)): + outputString += self._mineOrientation[idx].to_string() + + outputString += "ThermalContrast : " + "\n" + for idx in range(0, len(self.thermalContrast)): + outputString += str(self.thermalContrast[idx]) + + outputString += "Reflectance : " + "\n" + for idx in range(0, len(self.reflectance)): + outputString += str(self.reflectance[idx]) + + outputString += "MineEmplacementTime : " + "\n" + for idx in range(0, len(self._mineEmplacementTime)): + outputString += self._mineEmplacementTime[idx].to_string() + + outputString += "MineEntityNumber : " + "\n" + for idx in range(0, len(self.mineEntityNumber)): + outputString += str(self.mineEntityNumber[idx]) + + outputString += "Fusing : " + "\n" + for idx in range(0, len(self._fusing)): + outputString += self._fusing[idx].to_string() + + outputString += "ScalarDetectionCoefficient : " + "\n" + for idx in range(0, len(self.scalarDetectionCoefficient)): + outputString += str(self.scalarDetectionCoefficient[idx]) + + outputString += "PaintScheme : " + "\n" + for idx in range(0, len(self._paintScheme)): + outputString += self._paintScheme[idx].to_string() + + outputString += "NumberOfTripDetonationWires : " + "\n" + for idx in range(0, len(self.numberOfTripDetonationWires)): + outputString += str(self.numberOfTripDetonationWires[idx]) + + outputString += "NumberOfVertices : " + "\n" + for idx in range(0, len(self.numberOfVertices)): + outputString += str(self.numberOfVertices[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( MinefieldDataPdu, self ).serialize(outputStream) + self.minefieldID.serialize(outputStream) + self.requestingEntityID.serialize(outputStream) + outputStream.write_short(int(self.minefieldSequenceNumbeer)) + outputStream.write_byte(int(self.requestID)) + outputStream.write_byte(int(self.pduSequenceNumber)) + outputStream.write_byte(int(self.numberOfPdus)) + outputStream.write_byte(int(self.numberOfMinesInThisPdu)) + outputStream.write_byte( len(self._sensorTypes)) + outputStream.write_byte(int(self.padding)) + self.dataFilter.serialize(outputStream) + self.mineType.serialize(outputStream) + for anObj in self._sensorTypes: + anObj.serialize(outputStream) + + for anObj in self._mineLocation: + anObj.serialize(outputStream) + + for idx in range(0, 0): + outputStream.write_float( self.groundBurialDepthOffset[ idx ] ); + + for idx in range(0, 0): + outputStream.write_float( self.waterBurialDepthOffset[ idx ] ); + + for idx in range(0, 0): + outputStream.write_float( self.snowBurialDepthOffset[ idx ] ); + + for anObj in self._mineOrientation: + anObj.serialize(outputStream) + + for idx in range(0, 0): + outputStream.write_float( self.thermalContrast[ idx ] ); + + for idx in range(0, 0): + outputStream.write_float( self.reflectance[ idx ] ); + + for anObj in self._mineEmplacementTime: + anObj.serialize(outputStream) + + for idx in range(0, 0): + outputStream.write_unsigned_short( self.mineEntityNumber[ idx ] ); + + for anObj in self._fusing: + anObj.serialize(outputStream) + + for idx in range(0, 0): + outputStream.write_unsigned_byte( self.scalarDetectionCoefficient[ idx ] ); + + for anObj in self._paintScheme: + anObj.serialize(outputStream) + + for idx in range(0, 0): + outputStream.write_unsigned_byte( self.numberOfTripDetonationWires[ idx ] ); + + for idx in range(0, 0): + outputStream.write_unsigned_byte( self.numberOfVertices[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( MinefieldDataPdu, self).parse(inputStream) + self.minefieldID.parse(inputStream) + self.requestingEntityID.parse(inputStream) + self.minefieldSequenceNumbeer = inputStream.read_short() + self.requestID = inputStream.read_byte() + self.pduSequenceNumber = inputStream.read_byte() + self.numberOfPdus = inputStream.read_byte() + self.numberOfMinesInThisPdu = inputStream.read_byte() + self.numberOfSensorTypes = inputStream.read_byte() + self.padding = inputStream.read_byte() + self.dataFilter.parse(inputStream) + self.mineType.parse(inputStream) + for idx in range(0, self.numberOfSensorTypes): + element = MinefieldSensorType() + element.parse(inputStream) + self._sensorTypes.append(element) + + for idx in range(0, self.numberOfMinesInThisPdu): + element = Vector3Float() + element.parse(inputStream) + self._mineLocation.append(element) + + self.groundBurialDepthOffset = [0]*0 + for idx in range(0, 0): + val = inputStream.read_float() + self.groundBurialDepthOffset[ idx ] = val + + self.waterBurialDepthOffset = [0]*0 + for idx in range(0, 0): + val = inputStream.read_float() + self.waterBurialDepthOffset[ idx ] = val + + self.snowBurialDepthOffset = [0]*0 + for idx in range(0, 0): + val = inputStream.read_float() + self.snowBurialDepthOffset[ idx ] = val + + for idx in range(0, self.numberOfMinesInThisPdu): + element = EulerAngles() + element.parse(inputStream) + self._mineOrientation.append(element) + + self.thermalContrast = [0]*0 + for idx in range(0, 0): + val = inputStream.read_float() + self.thermalContrast[ idx ] = val + + self.reflectance = [0]*0 + for idx in range(0, 0): + val = inputStream.read_float() + self.reflectance[ idx ] = val + + for idx in range(0, self.numberOfMinesInThisPdu): + element = MineEmplacementTime() + element.parse(inputStream) + self._mineEmplacementTime.append(element) + + self.mineEntityNumber = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_short() + self.mineEntityNumber[ idx ] = val + + for idx in range(0, self.numberOfMinesInThisPdu): + element = MinefieldDataFusing() + element.parse(inputStream) + self._fusing.append(element) + + self.scalarDetectionCoefficient = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_byte() + self.scalarDetectionCoefficient[ idx ] = val + + for idx in range(0, self.numberOfMinesInThisPdu): + element = MinefieldDataPaintScheme() + element.parse(inputStream) + self._paintScheme.append(element) + + self.numberOfTripDetonationWires = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_byte() + self.numberOfTripDetonationWires[ idx ] = val + + self.numberOfVertices = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_byte() + self.numberOfVertices[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 29 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/minefield_family_pdu.py b/dis/minefield_family_pdu.py new file mode 100644 index 0000000..1723bd0 --- /dev/null +++ b/dis/minefield_family_pdu.py @@ -0,0 +1,88 @@ +from enum import Enum + +from .pdu_base import PduBase +from .siso_ref_010.enums.disprotocol_family import DISProtocolFamily + +class MinefieldFamilyPdu( PduBase ): + """ Abstract superclass for PDUs relating to minefields. Section 7.9""" + + def __init__(self): + """ Initializer for MinefieldFamilyPdu""" + super().__init__() + self.protocolFamily = DISProtocolFamily.minefield + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( MinefieldFamilyPdu, self ).serialize(outputStream) + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( MinefieldFamilyPdu, self).parse(inputStream) + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/minefield_identifier.py b/dis/minefield_identifier.py new file mode 100644 index 0000000..f5b3a95 --- /dev/null +++ b/dis/minefield_identifier.py @@ -0,0 +1,90 @@ +from enum import Enum + +from .simulation_address import SimulationAddress + +class MinefieldIdentifier( object ): + """The unique designation of a minefield Section 6.2.56 """ + + def __init__(self): + """ Initializer for MinefieldIdentifier""" + """ """ + self.simulationAddress = SimulationAddress() + """ """ + self.minefieldNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "SimulationAddress :" + "\n" + self.simulationAddress.to_string() + "\n" + outputString += "MinefieldNumber : " + str(self.minefieldNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.simulationAddress.serialize(outputStream) + outputStream.write_short(int(self.minefieldNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.simulationAddress.parse(inputStream) + self.minefieldNumber = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/minefield_query_pdu.py b/dis/minefield_query_pdu.py new file mode 100644 index 0000000..a041479 --- /dev/null +++ b/dis/minefield_query_pdu.py @@ -0,0 +1,232 @@ +from enum import Enum + +from .data_filter_record import DataFilterRecord +from .minefield_sensor_type import MinefieldSensorType +from .entity_type import EntityType +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .minefield_family_pdu import MinefieldFamilyPdu +from .minefield_identifier import MinefieldIdentifier +from .entity_id import EntityID +from .vector2float import Vector2Float + +class MinefieldQueryPdu( MinefieldFamilyPdu ): + """5.10.3 Contains information about the requesting entity and the region and mine types of interest to the requesting entity.""" + + def __init__(self): + """ Initializer for MinefieldQueryPdu""" + super().__init__() + """ Minefield ID provides a unique identifier""" + self.minefieldID = MinefieldIdentifier() + """ EID of entity making the request""" + self.requestingEntityID = EntityID() + """ request ID provides a unique identifier""" + self.requestID = 0 + """ Number of perimeter points for the minefield""" + self.numberOfPerimeterPoints = 0 + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + """ Number of sensor types""" + self.numberOfSensorTypes = 0 + """ data filter, 32 boolean fields""" + self.dataFilter = DataFilterRecord() + """ Entity type of mine being requested""" + self.requestedMineType = EntityType() + """ perimeter points of request""" + self._requestedPerimeterPoints = [] + """ Sensor types, each 16-bits long""" + self._sensorTypes = [] + self.pduType = DisPduType.minefield_query + + + def get_numberOfPerimeterPoints(self): + return len(self._requestedPerimeterPoints) + def set_numberOfPerimeterPoints(self, value): + numberOfPerimeterPoints = value + + + def get_numberOfSensorTypes(self): + return len(self._sensorTypes) + def set_numberOfSensorTypes(self, value): + numberOfSensorTypes = value + + + def get_requestedPerimeterPoints(self): + return self._requestedPerimeterPoints + def set_requestedPerimeterPoints(self, value): + self._requestedPerimeterPoints = value + requestedPerimeterPoints = property(get_requestedPerimeterPoints, set_requestedPerimeterPoints) + + + def add_requestedPerimeterPoints(self, value : Vector2Float): + self._requestedPerimeterPoints.append(value) + + + """ + /// Name : requestedPerimeterPoints + /// UID : + /// Type : Vector2Float + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : perimeter points of request + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_sensorTypes(self): + return self._sensorTypes + def set_sensorTypes(self, value): + self._sensorTypes = value + sensorTypes = property(get_sensorTypes, set_sensorTypes) + + + def add_sensorTypes(self, value : MinefieldSensorType): + self._sensorTypes.append(value) + + + """ + /// Name : sensorTypes + /// UID : + /// Type : MinefieldSensorType + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Sensor types, each 16-bits long + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "MinefieldID :" + "\n" + self.minefieldID.to_string() + "\n" + outputString += "RequestingEntityID :" + "\n" + self.requestingEntityID.to_string() + "\n" + outputString += "RequestID : " + str(self.requestID) + "\n" + outputString += "NumberOfPerimeterPoints : " + str(len(self._requestedPerimeterPoints)) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "NumberOfSensorTypes : " + str(len(self._sensorTypes)) + "\n" + outputString += "DataFilter :" + "\n" + self.dataFilter.to_string() + "\n" + outputString += "RequestedMineType :" + "\n" + self.requestedMineType.to_string() + "\n" + outputString += "RequestedPerimeterPoints : " + "\n" + for idx in range(0, len(self._requestedPerimeterPoints)): + outputString += self._requestedPerimeterPoints[idx].to_string() + + outputString += "SensorTypes : " + "\n" + for idx in range(0, len(self._sensorTypes)): + outputString += self._sensorTypes[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( MinefieldQueryPdu, self ).serialize(outputStream) + self.minefieldID.serialize(outputStream) + self.requestingEntityID.serialize(outputStream) + outputStream.write_byte(int(self.requestID)) + outputStream.write_byte( len(self._requestedPerimeterPoints)) + outputStream.write_byte(int(self.padding)) + outputStream.write_byte( len(self._sensorTypes)) + self.dataFilter.serialize(outputStream) + self.requestedMineType.serialize(outputStream) + for anObj in self._requestedPerimeterPoints: + anObj.serialize(outputStream) + + for anObj in self._sensorTypes: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( MinefieldQueryPdu, self).parse(inputStream) + self.minefieldID.parse(inputStream) + self.requestingEntityID.parse(inputStream) + self.requestID = inputStream.read_byte() + self.numberOfPerimeterPoints = inputStream.read_byte() + self.padding = inputStream.read_byte() + self.numberOfSensorTypes = inputStream.read_byte() + self.dataFilter.parse(inputStream) + self.requestedMineType.parse(inputStream) + for idx in range(0, self.numberOfPerimeterPoints): + element = Vector2Float() + element.parse(inputStream) + self._requestedPerimeterPoints.append(element) + + for idx in range(0, self.numberOfSensorTypes): + element = MinefieldSensorType() + element.parse(inputStream) + self._sensorTypes.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 10 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/minefield_response_nackpdu.py b/dis/minefield_response_nackpdu.py new file mode 100644 index 0000000..95def76 --- /dev/null +++ b/dis/minefield_response_nackpdu.py @@ -0,0 +1,122 @@ +from enum import Enum + +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .minefield_family_pdu import MinefieldFamilyPdu +from .minefield_identifier import MinefieldIdentifier +from .simulation_identifier import SimulationIdentifier + +class MinefieldResponseNACKPdu( MinefieldFamilyPdu ): + """5.10.5 Contains information about the requesting entity and the PDU(s) that were not received in response to a query. NACK = Negative Acknowledgment.""" + + def __init__(self): + """ Initializer for MinefieldResponseNACKPdu""" + super().__init__() + """ Minefield ID provides a unique identifier""" + self.minefieldID = MinefieldIdentifier() + """ entity ID making the request""" + self.requestingEntityID = SimulationIdentifier() + """ request ID provides a unique identifier""" + self.requestID = 0 + """ how many pdus were missing""" + self.numberOfMissingPdus = 0 + """ PDU sequence numbers that were missing""" + self.missingPduSequenceNumbers = [] + self.pduType = DisPduType.minefield_response_nack + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "MinefieldID :" + "\n" + self.minefieldID.to_string() + "\n" + outputString += "RequestingEntityID :" + "\n" + self.requestingEntityID.to_string() + "\n" + outputString += "RequestID : " + str(self.requestID) + "\n" + outputString += "NumberOfMissingPdus : " + str(self.numberOfMissingPdus) + "\n" + outputString += "MissingPduSequenceNumbers : " + "\n" + for idx in range(0, len(self.missingPduSequenceNumbers)): + outputString += str(self.missingPduSequenceNumbers[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( MinefieldResponseNACKPdu, self ).serialize(outputStream) + self.minefieldID.serialize(outputStream) + self.requestingEntityID.serialize(outputStream) + outputStream.write_byte(int(self.requestID)) + outputStream.write_byte(int(self.numberOfMissingPdus)) + for idx in range(0, 0): + outputStream.write_unsigned_byte( self.missingPduSequenceNumbers[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( MinefieldResponseNACKPdu, self).parse(inputStream) + self.minefieldID.parse(inputStream) + self.requestingEntityID.parse(inputStream) + self.requestID = inputStream.read_byte() + self.numberOfMissingPdus = inputStream.read_byte() + self.missingPduSequenceNumbers = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_byte() + self.missingPduSequenceNumbers[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 5 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/minefield_sensor_type.py b/dis/minefield_sensor_type.py new file mode 100644 index 0000000..4ab4960 --- /dev/null +++ b/dis/minefield_sensor_type.py @@ -0,0 +1,84 @@ +from enum import Enum + + +class MinefieldSensorType( object ): + """Information about a minefield sensor. Section 6.2.57""" + + def __init__(self): + """ Initializer for MinefieldSensorType""" + """ sensor type. bit fields 0-3 are the type category, 4-15 are teh subcategory""" + self.sensorType = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "SensorType : " + str(self.sensorType) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.sensorType)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.sensorType = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 1 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/minefield_state_pdu.py b/dis/minefield_state_pdu.py new file mode 100644 index 0000000..2672790 --- /dev/null +++ b/dis/minefield_state_pdu.py @@ -0,0 +1,246 @@ +from enum import Enum + +from .siso_ref_010.enums.force_id import ForceID +from .entity_type import EntityType +from .euler_angles import EulerAngles +from .protocol_mode import ProtocolMode +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .minefield_family_pdu import MinefieldFamilyPdu +from .vector3double import Vector3Double +from .siso_ref_010.enums.minefield_state_appearance_bit_map import MinefieldStateAppearanceBitMap +from .minefield_identifier import MinefieldIdentifier +from .vector2float import Vector2Float + +class MinefieldStatePdu( MinefieldFamilyPdu ): + """5.10.2 Communicate information about the minefield, including the location, perimeter, and types of mines contained within it.""" + + def __init__(self): + """ Initializer for MinefieldStatePdu""" + super().__init__() + """ Minefield ID provides a unique identifier""" + self.minefieldID = MinefieldIdentifier() + """ Minefield sequence number shall specify a change in state of a minefield as a result of a change in minefield information or a change in the state, in accordance with the rules specified in 5.10.2.3, of any of the mines contained therein""" + self.minefieldSequence = 0 + # /** force ID provides a unique identifier uid 6 */ + self.forceID = ForceID.default + + """ Number of permieter points""" + self.numberOfPerimeterPoints = 0 + """ type of minefield""" + self.minefieldType = EntityType() + """ the number of different mine types employed in the minefield""" + self.numberOfMineTypes = 0 + """ location of center of minefield in world coordinates""" + self.minefieldLocation = Vector3Double() + """ orientation of minefield""" + self.minefieldOrientation = EulerAngles() + # appearance bitflags information needed for displaying the symbology of the minefield as a doctrinal minefield graphic uid 190 + self.appearance = MinefieldStateAppearanceBitMap() + + """ protocolMode. First two bits are the protocol mode, 14 bits reserved.""" + self.protocolMode = ProtocolMode() + """ location of each perimeter point, relative to the Minefield Location field. Only the x and y coordinates of each perimeter point shall be specified.""" + self._perimeterPoints = [] + """ type of each mine contained within the minefield""" + self._mineType = [] + self.pduType = DisPduType.minefield_state + + + def get_numberOfPerimeterPoints(self): + return len(self._perimeterPoints) + def set_numberOfPerimeterPoints(self, value): + numberOfPerimeterPoints = value + + + def get_numberOfMineTypes(self): + return len(self._mineType) + def set_numberOfMineTypes(self, value): + numberOfMineTypes = value + + + def get_perimeterPoints(self): + return self._perimeterPoints + def set_perimeterPoints(self, value): + self._perimeterPoints = value + perimeterPoints = property(get_perimeterPoints, set_perimeterPoints) + + + def add_perimeterPoints(self, value : Vector2Float): + self._perimeterPoints.append(value) + + + """ + /// Name : perimeterPoints + /// UID : + /// Type : Vector2Float + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : location of each perimeter point, relative to the Minefield Location field. Only the x and y coordinates of each perimeter point shall be specified. + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_mineType(self): + return self._mineType + def set_mineType(self, value): + self._mineType = value + mineType = property(get_mineType, set_mineType) + + + def add_mineType(self, value : EntityType): + self._mineType.append(value) + + + """ + /// Name : mineType + /// UID : + /// Type : EntityType + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : type of each mine contained within the minefield + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "MinefieldID :" + "\n" + self.minefieldID.to_string() + "\n" + outputString += "MinefieldSequence : " + str(self.minefieldSequence) + "\n" + outputString += "ForceID : " + self.forceID.get_description + "(" + (str(int(self.forceID))) + ")" + "\n" + outputString += "NumberOfPerimeterPoints : " + str(len(self._perimeterPoints)) + "\n" + outputString += "MinefieldType :" + "\n" + self.minefieldType.to_string() + "\n" + outputString += "NumberOfMineTypes : " + str(len(self._mineType)) + "\n" + outputString += "MinefieldLocation :" + "\n" + self.minefieldLocation.to_string() + "\n" + outputString += "MinefieldOrientation :" + "\n" + self.minefieldOrientation.to_string() + "\n" + outputString += "MinefieldStateAppearanceBitMap : " + str(self.appearance) + "\n" + outputString += "ProtocolMode :" + "\n" + self.protocolMode.to_string() + "\n" + outputString += "PerimeterPoints : " + "\n" + for idx in range(0, len(self._perimeterPoints)): + outputString += self._perimeterPoints[idx].to_string() + + outputString += "MineType : " + "\n" + for idx in range(0, len(self._mineType)): + outputString += self._mineType[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( MinefieldStatePdu, self ).serialize(outputStream) + self.minefieldID.serialize(outputStream) + outputStream.write_short(int(self.minefieldSequence)) + self.serialize_enum(self.forceID,outputStream) + outputStream.write_byte( len(self._perimeterPoints)) + self.minefieldType.serialize(outputStream) + outputStream.write_short( len(self._mineType)) + self.minefieldLocation.serialize(outputStream) + self.minefieldOrientation.serialize(outputStream) + outputStream.write_unsigned_int(int(self.appearance.asbyte)) + self.protocolMode.serialize(outputStream) + for anObj in self._perimeterPoints: + anObj.serialize(outputStream) + + for anObj in self._mineType: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( MinefieldStatePdu, self).parse(inputStream) + self.minefieldID.parse(inputStream) + self.minefieldSequence = inputStream.read_short() + self.forceID = ForceID.get_enum(self.parse_enum(self.forceID,inputStream)) + self.numberOfPerimeterPoints = inputStream.read_byte() + self.minefieldType.parse(inputStream) + self.numberOfMineTypes = inputStream.read_short() + self.minefieldLocation.parse(inputStream) + self.minefieldOrientation.parse(inputStream) + self.appearance.asbyte = inputStream.read_unsigned_int() + self.protocolMode.parse(inputStream) + for idx in range(0, self.numberOfPerimeterPoints): + element = Vector2Float() + element.parse(inputStream) + self._perimeterPoints.append(element) + + for idx in range(0, self.numberOfMineTypes): + element = EntityType() + element.parse(inputStream) + self._mineType.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 12 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/mode5interrogator_basic_data.py b/dis/mode5interrogator_basic_data.py new file mode 100644 index 0000000..b1550dc --- /dev/null +++ b/dis/mode5interrogator_basic_data.py @@ -0,0 +1,110 @@ +from enum import Enum + +from .entity_id import EntityID + +class Mode5InterrogatorBasicData( object ): + """B.2.26. Mode 5 interrogator basic data""" + + def __init__(self): + """ Initializer for Mode5InterrogatorBasicData""" + """ Mode 5 interrogator status, part of Mode 5 interrogator basic data fields""" + self.mode5InterrogatorStatus = 0 + """ Padding, part of Mode 5 interrogator basic data fields""" + self.padding = 0 + """ Padding, part of Mode 5 interrogator basic data fields""" + self.padding2 = 0 + """ Mode 5 Message Formats Present, part of Mode 5 interrogator basic data fields""" + self.mode5MessageFormatsPresent = 0 + """ Interrogated entity ID, part of Mode 5 interrogator basic data fields""" + self.entityID = EntityID() + """ Padding, part of Mode 5 interrogator basic data fields""" + self.padding3 = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "Mode5InterrogatorStatus : " + str(self.mode5InterrogatorStatus) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + outputString += "Mode5MessageFormatsPresent : " + str(self.mode5MessageFormatsPresent) + "\n" + outputString += "EntityID :" + "\n" + self.entityID.to_string() + "\n" + outputString += "Padding3 : " + str(self.padding3) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_byte(int(self.mode5InterrogatorStatus)) + outputStream.write_byte(int(self.padding)) + outputStream.write_short(int(self.padding2)) + outputStream.write_int(int(self.mode5MessageFormatsPresent)) + self.entityID.serialize(outputStream) + outputStream.write_short(int(self.padding3)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.mode5InterrogatorStatus = inputStream.read_byte() + self.padding = inputStream.read_byte() + self.padding2 = inputStream.read_short() + self.mode5MessageFormatsPresent = inputStream.read_int() + self.entityID.parse(inputStream) + self.padding3 = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/mode5transponder_basic_data.py b/dis/mode5transponder_basic_data.py new file mode 100644 index 0000000..c0e176a --- /dev/null +++ b/dis/mode5transponder_basic_data.py @@ -0,0 +1,126 @@ +from enum import Enum + +from .siso_ref_010.enums.navigation_source import NavigationSource + +class Mode5TransponderBasicData( object ): + """B.2.29. Mode 5 transponder basic data""" + + def __init__(self): + """ Initializer for Mode5TransponderBasicData""" + """ Mode 5 status, part of Mode 5 transponder basic data fields""" + self.mode5Status = 0 + """ Personal Identification Number (PIN), part of Mode 5 transponder basic data fields""" + self.personalIdentificationNumber = 0 + """ Mode 5 Message Formats Present, part of Mode 5 transponder basic data fields""" + self.mode5MessageFormatsPresent = 0 + """ Enhanced Mode 1, part of Mode 5 transponder basic data fields""" + self.enhancedMode1 = 0 + """ National Origin, part of Mode 5 transponder basic data fields""" + self.nationalOrigin = 0 + """ Supplemental Data, part of Mode 5 transponder basic data fields""" + self.supplementalData = 0 + # /** Navigation Source, part of Mode 5 transponder basic data fields UID 359 */ + self.navigationSource = NavigationSource.default + + """ Figure of merit, part of Mode 5 transponder basic data fields""" + self.figureOfMerit = 0 + """ Padding, part of Mode 5 transponder basic data fields""" + self.padding = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "Mode5Status : " + str(self.mode5Status) + "\n" + outputString += "PersonalIdentificationNumber : " + str(self.personalIdentificationNumber) + "\n" + outputString += "Mode5MessageFormatsPresent : " + str(self.mode5MessageFormatsPresent) + "\n" + outputString += "EnhancedMode1 : " + str(self.enhancedMode1) + "\n" + outputString += "NationalOrigin : " + str(self.nationalOrigin) + "\n" + outputString += "SupplementalData : " + str(self.supplementalData) + "\n" + outputString += "NavigationSource : " + self.navigationSource.get_description + "(" + (str(int(self.navigationSource))) + ")" + "\n" + outputString += "FigureOfMerit : " + str(self.figureOfMerit) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.mode5Status)) + outputStream.write_short(int(self.personalIdentificationNumber)) + outputStream.write_int(int(self.mode5MessageFormatsPresent)) + outputStream.write_short(int(self.enhancedMode1)) + outputStream.write_short(int(self.nationalOrigin)) + outputStream.write_byte(int(self.supplementalData)) + self.serialize_enum(self.navigationSource,outputStream) + outputStream.write_byte(int(self.figureOfMerit)) + outputStream.write_byte(int(self.padding)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.mode5Status = inputStream.read_short() + self.personalIdentificationNumber = inputStream.read_short() + self.mode5MessageFormatsPresent = inputStream.read_int() + self.enhancedMode1 = inputStream.read_short() + self.nationalOrigin = inputStream.read_short() + self.supplementalData = inputStream.read_byte() + self.navigationSource = NavigationSource.get_enum(self.parse_enum(self.navigationSource,inputStream)) + self.figureOfMerit = inputStream.read_byte() + self.padding = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 9 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/mode_sinterrogator_basic_data.py b/dis/mode_sinterrogator_basic_data.py new file mode 100644 index 0000000..e5444ce --- /dev/null +++ b/dis/mode_sinterrogator_basic_data.py @@ -0,0 +1,124 @@ +from enum import Enum + + +class ModeSInterrogatorBasicData( object ): + """B.2.37. Mode S interrogator basic data""" + + def __init__(self): + """ Initializer for ModeSInterrogatorBasicData""" + """ Mode S interrogator status, part of Mode S interrogator basic data fields. See B.2.39.""" + self.modeSInterrogatorStatus = 0 + """ Padding, part of Mode S interrogator basic data fields""" + self.padding = 0 + """ Mode S levels present, part of Mode S interrogator basic data fields. See B.2.40""" + self.modeSLevelsPresent = 0 + """ Padding, part of Mode S interrogator basic data fields""" + self.padding2 = 0 + """ Padding, part of Mode S interrogator basic data fields""" + self.padding3 = 0 + """ Padding, part of Mode S interrogator basic data fields""" + self.padding4 = 0 + """ Padding, part of Mode S interrogator basic data fields""" + self.padding5 = 0 + """ Padding, part of Mode S interrogator basic data fields""" + self.padding6 = 0 + """ Padding, part of Mode S interrogator basic data fields""" + self.padding7 = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "ModeSInterrogatorStatus : " + str(self.modeSInterrogatorStatus) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "ModeSLevelsPresent : " + str(self.modeSLevelsPresent) + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + outputString += "Padding3 : " + str(self.padding3) + "\n" + outputString += "Padding4 : " + str(self.padding4) + "\n" + outputString += "Padding5 : " + str(self.padding5) + "\n" + outputString += "Padding6 : " + str(self.padding6) + "\n" + outputString += "Padding7 : " + str(self.padding7) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_byte(int(self.modeSInterrogatorStatus)) + outputStream.write_byte(int(self.padding)) + outputStream.write_byte(int(self.modeSLevelsPresent)) + outputStream.write_byte(int(self.padding2)) + outputStream.write_int(int(self.padding3)) + outputStream.write_int(int(self.padding4)) + outputStream.write_int(int(self.padding5)) + outputStream.write_int(int(self.padding6)) + outputStream.write_int(int(self.padding7)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.modeSInterrogatorStatus = inputStream.read_byte() + self.padding = inputStream.read_byte() + self.modeSLevelsPresent = inputStream.read_byte() + self.padding2 = inputStream.read_byte() + self.padding3 = inputStream.read_int() + self.padding4 = inputStream.read_int() + self.padding5 = inputStream.read_int() + self.padding6 = inputStream.read_int() + self.padding7 = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 9 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/mode_stransponder_basic_data.py b/dis/mode_stransponder_basic_data.py new file mode 100644 index 0000000..5227f73 --- /dev/null +++ b/dis/mode_stransponder_basic_data.py @@ -0,0 +1,140 @@ +from enum import Enum + +from .siso_ref_010.enums.aircraft_identification_type import AircraftIdentificationType +from .siso_ref_010.enums.aircraft_present_domain import AircraftPresentDomain +from .siso_ref_010.enums.capability_report import CapabilityReport + +class ModeSTransponderBasicData( object ): + """B.2.41. Mode S transponder basic data""" + + def __init__(self): + """ Initializer for ModeSTransponderBasicData""" + """ Mode S transponder status, part of Mode S transponder basic data fields. See B.2.42.""" + self.modeSTransponderStatus = 0 + """ Mode S levels present, part of Mode S transponder basic data fields. See B.2.40.""" + self.modeSLevelsPresent = 0 + # /** aircraft present domain uid 356 */ + self.aircraftPresentDomain = AircraftPresentDomain.default + + """ Aircraft identification, part of Mode S transponder basic data fields. See B.2.35.""" + self.aircraftIdentification = 0 + """ Unique ICAO Mode S aircraft address, part of Mode S transponder basic data fields.""" + self.aircraftAddress = 0 + # /** Aircraft identification type, part of Mode S transponder basic data fields. uid 357 */ + self.aircraftIdentificationType = AircraftIdentificationType.default + + """ DAP source, part of Mode S transponder basic data fields. See B.2.6.""" + self.dapSource = 0 + """ Mode S altitude, part of Mode S transponder basic data fields. See B.2.36.""" + self.modeSAltitude = 0 + # /** Capability report, part of Mode S transponder basic data fields. uid 358 */ + self.capabilityReport = CapabilityReport.default + + """ Padding""" + self.padding = 0 + """ Padding""" + self.padding2 = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "ModeSTransponderStatus : " + str(self.modeSTransponderStatus) + "\n" + outputString += "ModeSLevelsPresent : " + str(self.modeSLevelsPresent) + "\n" + outputString += "AircraftPresentDomain : " + self.aircraftPresentDomain.get_description + "(" + (str(int(self.aircraftPresentDomain))) + ")" + "\n" + outputString += "AircraftIdentification : " + str(self.aircraftIdentification) + "\n" + outputString += "AircraftAddress : " + str(self.aircraftAddress) + "\n" + outputString += "AircraftIdentificationType : " + self.aircraftIdentificationType.get_description + "(" + (str(int(self.aircraftIdentificationType))) + ")" + "\n" + outputString += "DapSource : " + str(self.dapSource) + "\n" + outputString += "ModeSAltitude : " + str(self.modeSAltitude) + "\n" + outputString += "CapabilityReport : " + self.capabilityReport.get_description + "(" + (str(int(self.capabilityReport))) + ")" + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.modeSTransponderStatus)) + outputStream.write_byte(int(self.modeSLevelsPresent)) + self.serialize_enum(self.aircraftPresentDomain,outputStream) + outputStream.write_long(int(self.aircraftIdentification)) + outputStream.write_int(int(self.aircraftAddress)) + self.serialize_enum(self.aircraftIdentificationType,outputStream) + outputStream.write_byte(int(self.dapSource)) + outputStream.write_short(int(self.modeSAltitude)) + self.serialize_enum(self.capabilityReport,outputStream) + outputStream.write_byte(int(self.padding)) + outputStream.write_short(int(self.padding2)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.modeSTransponderStatus = inputStream.read_short() + self.modeSLevelsPresent = inputStream.read_byte() + self.aircraftPresentDomain = AircraftPresentDomain.get_enum(self.parse_enum(self.aircraftPresentDomain,inputStream)) + self.aircraftIdentification = inputStream.read_long() + self.aircraftAddress = inputStream.read_int() + self.aircraftIdentificationType = AircraftIdentificationType.get_enum(self.parse_enum(self.aircraftIdentificationType,inputStream)) + self.dapSource = inputStream.read_byte() + self.modeSAltitude = inputStream.read_short() + self.capabilityReport = CapabilityReport.get_enum(self.parse_enum(self.capabilityReport,inputStream)) + self.padding = inputStream.read_byte() + self.padding2 = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 11 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/modulation_parameters.py b/dis/modulation_parameters.py new file mode 100644 index 0000000..5f90786 --- /dev/null +++ b/dis/modulation_parameters.py @@ -0,0 +1,93 @@ +from enum import Enum + + +class ModulationParameters( object ): + """Modulation parameters associated with a specific radio system. 6.2.58 """ + + def __init__(self): + """ Initializer for ModulationParameters""" + self.recordSpecificFields = [] + self.padding = [0] * 64 + + def to_string(self) ->str: + outputString = "" + outputString += "RecordSpecificFields : " + "\n" + for idx in range(0, len(self.recordSpecificFields)): + outputString += str(self.recordSpecificFields[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + for idx in range(0, 0): + outputStream.write_unsigned_byte( self.recordSpecificFields[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordSpecificFields = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_byte() + self.recordSpecificFields[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/modulation_type.py b/dis/modulation_type.py new file mode 100644 index 0000000..7c0bb21 --- /dev/null +++ b/dis/modulation_type.py @@ -0,0 +1,103 @@ +from enum import Enum + +from .siso_ref_010.enums.transmitter_modulation_type_system import TransmitterModulationTypeSystem +from .siso_ref_010.enums.transmitter_major_modulation import TransmitterMajorModulation + +class ModulationType( object ): + """Information about the type of modulation used for radio transmission. 6.2.59 """ + + def __init__(self): + """ Initializer for ModulationType""" + """ This field shall indicate the spread spectrum technique or combination of spread spectrum techniques in use. Bit field. 0=freq hopping, 1=psuedo noise, time hopping=2, reamining bits unused""" + self.spreadSpectrum = 0 + # /** The major classification of the modulation type. UID 155 */ + self.majorModulation = TransmitterMajorModulation.default + + """ provide certain detailed information depending upon the major modulation type, uid 156-162""" + self.detail = 0 + # /** The radio system associated with this Transmitter PDU and shall be used as the basis to interpret other fields whose values depend on a specific radio system. uid =163 */ + self.radioSystem = TransmitterModulationTypeSystem.default + + + def to_string(self) ->str: + outputString = "" + outputString += "SpreadSpectrum : " + str(self.spreadSpectrum) + "\n" + outputString += "TransmitterMajorModulation : " + self.majorModulation.get_description + "(" + (str(int(self.majorModulation))) + ")" + "\n" + outputString += "Detail : " + str(self.detail) + "\n" + outputString += "TransmitterModulationTypeSystem : " + self.radioSystem.get_description + "(" + (str(int(self.radioSystem))) + ")" + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.spreadSpectrum)) + self.serialize_enum(self.majorModulation,outputStream) + outputStream.write_short(int(self.detail)) + self.serialize_enum(self.radioSystem,outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.spreadSpectrum = inputStream.read_short() + self.majorModulation = TransmitterMajorModulation.get_enum(self.parse_enum(self.majorModulation,inputStream)) + self.detail = inputStream.read_short() + self.radioSystem = TransmitterModulationTypeSystem.get_enum(self.parse_enum(self.radioSystem,inputStream)) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/munition.py b/dis/munition.py new file mode 100644 index 0000000..3e42b2c --- /dev/null +++ b/dis/munition.py @@ -0,0 +1,107 @@ +from enum import Enum + +from .entity_type import EntityType +from .siso_ref_010.enums.munition_expendable_status import MunitionExpendableStatus + +class Munition( object ): + """An entity's munition (e.g., bomb, missile) information shall be represented by one or more Munition records. For each type or location of munition, this record shall specify the type, location, quantity and status of munitions that an entity contains. Section 6.2.60 """ + + def __init__(self): + """ Initializer for Munition""" + """ This field shall identify the entity type of the munition. See section 6.2.30.""" + self.munitionType = EntityType() + """ The station or launcher to which the munition is assigned. See Annex I""" + self.station = 0 + """ The quantity remaining of this munition.""" + self.quantity = 0 + # /** the status of the munition. It shall be represented by an 8-bit enumeration. uid 327 */ + self.munitionStatus = MunitionExpendableStatus.default + + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "MunitionType :" + "\n" + self.munitionType.to_string() + "\n" + outputString += "Station : " + str(self.station) + "\n" + outputString += "Quantity : " + str(self.quantity) + "\n" + outputString += "MunitionExpendableStatus : " + self.munitionStatus.get_description + "(" + (str(int(self.munitionStatus))) + ")" + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.munitionType.serialize(outputStream) + outputStream.write_int(int(self.station)) + outputStream.write_short(int(self.quantity)) + self.serialize_enum(self.munitionStatus,outputStream) + outputStream.write_byte(int(self.padding)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.munitionType.parse(inputStream) + self.station = inputStream.read_int() + self.quantity = inputStream.read_short() + self.munitionStatus = MunitionExpendableStatus.get_enum(self.parse_enum(self.munitionStatus,inputStream)) + self.padding = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 5 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/munition_descriptor.py b/dis/munition_descriptor.py new file mode 100644 index 0000000..2aabdd6 --- /dev/null +++ b/dis/munition_descriptor.py @@ -0,0 +1,109 @@ +from enum import Enum + +from .entity_type import EntityType +from .siso_ref_010.enums.munition_descriptor_warhead import MunitionDescriptorWarhead +from .siso_ref_010.enums.munition_descriptor_fuse import MunitionDescriptorFuse + +class MunitionDescriptor( object ): + """Represents the firing or detonation of a munition. Section 6.2.19.2""" + + def __init__(self): + """ Initializer for MunitionDescriptor""" + """ What munition was used in the burst""" + self.munitionType = EntityType() + # /** type of warhead enumeration uid 60 */ + self.warhead = MunitionDescriptorWarhead.default + + # /** type of fuse used enumeration uid 61 */ + self.fuse = MunitionDescriptorFuse.default + + """ how many of the munition were fired""" + self.quantity = 0 + """ rate at which the munition was fired""" + self.rate = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "MunitionType :" + "\n" + self.munitionType.to_string() + "\n" + outputString += "MunitionDescriptorWarhead : " + self.warhead.get_description + "(" + (str(int(self.warhead))) + ")" + "\n" + outputString += "MunitionDescriptorFuse : " + self.fuse.get_description + "(" + (str(int(self.fuse))) + ")" + "\n" + outputString += "Quantity : " + str(self.quantity) + "\n" + outputString += "Rate : " + str(self.rate) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.munitionType.serialize(outputStream) + self.serialize_enum(self.warhead,outputStream) + self.serialize_enum(self.fuse,outputStream) + outputStream.write_short(int(self.quantity)) + outputStream.write_short(int(self.rate)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.munitionType.parse(inputStream) + self.warhead = MunitionDescriptorWarhead.get_enum(self.parse_enum(self.warhead,inputStream)) + self.fuse = MunitionDescriptorFuse.get_enum(self.parse_enum(self.fuse,inputStream)) + self.quantity = inputStream.read_short() + self.rate = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 5 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/munition_reload.py b/dis/munition_reload.py new file mode 100644 index 0000000..40d3ad7 --- /dev/null +++ b/dis/munition_reload.py @@ -0,0 +1,110 @@ +from enum import Enum + +from .entity_type import EntityType + +class MunitionReload( object ): + """indicate weapons (munitions) previously communicated via the Munition record. Section 6.2.61 """ + + def __init__(self): + """ Initializer for MunitionReload""" + """ This field shall identify the entity type of the munition. See section 6.2.30.""" + self.munitionType = EntityType() + """ The station or launcher to which the munition is assigned. See Annex I""" + self.station = 0 + """ The standard quantity of this munition type normally loaded at this station/launcher if a station/launcher is specified.""" + self.standardQuantity = 0 + """ The maximum quantity of this munition type that this station/launcher is capable of holding when a station/launcher is specified """ + self.maximumQuantity = 0 + """ numer of seconds of sim time required to reload the std qty""" + self.standardQuantityReloadTime = 0 + """ The number of seconds of sim time required to reload the max possible quantity""" + self.maximumQuantityReloadTime = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "MunitionType :" + "\n" + self.munitionType.to_string() + "\n" + outputString += "Station : " + str(self.station) + "\n" + outputString += "StandardQuantity : " + str(self.standardQuantity) + "\n" + outputString += "MaximumQuantity : " + str(self.maximumQuantity) + "\n" + outputString += "StandardQuantityReloadTime : " + str(self.standardQuantityReloadTime) + "\n" + outputString += "MaximumQuantityReloadTime : " + str(self.maximumQuantityReloadTime) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.munitionType.serialize(outputStream) + outputStream.write_int(int(self.station)) + outputStream.write_short(int(self.standardQuantity)) + outputStream.write_short(int(self.maximumQuantity)) + outputStream.write_int(int(self.standardQuantityReloadTime)) + outputStream.write_int(int(self.maximumQuantityReloadTime)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.munitionType.parse(inputStream) + self.station = inputStream.read_int() + self.standardQuantity = inputStream.read_short() + self.maximumQuantity = inputStream.read_short() + self.standardQuantityReloadTime = inputStream.read_int() + self.maximumQuantityReloadTime = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/named_location_identification.py b/dis/named_location_identification.py new file mode 100644 index 0000000..7579759 --- /dev/null +++ b/dis/named_location_identification.py @@ -0,0 +1,91 @@ +from enum import Enum + +from .siso_ref_010.enums.is_part_of_station_name import IsPartOfStationName + +class NamedLocationIdentification( object ): + """Information about the discrete positional relationship of the part entity with respect to the its host entity Section 6.2.62 """ + + def __init__(self): + """ Initializer for NamedLocationIdentification""" + # /** The station name within the host at which the part entity is located. If the part entity is On Station, this field shall specify the representation of the part's location data fields. This field shall be specified by a 16-bit enumeration uid 212 */ + self.stationName = IsPartOfStationName.default + + """ The number of the particular wing station, cargo hold etc., at which the part is attached. """ + self.stationNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "IsPartOfStationName : " + self.stationName.get_description + "(" + (str(int(self.stationName))) + ")" + "\n" + outputString += "StationNumber : " + str(self.stationNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.stationName,outputStream) + outputStream.write_short(int(self.stationNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.stationName = IsPartOfStationName.get_enum(self.parse_enum(self.stationName,inputStream)) + self.stationNumber = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/objectTypes/ArealObject/ArealObject.py b/dis/objectTypes/ArealObject/ArealObject.py new file mode 100644 index 0000000..9aced6c --- /dev/null +++ b/dis/objectTypes/ArealObject/ArealObject.py @@ -0,0 +1,31 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.ArealObject; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 228 + */ +""" + +class ArealObject(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # ArealObject diff --git a/dis/objectTypes/ArealObject/Obstacle/Minefield/Hasty.py b/dis/objectTypes/ArealObject/Obstacle/Minefield/Hasty.py new file mode 100644 index 0000000..eeb49ac --- /dev/null +++ b/dis/objectTypes/ArealObject/Obstacle/Minefield/Hasty.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.ArealObject.Obstacle.Minefield; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 228 + */ +""" + +class Hasty(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # ArealObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(1) # Minefield + subCategory = UInt8(1) # Hasty diff --git a/dis/objectTypes/ArealObject/Obstacle/Minefield/Minefield.py b/dis/objectTypes/ArealObject/Obstacle/Minefield/Minefield.py new file mode 100644 index 0000000..b6f262a --- /dev/null +++ b/dis/objectTypes/ArealObject/Obstacle/Minefield/Minefield.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.ArealObject.Obstacle.Minefield; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 228 + */ +""" + +class Minefield(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # ArealObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(1) # Minefield diff --git a/dis/objectTypes/ArealObject/Obstacle/Minefield/Other.py b/dis/objectTypes/ArealObject/Obstacle/Minefield/Other.py new file mode 100644 index 0000000..15cc3a5 --- /dev/null +++ b/dis/objectTypes/ArealObject/Obstacle/Minefield/Other.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.ArealObject.Obstacle.Minefield; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 228 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # ArealObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(1) # Minefield + subCategory = UInt8(0) # Other diff --git a/dis/objectTypes/ArealObject/Obstacle/Minefield/Prepared.py b/dis/objectTypes/ArealObject/Obstacle/Minefield/Prepared.py new file mode 100644 index 0000000..882b380 --- /dev/null +++ b/dis/objectTypes/ArealObject/Obstacle/Minefield/Prepared.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.ArealObject.Obstacle.Minefield; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 228 + */ +""" + +class Prepared(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # ArealObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(1) # Minefield + subCategory = UInt8(2) # Prepared diff --git a/dis/objectTypes/ArealObject/Obstacle/Minefield/Scattered.py b/dis/objectTypes/ArealObject/Obstacle/Minefield/Scattered.py new file mode 100644 index 0000000..85e2764 --- /dev/null +++ b/dis/objectTypes/ArealObject/Obstacle/Minefield/Scattered.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.ArealObject.Obstacle.Minefield; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 228 + */ +""" + +class Scattered(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # ArealObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(1) # Minefield + subCategory = UInt8(3) # Scattered diff --git a/dis/objectTypes/ArealObject/Obstacle/Minefield/Solitary.py b/dis/objectTypes/ArealObject/Obstacle/Minefield/Solitary.py new file mode 100644 index 0000000..d88fda7 --- /dev/null +++ b/dis/objectTypes/ArealObject/Obstacle/Minefield/Solitary.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.ArealObject.Obstacle.Minefield; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 228 + */ +""" + +class Solitary(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # ArealObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(1) # Minefield + subCategory = UInt8(4) # Solitary diff --git a/dis/objectTypes/ArealObject/Obstacle/Obstacle.py b/dis/objectTypes/ArealObject/Obstacle/Obstacle.py new file mode 100644 index 0000000..eb537c7 --- /dev/null +++ b/dis/objectTypes/ArealObject/Obstacle/Obstacle.py @@ -0,0 +1,32 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.ArealObject.Obstacle; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 228 + */ +""" + +class Obstacle(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # ArealObject + objectKind = ObjectKind(1) # Obstacle diff --git a/dis/objectTypes/ArealObject/Obstacle/Other/Other.py b/dis/objectTypes/ArealObject/Obstacle/Other/Other.py new file mode 100644 index 0000000..535df75 --- /dev/null +++ b/dis/objectTypes/ArealObject/Obstacle/Other/Other.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.ArealObject.Obstacle.Other; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 228 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # ArealObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(0) # Other diff --git a/dis/objectTypes/LinearObject/Culturalfeature/Culturalfeature.py b/dis/objectTypes/LinearObject/Culturalfeature/Culturalfeature.py new file mode 100644 index 0000000..14a531c --- /dev/null +++ b/dis/objectTypes/LinearObject/Culturalfeature/Culturalfeature.py @@ -0,0 +1,32 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Culturalfeature; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class Culturalfeature(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(3) # Cultural feature diff --git a/dis/objectTypes/LinearObject/Culturalfeature/TracksTire/TracksTire.py b/dis/objectTypes/LinearObject/Culturalfeature/TracksTire/TracksTire.py new file mode 100644 index 0000000..2ffb173 --- /dev/null +++ b/dis/objectTypes/LinearObject/Culturalfeature/TracksTire/TracksTire.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Culturalfeature.TracksTire; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class TracksTire(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(2) # Tracks, Tire diff --git a/dis/objectTypes/LinearObject/Culturalfeature/Wire/Wire.py b/dis/objectTypes/LinearObject/Culturalfeature/Wire/Wire.py new file mode 100644 index 0000000..100a685 --- /dev/null +++ b/dis/objectTypes/LinearObject/Culturalfeature/Wire/Wire.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Culturalfeature.Wire; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class Wire(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Wire diff --git a/dis/objectTypes/LinearObject/Culturalfeature/Wire/WireCrush.py b/dis/objectTypes/LinearObject/Culturalfeature/Wire/WireCrush.py new file mode 100644 index 0000000..21177ad --- /dev/null +++ b/dis/objectTypes/LinearObject/Culturalfeature/Wire/WireCrush.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Culturalfeature.Wire; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class WireCrush(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Wire + subCategory = UInt8(1) # Wire, Crush diff --git a/dis/objectTypes/LinearObject/LinearObject.py b/dis/objectTypes/LinearObject/LinearObject.py new file mode 100644 index 0000000..2fcd0e2 --- /dev/null +++ b/dis/objectTypes/LinearObject/LinearObject.py @@ -0,0 +1,31 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class LinearObject(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject diff --git a/dis/objectTypes/LinearObject/Obstacle/ChainLinkFence/ChainLinkFence.py b/dis/objectTypes/LinearObject/Obstacle/ChainLinkFence/ChainLinkFence.py new file mode 100644 index 0000000..538b3bc --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstacle/ChainLinkFence/ChainLinkFence.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstacle.ChainLinkFence; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class ChainLinkFence(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(9) # Chain Link Fence diff --git a/dis/objectTypes/LinearObject/Obstacle/ConcertinaWire/ConcertinaWire.py b/dis/objectTypes/LinearObject/Obstacle/ConcertinaWire/ConcertinaWire.py new file mode 100644 index 0000000..777cf94 --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstacle/ConcertinaWire/ConcertinaWire.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstacle.ConcertinaWire; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class ConcertinaWire(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(2) # Concertina Wire diff --git a/dis/objectTypes/LinearObject/Obstacle/ConcertinaWire/Other.py b/dis/objectTypes/LinearObject/Obstacle/ConcertinaWire/Other.py new file mode 100644 index 0000000..b8bc828 --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstacle/ConcertinaWire/Other.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstacle.ConcertinaWire; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(2) # Concertina Wire + subCategory = UInt8(0) # Other diff --git a/dis/objectTypes/LinearObject/Obstacle/ConcertinaWire/_2Roll.py b/dis/objectTypes/LinearObject/Obstacle/ConcertinaWire/_2Roll.py new file mode 100644 index 0000000..4d18f84 --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstacle/ConcertinaWire/_2Roll.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstacle.ConcertinaWire; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class _2Roll(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(2) # Concertina Wire + subCategory = UInt8(1) # 2-Roll diff --git a/dis/objectTypes/LinearObject/Obstacle/ConcertinaWire/_3Roll.py b/dis/objectTypes/LinearObject/Obstacle/ConcertinaWire/_3Roll.py new file mode 100644 index 0000000..cffa997 --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstacle/ConcertinaWire/_3Roll.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstacle.ConcertinaWire; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class _3Roll(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(2) # Concertina Wire + subCategory = UInt8(2) # 3-Roll diff --git a/dis/objectTypes/LinearObject/Obstacle/ConcreteBarrier/ConcreteBarrier.py b/dis/objectTypes/LinearObject/Obstacle/ConcreteBarrier/ConcreteBarrier.py new file mode 100644 index 0000000..d5b13d1 --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstacle/ConcreteBarrier/ConcreteBarrier.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstacle.ConcreteBarrier; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class ConcreteBarrier(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(3) # Concrete Barrier diff --git a/dis/objectTypes/LinearObject/Obstacle/Obstacle.py b/dis/objectTypes/LinearObject/Obstacle/Obstacle.py new file mode 100644 index 0000000..fa40d5c --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstacle/Obstacle.py @@ -0,0 +1,32 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstacle; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class Obstacle(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(1) # Obstacle diff --git a/dis/objectTypes/LinearObject/Obstacle/Other/Other.py b/dis/objectTypes/LinearObject/Obstacle/Other/Other.py new file mode 100644 index 0000000..ac58888 --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstacle/Other/Other.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstacle.Other; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(0) # Other diff --git a/dis/objectTypes/LinearObject/Obstacle/Rut/Rut.py b/dis/objectTypes/LinearObject/Obstacle/Rut/Rut.py new file mode 100644 index 0000000..8af4ba8 --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstacle/Rut/Rut.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstacle.Rut; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class Rut(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(5) # Rut diff --git a/dis/objectTypes/LinearObject/Obstacle/SpeedBump/SpeedBump.py b/dis/objectTypes/LinearObject/Obstacle/SpeedBump/SpeedBump.py new file mode 100644 index 0000000..2b18589 --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstacle/SpeedBump/SpeedBump.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstacle.SpeedBump; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class SpeedBump(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(4) # Speed Bump diff --git a/dis/objectTypes/LinearObject/Obstacle/TankDitch/Other.py b/dis/objectTypes/LinearObject/Obstacle/TankDitch/Other.py new file mode 100644 index 0000000..cff93b0 --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstacle/TankDitch/Other.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstacle.TankDitch; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(1) # Tank Ditch + subCategory = UInt8(0) # Other diff --git a/dis/objectTypes/LinearObject/Obstacle/TankDitch/TankDitch.py b/dis/objectTypes/LinearObject/Obstacle/TankDitch/TankDitch.py new file mode 100644 index 0000000..19ae718 --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstacle/TankDitch/TankDitch.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstacle.TankDitch; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class TankDitch(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(1) # Tank Ditch diff --git a/dis/objectTypes/LinearObject/Obstaclebreach/Breach/Breach.py b/dis/objectTypes/LinearObject/Obstaclebreach/Breach/Breach.py new file mode 100644 index 0000000..e9d24ef --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstaclebreach/Breach/Breach.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstaclebreach.Breach; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class Breach(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(7) # Obstacle breach + category = UInt8(1) # Breach diff --git a/dis/objectTypes/LinearObject/Obstaclebreach/Breach/Other.py b/dis/objectTypes/LinearObject/Obstaclebreach/Breach/Other.py new file mode 100644 index 0000000..0f30f62 --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstaclebreach/Breach/Other.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstaclebreach.Breach; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(7) # Obstacle breach + category = UInt8(1) # Breach + subCategory = UInt8(0) # Other diff --git a/dis/objectTypes/LinearObject/Obstaclebreach/Obstaclebreach.py b/dis/objectTypes/LinearObject/Obstaclebreach/Obstaclebreach.py new file mode 100644 index 0000000..57b8afa --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstaclebreach/Obstaclebreach.py @@ -0,0 +1,32 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstaclebreach; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class Obstaclebreach(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(7) # Obstacle breach diff --git a/dis/objectTypes/LinearObject/Obstaclebreach/Other/Other.py b/dis/objectTypes/LinearObject/Obstaclebreach/Other/Other.py new file mode 100644 index 0000000..959fe7f --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstaclebreach/Other/Other.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstaclebreach.Other; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(7) # Obstacle breach + category = UInt8(0) # Other diff --git a/dis/objectTypes/LinearObject/Obstaclemarker/MinefieldLaneMarker/MinefieldLaneMarker.py b/dis/objectTypes/LinearObject/Obstaclemarker/MinefieldLaneMarker/MinefieldLaneMarker.py new file mode 100644 index 0000000..dee8d8c --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstaclemarker/MinefieldLaneMarker/MinefieldLaneMarker.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstaclemarker.MinefieldLaneMarker; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class MinefieldLaneMarker(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(6) # Obstacle marker + category = UInt8(1) # Minefield Lane Marker diff --git a/dis/objectTypes/LinearObject/Obstaclemarker/MinefieldLaneMarker/Other.py b/dis/objectTypes/LinearObject/Obstaclemarker/MinefieldLaneMarker/Other.py new file mode 100644 index 0000000..d28fe93 --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstaclemarker/MinefieldLaneMarker/Other.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstaclemarker.MinefieldLaneMarker; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(6) # Obstacle marker + category = UInt8(1) # Minefield Lane Marker + subCategory = UInt8(0) # Other diff --git a/dis/objectTypes/LinearObject/Obstaclemarker/Obstaclemarker.py b/dis/objectTypes/LinearObject/Obstaclemarker/Obstaclemarker.py new file mode 100644 index 0000000..9bc0fef --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstaclemarker/Obstaclemarker.py @@ -0,0 +1,32 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstaclemarker; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class Obstaclemarker(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(6) # Obstacle marker diff --git a/dis/objectTypes/LinearObject/Obstaclemarker/Other/Other.py b/dis/objectTypes/LinearObject/Obstaclemarker/Other/Other.py new file mode 100644 index 0000000..ab92689 --- /dev/null +++ b/dis/objectTypes/LinearObject/Obstaclemarker/Other/Other.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Obstaclemarker.Other; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # LinearObject + objectKind = ObjectKind(6) # Obstacle marker + category = UInt8(0) # Other diff --git a/dis/objectTypes/LinearObject/Tacticalsmoke/ExhaustSmoke/ExhaustSmoke.py b/dis/objectTypes/LinearObject/Tacticalsmoke/ExhaustSmoke/ExhaustSmoke.py new file mode 100644 index 0000000..aded2b6 --- /dev/null +++ b/dis/objectTypes/LinearObject/Tacticalsmoke/ExhaustSmoke/ExhaustSmoke.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Tacticalsmoke.ExhaustSmoke; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class ExhaustSmoke(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # LinearObject + objectKind = ObjectKind(5) # Tactical smoke + category = UInt8(1) # Exhaust Smoke diff --git a/dis/objectTypes/LinearObject/Tacticalsmoke/ExhaustSmoke/Other.py b/dis/objectTypes/LinearObject/Tacticalsmoke/ExhaustSmoke/Other.py new file mode 100644 index 0000000..7130873 --- /dev/null +++ b/dis/objectTypes/LinearObject/Tacticalsmoke/ExhaustSmoke/Other.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Tacticalsmoke.ExhaustSmoke; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # LinearObject + objectKind = ObjectKind(5) # Tactical smoke + category = UInt8(1) # Exhaust Smoke + subCategory = UInt8(0) # Other diff --git a/dis/objectTypes/LinearObject/Tacticalsmoke/Other/Other.py b/dis/objectTypes/LinearObject/Tacticalsmoke/Other/Other.py new file mode 100644 index 0000000..4c4dbd2 --- /dev/null +++ b/dis/objectTypes/LinearObject/Tacticalsmoke/Other/Other.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Tacticalsmoke.Other; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # LinearObject + objectKind = ObjectKind(5) # Tactical smoke + category = UInt8(0) # Other diff --git a/dis/objectTypes/LinearObject/Tacticalsmoke/Tacticalsmoke.py b/dis/objectTypes/LinearObject/Tacticalsmoke/Tacticalsmoke.py new file mode 100644 index 0000000..0bcece0 --- /dev/null +++ b/dis/objectTypes/LinearObject/Tacticalsmoke/Tacticalsmoke.py @@ -0,0 +1,32 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.LinearObject.Tacticalsmoke; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 227 + */ +""" + +class Tacticalsmoke(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # LinearObject + objectKind = ObjectKind(5) # Tactical smoke diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingRubble/BuildingRubble.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingRubble/BuildingRubble.py new file mode 100644 index 0000000..6f3b725 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingRubble/BuildingRubble.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingRubble; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class BuildingRubble(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(2) # Building Rubble diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingRubble/Other.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingRubble/Other.py new file mode 100644 index 0000000..6c89a0a --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingRubble/Other.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingRubble; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(2) # Building Rubble + subCategory = UInt8(0) # Other diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/ApartmentBuilding.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/ApartmentBuilding.py new file mode 100644 index 0000000..74f02c0 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/ApartmentBuilding.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class ApartmentBuilding(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(2) # Apartment Building diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/BuildingStructure.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/BuildingStructure.py new file mode 100644 index 0000000..2f88dba --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/BuildingStructure.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class BuildingStructure(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/Church.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/Church.py new file mode 100644 index 0000000..f87ace4 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/Church.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Church(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(1) # Church diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/FOBGuardTower.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/FOBGuardTower.py new file mode 100644 index 0000000..7a3ba65 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/FOBGuardTower.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class FOBGuardTower(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(17) # FOB, Guard Tower diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/FOBTrailerOffice.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/FOBTrailerOffice.py new file mode 100644 index 0000000..1ff9a2e --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/FOBTrailerOffice.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class FOBTrailerOffice(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(16) # FOB, Trailer Office diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/GovernmentBuilding.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/GovernmentBuilding.py new file mode 100644 index 0000000..2550473 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/GovernmentBuilding.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class GovernmentBuilding(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(3) # Government Building diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/GuardHouse.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/GuardHouse.py new file mode 100644 index 0000000..b9053cc --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/GuardHouse.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class GuardHouse(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(18) # Guard House diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/Hanger.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/Hanger.py new file mode 100644 index 0000000..1df948c --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/Hanger.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Hanger(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(5) # Hanger diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/IndustrialBuilding.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/IndustrialBuilding.py new file mode 100644 index 0000000..f4fbc6e --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/IndustrialBuilding.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class IndustrialBuilding(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(4) # Industrial Building diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/MicrowaveTower.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/MicrowaveTower.py new file mode 100644 index 0000000..af3df3e --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/MicrowaveTower.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MicrowaveTower(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(6) # Microwave Tower diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/Other.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/Other.py new file mode 100644 index 0000000..19f133a --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/Other.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(0) # Other diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/PortaPotty.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/PortaPotty.py new file mode 100644 index 0000000..4d484bf --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/PortaPotty.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class PortaPotty(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(15) # Porta Potty diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/PowerPylon.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/PowerPylon.py new file mode 100644 index 0000000..d703fd8 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/PowerPylon.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class PowerPylon(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(7) # Power Pylon diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/RadioTVTower.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/RadioTVTower.py new file mode 100644 index 0000000..991ee82 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/RadioTVTower.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class RadioTVTower(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(8) # Radio / TV Tower diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/RadioTower1000ft.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/RadioTower1000ft.py new file mode 100644 index 0000000..0b711e1 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/RadioTower1000ft.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class RadioTower1000ft(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(14) # Radio Tower, 1000ft diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/RadioTower100ft.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/RadioTower100ft.py new file mode 100644 index 0000000..3574d0b --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/RadioTower100ft.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class RadioTower100ft(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(12) # Radio Tower, 100ft diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/RadioTower500ft.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/RadioTower500ft.py new file mode 100644 index 0000000..c86470e --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/RadioTower500ft.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class RadioTower500ft(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(13) # Radio Tower, 500ft diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/School.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/School.py new file mode 100644 index 0000000..6f188e5 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/School.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class School(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(9) # School diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/TransformerYard.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/TransformerYard.py new file mode 100644 index 0000000..bf0149b --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/TransformerYard.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TransformerYard(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(10) # Transformer Yard diff --git a/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/Windmill.py b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/Windmill.py new file mode 100644 index 0000000..32c29b4 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/BuildingStructure/Windmill.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.BuildingStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Windmill(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(1) # Building / Structure + subCategory = UInt8(19) # Windmill diff --git a/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuilding.py b/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuilding.py new file mode 100644 index 0000000..113e30c --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuilding.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.ContainerBasedBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class ContainerBasedBuilding(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(8) # Container-Based Building diff --git a/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingBridgeSingle.py b/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingBridgeSingle.py new file mode 100644 index 0000000..eb8d692 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingBridgeSingle.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.ContainerBasedBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class ContainerBasedBuildingBridgeSingle(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(8) # Container-Based Building + subCategory = UInt8(6) # Container-Based Building, Bridge, Single diff --git a/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingFOB.py b/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingFOB.py new file mode 100644 index 0000000..f808849 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingFOB.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.ContainerBasedBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class ContainerBasedBuildingFOB(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(8) # Container-Based Building + subCategory = UInt8(7) # Container-Based Building, FOB diff --git a/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingHouseDouble.py b/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingHouseDouble.py new file mode 100644 index 0000000..8d0fe03 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingHouseDouble.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.ContainerBasedBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class ContainerBasedBuildingHouseDouble(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(8) # Container-Based Building + subCategory = UInt8(4) # Container-Based Building, House, Double diff --git a/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingHouseSingle.py b/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingHouseSingle.py new file mode 100644 index 0000000..b699677 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingHouseSingle.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.ContainerBasedBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class ContainerBasedBuildingHouseSingle(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(8) # Container-Based Building + subCategory = UInt8(2) # Container-Based Building, House, Single diff --git a/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingHouseSingleRailing.py b/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingHouseSingleRailing.py new file mode 100644 index 0000000..4385942 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingHouseSingleRailing.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.ContainerBasedBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class ContainerBasedBuildingHouseSingleRailing(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(8) # Container-Based Building + subCategory = UInt8(3) # Container-Based Building, House, Single, Railing diff --git a/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingMosqueSingle.py b/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingMosqueSingle.py new file mode 100644 index 0000000..cdee9c1 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingMosqueSingle.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.ContainerBasedBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class ContainerBasedBuildingMosqueSingle(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(8) # Container-Based Building + subCategory = UInt8(5) # Container-Based Building, Mosque, Single diff --git a/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingStoreSingle.py b/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingStoreSingle.py new file mode 100644 index 0000000..3ce8416 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/ContainerBasedBuilding/ContainerBasedBuildingStoreSingle.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.ContainerBasedBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class ContainerBasedBuildingStoreSingle(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(8) # Container-Based Building + subCategory = UInt8(1) # Container-Based Building, Store, Single diff --git a/dis/objectTypes/PointObject/Culturalfeature/Culturalfeature.py b/dis/objectTypes/PointObject/Culturalfeature/Culturalfeature.py new file mode 100644 index 0000000..f9eeebd --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/Culturalfeature.py @@ -0,0 +1,32 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Culturalfeature(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature diff --git a/dis/objectTypes/PointObject/Culturalfeature/DisturbedEarth/DisturbedEarth.py b/dis/objectTypes/PointObject/Culturalfeature/DisturbedEarth/DisturbedEarth.py new file mode 100644 index 0000000..cb08161 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/DisturbedEarth/DisturbedEarth.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.DisturbedEarth; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class DisturbedEarth(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(3) # Disturbed Earth diff --git a/dis/objectTypes/PointObject/Culturalfeature/DisturbedRoad/DisturbedRoad.py b/dis/objectTypes/PointObject/Culturalfeature/DisturbedRoad/DisturbedRoad.py new file mode 100644 index 0000000..c8a6cc3 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/DisturbedRoad/DisturbedRoad.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.DisturbedRoad; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class DisturbedRoad(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(4) # Disturbed Road diff --git a/dis/objectTypes/PointObject/Culturalfeature/DisturbedRoad/DisturbedRoadAsphalt.py b/dis/objectTypes/PointObject/Culturalfeature/DisturbedRoad/DisturbedRoadAsphalt.py new file mode 100644 index 0000000..d1d8ab9 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/DisturbedRoad/DisturbedRoadAsphalt.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.DisturbedRoad; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class DisturbedRoadAsphalt(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(4) # Disturbed Road + subCategory = UInt8(2) # Disturbed Road, Asphalt diff --git a/dis/objectTypes/PointObject/Culturalfeature/DisturbedRoad/DisturbedRoadConcrete.py b/dis/objectTypes/PointObject/Culturalfeature/DisturbedRoad/DisturbedRoadConcrete.py new file mode 100644 index 0000000..3a8f5e5 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/DisturbedRoad/DisturbedRoadConcrete.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.DisturbedRoad; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class DisturbedRoadConcrete(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(4) # Disturbed Road + subCategory = UInt8(3) # Disturbed Road, Concrete diff --git a/dis/objectTypes/PointObject/Culturalfeature/DisturbedRoad/DisturbedRoadGravel.py b/dis/objectTypes/PointObject/Culturalfeature/DisturbedRoad/DisturbedRoadGravel.py new file mode 100644 index 0000000..6a3c022 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/DisturbedRoad/DisturbedRoadGravel.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.DisturbedRoad; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class DisturbedRoadGravel(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(4) # Disturbed Road + subCategory = UInt8(1) # Disturbed Road, Gravel diff --git a/dis/objectTypes/PointObject/Culturalfeature/IndustrialProcessingPlant/IndustrialProcessingPlant.py b/dis/objectTypes/PointObject/Culturalfeature/IndustrialProcessingPlant/IndustrialProcessingPlant.py new file mode 100644 index 0000000..6c23308 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/IndustrialProcessingPlant/IndustrialProcessingPlant.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.IndustrialProcessingPlant; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class IndustrialProcessingPlant(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(13) # Industrial Processing Plant diff --git a/dis/objectTypes/PointObject/Culturalfeature/IndustrialProcessingPlant/OilRefinery.py b/dis/objectTypes/PointObject/Culturalfeature/IndustrialProcessingPlant/OilRefinery.py new file mode 100644 index 0000000..081bece --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/IndustrialProcessingPlant/OilRefinery.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.IndustrialProcessingPlant; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class OilRefinery(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(13) # Industrial Processing Plant + subCategory = UInt8(1) # Oil Refinery diff --git a/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuilding.py b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuilding.py new file mode 100644 index 0000000..fecf966 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuilding.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MOUTBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MOUTBuilding(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(7) # MOUT Building diff --git a/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingApartment.py b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingApartment.py new file mode 100644 index 0000000..9c85ad3 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingApartment.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MOUTBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MOUTBuildingApartment(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(7) # MOUT Building + subCategory = UInt8(12) # MOUT Building, Apartment diff --git a/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingChurch.py b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingChurch.py new file mode 100644 index 0000000..7604762 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingChurch.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MOUTBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MOUTBuildingChurch(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(7) # MOUT Building + subCategory = UInt8(14) # MOUT Building, Church diff --git a/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingControlTower.py b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingControlTower.py new file mode 100644 index 0000000..fad7618 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingControlTower.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MOUTBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MOUTBuildingControlTower(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(7) # MOUT Building + subCategory = UInt8(7) # MOUT Building, Control Tower diff --git a/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingFarmHouse.py b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingFarmHouse.py new file mode 100644 index 0000000..7470b9b --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingFarmHouse.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MOUTBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MOUTBuildingFarmHouse(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(7) # MOUT Building + subCategory = UInt8(15) # MOUT Building, Farm House diff --git a/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingFireStation.py b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingFireStation.py new file mode 100644 index 0000000..01db143 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingFireStation.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MOUTBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MOUTBuildingFireStation(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(7) # MOUT Building + subCategory = UInt8(10) # MOUT Building, Fire Station diff --git a/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingGasStation.py b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingGasStation.py new file mode 100644 index 0000000..9444e2d --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingGasStation.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MOUTBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MOUTBuildingGasStation(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(7) # MOUT Building + subCategory = UInt8(3) # MOUT Building, Gas Station diff --git a/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingHospital.py b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingHospital.py new file mode 100644 index 0000000..253a001 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingHospital.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MOUTBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MOUTBuildingHospital(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(7) # MOUT Building + subCategory = UInt8(2) # MOUT Building, Hospital diff --git a/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingHouse.py b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingHouse.py new file mode 100644 index 0000000..5e4c307 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingHouse.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MOUTBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MOUTBuildingHouse(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(7) # MOUT Building + subCategory = UInt8(1) # MOUT Building, House diff --git a/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingMudbrickHouse.py b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingMudbrickHouse.py new file mode 100644 index 0000000..62d6be4 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingMudbrickHouse.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MOUTBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MOUTBuildingMudbrickHouse(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(7) # MOUT Building + subCategory = UInt8(16) # MOUT Building, Mudbrick House diff --git a/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingMudbrickStore.py b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingMudbrickStore.py new file mode 100644 index 0000000..9ae0756 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingMudbrickStore.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MOUTBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MOUTBuildingMudbrickStore(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(7) # MOUT Building + subCategory = UInt8(17) # MOUT Building, Mudbrick Store diff --git a/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingOfficeBuilding.py b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingOfficeBuilding.py new file mode 100644 index 0000000..c78a8e0 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingOfficeBuilding.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MOUTBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MOUTBuildingOfficeBuilding(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(7) # MOUT Building + subCategory = UInt8(5) # MOUT Building, Office Building diff --git a/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingPoliceStation.py b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingPoliceStation.py new file mode 100644 index 0000000..a4a8cbd --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingPoliceStation.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MOUTBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MOUTBuildingPoliceStation(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(7) # MOUT Building + subCategory = UInt8(9) # MOUT Building, Police Station diff --git a/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingPowerStation.py b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingPowerStation.py new file mode 100644 index 0000000..e683136 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingPowerStation.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MOUTBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MOUTBuildingPowerStation(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(7) # MOUT Building + subCategory = UInt8(11) # MOUT Building, Power Station diff --git a/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingSchool.py b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingSchool.py new file mode 100644 index 0000000..6b70466 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingSchool.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MOUTBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MOUTBuildingSchool(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(7) # MOUT Building + subCategory = UInt8(13) # MOUT Building, School diff --git a/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingStore.py b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingStore.py new file mode 100644 index 0000000..a8dd7f2 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingStore.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MOUTBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MOUTBuildingStore(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(7) # MOUT Building + subCategory = UInt8(4) # MOUT Building, Store diff --git a/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingWarehouse.py b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingWarehouse.py new file mode 100644 index 0000000..0019c9e --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingWarehouse.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MOUTBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MOUTBuildingWarehouse(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(7) # MOUT Building + subCategory = UInt8(6) # MOUT Building, Warehouse diff --git a/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingWaterTower.py b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingWaterTower.py new file mode 100644 index 0000000..58af669 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MOUTBuilding/MOUTBuildingWaterTower.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MOUTBuilding; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MOUTBuildingWaterTower(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(7) # MOUT Building + subCategory = UInt8(8) # MOUT Building, Water Tower diff --git a/dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/LargeAreaMaintenanceShelterLAMSAviationMaintenanceAM.py b/dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/LargeAreaMaintenanceShelterLAMSAviationMaintenanceAM.py new file mode 100644 index 0000000..add1428 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/LargeAreaMaintenanceShelterLAMSAviationMaintenanceAM.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MaintenanceStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class LargeAreaMaintenanceShelterLAMSAviationMaintenanceAM(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(6) # Maintenance Structure + subCategory = UInt8(4) # Large Area Maintenance Shelter (LAMS) Aviation Maintenance (AM) diff --git a/dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/LargeAreaMaintenanceShelterLAMSVehicleMaintenanceVM.py b/dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/LargeAreaMaintenanceShelterLAMSVehicleMaintenanceVM.py new file mode 100644 index 0000000..80b7671 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/LargeAreaMaintenanceShelterLAMSVehicleMaintenanceVM.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MaintenanceStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class LargeAreaMaintenanceShelterLAMSVehicleMaintenanceVM(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(6) # Maintenance Structure + subCategory = UInt8(3) # Large Area Maintenance Shelter (LAMS) Vehicle Maintenance (VM) diff --git a/dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/LightweightMaintenanceEnclosureLMEBradley.py b/dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/LightweightMaintenanceEnclosureLMEBradley.py new file mode 100644 index 0000000..e84c2cc --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/LightweightMaintenanceEnclosureLMEBradley.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MaintenanceStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class LightweightMaintenanceEnclosureLMEBradley(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(6) # Maintenance Structure + subCategory = UInt8(1) # Lightweight Maintenance Enclosure (LME), Bradley diff --git a/dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/LightweightMaintenanceEnclosureLMEM1.py b/dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/LightweightMaintenanceEnclosureLMEM1.py new file mode 100644 index 0000000..1be3801 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/LightweightMaintenanceEnclosureLMEM1.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MaintenanceStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class LightweightMaintenanceEnclosureLMEM1(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(6) # Maintenance Structure + subCategory = UInt8(2) # Lightweight Maintenance Enclosure (LME), M1 diff --git a/dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/MaintenanceStructure.py b/dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/MaintenanceStructure.py new file mode 100644 index 0000000..eb004df --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/MaintenanceStructure/MaintenanceStructure.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.MaintenanceStructure; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MaintenanceStructure(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(6) # Maintenance Structure diff --git a/dis/objectTypes/PointObject/Culturalfeature/Other/Other.py b/dis/objectTypes/PointObject/Culturalfeature/Other/Other.py new file mode 100644 index 0000000..bfcf4ec --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/Other/Other.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.Other; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(0) # Other diff --git a/dis/objectTypes/PointObject/Culturalfeature/Pump/Pump.py b/dis/objectTypes/PointObject/Culturalfeature/Pump/Pump.py new file mode 100644 index 0000000..4f1a837 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/Pump/Pump.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.Pump; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Pump(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(12) # Pump diff --git a/dis/objectTypes/PointObject/Culturalfeature/Pump/PumpGas.py b/dis/objectTypes/PointObject/Culturalfeature/Pump/PumpGas.py new file mode 100644 index 0000000..7dc8885 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/Pump/PumpGas.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.Pump; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class PumpGas(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(12) # Pump + subCategory = UInt8(1) # Pump, Gas diff --git a/dis/objectTypes/PointObject/Culturalfeature/Tent/Tent.py b/dis/objectTypes/PointObject/Culturalfeature/Tent/Tent.py new file mode 100644 index 0000000..9bb29ea --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/Tent/Tent.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.Tent; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Tent(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(5) # Tent diff --git a/dis/objectTypes/PointObject/Culturalfeature/Tent/TentArctic.py b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentArctic.py new file mode 100644 index 0000000..6eb7ce7 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentArctic.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.Tent; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TentArctic(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(5) # Tent + subCategory = UInt8(5) # Tent, Arctic diff --git a/dis/objectTypes/PointObject/Culturalfeature/Tent/TentBedouin.py b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentBedouin.py new file mode 100644 index 0000000..e46c5f1 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentBedouin.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.Tent; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TentBedouin(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(5) # Tent + subCategory = UInt8(9) # Tent, Bedouin diff --git a/dis/objectTypes/PointObject/Culturalfeature/Tent/TentChemicallyandBiologicalProtectedShelterCBPS.py b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentChemicallyandBiologicalProtectedShelterCBPS.py new file mode 100644 index 0000000..492d389 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentChemicallyandBiologicalProtectedShelterCBPS.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.Tent; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TentChemicallyandBiologicalProtectedShelterCBPS(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(5) # Tent + subCategory = UInt8(10) # Tent, Chemically and Biological Protected Shelter (CBPS) diff --git a/dis/objectTypes/PointObject/Culturalfeature/Tent/TentExpandableFrame.py b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentExpandableFrame.py new file mode 100644 index 0000000..4609844 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentExpandableFrame.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.Tent; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TentExpandableFrame(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(5) # Tent + subCategory = UInt8(7) # Tent, Expandable Frame diff --git a/dis/objectTypes/PointObject/Culturalfeature/Tent/TentFritsche.py b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentFritsche.py new file mode 100644 index 0000000..14aaf59 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentFritsche.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.Tent; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TentFritsche(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(5) # Tent + subCategory = UInt8(8) # Tent, Fritsche diff --git a/dis/objectTypes/PointObject/Culturalfeature/Tent/TentKuchi.py b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentKuchi.py new file mode 100644 index 0000000..1a3b482 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentKuchi.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.Tent; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TentKuchi(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(5) # Tent + subCategory = UInt8(11) # Tent, Kuchi diff --git a/dis/objectTypes/PointObject/Culturalfeature/Tent/TentLarge.py b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentLarge.py new file mode 100644 index 0000000..f0ef58c --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentLarge.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.Tent; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TentLarge(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(5) # Tent + subCategory = UInt8(3) # Tent, Large diff --git a/dis/objectTypes/PointObject/Culturalfeature/Tent/TentMedium.py b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentMedium.py new file mode 100644 index 0000000..201d382 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentMedium.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.Tent; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TentMedium(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(5) # Tent + subCategory = UInt8(2) # Tent, Medium diff --git a/dis/objectTypes/PointObject/Culturalfeature/Tent/TentModularGeneralPurposeTentSystemMGPTS.py b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentModularGeneralPurposeTentSystemMGPTS.py new file mode 100644 index 0000000..8f644d5 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentModularGeneralPurposeTentSystemMGPTS.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.Tent; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TentModularGeneralPurposeTentSystemMGPTS(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(5) # Tent + subCategory = UInt8(4) # Tent, Modular General Purpose Tent System (MGPTS) diff --git a/dis/objectTypes/PointObject/Culturalfeature/Tent/TentSmall.py b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentSmall.py new file mode 100644 index 0000000..5536f77 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentSmall.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.Tent; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TentSmall(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(5) # Tent + subCategory = UInt8(1) # Tent, Small diff --git a/dis/objectTypes/PointObject/Culturalfeature/Tent/TentTEMPER.py b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentTEMPER.py new file mode 100644 index 0000000..026163b --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/Tent/TentTEMPER.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.Tent; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TentTEMPER(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(5) # Tent + subCategory = UInt8(6) # Tent, TEMPER diff --git a/dis/objectTypes/PointObject/Culturalfeature/TreeDeciduous/TreeDeciduous.py b/dis/objectTypes/PointObject/Culturalfeature/TreeDeciduous/TreeDeciduous.py new file mode 100644 index 0000000..1ea7918 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/TreeDeciduous/TreeDeciduous.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.TreeDeciduous; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TreeDeciduous(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(10) # Tree, Deciduous diff --git a/dis/objectTypes/PointObject/Culturalfeature/TreeDeciduous/TreeDeciduousLarge.py b/dis/objectTypes/PointObject/Culturalfeature/TreeDeciduous/TreeDeciduousLarge.py new file mode 100644 index 0000000..7c965c7 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/TreeDeciduous/TreeDeciduousLarge.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.TreeDeciduous; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TreeDeciduousLarge(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(10) # Tree, Deciduous + subCategory = UInt8(3) # Tree, Deciduous, Large diff --git a/dis/objectTypes/PointObject/Culturalfeature/TreeDeciduous/TreeDeciduousMedium.py b/dis/objectTypes/PointObject/Culturalfeature/TreeDeciduous/TreeDeciduousMedium.py new file mode 100644 index 0000000..5d19601 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/TreeDeciduous/TreeDeciduousMedium.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.TreeDeciduous; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TreeDeciduousMedium(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(10) # Tree, Deciduous + subCategory = UInt8(2) # Tree, Deciduous, Medium diff --git a/dis/objectTypes/PointObject/Culturalfeature/TreeDeciduous/TreeDeciduousSmall.py b/dis/objectTypes/PointObject/Culturalfeature/TreeDeciduous/TreeDeciduousSmall.py new file mode 100644 index 0000000..df42cf9 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/TreeDeciduous/TreeDeciduousSmall.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.TreeDeciduous; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TreeDeciduousSmall(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(10) # Tree, Deciduous + subCategory = UInt8(1) # Tree, Deciduous, Small diff --git a/dis/objectTypes/PointObject/Culturalfeature/TreeEvergreen/TreeEvergreen.py b/dis/objectTypes/PointObject/Culturalfeature/TreeEvergreen/TreeEvergreen.py new file mode 100644 index 0000000..308bb90 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/TreeEvergreen/TreeEvergreen.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.TreeEvergreen; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TreeEvergreen(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(11) # Tree, Evergreen diff --git a/dis/objectTypes/PointObject/Culturalfeature/TreeEvergreen/TreeEvergreenLarge.py b/dis/objectTypes/PointObject/Culturalfeature/TreeEvergreen/TreeEvergreenLarge.py new file mode 100644 index 0000000..9aecb10 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/TreeEvergreen/TreeEvergreenLarge.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.TreeEvergreen; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TreeEvergreenLarge(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(11) # Tree, Evergreen + subCategory = UInt8(3) # Tree, Evergreen, Large diff --git a/dis/objectTypes/PointObject/Culturalfeature/TreeEvergreen/TreeEvergreenMedium.py b/dis/objectTypes/PointObject/Culturalfeature/TreeEvergreen/TreeEvergreenMedium.py new file mode 100644 index 0000000..4aece08 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/TreeEvergreen/TreeEvergreenMedium.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.TreeEvergreen; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TreeEvergreenMedium(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(11) # Tree, Evergreen + subCategory = UInt8(2) # Tree, Evergreen, Medium diff --git a/dis/objectTypes/PointObject/Culturalfeature/TreeEvergreen/TreeEvergreenSmall.py b/dis/objectTypes/PointObject/Culturalfeature/TreeEvergreen/TreeEvergreenSmall.py new file mode 100644 index 0000000..b38a924 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/TreeEvergreen/TreeEvergreenSmall.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.TreeEvergreen; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TreeEvergreenSmall(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(11) # Tree, Evergreen + subCategory = UInt8(1) # Tree, Evergreen, Small diff --git a/dis/objectTypes/PointObject/Culturalfeature/UtilityPole/UtilityPole.py b/dis/objectTypes/PointObject/Culturalfeature/UtilityPole/UtilityPole.py new file mode 100644 index 0000000..adf8aa6 --- /dev/null +++ b/dis/objectTypes/PointObject/Culturalfeature/UtilityPole/UtilityPole.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Culturalfeature.UtilityPole; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class UtilityPole(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(3) # Cultural feature + category = UInt8(14) # Utility Pole diff --git a/dis/objectTypes/PointObject/EnvironmentalObject/EnvironmentalObject.py b/dis/objectTypes/PointObject/EnvironmentalObject/EnvironmentalObject.py new file mode 100644 index 0000000..f25e829 --- /dev/null +++ b/dis/objectTypes/PointObject/EnvironmentalObject/EnvironmentalObject.py @@ -0,0 +1,32 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.EnvironmentalObject; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class EnvironmentalObject(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(8) # Environmental Object diff --git a/dis/objectTypes/PointObject/EnvironmentalObject/Flood/Flood.py b/dis/objectTypes/PointObject/EnvironmentalObject/Flood/Flood.py new file mode 100644 index 0000000..6fee128 --- /dev/null +++ b/dis/objectTypes/PointObject/EnvironmentalObject/Flood/Flood.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.EnvironmentalObject.Flood; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Flood(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(8) # Environmental Object + category = UInt8(1) # Flood diff --git a/dis/objectTypes/PointObject/EnvironmentalObject/Flood/FloodLarge.py b/dis/objectTypes/PointObject/EnvironmentalObject/Flood/FloodLarge.py new file mode 100644 index 0000000..d1a2c2b --- /dev/null +++ b/dis/objectTypes/PointObject/EnvironmentalObject/Flood/FloodLarge.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.EnvironmentalObject.Flood; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class FloodLarge(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(8) # Environmental Object + category = UInt8(1) # Flood + subCategory = UInt8(3) # Flood, Large diff --git a/dis/objectTypes/PointObject/EnvironmentalObject/Flood/FloodMedium.py b/dis/objectTypes/PointObject/EnvironmentalObject/Flood/FloodMedium.py new file mode 100644 index 0000000..d583366 --- /dev/null +++ b/dis/objectTypes/PointObject/EnvironmentalObject/Flood/FloodMedium.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.EnvironmentalObject.Flood; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class FloodMedium(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(8) # Environmental Object + category = UInt8(1) # Flood + subCategory = UInt8(2) # Flood, Medium diff --git a/dis/objectTypes/PointObject/EnvironmentalObject/Flood/FloodSmall.py b/dis/objectTypes/PointObject/EnvironmentalObject/Flood/FloodSmall.py new file mode 100644 index 0000000..b6c46ae --- /dev/null +++ b/dis/objectTypes/PointObject/EnvironmentalObject/Flood/FloodSmall.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.EnvironmentalObject.Flood; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class FloodSmall(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(8) # Environmental Object + category = UInt8(1) # Flood + subCategory = UInt8(1) # Flood, Small diff --git a/dis/objectTypes/PointObject/Obstacle/Abatis/Abatis.py b/dis/objectTypes/PointObject/Obstacle/Abatis/Abatis.py new file mode 100644 index 0000000..b410503 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Abatis/Abatis.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Abatis; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Abatis(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(1) # Abatis diff --git a/dis/objectTypes/PointObject/Obstacle/Abatis/Other.py b/dis/objectTypes/PointObject/Obstacle/Abatis/Other.py new file mode 100644 index 0000000..afc240d --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Abatis/Other.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Abatis; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(1) # Abatis + subCategory = UInt8(0) # Other diff --git a/dis/objectTypes/PointObject/Obstacle/Abatis/_14Tree.py b/dis/objectTypes/PointObject/Obstacle/Abatis/_14Tree.py new file mode 100644 index 0000000..8284404 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Abatis/_14Tree.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Abatis; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class _14Tree(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(1) # Abatis + subCategory = UInt8(2) # 14 Tree diff --git a/dis/objectTypes/PointObject/Obstacle/Abatis/_8Tree.py b/dis/objectTypes/PointObject/Obstacle/Abatis/_8Tree.py new file mode 100644 index 0000000..d3dc78d --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Abatis/_8Tree.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Abatis; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class _8Tree(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(1) # Abatis + subCategory = UInt8(1) # 8 Tree diff --git a/dis/objectTypes/PointObject/Obstacle/Barrier/Barrier.py b/dis/objectTypes/PointObject/Obstacle/Barrier/Barrier.py new file mode 100644 index 0000000..40f16bf --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Barrier/Barrier.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Barrier; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Barrier(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(4) # Barrier diff --git a/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierConstruction.py b/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierConstruction.py new file mode 100644 index 0000000..c219764 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierConstruction.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Barrier; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class BarrierConstruction(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(4) # Barrier + subCategory = UInt8(6) # Barrier, Construction diff --git a/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierFenceChain6foot.py b/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierFenceChain6foot.py new file mode 100644 index 0000000..ca20a6f --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierFenceChain6foot.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Barrier; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class BarrierFenceChain6foot(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(4) # Barrier + subCategory = UInt8(8) # Barrier, Fence, Chain, 6-foot diff --git a/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierFenceWood6foot.py b/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierFenceWood6foot.py new file mode 100644 index 0000000..714a389 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierFenceWood6foot.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Barrier; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class BarrierFenceWood6foot(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(4) # Barrier + subCategory = UInt8(9) # Barrier, Fence, Wood, 6-foot diff --git a/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierHESCOBasketDoubleStacked.py b/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierHESCOBasketDoubleStacked.py new file mode 100644 index 0000000..ccb141d --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierHESCOBasketDoubleStacked.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Barrier; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class BarrierHESCOBasketDoubleStacked(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(4) # Barrier + subCategory = UInt8(5) # Barrier, HESCO Basket, Double-Stacked diff --git a/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierHESCOBasketLarge.py b/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierHESCOBasketLarge.py new file mode 100644 index 0000000..7f74c61 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierHESCOBasketLarge.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Barrier; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class BarrierHESCOBasketLarge(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(4) # Barrier + subCategory = UInt8(4) # Barrier, HESCO Basket, Large diff --git a/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierHESCOBasketMedium.py b/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierHESCOBasketMedium.py new file mode 100644 index 0000000..4120dfa --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierHESCOBasketMedium.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Barrier; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class BarrierHESCOBasketMedium(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(4) # Barrier + subCategory = UInt8(3) # Barrier, HESCO Basket, Medium diff --git a/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierHESCOBasketSmall.py b/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierHESCOBasketSmall.py new file mode 100644 index 0000000..df8b8a7 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierHESCOBasketSmall.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Barrier; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class BarrierHESCOBasketSmall(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(4) # Barrier + subCategory = UInt8(2) # Barrier, HESCO Basket, Small diff --git a/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierJerseyPlastic.py b/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierJerseyPlastic.py new file mode 100644 index 0000000..0b3667c --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierJerseyPlastic.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Barrier; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class BarrierJerseyPlastic(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(4) # Barrier + subCategory = UInt8(7) # Barrier, Jersey, Plastic diff --git a/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierTexas.py b/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierTexas.py new file mode 100644 index 0000000..75fa1e8 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Barrier/BarrierTexas.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Barrier; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class BarrierTexas(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(4) # Barrier + subCategory = UInt8(10) # Barrier, Texas diff --git a/dis/objectTypes/PointObject/Obstacle/Barrier/DragonsTeeth.py b/dis/objectTypes/PointObject/Obstacle/Barrier/DragonsTeeth.py new file mode 100644 index 0000000..1fdfc87 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Barrier/DragonsTeeth.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Barrier; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class DragonsTeeth(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(4) # Barrier + subCategory = UInt8(1) # Dragon’s Teeth diff --git a/dis/objectTypes/PointObject/Obstacle/Crater/Crater.py b/dis/objectTypes/PointObject/Obstacle/Crater/Crater.py new file mode 100644 index 0000000..c59ffa5 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Crater/Crater.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Crater; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Crater(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(3) # Crater diff --git a/dis/objectTypes/PointObject/Obstacle/Crater/Large.py b/dis/objectTypes/PointObject/Obstacle/Crater/Large.py new file mode 100644 index 0000000..eb1f992 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Crater/Large.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Crater; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Large(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(3) # Crater + subCategory = UInt8(3) # Large diff --git a/dis/objectTypes/PointObject/Obstacle/Crater/Medium.py b/dis/objectTypes/PointObject/Obstacle/Crater/Medium.py new file mode 100644 index 0000000..041960c --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Crater/Medium.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Crater; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Medium(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(3) # Crater + subCategory = UInt8(2) # Medium diff --git a/dis/objectTypes/PointObject/Obstacle/Crater/Other.py b/dis/objectTypes/PointObject/Obstacle/Crater/Other.py new file mode 100644 index 0000000..91db853 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Crater/Other.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Crater; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(3) # Crater + subCategory = UInt8(0) # Other diff --git a/dis/objectTypes/PointObject/Obstacle/Crater/Small.py b/dis/objectTypes/PointObject/Obstacle/Crater/Small.py new file mode 100644 index 0000000..7ea9c33 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Crater/Small.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Crater; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Small(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(3) # Crater + subCategory = UInt8(1) # Small diff --git a/dis/objectTypes/PointObject/Obstacle/LogCrib/LogCrib.py b/dis/objectTypes/PointObject/Obstacle/LogCrib/LogCrib.py new file mode 100644 index 0000000..cfe0d50 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/LogCrib/LogCrib.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.LogCrib; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class LogCrib(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(2) # Log Crib diff --git a/dis/objectTypes/PointObject/Obstacle/LogCrib/Other.py b/dis/objectTypes/PointObject/Obstacle/LogCrib/Other.py new file mode 100644 index 0000000..0747b4a --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/LogCrib/Other.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.LogCrib; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(2) # Log Crib + subCategory = UInt8(0) # Other diff --git a/dis/objectTypes/PointObject/Obstacle/LogCrib/Rectangular.py b/dis/objectTypes/PointObject/Obstacle/LogCrib/Rectangular.py new file mode 100644 index 0000000..a408750 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/LogCrib/Rectangular.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.LogCrib; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Rectangular(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(2) # Log Crib + subCategory = UInt8(1) # Rectangular diff --git a/dis/objectTypes/PointObject/Obstacle/LogCrib/Triangular.py b/dis/objectTypes/PointObject/Obstacle/LogCrib/Triangular.py new file mode 100644 index 0000000..9d7990c --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/LogCrib/Triangular.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.LogCrib; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Triangular(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(2) # Log Crib + subCategory = UInt8(2) # Triangular diff --git a/dis/objectTypes/PointObject/Obstacle/Obstacle.py b/dis/objectTypes/PointObject/Obstacle/Obstacle.py new file mode 100644 index 0000000..5b89c83 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Obstacle.py @@ -0,0 +1,32 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Obstacle(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle diff --git a/dis/objectTypes/PointObject/Obstacle/Other/Other.py b/dis/objectTypes/PointObject/Obstacle/Other/Other.py new file mode 100644 index 0000000..4f9b29d --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/Other/Other.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.Other; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(0) # Other diff --git a/dis/objectTypes/PointObject/Obstacle/PotHole/PotHole.py b/dis/objectTypes/PointObject/Obstacle/PotHole/PotHole.py new file mode 100644 index 0000000..e401d74 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/PotHole/PotHole.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.PotHole; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class PotHole(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(9) # Pot Hole diff --git a/dis/objectTypes/PointObject/Obstacle/RockDrop/RockDrop.py b/dis/objectTypes/PointObject/Obstacle/RockDrop/RockDrop.py new file mode 100644 index 0000000..9a44ab3 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/RockDrop/RockDrop.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.RockDrop; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class RockDrop(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(5) # Rock Drop diff --git a/dis/objectTypes/PointObject/Obstacle/RockDrop/RockDropCovered.py b/dis/objectTypes/PointObject/Obstacle/RockDrop/RockDropCovered.py new file mode 100644 index 0000000..1995921 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/RockDrop/RockDropCovered.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.RockDrop; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class RockDropCovered(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(5) # Rock Drop + subCategory = UInt8(1) # Rock Drop, Covered diff --git a/dis/objectTypes/PointObject/Obstacle/RockDrop/RockDropUncovered.py b/dis/objectTypes/PointObject/Obstacle/RockDrop/RockDropUncovered.py new file mode 100644 index 0000000..d0505ed --- /dev/null +++ b/dis/objectTypes/PointObject/Obstacle/RockDrop/RockDropUncovered.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstacle.RockDrop; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class RockDropUncovered(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(1) # Obstacle + category = UInt8(5) # Rock Drop + subCategory = UInt8(2) # Rock Drop, Uncovered diff --git a/dis/objectTypes/PointObject/Obstaclemarker/NBCHazardMarker/NBCHazardMarker.py b/dis/objectTypes/PointObject/Obstaclemarker/NBCHazardMarker/NBCHazardMarker.py new file mode 100644 index 0000000..1ad886d --- /dev/null +++ b/dis/objectTypes/PointObject/Obstaclemarker/NBCHazardMarker/NBCHazardMarker.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstaclemarker.NBCHazardMarker; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class NBCHazardMarker(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(6) # Obstacle marker + category = UInt8(2) # NBC Hazard Marker diff --git a/dis/objectTypes/PointObject/Obstaclemarker/Obstaclemarker.py b/dis/objectTypes/PointObject/Obstaclemarker/Obstaclemarker.py new file mode 100644 index 0000000..1b54e02 --- /dev/null +++ b/dis/objectTypes/PointObject/Obstaclemarker/Obstaclemarker.py @@ -0,0 +1,32 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Obstaclemarker; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Obstaclemarker(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(6) # Obstacle marker diff --git a/dis/objectTypes/PointObject/Passageway/AVLB/AVLB.py b/dis/objectTypes/PointObject/Passageway/AVLB/AVLB.py new file mode 100644 index 0000000..5927d4f --- /dev/null +++ b/dis/objectTypes/PointObject/Passageway/AVLB/AVLB.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Passageway.AVLB; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class AVLB(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(4) # Passageway + category = UInt8(2) # AVLB diff --git a/dis/objectTypes/PointObject/Passageway/AVLB/JointAssaultBridgeJAB.py b/dis/objectTypes/PointObject/Passageway/AVLB/JointAssaultBridgeJAB.py new file mode 100644 index 0000000..b4b89d3 --- /dev/null +++ b/dis/objectTypes/PointObject/Passageway/AVLB/JointAssaultBridgeJAB.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Passageway.AVLB; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class JointAssaultBridgeJAB(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(4) # Passageway + category = UInt8(2) # AVLB + subCategory = UInt8(3) # Joint Assault Bridge (JAB) diff --git a/dis/objectTypes/PointObject/Passageway/AVLB/M60A1.py b/dis/objectTypes/PointObject/Passageway/AVLB/M60A1.py new file mode 100644 index 0000000..e67ddfe --- /dev/null +++ b/dis/objectTypes/PointObject/Passageway/AVLB/M60A1.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Passageway.AVLB; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class M60A1(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(4) # Passageway + category = UInt8(2) # AVLB + subCategory = UInt8(1) # M60A1 diff --git a/dis/objectTypes/PointObject/Passageway/AVLB/MTU20.py b/dis/objectTypes/PointObject/Passageway/AVLB/MTU20.py new file mode 100644 index 0000000..fbf7009 --- /dev/null +++ b/dis/objectTypes/PointObject/Passageway/AVLB/MTU20.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Passageway.AVLB; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MTU20(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(4) # Passageway + category = UInt8(2) # AVLB + subCategory = UInt8(2) # MTU20 diff --git a/dis/objectTypes/PointObject/Passageway/AVLB/Other.py b/dis/objectTypes/PointObject/Passageway/AVLB/Other.py new file mode 100644 index 0000000..f80b17d --- /dev/null +++ b/dis/objectTypes/PointObject/Passageway/AVLB/Other.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Passageway.AVLB; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(4) # Passageway + category = UInt8(2) # AVLB + subCategory = UInt8(0) # Other diff --git a/dis/objectTypes/PointObject/Passageway/Other/Other.py b/dis/objectTypes/PointObject/Passageway/Other/Other.py new file mode 100644 index 0000000..d8400f1 --- /dev/null +++ b/dis/objectTypes/PointObject/Passageway/Other/Other.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Passageway.Other; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(4) # Passageway + category = UInt8(0) # Other diff --git a/dis/objectTypes/PointObject/Passageway/Passageway.py b/dis/objectTypes/PointObject/Passageway/Passageway.py new file mode 100644 index 0000000..bc3768d --- /dev/null +++ b/dis/objectTypes/PointObject/Passageway/Passageway.py @@ -0,0 +1,32 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Passageway; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Passageway(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(4) # Passageway diff --git a/dis/objectTypes/PointObject/Passageway/Pier/Pier.py b/dis/objectTypes/PointObject/Passageway/Pier/Pier.py new file mode 100644 index 0000000..84b1f36 --- /dev/null +++ b/dis/objectTypes/PointObject/Passageway/Pier/Pier.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Passageway.Pier; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Pier(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(4) # Passageway + category = UInt8(4) # Pier diff --git a/dis/objectTypes/PointObject/Passageway/RibbonBridge/Other.py b/dis/objectTypes/PointObject/Passageway/RibbonBridge/Other.py new file mode 100644 index 0000000..daa792b --- /dev/null +++ b/dis/objectTypes/PointObject/Passageway/RibbonBridge/Other.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Passageway.RibbonBridge; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(4) # Passageway + category = UInt8(3) # Ribbon Bridge + subCategory = UInt8(0) # Other diff --git a/dis/objectTypes/PointObject/Passageway/RibbonBridge/RibbonBridge.py b/dis/objectTypes/PointObject/Passageway/RibbonBridge/RibbonBridge.py new file mode 100644 index 0000000..59c4bff --- /dev/null +++ b/dis/objectTypes/PointObject/Passageway/RibbonBridge/RibbonBridge.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Passageway.RibbonBridge; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class RibbonBridge(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(4) # Passageway + category = UInt8(3) # Ribbon Bridge diff --git a/dis/objectTypes/PointObject/Passageway/RibbonBridge/_2Lane.py b/dis/objectTypes/PointObject/Passageway/RibbonBridge/_2Lane.py new file mode 100644 index 0000000..696e6f5 --- /dev/null +++ b/dis/objectTypes/PointObject/Passageway/RibbonBridge/_2Lane.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Passageway.RibbonBridge; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class _2Lane(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(4) # Passageway + category = UInt8(3) # Ribbon Bridge + subCategory = UInt8(1) # 2-Lane diff --git a/dis/objectTypes/PointObject/Passageway/RibbonBridge/_4Lane.py b/dis/objectTypes/PointObject/Passageway/RibbonBridge/_4Lane.py new file mode 100644 index 0000000..2c94f29 --- /dev/null +++ b/dis/objectTypes/PointObject/Passageway/RibbonBridge/_4Lane.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Passageway.RibbonBridge; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class _4Lane(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(4) # Passageway + category = UInt8(3) # Ribbon Bridge + subCategory = UInt8(2) # 4-Lane diff --git a/dis/objectTypes/PointObject/Passageway/StationaryBridge/Other.py b/dis/objectTypes/PointObject/Passageway/StationaryBridge/Other.py new file mode 100644 index 0000000..d16c321 --- /dev/null +++ b/dis/objectTypes/PointObject/Passageway/StationaryBridge/Other.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Passageway.StationaryBridge; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(4) # Passageway + category = UInt8(1) # Stationary Bridge + subCategory = UInt8(0) # Other diff --git a/dis/objectTypes/PointObject/Passageway/StationaryBridge/StationaryBridge.py b/dis/objectTypes/PointObject/Passageway/StationaryBridge/StationaryBridge.py new file mode 100644 index 0000000..abc8aca --- /dev/null +++ b/dis/objectTypes/PointObject/Passageway/StationaryBridge/StationaryBridge.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Passageway.StationaryBridge; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class StationaryBridge(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(4) # Passageway + category = UInt8(1) # Stationary Bridge diff --git a/dis/objectTypes/PointObject/Passageway/StationaryBridge/_2Lane.py b/dis/objectTypes/PointObject/Passageway/StationaryBridge/_2Lane.py new file mode 100644 index 0000000..5d63cb2 --- /dev/null +++ b/dis/objectTypes/PointObject/Passageway/StationaryBridge/_2Lane.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Passageway.StationaryBridge; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class _2Lane(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(4) # Passageway + category = UInt8(1) # Stationary Bridge + subCategory = UInt8(1) # 2-Lane diff --git a/dis/objectTypes/PointObject/Passageway/StationaryBridge/_4Lane.py b/dis/objectTypes/PointObject/Passageway/StationaryBridge/_4Lane.py new file mode 100644 index 0000000..8ea09a2 --- /dev/null +++ b/dis/objectTypes/PointObject/Passageway/StationaryBridge/_4Lane.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Passageway.StationaryBridge; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class _4Lane(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(4) # Passageway + category = UInt8(1) # Stationary Bridge + subCategory = UInt8(2) # 4-Lane diff --git a/dis/objectTypes/PointObject/PointObject.py b/dis/objectTypes/PointObject/PointObject.py new file mode 100644 index 0000000..f02a6a2 --- /dev/null +++ b/dis/objectTypes/PointObject/PointObject.py @@ -0,0 +1,31 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class PointObject(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject diff --git a/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/CoveredMachineGunBunker.py b/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/CoveredMachineGunBunker.py new file mode 100644 index 0000000..b5c6caf --- /dev/null +++ b/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/CoveredMachineGunBunker.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Preparedposition.InfantryFightingPosition; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class CoveredMachineGunBunker(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(2) # Prepared position + category = UInt8(2) # Infantry Fighting Position + subCategory = UInt8(1) # Covered Machine Gun Bunker diff --git a/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/HastyFightingPosition.py b/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/HastyFightingPosition.py new file mode 100644 index 0000000..638deae --- /dev/null +++ b/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/HastyFightingPosition.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Preparedposition.InfantryFightingPosition; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class HastyFightingPosition(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(2) # Prepared position + category = UInt8(2) # Infantry Fighting Position + subCategory = UInt8(5) # Hasty Fighting Position diff --git a/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/InfantryFightingPosition.py b/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/InfantryFightingPosition.py new file mode 100644 index 0000000..d6f3f1d --- /dev/null +++ b/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/InfantryFightingPosition.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Preparedposition.InfantryFightingPosition; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class InfantryFightingPosition(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(2) # Prepared position + category = UInt8(2) # Infantry Fighting Position diff --git a/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/NonCoveredInfantryPosition.py b/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/NonCoveredInfantryPosition.py new file mode 100644 index 0000000..aeea101 --- /dev/null +++ b/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/NonCoveredInfantryPosition.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Preparedposition.InfantryFightingPosition; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class NonCoveredInfantryPosition(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(2) # Prepared position + category = UInt8(2) # Infantry Fighting Position + subCategory = UInt8(3) # Non-Covered Infantry Position diff --git a/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/NonCoveredMachineGunBunker.py b/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/NonCoveredMachineGunBunker.py new file mode 100644 index 0000000..216ee07 --- /dev/null +++ b/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/NonCoveredMachineGunBunker.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Preparedposition.InfantryFightingPosition; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class NonCoveredMachineGunBunker(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(2) # Prepared position + category = UInt8(2) # Infantry Fighting Position + subCategory = UInt8(4) # Non-Covered Machine Gun Bunker diff --git a/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/Other.py b/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/Other.py new file mode 100644 index 0000000..67ca71a --- /dev/null +++ b/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/Other.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Preparedposition.InfantryFightingPosition; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(2) # Prepared position + category = UInt8(2) # Infantry Fighting Position + subCategory = UInt8(0) # Other diff --git a/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/OverheadCoveredInfantryPosition.py b/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/OverheadCoveredInfantryPosition.py new file mode 100644 index 0000000..c8fd2b3 --- /dev/null +++ b/dis/objectTypes/PointObject/Preparedposition/InfantryFightingPosition/OverheadCoveredInfantryPosition.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Preparedposition.InfantryFightingPosition; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class OverheadCoveredInfantryPosition(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(2) # Prepared position + category = UInt8(2) # Infantry Fighting Position + subCategory = UInt8(2) # Overhead Covered Infantry Position diff --git a/dis/objectTypes/PointObject/Preparedposition/Other/Other.py b/dis/objectTypes/PointObject/Preparedposition/Other/Other.py new file mode 100644 index 0000000..5832871 --- /dev/null +++ b/dis/objectTypes/PointObject/Preparedposition/Other/Other.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Preparedposition.Other; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(2) # Prepared position + category = UInt8(0) # Other diff --git a/dis/objectTypes/PointObject/Preparedposition/Preparedposition.py b/dis/objectTypes/PointObject/Preparedposition/Preparedposition.py new file mode 100644 index 0000000..7faafd9 --- /dev/null +++ b/dis/objectTypes/PointObject/Preparedposition/Preparedposition.py @@ -0,0 +1,32 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Preparedposition; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Preparedposition(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(2) # Prepared position diff --git a/dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/ArmoredVehicle.py b/dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/ArmoredVehicle.py new file mode 100644 index 0000000..7e9ba0f --- /dev/null +++ b/dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/ArmoredVehicle.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Preparedposition.VehicleDefilade; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class ArmoredVehicle(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(2) # Prepared position + category = UInt8(1) # Vehicle Defilade + subCategory = UInt8(1) # Armored Vehicle diff --git a/dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/FightingVehicle.py b/dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/FightingVehicle.py new file mode 100644 index 0000000..f074679 --- /dev/null +++ b/dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/FightingVehicle.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Preparedposition.VehicleDefilade; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class FightingVehicle(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(2) # Prepared position + category = UInt8(1) # Vehicle Defilade + subCategory = UInt8(2) # Fighting Vehicle diff --git a/dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/MortarCarrier.py b/dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/MortarCarrier.py new file mode 100644 index 0000000..5db77c5 --- /dev/null +++ b/dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/MortarCarrier.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Preparedposition.VehicleDefilade; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class MortarCarrier(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(2) # Prepared position + category = UInt8(1) # Vehicle Defilade + subCategory = UInt8(3) # Mortar Carrier diff --git a/dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/Other.py b/dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/Other.py new file mode 100644 index 0000000..679a16a --- /dev/null +++ b/dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/Other.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Preparedposition.VehicleDefilade; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(2) # Prepared position + category = UInt8(1) # Vehicle Defilade + subCategory = UInt8(0) # Other diff --git a/dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/Tank.py b/dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/Tank.py new file mode 100644 index 0000000..9909c79 --- /dev/null +++ b/dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/Tank.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Preparedposition.VehicleDefilade; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Tank(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(2) # Prepared position + category = UInt8(1) # Vehicle Defilade + subCategory = UInt8(4) # Tank diff --git a/dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/VehicleDefilade.py b/dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/VehicleDefilade.py new file mode 100644 index 0000000..edae3f9 --- /dev/null +++ b/dis/objectTypes/PointObject/Preparedposition/VehicleDefilade/VehicleDefilade.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Preparedposition.VehicleDefilade; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class VehicleDefilade(ObjectType): + def __init__(self): + domain = PlatformDomain(1) # PointObject + objectKind = ObjectKind(2) # Prepared position + category = UInt8(1) # Vehicle Defilade diff --git a/dis/objectTypes/PointObject/Tacticalsmoke/AirBurst/AirBurst.py b/dis/objectTypes/PointObject/Tacticalsmoke/AirBurst/AirBurst.py new file mode 100644 index 0000000..5eb6766 --- /dev/null +++ b/dis/objectTypes/PointObject/Tacticalsmoke/AirBurst/AirBurst.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Tacticalsmoke.AirBurst; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class AirBurst(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # PointObject + objectKind = ObjectKind(5) # Tactical smoke + category = UInt8(2) # Air Burst diff --git a/dis/objectTypes/PointObject/Tacticalsmoke/AirBurst/Grenade.py b/dis/objectTypes/PointObject/Tacticalsmoke/AirBurst/Grenade.py new file mode 100644 index 0000000..41b9b4b --- /dev/null +++ b/dis/objectTypes/PointObject/Tacticalsmoke/AirBurst/Grenade.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Tacticalsmoke.AirBurst; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Grenade(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # PointObject + objectKind = ObjectKind(5) # Tactical smoke + category = UInt8(2) # Air Burst + subCategory = UInt8(1) # Grenade diff --git a/dis/objectTypes/PointObject/Tacticalsmoke/AirBurst/Other.py b/dis/objectTypes/PointObject/Tacticalsmoke/AirBurst/Other.py new file mode 100644 index 0000000..a30fde7 --- /dev/null +++ b/dis/objectTypes/PointObject/Tacticalsmoke/AirBurst/Other.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Tacticalsmoke.AirBurst; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # PointObject + objectKind = ObjectKind(5) # Tactical smoke + category = UInt8(2) # Air Burst + subCategory = UInt8(0) # Other diff --git a/dis/objectTypes/PointObject/Tacticalsmoke/GroundBurst/Artillery.py b/dis/objectTypes/PointObject/Tacticalsmoke/GroundBurst/Artillery.py new file mode 100644 index 0000000..cc10e7f --- /dev/null +++ b/dis/objectTypes/PointObject/Tacticalsmoke/GroundBurst/Artillery.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Tacticalsmoke.GroundBurst; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Artillery(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # PointObject + objectKind = ObjectKind(5) # Tactical smoke + category = UInt8(1) # Ground Burst + subCategory = UInt8(1) # Artillery diff --git a/dis/objectTypes/PointObject/Tacticalsmoke/GroundBurst/GroundBurst.py b/dis/objectTypes/PointObject/Tacticalsmoke/GroundBurst/GroundBurst.py new file mode 100644 index 0000000..5257343 --- /dev/null +++ b/dis/objectTypes/PointObject/Tacticalsmoke/GroundBurst/GroundBurst.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Tacticalsmoke.GroundBurst; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class GroundBurst(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # PointObject + objectKind = ObjectKind(5) # Tactical smoke + category = UInt8(1) # Ground Burst diff --git a/dis/objectTypes/PointObject/Tacticalsmoke/GroundBurst/Other.py b/dis/objectTypes/PointObject/Tacticalsmoke/GroundBurst/Other.py new file mode 100644 index 0000000..f444b37 --- /dev/null +++ b/dis/objectTypes/PointObject/Tacticalsmoke/GroundBurst/Other.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Tacticalsmoke.GroundBurst; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # PointObject + objectKind = ObjectKind(5) # Tactical smoke + category = UInt8(1) # Ground Burst + subCategory = UInt8(0) # Other diff --git a/dis/objectTypes/PointObject/Tacticalsmoke/Other/Other.py b/dis/objectTypes/PointObject/Tacticalsmoke/Other/Other.py new file mode 100644 index 0000000..ad22bc8 --- /dev/null +++ b/dis/objectTypes/PointObject/Tacticalsmoke/Other/Other.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Tacticalsmoke.Other; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Other(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # PointObject + objectKind = ObjectKind(5) # Tactical smoke + category = UInt8(0) # Other diff --git a/dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M18Green.py b/dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M18Green.py new file mode 100644 index 0000000..cc0ce2c --- /dev/null +++ b/dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M18Green.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Tacticalsmoke.TacticalSmokeCanister; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class M18Green(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # PointObject + objectKind = ObjectKind(5) # Tactical smoke + category = UInt8(3) # Tactical Smoke, Canister + subCategory = UInt8(2) # M18, Green diff --git a/dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M18Red.py b/dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M18Red.py new file mode 100644 index 0000000..736568b --- /dev/null +++ b/dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M18Red.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Tacticalsmoke.TacticalSmokeCanister; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class M18Red(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # PointObject + objectKind = ObjectKind(5) # Tactical smoke + category = UInt8(3) # Tactical Smoke, Canister + subCategory = UInt8(5) # M18, Red diff --git a/dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M18Violet.py b/dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M18Violet.py new file mode 100644 index 0000000..62bb23d --- /dev/null +++ b/dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M18Violet.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Tacticalsmoke.TacticalSmokeCanister; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class M18Violet(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # PointObject + objectKind = ObjectKind(5) # Tactical smoke + category = UInt8(3) # Tactical Smoke, Canister + subCategory = UInt8(3) # M18, Violet diff --git a/dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M18Yellow.py b/dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M18Yellow.py new file mode 100644 index 0000000..02ee420 --- /dev/null +++ b/dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M18Yellow.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Tacticalsmoke.TacticalSmokeCanister; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class M18Yellow(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # PointObject + objectKind = ObjectKind(5) # Tactical smoke + category = UInt8(3) # Tactical Smoke, Canister + subCategory = UInt8(4) # M18, Yellow diff --git a/dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M83White.py b/dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M83White.py new file mode 100644 index 0000000..6223c4d --- /dev/null +++ b/dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/M83White.py @@ -0,0 +1,34 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Tacticalsmoke.TacticalSmokeCanister; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class M83White(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # PointObject + objectKind = ObjectKind(5) # Tactical smoke + category = UInt8(3) # Tactical Smoke, Canister + subCategory = UInt8(1) # M83, White diff --git a/dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/TacticalSmokeCanister.py b/dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/TacticalSmokeCanister.py new file mode 100644 index 0000000..afc278c --- /dev/null +++ b/dis/objectTypes/PointObject/Tacticalsmoke/TacticalSmokeCanister/TacticalSmokeCanister.py @@ -0,0 +1,33 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Tacticalsmoke.TacticalSmokeCanister; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class TacticalSmokeCanister(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # PointObject + objectKind = ObjectKind(5) # Tactical smoke + category = UInt8(3) # Tactical Smoke, Canister diff --git a/dis/objectTypes/PointObject/Tacticalsmoke/Tacticalsmoke.py b/dis/objectTypes/PointObject/Tacticalsmoke/Tacticalsmoke.py new file mode 100644 index 0000000..41da344 --- /dev/null +++ b/dis/objectTypes/PointObject/Tacticalsmoke/Tacticalsmoke.py @@ -0,0 +1,32 @@ +""" +/** + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ +// header autogenerated using string template dis7javalicense.txt + +""" + + +from ObjectType import ObjectType +from PlatformDomain import PlatformDomain +from ObjectKind import ObjectKind + +import ctypes +UInt8 = ctypes.c_uint8 + +""" +/** + * autogenerated using string template objecttype.txt + * package edu.nps.moves.dis7.enumerations.PointObject.Tacticalsmoke; + * SISO-REF-010-v34 (2024-10-15) + * + * ObjectType uid: 226 + */ +""" + +class Tacticalsmoke(ObjectType): + def __init__(self): + domain = PlatformDomain(0) # PointObject + objectKind = ObjectKind(5) # Tactical smoke diff --git a/dis/object_identifier.py b/dis/object_identifier.py new file mode 100644 index 0000000..7d53154 --- /dev/null +++ b/dis/object_identifier.py @@ -0,0 +1,90 @@ +from enum import Enum + +from .simulation_address import SimulationAddress + +class ObjectIdentifier( object ): + """The unique designation of an environmental object. Section 6.2.63""" + + def __init__(self): + """ Initializer for ObjectIdentifier""" + """ Simulation Address""" + self.simulationAddress = SimulationAddress() + """ object number""" + self.objectNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "SimulationAddress :" + "\n" + self.simulationAddress.to_string() + "\n" + outputString += "ObjectNumber : " + str(self.objectNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.simulationAddress.serialize(outputStream) + outputStream.write_short(int(self.objectNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.simulationAddress.parse(inputStream) + self.objectNumber = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/object_type.py b/dis/object_type.py new file mode 100644 index 0000000..26d8fa5 --- /dev/null +++ b/dis/object_type.py @@ -0,0 +1,103 @@ +from enum import Enum + +from .siso_ref_010.enums.platform_domain import PlatformDomain +from .siso_ref_010.enums.object_kind import ObjectKind + +class ObjectType( object ): + """The unique designation of an environmental object. Section 6.2.64""" + + def __init__(self): + """ Initializer for ObjectType""" + # /** Domain of entity (air, surface, subsurface, space, etc.) uid 8 */ + self.domain = PlatformDomain.default + + # /** country to which the design of the entity is attributed uid 225 */ + self.objectKind = ObjectKind.default + + """ category of entity""" + self.category = 0 + """ subcategory of entity""" + self.subCategory = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "PlatformDomain : " + self.domain.get_description + "(" + (str(int(self.domain))) + ")" + "\n" + outputString += "ObjectKind : " + self.objectKind.get_description + "(" + (str(int(self.objectKind))) + ")" + "\n" + outputString += "Category : " + str(self.category) + "\n" + outputString += "SubCategory : " + str(self.subCategory) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.domain,outputStream) + self.serialize_enum(self.objectKind,outputStream) + outputStream.write_byte(int(self.category)) + outputStream.write_byte(int(self.subCategory)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.domain = PlatformDomain.get_enum(self.parse_enum(self.domain,inputStream)) + self.objectKind = ObjectKind.get_enum(self.parse_enum(self.objectKind,inputStream)) + self.category = inputStream.read_byte() + self.subCategory = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/ownership_status_record.py b/dis/ownership_status_record.py new file mode 100644 index 0000000..7144263 --- /dev/null +++ b/dis/ownership_status_record.py @@ -0,0 +1,97 @@ +from enum import Enum + +from .siso_ref_010.enums.ownership_status import OwnershipStatus +from .entity_id import EntityID + +class OwnershipStatusRecord( object ): + """used to convey entity and conflict status information associated with transferring ownership of an entity. Section 6.2.65""" + + def __init__(self): + """ Initializer for OwnershipStatusRecord""" + """ EntityID""" + self.entityId = EntityID() + # /** The ownership and/or ownership conflict status of the entity represented by the Entity ID field. uid 332 */ + self.ownershipStatus = OwnershipStatus.default + + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "EntityId :" + "\n" + self.entityId.to_string() + "\n" + outputString += "OwnershipStatus : " + self.ownershipStatus.get_description + "(" + (str(int(self.ownershipStatus))) + ")" + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.entityId.serialize(outputStream) + self.serialize_enum(self.ownershipStatus,outputStream) + outputStream.write_byte(int(self.padding)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.entityId.parse(inputStream) + self.ownershipStatus = OwnershipStatus.get_enum(self.parse_enum(self.ownershipStatus,inputStream)) + self.padding = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/pdu.py b/dis/pdu.py new file mode 100644 index 0000000..69c45c2 --- /dev/null +++ b/dis/pdu.py @@ -0,0 +1,115 @@ +from enum import Enum + +from .siso_ref_010.enums.disprotocol_version import DISProtocolVersion +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .siso_ref_010.enums.disprotocol_family import DISProtocolFamily + +class Pdu( object ): + """Base class of PduBase and LiveEntityPdu""" + + def __init__(self): + """ Initializer for Pdu""" + # /** The version of the protocol. 5=DIS-1995, 6=DIS-1998, 7=DIS-2012 uid 3 */ + self.protocolVersion = DISProtocolVersion.ieee_12781_2012 + + """ Exercise ID provides a unique identifier""" + self.exerciseID = 0 + # /** Type of pdu, unique for each PDU class uid 4 */ + self.pduType = DisPduType.default + + # /** value that refers to the protocol family, eg SimulationManagement, et uid 5 */ + self.protocolFamily = DISProtocolFamily.default + + """ Timestamp value, int representing number of 1.675 microseconds as interval past hour""" + self.timestamp = 0 + """ Length, in bytes, of the PDU""" + self.length = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "DISProtocolVersion : " + self.protocolVersion.get_description + "(" + (str(int(self.protocolVersion))) + ")" + "\n" + outputString += "ExerciseID : " + str(self.exerciseID) + "\n" + outputString += "DisPduType : " + self.pduType.get_description + "(" + (str(int(self.pduType))) + ")" + "\n" + outputString += "DISProtocolFamily : " + self.protocolFamily.get_description + "(" + (str(int(self.protocolFamily))) + ")" + "\n" + outputString += "Timestamp : " + str(self.timestamp) + "\n" + outputString += "Length : " + str(self.length) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.protocolVersion,outputStream) + outputStream.write_byte(int(self.exerciseID)) + self.serialize_enum(self.pduType,outputStream) + self.serialize_enum(self.protocolFamily,outputStream) + outputStream.write_int(int(self.timestamp)) + outputStream.write_short(int(self.length)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.protocolVersion = DISProtocolVersion.get_enum(self.parse_enum(self.protocolVersion,inputStream)) + self.exerciseID = inputStream.read_byte() + self.pduType = DisPduType.get_enum(self.parse_enum(self.pduType,inputStream)) + self.protocolFamily = DISProtocolFamily.get_enum(self.parse_enum(self.protocolFamily,inputStream)) + self.timestamp = inputStream.read_int() + self.length = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/pdu_base.py b/dis/pdu_base.py new file mode 100644 index 0000000..13cafdf --- /dev/null +++ b/dis/pdu_base.py @@ -0,0 +1,95 @@ +from enum import Enum + +from .pdu import Pdu +from .pdu_status import PduStatus + +class PduBase( Pdu ): + """The superclass for all PDUs except LiveEntity. This incorporates the PduHeader record, section 7.2.2""" + + def __init__(self): + """ Initializer for PduBase""" + super().__init__() + """ PDU Status Record. Described in 6.2.67. This field is not present in earlier DIS versions """ + self.pduStatus = PduStatus() + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "PduStatus :" + "\n" + self.pduStatus.to_string() + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( PduBase, self ).serialize(outputStream) + self.pduStatus.serialize(outputStream) + outputStream.write_byte(int(self.padding)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( PduBase, self).parse(inputStream) + self.pduStatus.parse(inputStream) + self.padding = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/pdu_status.py b/dis/pdu_status.py new file mode 100644 index 0000000..6b7dbf1 --- /dev/null +++ b/dis/pdu_status.py @@ -0,0 +1,84 @@ +from enum import Enum + + +class PduStatus( object ): + """PduStatus provides a set of bit-masked indicator values, section 6.2.67. Bit fields include Transferred Entity Indicator (TEI), LVC Indicator (LVC), Coupled Extension Indicator (CEI), Fire Type Indicator (FTI), Detonation Type Indicator (DTI), Radio Attached Indicator (RAI), Intercom Attached Indicator (IAI), IFF Simulation Mode (ISM) and Active Interrogation Indicator (AII).""" + + def __init__(self): + """ Initializer for PduStatus""" + """ PDU Status Record value containing bitmasked field""" + self.value = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "Value : " + str(self.value) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_byte(int(self.value)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.value = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 1 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/point_object_state_pdu.py b/dis/point_object_state_pdu.py new file mode 100644 index 0000000..455d61c --- /dev/null +++ b/dis/point_object_state_pdu.py @@ -0,0 +1,167 @@ +from enum import Enum + +from .siso_ref_010.enums.force_id import ForceID +from .siso_ref_010.enums.object_state_modification_point_object import ObjectStateModificationPointObject +from .object_identifier import ObjectIdentifier +from .euler_angles import EulerAngles +from .siso_ref_010.enums.object_state_appearance_general import ObjectStateAppearanceGeneral +from .object_type import ObjectType +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .synthetic_environment_family_pdu import SyntheticEnvironmentFamilyPdu +from .vector3double import Vector3Double +from .entity_id import EntityID +from .simulation_address import SimulationAddress + +class PointObjectStatePdu( SyntheticEnvironmentFamilyPdu ): + """7.10.4 Used to communicate detailed information about the addition/modification of a synthetic environment object that is geometrically anchored to the terrain with a single point.""" + + def __init__(self): + """ Initializer for PointObjectStatePdu""" + super().__init__() + """ Object in synthetic environment""" + self.objectID = EntityID() + """ Object with which this point object is associated""" + self.referencedObjectID = ObjectIdentifier() + """ unique update number of each state transition of an object""" + self.updateNumber = 0 + # /** force ID provides a unique identifier uid 6 */ + self.forceID = ForceID.default + + # modifications uid 240 + self.modifications = ObjectStateModificationPointObject() + + """ Object type""" + self.objectType = ObjectType() + """ Object location""" + self.objectLocation = Vector3Double() + """ Object orientation""" + self.objectOrientation = EulerAngles() + """ Specific object apperance""" + self.specificObjectAppearance = 0 + # General object apperance uid 229 + self.generObjectAppearance = ObjectStateAppearanceGeneral() + + self.padding1 = 0 + """ requesterID""" + self.requesterID = SimulationAddress() + """ receiver ID provides a unique identifier""" + self.receivingID = SimulationAddress() + """ padding""" + self.pad2 = 0 + self.pduType = DisPduType.point_object_state + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "ObjectID :" + "\n" + self.objectID.to_string() + "\n" + outputString += "ReferencedObjectID :" + "\n" + self.referencedObjectID.to_string() + "\n" + outputString += "UpdateNumber : " + str(self.updateNumber) + "\n" + outputString += "ForceID : " + self.forceID.get_description + "(" + (str(int(self.forceID))) + ")" + "\n" + outputString += "ObjectStateModificationPointObject : " + str(self.modifications) + "\n" + outputString += "ObjectType :" + "\n" + self.objectType.to_string() + "\n" + outputString += "ObjectLocation :" + "\n" + self.objectLocation.to_string() + "\n" + outputString += "ObjectOrientation :" + "\n" + self.objectOrientation.to_string() + "\n" + outputString += "SpecificObjectAppearance : " + str(self.specificObjectAppearance) + "\n" + outputString += "ObjectStateAppearanceGeneral : " + str(self.generObjectAppearance) + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "RequesterID :" + "\n" + self.requesterID.to_string() + "\n" + outputString += "ReceivingID :" + "\n" + self.receivingID.to_string() + "\n" + outputString += "Pad2 : " + str(self.pad2) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( PointObjectStatePdu, self ).serialize(outputStream) + self.objectID.serialize(outputStream) + self.referencedObjectID.serialize(outputStream) + outputStream.write_int(int(self.updateNumber)) + self.serialize_enum(self.forceID,outputStream) + outputStream.write_unsigned_int(int(self.modifications.asbyte)) + self.objectType.serialize(outputStream) + self.objectLocation.serialize(outputStream) + self.objectOrientation.serialize(outputStream) + outputStream.write_int(int(self.specificObjectAppearance)) + outputStream.write_unsigned_int(int(self.generObjectAppearance.asbyte)) + outputStream.write_short(int(self.padding1)) + self.requesterID.serialize(outputStream) + self.receivingID.serialize(outputStream) + outputStream.write_int(int(self.pad2)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( PointObjectStatePdu, self).parse(inputStream) + self.objectID.parse(inputStream) + self.referencedObjectID.parse(inputStream) + self.updateNumber = inputStream.read_int() + self.forceID = ForceID.get_enum(self.parse_enum(self.forceID,inputStream)) + self.modifications.asbyte = inputStream.read_unsigned_int() + self.objectType.parse(inputStream) + self.objectLocation.parse(inputStream) + self.objectOrientation.parse(inputStream) + self.specificObjectAppearance = inputStream.read_int() + self.generObjectAppearance.asbyte = inputStream.read_unsigned_int() + self.padding1 = inputStream.read_short() + self.requesterID.parse(inputStream) + self.receivingID.parse(inputStream) + self.pad2 = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 14 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/propulsion_system_data.py b/dis/propulsion_system_data.py new file mode 100644 index 0000000..cda5a4d --- /dev/null +++ b/dis/propulsion_system_data.py @@ -0,0 +1,89 @@ +from enum import Enum + + +class PropulsionSystemData( object ): + """contains information describing the propulsion systems of the entity. This information shall be provided for each active propulsion system defined. Section 6.2.68""" + + def __init__(self): + """ Initializer for PropulsionSystemData""" + """ powerSetting""" + self.powerSetting = 0.0 + """ engine RPMs""" + self.engineRpm = 0.0 + + def to_string(self) ->str: + outputString = "" + outputString += "PowerSetting : " + str(self.powerSetting) + "\n" + outputString += "EngineRpm : " + str(self.engineRpm) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_float(int(self.powerSetting)) + outputStream.write_float(int(self.engineRpm)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.powerSetting = inputStream.read_float() + self.engineRpm = inputStream.read_float() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/protocol_mode.py b/dis/protocol_mode.py new file mode 100644 index 0000000..0a681eb --- /dev/null +++ b/dis/protocol_mode.py @@ -0,0 +1,84 @@ +from enum import Enum + + +class ProtocolMode( object ): + """Bit field used to identify minefield data. bits 14-15 are a 2-bit enum, other bits unused. Section 6.2.69""" + + def __init__(self): + """ Initializer for ProtocolMode""" + """ Bitfields, 14-15 contain an enum, uid 336""" + self.protocolMode = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "ProtocolMode : " + str(self.protocolMode) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.protocolMode)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.protocolMode = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 1 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/radio_comms_header.py b/dis/radio_comms_header.py new file mode 100644 index 0000000..b54a6d1 --- /dev/null +++ b/dis/radio_comms_header.py @@ -0,0 +1,90 @@ +from enum import Enum + +from .entity_id import EntityID + +class RadioCommsHeader( object ): + """Common PDU fields for Radio Communications family""" + + def __init__(self): + """ Initializer for RadioCommsHeader""" + """ ID of the entitythat is the source of the communication""" + self.radioReferenceID = EntityID() + """ particular radio within an entity""" + self.radioNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "RadioReferenceID :" + "\n" + self.radioReferenceID.to_string() + "\n" + outputString += "RadioNumber : " + str(self.radioNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.radioReferenceID.serialize(outputStream) + outputStream.write_short(int(self.radioNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.radioReferenceID.parse(inputStream) + self.radioNumber = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/radio_communications_family_pdu.py b/dis/radio_communications_family_pdu.py new file mode 100644 index 0000000..f49ecd8 --- /dev/null +++ b/dis/radio_communications_family_pdu.py @@ -0,0 +1,88 @@ +from enum import Enum + +from .pdu_base import PduBase +from .siso_ref_010.enums.disprotocol_family import DISProtocolFamily + +class RadioCommunicationsFamilyPdu( PduBase ): + """ Abstract superclass for radio communications PDUs. Section 7.7""" + + def __init__(self): + """ Initializer for RadioCommunicationsFamilyPdu""" + super().__init__() + self.protocolFamily = DISProtocolFamily.radio_communications + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( RadioCommunicationsFamilyPdu, self ).serialize(outputStream) + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( RadioCommunicationsFamilyPdu, self).parse(inputStream) + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/radio_identifier.py b/dis/radio_identifier.py new file mode 100644 index 0000000..6db8d11 --- /dev/null +++ b/dis/radio_identifier.py @@ -0,0 +1,99 @@ +from enum import Enum + + +class RadioIdentifier( object ): + """The unique designation of an attached or unattached radio in an event or exercise Section 6.2.70""" + + def __init__(self): + """ Initializer for RadioIdentifier""" + """ site""" + self.siteNumber = 0 + """ application number""" + self.applicationNumber = 0 + """ reference number""" + self.referenceNumber = 0 + """ Radio number""" + self.radioNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "SiteNumber : " + str(self.siteNumber) + "\n" + outputString += "ApplicationNumber : " + str(self.applicationNumber) + "\n" + outputString += "ReferenceNumber : " + str(self.referenceNumber) + "\n" + outputString += "RadioNumber : " + str(self.radioNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.siteNumber)) + outputStream.write_short(int(self.applicationNumber)) + outputStream.write_short(int(self.referenceNumber)) + outputStream.write_short(int(self.radioNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.siteNumber = inputStream.read_short() + self.applicationNumber = inputStream.read_short() + self.referenceNumber = inputStream.read_short() + self.radioNumber = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/radio_type.py b/dis/radio_type.py new file mode 100644 index 0000000..a03632b --- /dev/null +++ b/dis/radio_type.py @@ -0,0 +1,120 @@ +from enum import Enum + +from .siso_ref_010.enums.entity_kind import EntityKind +from .siso_ref_010.enums.radio_category import RadioCategory +from .siso_ref_010.enums.radio_subcategory import RadioSubcategory +from .siso_ref_010.enums.country import Country + +class RadioType( object ): + """Identifies the type of radio. Section 6.2.71""" + + def __init__(self): + """ Initializer for RadioType""" + # /** Kind of entity uid 7 */ + self.entityKind = EntityKind.radio + + """ Domain of entity (air, surface, subsurface, space, etc.)""" + self.domain = 0 + # /** country to which the design of the entity is attributed uid 29 */ + self.country = Country.default + + # /** category of entity uid 22 */ + self.category = RadioCategory.default + + # /** specific info based on subcategory field uid 23 */ + self.subcategory = RadioSubcategory.default + + self.specific = 0 + self.extra = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "EntityKind : " + self.entityKind.get_description + "(" + (str(int(self.entityKind))) + ")" + "\n" + outputString += "Domain : " + str(self.domain) + "\n" + outputString += "Country : " + self.country.get_description + "(" + (str(int(self.country))) + ")" + "\n" + outputString += "RadioCategory : " + self.category.get_description + "(" + (str(int(self.category))) + ")" + "\n" + outputString += "RadioSubcategory : " + self.subcategory.get_description + "(" + (str(int(self.subcategory))) + ")" + "\n" + outputString += "Specific : " + str(self.specific) + "\n" + outputString += "Extra : " + str(self.extra) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.entityKind,outputStream) + outputStream.write_byte(int(self.domain)) + self.serialize_enum(self.country,outputStream) + self.serialize_enum(self.category,outputStream) + self.serialize_enum(self.subcategory,outputStream) + outputStream.write_byte(int(self.specific)) + outputStream.write_byte(int(self.extra)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.entityKind = EntityKind.get_enum(self.parse_enum(self.entityKind,inputStream)) + self.domain = inputStream.read_byte() + self.country = Country.get_enum(self.parse_enum(self.country,inputStream)) + self.category = RadioCategory.get_enum(self.parse_enum(self.category,inputStream)) + self.subcategory = RadioSubcategory.get_enum(self.parse_enum(self.subcategory,inputStream)) + self.specific = inputStream.read_byte() + self.extra = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 7 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/receiver_pdu.py b/dis/receiver_pdu.py new file mode 100644 index 0000000..2d9ce91 --- /dev/null +++ b/dis/receiver_pdu.py @@ -0,0 +1,119 @@ +from enum import Enum + +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .radio_communications_family_pdu import RadioCommunicationsFamilyPdu +from .siso_ref_010.enums.receiver_receiver_state import ReceiverReceiverState +from .entity_id import EntityID +from .radio_comms_header import RadioCommsHeader + +class ReceiverPdu( RadioCommunicationsFamilyPdu ): + """5.8.5 Communicates the state of a particular radio receiver. Its primary application is in communicating state information to radio network monitors, data loggers, and similar applications for use in debugging, supervision, and after-action review.""" + + def __init__(self): + """ Initializer for ReceiverPdu""" + super().__init__() + # header is an undescribed parameter... + self.header = RadioCommsHeader() + # /** encoding scheme used, and enumeration uid 179 */ + self.receiverState = ReceiverReceiverState.default + + self.padding1 = 0 + """ received power""" + self.receivedPower = 0.0 + """ ID of transmitter""" + self.transmitterEntityId = EntityID() + """ ID of transmitting radio""" + self.transmitterRadioId = 0 + self.pduType = DisPduType.receiver + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "Header :" + "\n" + self.header.to_string() + "\n" + outputString += "ReceiverReceiverState : " + self.receiverState.get_description + "(" + (str(int(self.receiverState))) + ")" + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "ReceivedPower : " + str(self.receivedPower) + "\n" + outputString += "TransmitterEntityId :" + "\n" + self.transmitterEntityId.to_string() + "\n" + outputString += "TransmitterRadioId : " + str(self.transmitterRadioId) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( ReceiverPdu, self ).serialize(outputStream) + self.header.serialize(outputStream) + self.serialize_enum(self.receiverState,outputStream) + outputStream.write_short(int(self.padding1)) + outputStream.write_float(int(self.receivedPower)) + self.transmitterEntityId.serialize(outputStream) + outputStream.write_short(int(self.transmitterRadioId)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( ReceiverPdu, self).parse(inputStream) + self.header.parse(inputStream) + self.receiverState = ReceiverReceiverState.get_enum(self.parse_enum(self.receiverState,inputStream)) + self.padding1 = inputStream.read_short() + self.receivedPower = inputStream.read_float() + self.transmitterEntityId.parse(inputStream) + self.transmitterRadioId = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/record_query_reliable_pdu.py b/dis/record_query_reliable_pdu.py new file mode 100644 index 0000000..9ec8d26 --- /dev/null +++ b/dis/record_query_reliable_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class RecordQueryReliablePdu( object ): + """Alias, more descriptive name for RecordQueryRPdu.""" + + def __init__(self): + """ Initializer for RecordQueryReliablePdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/record_query_rpdu.py b/dis/record_query_rpdu.py new file mode 100644 index 0000000..50118e1 --- /dev/null +++ b/dis/record_query_rpdu.py @@ -0,0 +1,171 @@ +from enum import Enum + +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .siso_ref_010.enums.required_reliability_service import RequiredReliabilityService +from .siso_ref_010.enums.record_query_revent_type import RecordQueryREventType +from .simulation_management_with_reliability_family_pdu import SimulationManagementWithReliabilityFamilyPdu +from .record_query_specification import RecordQuerySpecification + +class RecordQueryRPdu( SimulationManagementWithReliabilityFamilyPdu ): + """5.12.4.14 Used to communicate a request for data in record format.""" + + def __init__(self): + """ Initializer for RecordQueryRPdu""" + super().__init__() + """ request ID provides a unique identifier""" + self.requestID = 0 + # /** level of reliability service used for this transaction uid 74 */ + self.requiredReliabilityService = RequiredReliabilityService.default + + """ padding""" + self.pad1 = 0 + # /** event type uid 334 */ + self.eventType = RecordQueryREventType.default + + """ time""" + self.time = 0 + """ numberOfRecords""" + self.numberOfRecords = 0 + """ record IDs""" + self._recordIDs = [] + self.pduType = DisPduType.record_query_reliable + + + def get_numberOfRecords(self): + return len(self._recordIDs) + def set_numberOfRecords(self, value): + numberOfRecords = value + + + def get_recordIDs(self): + return self._recordIDs + def set_recordIDs(self, value): + self._recordIDs = value + recordIDs = property(get_recordIDs, set_recordIDs) + + + def add_recordIDs(self, value : RecordQuerySpecification): + self._recordIDs.append(value) + + + """ + /// Name : recordIDs + /// UID : + /// Type : RecordQuerySpecification + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : record IDs + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RequestID : " + str(self.requestID) + "\n" + outputString += "RequiredReliabilityService : " + self.requiredReliabilityService.get_description + "(" + (str(int(self.requiredReliabilityService))) + ")" + "\n" + outputString += "Pad1 : " + str(self.pad1) + "\n" + outputString += "RecordQueryREventType : " + self.eventType.get_description + "(" + (str(int(self.eventType))) + ")" + "\n" + outputString += "Time : " + str(self.time) + "\n" + outputString += "NumberOfRecords : " + str(len(self._recordIDs)) + "\n" + outputString += "RecordIDs : " + "\n" + for idx in range(0, len(self._recordIDs)): + outputString += self._recordIDs[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( RecordQueryRPdu, self ).serialize(outputStream) + outputStream.write_int(int(self.requestID)) + self.serialize_enum(self.requiredReliabilityService,outputStream) + outputStream.write_byte(int(self.pad1)) + self.serialize_enum(self.eventType,outputStream) + outputStream.write_int(int(self.time)) + outputStream.write_int( len(self._recordIDs)) + for anObj in self._recordIDs: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( RecordQueryRPdu, self).parse(inputStream) + self.requestID = inputStream.read_int() + self.requiredReliabilityService = RequiredReliabilityService.get_enum(self.parse_enum(self.requiredReliabilityService,inputStream)) + self.pad1 = inputStream.read_byte() + self.eventType = RecordQueryREventType.get_enum(self.parse_enum(self.eventType,inputStream)) + self.time = inputStream.read_int() + self.numberOfRecords = inputStream.read_int() + for idx in range(0, self.numberOfRecords): + element = RecordQuerySpecification() + element.parse(inputStream) + self._recordIDs.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 7 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/record_query_specification.py b/dis/record_query_specification.py new file mode 100644 index 0000000..9d12cf4 --- /dev/null +++ b/dis/record_query_specification.py @@ -0,0 +1,134 @@ +from enum import Enum + +from .siso_ref_010.enums.variable_record_type import VariableRecordType + +class RecordQuerySpecification( object ): + """The identification of the records being queried 6.2.72""" + + def __init__(self): + """ Initializer for RecordQuerySpecification""" + self.numberOfRecords = 0 + """ variable length list of 32-bit record types uid = 66""" + self._recordIDs = [] + + + def get_numberOfRecords(self): + return len(self._recordIDs) + def set_numberOfRecords(self, value): + numberOfRecords = value + + + def get_recordIDs(self): + return self._recordIDs + def set_recordIDs(self, value): + self._recordIDs = value + recordIDs = property(get_recordIDs, set_recordIDs) + + + def add_recordIDs(self, value : VariableRecordType): + self._recordIDs.append(value) + + + """ + /// Name : recordIDs + /// UID : =66 + /// Type : VariableRecordType + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of 32-bit record types uid = 66 + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : SISO_ENUM + /// underlying Type : IsEnum + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += "NumberOfRecords : " + str(len(self._recordIDs)) + "\n" + outputString += "RecordIDs : " + "\n" + for idx in range(0, len(self._recordIDs)): + outputString += self._recordIDs[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int( len(self._recordIDs)) + for anObj in self._recordIDs: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.numberOfRecords = inputStream.read_int() + for idx in range(0, self.numberOfRecords): + element = VariableRecordType() + element.parse(inputStream) + self._recordIDs.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/record_reliable_pdu.py b/dis/record_reliable_pdu.py new file mode 100644 index 0000000..d70cf61 --- /dev/null +++ b/dis/record_reliable_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class RecordReliablePdu( object ): + """Alias, more descriptive name for RecordRPdu.""" + + def __init__(self): + """ Initializer for RecordReliablePdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/record_rpdu.py b/dis/record_rpdu.py new file mode 100644 index 0000000..c9ee575 --- /dev/null +++ b/dis/record_rpdu.py @@ -0,0 +1,165 @@ +from enum import Enum + +from .siso_ref_010.enums.record_revent_type import RecordREventType +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .siso_ref_010.enums.required_reliability_service import RequiredReliabilityService +from .simulation_management_with_reliability_family_pdu import SimulationManagementWithReliabilityFamilyPdu +from .record_specification import RecordSpecification + +class RecordRPdu( SimulationManagementWithReliabilityFamilyPdu ): + """5.12.4.16 Used to respond to a Record Query-R PDU or a Set Record-R PDU. It is used to provide information requested in a Record Query-R PDU, to confirm the information received in a Set Record-R PDU, and to confirm the receipt of a periodic or unsolicited Record-R PDU when the acknowledged service level is used.""" + + def __init__(self): + """ Initializer for RecordRPdu""" + super().__init__() + """ request ID provides a unique identifier""" + self.requestID = 0 + # /** level of reliability service used for this transaction uid 74 */ + self.requiredReliabilityService = RequiredReliabilityService.default + + self.pad1 = 0 + # /** uid 333 */ + self.eventType = RecordREventType.default + + """ Number of record sets in list""" + self.numberOfRecordSets = 0 + """ record sets""" + self._recordSets = [] + self.pduType = DisPduType.record_reliable + + + def get_numberOfRecordSets(self): + return len(self._recordSets) + def set_numberOfRecordSets(self, value): + numberOfRecordSets = value + + + def get_recordSets(self): + return self._recordSets + def set_recordSets(self, value): + self._recordSets = value + recordSets = property(get_recordSets, set_recordSets) + + + def add_recordSets(self, value : RecordSpecification): + self._recordSets.append(value) + + + """ + /// Name : recordSets + /// UID : + /// Type : RecordSpecification + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : record sets + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RequestID : " + str(self.requestID) + "\n" + outputString += "RequiredReliabilityService : " + self.requiredReliabilityService.get_description + "(" + (str(int(self.requiredReliabilityService))) + ")" + "\n" + outputString += "Pad1 : " + str(self.pad1) + "\n" + outputString += "RecordREventType : " + self.eventType.get_description + "(" + (str(int(self.eventType))) + ")" + "\n" + outputString += "NumberOfRecordSets : " + str(len(self._recordSets)) + "\n" + outputString += "RecordSets : " + "\n" + for idx in range(0, len(self._recordSets)): + outputString += self._recordSets[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( RecordRPdu, self ).serialize(outputStream) + outputStream.write_int(int(self.requestID)) + self.serialize_enum(self.requiredReliabilityService,outputStream) + outputStream.write_byte(int(self.pad1)) + self.serialize_enum(self.eventType,outputStream) + outputStream.write_int( len(self._recordSets)) + for anObj in self._recordSets: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( RecordRPdu, self).parse(inputStream) + self.requestID = inputStream.read_int() + self.requiredReliabilityService = RequiredReliabilityService.get_enum(self.parse_enum(self.requiredReliabilityService,inputStream)) + self.pad1 = inputStream.read_byte() + self.eventType = RecordREventType.get_enum(self.parse_enum(self.eventType,inputStream)) + self.numberOfRecordSets = inputStream.read_int() + for idx in range(0, self.numberOfRecordSets): + element = RecordSpecification() + element.parse(inputStream) + self._recordSets.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/record_specification.py b/dis/record_specification.py new file mode 100644 index 0000000..c764caf --- /dev/null +++ b/dis/record_specification.py @@ -0,0 +1,135 @@ +from enum import Enum + +from .record_specification_element import RecordSpecificationElement + +class RecordSpecification( object ): + """This record shall specify the number of record sets contained in the Record Specification record and the record details. Section 6.2.73.""" + + def __init__(self): + """ Initializer for RecordSpecification""" + """ The number of record sets""" + self.numberOfRecordSets = 0 + """ variable length list record specifications.""" + self._recordSets = [] + + + def get_numberOfRecordSets(self): + return len(self._recordSets) + def set_numberOfRecordSets(self, value): + numberOfRecordSets = value + + + def get_recordSets(self): + return self._recordSets + def set_recordSets(self, value): + self._recordSets = value + recordSets = property(get_recordSets, set_recordSets) + + + def add_recordSets(self, value : RecordSpecificationElement): + self._recordSets.append(value) + + + """ + /// Name : recordSets + /// UID : + /// Type : RecordSpecificationElement + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list record specifications. + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += "NumberOfRecordSets : " + str(len(self._recordSets)) + "\n" + outputString += "RecordSets : " + "\n" + for idx in range(0, len(self._recordSets)): + outputString += self._recordSets[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int( len(self._recordSets)) + for anObj in self._recordSets: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.numberOfRecordSets = inputStream.read_int() + for idx in range(0, self.numberOfRecordSets): + element = RecordSpecificationElement() + element.parse(inputStream) + self._recordSets.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/record_specification_element.py b/dis/record_specification_element.py new file mode 100644 index 0000000..7d7d0f9 --- /dev/null +++ b/dis/record_specification_element.py @@ -0,0 +1,134 @@ +from enum import Enum + +from .siso_ref_010.enums.variable_record_type import VariableRecordType + +class RecordSpecificationElement( object ): + """Synthetic record, made up from section 6.2.73. This is used to achieve a repeating variable list element.

recordLength, recordCount and recordValues must be set by hand so the.""" + + def __init__(self): + """ Initializer for RecordSpecificationElement""" + # /** The data structure used to convey the parameter values of the record for each record. 32-bit enumeration. uid = 66 */ + self.recordID = VariableRecordType.default + + """ The serial number of the first record in the block of records""" + self.recordSetSerialNumber = 0 + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + """ the length, in bits, of the record. Note, bits, not bytes.""" + self.recordLength = 0 + """ the number of records included in the record set """ + self.recordCount = 0 + """ The concatenated records of the format specified by the Record ID field. The length of this field is the Record Length multiplied by the Record Count, in units of bits.""" + self.recordValues = [] + """ used if required to make entire record size an even multiple of 8 bytes""" + self.padTo64 = [] + + def to_string(self) ->str: + outputString = "" + outputString += "VariableRecordType : " + self.recordID.get_description + "(" + (str(int(self.recordID))) + ")" + "\n" + outputString += "RecordSetSerialNumber : " + str(self.recordSetSerialNumber) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "RecordLength : " + str(self.recordLength) + "\n" + outputString += "RecordCount : " + str(self.recordCount) + "\n" + outputString += "RecordValues : " + "\n" + for idx in range(0, len(self.recordValues)): + outputString += str(self.recordValues[idx]) + + outputString += "PadTo64 : " + "\n" + for idx in range(0, len(self.padTo64)): + outputString += str(self.padTo64[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.recordID,outputStream) + outputStream.write_int(int(self.recordSetSerialNumber)) + outputStream.write_int(int(self.padding)) + outputStream.write_short(int(self.recordLength)) + outputStream.write_short(int(self.recordCount)) + for idx in range(0, 0): + outputStream.write_unsigned_byte( self.recordValues[ idx ] ); + + for idx in range(0, 0): + outputStream.write_unsigned_byte( self.padTo64[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordID = VariableRecordType.get_enum(self.parse_enum(self.recordID,inputStream)) + self.recordSetSerialNumber = inputStream.read_int() + self.padding = inputStream.read_int() + self.recordLength = inputStream.read_short() + self.recordCount = inputStream.read_short() + self.recordValues = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_byte() + self.recordValues[ idx ] = val + + self.padTo64 = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_byte() + self.padTo64[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 7 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/relationship.py b/dis/relationship.py new file mode 100644 index 0000000..076b101 --- /dev/null +++ b/dis/relationship.py @@ -0,0 +1,93 @@ +from enum import Enum + +from .siso_ref_010.enums.is_part_of_position import IsPartOfPosition +from .siso_ref_010.enums.is_part_of_nature import IsPartOfNature + +class Relationship( object ): + """The relationship of the part entity to its host entity. Section 6.2.74.""" + + def __init__(self): + """ Initializer for Relationship""" + # /** The nature or purpose for joining of the part entity to the host entity and shall be represented by a 16-bit enumeration uid 210 */ + self.nature = IsPartOfNature.default + + # /** The position of the part entity with respect to the host entity and shall be represented by a 16-bit enumeration uid 211 */ + self.position = IsPartOfPosition.default + + + def to_string(self) ->str: + outputString = "" + outputString += "IsPartOfNature : " + self.nature.get_description + "(" + (str(int(self.nature))) + ")" + "\n" + outputString += "IsPartOfPosition : " + self.position.get_description + "(" + (str(int(self.position))) + ")" + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.nature,outputStream) + self.serialize_enum(self.position,outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.nature = IsPartOfNature.get_enum(self.parse_enum(self.nature,inputStream)) + self.position = IsPartOfPosition.get_enum(self.parse_enum(self.position,inputStream)) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/remove_entity_pdu.py b/dis/remove_entity_pdu.py new file mode 100644 index 0000000..5e524db --- /dev/null +++ b/dis/remove_entity_pdu.py @@ -0,0 +1,91 @@ +from enum import Enum + +from .simulation_management_family_pdu import SimulationManagementFamilyPdu +from .siso_ref_010.enums.dis_pdu_type import DisPduType + +class RemoveEntityPdu( SimulationManagementFamilyPdu ): + """Section 7.5.3 The removal of an entity from an exercise shall be communicated with a Remove Entity PDU. See 5.6.5.3.""" + + def __init__(self): + """ Initializer for RemoveEntityPdu""" + super().__init__() + """ This field shall identify the specific and unique start/resume request being made by the SM""" + self.requestID = 0 + self.pduType = DisPduType.remove_entity + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RequestID : " + str(self.requestID) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( RemoveEntityPdu, self ).serialize(outputStream) + outputStream.write_int(int(self.requestID)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( RemoveEntityPdu, self).parse(inputStream) + self.requestID = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 1 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/remove_entity_reliable_pdu.py b/dis/remove_entity_reliable_pdu.py new file mode 100644 index 0000000..a6b92ae --- /dev/null +++ b/dis/remove_entity_reliable_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class RemoveEntityReliablePdu( object ): + """Alias, more descriptive name for RemoveEntityRPdu.""" + + def __init__(self): + """ Initializer for RemoveEntityReliablePdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/remove_entity_rpdu.py b/dis/remove_entity_rpdu.py new file mode 100644 index 0000000..5ac4e10 --- /dev/null +++ b/dis/remove_entity_rpdu.py @@ -0,0 +1,106 @@ +from enum import Enum + +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .siso_ref_010.enums.required_reliability_service import RequiredReliabilityService +from .simulation_management_with_reliability_family_pdu import SimulationManagementWithReliabilityFamilyPdu + +class RemoveEntityRPdu( SimulationManagementWithReliabilityFamilyPdu ): + """5.12.4.3 Contains the same information as found in the Remove Entity PDU with the addition of the level of reliability service to be used for the removal action being requested.""" + + def __init__(self): + """ Initializer for RemoveEntityRPdu""" + super().__init__() + # /** level of reliability service used for this transaction uid 74 */ + self.requiredReliabilityService = RequiredReliabilityService.default + + self.pad1 = 0 + self.pad2 = 0 + """ Request ID provides a unique identifier""" + self.requestID = 0 + self.pduType = DisPduType.remove_entity_reliable + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RequiredReliabilityService : " + self.requiredReliabilityService.get_description + "(" + (str(int(self.requiredReliabilityService))) + ")" + "\n" + outputString += "Pad1 : " + str(self.pad1) + "\n" + outputString += "Pad2 : " + str(self.pad2) + "\n" + outputString += "RequestID : " + str(self.requestID) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( RemoveEntityRPdu, self ).serialize(outputStream) + self.serialize_enum(self.requiredReliabilityService,outputStream) + outputStream.write_byte(int(self.pad1)) + outputStream.write_short(int(self.pad2)) + outputStream.write_int(int(self.requestID)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( RemoveEntityRPdu, self).parse(inputStream) + self.requiredReliabilityService = RequiredReliabilityService.get_enum(self.parse_enum(self.requiredReliabilityService,inputStream)) + self.pad1 = inputStream.read_byte() + self.pad2 = inputStream.read_short() + self.requestID = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/repair_complete_pdu.py b/dis/repair_complete_pdu.py new file mode 100644 index 0000000..62e7068 --- /dev/null +++ b/dis/repair_complete_pdu.py @@ -0,0 +1,109 @@ +from enum import Enum + +from .siso_ref_010.enums.repair_complete_repair import RepairCompleteRepair +from .logistics_family_pdu import LogisticsFamilyPdu +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .entity_id import EntityID + +class RepairCompletePdu( LogisticsFamilyPdu ): + """5.5.10 Used by the repairing entity to communicate the repair that has been performed for the entity that requested repair service.""" + + def __init__(self): + """ Initializer for RepairCompletePdu""" + super().__init__() + """ Entity that is receiving service. See 6.2.28""" + self.receivingEntityID = EntityID() + """ Entity that is supplying. See 6.2.28""" + self.repairingEntityID = EntityID() + # /** Enumeration for type of repair. See 6.2.74 uid 64 */ + self.repair = RepairCompleteRepair.default + + """ padding, number prevents conflict with superclass ivar name""" + self.padding4 = 0 + self.pduType = DisPduType.repair_complete + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "ReceivingEntityID :" + "\n" + self.receivingEntityID.to_string() + "\n" + outputString += "RepairingEntityID :" + "\n" + self.repairingEntityID.to_string() + "\n" + outputString += "RepairCompleteRepair : " + self.repair.get_description + "(" + (str(int(self.repair))) + ")" + "\n" + outputString += "Padding4 : " + str(self.padding4) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( RepairCompletePdu, self ).serialize(outputStream) + self.receivingEntityID.serialize(outputStream) + self.repairingEntityID.serialize(outputStream) + self.serialize_enum(self.repair,outputStream) + outputStream.write_short(int(self.padding4)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( RepairCompletePdu, self).parse(inputStream) + self.receivingEntityID.parse(inputStream) + self.repairingEntityID.parse(inputStream) + self.repair = RepairCompleteRepair.get_enum(self.parse_enum(self.repair,inputStream)) + self.padding4 = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/repair_response_pdu.py b/dis/repair_response_pdu.py new file mode 100644 index 0000000..96ff5d4 --- /dev/null +++ b/dis/repair_response_pdu.py @@ -0,0 +1,114 @@ +from enum import Enum + +from .siso_ref_010.enums.repair_complete_repair import RepairCompleteRepair +from .logistics_family_pdu import LogisticsFamilyPdu +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .entity_id import EntityID + +class RepairResponsePdu( LogisticsFamilyPdu ): + """5.5.11 used by the receiving entity to acknowledge the receipt of a Repair Complete PDU""" + + def __init__(self): + """ Initializer for RepairResponsePdu""" + super().__init__() + """ Entity that requested repairs. See 6.2.28""" + self.receivingEntityID = EntityID() + """ Entity that is repairing. See 6.2.28""" + self.repairingEntityID = EntityID() + # /** Result of repair operation uid 64 */ + self.repairResult = RepairCompleteRepair.default + + """ padding""" + self.padding1 = 0 + """ padding""" + self.padding2 = 0 + self.pduType = DisPduType.repair_response + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "ReceivingEntityID :" + "\n" + self.receivingEntityID.to_string() + "\n" + outputString += "RepairingEntityID :" + "\n" + self.repairingEntityID.to_string() + "\n" + outputString += "RepairResponseRepairResult : " + self.repairResult.get_description + "(" + (str(int(self.repairResult))) + ")" + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( RepairResponsePdu, self ).serialize(outputStream) + self.receivingEntityID.serialize(outputStream) + self.repairingEntityID.serialize(outputStream) + self.serialize_enum(self.repairResult,outputStream) + outputStream.write_byte(int(self.padding1)) + outputStream.write_short(int(self.padding2)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( RepairResponsePdu, self).parse(inputStream) + self.receivingEntityID.parse(inputStream) + self.repairingEntityID.parse(inputStream) + self.repairResult = RepairResponseRepairResult.get_enum(self.parse_enum(self.repairResult,inputStream)) + self.padding1 = inputStream.read_byte() + self.padding2 = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 5 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/request_id.py b/dis/request_id.py new file mode 100644 index 0000000..25fa45e --- /dev/null +++ b/dis/request_id.py @@ -0,0 +1,84 @@ +from enum import Enum + + +class RequestID( object ): + """A monotonically increasing number inserted into all simulation managment PDUs. This should be a hand-coded thingie, maybe a singleton. Section 6.2.75""" + + def __init__(self): + """ Initializer for RequestID""" + """ monotonically increasing number""" + self.requestID = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "RequestID : " + str(self.requestID) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int(int(self.requestID)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.requestID = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 1 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/resupply_cancel_pdu.py b/dis/resupply_cancel_pdu.py new file mode 100644 index 0000000..4388369 --- /dev/null +++ b/dis/resupply_cancel_pdu.py @@ -0,0 +1,97 @@ +from enum import Enum + +from .logistics_family_pdu import LogisticsFamilyPdu +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .entity_id import EntityID + +class ResupplyCancelPdu( LogisticsFamilyPdu ): + """5.5.8 Used to communicate the canceling of a resupply service provided through logistics support.""" + + def __init__(self): + """ Initializer for ResupplyCancelPdu""" + super().__init__() + """ Requesting entity, Section 7.4.5""" + self.receivingEntityID = EntityID() + """ Supplying entity, Section 7.4.5""" + self.supplyingEntityID = EntityID() + self.pduType = DisPduType.resupply_cancel + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "ReceivingEntityID :" + "\n" + self.receivingEntityID.to_string() + "\n" + outputString += "SupplyingEntityID :" + "\n" + self.supplyingEntityID.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( ResupplyCancelPdu, self ).serialize(outputStream) + self.receivingEntityID.serialize(outputStream) + self.supplyingEntityID.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( ResupplyCancelPdu, self).parse(inputStream) + self.receivingEntityID.parse(inputStream) + self.supplyingEntityID.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/resupply_offer_pdu.py b/dis/resupply_offer_pdu.py new file mode 100644 index 0000000..558e5a5 --- /dev/null +++ b/dis/resupply_offer_pdu.py @@ -0,0 +1,163 @@ +from enum import Enum + +from .supply_quantity import SupplyQuantity +from .logistics_family_pdu import LogisticsFamilyPdu +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .entity_id import EntityID + +class ResupplyOfferPdu( LogisticsFamilyPdu ): + """5.5.6 Communicate the offer of supplies by a supplying entity to a receiving entity.""" + + def __init__(self): + """ Initializer for ResupplyOfferPdu""" + super().__init__() + """ Field identifies the Entity and respective Entity Record ID that is receiving service (see 6.2.28), Section 7.4.3""" + self.receivingEntityID = EntityID() + """ Identifies the Entity and respective Entity ID Record that is supplying (see 6.2.28), Section 7.4.3""" + self.supplyingEntityID = EntityID() + """ How many supplies types are being offered, Section 7.4.3""" + self.numberOfSupplyTypes = 0 + """ padding""" + self.padding1 = 0 + """ padding""" + self.padding2 = 0 + """ A Reord that Specifies the type of supply and the amount of that supply for each of the supply types in numberOfSupplyTypes (see 6.2.85), Section 7.4.3""" + self._supplies = [] + self.pduType = DisPduType.resupply_offer + + + def get_numberOfSupplyTypes(self): + return len(self._supplies) + def set_numberOfSupplyTypes(self, value): + numberOfSupplyTypes = value + + + def get_supplies(self): + return self._supplies + def set_supplies(self, value): + self._supplies = value + supplies = property(get_supplies, set_supplies) + + + def add_supplies(self, value : SupplyQuantity): + self._supplies.append(value) + + + """ + /// Name : supplies + /// UID : + /// Type : SupplyQuantity + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : A Reord that Specifies the type of supply and the amount of that supply for each of the supply types in numberOfSupplyTypes (see 6.2.85), Section 7.4.3 + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "ReceivingEntityID :" + "\n" + self.receivingEntityID.to_string() + "\n" + outputString += "SupplyingEntityID :" + "\n" + self.supplyingEntityID.to_string() + "\n" + outputString += "NumberOfSupplyTypes : " + str(len(self._supplies)) + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + outputString += "Supplies : " + "\n" + for idx in range(0, len(self._supplies)): + outputString += self._supplies[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( ResupplyOfferPdu, self ).serialize(outputStream) + self.receivingEntityID.serialize(outputStream) + self.supplyingEntityID.serialize(outputStream) + outputStream.write_byte( len(self._supplies)) + outputStream.write_byte(int(self.padding1)) + outputStream.write_short(int(self.padding2)) + for anObj in self._supplies: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( ResupplyOfferPdu, self).parse(inputStream) + self.receivingEntityID.parse(inputStream) + self.supplyingEntityID.parse(inputStream) + self.numberOfSupplyTypes = inputStream.read_byte() + self.padding1 = inputStream.read_byte() + self.padding2 = inputStream.read_short() + for idx in range(0, self.numberOfSupplyTypes): + element = SupplyQuantity() + element.parse(inputStream) + self._supplies.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/resupply_received_pdu.py b/dis/resupply_received_pdu.py new file mode 100644 index 0000000..921ff3d --- /dev/null +++ b/dis/resupply_received_pdu.py @@ -0,0 +1,163 @@ +from enum import Enum + +from .supply_quantity import SupplyQuantity +from .logistics_family_pdu import LogisticsFamilyPdu +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .entity_id import EntityID + +class ResupplyReceivedPdu( LogisticsFamilyPdu ): + """5.5.7 Used to acknowledge the receipt of supplies by the receiving entity.""" + + def __init__(self): + """ Initializer for ResupplyReceivedPdu""" + super().__init__() + """ Entity that is receiving service. Shall be represented by Entity Identifier record (see 6.2.28)""" + self.receivingEntityID = EntityID() + """ Entity that is supplying. Shall be represented by Entity Identifier record (see 6.2.28)""" + self.supplyingEntityID = EntityID() + """ How many supplies are taken by receiving entity""" + self.numberOfSupplyTypes = 0 + """ padding""" + self.padding1 = 0 + """ padding""" + self.padding2 = 0 + """ A Reord that Specifies the type of supply and the amount of that supply for each of the supply types in numberOfSupplyTypes (see 6.2.85), Section 7.4.3""" + self._supplies = [] + self.pduType = DisPduType.resupply_received + + + def get_numberOfSupplyTypes(self): + return len(self._supplies) + def set_numberOfSupplyTypes(self, value): + numberOfSupplyTypes = value + + + def get_supplies(self): + return self._supplies + def set_supplies(self, value): + self._supplies = value + supplies = property(get_supplies, set_supplies) + + + def add_supplies(self, value : SupplyQuantity): + self._supplies.append(value) + + + """ + /// Name : supplies + /// UID : + /// Type : SupplyQuantity + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : A Reord that Specifies the type of supply and the amount of that supply for each of the supply types in numberOfSupplyTypes (see 6.2.85), Section 7.4.3 + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "ReceivingEntityID :" + "\n" + self.receivingEntityID.to_string() + "\n" + outputString += "SupplyingEntityID :" + "\n" + self.supplyingEntityID.to_string() + "\n" + outputString += "NumberOfSupplyTypes : " + str(len(self._supplies)) + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + outputString += "Supplies : " + "\n" + for idx in range(0, len(self._supplies)): + outputString += self._supplies[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( ResupplyReceivedPdu, self ).serialize(outputStream) + self.receivingEntityID.serialize(outputStream) + self.supplyingEntityID.serialize(outputStream) + outputStream.write_byte( len(self._supplies)) + outputStream.write_byte(int(self.padding1)) + outputStream.write_short(int(self.padding2)) + for anObj in self._supplies: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( ResupplyReceivedPdu, self).parse(inputStream) + self.receivingEntityID.parse(inputStream) + self.supplyingEntityID.parse(inputStream) + self.numberOfSupplyTypes = inputStream.read_byte() + self.padding1 = inputStream.read_byte() + self.padding2 = inputStream.read_short() + for idx in range(0, self.numberOfSupplyTypes): + element = SupplyQuantity() + element.parse(inputStream) + self._supplies.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/secondary_operational_data.py b/dis/secondary_operational_data.py new file mode 100644 index 0000000..53d8d64 --- /dev/null +++ b/dis/secondary_operational_data.py @@ -0,0 +1,94 @@ +from enum import Enum + + +class SecondaryOperationalData( object ): + """Additional operational data for an IFF emitting system and the number of IFF Fundamental Parameter Data records Section 6.2.76.""" + + def __init__(self): + """ Initializer for SecondaryOperationalData""" + """ additional operational characteristics of the IFF emitting system. Each 8-bit field will vary depending on the system type.""" + self.operationalData1 = 0 + """ additional operational characteristics of the IFF emitting system. Each 8-bit field will vary depending on the system type.""" + self.operationalData2 = 0 + """ The number of IFF Fundamental Parameter Data records that follow""" + self.numberOfIFFFundamentalParameterRecords = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "OperationalData1 : " + str(self.operationalData1) + "\n" + outputString += "OperationalData2 : " + str(self.operationalData2) + "\n" + outputString += "NumberOfIFFFundamentalParameterRecords : " + str(self.numberOfIFFFundamentalParameterRecords) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_byte(int(self.operationalData1)) + outputStream.write_byte(int(self.operationalData2)) + outputStream.write_short(int(self.numberOfIFFFundamentalParameterRecords)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.operationalData1 = inputStream.read_byte() + self.operationalData2 = inputStream.read_byte() + self.numberOfIFFFundamentalParameterRecords = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/seespdu.py b/dis/seespdu.py new file mode 100644 index 0000000..3b3e270 --- /dev/null +++ b/dis/seespdu.py @@ -0,0 +1,219 @@ +from enum import Enum + +from .propulsion_system_data import PropulsionSystemData +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .vectoring_nozzle_system import VectoringNozzleSystem +from .entity_id import EntityID +from .distributed_emissions_regeneration_family_pdu import DistributedEmissionsRegenerationFamilyPdu + +class SEESPdu( DistributedEmissionsRegenerationFamilyPdu ): + """7.6.6 Certain supplemental information on an entity’s physical state and emissions. See 5.7.7""" + + def __init__(self): + """ Initializer for SEESPdu""" + super().__init__() + """ Originating entity ID provides a unique identifier""" + self.orginatingEntityID = EntityID() + """ IR Signature representation index""" + self.infraredSignatureRepresentationIndex = 0 + """ acoustic Signature representation index""" + self.acousticSignatureRepresentationIndex = 0 + """ radar cross section representation index""" + self.radarCrossSectionSignatureRepresentationIndex = 0 + """ how many propulsion systems""" + self.numberOfPropulsionSystems = 0 + """ how many vectoring nozzle systems""" + self.numberOfVectoringNozzleSystems = 0 + """ variable length list of propulsion system data""" + self._propulsionSystemData = [] + """ variable length list of vectoring system data""" + self._vectoringSystemData = [] + self.pduType = DisPduType.supplemental_emission_entity_state + + + def get_numberOfPropulsionSystems(self): + return len(self._propulsionSystemData) + def set_numberOfPropulsionSystems(self, value): + numberOfPropulsionSystems = value + + + def get_numberOfVectoringNozzleSystems(self): + return len(self._vectoringSystemData) + def set_numberOfVectoringNozzleSystems(self, value): + numberOfVectoringNozzleSystems = value + + + def get_propulsionSystemData(self): + return self._propulsionSystemData + def set_propulsionSystemData(self, value): + self._propulsionSystemData = value + propulsionSystemData = property(get_propulsionSystemData, set_propulsionSystemData) + + + def add_propulsionSystemData(self, value : PropulsionSystemData): + self._propulsionSystemData.append(value) + + + """ + /// Name : propulsionSystemData + /// UID : + /// Type : PropulsionSystemData + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of propulsion system data + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_vectoringSystemData(self): + return self._vectoringSystemData + def set_vectoringSystemData(self, value): + self._vectoringSystemData = value + vectoringSystemData = property(get_vectoringSystemData, set_vectoringSystemData) + + + def add_vectoringSystemData(self, value : VectoringNozzleSystem): + self._vectoringSystemData.append(value) + + + """ + /// Name : vectoringSystemData + /// UID : + /// Type : VectoringNozzleSystem + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of vectoring system data + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "OrginatingEntityID :" + "\n" + self.orginatingEntityID.to_string() + "\n" + outputString += "InfraredSignatureRepresentationIndex : " + str(self.infraredSignatureRepresentationIndex) + "\n" + outputString += "AcousticSignatureRepresentationIndex : " + str(self.acousticSignatureRepresentationIndex) + "\n" + outputString += "RadarCrossSectionSignatureRepresentationIndex : " + str(self.radarCrossSectionSignatureRepresentationIndex) + "\n" + outputString += "NumberOfPropulsionSystems : " + str(len(self._propulsionSystemData)) + "\n" + outputString += "NumberOfVectoringNozzleSystems : " + str(len(self._vectoringSystemData)) + "\n" + outputString += "PropulsionSystemData : " + "\n" + for idx in range(0, len(self._propulsionSystemData)): + outputString += self._propulsionSystemData[idx].to_string() + + outputString += "VectoringSystemData : " + "\n" + for idx in range(0, len(self._vectoringSystemData)): + outputString += self._vectoringSystemData[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( SEESPdu, self ).serialize(outputStream) + self.orginatingEntityID.serialize(outputStream) + outputStream.write_short(int(self.infraredSignatureRepresentationIndex)) + outputStream.write_short(int(self.acousticSignatureRepresentationIndex)) + outputStream.write_short(int(self.radarCrossSectionSignatureRepresentationIndex)) + outputStream.write_short( len(self._propulsionSystemData)) + outputStream.write_short( len(self._vectoringSystemData)) + for anObj in self._propulsionSystemData: + anObj.serialize(outputStream) + + for anObj in self._vectoringSystemData: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( SEESPdu, self).parse(inputStream) + self.orginatingEntityID.parse(inputStream) + self.infraredSignatureRepresentationIndex = inputStream.read_short() + self.acousticSignatureRepresentationIndex = inputStream.read_short() + self.radarCrossSectionSignatureRepresentationIndex = inputStream.read_short() + self.numberOfPropulsionSystems = inputStream.read_short() + self.numberOfVectoringNozzleSystems = inputStream.read_short() + for idx in range(0, self.numberOfPropulsionSystems): + element = PropulsionSystemData() + element.parse(inputStream) + self._propulsionSystemData.append(element) + + for idx in range(0, self.numberOfVectoringNozzleSystems): + element = VectoringNozzleSystem() + element.parse(inputStream) + self._vectoringSystemData.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 8 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/sensor.py b/dis/sensor.py new file mode 100644 index 0000000..10fd353 --- /dev/null +++ b/dis/sensor.py @@ -0,0 +1,113 @@ +from enum import Enum + +from .siso_ref_010.enums.sensor_type_source import SensorTypeSource +from .siso_ref_010.enums.sensor_on_off_status import SensorOnOffStatus + +class Sensor( object ): + """An entity's sensor information. Section 6.2.77.""" + + def __init__(self): + """ Initializer for Sensor""" + # /** the source of the Sensor Type field uid 414 */ + self.sensorTypeSource = SensorTypeSource.default + + # /** The on/off status of the sensor uid 331 */ + self.sensorOnOffStatus = SensorOnOffStatus.default + + """ for Source 'other':SensorRecordOtherActiveSensors/325,'em':EmitterName/75,'passive':SensorRecordSensorTypePassiveSensors/326,'mine':6.2.57,'ua':UAAcousticSystemName/144,'lasers':DesignatorSystemName/80""" + self.sensorType = 0 + """ the station to which the sensor is assigned. A zero value shall indi- cate that this Sensor record is not associated with any particular station and represents the total quan- tity of this sensor for this entity. If this field is non-zero, it shall either reference an attached part or an articulated part""" + self.station = 0 + """ quantity of the sensor """ + self.quantity = 0 + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "SensorTypeSource : " + self.sensorTypeSource.get_description + "(" + (str(int(self.sensorTypeSource))) + ")" + "\n" + outputString += "SensorOnOffStatus : " + self.sensorOnOffStatus.get_description + "(" + (str(int(self.sensorOnOffStatus))) + ")" + "\n" + outputString += "SensorType : " + str(self.sensorType) + "\n" + outputString += "Station : " + str(self.station) + "\n" + outputString += "Quantity : " + str(self.quantity) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.sensorTypeSource,outputStream) + self.serialize_enum(self.sensorOnOffStatus,outputStream) + outputStream.write_short(int(self.sensorType)) + outputStream.write_int(int(self.station)) + outputStream.write_short(int(self.quantity)) + outputStream.write_short(int(self.padding)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.sensorTypeSource = SensorTypeSource.get_enum(self.parse_enum(self.sensorTypeSource,inputStream)) + self.sensorOnOffStatus = SensorOnOffStatus.get_enum(self.parse_enum(self.sensorOnOffStatus,inputStream)) + self.sensorType = inputStream.read_short() + self.station = inputStream.read_int() + self.quantity = inputStream.read_short() + self.padding = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/separation_vp.py b/dis/separation_vp.py new file mode 100644 index 0000000..8c10894 --- /dev/null +++ b/dis/separation_vp.py @@ -0,0 +1,122 @@ +from enum import Enum + +from .named_location_identification import NamedLocationIdentification +from .siso_ref_010.enums.separation_vpreasonfor_separation import SeparationVPReasonforSeparation +from .siso_ref_010.enums.separation_vppre_entity_indicator import SeparationVPPreEntityIndicator +from .siso_ref_010.enums.variable_parameter_record_type import VariableParameterRecordType +from .entity_id import EntityID + +class SeparationVP( object ): + """Physical separation of an entity from another entity. Section 6.2.94.6""" + + def __init__(self): + """ Initializer for SeparationVP""" + # /** The identification of the Variable Parameter record. Enumeration from EBV uid 56 */ + self.recordType = VariableParameterRecordType.separation + + # /** Reason for separation. EBV uid 282 */ + self.reasonForSeparation = SeparationVPReasonforSeparation.default + + # /** Whether the entity existed prior to separation EBV uid 283 */ + self.preEntityIndicator = SeparationVPPreEntityIndicator.default + + """ padding""" + self.padding1 = 0 + """ ID of parent""" + self.parentEntityID = EntityID() + """ padding""" + self.padding2 = 0 + """ Station separated from""" + self.stationLocation = NamedLocationIdentification() + + def to_string(self) ->str: + outputString = "" + outputString += "VariableParameterRecordType : " + self.recordType.get_description + "(" + (str(int(self.recordType))) + ")" + "\n" + outputString += "SeparationVPReasonforSeparation : " + self.reasonForSeparation.get_description + "(" + (str(int(self.reasonForSeparation))) + ")" + "\n" + outputString += "SeparationVPPreEntityIndicator : " + self.preEntityIndicator.get_description + "(" + (str(int(self.preEntityIndicator))) + ")" + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "ParentEntityID :" + "\n" + self.parentEntityID.to_string() + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + outputString += "StationLocation :" + "\n" + self.stationLocation.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.recordType,outputStream) + self.serialize_enum(self.reasonForSeparation,outputStream) + self.serialize_enum(self.preEntityIndicator,outputStream) + outputStream.write_byte(int(self.padding1)) + self.parentEntityID.serialize(outputStream) + outputStream.write_short(int(self.padding2)) + self.stationLocation.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordType = VariableParameterRecordType.get_enum(self.parse_enum(self.recordType,inputStream)) + self.reasonForSeparation = SeparationVPReasonforSeparation.get_enum(self.parse_enum(self.reasonForSeparation,inputStream)) + self.preEntityIndicator = SeparationVPPreEntityIndicator.get_enum(self.parse_enum(self.preEntityIndicator,inputStream)) + self.padding1 = inputStream.read_byte() + self.parentEntityID.parse(inputStream) + self.padding2 = inputStream.read_short() + self.stationLocation.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 7 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/service_request_pdu.py b/dis/service_request_pdu.py new file mode 100644 index 0000000..9487481 --- /dev/null +++ b/dis/service_request_pdu.py @@ -0,0 +1,163 @@ +from enum import Enum + +from .supply_quantity import SupplyQuantity +from .logistics_family_pdu import LogisticsFamilyPdu +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .entity_id import EntityID +from .siso_ref_010.enums.service_request_service_type_requested import ServiceRequestServiceTypeRequested + +class ServiceRequestPdu( LogisticsFamilyPdu ): + """5.5.5 Communicate information associated with one entity requesting a service from another.""" + + def __init__(self): + """ Initializer for ServiceRequestPdu""" + super().__init__() + """ Entity that is requesting service (see 6.2.28), Section 7.4.2""" + self.requestingEntityID = EntityID() + """ Entity that is providing the service (see 6.2.28), Section 7.4.2""" + self.servicingEntityID = EntityID() + # /** Type of service requested, Section 7.4.2 uid 63 */ + self.serviceTypeRequested = ServiceRequestServiceTypeRequested.default + + """ How many requested, Section 7.4.2""" + self.numberOfSupplyTypes = 0 + self.padding1 = 0 + self._supplies = [] + self.pduType = DisPduType.service_request + + + def get_numberOfSupplyTypes(self): + return len(self._supplies) + def set_numberOfSupplyTypes(self, value): + numberOfSupplyTypes = value + + + def get_supplies(self): + return self._supplies + def set_supplies(self, value): + self._supplies = value + supplies = property(get_supplies, set_supplies) + + + def add_supplies(self, value : SupplyQuantity): + self._supplies.append(value) + + + """ + /// Name : supplies + /// UID : + /// Type : SupplyQuantity + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : null + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RequestingEntityID :" + "\n" + self.requestingEntityID.to_string() + "\n" + outputString += "ServicingEntityID :" + "\n" + self.servicingEntityID.to_string() + "\n" + outputString += "ServiceRequestServiceTypeRequested : " + self.serviceTypeRequested.get_description + "(" + (str(int(self.serviceTypeRequested))) + ")" + "\n" + outputString += "NumberOfSupplyTypes : " + str(len(self._supplies)) + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "Supplies : " + "\n" + for idx in range(0, len(self._supplies)): + outputString += self._supplies[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( ServiceRequestPdu, self ).serialize(outputStream) + self.requestingEntityID.serialize(outputStream) + self.servicingEntityID.serialize(outputStream) + self.serialize_enum(self.serviceTypeRequested,outputStream) + outputStream.write_byte( len(self._supplies)) + outputStream.write_short(int(self.padding1)) + for anObj in self._supplies: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( ServiceRequestPdu, self).parse(inputStream) + self.requestingEntityID.parse(inputStream) + self.servicingEntityID.parse(inputStream) + self.serviceTypeRequested = ServiceRequestServiceTypeRequested.get_enum(self.parse_enum(self.serviceTypeRequested,inputStream)) + self.numberOfSupplyTypes = inputStream.read_byte() + self.padding1 = inputStream.read_short() + for idx in range(0, self.numberOfSupplyTypes): + element = SupplyQuantity() + element.parse(inputStream) + self._supplies.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/set_data_pdu.py b/dis/set_data_pdu.py new file mode 100644 index 0000000..7626ba9 --- /dev/null +++ b/dis/set_data_pdu.py @@ -0,0 +1,208 @@ +from enum import Enum + +from .simulation_management_family_pdu import SimulationManagementFamilyPdu +from .variable_datum import VariableDatum +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .fixed_datum import FixedDatum + +class SetDataPdu( SimulationManagementFamilyPdu ): + """Section 7.5.10. Initializing or changing internal state information shall be communicated using a Set Data PDU. See 5.6.5.10""" + + def __init__(self): + """ Initializer for SetDataPdu""" + super().__init__() + """ ID of request""" + self.requestID = 0 + """ padding""" + self.padding1 = 0 + """ Number of fixed datum records""" + self.numberOfFixedDatumRecords = 0 + """ Number of variable datum records, handled automatically by marshaller at run time (and not modifiable by end-user programmers)""" + self.numberOfVariableDatumRecords = 0 + """ variable length list of fixed datums""" + self._fixedDatums = [] + """ variable length list of variable length datums""" + self._variableDatums = [] + self.pduType = DisPduType.set_data + + + def get_numberOfFixedDatumRecords(self): + return len(self._fixedDatums) + def set_numberOfFixedDatumRecords(self, value): + numberOfFixedDatumRecords = value + + + def get_numberOfVariableDatumRecords(self): + return len(self._variableDatums) + def set_numberOfVariableDatumRecords(self, value): + numberOfVariableDatumRecords = value + + + def get_fixedDatums(self): + return self._fixedDatums + def set_fixedDatums(self, value): + self._fixedDatums = value + fixedDatums = property(get_fixedDatums, set_fixedDatums) + + + def add_fixedDatums(self, value : FixedDatum): + self._fixedDatums.append(value) + + + """ + /// Name : fixedDatums + /// UID : + /// Type : FixedDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of fixed datums + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_variableDatums(self): + return self._variableDatums + def set_variableDatums(self, value): + self._variableDatums = value + variableDatums = property(get_variableDatums, set_variableDatums) + + + def add_variableDatums(self, value : VariableDatum): + self._variableDatums.append(value) + + + """ + /// Name : variableDatums + /// UID : + /// Type : VariableDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of variable length datums + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RequestID : " + str(self.requestID) + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "NumberOfFixedDatumRecords : " + str(len(self._fixedDatums)) + "\n" + outputString += "NumberOfVariableDatumRecords : " + str(len(self._variableDatums)) + "\n" + outputString += "FixedDatums : " + "\n" + for idx in range(0, len(self._fixedDatums)): + outputString += self._fixedDatums[idx].to_string() + + outputString += "VariableDatums : " + "\n" + for idx in range(0, len(self._variableDatums)): + outputString += self._variableDatums[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( SetDataPdu, self ).serialize(outputStream) + outputStream.write_int(int(self.requestID)) + outputStream.write_int(int(self.padding1)) + outputStream.write_int( len(self._fixedDatums)) + outputStream.write_int( len(self._variableDatums)) + for anObj in self._fixedDatums: + anObj.serialize(outputStream) + + for anObj in self._variableDatums: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( SetDataPdu, self).parse(inputStream) + self.requestID = inputStream.read_int() + self.padding1 = inputStream.read_int() + self.numberOfFixedDatumRecords = inputStream.read_int() + self.numberOfVariableDatumRecords = inputStream.read_int() + for idx in range(0, self.numberOfFixedDatumRecords): + element = FixedDatum() + element.parse(inputStream) + self._fixedDatums.append(element) + + for idx in range(0, self.numberOfVariableDatumRecords): + element = VariableDatum() + element.parse(inputStream) + self._variableDatums.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/set_data_reliable_pdu.py b/dis/set_data_reliable_pdu.py new file mode 100644 index 0000000..3100aaa --- /dev/null +++ b/dis/set_data_reliable_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class SetDataReliablePdu( object ): + """Alias, more descriptive name for SetDataRPdu.""" + + def __init__(self): + """ Initializer for SetDataReliablePdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/set_data_rpdu.py b/dis/set_data_rpdu.py new file mode 100644 index 0000000..43373ec --- /dev/null +++ b/dis/set_data_rpdu.py @@ -0,0 +1,220 @@ +from enum import Enum + +from .variable_datum import VariableDatum +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .siso_ref_010.enums.required_reliability_service import RequiredReliabilityService +from .fixed_datum import FixedDatum +from .simulation_management_with_reliability_family_pdu import SimulationManagementWithReliabilityFamilyPdu + +class SetDataRPdu( SimulationManagementWithReliabilityFamilyPdu ): + """5.12.4.10 Serves the same function as the Set Data PDU but with the addition of reliability service levels.""" + + def __init__(self): + """ Initializer for SetDataRPdu""" + super().__init__() + # /** level of reliability service used for this transaction uid 74 */ + self.requiredReliabilityService = RequiredReliabilityService.default + + """ padding""" + self.pad1 = 0 + """ padding""" + self.pad2 = 0 + """ request ID provides a unique identifier""" + self.requestID = 0 + """ Fixed datum record count""" + self.numberOfFixedDatumRecords = 0 + """ variable datum record count""" + self.numberOfVariableDatumRecords = 0 + """ Fixed datum records""" + self._fixedDatumRecords = [] + """ Variable datum records""" + self._variableDatumRecords = [] + self.pduType = DisPduType.set_data_reliable + + + def get_numberOfFixedDatumRecords(self): + return len(self._fixedDatumRecords) + def set_numberOfFixedDatumRecords(self, value): + numberOfFixedDatumRecords = value + + + def get_numberOfVariableDatumRecords(self): + return len(self._variableDatumRecords) + def set_numberOfVariableDatumRecords(self, value): + numberOfVariableDatumRecords = value + + + def get_fixedDatumRecords(self): + return self._fixedDatumRecords + def set_fixedDatumRecords(self, value): + self._fixedDatumRecords = value + fixedDatumRecords = property(get_fixedDatumRecords, set_fixedDatumRecords) + + + def add_fixedDatumRecords(self, value : FixedDatum): + self._fixedDatumRecords.append(value) + + + """ + /// Name : fixedDatumRecords + /// UID : + /// Type : FixedDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Fixed datum records + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_variableDatumRecords(self): + return self._variableDatumRecords + def set_variableDatumRecords(self, value): + self._variableDatumRecords = value + variableDatumRecords = property(get_variableDatumRecords, set_variableDatumRecords) + + + def add_variableDatumRecords(self, value : VariableDatum): + self._variableDatumRecords.append(value) + + + """ + /// Name : variableDatumRecords + /// UID : + /// Type : VariableDatum + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Variable datum records + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RequiredReliabilityService : " + self.requiredReliabilityService.get_description + "(" + (str(int(self.requiredReliabilityService))) + ")" + "\n" + outputString += "Pad1 : " + str(self.pad1) + "\n" + outputString += "Pad2 : " + str(self.pad2) + "\n" + outputString += "RequestID : " + str(self.requestID) + "\n" + outputString += "NumberOfFixedDatumRecords : " + str(len(self._fixedDatumRecords)) + "\n" + outputString += "NumberOfVariableDatumRecords : " + str(len(self._variableDatumRecords)) + "\n" + outputString += "FixedDatumRecords : " + "\n" + for idx in range(0, len(self._fixedDatumRecords)): + outputString += self._fixedDatumRecords[idx].to_string() + + outputString += "VariableDatumRecords : " + "\n" + for idx in range(0, len(self._variableDatumRecords)): + outputString += self._variableDatumRecords[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( SetDataRPdu, self ).serialize(outputStream) + self.serialize_enum(self.requiredReliabilityService,outputStream) + outputStream.write_byte(int(self.pad1)) + outputStream.write_short(int(self.pad2)) + outputStream.write_int(int(self.requestID)) + outputStream.write_int( len(self._fixedDatumRecords)) + outputStream.write_int( len(self._variableDatumRecords)) + for anObj in self._fixedDatumRecords: + anObj.serialize(outputStream) + + for anObj in self._variableDatumRecords: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( SetDataRPdu, self).parse(inputStream) + self.requiredReliabilityService = RequiredReliabilityService.get_enum(self.parse_enum(self.requiredReliabilityService,inputStream)) + self.pad1 = inputStream.read_byte() + self.pad2 = inputStream.read_short() + self.requestID = inputStream.read_int() + self.numberOfFixedDatumRecords = inputStream.read_int() + self.numberOfVariableDatumRecords = inputStream.read_int() + for idx in range(0, self.numberOfFixedDatumRecords): + element = FixedDatum() + element.parse(inputStream) + self._fixedDatumRecords.append(element) + + for idx in range(0, self.numberOfVariableDatumRecords): + element = VariableDatum() + element.parse(inputStream) + self._variableDatumRecords.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 8 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/set_record_reliable_pdu.py b/dis/set_record_reliable_pdu.py new file mode 100644 index 0000000..5e6f8d7 --- /dev/null +++ b/dis/set_record_reliable_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class SetRecordReliablePdu( object ): + """Alias, more descriptive name for SetRecordRPdu.""" + + def __init__(self): + """ Initializer for SetRecordReliablePdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/set_record_rpdu.py b/dis/set_record_rpdu.py new file mode 100644 index 0000000..f7cd00c --- /dev/null +++ b/dis/set_record_rpdu.py @@ -0,0 +1,166 @@ +from enum import Enum + +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .siso_ref_010.enums.required_reliability_service import RequiredReliabilityService +from .simulation_management_with_reliability_family_pdu import SimulationManagementWithReliabilityFamilyPdu +from .record_specification import RecordSpecification + +class SetRecordRPdu( SimulationManagementWithReliabilityFamilyPdu ): + """5.12.4.15 Used to set or change certain parameter values. These parameter values are contained within a record format as compared to the datum format used in the Set Data-R PDU.""" + + def __init__(self): + """ Initializer for SetRecordRPdu""" + super().__init__() + """ request ID provides a unique identifier""" + self.requestID = 0 + # /** level of reliability service used for this transaction uid 74 */ + self.requiredReliabilityService = RequiredReliabilityService.default + + self.pad1 = 0 + self.pad2 = 0 + self.pad3 = 0 + """ Number of record sets in list""" + self.numberOfRecordSets = 0 + """ record sets""" + self._recordSets = [] + self.pduType = DisPduType.set_record_reliable + + + def get_numberOfRecordSets(self): + return len(self._recordSets) + def set_numberOfRecordSets(self, value): + numberOfRecordSets = value + + + def get_recordSets(self): + return self._recordSets + def set_recordSets(self, value): + self._recordSets = value + recordSets = property(get_recordSets, set_recordSets) + + + def add_recordSets(self, value : RecordSpecification): + self._recordSets.append(value) + + + """ + /// Name : recordSets + /// UID : + /// Type : RecordSpecification + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : record sets + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RequestID : " + str(self.requestID) + "\n" + outputString += "RequiredReliabilityService : " + self.requiredReliabilityService.get_description + "(" + (str(int(self.requiredReliabilityService))) + ")" + "\n" + outputString += "Pad1 : " + str(self.pad1) + "\n" + outputString += "Pad2 : " + str(self.pad2) + "\n" + outputString += "Pad3 : " + str(self.pad3) + "\n" + outputString += "NumberOfRecordSets : " + str(len(self._recordSets)) + "\n" + outputString += "RecordSets : " + "\n" + for idx in range(0, len(self._recordSets)): + outputString += self._recordSets[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( SetRecordRPdu, self ).serialize(outputStream) + outputStream.write_int(int(self.requestID)) + self.serialize_enum(self.requiredReliabilityService,outputStream) + outputStream.write_byte(int(self.pad1)) + outputStream.write_short(int(self.pad2)) + outputStream.write_int(int(self.pad3)) + outputStream.write_int( len(self._recordSets)) + for anObj in self._recordSets: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( SetRecordRPdu, self).parse(inputStream) + self.requestID = inputStream.read_int() + self.requiredReliabilityService = RequiredReliabilityService.get_enum(self.parse_enum(self.requiredReliabilityService,inputStream)) + self.pad1 = inputStream.read_byte() + self.pad2 = inputStream.read_short() + self.pad3 = inputStream.read_int() + self.numberOfRecordSets = inputStream.read_int() + for idx in range(0, self.numberOfRecordSets): + element = RecordSpecification() + element.parse(inputStream) + self._recordSets.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 7 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/shaft_rpm.py b/dis/shaft_rpm.py new file mode 100644 index 0000000..72e8fb8 --- /dev/null +++ b/dis/shaft_rpm.py @@ -0,0 +1,91 @@ +from enum import Enum + + +class ShaftRPM( object ): + """Current Shaft RPM, Ordered Shaft RPM for use by Underwater Acoustic (UA) PDU. Section 7.6.4""" + + def __init__(self): + """ Initializer for ShaftRPM""" + self.currentRPM = 0 + self.orderedRPM = 0 + self.RPMrateOfChange = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "CurrentRPM : " + str(self.currentRPM) + "\n" + outputString += "OrderedRPM : " + str(self.orderedRPM) + "\n" + outputString += "RPMrateOfChange : " + str(self.RPMrateOfChange) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.currentRPM)) + outputStream.write_short(int(self.orderedRPM)) + outputStream.write_int(int(self.RPMrateOfChange)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.currentRPM = inputStream.read_short() + self.orderedRPM = inputStream.read_short() + self.RPMrateOfChange = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/signal_pdu.py b/dis/signal_pdu.py new file mode 100644 index 0000000..6ef74ea --- /dev/null +++ b/dis/signal_pdu.py @@ -0,0 +1,134 @@ +from enum import Enum + +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .radio_communications_family_pdu import RadioCommunicationsFamilyPdu +from .siso_ref_010.enums.signal_tdltype import SignalTDLType +from .radio_comms_header import RadioCommsHeader + +class SignalPdu( RadioCommunicationsFamilyPdu ): + """5.8.4 Conveys the audio or digital data carried by the simulated radio or intercom transmission.""" + + def __init__(self): + """ Initializer for SignalPdu""" + super().__init__() + # header is an undescribed parameter... + self.header = RadioCommsHeader() + """ encoding scheme used, and enumeration""" + self.encodingScheme = 0 + # /** tdl type uid 178 */ + self.tdlType = SignalTDLType.default + + """ sample rate""" + self.sampleRate = 0 + """ length of data in bits""" + self.dataLength = 0 + """ number of samples""" + self.samples = 0 + """ list of eight bit values""" + self.data = [] + self.padTo32 = [0] * 32 + self.pduType = DisPduType.signal + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "Header :" + "\n" + self.header.to_string() + "\n" + outputString += "EncodingScheme : " + str(self.encodingScheme) + "\n" + outputString += "SignalTDLType : " + self.tdlType.get_description + "(" + (str(int(self.tdlType))) + ")" + "\n" + outputString += "SampleRate : " + str(self.sampleRate) + "\n" + outputString += "DataLength : " + str(self.dataLength) + "\n" + outputString += "Samples : " + str(self.samples) + "\n" + outputString += "Data : " + "\n" + for idx in range(0, len(self.data)): + outputString += str(self.data[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( SignalPdu, self ).serialize(outputStream) + self.header.serialize(outputStream) + outputStream.write_short(int(self.encodingScheme)) + self.serialize_enum(self.tdlType,outputStream) + outputStream.write_int(int(self.sampleRate)) + outputStream.write_short(int(self.dataLength)) + outputStream.write_short(int(self.samples)) + for idx in range(0, 0): + outputStream.write_unsigned_byte( self.data[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( SignalPdu, self).parse(inputStream) + self.header.parse(inputStream) + self.encodingScheme = inputStream.read_short() + self.tdlType = SignalTDLType.get_enum(self.parse_enum(self.tdlType,inputStream)) + self.sampleRate = inputStream.read_int() + self.dataLength = inputStream.read_short() + self.samples = inputStream.read_short() + self.data = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_byte() + self.data[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 8 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/silent_entity_system.py b/dis/silent_entity_system.py new file mode 100644 index 0000000..8e6b047 --- /dev/null +++ b/dis/silent_entity_system.py @@ -0,0 +1,109 @@ +from enum import Enum + +from .entity_type import EntityType + +class SilentEntitySystem( object ): + """information abou an enitity not producing espdus. Section 6.2.79""" + + def __init__(self): + """ Initializer for SilentEntitySystem""" + """ number of the type specified by the entity type field""" + self.numberOfEntities = 0 + """ number of entity appearance records that follow""" + self.numberOfAppearanceRecords = 0 + """ Entity type""" + self.entityType = EntityType() + """ Variable length list of appearance records""" + self.appearanceRecordList = [] + + def to_string(self) ->str: + outputString = "" + outputString += "NumberOfEntities : " + str(self.numberOfEntities) + "\n" + outputString += "NumberOfAppearanceRecords : " + str(self.numberOfAppearanceRecords) + "\n" + outputString += "EntityType :" + "\n" + self.entityType.to_string() + "\n" + outputString += "AppearanceRecordList : " + "\n" + for idx in range(0, len(self.appearanceRecordList)): + outputString += str(self.appearanceRecordList[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.numberOfEntities)) + outputStream.write_short(int(self.numberOfAppearanceRecords)) + self.entityType.serialize(outputStream) + for idx in range(0, 0): + outputStream.write_int( self.appearanceRecordList[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.numberOfEntities = inputStream.read_short() + self.numberOfAppearanceRecords = inputStream.read_short() + self.entityType.parse(inputStream) + self.appearanceRecordList = [0]*0 + for idx in range(0, 0): + val = inputStream.read_int() + self.appearanceRecordList[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/simulation_address.py b/dis/simulation_address.py new file mode 100644 index 0000000..cc2a8b8 --- /dev/null +++ b/dis/simulation_address.py @@ -0,0 +1,89 @@ +from enum import Enum + + +class SimulationAddress( object ): + """A Simulation Address record shall consist of the Site Identification number and the Application Identification number. Section 6.2.79 """ + + def __init__(self): + """ Initializer for SimulationAddress""" + """ A site is defined as a facility, installation, organizational unit or a geographic location that has one or more simulation applications capable of participating in a distributed event. """ + self.site = 0 + """ An application is defined as a software program that is used to generate and process distributed simulation data including live, virtual and constructive data.""" + self.application = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "Site : " + str(self.site) + "\n" + outputString += "Application : " + str(self.application) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.site)) + outputStream.write_short(int(self.application)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.site = inputStream.read_short() + self.application = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/simulation_identifier.py b/dis/simulation_identifier.py new file mode 100644 index 0000000..146943a --- /dev/null +++ b/dis/simulation_identifier.py @@ -0,0 +1,90 @@ +from enum import Enum + +from .simulation_address import SimulationAddress + +class SimulationIdentifier( object ): + """The unique designation of a simulation when using the 48-bit identifier format shall be specified by the Sim- ulation Identifier record. The reason that the 48-bit format is required in addition to the 32-bit simulation address format that actually identifies a specific simulation is because some 48-bit identifier fields in PDUs may contain either an Object Identifier, such as an Entity ID, or a Simulation Identifier. Section 6.2.80""" + + def __init__(self): + """ Initializer for SimulationIdentifier""" + """ Simulation address """ + self.simulationAddress = SimulationAddress() + """ This field shall be set to zero as there is no reference number associated with a Simulation Identifier.""" + self.referenceNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "SimulationAddress :" + "\n" + self.simulationAddress.to_string() + "\n" + outputString += "ReferenceNumber : " + str(self.referenceNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.simulationAddress.serialize(outputStream) + outputStream.write_short(int(self.referenceNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.simulationAddress.parse(inputStream) + self.referenceNumber = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/simulation_management_family_pdu.py b/dis/simulation_management_family_pdu.py new file mode 100644 index 0000000..68cfd44 --- /dev/null +++ b/dis/simulation_management_family_pdu.py @@ -0,0 +1,97 @@ +from enum import Enum + +from .simulation_identifier import SimulationIdentifier +from .pdu_base import PduBase +from .siso_ref_010.enums.disprotocol_family import DISProtocolFamily + +class SimulationManagementFamilyPdu( PduBase ): + """First part of a simulation management (SIMAN) PDU and SIMAN-Reliability (SIMAN-R) PDU. Sectionn 6.2.81""" + + def __init__(self): + """ Initializer for SimulationManagementFamilyPdu""" + super().__init__() + """ IDs the simulation or entity, either a simulation or an entity. Either 6.2.80 or 6.2.28""" + self.originatingID = SimulationIdentifier() + """ simulation, all simulations, a special ID, or an entity. See 5.6.5 and 5.12.4""" + self.receivingID = SimulationIdentifier() + self.protocolFamily = DISProtocolFamily.simulation_management + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "OriginatingID :" + "\n" + self.originatingID.to_string() + "\n" + outputString += "ReceivingID :" + "\n" + self.receivingID.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( SimulationManagementFamilyPdu, self ).serialize(outputStream) + self.originatingID.serialize(outputStream) + self.receivingID.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( SimulationManagementFamilyPdu, self).parse(inputStream) + self.originatingID.parse(inputStream) + self.receivingID.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/simulation_management_with_reliability_family_pdu.py b/dis/simulation_management_with_reliability_family_pdu.py new file mode 100644 index 0000000..60fd4d8 --- /dev/null +++ b/dis/simulation_management_with_reliability_family_pdu.py @@ -0,0 +1,97 @@ +from enum import Enum + +from .simulation_identifier import SimulationIdentifier +from .pdu_base import PduBase +from .siso_ref_010.enums.disprotocol_family import DISProtocolFamily + +class SimulationManagementWithReliabilityFamilyPdu( PduBase ): + """Simulation Management with Reliability PDUs with reliability service levels in a DIS exercise are an alternative to the Simulation Management PDUs, and may or may not be required for participation in an DIS exercise,""" + + def __init__(self): + """ Initializer for SimulationManagementWithReliabilityFamilyPdu""" + super().__init__() + """ IDs the simulation or entity, either a simulation or an entity. Either 6.2.80 or 6.2.28""" + self.originatingID = SimulationIdentifier() + """ simulation, all simulations, a special ID, or an entity. See 5.6.5 and 5.12.4""" + self.receivingID = SimulationIdentifier() + self.protocolFamily = DISProtocolFamily.simulation_management_with_reliability + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "OriginatingID :" + "\n" + self.originatingID.to_string() + "\n" + outputString += "ReceivingID :" + "\n" + self.receivingID.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( SimulationManagementWithReliabilityFamilyPdu, self ).serialize(outputStream) + self.originatingID.serialize(outputStream) + self.receivingID.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( SimulationManagementWithReliabilityFamilyPdu, self).parse(inputStream) + self.originatingID.parse(inputStream) + self.receivingID.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/siso_ref_010/enums/Acronyms.py b/dis/siso_ref_010/enums/Acronyms.py new file mode 100644 index 0000000..51aaee7 --- /dev/null +++ b/dis/siso_ref_010/enums/Acronyms.py @@ -0,0 +1,794 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +# autogenerated using string template disdictenumpart1.txt +# Generated from the XML, + +# package edu.nps.moves.dis7.enumerations; + +# dis Dictionary Enumerations UID 2 + +class Acronyms: + _acronymsList = { + "AA" : "Anti-Aircraft", + "AAA" : "Anti-Aircraft Artillery", + "AABNCP" : "Advanced Airborne Command Post", + "AAC" : "Anti-Aircraft Common", + "AAG" : "Air-to-Air-to-Ground", + "AARV" : "Armoured Ammunition Resupply Vehicle", + "AASM" : "Armement Air-Sol Modulaire (air-to-ground modular weapon)", + "AAV" : "Amphibious Assault Vehicle", + "AAWSM" : "Advanced Anti-Tank Weapon System-Medium", + "ABCCC" : "Airborne Command, Control and Communications", + "ABL" : "Airborne Laser", + "ABLE" : "Automotive Bridge Launching Equipment", + "ABM" : "Anti-Ballistic Missile", + "ABMOC" : "Air Battle Management Operations Center", + "ABS" : "Amphibious Bridging System", + "ACAS" : "Airborne Collision Avoidance System", + "ACV" : "Armored Command Vehicle", + "AD" : "Air Defense", + "ADA" : "Air Defense Artillery", + "ADAM" : "Area Denial Artillery/Anti-Personnel Munition", + "ADATS" : "Air Defense Anti-Tank System", + "ADCAP" : "Advanced Capability", + "ADCP" : "Air Defense Communications Platform", + "ADPCM" : "Adaptive Differential Pulse Code Modulation", + "ADSM" : "Air Defense Suppression Missile", + "AE" : "Ammunition Ship", + "AEPDS" : "Advanced Electronic Processing and Dissemination System", + "AESOP" : "Airborne Electro-Optical Special Operations Payload", + "AEV" : "Armored Engineering Vehicle", + "AEW" : "Airborne Early Warning", + "AEWC" : "Airborne Early Warning & Control", + "AFARV" : "Armored, Forward-Area, Rearm Vehicle", + "AFAS" : "Advanced Field Artillery System", + "AFF" : "Aufklarungs-, Fuhrungs- und Feuerleitfahrzeug (reconnaissance, command and fire control vehicle)", + "AFS" : "Auxiliary Fleet Support", + "AFSK" : "Audio Frequency Shift Keying", + "AFSOF" : "Air Force Special Operations Forces", + "AFV" : "Amphibious Fighting Vehicle", + "AG" : "Auxiliary General", + "AGB" : "Icebreaker", + "AGI" : "Auxiliary General Intelligence", + "AGS" : "Advanced Gun System", + "AGSS" : "Auxiliary Submarine", + "AHIP" : "Army Helicopter Improvement Program", + "AHM" : "Anti-Helicopter Mine", + "AHTS" : "Anchor Handling Tug Supply Vessel", + "AII" : "Active Interrogation Indicator", + "AIS" : "Automatic Identification System", + "AIT" : "Auxiliary Intelligence Trawler", + "AK" : "Cargo Ship", + "AKL" : "Cargo Ship, Light", + "ALARM" : "Air-Launched Anti-Radiation Missile (UK)", + "ALCM" : "Air Launched Cruise Missile", + "ALERT" : "Attack and Launch Early Reporting to Theater", + "ALRS" : "Avion Leger de Surveillance et de Reconnaissance (Light Surveillance and Reconnaissance Aircraft)", + "ALSV" : "Armored Logistics Support Vehicle", + "AM" : "Amplitude Modulation", + "AMC" : "Armored Mortar Carrier", + "AMG" : "Antenna Mast Group", + "AMR" : "Anti-Materiel Rifle", + "AMRAAM" : "Advanced Medium Range Air-to-Air Missile", + "AMV" : "Armored Maintenance Vehicle", + "AO" : "Auxiliary Oiler", + "AOE" : "Fast Combat Support Ship", + "AOL" : "Auxiliary Oiler, Light", + "AOPV" : "Arctic Offshore Patrol Vessel", + "AOR" : "Auxiliary Oiler, Replenishment", + "AOT" : "Auxiliary Oiler, Transport", + "AOTL" : "Auxiliary Oiler, Transport Light", + "AP" : "Armor Piercing or Transport", + "APA" : "Additional Passive Activity", + "APC" : "Armored Personnel Carrier", + "APDS" : "Armor-Piercing Discarding Sabot", + "APERS" : "Anti-Personnel", + "APEX" : "Armor Piercing with Explosive", + "APFSDS" : "Armor Piercing Fin Stabilized Discarding Sabot", + "APFSDST" : "Armor Piercing Fin Stabilized Discarding Sabot with Tracer", + "APHE" : "Armor Piercing High Explosive", + "API" : "Armor Piercing Incendiary", + "APKWS" : "Advanced Precision Kill Weapon System", + "APOBS" : "Anti-Personnel Obstacle Breaching System", + "APV" : "Armored Patrol Vehicle", + "AR" : "Repair ship", + "ARH" : "Armed Reconnaissance Helicopter", + "ARL" : "Airborne Reconnaissance Low", + "ARM" : "Anti-Radiation Missile", + "ARMD" : "Anti-Radiation Missile Decoy", + "ARSOF" : "Army Special Operation Forces", + "ARTHUR" : "Artillery Hunting Radar", + "ARV" : "Armored Recovery Vehicle", + "ASCII" : "American Standard Code for Information Interchange", + "ASCM" : "Anti-Ship Cruise Missile", + "ASDS" : "Advanced SEAL Delivery System", + "ASM" : "Air-to-Surface Missile or Anti-Ship Missile", + "ASR" : "Submarine Rescue Ship", + "ASRAAM" : "Advanced Short Range Air-to-Air Missile", + "ASROC" : "Anti-Submarine Rocket", + "ASTROS" : "Artillery Saturation Rocket System", + "ASW" : "Anti-Submarine Warfare", + "AT" : "Anti-Tank", + "ATacMS" : "Army Tactical Missile System", + "ATBM" : "Anti-Tactical Ballistic Missile", + "ATF" : "Allschutz-Transport-Fahrzeug (all-protected transport vehicle)", + "ATFLIR" : "Advanced Targeting Forward Looking Infrared", + "ATG" : "Anti-Tank Gun", + "ATGM" : "Anti-Tank Guided Missile", + "ATGW" : "Anti-Tank Guided Weapon", + "ATIRCM" : "Advanced Threat Infrared Countermeasures", + "ATTC" : "All Terrain Tracked Carrier", + "ATTV" : "All-Terrain Tow Vehicle", + "ATV" : "All-Terrain Vehicle", + "AUV" : "Autonomous Underwater Vehicle", + "AVLB" : "Armored Vehicle-Launched Bridge", + "AVRE" : "Armored Vehicle, Royal Engineers", + "AW" : "Water Tanker", + "AWACS" : "Airborne Warning and Control System", + "AXT" : "Training ship tender", + "BAT" : "Brilliant Anti-Tank", + "BATS" : "Ballistic Aerial Target System", + "BB" : "Base Bleed", + "BCP" : "Battery Command Post", + "BD" : "Base Detonation", + "BDR" : "Battle Damage Repair", + "BFUF" : "Batteriefuhrungsfahrzeug/Unterstutzungszelle Flugabwehr (battery management vehicle/air defense support)", + "BFA" : "Battle Field Ambulance", + "BG" : "Battle Group", + "BIDS" : "Biological Integrated Detection System", + "BN" : "Battalion", + "BRD" : "Bomb and Rocket Dispenser", + "BRU" : "Bomb Rack Unit", + "BTOC" : "Battalion Tactical Operations Center", + "BVRAAM" : "Beyond Visual Range Air-to-Air Missile", + "BZ" : "Benactyzine, Chemical warfare incapacitating agent", + "C2" : "Command and Control", + "C2W" : "Command and Control Warfare", + "C3" : "Command, Control and Communication", + "C3I" : "Command, Control, Communications and Intelligence", + "C4I" : "Command, Control, Communications, Computers and Intelligence", + "CAEW" : "Compact Airborne Early Warning", + "CALCM" : "Conventional Air Launched Cruise Missile", + "CAMM" : "Common Anti-Air Modular Missile", + "CAMMER" : "Common Anti-Air Modular Missile - Extended Range", + "CAPTOR" : "Encapsulated Torpedo", + "CASW" : "Close Area Suppression Weapon", + "CAT" : "Combined Arms Team", + "CAV" : "Composite Armored Vehicle", + "CAWS" : "Close Assault Weapon System", + "CBLS" : "Carrier Bomb Light Stores", + "CBPSS" : "Chemically and Biologically Protected Shelter System", + "CBT" : "Common Bridge Transporter", + "CBU" : "Cluster Bomb Unit", + "CCITT" : "International Telegraph and Telephone Consultative Committee", + "CCS" : "Communications Control Set", + "CCTT" : "Close Combat Tactical Trainer", + "CDB" : "Combat Dozer Blade", + "CDS" : "Container Delivery System", + "CEI" : "Coupled Extension Indicator", + "CEM" : "Combined Effects Munition", + "CFV" : "Cavalry Fighting Vehicle", + "CGS" : "Common Ground Station", + "CHE" : "Container Handling Equipment", + "CIRCM" : "Common Infrared Countermeasures", + "CITV" : "Commander's Independent Thermal Viewer", + "CIWS" : "Close-In Weapon System", + "CLAWS" : "Complementary Low Altitude Weapon System", + "CLV" : "Command and Liaison Vehicle", + "CMWS" : "Common Missile Warning System", + "COD" : "Carrier Onboard Delivery", + "COIL" : "Chemical Oxygen Iodine Laser", + "COM" : "Command and Control Vehicle", + "CP" : "Command Post", + "CPN" : "Command Post Node", + "CPV" : "Command Post Vehicle", + "CRC" : "Control and Reporting Center", + "CRE" : "Control and Reporting Element", + "CRG" : "Communcations Relay Group", + "CROWS" : "Common Remotely Operated Weapon Station", + "CRP" : "Control and Reporting Post", + "CRV" : "Combat Reconnaissance Vehicle", + "CSAR" : "Combat Search and Rescue", + "CSP" : "Common Sensor Payload", + "CTA" : "Cased Telescopic Ammunition", + "CTIS" : "Central Tire Inflation System", + "CTOL" : "Conventional Take-Off and Landing", + "CUAS" : "Counter Unmanned Aircraft System", + "CUCV" : "Commercial Utility Cargo Vehicle", + "CV" : "Aircraft Carrier; Command Variant", + "CVCC" : "Combat Vehicle Command and Control", + "CVN" : "Aircraft Carrier Nuclear-powered", + "CVS" : "Antisubmarine Aircraft Carrier", + "CVSD" : "Continuously Variable Slope Delta (modulation)", + "CVSG" : "Carrier Vessel Submarine Guided", + "CVT" : "Continuous Variable Time", + "CW" : "Continuous Wave", + "CWAR" : "Continuous Wave Acquisition Radar", + "DAACM" : "Direct Airfield Attack Combined Munition", + "DAGR" : "Direct Attack Guided Rocket", + "DAP" : "Direct Action Penetrator", + "DC" : "Detection Center", + "DD" : "Destroyer", + "DDG" : "Guided Missile Destroyer", + "DE" : "Directed Energy", + "DED" : "Diesel Engine Driven", + "DEUCE" : "Deployable Universal Combat Earthmover", + "DF" : "Direction Finder", + "DIRCM" : "Directional Infrared Countermeasures", + "DIS" : "Distributed Interactive Simulation", + "DME" : "Distance Measuring Equipment", + "DMSP" : "Defense Meteorological Satellite Program", + "DP" : "Dual-Purpose", + "DPICM" : "Dual-Purpose Improved Conventional Munition", + "DRA" : "Dead Reckoning Algorithm or Dual Rail Adapter", + "DRM" : "Dead Reckoning Model", + "DRS" : "Data Relay Satellite", + "DS" : "Discarding Sabot", + "DSB" : "Double Sideband", + "DSCS" : "Defense Satellite Communication System", + "DSP" : "Defense Support Program", + "DST" : "Destructor", + "DTI" : "Detonation Type Indicator", + "DTSS" : "Digital Topographic Support System", + "DU" : "Depleted Uranium", + "DWT" : "Deadweight Tonnage", + "EA" : "Electronic Attack", + "EAS" : "Electronic Attack Systems", + "EBR" : "Engin Blinde de Reconnaissance (armored reconnaissance vehicle)", + "ECM" : "Electronic Countermeasures", + "ECR" : "Electronic Combat/Countermeasures & Reconnaissance", + "ECS" : "Engagement Control Station", + "EFM" : "Enhanced Fighter Maneuverability", + "EFP" : "Explosively Formed Penetrator", + "EFVS" : "Electronic Fighting Vehicle System", + "EGBU" : "Enhanced Guided Bomb Unit", + "ELAV" : "Engineer LAV", + "ELINT" : "Electronic Intelligence", + "ELVA" : "Emergency Low Visibility Approach", + "EMA" : "Excavator Manipulator Arm", + "EMATT" : "Expendable Mobile ASW Training Target", + "EMT" : "Emergency Medical Technician", + "EOD" : "Explosive Ordnance Disposal", + "EOS" : "Electro-Optical Sensor", + "EOTS" : "Electo-Optical Targeting System", + "EPIRB" : "Emergency Position-Indicating Radio Beacons", + "EPLRS" : "Enhanced Position Location Reporting System", + "EPLS" : "Enhanced Pallet Load System", + "EPP" : "Electric Power Plant", + "EPS" : "External Personnel System", + "ERAM" : "Extended Range Anti-Armor Munition", + "ERFB" : "Extended Range Full Bore", + "ERINT" : "Extended Range Interceptor", + "ERRV" : "Emergency Response and Rescue Vessel", + "ERS" : "European Remote sensing Satellite", + "ESK" : "Einsatzfahrzeug fur spezialisierte Krafte (light protected vehicle for specialised forces)", + "ESS" : "Extended Self-protection Suite", + "ESSS" : "External Stores Support System", + "ETRAC" : "Enhanced Tactical Radar Correlater", + "ETSI" : "European Telecommunications Standards Institute", + "EW" : "Electronic Warfare", + "E2I" : "Endo-Exoatmospheric Interceptor", + "EXTRA" : "Extended Range Artillery", + "FAASV" : "Field Artillery Ammunition Support Vehicle", + "FAE" : "Fuel-Air Explosive", + "FAMV" : "Forward Area Multi-purpose Vehicle", + "FAPDS" : "Frangible Armor Piercing Discarding Sabot", + "FASCAM" : "Family of Scatterable Mines", + "FAV" : "Fast Attack Vehicle", + "FCEP" : "Fast Landing Craft for Equipment and Personnel", + "FCR" : "Fire Control Radar", + "FCS" : "Future Combat Systems or Fire Control System", + "FCV" : "Forward Command Vehicle", + "FDC" : "Fire Direction Center", + "FF" : "Frigate", + "FFG" : "Guided Missile Frigate", + "FFL" : "Light Frigate", + "FFLG" : "Guided Missile Light Frigate or Corvette", + "FISTV" : "Fire Support Team Vehicle", + "FLIR" : "Forward Looking Infrared", + "FM" : "Frequency Modulation", + "FMTV" : "Family of Medium Tactical Vehicles", + "FOGM" : "Fiber Optic Guided Missile", + "FOMP" : "Fiber Optic Mortar Projectile", + "FOV" : "Forward Observation Vehicle", + "FRAG" : "Fragmentation", + "FRISC" : "Fast Raiding Interception Special Forces Craft", + "FRS" : "Forward Repair System", + "FRT" : "Forward Repair Team", + "FS" : "Fin Stabilized or Corvette", + "FSG" : "Corvette Guided Missile", + "FSK" : "Frequency Shift Keying", + "FTI" : "Fire Type Indicator", + "FWMP" : "Full Width Mine Plough", + "GVLLD" : "Ground/Vehicular Laser Locator Designator", + "GAM" : "GPS-Aided Munition", + "GB" : "Sarin", + "GBCSH" : "Ground Based Common Sensor Heavy", + "GBCSL" : "Ground Based Common Sensor Light", + "GBR" : "Ground-Based Radar", + "GBU" : "Guided Bomb Unit", + "GD" : "Soman", + "GDT" : "Ground Data Terminal", + "GLCM" : "Ground Launched Cruise Missile", + "GLHH" : "Ground Launched Hellfire: Heavy", + "GMG" : "Grenade Machine Gun", + "GMLRS" : "Guided Multiple Launched Rocket System", + "GMT" : "Guided Missile Transporter", + "GMV" : "General Maintenance Vehicle", + "GP" : "General Purpose", + "GPH" : "Gallons Per Hour", + "GPMP" : "General Purpose Machine Gun", + "GPS" : "Global Positioning System; Gunner's Primary Sight", + "GSM" : "Global System for Mobile Communications or Ground Station Module", + "GTI" : "German Tank Improvement", + "GTK" : "Gepanzertes Transport Kraftfahrzeug (armoured transport vehicle)", + "HAGA" : "Heavily Armored Ground Ambulance", + "HARM" : "High-Speed Anti-Radiation Missile", + "HC" : "Hexachloroethane Zinc", + "HCER" : "High Capacity Extended Range", + "HE" : "High Explosive", + "HEAT" : "High Explosive Anti-Tank", + "HEDP" : "High Explosive Dual Purpose", + "HEER" : "High Explosive Extended Range", + "HEI" : "High Explosive-Incendiary", + "HEMAT" : "Heavy Expanded Mobility Ammunition Trailer", + "HEMTT" : "Heavy Expanded Mobility Tactical Truck", + "HEP" : "High Explosive Plastic", + "HERA" : "High Explosive Rocket Assisted", + "HET" : "Heavy Equipment Transporter", + "HILHS" : "Heavy Integrated Load Handling System", + "HIMAD" : "High-to-Medium Altitude Air Defense", + "HL" : "Mustard-Lewisite", + "HMEE" : "High Mobility Engineer Excavator", + "HMG" : "Heavy Machine Gun", + "HMMWV" : "High Mobility Multipurpose Wheeled Vehicle", + "HMT" : "High Mobility Transporter", + "HOJ" : "Home On Jam", + "HOT" : "High subsonic Optically Teleguided", + "HPI" : "High-Power Illuminator", + "HPW" : "High Power Microwave", + "HQ" : "Headquarters", + "HSIC" : "High Speed Infiltration Craft", + "HST" : "Hypersonic Transport", + "HTARS" : "HEMTT Tanker Aviation Refueling System", + "HUMRAAM" : "HMMWV-mounted Advanced Medium Range Air-to-Air Missile", + "HVAP" : "High Velocity Armor Piercing", + "HVM" : "High Velocity Missile", + "IADS" : "Integrated Air Defense System", + "IAI" : "Intercom Attached Indicator", + "IAP" : "Integrated Armor Protection", + "IBS" : "Integrated Broadcast Service", + "ICC" : "Information Coordination Central", + "ICM" : "Improved Conventional Munition", + "IEEE" : "Institute of Electrical and Electronic Engineers", + "IFDL" : "Intra Flight Data Link", + "IFF" : "Identification, Friend or Foe", + "IFU" : "Integrated Fire Unit", + "IFV" : "Infantry Fighting Vehicle", + "ILS" : "Instrumented Landing System", + "IMMLC" : "Improved Medium Mobility Load Carrier", + "INS" : "Inertial Navigation system", + "IO" : "Information Operations", + "IR" : "Infrared", + "IRST" : "InfraRed Search and Tracking", + "ISB" : "Independent Sideband", + "ISC" : "Infantry Section Carrier", + "ISLS" : "Interrogation Path Side Lobe Suppression", + "ISM" : "IFF Simulation Mode", + "ISR" : "Intelligence Surveillance and Reconnaissance", + "IST" : "Institute for Simulation and Training", + "ISTAR" : "Intelligence, Surveillance, Target Acquisition and Reconnaissance", + "ITAS" : "Improved Target Acquisition system", + "ITOW" : "Improved TOW", + "ITV" : "Improved TOW Vehicle", + "JAGM" : "Joint Air-to-Ground Missile", + "JASSM" : "Joint Air-to-Surface Standoff Missile", + "JDAM" : "Joint Direct Attack Munition", + "JETDS" : "Joint Electronics Type Designation System", + "JIEO" : "Joint Interoperability Engineering Organization", + "JLENS" : "Joint Land Attack Cruise Missile Defense Elevated Netted Sensor System", + "JNN" : "Joint Network Node", + "JPALS" : "Joint Precision Approach and Landing System", + "JSF" : "Joint Strike Fighter", + "JSTARS" : "Joint Surveillance & Target Attack Radar System", + "JTAGS" : "Joint Tactical Ground Station", + "JTIDS" : "Joint Tactical Information Distribution System", + "KE" : "Kinetic Energy", + "LACM" : "Land Attack Cruise Missile", + "LAHAT" : "Laser Homing Attack/Laser Homing Anti-Tank", + "LANTIRN" : "Low Altitude Navigation and Targeting Infrared for Night", + "LAPESAD" : "Low Altitude Parachute Extraction System/Air Drop", + "LAPV" : "Light Armoured Patrol Vehicle", + "LARC5" : "Lighter Amphibious Resupply Cargo, 5 ton", + "LASA" : "Light Air Support Aircraft", + "LASH" : "Lighter Aboard Ship", + "LAU" : "Launcher Armament Unit", + "LAV" : "Light Armored Vehicle", + "LAW" : "Light Anti-Tank Weapon", + "LCAC" : "Landing Craft Air Cusion", + "LCDB" : "Low Collateral Damage Bomb", + "LCM" : "Landing Craft, Mechanized/Medium", + "LCMR" : "Lightweight Counter Mortar Radar", + "LCP" : "Landing Craft Personnel", + "LCPA" : "Landing Craft Personnel Air-Cushioned", + "LCPL" : "Landing Craft Personnel, Large", + "LCS" : "Littoral Combat Ships", + "LCT" : "Landing Craft, Tank", + "LCU" : "Landing Craft, Utility", + "LCV" : "Lightweight Combat Vehicle", + "LCVP" : "Landing Craft Vehicle Personnel", + "LES" : "Lincoln Experimental Satellite", + "LGB" : "Laser-Guided Bomb", + "LHD" : "Landing Helicopter Dock", + "LHS" : "Load Handling System", + "LL" : "Luftlandetruppen (airborne forces)", + "LLC" : "LHD Landing Craft", + "LLDR" : "Lightweight Laser Designator Rangefinder", + "LML" : "Lightweight Multiple Launcher", + "LMTV" : "Light Medium Tactical Vehicle", + "LNG" : "Liquefied Natural Gas", + "LOCAAS" : "Low Cost Autonomous Attack System", + "LOG" : "Logistics", + "LOS" : "Line-of-Sight", + "LOSAT" : "Line-of-Sight Anti-Tank", + "LPD" : "Amphibious Transport Dock", + "LPG" : "Liquefied Petroleum Gas", + "LPH" : "Landing Platform Helicopter", + "LPPV" : "Light Protected Patrol Vehicle", + "LRASM" : "Long Range Anti-Ship Missile", + "LRLAP" : "Long Range Land Attack Projectile", + "LRPV" : "Long Range Patrol Vehicle", + "LRRSC" : "Long-Range Recovery and Support Craft", + "LRTA" : "Long Range Tracking Antenna", + "LS" : "Launcher Station", + "LSB" : "Lower Sideband", + "LSL" : "Landing Ship Logistics", + "LSM" : "Landing Ship Medium", + "LSS" : "Logistic Support Ship", + "LST" : "Landing Ship Tank", + "LSV" : "Light Strike Vehicle", + "LSVW" : "Light Support Vehicle Wheeled", + "LTD" : "Laser Target Designator", + "LTS" : "LANTIRN Targeting System", + "LTV" : "Light Tactical Vehicle", + "LUH" : "Light Utility Helicopter", + "LVC" : "Live Virtual Constructive", + "LVT" : "Landing Vehicle, Tracked", + "LVTC" : "LVT, Command", + "LVTE" : "LVT, Engineer", + "LVTH" : "LVT, Howitzer", + "LVTP" : "LVT, Personnel", + "LVTR" : "LVT, Recovery", + "LWB" : "Long Wheelbase", + "LWTH" : "Light Weight Towed Howitzer", + "MAADS" : "Medium Advanced Air Defence System", + "MAD" : "Magnetic Anomaly Detection", + "MADL" : "Multifunction Advanced Data Link", + "MANPADS" : "Man-Portable Air Defense System", + "MANTIS" : "Modular, Automatic and Network Capable Targeting and Interception System", + "MATV" : "MRAP All Terrain Vehicle", + "MAWS" : "Missile Approach Warning System", + "MBT" : "Main Battle Tank", + "MC" : "Mortar Carrier", + "MCAP" : "Mine-Clearing/Armor Protection", + "MCE" : "Modular Control Equipment", + "MCM" : "Mine Countermeasures", + "MCS" : "Mine Countermeasures Support Ship", + "MCT" : "Medium Combat Truck", + "MCU" : "Munition Control Unit", + "MEADS" : "Medium Extended Air Defense System", + "MEDEVAC" : "Medical evacuation", + "MER" : "Multiple Ejector Rack", + "MEWSS" : "Mobile Electronic Warfare Support System", + "MG" : "Machine Gun", + "MHC" : "Material Handling Crane or Minehunter Coastal", + "MHE" : "Material Handling Equipment", + "MICLIC" : "Mine-Clearing Charge", + "MIDS" : "Multifunctional Information Distribution System", + "MILSTD" : "Military Standard", + "MIST" : "Modular Interoperable Surface Terminal", + "MITT" : "Mobile Integrated Tactical Terminal", + "MLB" : "Motor Lifeboat", + "MLMS" : "Multipurpose Lightweight Missile System", + "MLRS" : "Multiple Launch Rocket System", + "MMA" : "Multi-Mission Maritime Aircraft", + "MMLC" : "Medium Mobility Load Carrier", + "MMP" : "Mobile Mooring Platform", + "MMS" : "Mast-Mounted Sight", + "MOAB" : "Massive Ordnance Air Blast", + "MOB" : "Man Over Board", + "MOM" : "Multirole OTO Munition", + "MOPMS" : "Modular Pack Mine System", + "MP" : "Multi-Purpose", + "MPBA" : "Multiple Practice Bomb Adapter", + "MPIM" : "Multipurpose Individual Munition", + "MPS" : "Maritime Prepositioning Ship", + "MPSM" : "Multi-Purpose Submunition", + "MPTSD" : "Multi-Purpose Traced with Self Destruct", + "MRAP" : "Mine Resistant Ambush Protected", + "MRCA" : "Multi-Role Combat Aircraft", + "MRL" : "Multiple Rocket Launcher", + "MRLS" : "Multiple Rocket Launch System", + "MRM" : "Mid-Range Munition", + "MRT" : "Multi Role Transport", + "MRTT" : "Multi Role Tanker Transport", + "MSD" : "Minesweeper Drone", + "MSE" : "Mobile Subscriber Equipment", + "MSO" : "Minesweeper Ocean", + "MSRT" : "Mobile Subscriber Radiotelephone Terminal", + "MSS" : "Mortar Stowage System", + "MTADS" : "Modernized-Target Acquisition Designation Sight", + "MTS" : "Multi-Spectral Targeting System", + "MTV" : "Medium Tactical Vehicle", + "MTVR" : "Medium Tactical Vehicle Replacement", + "MULE" : "Modular Universal Laser Equipment", + "NASAMS" : "Norwegian Advanced Surface to Air Missile System", + "NASP" : "National Aerospace Plane", + "NATO" : "North Atlantic Treaty Organization", + "NBC" : "Nuclear/Biological/Chemical", + "NDB" : "Non-Directional Beacon", + "NEARTIP" : "Near Term Improvement Program", + "NFH" : "NATO Frigate Helicopter", + "NLOS" : "Non Line of Sight", + "NLOSLS" : "Non Line of Sight Launch System", + "NLS" : "National Launch System", + "NA" : "Not Applicable", + "NSW" : "Naval Special Warfare", + "NTH" : "Naval Transport Helicopter", + "OCC" : "Operational Control Center", + "OCV" : "Offshore Construction Vessel", + "OPV" : "Observation Post Vehicle or Offshore Patrol Vessel", + "OSV" : "Offshore Support Vessel", + "PAR" : "Pulse Acquisition Radar", + "PC" : "Coastal Patrol", + "PCF" : "Patrol Craft Fast", + "PCFG" : "Patrol Craft Fast Guided missile", + "PCM" : "Pulse Code Modulation", + "PCP" : "Platoon Command Post", + "PCR" : "Problem/Change Request", + "PCRS" : "Personnel Cargo Restraint and Segregation", + "PD" : "Point Detonation", + "PDM" : "Pursuit Deterrent Munition", + "PDU" : "Protocol Data Unit", + "PE" : "Protected Eyes", + "PGDT" : "Portable Ground Data Terminal", + "PGSS" : "Persistent Ground Surveillance System", + "PIDS" : "Pylon Integrated Dispenser System", + "PIR" : "Pressure Ignition Rocket", + "PLFS" : "Poids Lourds Force Speciale (Heavy Special Forces Vehicle)", + "PLS" : "Palletized Load System", + "PLST" : "Palletized Load System Trailer", + "PM" : "Phase Modulation", + "PNVS" : "Pilot Night Vision Sensor", + "POET" : "Primed Oscillator Expendable Transporter (US RF decoy)", + "POL" : "Petroleum, Oil and Lubricants", + "PPA" : "Pattugliatore Polivalente d'Altura (Multipurpose Offshore Patrol Vessel)", + "PPSL" : "Primary SATCOM Link", + "PPV" : "Protected Patrol Vehicle", + "PRI" : "Pulse Repetition Interval", + "PTDS" : "Persistent Threat Detection System", + "PTG" : "Patrol Torpedo Gunboat", + "PTIR" : "Precision Target Illumination Radar", + "QRCR" : "Quick Reaction Capability Radar", + "RA" : "Rocket Assisted", + "RAAM" : "Rifle-launcher Anti-Armor Munition", + "RAG" : "Ring Airfoil Grenade", + "RAI" : "Radio Attached Indicator", + "RAM" : "Rolling Airframe Missile", + "RAMPV" : "Rapid Multi-Purpose Vehicle", + "RAP" : "Rocket-Assisted Projectile", + "RARDEN" : "Royal Armament, Research and Development Establishment and Enfield", + "RCL" : "Recoilless", + "RCMAT" : "Radio Controlled Miniature Aerial Target", + "RCS" : "Remote Control Station", + "RDFLT" : "Rapid Deployment Force Light Tank", + "REBS" : "Rapidly Emplaced Bridging System", + "RECCE" : "Reconnaissance", + "RF" : "Radio Frequency", + "RGM" : "Revolver Gun Mount", + "RHIB" : "Rigid-Hulled Inflatable Boat", + "RIB" : "Rigid-Inflatable Boat", + "RMP" : "Reprogrammable Microprocessor (Stinger variant)", + "RN" : "Royal Navy", + "RNXS" : "Royal Naval Auxiliary Service", + "ROR" : "Range-Only-Radar", + "ROV" : "Remotely Operated Vehicle", + "ROWPU" : "Reverse Osmosis Water Purification Unit", + "RRV" : "Repair & Recovery Variant", + "RSTA" : "Reconnaissance, Surveillance and Target Acquisition", + "RTCH" : "Rough Terrain Container Handler", + "RTCST" : "Rough Terrain Container Straddle Truck", + "RTTL" : "Range Target Towing Launch", + "RWR" : "Radar Warning Receiver", + "RWS" : "Remote Weapons Sight", + "SACLOS" : "Semi-Automatic Command to Line of Sight", + "SADARM" : "Sense and Destroy Armor", + "SADL" : "Situation Awareness Data Link", + "SAL" : "Semi-Active Laser", + "SAM" : "Surface-to-Air Missile", + "SAMOC" : "Surface to Air Missile Operations Centre", + "SAMPT" : "Surface-to-Air Missile Platform/Terrain", + "SAP" : "Semi-Armor Piercing", + "SAPOM" : "Semi-Armor Piercing OTO Munition", + "SAR" : "Search and Rescue", + "SATCOM" : "Satellite Communications", + "SATURN" : "Second-Generation Anti-Jam Tactical UHF Radio for NATO", + "SAW" : "Squad Automatic Weapon", + "SCATMINE" : "Scatterable Mines", + "SCD" : "Surface Clearance Device", + "SD" : "Self-Destruct", + "SDI" : "Strategic Defense Initiative", + "SDS" : "Satellite/Space Defense System", + "SDV" : "SEAL Delivery Vehicle", + "SEAD" : "Suppression of Enemy Air Defenses", + "SEAL" : "Sea, Air, Land", + "SEAT" : "Single Engine Air Tanker", + "SEE" : "Small Emplacement Excavator", + "SEMA" : "Special Electronic Missions Aircraft", + "SETSS" : "Satellite Earth Terminal Subsystem", + "SFW" : "Sensor Fused Weapon", + "SH" : "Squash Head", + "SHF" : "Super High Frequency", + "SHORAD" : "Short Range Air Defense", + "SIBRS" : "Space-Based Infrared System", + "SICPS" : "Standard Integrated Command Post System", + "SIGINT" : "Signal Intelligence", + "SIMNET" : "Simulation Networking", + "SINCGARS" : "Single Channel Ground-Air Radio System", + "SIR" : "Search and Interrogation Radar", + "SLAM" : "Standoff Land Attack Missile", + "SLAMRAAM" : "Surfaced Launched Advanced Medium Range Air-to-Air Missile", + "SLAP" : "Saboted Light Armor Penetrator", + "SLBM" : "Submarine Launched Ballistic Missile", + "SLDMB" : "Self Locating Datum Marker Buoy", + "SLDT" : "Self/Side Loading Dump Truck", + "SMARTT" : "Secure Mobile Anti-Jam Reliable Tactical-Terminal", + "SMAW" : "Shoulder-launched Multipurpose Assault Weapon (US)", + "SMFT" : "Semi-Trailer Mounted Fabric Tank", + "SNA" : "Soviet Naval Air", + "SNLE" : "Sous-marin Nucleaire Lanceur d'Engin (device launching nuclear submarine)", + "SNLENG" : "Sous-marin Nucleaire Lanceur d'Engins de Nouvelle Generation (next generation device launching nuclear submarine)", + "SOF" : "Special Operations Forces", + "SOW" : "Stand-Off Weapon", + "SP" : "Self-Propelled", + "SPAS" : "Shuttle Pallet Satellite", + "SPR" : "Self Protection Roller", + "SPRA" : "Self Propelled Rocket Artillery", + "SRAM" : "Short Range Attack Missile", + "SRAW" : "Short-Range Assault Weapon", + "SRBM" : "Short-Range Ballistic Missile", + "SRNL" : "SAR Night Light", + "SRTA" : "Short Range Training Ammunition", + "SS" : "Submarine Attack", + "SSA" : "Submarine Auxiliary/Cargo Submarine", + "SSAN" : "Submarine Auxiliary/Cargo Submarine, Nuclear Power", + "SSB" : "Single Sideband or Submarine Ballistic Missile", + "SSBN" : "Submarine Ballistic Missile, Nuclear Powered", + "SSC" : "Coastal Submarine", + "SSG" : "Guided Missile Submarine", + "SSGN" : "Guided Missile Submarine, Nuclear-Powered", + "SSK" : "Hunter-Killer/ASW Submarine", + "SSM" : "Midget Submarine or Surface-to-Surface Missile", + "SSN" : "Attack Submarine, Nuclear-Powered", + "SSNR" : "Special Attack Submarine", + "SSP" : "Attack Submarine, Diesel Air-Independent Power", + "SST" : "Training Submarine", + "STAFF" : "Smart Target Activated Fire and Forget", + "STARS" : "Surveillance Target Attack Radar System", + "START" : "SHF Tri-Band Advanced Range Extension Tactical Terminal", + "STEP" : "Space Test Experiment Program", + "STOVL" : "Short Take-Off and Vertical Landing", + "STSS" : "Surface Terminal Subsystem", + "SUBROC" : "Submarine Rocket", + "SUGV" : "Small Unmanned Ground Vehicle", + "SuR" : "Surveillance Radar", + "SURTASS" : "Surveillance Towed Array Sonar System", + "SUSV" : "Small Unit Support Vehicle", + "SUU" : "Suspension Underwing Unit", + "SUV" : "Sports Utility Vehicle", + "SWAARM" : "Smart Weapon Anti-Armor", + "SWAT" : "Special Weapons And Tactics", + "SWATH" : "Small Water-plane Area Twin Hull", + "T" : "Tracer", + "TAC" : "Tactical", + "TACAMO" : "Take Charge and Move Out", + "TACAN" : "Tactical Air Navigation", + "TACTOM" : "Tactical Tomahawk", + "TAD" : "Trailing Arm Drive", + "TADS" : "Target Acquisition Designation Sight", + "TAOC" : "Tactical Air Operation Center", + "TARG" : "Telescoped Ammunition Revolver Gun", + "TASM" : "Tomahawk Anti-Ship Missile", + "TBM" : "Tactical Ballistic Missile", + "TCAS" : "Traffic Alert and Collision Avoidance System", + "TCD" : "Landing Ship, Dock", + "TCDL" : "Tactical Common Data Link", + "TCV" : "Troop Carrying Variant", + "TDL" : "Tactical Data Link", + "TDRSS" : "Tactical Data Relay Satellite System", + "TEI" : "Transferred Entity Indicator", + "TEL" : "Transporter Erector Launcher", + "TELAR" : "Transporter Erector Launcher and Radar", + "TER" : "Triple Ejector Rack", + "TES" : "Tactical Exploitation System", + "TGW" : "Terminally Guided Weapon", + "THAAD" : "Theater High-Altitude Area Defense", + "TIR" : "Tracking and Illumination Radar", + "TLAM" : "Tomahawk Land Attack Missile", + "TLB" : "Trailer Launched Bridge", + "TMD" : "TAC Munition Dispenser", + "TNFH" : "Transport NFH", + "TOW" : "Tube-launched, Optically-tracked, Wire-guided", + "TPC" : "Tactical Psychological Operations Company", + "TPCSDST" : "Target Practice Cone Stabilized Discarding Sabot Tracer", + "TSC" : "Twin Store Carrier", + "TTH" : "Tactical Transport Helicopter", + "TUA" : "TOW Under Armour", + "TUAV" : "Tactical UAV", + "TUGS" : "Tactical Unattended Ground Sensor", + "TUTT" : "Twin Unit Tractor Tugs", + "US" : "United States", + "UAV" : "Unmanned Aerial Vehicle", + "UCAS" : "Unmanned Combat Air Systems", + "UCAV" : "Unmanned Combat Aerial Vehicle", + "UCGV" : "Unmanned Combat Ground Vehicle", + "UGS" : "Unattended Ground Sensor", + "UGV" : "Unmanned Ground Vehicle", + "UID" : "Unique Identifier", + "UK" : "United Kingdom", + "UPIN" : "User Protocol Identification Number", + "UR" : "Upper Receiver", + "USB" : "Upper Sideband", + "UST" : "Unit Support Tanker", + "USV" : "Unmanned Surface Vehicle", + "UUGS" : "Urban Unattended Ground Sensor", + "UUV" : "Unmanned Underwater Vehicle", + "VBL" : "Vehicule Blinde Leger (light armoured vehicle)", + "VBR" : "Vehicule Blinde a Roues (wheeled armoured vehicle)", + "VBTPMR" : "Viatura Blindada Transporte de Pessoal - Media de Rodas / Armoured Personnel Carrier Vehicle - Medium Wheel Type", + "VCI" : "Vehicule de Combat d'Infanterie", + "VEMASID" : "Vehicle Magnetic Signature Duplicator", + "VIP" : "Very Important Person", + "VLAP" : "Velocity Enhanced Artillery Projectile", + "VLF" : "Very Low Frequency", + "VLFS" : "Vehicule Leger Forces Speciales (Light Special Forces Vehicle)", + "VLM" : "Veicolo Leggero Multiruolo (Multirole Light Vehicle)", + "VLSMS" : "Vehicle Launched Scatterable Mine System", + "VMMD" : "Vehicle Mounted Mine Detector", + "VOR" : "Variable Omni-Ranging", + "VORTAC" : "Combined VOR and TACAN", + "VRRTFLT" : "Variable Reach Rough Terrain Forklift Truck", + "VSB" : "Vestigial Sideband", + "VSHORAD" : "Very Short Range Air Defense", + "VT" : "Variable Time", + "VTLM" : "Veicolo Tattico Leggero Multiruolo (Tactical Multirole Light Vehicle)", + "VTLREC" : "Viatura de Transporte Leve Reconhecimento / Light Transport Vehicle, Reconnaisance", + "VTNE" : "Viatura de Transporte Nao Especializada / Non-Specialized Transport Vehicle", + "VX" : "Venomous agent X", + "WAAM" : "Wide Area Anti-Armor Munition", + "WAM" : "Wide Area Mine", + "WBDL" : "Wide Band Data Link", + "WCMD" : "Wind-Corrected Munitions Dispenser", + "WEM" : "Medical Evacuation Vehicle", + "WFU" : "Weapon Fire Unit", + "WP" : "White Phosphorus", + "WPS" : "West Philippine Sea", + "WRT" : "Technical Reconnaissance Vehicle", + "WSRiD" : "Multisensory Reconnaissance and Supervision System", + "WSV" : "Well Stimulation Vessel", + "XLWB" : "Extra Long Wheelbase", + "YDG" : "Degaussing tender", + } + + @staticmethod + def get_description(tag: str) -> str: + return Acronyms._acronymsList[tag] + diff --git a/dis/siso_ref_010/enums/acknowledge_acknowledge_flag.py b/dis/siso_ref_010/enums/acknowledge_acknowledge_flag.py new file mode 100644 index 0000000..df499ff --- /dev/null +++ b/dis/siso_ref_010/enums/acknowledge_acknowledge_flag.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 69, + * marshal size 16; + * AcknowledgeAcknowledgeFlag has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AcknowledgeAcknowledgeFlag(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + create_entity = EnumValue(1, "Create Entity") + remove_entity = EnumValue(2, "Remove Entity") + start_resume = EnumValue(3, "Start/Resume") + stop_freeze = EnumValue(4, "Stop/Freeze") + transfer_ownership = EnumValue(5, "Transfer Ownership") + default = create_entity + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/acknowledge_response_flag.py b/dis/siso_ref_010/enums/acknowledge_response_flag.py new file mode 100644 index 0000000..68058b3 --- /dev/null +++ b/dis/siso_ref_010/enums/acknowledge_response_flag.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 70, + * marshal size 16; + * AcknowledgeResponseFlag has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AcknowledgeResponseFlag(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + able_to_comply = EnumValue(1, "Able to comply") + unable_to_comply = EnumValue(2, "Unable to comply") + pending_operator_action = EnumValue(3, "Pending Operator Action") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/action_request_action_id.py b/dis/siso_ref_010/enums/action_request_action_id.py new file mode 100644 index 0000000..5fbc4dc --- /dev/null +++ b/dis/siso_ref_010/enums/action_request_action_id.py @@ -0,0 +1,187 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 71, + * marshal size 32; + * ActionRequestActionID has 52 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ActionRequestActionID(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + local_storage_of_the_requested_information = EnumValue(1, "Local storage of the requested information") + inform_sm_of_event_ran_out_of_ammunition = EnumValue(2, "Inform SM of event 'ran out of ammunition'") + inform_sm_of_event_killed_in_action = EnumValue(3, "Inform SM of event 'killed in action'") + inform_sm_of_event_damage = EnumValue(4, "Inform SM of event 'damage'") + inform_sm_of_event_mobility_disabled = EnumValue(5, "Inform SM of event 'mobility disabled'") + inform_sm_of_event_fire_disabled = EnumValue(6, "Inform SM of event 'fire disabled'") + inform_sm_of_event_ran_out_of_fuel = EnumValue(7, "Inform SM of event 'ran out of fuel'") + recall_checkpoint_data = EnumValue(8, "Recall checkpoint data") + recall_initial_parameters = EnumValue(9, "Recall initial parameters") + initiate_tether_lead = EnumValue(10, "Initiate tether-lead") + initiate_tether_follow = EnumValue(11, "Initiate tether-follow") + unthether = EnumValue(12, "Unthether") + initiate_service_station_resupply = EnumValue(13, "Initiate service station resupply") + initiate_tailgate_resupply = EnumValue(14, "Initiate tailgate resupply") + initiate_hitch_lead = EnumValue(15, "Initiate hitch lead") + initiate_hitch_follow = EnumValue(16, "Initiate hitch follow") + unhitch = EnumValue(17, "Unhitch") + mount = EnumValue(18, "Mount") + dismount = EnumValue(19, "Dismount") + start_drc_daily_readiness_check = EnumValue(20, "Start DRC (Daily Readiness Check)") + stop_drc = EnumValue(21, "Stop DRC") + data_query = EnumValue(22, "Data Query") + status_request = EnumValue(23, "Status Request") + send_object_state_data = EnumValue(24, "Send Object State Data") + reconstitute = EnumValue(25, "Reconstitute") + lock_site_configuration = EnumValue(26, "Lock Site Configuration") + unlock_site_configuration = EnumValue(27, "Unlock Site Configuration") + update_site_configuration = EnumValue(28, "Update Site Configuration") + query_site_configuration = EnumValue(29, "Query Site Configuration") + tethering_information = EnumValue(30, "Tethering Information") + mount_intent = EnumValue(31, "Mount Intent") + accept_subscription = EnumValue(33, "Accept Subscription") + unsubscribe = EnumValue(34, "Unsubscribe") + teleport_entity = EnumValue(35, "Teleport entity") + change_aggregate_state = EnumValue(36, "Change aggregate state") + request_start_pdu = EnumValue(37, "Request Start PDU") + wakeup_get_ready_for_initialization = EnumValue(38, "Wakeup get ready for initialization") + initialize_internal_parameters = EnumValue(39, "Initialize internal parameters") + send_plan_data = EnumValue(40, "Send plan data") + synchronize_internal_clocks = EnumValue(41, "Synchronize internal clocks") + run = EnumValue(42, "Run") + save_internal_parameters = EnumValue(43, "Save internal parameters") + simulate_malfunction = EnumValue(44, "Simulate malfunction") + join_exercise = EnumValue(45, "Join exercise") + resign_exercise = EnumValue(46, "Resign exercise") + time_advance = EnumValue(47, "Time advance") + taccsf_los_request_type_1 = EnumValue(100, "TACCSF LOS Request-Type 1") + taccsf_los_request_type_2 = EnumValue(101, "TACCSF LOS Request-Type 2") + airmount_mount_request = EnumValue(4303, "Airmount Mount Request") + airmount_dismount_request = EnumValue(4304, "Airmount Dismount Request") + airmount_information_request = EnumValue(4305, "Airmount Information Request") + default = other + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/action_response_request_status.py b/dis/siso_ref_010/enums/action_response_request_status.py new file mode 100644 index 0000000..fb0ccf1 --- /dev/null +++ b/dis/siso_ref_010/enums/action_response_request_status.py @@ -0,0 +1,149 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 72, + * marshal size 32; + * ActionResponseRequestStatus has 14 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ActionResponseRequestStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + pending = EnumValue(1, "Pending") + executing = EnumValue(2, "Executing") + partially_complete = EnumValue(3, "Partially Complete") + complete = EnumValue(4, "Complete") + request_rejected = EnumValue(5, "Request rejected") + retransmit_request_now = EnumValue(6, "Retransmit request now") + retransmit_request_later = EnumValue(7, "Retransmit request later") + invalid_time_parameters = EnumValue(8, "Invalid time parameters") + simulation_time_exceeded = EnumValue(9, "Simulation time exceeded") + request_done = EnumValue(10, "Request done") + taccsf_los_reply_type_1 = EnumValue(100, "TACCSF LOS Reply-Type 1") + taccsf_los_reply_type_2 = EnumValue(101, "TACCSF LOS Reply-Type 2") + join_exercise_request_rejected = EnumValue(201, "Join Exercise Request Rejected") + default = other + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/add_specific_dimension_enumerationsfor_subsurface_area_size.py b/dis/siso_ref_010/enums/add_specific_dimension_enumerationsfor_subsurface_area_size.py new file mode 100644 index 0000000..9ab18d1 --- /dev/null +++ b/dis/siso_ref_010/enums/add_specific_dimension_enumerationsfor_subsurface_area_size.py @@ -0,0 +1,121 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 133, marshal size 8; + * AddSpecificDimensionEnumerationsforSubsurfaceAreaSize has 6 enumerations total. + * The gaps in enumeration values are intentional and are reserved for future additions. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class AddSpecificDimensionEnumerationsforSubsurfaceAreaSize(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + small_school_5km_long_x_250m_wide_x_83m_deep_1km_x_5km_x_166m = EnumValue(222, "Small School (.5km long x 250m wide x 83m deep - 1km x .5km x 166m)") + small_school_dense_5km_long_x_250m_wide_x_83m_deep_1km_x_5km_x_166m = EnumValue(223, "Small School, Dense (.5km long x 250m wide x 83m deep - 1km x .5km x 166m)") + medium_school_5km_x_1km_x_125m_1km_x_2km_x_500m = EnumValue(224, "Medium School (.5km x 1km x 125m - 1km x 2km x 500m)") + medium_school_dense_5km_x_1km_x_125m_1km_x_2km_x_500m = EnumValue(225, "Medium School, Dense (.5km x 1km x 125m - 1km x 2km x 500m)") + large_school_5km_x_2km_x_500m_10km_x_4km_x_1km = EnumValue(226, "Large School (5km x 2km x 500m - 10km x 4km x 1km)") + large_school_dense_5km_x_2km_x_500m_10km_x_4km_x_1km = EnumValue(227, "Large School, Dense (5km x 2km x 500m - 10km x 4km x 1km)") + default = small_school_5km_long_x_250m_wide_x_83m_deep_1km_x_5km_x_166m + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/add_variantsfor_air_category201insect.py b/dis/siso_ref_010/enums/add_variantsfor_air_category201insect.py new file mode 100644 index 0000000..40aff30 --- /dev/null +++ b/dis/siso_ref_010/enums/add_variantsfor_air_category201insect.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 137, + * marshal size 8; + * AddVariantsforAirCategory201Insect has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AddVariantsforAirCategory201Insect(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + vertical_shaped_insect_swarm = EnumValue(1, "Vertical Shaped Insect Swarm") + circular_shaped_insect_swarm = EnumValue(2, "Circular Shaped Insect Swarm") + irregular_shaped_insect_swarm = EnumValue(3, "Irregular Shaped Insect Swarm") + default = vertical_shaped_insect_swarm + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/add_variantsfor_land_category200mammal.py b/dis/siso_ref_010/enums/add_variantsfor_land_category200mammal.py new file mode 100644 index 0000000..2bdecbc --- /dev/null +++ b/dis/siso_ref_010/enums/add_variantsfor_land_category200mammal.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 134, + * marshal size 8; + * AddVariantsforLandCategory200Mammal has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AddVariantsforLandCategory200Mammal(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + animal_with_a_male_child_rider = EnumValue(1, "Animal with a Male Child Rider") + animal_with_a_female_child_rider = EnumValue(2, "Animal with a Female Child Rider") + animal_with_an_adult_male_rider = EnumValue(3, "Animal with an Adult Male Rider") + animal_with_an_adult_female_rider = EnumValue(4, "Animal with an Adult Female Rider") + animal_harnessed_to_a_plow = EnumValue(5, "Animal Harnessed to a Plow") + animal_harnessed_to_a_cart = EnumValue(6, "Animal Harnessed to a Cart") + default = animal_with_a_male_child_rider + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/add_variantsfor_subsurface_categories_fish_mollusk_crustaceanand_insect.py b/dis/siso_ref_010/enums/add_variantsfor_subsurface_categories_fish_mollusk_crustaceanand_insect.py new file mode 100644 index 0000000..b7df8ad --- /dev/null +++ b/dis/siso_ref_010/enums/add_variantsfor_subsurface_categories_fish_mollusk_crustaceanand_insect.py @@ -0,0 +1,143 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 138, + * marshal size 8; + * AddVariantsforSubsurfaceCategoriesFishMolluskCrustaceanandInsect has 8 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AddVariantsforSubsurfaceCategoriesFishMolluskCrustaceanandInsect(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + black = EnumValue(1, "Black") + green = EnumValue(2, "Green") + spotted = EnumValue(3, "Spotted") + red = EnumValue(4, "Red") + brown = EnumValue(5, "Brown") + blue = EnumValue(6, "Blue") + silver = EnumValue(7, "Silver") + grey = EnumValue(8, "Grey") + default = black + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/aggregate_state_aggregate_kind.py b/dis/siso_ref_010/enums/aggregate_state_aggregate_kind.py new file mode 100644 index 0000000..3f3189e --- /dev/null +++ b/dis/siso_ref_010/enums/aggregate_state_aggregate_kind.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 206, + * marshal size 8; + * AggregateStateAggregateKind has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AggregateStateAggregateKind(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + military_hierarchy = EnumValue(1, "Military Hierarchy") + common_type = EnumValue(2, "Common Type") + common_mission = EnumValue(3, "Common Mission") + similar_capabilities = EnumValue(4, "Similar Capabilities") + common_location = EnumValue(5, "Common Location") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/aggregate_state_aggregate_state.py b/dis/siso_ref_010/enums/aggregate_state_aggregate_state.py new file mode 100644 index 0000000..6cf31c9 --- /dev/null +++ b/dis/siso_ref_010/enums/aggregate_state_aggregate_state.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 204, + * marshal size 8; + * AggregateStateAggregateState has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AggregateStateAggregateState(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + aggregated = EnumValue(1, "Aggregated") + disaggregated = EnumValue(2, "Disaggregated") + fully_disaggregated = EnumValue(3, "Fully disaggregated") + pseudo_disaggregated = EnumValue(4, "Pseudo-disaggregated") + partially_disaggregated = EnumValue(5, "Partially-disaggregated") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/aggregate_state_formation.py b/dis/siso_ref_010/enums/aggregate_state_formation.py new file mode 100644 index 0000000..4d06268 --- /dev/null +++ b/dis/siso_ref_010/enums/aggregate_state_formation.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 205, + * marshal size 32; + * AggregateStateFormation has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AggregateStateFormation(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + assembly = EnumValue(1, "Assembly") + vee = EnumValue(2, "Vee") + wedge = EnumValue(3, "Wedge") + line = EnumValue(4, "Line") + column = EnumValue(5, "Column") + default = other + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/aggregate_state_specific.py b/dis/siso_ref_010/enums/aggregate_state_specific.py new file mode 100644 index 0000000..97835f4 --- /dev/null +++ b/dis/siso_ref_010/enums/aggregate_state_specific.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 209, + * marshal size 8; + * AggregateStateSpecific has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AggregateStateSpecific(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_headquarters = EnumValue(0, "No headquarters") + yes_aggregate_unit_contains_a_headquarters = EnumValue(1, "Yes aggregate unit contains a headquarters") + default = no_headquarters + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/aggregate_state_subcategory.py b/dis/siso_ref_010/enums/aggregate_state_subcategory.py new file mode 100644 index 0000000..ea26a90 --- /dev/null +++ b/dis/siso_ref_010/enums/aggregate_state_subcategory.py @@ -0,0 +1,158 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 208, + * marshal size 8; + * AggregateStateSubcategory has 23 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AggregateStateSubcategory(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + cavalry_troop = EnumValue(1, "Cavalry Troop") + armor = EnumValue(2, "Armor") + infantry = EnumValue(3, "Infantry") + mechanized_infantry = EnumValue(4, "Mechanized Infantry") + cavalry = EnumValue(5, "Cavalry") + armored_cavalry = EnumValue(6, "Armored Cavalry") + artillery = EnumValue(7, "Artillery") + self_propelled_artillery = EnumValue(8, "Self-Propelled Artillery") + close_air_support = EnumValue(9, "Close Air Support") + engineer = EnumValue(10, "Engineer") + air_defense_artillery = EnumValue(11, "Air Defense Artillery") + anti_tank = EnumValue(12, "Anti-Tank") + army_aviation_fixed_wing = EnumValue(13, "Army Aviation Fixed-wing") + army_aviation_rotary_wing = EnumValue(14, "Army Aviation Rotary-wing") + army_attack_helicopter = EnumValue(15, "Army Attack Helicopter") + air_cavalry = EnumValue(16, "Air Cavalry") + armor_heavy_task_force = EnumValue(17, "Armor Heavy Task Force") + motorized_rifle = EnumValue(18, "Motorized Rifle") + mechanized_heavy_task_force = EnumValue(19, "Mechanized Heavy Task Force") + command_post = EnumValue(20, "Command Post") + cewi = EnumValue(21, "CEWI") + tank_only = EnumValue(22, "Tank only") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/air_platform_appearance.py b/dis/siso_ref_010/enums/air_platform_appearance.py new file mode 100644 index 0000000..574461c --- /dev/null +++ b/dis/siso_ref_010/enums/air_platform_appearance.py @@ -0,0 +1,366 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_paint_scheme import AppearancePaintScheme +from .appearance_nvgmode import AppearanceNVGMode +from .appearance_damage import AppearanceDamage +from .appearance_trailing_effects import AppearanceTrailingEffects +from .appearance_canopy import AppearanceCanopy +from .appearance_anti_collision_day_night import AppearanceAntiCollisionDayNight +from .appearance_entityor_object_state import AppearanceEntityorObjectState +from .appearance_navigation_position_brightness import AppearanceNavigationPositionBrightness + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 32, marshal size 32, + * AirPlatformAppearance + */ + +""" + +class AirPlatformAppearanceBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes the visual paint design, use {@link AppearancePaintScheme} values for this field + ("_paintScheme", UByte, 1), + + # (bit position 1, boolean) Describes whether it is capable of moving on its own power, use {@link UInt8} values for this field + ("_propulsionKilled", UByte, 1), + + # (bit position 2, boolean) Describes whether air platform lighting is in covert or overt mode, use {@link AppearanceNVGMode} values for this field + ("_nVGMode", UByte, 1), + + # (bit position 3, length=2) Describes the damaged appearance, use {@link AppearanceDamage} values for this field + ("_damage", UByte, 2), + + # (bit position 5, boolean) Describes whether or not smoke is emanating from the entity, use {@link UInt8} values for this field + ("_isSmokeEmanating", UByte, 1), + + # (bit position 6, boolean) Describes whether or not the engine is emitting smoke, use {@link UInt8} values for this field + ("_isEngineEmittingSmoke", UByte, 1), + + # (bit position 7, length=2) Describes the size of the contrails or ionization trailing effects, use {@link AppearanceTrailingEffects} values for this field + ("_trailingEffects", UByte, 2), + + # (bit position 9, length=3) Describes the state of the canopy/troop door, use {@link AppearanceCanopy} values for this field + ("_canopyTroopDoor", UByte, 3), + + # (bit position 12, boolean) Describes whether landing lights are on or off, use {@link UInt8} values for this field + ("_landingLightsOn", UByte, 1), + + # (bit position 13, boolean) Describes whether navigation lights are on or off, use {@link UInt8} values for this field + ("_navigationLightsOn", UByte, 1), + + # (bit position 14, boolean) Describes whether Anti-Collision lights are on or off, use {@link UInt8} values for this field + ("_antiCollisionLightsOn", UByte, 1), + + # (bit position 15, boolean) Describes whether the entity is burning and flames are visible, use {@link UInt8} values for this field + ("_isFlaming", UByte, 1), + + # (bit position 16, boolean) Describes if the air platform is in afterburner, use {@link UInt8} values for this field + ("_afterburnerOn", UByte, 1), + + # (bit position 17, boolean) Describes whether the lower Anti-Collision light is on or off, use {@link UInt8} values for this field + ("_lowerAntiCollisionLightOn", UByte, 1), + + # (bit position 18, boolean) Describes whether the upper Anti-Collision light is on or off, use {@link UInt8} values for this field + ("_upperAntiCollisionLightOn", UByte, 1), + + # (bit position 19, boolean) Describes the day/night status of the Anti-Collision lights, use {@link AppearanceAntiCollisionDayNight} values for this field + ("_antiCollisionLightDayNight", UByte, 1), + + # (bit position 20, boolean) Indicates whether any air platform lights are blinking or not, use {@link UInt8} values for this field + ("_isBlinking", UByte, 1), + + # (bit position 21, boolean) Describes whether the entity is frozen and should not be dead reckoned, use {@link UInt8} values for this field + ("_isFrozen", UByte, 1), + + # (bit position 22, boolean) Describes whether the power plant is on or off, use {@link UInt8} values for this field + ("_powerPlantOn", UByte, 1), + + # (bit position 23, boolean) Describes whether the entity is active or deactivated, use {@link AppearanceEntityorObjectState} values for this field + ("_state", UByte, 1), + + # (bit position 24, boolean) Describes whether formation lights are on or off, use {@link UInt8} values for this field + ("_formationLightsOn", UByte, 1), + + # (bit position 25, boolean) Describes whether the landing gear is wholly retracted or extended, use {@link UInt8} values for this field + ("_landingGearExtended", UByte, 1), + + # (bit position 26, boolean) Describes whether the cargo doors (main door) are closed or open, use {@link UInt8} values for this field + ("_cargoDoorsOpened", UByte, 1), + + # (bit position 27, boolean) Describes the brightness of the navigation/position lights, use {@link AppearanceNavigationPositionBrightness} values for this field + ("_navigationPositionBrightness", UByte, 1), + + # (bit position 28, boolean) Describes whether spot/search light #1 is on or off, use {@link UInt8} values for this field + ("_spotSearchLight1On", UByte, 1), + + # (bit position 29, boolean) Describes whether interior lights are on or off, use {@link UInt8} values for this field + ("_interiorLightsOn", UByte, 1), + + # (bit position 30, boolean) Describes whether the air platform has engaged reverse thrust, use {@link UInt8} values for this field + ("_reverseThrustEngaged", UByte, 1), + + # (bit position 31, boolean) Describes whether the air platform has weight on its main landing gear, use {@link UInt8} values for this field + ("_weightonWheels", UByte, 1) + ] + +class AirPlatformAppearance(ctypes.Union): + _fields_ = [ + ("capabilities", AirPlatformAppearanceBitField), + ("asbyte", UInt8) + ] + + def set_paintScheme(self, value : AppearancePaintScheme): + self.capabilities._paintScheme = int(value) + def get_paintScheme(self) -> AppearancePaintScheme: + return AppearancePaintScheme.get_enum(self._paintScheme) + PaintScheme = property(get_paintScheme, set_paintScheme) + + def set_propulsionKilled(self, value : UInt8): + self.capabilities._propulsionKilled = int(value) + def get_propulsionKilled(self) -> UInt8: + return self.capabilities._propulsionKilled + PropulsionKilled = property(get_propulsionKilled, set_propulsionKilled) + + def set_nVGMode(self, value : AppearanceNVGMode): + self.capabilities._nVGMode = int(value) + def get_nVGMode(self) -> AppearanceNVGMode: + return AppearanceNVGMode.get_enum(self._nVGMode) + NVGMode = property(get_nVGMode, set_nVGMode) + + def set_damage(self, value : AppearanceDamage): + self.capabilities._damage = int(value) + def get_damage(self) -> AppearanceDamage: + return AppearanceDamage.get_enum(self._damage) + Damage = property(get_damage, set_damage) + + def set_isSmokeEmanating(self, value : UInt8): + self.capabilities._isSmokeEmanating = int(value) + def get_isSmokeEmanating(self) -> UInt8: + return self.capabilities._isSmokeEmanating + IsSmokeEmanating = property(get_isSmokeEmanating, set_isSmokeEmanating) + + def set_isEngineEmittingSmoke(self, value : UInt8): + self.capabilities._isEngineEmittingSmoke = int(value) + def get_isEngineEmittingSmoke(self) -> UInt8: + return self.capabilities._isEngineEmittingSmoke + IsEngineEmittingSmoke = property(get_isEngineEmittingSmoke, set_isEngineEmittingSmoke) + + def set_trailingEffects(self, value : AppearanceTrailingEffects): + self.capabilities._trailingEffects = int(value) + def get_trailingEffects(self) -> AppearanceTrailingEffects: + return AppearanceTrailingEffects.get_enum(self._trailingEffects) + TrailingEffects = property(get_trailingEffects, set_trailingEffects) + + def set_canopyTroopDoor(self, value : AppearanceCanopy): + self.capabilities._canopyTroopDoor = int(value) + def get_canopyTroopDoor(self) -> AppearanceCanopy: + return AppearanceCanopy.get_enum(self._canopyTroopDoor) + CanopyTroopDoor = property(get_canopyTroopDoor, set_canopyTroopDoor) + + def set_landingLightsOn(self, value : UInt8): + self.capabilities._landingLightsOn = int(value) + def get_landingLightsOn(self) -> UInt8: + return self.capabilities._landingLightsOn + LandingLightsOn = property(get_landingLightsOn, set_landingLightsOn) + + def set_navigationLightsOn(self, value : UInt8): + self.capabilities._navigationLightsOn = int(value) + def get_navigationLightsOn(self) -> UInt8: + return self.capabilities._navigationLightsOn + NavigationLightsOn = property(get_navigationLightsOn, set_navigationLightsOn) + + def set_antiCollisionLightsOn(self, value : UInt8): + self.capabilities._antiCollisionLightsOn = int(value) + def get_antiCollisionLightsOn(self) -> UInt8: + return self.capabilities._antiCollisionLightsOn + AntiCollisionLightsOn = property(get_antiCollisionLightsOn, set_antiCollisionLightsOn) + + def set_isFlaming(self, value : UInt8): + self.capabilities._isFlaming = int(value) + def get_isFlaming(self) -> UInt8: + return self.capabilities._isFlaming + IsFlaming = property(get_isFlaming, set_isFlaming) + + def set_afterburnerOn(self, value : UInt8): + self.capabilities._afterburnerOn = int(value) + def get_afterburnerOn(self) -> UInt8: + return self.capabilities._afterburnerOn + AfterburnerOn = property(get_afterburnerOn, set_afterburnerOn) + + def set_lowerAntiCollisionLightOn(self, value : UInt8): + self.capabilities._lowerAntiCollisionLightOn = int(value) + def get_lowerAntiCollisionLightOn(self) -> UInt8: + return self.capabilities._lowerAntiCollisionLightOn + LowerAntiCollisionLightOn = property(get_lowerAntiCollisionLightOn, set_lowerAntiCollisionLightOn) + + def set_upperAntiCollisionLightOn(self, value : UInt8): + self.capabilities._upperAntiCollisionLightOn = int(value) + def get_upperAntiCollisionLightOn(self) -> UInt8: + return self.capabilities._upperAntiCollisionLightOn + UpperAntiCollisionLightOn = property(get_upperAntiCollisionLightOn, set_upperAntiCollisionLightOn) + + def set_antiCollisionLightDayNight(self, value : AppearanceAntiCollisionDayNight): + self.capabilities._antiCollisionLightDayNight = int(value) + def get_antiCollisionLightDayNight(self) -> AppearanceAntiCollisionDayNight: + return AppearanceAntiCollisionDayNight.get_enum(self._antiCollisionLightDayNight) + AntiCollisionLightDayNight = property(get_antiCollisionLightDayNight, set_antiCollisionLightDayNight) + + def set_isBlinking(self, value : UInt8): + self.capabilities._isBlinking = int(value) + def get_isBlinking(self) -> UInt8: + return self.capabilities._isBlinking + IsBlinking = property(get_isBlinking, set_isBlinking) + + def set_isFrozen(self, value : UInt8): + self.capabilities._isFrozen = int(value) + def get_isFrozen(self) -> UInt8: + return self.capabilities._isFrozen + IsFrozen = property(get_isFrozen, set_isFrozen) + + def set_powerPlantOn(self, value : UInt8): + self.capabilities._powerPlantOn = int(value) + def get_powerPlantOn(self) -> UInt8: + return self.capabilities._powerPlantOn + PowerPlantOn = property(get_powerPlantOn, set_powerPlantOn) + + def set_state(self, value : AppearanceEntityorObjectState): + self.capabilities._state = int(value) + def get_state(self) -> AppearanceEntityorObjectState: + return AppearanceEntityorObjectState.get_enum(self._state) + State = property(get_state, set_state) + + def set_formationLightsOn(self, value : UInt8): + self.capabilities._formationLightsOn = int(value) + def get_formationLightsOn(self) -> UInt8: + return self.capabilities._formationLightsOn + FormationLightsOn = property(get_formationLightsOn, set_formationLightsOn) + + def set_landingGearExtended(self, value : UInt8): + self.capabilities._landingGearExtended = int(value) + def get_landingGearExtended(self) -> UInt8: + return self.capabilities._landingGearExtended + LandingGearExtended = property(get_landingGearExtended, set_landingGearExtended) + + def set_cargoDoorsOpened(self, value : UInt8): + self.capabilities._cargoDoorsOpened = int(value) + def get_cargoDoorsOpened(self) -> UInt8: + return self.capabilities._cargoDoorsOpened + CargoDoorsOpened = property(get_cargoDoorsOpened, set_cargoDoorsOpened) + + def set_navigationPositionBrightness(self, value : AppearanceNavigationPositionBrightness): + self.capabilities._navigationPositionBrightness = int(value) + def get_navigationPositionBrightness(self) -> AppearanceNavigationPositionBrightness: + return AppearanceNavigationPositionBrightness.get_enum(self._navigationPositionBrightness) + NavigationPositionBrightness = property(get_navigationPositionBrightness, set_navigationPositionBrightness) + + def set_spotSearchLight1On(self, value : UInt8): + self.capabilities._spotSearchLight1On = int(value) + def get_spotSearchLight1On(self) -> UInt8: + return self.capabilities._spotSearchLight1On + SpotSearchLight1On = property(get_spotSearchLight1On, set_spotSearchLight1On) + + def set_interiorLightsOn(self, value : UInt8): + self.capabilities._interiorLightsOn = int(value) + def get_interiorLightsOn(self) -> UInt8: + return self.capabilities._interiorLightsOn + InteriorLightsOn = property(get_interiorLightsOn, set_interiorLightsOn) + + def set_reverseThrustEngaged(self, value : UInt8): + self.capabilities._reverseThrustEngaged = int(value) + def get_reverseThrustEngaged(self) -> UInt8: + return self.capabilities._reverseThrustEngaged + ReverseThrustEngaged = property(get_reverseThrustEngaged, set_reverseThrustEngaged) + + def set_weightonWheels(self, value : UInt8): + self.capabilities._weightonWheels = int(value) + def get_weightonWheels(self) -> UInt8: + return self.capabilities._weightonWheels + WeightonWheels = property(get_weightonWheels, set_weightonWheels) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "PaintScheme : " + self.PaintScheme.get_description + "\n" + outputStream += "PropulsionKilled : " + str(self.PropulsionKilled) + "\n" + outputStream += "NVGMode : " + self.NVGMode.get_description + "\n" + outputStream += "Damage : " + self.Damage.get_description + "\n" + outputStream += "IsSmokeEmanating : " + str(self.IsSmokeEmanating) + "\n" + outputStream += "IsEngineEmittingSmoke : " + str(self.IsEngineEmittingSmoke) + "\n" + outputStream += "TrailingEffects : " + self.TrailingEffects.get_description + "\n" + outputStream += "CanopyTroopDoor : " + self.CanopyTroopDoor.get_description + "\n" + outputStream += "LandingLightsOn : " + str(self.LandingLightsOn) + "\n" + outputStream += "NavigationLightsOn : " + str(self.NavigationLightsOn) + "\n" + outputStream += "AntiCollisionLightsOn : " + str(self.AntiCollisionLightsOn) + "\n" + outputStream += "IsFlaming : " + str(self.IsFlaming) + "\n" + outputStream += "AfterburnerOn : " + str(self.AfterburnerOn) + "\n" + outputStream += "LowerAntiCollisionLightOn : " + str(self.LowerAntiCollisionLightOn) + "\n" + outputStream += "UpperAntiCollisionLightOn : " + str(self.UpperAntiCollisionLightOn) + "\n" + outputStream += "AntiCollisionLightDayNight : " + self.AntiCollisionLightDayNight.get_description + "\n" + outputStream += "IsBlinking : " + str(self.IsBlinking) + "\n" + outputStream += "IsFrozen : " + str(self.IsFrozen) + "\n" + outputStream += "PowerPlantOn : " + str(self.PowerPlantOn) + "\n" + outputStream += "State : " + self.State.get_description + "\n" + outputStream += "FormationLightsOn : " + str(self.FormationLightsOn) + "\n" + outputStream += "LandingGearExtended : " + str(self.LandingGearExtended) + "\n" + outputStream += "CargoDoorsOpened : " + str(self.CargoDoorsOpened) + "\n" + outputStream += "NavigationPositionBrightness : " + self.NavigationPositionBrightness.get_description + "\n" + outputStream += "SpotSearchLight1On : " + str(self.SpotSearchLight1On) + "\n" + outputStream += "InteriorLightsOn : " + str(self.InteriorLightsOn) + "\n" + outputStream += "ReverseThrustEngaged : " + str(self.ReverseThrustEngaged) + "\n" + outputStream += "WeightonWheels : " + str(self.WeightonWheels) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/air_platform_capabilities.py b/dis/siso_ref_010/enums/air_platform_capabilities.py new file mode 100644 index 0000000..acfaf10 --- /dev/null +++ b/dis/siso_ref_010/enums/air_platform_capabilities.py @@ -0,0 +1,178 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 451, marshal size 32, + * AirPlatformCapabilities + */ + +""" + +class AirPlatformCapabilitiesBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes whether the entity is able to supply some type of ammunition in response to an appropriate service request, use {@link UInt8} values for this field + ("_ammunitionSupply", UByte, 1), + + # (bit position 1, boolean) Describes whether the entity is able to supply some type of fuel in response to an appropriate service request, use {@link UInt8} values for this field + ("_fuelSupply", UByte, 1), + + # (bit position 2, boolean) Describes whether the entity is able to provide recovery (e.g., towing) services in response to an appropriate service request, use {@link UInt8} values for this field + ("_recovery", UByte, 1), + + # (bit position 3, boolean) Describes whether the entity is able to supply certain repair services in response to an appropriate service request, use {@link UInt8} values for this field + ("_repair", UByte, 1), + + # (bit position 4, boolean) Describes whether the entity is equipped with Automatic Dependent Surveillance - Broadcast (ADS-B), use {@link UInt8} values for this field + ("_aDSB", UByte, 1), + + # (bit position 5, boolean) The Entity is able to carry a payload in a sling load. The extended appearance record (if available) will identify the current sling load status and entity association and/or entity offset records (if available) will provide additional sling load details (such as payload)., use {@link UInt8} values for this field + ("_slingLoadCarrier", UByte, 1), + + # (bit position 6, boolean) The Entity is able to be carried as a sling load payload. The extended appearance record (if available) will identify if it is currently sling loaded and entity association and/or entity offset records (if available) will provide additional sling load details (such as carrier)., use {@link UInt8} values for this field + ("_slingLoadable", UByte, 1), + + # (bit position 7, boolean) The Entity is an IED or contains an IED. The extended appearance record (if available) will identify how well hidden the IED is on the Entity. An Attached Part (if applicable, for instance a jury-rigged munition does not apply here) will identify the IED explicitly., use {@link UInt8} values for this field + ("_iEDPresenceIndicator", UByte, 1), + + # (bit position 8, boolean) The Entity (normally a virtual manned module) can be task organized into an existing mixed mode unit (where mixed mode is intended to comprise a combination of computer-generated forces and virtual or even live forces)., use {@link UInt8} values for this field + ("_taskOrganizable", UByte, 1), + + # (bit position 9, boolean) Describes whether the entity is equipped with Large Aircraft Infrared Countermeasures (LAIRCM), use {@link UInt8} values for this field + ("_lAIRCM", UByte, 1) + ] + +class AirPlatformCapabilities(ctypes.Union): + _fields_ = [ + ("capabilities", AirPlatformCapabilitiesBitField), + ("asbyte", UInt8) + ] + + def set_ammunitionSupply(self, value : UInt8): + self.capabilities._ammunitionSupply = int(value) + def get_ammunitionSupply(self) -> UInt8: + return self.capabilities._ammunitionSupply + AmmunitionSupply = property(get_ammunitionSupply, set_ammunitionSupply) + + def set_fuelSupply(self, value : UInt8): + self.capabilities._fuelSupply = int(value) + def get_fuelSupply(self) -> UInt8: + return self.capabilities._fuelSupply + FuelSupply = property(get_fuelSupply, set_fuelSupply) + + def set_recovery(self, value : UInt8): + self.capabilities._recovery = int(value) + def get_recovery(self) -> UInt8: + return self.capabilities._recovery + Recovery = property(get_recovery, set_recovery) + + def set_repair(self, value : UInt8): + self.capabilities._repair = int(value) + def get_repair(self) -> UInt8: + return self.capabilities._repair + Repair = property(get_repair, set_repair) + + def set_aDSB(self, value : UInt8): + self.capabilities._aDSB = int(value) + def get_aDSB(self) -> UInt8: + return self.capabilities._aDSB + ADSB = property(get_aDSB, set_aDSB) + + def set_slingLoadCarrier(self, value : UInt8): + self.capabilities._slingLoadCarrier = int(value) + def get_slingLoadCarrier(self) -> UInt8: + return self.capabilities._slingLoadCarrier + SlingLoadCarrier = property(get_slingLoadCarrier, set_slingLoadCarrier) + + def set_slingLoadable(self, value : UInt8): + self.capabilities._slingLoadable = int(value) + def get_slingLoadable(self) -> UInt8: + return self.capabilities._slingLoadable + SlingLoadable = property(get_slingLoadable, set_slingLoadable) + + def set_iEDPresenceIndicator(self, value : UInt8): + self.capabilities._iEDPresenceIndicator = int(value) + def get_iEDPresenceIndicator(self) -> UInt8: + return self.capabilities._iEDPresenceIndicator + IEDPresenceIndicator = property(get_iEDPresenceIndicator, set_iEDPresenceIndicator) + + def set_taskOrganizable(self, value : UInt8): + self.capabilities._taskOrganizable = int(value) + def get_taskOrganizable(self) -> UInt8: + return self.capabilities._taskOrganizable + TaskOrganizable = property(get_taskOrganizable, set_taskOrganizable) + + def set_lAIRCM(self, value : UInt8): + self.capabilities._lAIRCM = int(value) + def get_lAIRCM(self) -> UInt8: + return self.capabilities._lAIRCM + LAIRCM = property(get_lAIRCM, set_lAIRCM) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "AmmunitionSupply : " + str(self.AmmunitionSupply) + "\n" + outputStream += "FuelSupply : " + str(self.FuelSupply) + "\n" + outputStream += "Recovery : " + str(self.Recovery) + "\n" + outputStream += "Repair : " + str(self.Repair) + "\n" + outputStream += "ADSB : " + str(self.ADSB) + "\n" + outputStream += "SlingLoadCarrier : " + str(self.SlingLoadCarrier) + "\n" + outputStream += "SlingLoadable : " + str(self.SlingLoadable) + "\n" + outputStream += "IEDPresenceIndicator : " + str(self.IEDPresenceIndicator) + "\n" + outputStream += "TaskOrganizable : " + str(self.TaskOrganizable) + "\n" + outputStream += "LAIRCM : " + str(self.LAIRCM) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/aircraft_address_source.py b/dis/siso_ref_010/enums/aircraft_address_source.py new file mode 100644 index 0000000..7533270 --- /dev/null +++ b/dis/siso_ref_010/enums/aircraft_address_source.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 364, + * marshal size 1; + * AircraftAddressSource has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AircraftAddressSource(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + mode_s_aircraft_address_field_value = EnumValue(0, "Mode S Aircraft Address Field Value") + gicb_iff_data_record_available = EnumValue(1, "GICB IFF Data Record Available") + default = mode_s_aircraft_address_field_value + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/aircraft_identification_type.py b/dis/siso_ref_010/enums/aircraft_identification_type.py new file mode 100644 index 0000000..0b32b64 --- /dev/null +++ b/dis/siso_ref_010/enums/aircraft_identification_type.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 357, + * marshal size 8; + * AircraftIdentificationType has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AircraftIdentificationType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + flight_number = EnumValue(1, "Flight Number") + tail_number = EnumValue(2, "Tail Number") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/aircraft_idsource.py b/dis/siso_ref_010/enums/aircraft_idsource.py new file mode 100644 index 0000000..820a80a --- /dev/null +++ b/dis/siso_ref_010/enums/aircraft_idsource.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 801, + * marshal size 1; + * AircraftIDSource has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AircraftIDSource(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + mode_s_aircraft_identification_field_value = EnumValue(0, "Mode S Aircraft Identification Field Value") + gicb_iff_data_record_available = EnumValue(1, "GICB IFF Data Record Available") + default = mode_s_aircraft_identification_field_value + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/aircraft_present_domain.py b/dis/siso_ref_010/enums/aircraft_present_domain.py new file mode 100644 index 0000000..c002b1e --- /dev/null +++ b/dis/siso_ref_010/enums/aircraft_present_domain.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 356, + * marshal size 8; + * AircraftPresentDomain has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AircraftPresentDomain(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + airborne = EnumValue(1, "Airborne") + on_ground_surface = EnumValue(2, "On Ground/Surface") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/aircraft_type_wake.py b/dis/siso_ref_010/enums/aircraft_type_wake.py new file mode 100644 index 0000000..30d78c8 --- /dev/null +++ b/dis/siso_ref_010/enums/aircraft_type_wake.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 368, + * marshal size 3; + * AircraftTypeWake has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AircraftTypeWake(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/animal_lifeform_group_size_range_enumerationforall_domains.py b/dis/siso_ref_010/enums/animal_lifeform_group_size_range_enumerationforall_domains.py new file mode 100644 index 0000000..54edb9e --- /dev/null +++ b/dis/siso_ref_010/enums/animal_lifeform_group_size_range_enumerationforall_domains.py @@ -0,0 +1,129 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 130, marshal size 8; + * AnimalLifeFormGroupSizeRangeEnumerationforallDomains has 14 enumerations total. + * The gaps in enumeration values are intentional and are reserved for future additions. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class AnimalLifeFormGroupSizeRangeEnumerationforallDomains(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + number_of_animals_range_from_201_to_249 = EnumValue(201, "Number of animals range from 201 to 249") + number_of_animals_range_from_250_to_299 = EnumValue(202, "Number of animals range from 250 to 299") + number_of_animals_range_from_300_to_399 = EnumValue(203, "Number of animals range from 300 to 399") + number_of_animals_range_from_400_to_499 = EnumValue(204, "Number of animals range from 400 to 499") + number_of_animals_range_from_500_to_999 = EnumValue(205, "Number of animals range from 500 to 999") + number_of_animals_range_from_1_000_to_1_499 = EnumValue(206, "Number of animals range from 1,000 to 1,499") + number_of_animals_range_from_1_500_to_1_999 = EnumValue(207, "Number of animals range from 1,500 to 1,999") + number_of_animals_range_from_2_000_to_2_999 = EnumValue(208, "Number of animals range from 2,000 to 2,999") + number_of_animals_range_from_3_000_to_4_999 = EnumValue(210, "Number of animals range from 3,000 to 4,999") + number_of_animals_range_from_5_000_to_6_999 = EnumValue(212, "Number of animals range from 5,000 to 6,999") + number_of_animals_range_from_7_000_to_9_999 = EnumValue(214, "Number of animals range from 7,000 to 9,999") + number_of_animals_range_from_10_000_to_19_999 = EnumValue(216, "Number of animals range from 10,000 to 19,999") + number_of_animals_range_from_20_000_to_50_000 = EnumValue(218, "Number of animals range from 20,000 to 50,000") + number_of_animals_range_greater_than_50_000 = EnumValue(220, "Number of animals range greater than 50,000") + default = number_of_animals_range_from_201_to_249 + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/antenna_selection.py b/dis/siso_ref_010/enums/antenna_selection.py new file mode 100644 index 0000000..74f5793 --- /dev/null +++ b/dis/siso_ref_010/enums/antenna_selection.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 351, + * marshal size 2; + * AntennaSelection has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AntennaSelection(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + top = EnumValue(1, "Top") + bottom = EnumValue(2, "Bottom") + diversity = EnumValue(3, "Diversity") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/antenna_status.py b/dis/siso_ref_010/enums/antenna_status.py new file mode 100644 index 0000000..1e65b44 --- /dev/null +++ b/dis/siso_ref_010/enums/antenna_status.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 371, + * marshal size 8; + * AntennaStatus has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AntennaStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + not_able_to_emit = EnumValue(1, "Not Able to Emit") + able_to_emit = EnumValue(2, "Able to Emit") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/apaparameter_index_apastatus.py b/dis/siso_ref_010/enums/apaparameter_index_apastatus.py new file mode 100644 index 0000000..1a3fd6c --- /dev/null +++ b/dis/siso_ref_010/enums/apaparameter_index_apastatus.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 281, + * marshal size 2; + * APAParameterIndexAPAStatus has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class APAParameterIndexAPAStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + deselected_off = EnumValue(0, "Deselected/Off") + apa_value_change_only = EnumValue(1, "APA Value Change Only") + state_change = EnumValue(2, "State Change") + record_activation = EnumValue(3, "Record Activation") + default = deselected_off + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_anti_collision_day_night.py b/dis/siso_ref_010/enums/appearance_anti_collision_day_night.py new file mode 100644 index 0000000..e4ae66d --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_anti_collision_day_night.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 397, + * marshal size 1; + * AppearanceAntiCollisionDayNight has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceAntiCollisionDayNight(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + day = EnumValue(0, "Day") + night = EnumValue(1, "Night") + default = day + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_camouflage_type.py b/dis/siso_ref_010/enums/appearance_camouflage_type.py new file mode 100644 index 0000000..d11ed27 --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_camouflage_type.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 384, + * marshal size 2; + * AppearanceCamouflageType has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceCamouflageType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + desert_camouflage = EnumValue(0, "Desert Camouflage") + winter_camouflage = EnumValue(1, "Winter Camouflage") + forest_camouflage = EnumValue(2, "Forest Camouflage") + other = EnumValue(3, "Other") + default = desert_camouflage + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_canopy.py b/dis/siso_ref_010/enums/appearance_canopy.py new file mode 100644 index 0000000..03cc53e --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_canopy.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 387, + * marshal size 3; + * AppearanceCanopy has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceCanopy(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_applicable = EnumValue(0, "Not Applicable") + single_canopy_single_troop_door_closed = EnumValue(1, "Single Canopy/Single Troop Door Closed") + front_and_rear_canopy_left_and_right_troop_door_closed = EnumValue(2, "Front and Rear Canopy/Left and Right Troop Door Closed") + front_canopy_left_troop_door_open = EnumValue(3, "Front Canopy/Left Troop Door Open") + single_canopy_single_troop_door_open = EnumValue(4, "Single Canopy/Single Troop Door Open") + rear_canopy_right_troop_door_open = EnumValue(5, "Rear Canopy/Right Troop Door Open") + front_and_rear_canopy_left_and_right_troop_door_open = EnumValue(6, "Front and Rear Canopy/Left and Right Troop Door Open") + default = not_applicable + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_concealed_movement.py b/dis/siso_ref_010/enums/appearance_concealed_movement.py new file mode 100644 index 0000000..f442062 --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_concealed_movement.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 394, + * marshal size 1; + * AppearanceConcealedMovement has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceConcealedMovement(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + open_movement = EnumValue(0, "Open Movement") + rushes_between_covered_positions = EnumValue(1, "Rushes Between Covered Positions") + default = open_movement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_concealed_position.py b/dis/siso_ref_010/enums/appearance_concealed_position.py new file mode 100644 index 0000000..7ef8a21 --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_concealed_position.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 385, + * marshal size 1; + * AppearanceConcealedPosition has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceConcealedPosition(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_concealed = EnumValue(0, "Not Concealed") + prepared_concealed_position = EnumValue(1, "Prepared Concealed Position") + default = not_concealed + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_damage.py b/dis/siso_ref_010/enums/appearance_damage.py new file mode 100644 index 0000000..dd9703c --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_damage.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 379, + * marshal size 2; + * AppearanceDamage has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceDamage(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_damage = EnumValue(0, "No Damage") + slight_damage = EnumValue(1, "Slight Damage") + moderate_damage = EnumValue(2, "Moderate Damage") + destroyed = EnumValue(3, "Destroyed") + default = no_damage + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_entityor_object_state.py b/dis/siso_ref_010/enums/appearance_entityor_object_state.py new file mode 100644 index 0000000..2b7675c --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_entityor_object_state.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 386, + * marshal size 1; + * AppearanceEntityorObjectState has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceEntityorObjectState(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + active = EnumValue(0, "Active") + deactivated = EnumValue(1, "Deactivated") + default = active + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_environmental_density.py b/dis/siso_ref_010/enums/appearance_environmental_density.py new file mode 100644 index 0000000..adb9389 --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_environmental_density.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 395, + * marshal size 4; + * AppearanceEnvironmentalDensity has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceEnvironmentalDensity(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + clear = EnumValue(0, "Clear") + hazy = EnumValue(1, "Hazy") + dense = EnumValue(2, "Dense") + very_dense = EnumValue(3, "Very Dense") + opaque = EnumValue(4, "Opaque") + default = clear + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_hatch.py b/dis/siso_ref_010/enums/appearance_hatch.py new file mode 100644 index 0000000..64a7d6d --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_hatch.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 382, + * marshal size 3; + * AppearanceHatch has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceHatch(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_applicable = EnumValue(0, "Not Applicable") + closed = EnumValue(1, "Closed") + popped = EnumValue(2, "Popped") + popped_and_person_is_visible = EnumValue(3, "Popped and Person Is Visible") + open = EnumValue(4, "Open") + open_and_person_is_visible = EnumValue(5, "Open and Person Is Visible") + default = not_applicable + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_launcher_operational.py b/dis/siso_ref_010/enums/appearance_launcher_operational.py new file mode 100644 index 0000000..6df8834 --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_launcher_operational.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 383, + * marshal size 1; + * AppearanceLauncherOperational has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceLauncherOperational(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_raised_not_operational = EnumValue(0, "Not Raised/Not Operational") + raised_operational = EnumValue(1, "Raised/Operational") + default = not_raised_not_operational + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_life_form_compliance_status.py b/dis/siso_ref_010/enums/appearance_life_form_compliance_status.py new file mode 100644 index 0000000..b45779c --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_life_form_compliance_status.py @@ -0,0 +1,151 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 391, + * marshal size 4; + * AppearanceLifeFormComplianceStatus has 16 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceLifeFormComplianceStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_specified = EnumValue(0, "Not Specified") + detained = EnumValue(1, "Detained") + surrender = EnumValue(2, "Surrender") + using_fists = EnumValue(3, "Using Fists") + verbal_abuse_level_1 = EnumValue(4, "Verbal Abuse Level 1") + verbal_abuse_level_2 = EnumValue(5, "Verbal Abuse Level 2") + verbal_abuse_level_3 = EnumValue(6, "Verbal Abuse Level 3") + passive_resistance_level_1 = EnumValue(7, "Passive Resistance Level 1") + passive_resistance_level_2 = EnumValue(8, "Passive Resistance Level 2") + passive_resistance_level_3 = EnumValue(9, "Passive Resistance Level 3") + using_non_lethal_weapon_1 = EnumValue(10, "Using Non-Lethal Weapon 1") + using_non_lethal_weapon_2 = EnumValue(11, "Using Non-Lethal Weapon 2") + using_non_lethal_weapon_3 = EnumValue(12, "Using Non-Lethal Weapon 3") + using_non_lethal_weapon_4 = EnumValue(13, "Using Non-Lethal Weapon 4") + using_non_lethal_weapon_5 = EnumValue(14, "Using Non-Lethal Weapon 5") + using_non_lethal_weapon_6 = EnumValue(15, "Using Non-Lethal Weapon 6") + default = not_specified + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_life_form_posture.py b/dis/siso_ref_010/enums/appearance_life_form_posture.py new file mode 100644 index 0000000..3e47575 --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_life_form_posture.py @@ -0,0 +1,151 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 392, + * marshal size 4; + * AppearanceLifeFormPosture has 16 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceLifeFormPosture(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_specified = EnumValue(0, "Not Specified") + upright_standing_still = EnumValue(1, "Upright, Standing Still") + upright_walking = EnumValue(2, "Upright, Walking") + upright_running = EnumValue(3, "Upright, Running") + kneeling = EnumValue(4, "Kneeling") + prone = EnumValue(5, "Prone") + crawling = EnumValue(6, "Crawling") + swimming = EnumValue(7, "Swimming") + parachuting = EnumValue(8, "Parachuting") + jumping = EnumValue(9, "Jumping") + sitting = EnumValue(10, "Sitting") + squatting = EnumValue(11, "Squatting") + crouching = EnumValue(12, "Crouching") + wading = EnumValue(13, "Wading") + surrender = EnumValue(14, "Surrender") + detained = EnumValue(15, "Detained") + default = not_specified + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_life_form_weapon_implement.py b/dis/siso_ref_010/enums/appearance_life_form_weapon_implement.py new file mode 100644 index 0000000..f9c02df --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_life_form_weapon_implement.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 393, + * marshal size 2; + * AppearanceLifeFormWeaponImplement has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceLifeFormWeaponImplement(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_present = EnumValue(0, "Not Present") + stowed = EnumValue(1, "Stowed") + deployed_active = EnumValue(2, "Deployed/Active") + firing_position_in_use = EnumValue(3, "Firing Position/In Use") + default = not_present + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_lifeform_health.py b/dis/siso_ref_010/enums/appearance_lifeform_health.py new file mode 100644 index 0000000..847f364 --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_lifeform_health.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 390, + * marshal size 2; + * AppearanceLifeFormHealth has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceLifeformHealth(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_injury = EnumValue(0, "No Injury") + slight_injury = EnumValue(1, "Slight Injury") + moderate_injury = EnumValue(2, "Moderate Injury") + fatal_injury = EnumValue(3, "Fatal Injury") + default = no_injury + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_linear_object_lane_marker_visible.py b/dis/siso_ref_010/enums/appearance_linear_object_lane_marker_visible.py new file mode 100644 index 0000000..f954528 --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_linear_object_lane_marker_visible.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 410, + * marshal size 2; + * AppearanceLinearObjectLaneMarkerVisible has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceLinearObjectLaneMarkerVisible(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + left_side_is_visible = EnumValue(0, "Left Side Is Visible") + right_side_is_visible = EnumValue(1, "Right Side Is Visible") + both_sides_are_visible = EnumValue(2, "Both Sides Are Visible") + default = left_side_is_visible + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_linear_object_tank_ditch_breach.py b/dis/siso_ref_010/enums/appearance_linear_object_tank_ditch_breach.py new file mode 100644 index 0000000..58450ae --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_linear_object_tank_ditch_breach.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 409, + * marshal size 2; + * AppearanceLinearObjectTankDitchBreach has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceLinearObjectTankDitchBreach(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_breaching = EnumValue(0, "No Breaching") + slight_breaching = EnumValue(1, "Slight Breaching") + moderate_breached = EnumValue(2, "Moderate Breached") + cleared = EnumValue(3, "Cleared") + default = no_breaching + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_navigation_position_brightness.py b/dis/siso_ref_010/enums/appearance_navigation_position_brightness.py new file mode 100644 index 0000000..52a0da4 --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_navigation_position_brightness.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 398, + * marshal size 1; + * AppearanceNavigationPositionBrightness has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceNavigationPositionBrightness(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + dim = EnumValue(0, "Dim") + bright = EnumValue(1, "Bright") + default = dim + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_nvgmode.py b/dis/siso_ref_010/enums/appearance_nvgmode.py new file mode 100644 index 0000000..b6dcfd8 --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_nvgmode.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 400, + * marshal size 1; + * AppearanceNVGMode has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceNVGMode(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + overt_lighting = EnumValue(0, "Overt Lighting") + covert_lighting_night_vision_goggles = EnumValue(1, "Covert Lighting (Night Vision Goggles)") + default = overt_lighting + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_object_general_damage.py b/dis/siso_ref_010/enums/appearance_object_general_damage.py new file mode 100644 index 0000000..a75c9c2 --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_object_general_damage.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 405, + * marshal size 2; + * AppearanceObjectGeneralDamage has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceObjectGeneralDamage(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_damage = EnumValue(0, "No Damage") + damaged = EnumValue(1, "Damaged") + destroyed = EnumValue(2, "Destroyed") + default = no_damage + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_object_general_iedpresent.py b/dis/siso_ref_010/enums/appearance_object_general_iedpresent.py new file mode 100644 index 0000000..e233c95 --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_object_general_iedpresent.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 411, + * marshal size 2; + * AppearanceObjectGeneralIEDPresent has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceObjectGeneralIEDPresent(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + none = EnumValue(0, "None") + visible = EnumValue(1, "Visible") + partially_hidden = EnumValue(2, "Partially Hidden") + completely_hidden = EnumValue(3, "Completely Hidden") + default = none + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_object_general_predistributed.py b/dis/siso_ref_010/enums/appearance_object_general_predistributed.py new file mode 100644 index 0000000..5fd1106 --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_object_general_predistributed.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 406, + * marshal size 1; + * AppearanceObjectGeneralPredistributed has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceObjectGeneralPredistributed(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + object_created_during_the_exercise = EnumValue(0, "Object Created During the Exercise") + object_predistributed_prior_to_exercise_start = EnumValue(1, "Object Predistributed Prior to Exercise Start") + default = object_created_during_the_exercise + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_object_specific_breach_state.py b/dis/siso_ref_010/enums/appearance_object_specific_breach_state.py new file mode 100644 index 0000000..d2386cd --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_object_specific_breach_state.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 407, + * marshal size 2; + * AppearanceObjectSpecificBreachState has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceObjectSpecificBreachState(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_breaching = EnumValue(0, "No Breaching") + breached = EnumValue(1, "Breached") + cleared = EnumValue(2, "Cleared") + default = no_breaching + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_object_specific_chemical_type.py b/dis/siso_ref_010/enums/appearance_object_specific_chemical_type.py new file mode 100644 index 0000000..9bb4d32 --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_object_specific_chemical_type.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 408, + * marshal size 2; + * AppearanceObjectSpecificChemicalType has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceObjectSpecificChemicalType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + hydrochloric = EnumValue(1, "Hydrochloric") + white_phosphorous = EnumValue(2, "White Phosphorous") + red_phosphorous = EnumValue(3, "Red Phosphorous") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_paint_scheme.py b/dis/siso_ref_010/enums/appearance_paint_scheme.py new file mode 100644 index 0000000..da09f3d --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_paint_scheme.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 378, + * marshal size 1; + * AppearancePaintScheme has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearancePaintScheme(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + uniform_color = EnumValue(0, "Uniform Color") + camouflage = EnumValue(1, "Camouflage") + default = uniform_color + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_subsurface_hatch.py b/dis/siso_ref_010/enums/appearance_subsurface_hatch.py new file mode 100644 index 0000000..46c8c9b --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_subsurface_hatch.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 388, + * marshal size 3; + * AppearanceSubsurfaceHatch has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceSubsurfaceHatch(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_applicable = EnumValue(0, "Not Applicable") + hatch_is_closed = EnumValue(1, "Hatch Is Closed") + hatch_is_open = EnumValue(4, "Hatch Is Open") + default = not_applicable + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_supply_deployed.py b/dis/siso_ref_010/enums/appearance_supply_deployed.py new file mode 100644 index 0000000..fb9a715 --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_supply_deployed.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 399, + * marshal size 2; + * AppearanceSupplyDeployed has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceSupplyDeployed(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_applicable = EnumValue(0, "Not Applicable") + stowed = EnumValue(1, "Stowed") + deployed = EnumValue(2, "Deployed") + deployed_and_active = EnumValue(3, "Deployed and Active") + default = not_applicable + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/appearance_trailing_effects.py b/dis/siso_ref_010/enums/appearance_trailing_effects.py new file mode 100644 index 0000000..01c355d --- /dev/null +++ b/dis/siso_ref_010/enums/appearance_trailing_effects.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 381, + * marshal size 2; + * AppearanceTrailingEffects has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AppearanceTrailingEffects(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + none = EnumValue(0, "None") + small = EnumValue(1, "Small") + medium = EnumValue(2, "Medium") + large = EnumValue(3, "Large") + default = none + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/areal_object_appearance_minefield.py b/dis/siso_ref_010/enums/areal_object_appearance_minefield.py new file mode 100644 index 0000000..c6de32f --- /dev/null +++ b/dis/siso_ref_010/enums/areal_object_appearance_minefield.py @@ -0,0 +1,99 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_object_specific_breach_state import AppearanceObjectSpecificBreachState + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 239, marshal size 16, + * ArealObjectAppearanceMinefield + */ + +""" + +class ArealObjectAppearanceMinefieldBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=2) Describes the breached appearance of the object, use {@link AppearanceObjectSpecificBreachState} values for this field + ("_breachState", UByte, 2), + + # (bit position 16, length=16) 16-bit unsigned integer indicating the number of mines in the minefield, use {@link UInt8} values for this field + ("_mineCount", UInt, 16) + ] + +class ArealObjectAppearanceMinefield(ctypes.Union): + _fields_ = [ + ("capabilities", ArealObjectAppearanceMinefieldBitField), + ("asbyte", UInt8) + ] + + def set_breachState(self, value : AppearanceObjectSpecificBreachState): + self.capabilities._breachState = int(value) + def get_breachState(self) -> AppearanceObjectSpecificBreachState: + return AppearanceObjectSpecificBreachState.get_enum(self._breachState) + BreachState = property(get_breachState, set_breachState) + + def set_mineCount(self, value : UInt8): + self.capabilities._mineCount = int(value) + def get_mineCount(self) -> UInt8: + return self.capabilities._mineCount + MineCount = property(get_mineCount, set_mineCount) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "BreachState : " + self.BreachState.get_description + "\n" + outputStream += "MineCount : " + str(self.MineCount) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/articulated_parts_type_class.py b/dis/siso_ref_010/enums/articulated_parts_type_class.py new file mode 100644 index 0000000..8e5475c --- /dev/null +++ b/dis/siso_ref_010/enums/articulated_parts_type_class.py @@ -0,0 +1,398 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 59, + * marshal size 32; + * ArticulatedPartsTypeClass has 263 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ArticulatedPartsTypeClass(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_specified = EnumValue(0, "Not Specified") + rudder = EnumValue(1024, "Rudder") + left_flap = EnumValue(1056, "Left Flap") + right_flap = EnumValue(1088, "Right Flap") + left_aileron = EnumValue(1120, "Left Aileron") + right_aileron = EnumValue(1152, "Right Aileron") + helicopter_main_rotor = EnumValue(1184, "Helicopter - Main Rotor") + helicopter_tail_rotor = EnumValue(1216, "Helicopter - Tail Rotor") + other_aircraft_control_surfaces_defined_as_needed = EnumValue(1248, "Other Aircraft Control Surfaces Defined as Needed") + propeller_number_1 = EnumValue(1280, "Propeller Number 1") + propeller_number_2 = EnumValue(1312, "Propeller Number 2") + propeller_number_3 = EnumValue(1344, "Propeller Number 3") + propeller_number_4 = EnumValue(1376, "Propeller Number 4") + left_stabilator_stabilator_number_1 = EnumValue(1408, "Left Stabilator (Stabilator Number 1)") + right_stabilator_stabilator_number_2 = EnumValue(1440, "Right Stabilator (Stabilator Number 2)") + left_ruddervator_ruddervator_number_1 = EnumValue(1472, "Left Ruddervator (Ruddervator Number 1)") + right_ruddervator_ruddervator_number_2 = EnumValue(1504, "Right Ruddervator (Ruddervator Number 2)") + left_leading_edge_flap_slat = EnumValue(1536, "Left Leading Edge Flap/Slat") + right_leading_edge_flap_slat = EnumValue(1568, "Right Leading Edge Flap/Slat") + left_elevator = EnumValue(1600, "Left Elevator") + right_elevator = EnumValue(1632, "Right Elevator") + canard_left = EnumValue(1664, "Canard (left)") + canard_right = EnumValue(1696, "Canard (right)") + elevon_inner_left = EnumValue(1728, "Elevon Inner (left)") + elevon_inner_right = EnumValue(1760, "Elevon Inner (right)") + elevon_middle_left = EnumValue(1792, "Elevon Middle (left)") + elevon_middle_right = EnumValue(1824, "Elevon Middle (right)") + elevon_outer_left = EnumValue(1856, "Elevon Outer (left)") + elevon_outer_right = EnumValue(1888, "Elevon Outer (right)") + canopy_aircraft = EnumValue(1920, "Canopy (Aircraft)") + spoiler_left = EnumValue(1952, "Spoiler (left)") + spoiler_right = EnumValue(1984, "Spoiler (right)") + periscope = EnumValue(2048, "Periscope") + generic_antenna = EnumValue(2080, "Generic Antenna") + snorkel = EnumValue(2112, "Snorkel") + other_extendible_parts_defined_as_needed = EnumValue(2144, "Other Extendible Parts Defined as Needed") + dive_plane_sail_left = EnumValue(2176, "Dive Plane (Sail) - Left") + dive_plane_sail_right = EnumValue(2208, "Dive Plane (Sail) - Right") + dive_plane_bow_left = EnumValue(2240, "Dive Plane (Bow) - Left") + dive_plane_bow_right = EnumValue(2272, "Dive Plane (Bow) - Right") + dive_plane_stern_left = EnumValue(2304, "Dive Plane (Stern) - Left") + dive_plane_stern_right = EnumValue(2336, "Dive Plane (Stern) - Right") + left_rudder = EnumValue(2368, "Left Rudder") + right_rudder = EnumValue(2400, "Right Rudder") + landing_gear_door_nose = EnumValue(2976, "Landing Gear Door - Nose") + landing_gear_door_left_main = EnumValue(3008, "Landing Gear Door - Left Main") + landing_gear_door_right_main = EnumValue(3040, "Landing Gear Door - Right Main") + landing_gear = EnumValue(3072, "Landing Gear") + tail_hook = EnumValue(3104, "Tail Hook") + speed_brake = EnumValue(3136, "Speed Brake") + left_door_of_primary_weapon_bay = EnumValue(3168, "Left Door of Primary Weapon Bay") + right_door_of_primary_weapon_bay = EnumValue(3200, "Right Door of Primary Weapon Bay") + tank_or_apc_hatch = EnumValue(3232, "Tank or APC Hatch") + wingsweep = EnumValue(3264, "Wingsweep") + bridge_launcher = EnumValue(3296, "Bridge Launcher") + bridge_section_1 = EnumValue(3328, "Bridge Section 1") + bridge_section_2 = EnumValue(3360, "Bridge Section 2") + bridge_section_3 = EnumValue(3392, "Bridge Section 3") + primary_blade_1 = EnumValue(3424, "Primary Blade 1") + primary_blade_2 = EnumValue(3456, "Primary Blade 2") + primary_boom = EnumValue(3488, "Primary Boom") + primary_launcher_arm = EnumValue(3520, "Primary Launcher Arm") + other_fixed_position_parts_defined_as_needed = EnumValue(3552, "Other Fixed Position Parts Defined as Needed") + landing_gear_nose = EnumValue(3584, "Landing Gear - Nose") + landing_gear_left_main = EnumValue(3616, "Landing Gear - Left Main") + landing_gear_right_main = EnumValue(3648, "Landing Gear - Right Main") + doors_of_left_side_weapon_bay = EnumValue(3680, "Doors of Left Side Weapon Bay") + doors_of_right_side_weapon_bay = EnumValue(3712, "Doors of Right Side Weapon Bay") + spot_search_light_1 = EnumValue(3744, "Spot/Search Light #1") + spot_search_light_2 = EnumValue(3776, "Spot/Search Light #2") + spot_search_light_3 = EnumValue(3808, "Spot/Search Light #3") + spot_search_light_4 = EnumValue(3840, "Spot/Search Light #4") + landing_light = EnumValue(3872, "Landing Light") + primary_turret_number_1 = EnumValue(4096, "Primary Turret Number 1") + primary_turret_number_2 = EnumValue(4128, "Primary Turret Number 2") + primary_turret_number_3 = EnumValue(4160, "Primary Turret Number 3") + primary_turret_number_4 = EnumValue(4192, "Primary Turret Number 4") + primary_turret_number_5 = EnumValue(4224, "Primary Turret Number 5") + primary_turret_number_6 = EnumValue(4256, "Primary Turret Number 6") + primary_turret_number_7 = EnumValue(4288, "Primary Turret Number 7") + primary_turret_number_8 = EnumValue(4320, "Primary Turret Number 8") + primary_turret_number_9 = EnumValue(4352, "Primary Turret Number 9") + primary_turret_number_10 = EnumValue(4384, "Primary Turret Number 10") + primary_gun_number_1 = EnumValue(4416, "Primary Gun Number 1") + primary_gun_number_2 = EnumValue(4448, "Primary Gun Number 2") + primary_gun_number_3 = EnumValue(4480, "Primary Gun Number 3") + primary_gun_number_4 = EnumValue(4512, "Primary Gun Number 4") + primary_gun_number_5 = EnumValue(4544, "Primary Gun Number 5") + primary_gun_number_6 = EnumValue(4576, "Primary Gun Number 6") + primary_gun_number_7 = EnumValue(4608, "Primary Gun Number 7") + primary_gun_number_8 = EnumValue(4640, "Primary Gun Number 8") + primary_gun_number_9 = EnumValue(4672, "Primary Gun Number 9") + primary_gun_number_10 = EnumValue(4704, "Primary Gun Number 10") + primary_launcher_1 = EnumValue(4736, "Primary Launcher 1") + primary_launcher_2 = EnumValue(4768, "Primary Launcher 2") + primary_launcher_3 = EnumValue(4800, "Primary Launcher 3") + primary_launcher_4 = EnumValue(4832, "Primary Launcher 4") + primary_launcher_5 = EnumValue(4864, "Primary Launcher 5") + primary_launcher_6 = EnumValue(4896, "Primary Launcher 6") + primary_launcher_7 = EnumValue(4928, "Primary Launcher 7") + primary_launcher_8 = EnumValue(4960, "Primary Launcher 8") + primary_launcher_9 = EnumValue(4992, "Primary Launcher 9") + primary_launcher_10 = EnumValue(5024, "Primary Launcher 10") + primary_defense_systems_1 = EnumValue(5056, "Primary Defense Systems 1") + primary_defense_systems_2 = EnumValue(5088, "Primary Defense Systems 2") + primary_defense_systems_3 = EnumValue(5120, "Primary Defense Systems 3") + primary_defense_systems_4 = EnumValue(5152, "Primary Defense Systems 4") + primary_defense_systems_5 = EnumValue(5184, "Primary Defense Systems 5") + primary_defense_systems_6 = EnumValue(5216, "Primary Defense Systems 6") + primary_defense_systems_7 = EnumValue(5248, "Primary Defense Systems 7") + primary_defense_systems_8 = EnumValue(5280, "Primary Defense Systems 8") + primary_defense_systems_9 = EnumValue(5312, "Primary Defense Systems 9") + primary_defense_systems_10 = EnumValue(5344, "Primary Defense Systems 10") + primary_radar_1 = EnumValue(5376, "Primary Radar 1") + primary_radar_2 = EnumValue(5408, "Primary Radar 2") + primary_radar_3 = EnumValue(5440, "Primary Radar 3") + primary_radar_4 = EnumValue(5472, "Primary Radar 4") + primary_radar_5 = EnumValue(5504, "Primary Radar 5") + primary_radar_6 = EnumValue(5536, "Primary Radar 6") + primary_radar_7 = EnumValue(5568, "Primary Radar 7") + primary_radar_8 = EnumValue(5600, "Primary Radar 8") + primary_radar_9 = EnumValue(5632, "Primary Radar 9") + primary_radar_10 = EnumValue(5664, "Primary Radar 10") + secondary_turret_number_1 = EnumValue(5696, "Secondary Turret Number 1") + secondary_turret_number_2 = EnumValue(5728, "Secondary Turret Number 2") + secondary_turret_number_3 = EnumValue(5760, "Secondary Turret Number 3") + secondary_turret_number_4 = EnumValue(5792, "Secondary Turret Number 4") + secondary_turret_number_5 = EnumValue(5824, "Secondary Turret Number 5") + secondary_turret_number_6 = EnumValue(5856, "Secondary Turret Number 6") + secondary_turret_number_7 = EnumValue(5888, "Secondary Turret Number 7") + secondary_turret_number_8 = EnumValue(5920, "Secondary Turret Number 8") + secondary_turret_number_9 = EnumValue(5952, "Secondary Turret Number 9") + secondary_turret_number_10 = EnumValue(5984, "Secondary Turret Number 10") + secondary_gun_number_1 = EnumValue(6016, "Secondary Gun Number 1") + secondary_gun_number_2 = EnumValue(6048, "Secondary Gun Number 2") + secondary_gun_number_3 = EnumValue(6080, "Secondary Gun Number 3") + secondary_gun_number_4 = EnumValue(6112, "Secondary Gun Number 4") + secondary_gun_number_5 = EnumValue(6144, "Secondary Gun Number 5") + secondary_gun_number_6 = EnumValue(6176, "Secondary Gun Number 6") + secondary_gun_number_7 = EnumValue(6208, "Secondary Gun Number 7") + secondary_gun_number_8 = EnumValue(6240, "Secondary Gun Number 8") + secondary_gun_number_9 = EnumValue(6272, "Secondary Gun Number 9") + secondary_gun_number_10 = EnumValue(6304, "Secondary Gun Number 10") + secondary_launcher_1 = EnumValue(6336, "Secondary Launcher 1") + secondary_launcher_2 = EnumValue(6368, "Secondary Launcher 2") + secondary_launcher_3 = EnumValue(6400, "Secondary Launcher 3") + secondary_launcher_4 = EnumValue(6432, "Secondary Launcher 4") + secondary_launcher_5 = EnumValue(6464, "Secondary Launcher 5") + secondary_launcher_6 = EnumValue(6496, "Secondary Launcher 6") + secondary_launcher_7 = EnumValue(6528, "Secondary Launcher 7") + secondary_launcher_8 = EnumValue(6560, "Secondary Launcher 8") + secondary_launcher_9 = EnumValue(6592, "Secondary Launcher 9") + secondary_launcher_10 = EnumValue(6624, "Secondary Launcher 10") + secondary_defense_systems_1 = EnumValue(6656, "Secondary Defense Systems 1") + secondary_defense_systems_2 = EnumValue(6688, "Secondary Defense Systems 2") + secondary_defense_systems_3 = EnumValue(6720, "Secondary Defense Systems 3") + secondary_defense_systems_4 = EnumValue(6752, "Secondary Defense Systems 4") + secondary_defense_systems_5 = EnumValue(6784, "Secondary Defense Systems 5") + secondary_defense_systems_6 = EnumValue(6816, "Secondary Defense Systems 6") + secondary_defense_systems_7 = EnumValue(6848, "Secondary Defense Systems 7") + secondary_defense_systems_8 = EnumValue(6880, "Secondary Defense Systems 8") + secondary_defense_systems_9 = EnumValue(6912, "Secondary Defense Systems 9") + secondary_defense_systems_10 = EnumValue(6944, "Secondary Defense Systems 10") + secondary_radar_1 = EnumValue(6976, "Secondary Radar 1") + secondary_radar_2 = EnumValue(7008, "Secondary Radar 2") + secondary_radar_3 = EnumValue(7040, "Secondary Radar 3") + secondary_radar_4 = EnumValue(7072, "Secondary Radar 4") + secondary_radar_5 = EnumValue(7104, "Secondary Radar 5") + secondary_radar_6 = EnumValue(7136, "Secondary Radar 6") + secondary_radar_7 = EnumValue(7168, "Secondary Radar 7") + secondary_radar_8 = EnumValue(7200, "Secondary Radar 8") + secondary_radar_9 = EnumValue(7232, "Secondary Radar 9") + secondary_radar_10 = EnumValue(7264, "Secondary Radar 10") + deck_elevator_1 = EnumValue(7296, "Deck Elevator #1") + deck_elevator_2 = EnumValue(7328, "Deck Elevator #2") + catapult_1 = EnumValue(7360, "Catapult #1") + catapult_2 = EnumValue(7392, "Catapult #2") + jet_blast_deflector_1 = EnumValue(7424, "Jet Blast Deflector #1") + jet_blast_deflector_2 = EnumValue(7456, "Jet Blast Deflector #2") + arrestor_wires_1 = EnumValue(7488, "Arrestor Wires #1") + arrestor_wires_2 = EnumValue(7520, "Arrestor Wires #2") + arrestor_wires_3 = EnumValue(7552, "Arrestor Wires #3") + wing_or_rotor_fold = EnumValue(7584, "Wing (or Rotor) Fold") + fuselage_fold = EnumValue(7616, "Fuselage Fold") + main_cargo_door = EnumValue(7648, "Main Cargo Door") + cargo_ramp = EnumValue(7680, "Cargo Ramp") + air_to_air_refueling_boom = EnumValue(7712, "Air-to-Air Refueling Boom") + primary_aerial_refueling_receptacle_door = EnumValue(7744, "Primary Aerial Refueling Receptacle Door") + secondary_aerial_refueling_receptacle_door = EnumValue(7776, "Secondary Aerial Refueling Receptacle Door") + aerial_refueling_receptacle_latch = EnumValue(7808, "Aerial Refueling Receptacle Latch") + cargo_door_1 = EnumValue(7840, "Cargo Door #1") + cargo_door_2 = EnumValue(7872, "Cargo Door #2") + cargo_door_3 = EnumValue(7904, "Cargo Door #3") + cargo_door_4 = EnumValue(7936, "Cargo Door #4") + cargo_door_5 = EnumValue(7968, "Cargo Door #5") + cargo_door_6 = EnumValue(8000, "Cargo Door #6") + cargo_door_7 = EnumValue(8032, "Cargo Door #7") + cargo_door_8 = EnumValue(8064, "Cargo Door #8") + cargo_door_9 = EnumValue(8096, "Cargo Door #9") + cargo_door_10 = EnumValue(8128, "Cargo Door #10") + centre_refuelling_drogue = EnumValue(8160, "Centre Refuelling Drogue") + port_refuelling_drogue = EnumValue(8192, "Port Refuelling Drogue") + starboard_refuelling_drogue = EnumValue(8224, "Starboard Refuelling Drogue") + submarine_engine_exhaust_mast = EnumValue(8256, "Submarine Engine Exhaust Mast") + submarine_mast_1 = EnumValue(8288, "Submarine Mast #1") + submarine_mast_2 = EnumValue(8320, "Submarine Mast #2") + submarine_mast_3 = EnumValue(8352, "Submarine Mast #3") + submarine_mast_4 = EnumValue(8384, "Submarine Mast #4") + submarine_mast_5 = EnumValue(8416, "Submarine Mast #5") + submarine_mast_6 = EnumValue(8448, "Submarine Mast #6") + submarine_mast_7 = EnumValue(8480, "Submarine Mast #7") + submarine_mast_8 = EnumValue(8512, "Submarine Mast #8") + submarine_mast_9 = EnumValue(8544, "Submarine Mast #9") + submarine_mast_10 = EnumValue(8576, "Submarine Mast #10") + vectored_thrust_nozzle = EnumValue(8608, "Vectored Thrust Nozzle") + left_door_of_the_left_weapon_bay = EnumValue(8640, "Left Door of the Left Weapon Bay") + right_door_of_the_left_weapon_bay = EnumValue(8672, "Right Door of the Left Weapon Bay") + left_door_of_the_right_weapon_bay = EnumValue(8704, "Left Door of the Right Weapon Bay") + right_door_of_the_right_weapon_bay = EnumValue(8736, "Right Door of the Right Weapon Bay") + gun_door = EnumValue(8768, "Gun Door") + countermeasure_door_left = EnumValue(8800, "Countermeasure Door Left") + countermeasure_door_right = EnumValue(8832, "Countermeasure Door Right") + hook_door_forward = EnumValue(8864, "Hook Door Forward") + hook_door_aft = EnumValue(8896, "Hook Door Aft") + lift_fan_upper_door = EnumValue(8928, "Lift Fan Upper Door") + lift_fan_lower_door_left = EnumValue(8960, "Lift Fan Lower Door Left") + lift_fan_lower_door_right = EnumValue(8992, "Lift Fan Lower Door Right") + refuel_probe_door = EnumValue(9024, "Refuel Probe Door") + left_engine_nacelle = EnumValue(9056, "Left Engine Nacelle") + right_engine_nacelle = EnumValue(9088, "Right Engine Nacelle") + _1st_left_wheel = EnumValue(9120, "1st Left Wheel") + _1st_right_wheel = EnumValue(9152, "1st Right Wheel") + _2nd_left_wheel = EnumValue(9184, "2nd Left Wheel") + _2nd_right_wheel = EnumValue(9216, "2nd Right Wheel") + _3rd_left_wheel = EnumValue(9248, "3rd Left Wheel") + _3rd_right_wheel = EnumValue(9280, "3rd Right Wheel") + _4th_left_wheel = EnumValue(9312, "4th Left Wheel") + _4th_right_wheel = EnumValue(9344, "4th Right Wheel") + _5th_left_wheel = EnumValue(9376, "5th Left Wheel") + _5th_right_wheel = EnumValue(9408, "5th Right Wheel") + _6th_left_wheel = EnumValue(9440, "6th Left Wheel") + _6th_right_wheel = EnumValue(9472, "6th Right Wheel") + _7th_left_wheel = EnumValue(9504, "7th Left Wheel") + _7th_right_wheel = EnumValue(9536, "7th Right Wheel") + _8th_left_wheel = EnumValue(9568, "8th Left Wheel") + _8th_right_wheel = EnumValue(9600, "8th Right Wheel") + _9th_left_wheel = EnumValue(9632, "9th Left Wheel") + _9th_right_wheel = EnumValue(9664, "9th Right Wheel") + _10th_left_wheel = EnumValue(9696, "10th Left Wheel") + _10th_right_wheel = EnumValue(9728, "10th Right Wheel") + refueling_probe = EnumValue(9760, "Refueling Probe") + steering_wheel = EnumValue(9792, "Steering Wheel") + crane_body = EnumValue(9824, "Crane Body") + crane_arm_1 = EnumValue(9856, "Crane Arm 1") + crane_arm_2 = EnumValue(9888, "Crane Arm 2") + crane_arm_3 = EnumValue(9920, "Crane Arm 3") + crane_boom = EnumValue(9952, "Crane Boom") + crane_hook = EnumValue(9984, "Crane Hook") + trailer = EnumValue(10016, "Trailer") + roller_left = EnumValue(10048, "Roller Left") + roller_right = EnumValue(10080, "Roller Right") + primary_gun_recoil = EnumValue(10112, "Primary Gun Recoil") + secondary_gun_recoil = EnumValue(10144, "Secondary Gun Recoil") + default = not_specified + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/articulated_parts_type_metric.py b/dis/siso_ref_010/enums/articulated_parts_type_metric.py new file mode 100644 index 0000000..0811844 --- /dev/null +++ b/dis/siso_ref_010/enums/articulated_parts_type_metric.py @@ -0,0 +1,152 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 58, + * marshal size 5; + * ArticulatedPartsTypeMetric has 17 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ArticulatedPartsTypeMetric(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_specified = EnumValue(0, "Not Specified") + position = EnumValue(1, "Position") + position_rate = EnumValue(2, "Position Rate") + extension = EnumValue(3, "Extension") + extension_rate = EnumValue(4, "Extension Rate") + x = EnumValue(5, "X") + x_rate = EnumValue(6, "X Rate") + y = EnumValue(7, "Y") + y_rate = EnumValue(8, "Y Rate") + z = EnumValue(9, "Z") + z_rate = EnumValue(10, "Z Rate") + azimuth = EnumValue(11, "Azimuth") + azimuth_rate = EnumValue(12, "Azimuth Rate") + elevation = EnumValue(13, "Elevation") + elevation_rate = EnumValue(14, "Elevation Rate") + rotation = EnumValue(15, "Rotation") + rotation_rate = EnumValue(16, "Rotation Rate") + default = not_specified + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/attached_part_detached_indicator.py b/dis/siso_ref_010/enums/attached_part_detached_indicator.py new file mode 100644 index 0000000..122a052 --- /dev/null +++ b/dis/siso_ref_010/enums/attached_part_detached_indicator.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 415, + * marshal size 8; + * AttachedPartDetachedIndicator has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AttachedPartDetachedIndicator(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + attached = EnumValue(0, "Attached") + detached = EnumValue(1, "Detached") + default = attached + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/attached_parts.py b/dis/siso_ref_010/enums/attached_parts.py new file mode 100644 index 0000000..560c851 --- /dev/null +++ b/dis/siso_ref_010/enums/attached_parts.py @@ -0,0 +1,146 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 57, + * marshal size 32; + * AttachedParts has 11 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AttachedParts(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + nothing_empty = EnumValue(0, "Nothing, Empty") + m16a42_rifle = EnumValue(896, "M16A42 rifle") + m249_saw = EnumValue(897, "M249 SAW") + m60_machine_gun = EnumValue(898, "M60 Machine gun") + m203_grenade_launcher = EnumValue(899, "M203 Grenade Launcher") + m136_at4 = EnumValue(900, "M136 AT4") + m47_dragon = EnumValue(901, "M47 Dragon") + aaws_m_javelin = EnumValue(902, "AAWS-M Javelin") + m18a1_claymore_mine = EnumValue(903, "M18A1 Claymore Mine") + mk19_grenade_launcher = EnumValue(904, "MK19 Grenade Launcher") + m2_machine_gun = EnumValue(905, "M2 Machine Gun") + default = nothing_empty + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/australian_category_overlay.py b/dis/siso_ref_010/enums/australian_category_overlay.py new file mode 100644 index 0000000..d7a1e03 --- /dev/null +++ b/dis/siso_ref_010/enums/australian_category_overlay.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 500, + * marshal size 8; + * AustralianCategoryOverlay has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class AustralianCategoryOverlay(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + australian_army = EnumValue(11, "Australian Army") + royal_australian_air_force_raaf = EnumValue(13, "Royal Australian Air Force (RAAF)") + royal_australian_navy_ran = EnumValue(14, "Royal Australian Navy (RAN)") + australian_special_operations_command_socomd = EnumValue(30, "Australian Special Operations Command (SOCOMD)") + australian_department_of_home_affairs = EnumValue(51, "Australian Department of Home Affairs") + australian_federal_police_afp = EnumValue(52, "Australian Federal Police (AFP)") + default = australian_army + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/beam_status_beam_state.py b/dis/siso_ref_010/enums/beam_status_beam_state.py new file mode 100644 index 0000000..72370ff --- /dev/null +++ b/dis/siso_ref_010/enums/beam_status_beam_state.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 318, + * marshal size 1; + * BeamStatusBeamState has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class BeamStatusBeamState(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + active = EnumValue(0, "Active") + deactivated = EnumValue(1, "Deactivated") + default = active + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/building_paint_scheme.py b/dis/siso_ref_010/enums/building_paint_scheme.py new file mode 100644 index 0000000..28c0479 --- /dev/null +++ b/dis/siso_ref_010/enums/building_paint_scheme.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 464, + * marshal size 8; + * BuildingPaintScheme has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class BuildingPaintScheme(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + Default = EnumValue(0, "Default") + default = default + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/capability_report.py b/dis/siso_ref_010/enums/capability_report.py new file mode 100644 index 0000000..ee989bd --- /dev/null +++ b/dis/siso_ref_010/enums/capability_report.py @@ -0,0 +1,144 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 358, + * marshal size 8; + * CapabilityReport has 9 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CapabilityReport(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_communications_capability_ca = EnumValue(0, "No Communications Capability (CA)") + reserved = EnumValue(1, "Reserved") + reserved_2 = EnumValue(2, "Reserved") + reserved_3 = EnumValue(3, "Reserved") + signifies_at_least_comm_a_and_comm_b_capability_and_ability_to_set_ca_code_7_and_on_the_ground = EnumValue(4, "Signifies at Least Comm-A and Comm-B Capability and Ability to Set CA Code 7 and on the Ground") + signifies_at_least_comm_a_and_comm_b_capability_and_ability_to_set_ca_code_7_and_airborne = EnumValue(5, "Signifies at Least Comm-A and Comm-B capability and Ability to Set CA Code 7 and Airborne") + signifies_at_least_comm_a_and_comm_b_capability_and_ability_to_set_ca_code_7_and_either_airborne_or_on_the_ground = EnumValue(6, "Signifies at Least Comm-A and Comm-B capability and Ability to Set CA Code 7 and Either Airborne or on the Ground") + signifies_the_downlink_request_dr_field_is_not_equal_to_0_and_the_flight_status_fs_field_equals_2_3_4_or_5_and_either_airborne_or_on_the_ground = EnumValue(7, "Signifies the Downlink Request (DR) Field Is Not Equal To 0 and The Flight Status (FS) Field Equals 2, 3, 4 or 5, and Either Airborne or on the Ground") + no_statement = EnumValue(255, "No Statement") + default = no_communications_capability_ca + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/ccttsincgarsclear_channel.py b/dis/siso_ref_010/enums/ccttsincgarsclear_channel.py new file mode 100644 index 0000000..401f9ec --- /dev/null +++ b/dis/siso_ref_010/enums/ccttsincgarsclear_channel.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 171, + * marshal size 8; + * CCTTSINCGARSClearChannel has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CCTTSINCGARSClearChannel(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_clear_channel = EnumValue(0, "Not clear channel") + clear_channel = EnumValue(1, "Clear channel") + default = not_clear_channel + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/ccttsincgarsstartof_message.py b/dis/siso_ref_010/enums/ccttsincgarsstartof_message.py new file mode 100644 index 0000000..4407bcd --- /dev/null +++ b/dis/siso_ref_010/enums/ccttsincgarsstartof_message.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 170, + * marshal size 8; + * CCTTSINCGARSStartofMessage has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CCTTSINCGARSStartofMessage(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_start_of_message = EnumValue(0, "Not start of message") + start_of_message = EnumValue(1, "Start of Message") + default = not_start_of_message + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cigiextension_packet_id.py b/dis/siso_ref_010/enums/cigiextension_packet_id.py new file mode 100644 index 0000000..3b2a62b --- /dev/null +++ b/dis/siso_ref_010/enums/cigiextension_packet_id.py @@ -0,0 +1,120 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 780, marshal size 16; + * CIGIExtensionPacketID has 5 enumerations total. + * Registered extension packet IDs shall be in the range of 1000h - 7FFFh. If the extension capability includes both a request and response packet, it is recommended they be given sequential packet ID numbers. Submitters are welcome to request any ID within this range, but are encouraged to cluster packet IDs for similar capabilities if the next available sequential ID from the beginning of the range is not requested. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class CIGIExtensionPacketID(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + image_capture_request_packet_id = EnumValue(4096, "Image Capture Request packet ID") + image_capture_response_packet_id = EnumValue(4097, "Image Capture Response packet ID") + state_notification_request_packet_id = EnumValue(4098, "State Notification Request Packet ID") + state_notification_response_packet_id = EnumValue(4099, "State Notification Response Packet ID") + globalrefframedef_packet_id = EnumValue(5000, "GlobalRefFrameDef Packet ID") + default = image_capture_request_packet_id + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/class10supply_category_materialto_support_non_military_programs.py b/dis/siso_ref_010/enums/class10supply_category_materialto_support_non_military_programs.py new file mode 100644 index 0000000..295ab1e --- /dev/null +++ b/dis/siso_ref_010/enums/class10supply_category_materialto_support_non_military_programs.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 610, + * marshal size 8; + * Class10SupplyCategoryMaterialtoSupportNonMilitaryPrograms has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Class10SupplyCategoryMaterialtoSupportNonMilitaryPrograms(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(1, "Other") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/class11supply_category_supplies_non_doctrinal.py b/dis/siso_ref_010/enums/class11supply_category_supplies_non_doctrinal.py new file mode 100644 index 0000000..72d73ef --- /dev/null +++ b/dis/siso_ref_010/enums/class11supply_category_supplies_non_doctrinal.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 611, + * marshal size 8; + * Class11SupplyCategorySupplies(NonDoctrinal) has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Class11SupplyCategorySuppliesNonDoctrinal(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(1, "Other") + pallets = EnumValue(2, "Pallets") + fuel_tanks_drums_and_bladders = EnumValue(3, "Fuel Tanks, Drums and Bladders") + chests = EnumValue(4, "Chests") + boxes = EnumValue(5, "Boxes") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/class12supply_category_sling_loads_non_doctrinal.py b/dis/siso_ref_010/enums/class12supply_category_sling_loads_non_doctrinal.py new file mode 100644 index 0000000..d0c8270 --- /dev/null +++ b/dis/siso_ref_010/enums/class12supply_category_sling_loads_non_doctrinal.py @@ -0,0 +1,147 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 612, + * marshal size 8; + * Class12SupplyCategorySlingLoads(NonDoctrinal) has 12 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Class12SupplyCategorySlingLoadsNonDoctrinal(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(1, "Other") + sling_load_blivet = EnumValue(2, "Sling Load, Blivet") + sling_load_crate = EnumValue(3, "Sling Load, Crate") + sling_load_water_bucket = EnumValue(4, "Sling Load, Water Bucket") + sling_load_vehicles = EnumValue(5, "Sling Load, Vehicles") + sling_load_howitzer = EnumValue(6, "Sling Load, Howitzer") + sling_load_collapsible = EnumValue(7, "Sling Load, Collapsible") + sling_load_bladder = EnumValue(8, "Sling Load, Bladder") + sling_load_pallet_of_crates = EnumValue(9, "Sling Load, Pallet of Crates") + sling_load_helicopters = EnumValue(10, "Sling Load, Helicopters") + sling_load_hoist = EnumValue(11, "Sling Load, Hoist") + sling_load_concrete_block = EnumValue(12, "Sling Load, Concrete Block") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/class1supply_category_subsistence.py b/dis/siso_ref_010/enums/class1supply_category_subsistence.py new file mode 100644 index 0000000..e27a082 --- /dev/null +++ b/dis/siso_ref_010/enums/class1supply_category_subsistence.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 601, + * marshal size 8; + * Class1SupplyCategorySubsistence has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Class1SupplyCategorySubsistence(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(1, "Other") + a_non_perishable = EnumValue(2, "A - Non-Perishable") + c_combat_rations = EnumValue(3, "C - Combat Rations") + r_refrigerated = EnumValue(4, "R - Refrigerated") + s_other_non_refrigerated = EnumValue(5, "S - Other Non-Refrigerated") + w_water = EnumValue(6, "W - Water") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/class2supply_category_clothing_individual_equipment_tools_admin_supplies.py b/dis/siso_ref_010/enums/class2supply_category_clothing_individual_equipment_tools_admin_supplies.py new file mode 100644 index 0000000..dafff8b --- /dev/null +++ b/dis/siso_ref_010/enums/class2supply_category_clothing_individual_equipment_tools_admin_supplies.py @@ -0,0 +1,143 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 602, + * marshal size 8; + * Class2SupplyCategoryClothingIndividualEquipmentToolsAdminSupplies has 8 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Class2SupplyCategoryClothingIndividualEquipmentToolsAdminSupplies(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(1, "Other") + a_air = EnumValue(2, "A - Air") + b_ground_support_materiel = EnumValue(3, "B - Ground Support Materiel") + e_general_supplies = EnumValue(4, "E - General Supplies") + f_clothing = EnumValue(5, "F - Clothing") + g_electronics = EnumValue(6, "G - Electronics") + m_weapons_humans = EnumValue(7, "M - Weapons (Humans)") + t_industrial_supplies = EnumValue(8, "T - Industrial Supplies") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/class3supply_category_petroleum_oils_lubricants.py b/dis/siso_ref_010/enums/class3supply_category_petroleum_oils_lubricants.py new file mode 100644 index 0000000..864725f --- /dev/null +++ b/dis/siso_ref_010/enums/class3supply_category_petroleum_oils_lubricants.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 603, + * marshal size 8; + * Class3SupplyCategoryPetroleumOilsLubricants has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Class3SupplyCategoryPetroleumOilsLubricants(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(1, "Other") + a_pol_for_air_vehicles = EnumValue(2, "A - POL for Air Vehicles") + w_pol_for_land_vehicles = EnumValue(3, "W - POL for Land Vehicles") + p_packaged_pol = EnumValue(4, "P - Packaged POL") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/class4supply_category_construction_materials.py b/dis/siso_ref_010/enums/class4supply_category_construction_materials.py new file mode 100644 index 0000000..0ff01bc --- /dev/null +++ b/dis/siso_ref_010/enums/class4supply_category_construction_materials.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 604, + * marshal size 8; + * Class4SupplyCategoryConstructionMaterials has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Class4SupplyCategoryConstructionMaterials(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(1, "Other") + a_construction = EnumValue(2, "A - Construction") + b_barrier = EnumValue(3, "B - Barrier") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/class6supply_category_personnel_demand_items.py b/dis/siso_ref_010/enums/class6supply_category_personnel_demand_items.py new file mode 100644 index 0000000..a9d21fb --- /dev/null +++ b/dis/siso_ref_010/enums/class6supply_category_personnel_demand_items.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 606, + * marshal size 8; + * Class6SupplyCategoryPersonnelDemandItems has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Class6SupplyCategoryPersonnelDemandItems(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(1, "Other") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/class7supply_category_major_items.py b/dis/siso_ref_010/enums/class7supply_category_major_items.py new file mode 100644 index 0000000..68c6b96 --- /dev/null +++ b/dis/siso_ref_010/enums/class7supply_category_major_items.py @@ -0,0 +1,160 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 607, + * marshal size 8; + * Class7SupplyCategoryMajorItems has 25 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Class7SupplyCategoryMajorItems(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(1, "Other") + a_air_not_used_as_described_in_air_domain = EnumValue(2, "A - Air (Not used, as described in Air Domain)") + b_ground_support_materiel = EnumValue(3, "B - Ground Support Materiel") + d_admin_vehicles_not_used_as_described_in_land_domain = EnumValue(4, "D - Admin Vehicles (Not used, as described in Land Domain)") + g_electronics = EnumValue(5, "G - Electronics") + j_racks_adaptors_pylons = EnumValue(6, "J - Racks, Adaptors, Pylons") + k_tactical_vehicles_not_used_as_described_in_land_domain = EnumValue(7, "K - Tactical Vehicles (Not used, as described in Land Domain)") + l_missiles_not_used_as_described_in_munition_domain = EnumValue(8, "L - Missiles (Not used, as described in Munition Domain)") + m_weapons = EnumValue(9, "M - Weapons") + n_special_weapons = EnumValue(10, "N - Special Weapons") + x_aircraft_engines = EnumValue(11, "X - Aircraft Engines") + drop_tank = EnumValue(20, "Drop Tank") + conformal_fuel_tank = EnumValue(21, "Conformal Fuel Tank") + luggage_pod = EnumValue(22, "Luggage Pod") + ecm_pod = EnumValue(23, "ECM Pod") + para_drogue = EnumValue(24, "Para-Drogue") + targeting_pod = EnumValue(25, "Targeting Pod") + fairing = EnumValue(26, "Fairing") + air_refuelling_pod = EnumValue(27, "Air Refuelling Pod") + heavy_airdrop = EnumValue(28, "Heavy Airdrop") + container_delivery_system_cds_airdrop = EnumValue(29, "Container Delivery System (CDS) Airdrop") + rocket_pod_launcher = EnumValue(30, "Rocket Pod/Launcher") + tactical_pod = EnumValue(31, "Tactical Pod") + recce_pod = EnumValue(32, "RECCE pod") + flir_pod = EnumValue(33, "FLIR pod") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/class8supply_category_medical_material.py b/dis/siso_ref_010/enums/class8supply_category_medical_material.py new file mode 100644 index 0000000..c414ead --- /dev/null +++ b/dis/siso_ref_010/enums/class8supply_category_medical_material.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 608, + * marshal size 8; + * Class8SupplyCategoryMedicalMaterial has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Class8SupplyCategoryMedicalMaterial(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(1, "Other") + a_medical_materiel = EnumValue(2, "A - Medical Materiel") + b_blood_fluids = EnumValue(3, "B - Blood / Fluids") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/class9supply_category_repair_partsand_components.py b/dis/siso_ref_010/enums/class9supply_category_repair_partsand_components.py new file mode 100644 index 0000000..b1a5ad9 --- /dev/null +++ b/dis/siso_ref_010/enums/class9supply_category_repair_partsand_components.py @@ -0,0 +1,145 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 609, + * marshal size 8; + * Class9SupplyCategoryRepairPartsandComponents has 10 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Class9SupplyCategoryRepairPartsandComponents(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(1, "Other") + a_air = EnumValue(2, "A - Air") + b_ground_support_materiel = EnumValue(3, "B - Ground Support Materiel") + d_admin_vehicles = EnumValue(4, "D - Admin Vehicles") + g_electronics = EnumValue(5, "G - Electronics") + k_tactical_vehicles = EnumValue(6, "K - Tactical Vehicles") + l_missiles = EnumValue(7, "L - Missiles") + m_weapons = EnumValue(8, "M - Weapons") + n_special_weapons = EnumValue(9, "N - Special Weapons") + x_aircraft_engines = EnumValue(10, "X - Aircraft Engines") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/clothing_irsignature.py b/dis/siso_ref_010/enums/clothing_irsignature.py new file mode 100644 index 0000000..20dc8bf --- /dev/null +++ b/dis/siso_ref_010/enums/clothing_irsignature.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 802, + * marshal size 2; + * ClothingIRSignature has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ClothingIRSignature(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + standard_clothing = EnumValue(0, "Standard Clothing") + camouflage_not_just_paint_scheme = EnumValue(1, "Camouflage (not just Paint Scheme)") + thermal_blanket = EnumValue(2, "Thermal Blanket") + other = EnumValue(3, "Other") + default = standard_clothing + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/collision_type.py b/dis/siso_ref_010/enums/collision_type.py new file mode 100644 index 0000000..060525b --- /dev/null +++ b/dis/siso_ref_010/enums/collision_type.py @@ -0,0 +1,190 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 189, + * marshal size 8; + * CollisionType has 55 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CollisionType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + inelastic = EnumValue(0, "Inelastic") + elastic = EnumValue(1, "Elastic") + the_boom_nozzle_is_in_physical_contact_with_the_receptacle_and_the_booms_signal_system_is_operative = EnumValue(2, "The boom nozzle is in physical contact with the receptacle and the booms signal system is operative.") + the_boom_trainers_signal_system_has_sent_a_disconnect_signal_that_should_cause_the_receivers_refueling_receptacle_to_unlatch_unless_there_is_a_malfunction = EnumValue(3, "The boom trainers signal system has sent a disconnect signal that should cause the receivers refueling receptacle to unlatch (unless there is a malfunction).") + disconnect_without_a_signal_being_sent_disconnected_by_physical_means_brute_force_disconnect_controlled_tension_disconnect = EnumValue(4, "Disconnect without a signal being sent - disconnected by physical means (brute force disconnect, controlled tension disconnect).") + the_boom_nozzle_is_in_physical_contact_with_the_receptacle_and_the_booms_signal_system_is_inoperative = EnumValue(5, "The boom nozzle is in physical contact with the receptacle and the booms signal system is inoperative.") + boom_simulator_has_calculated_that_the_receivers_latches_have_been_damaged = EnumValue(6, "Boom simulator has calculated that the receivers latches have been damaged.") + ar_receptacle_door_1_damaged = EnumValue(7, "AR receptacle door #1 damaged.") + ar_receptacle_door_2_damaged = EnumValue(8, "AR receptacle door #2 damaged.") + pilots_cockpit_windshield_damaged = EnumValue(9, "Pilots Cockpit Windshield damaged") + copilots_cockpit_windshield_damaged = EnumValue(10, "Copilots Cockpit Windshield damaged") + pilots_left_side_window_damaged = EnumValue(11, "Pilots Left Side Window damaged") + copilots_right_side_window_damaged = EnumValue(12, "Copilots Right Side Window damaged") + pilots_eyebrow_window_damaged = EnumValue(13, "Pilots Eyebrow Window damaged") + copilots_eyebrow_window_damaged = EnumValue(14, "Copilots Eyebrow Window damaged") + mls_glide_slope_1_antenna_damaged = EnumValue(15, "MLS Glide Slope #1 Antenna damaged") + mls_glide_slope_2_antenna_damaged = EnumValue(16, "MLS Glide Slope #2 Antenna damaged") + ils_glide_1_slope_antenna_damaged = EnumValue(17, "ILS Glide #1 Slope Antenna damaged") + ils_glide_2_slope_antenna_damaged = EnumValue(18, "ILS Glide #2 Slope Antenna damaged") + ske_omni_antenna_damaged = EnumValue(19, "SKE OMNI Antenna damaged") + ske_directional_antenna_damaged = EnumValue(20, "SKE Directional Antenna damaged") + weather_radar_antenna_damaged = EnumValue(21, "Weather Radar Antenna damaged") + com_1_arc_210_antenna_damaged = EnumValue(22, "Com #1 ARC 210 Antenna damaged") + tacan_antenna_damaged = EnumValue(23, "TACAN Antenna damaged") + mls_antenna_damaged = EnumValue(24, "MLS Antenna damaged") + af_satcom_antenna_damaged = EnumValue(25, "AF SATCOM Antenna damaged") + aero_i_satcom_antenna_damaged = EnumValue(26, "AERO-I SATCOM Antenna damaged") + aero_h_satcom_antenna_damaged = EnumValue(28, "AERO-H SATCOM Antenna damaged") + uhf_satcom_antenna_damaged = EnumValue(29, "UHF SATCOM Antenna damaged") + hmsa_antenna_damaged = EnumValue(30, "HMSA Antenna damaged") + iff_antenna_damaged = EnumValue(31, "IFF Antenna damaged") + left_side_landing_taxi_light_damaged = EnumValue(32, "Left Side Landing/Taxi Light damaged") + right_side_landing_taxi_light_damaged = EnumValue(33, "Right Side Landing/Taxi Light damaged") + left_side_runway_turnoff_light_damaged = EnumValue(34, "Left Side Runway Turnoff Light damaged") + right_side_runway_turnoff_light_damaged = EnumValue(35, "Right Side Runway Turnoff Light damaged") + left_side_formation_light_damaged = EnumValue(36, "Left Side Formation Light damaged") + right_side_formation_light_damaged = EnumValue(37, "Right Side Formation Light damaged") + left_side_nacelle_scanning_light_damaged = EnumValue(38, "Left Side Nacelle Scanning Light damaged") + right_side_nacelle_scanning_light_damaged = EnumValue(39, "Right Side Nacelle Scanning Light damaged") + copilot_pitot_static_probe_1_damaged = EnumValue(40, "Copilot Pitot Static Probe #1 damaged") + copilot_pitot_static_probe_2_damaged = EnumValue(41, "Copilot Pitot Static Probe #2 damaged") + pilot_pitot_static_probe_1_damaged = EnumValue(42, "Pilot Pitot Static Probe #1 damaged") + pilot_pitot_static_probe_2_damaged = EnumValue(43, "Pilot Pitot Static Probe #2 damaged") + total_air_temperature_probe_1_damaged = EnumValue(44, "Total Air Temperature Probe #1 damaged") + total_air_temperature_probe_2_damaged = EnumValue(45, "Total Air Temperature Probe #2 damaged") + angle_of_attack_sensor_1_damaged = EnumValue(46, "Angle of Attack Sensor #1 damaged") + angle_of_attack_sensor_2_damaged = EnumValue(47, "Angle of Attack Sensor #2 damaged") + angle_of_attack_sensor_3_damaged = EnumValue(48, "Angle of Attack Sensor #3 damaged") + angle_of_attack_sensor_4_damaged = EnumValue(49, "Angle of Attack Sensor #4 damaged") + angle_of_attack_sensor_5_damaged = EnumValue(50, "Angle of Attack Sensor #5 damaged") + angle_of_attack_sensor_6_damaged = EnumValue(51, "Angle of Attack Sensor #6 damaged") + left_side_spoiler_damaged = EnumValue(52, "Left Side Spoiler damaged") + right_side_spoiler_damaged = EnumValue(53, "Right Side Spoiler damaged") + upper_tcas_antenna_kc_135_r_t_damaged = EnumValue(54, "Upper TCAS antenna (KC-135 R/T) damaged") + boom_nozzle_has_cleared_the_receivers_refueling_receptacle = EnumValue(55, "Boom nozzle has cleared the receiver's refueling receptacle") + default = inelastic + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/color.py b/dis/siso_ref_010/enums/color.py new file mode 100644 index 0000000..d0472eb --- /dev/null +++ b/dis/siso_ref_010/enums/color.py @@ -0,0 +1,275 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 463, marshal size 8; + * Color has 160 enumerations total. + * The color values 1 to 15 are defined in the HTML 3.0 specification; color values 20 to 159 are defined in the SVG 1.0 specification + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class Color(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_specified = EnumValue(0, "Not Specified") + white_vga = EnumValue(1, "White VGA") + red_vga = EnumValue(2, "Red VGA") + yellow_vga = EnumValue(3, "Yellow VGA") + lime_vga = EnumValue(4, "Lime VGA") + cyan_vga = EnumValue(5, "Cyan VGA") + blue_vga = EnumValue(6, "Blue VGA") + magenta_vga = EnumValue(7, "Magenta VGA") + grey_vga = EnumValue(8, "Grey VGA") + silver_vga = EnumValue(9, "Silver VGA") + maroon_vga = EnumValue(10, "Maroon VGA") + olive_vga = EnumValue(11, "Olive VGA") + green_vga = EnumValue(12, "Green VGA") + teal_vga = EnumValue(13, "Teal VGA") + navy_vga = EnumValue(14, "Navy VGA") + purple_vga = EnumValue(15, "Purple VGA") + reserved = EnumValue(16, "Reserved") + reserved_2 = EnumValue(17, "Reserved") + reserved_3 = EnumValue(18, "Reserved") + reserved_4 = EnumValue(19, "Reserved") + black = EnumValue(20, "Black") + navy = EnumValue(21, "Navy") + dark_blue = EnumValue(22, "Dark Blue") + medium_blue = EnumValue(23, "Medium Blue") + blue = EnumValue(24, "Blue") + dark_green = EnumValue(25, "Dark Green") + green = EnumValue(26, "Green") + teal = EnumValue(27, "Teal") + dark_cyan = EnumValue(28, "Dark Cyan") + deep_sky_blue = EnumValue(29, "Deep Sky Blue") + dark_turquoise = EnumValue(30, "Dark Turquoise") + medium_spring_green = EnumValue(31, "Medium Spring Green") + lime = EnumValue(32, "Lime") + spring_green = EnumValue(33, "Spring Green") + cyan = EnumValue(34, "Cyan") + midnight_blue = EnumValue(35, "Midnight Blue") + dodger_blue = EnumValue(36, "Dodger Blue") + light_sea_green = EnumValue(37, "Light Sea Green") + forest_green = EnumValue(38, "Forest Green") + sea_green = EnumValue(39, "Sea Green") + dark_slate_gray = EnumValue(40, "Dark Slate Gray") + lime_green = EnumValue(41, "Lime Green") + medium_sea_green = EnumValue(42, "Medium Sea Green") + turquoise = EnumValue(43, "Turquoise") + royal_blue = EnumValue(44, "Royal Blue") + steel_blue = EnumValue(45, "Steel Blue") + dark_slate_blue = EnumValue(46, "Dark Slate Blue") + medium_turquoise = EnumValue(47, "Medium Turquoise") + indigo = EnumValue(48, "Indigo") + dark_olive_green = EnumValue(49, "Dark Olive Green") + cadet_blue = EnumValue(50, "Cadet Blue") + cornflower_blue = EnumValue(51, "Cornflower Blue") + medium_aquamarine = EnumValue(52, "Medium Aquamarine") + dim_gray = EnumValue(53, "Dim Gray") + slate_blue = EnumValue(54, "Slate Blue") + olive_drab = EnumValue(55, "Olive Drab") + slate_gray = EnumValue(56, "Slate Gray") + light_slate_gray = EnumValue(57, "Light Slate Gray") + medium_slate_blue = EnumValue(58, "Medium Slate Blue") + lawn_green = EnumValue(59, "Lawn Green") + chartreuse = EnumValue(60, "Chartreuse") + aquamarine = EnumValue(61, "Aquamarine") + maroon = EnumValue(62, "Maroon") + purple = EnumValue(63, "Purple") + olive = EnumValue(64, "Olive") + gray = EnumValue(65, "Gray") + grey = EnumValue(66, "Grey") + sky_blue = EnumValue(67, "Sky Blue") + light_sky_blue = EnumValue(68, "Light Sky Blue") + blue_violet = EnumValue(69, "Blue Violet") + dark_red = EnumValue(70, "Dark Red") + dark_magenta = EnumValue(71, "Dark Magenta") + saddle_brown = EnumValue(72, "Saddle Brown") + dark_sea_green = EnumValue(73, "Dark Sea Green") + light_green = EnumValue(74, "Light Green") + medium_purple = EnumValue(75, "Medium Purple") + dark_violet = EnumValue(76, "Dark Violet") + pale_green = EnumValue(77, "Pale Green") + dark_orchid = EnumValue(78, "Dark Orchid") + yellow_green = EnumValue(79, "Yellow Green") + sienna = EnumValue(80, "Sienna") + brown = EnumValue(81, "Brown") + dark_gray = EnumValue(82, "Dark Gray") + light_blue = EnumValue(83, "Light Blue") + green_yellow = EnumValue(84, "Green Yellow") + pale_turquoise = EnumValue(85, "Pale Turquoise") + light_steel_blue = EnumValue(86, "Light Steel Blue") + powder_blue = EnumValue(87, "Powder Blue") + fire_brick = EnumValue(88, "Fire Brick") + dark_golden_rod = EnumValue(89, "Dark Golden Rod") + medium_orchid = EnumValue(90, "Medium Orchid") + rosy_brown = EnumValue(91, "Rosy Brown") + dark_khaki = EnumValue(92, "Dark Khaki") + silver = EnumValue(93, "Silver") + medium_violet_red = EnumValue(94, "Medium Violet Red") + indian_red = EnumValue(95, "Indian Red") + peru = EnumValue(96, "Peru") + chocolate = EnumValue(97, "Chocolate") + tan = EnumValue(98, "Tan") + light_gray = EnumValue(99, "Light Gray") + pale_violet_red = EnumValue(100, "Pale Violet Red") + thistle = EnumValue(101, "Thistle") + orchid = EnumValue(102, "Orchid") + golden_rod = EnumValue(103, "Golden Rod") + crimson = EnumValue(104, "Crimson") + gainsboro = EnumValue(105, "Gainsboro") + plum = EnumValue(106, "Plum") + burly_wood = EnumValue(107, "Burly Wood") + light_cyan = EnumValue(108, "Light Cyan") + lavender = EnumValue(109, "Lavender") + dark_salmon = EnumValue(110, "Dark Salmon") + violet = EnumValue(111, "Violet") + pale_golden_rod = EnumValue(112, "Pale Golden Rod") + light_coral = EnumValue(113, "Light Coral") + khaki = EnumValue(114, "Khaki") + alice_blue = EnumValue(115, "Alice Blue") + honey_dew = EnumValue(116, "Honey Dew") + azure = EnumValue(117, "Azure") + sandy_brown = EnumValue(118, "Sandy Brown") + wheat = EnumValue(119, "Wheat") + beige = EnumValue(120, "Beige") + white_smoke = EnumValue(121, "White Smoke") + mint_cream = EnumValue(122, "Mint Cream") + ghost_white = EnumValue(123, "Ghost White") + salmon = EnumValue(124, "Salmon") + antique_white = EnumValue(125, "Antique White") + linen = EnumValue(126, "Linen") + light_golden_rod_yellow = EnumValue(127, "Light Golden Rod Yellow") + old_lace = EnumValue(128, "Old Lace") + red = EnumValue(129, "Red") + fuchsia = EnumValue(130, "Fuchsia") + magenta = EnumValue(131, "Magenta") + deep_pink = EnumValue(132, "Deep Pink") + orange_red = EnumValue(133, "Orange Red") + tomato = EnumValue(134, "Tomato") + hot_pink = EnumValue(135, "Hot Pink") + coral = EnumValue(136, "Coral") + dark_orange = EnumValue(137, "Dark Orange") + light_salmon = EnumValue(138, "Light Salmon") + orange = EnumValue(139, "Orange") + light_pink = EnumValue(140, "Light Pink") + pink = EnumValue(141, "Pink") + gold = EnumValue(142, "Gold") + peach_puff = EnumValue(143, "Peach Puff") + navajo_white = EnumValue(144, "Navajo White") + moccasin = EnumValue(145, "Moccasin") + bisque = EnumValue(146, "Bisque") + misty_rose = EnumValue(147, "Misty Rose") + blanched_almond = EnumValue(148, "Blanched Almond") + papaya_whip = EnumValue(149, "Papaya Whip") + lavender_blush = EnumValue(150, "Lavender Blush") + sea_shell = EnumValue(151, "Sea Shell") + cornsilk = EnumValue(152, "Cornsilk") + lemon_chiffon = EnumValue(153, "Lemon Chiffon") + floral_white = EnumValue(154, "Floral White") + snow = EnumValue(155, "Snow") + yellow = EnumValue(156, "Yellow") + light_yellow = EnumValue(157, "Light Yellow") + ivory = EnumValue(158, "Ivory") + white = EnumValue(159, "White") + default = not_specified + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/component_visual_damage_status_smoke.py b/dis/siso_ref_010/enums/component_visual_damage_status_smoke.py new file mode 100644 index 0000000..bfb92bd --- /dev/null +++ b/dis/siso_ref_010/enums/component_visual_damage_status_smoke.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 375, + * marshal size 2; + * ComponentVisualDamageStatusSmoke has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ComponentVisualDamageStatusSmoke(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_smoke = EnumValue(0, "No Smoke") + light_smoke = EnumValue(1, "Light Smoke") + moderate_smoke = EnumValue(2, "Moderate Smoke") + heavy_smoke = EnumValue(3, "Heavy Smoke") + default = no_smoke + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/component_visual_damage_status_surface_damage.py b/dis/siso_ref_010/enums/component_visual_damage_status_surface_damage.py new file mode 100644 index 0000000..01abbbe --- /dev/null +++ b/dis/siso_ref_010/enums/component_visual_damage_status_surface_damage.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 376, + * marshal size 2; + * ComponentVisualDamageStatusSurfaceDamage has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ComponentVisualDamageStatusSurfaceDamage(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + normal_appearance = EnumValue(0, "Normal Appearance") + light_charring = EnumValue(1, "Light Charring") + heavy_charring = EnumValue(2, "Heavy Charring") + one_or_more_holes_burned_completely_through_surface = EnumValue(3, "One or More Holes Burned Completely through Surface") + default = normal_appearance + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/country.py b/dis/siso_ref_010/enums/country.py new file mode 100644 index 0000000..b75db98 --- /dev/null +++ b/dis/siso_ref_010/enums/country.py @@ -0,0 +1,414 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 29, + * marshal size 16; + * Country has 279 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Country(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + afghanistan_afg = EnumValue(1, "Afghanistan (AFG)") + albania_alb = EnumValue(2, "Albania (ALB)") + algeria_dza = EnumValue(3, "Algeria (DZA)") + american_samoa_asm = EnumValue(4, "American Samoa (ASM)") + andorra_and = EnumValue(5, "Andorra (AND)") + angola_ago = EnumValue(6, "Angola (AGO)") + anguilla_aia = EnumValue(7, "Anguilla (AIA)") + antarctica_ata = EnumValue(8, "Antarctica (ATA)") + antigua_and_barbuda_atg = EnumValue(9, "Antigua and Barbuda (ATG)") + argentina_arg = EnumValue(10, "Argentina (ARG)") + aruba_abw = EnumValue(11, "Aruba (ABW)") + ashmore_and_cartier_islands_australia = EnumValue(12, "Ashmore and Cartier Islands (Australia)") + australia_aus = EnumValue(13, "Australia (AUS)") + austria_aut = EnumValue(14, "Austria (AUT)") + bahamas_bhs = EnumValue(15, "Bahamas (BHS)") + bahrain_bhr = EnumValue(16, "Bahrain (BHR)") + baker_island_united_states = EnumValue(17, "Baker Island (United States)") + bangladesh_bgd = EnumValue(18, "Bangladesh (BGD)") + barbados_brb = EnumValue(19, "Barbados (BRB)") + bassas_da_india_france = EnumValue(20, "Bassas da India (France)") + belgium_bel = EnumValue(21, "Belgium (BEL)") + belize_blz = EnumValue(22, "Belize (BLZ)") + benin_ben = EnumValue(23, "Benin (BEN)") + bermuda_bmu = EnumValue(24, "Bermuda (BMU)") + bhutan_btn = EnumValue(25, "Bhutan (BTN)") + bolivia_plurinational_state_of_bol = EnumValue(26, "Bolivia (Plurinational State of) (BOL)") + botswana_bwa = EnumValue(27, "Botswana (BWA)") + bouvet_island_bvt = EnumValue(28, "Bouvet Island (BVT)") + brazil_bra = EnumValue(29, "Brazil (BRA)") + british_indian_ocean_territory_iot = EnumValue(30, "British Indian Ocean Territory (IOT)") + virgin_islands_british_vgb = EnumValue(31, "Virgin Islands (British) (VGB)") + brunei_darussalam_brn = EnumValue(32, "Brunei Darussalam (BRN)") + bulgaria_bgr = EnumValue(33, "Bulgaria (BGR)") + burkina_faso_bfa = EnumValue(34, "Burkina Faso (BFA)") + myanmar_mmr = EnumValue(35, "Myanmar (MMR)") + burundi_bdi = EnumValue(36, "Burundi (BDI)") + cambodia_khm = EnumValue(37, "Cambodia (KHM)") + cameroon_cmr = EnumValue(38, "Cameroon (CMR)") + canada_can = EnumValue(39, "Canada (CAN)") + cabo_verde_cpv = EnumValue(40, "Cabo Verde (CPV)") + cayman_islands_cym = EnumValue(41, "Cayman Islands (CYM)") + central_african_republic_caf = EnumValue(42, "Central African Republic (CAF)") + chad_tcd = EnumValue(43, "Chad (TCD)") + chile_chl = EnumValue(44, "Chile (CHL)") + china_peoples_republic_of_chn = EnumValue(45, "China, People's Republic of (CHN)") + christmas_island_cxr = EnumValue(46, "Christmas Island (CXR)") + cocos_keeling_islands_cck = EnumValue(47, "Cocos (Keeling) Islands (CCK)") + colombia_col = EnumValue(48, "Colombia (COL)") + comoros_com = EnumValue(49, "Comoros (COM)") + congo_cog = EnumValue(50, "Congo (COG)") + cook_islands_cok = EnumValue(51, "Cook Islands (COK)") + coral_sea_islands_australia = EnumValue(52, "Coral Sea Islands (Australia)") + costa_rica_cri = EnumValue(53, "Costa Rica (CRI)") + cuba_cub = EnumValue(54, "Cuba (CUB)") + cyprus_cyp = EnumValue(55, "Cyprus (CYP)") + czechoslovakia_csk = EnumValue(56, "Czechoslovakia (CSK)") + denmark_dnk = EnumValue(57, "Denmark (DNK)") + djibouti_dji = EnumValue(58, "Djibouti (DJI)") + dominica_dma = EnumValue(59, "Dominica (DMA)") + dominican_republic_dom = EnumValue(60, "Dominican Republic (DOM)") + ecuador_ecu = EnumValue(61, "Ecuador (ECU)") + egypt_egy = EnumValue(62, "Egypt (EGY)") + el_salvador_slv = EnumValue(63, "El Salvador (SLV)") + equatorial_guinea_gnq = EnumValue(64, "Equatorial Guinea (GNQ)") + ethiopia_eth = EnumValue(65, "Ethiopia (ETH)") + europa_island_france = EnumValue(66, "Europa Island (France)") + falkland_islands_malvinas_flk = EnumValue(67, "Falkland Islands (Malvinas) (FLK)") + faroe_islands_fro = EnumValue(68, "Faroe Islands (FRO)") + fiji_fji = EnumValue(69, "Fiji (FJI)") + finland_fin = EnumValue(70, "Finland (FIN)") + france_fra = EnumValue(71, "France (FRA)") + french_guiana_guf = EnumValue(72, "French Guiana (GUF)") + french_polynesia_pyf = EnumValue(73, "French Polynesia (PYF)") + french_southern_territories_atf = EnumValue(74, "French Southern Territories (ATF)") + gabon_gab = EnumValue(75, "Gabon (GAB)") + gambia_the_gmb = EnumValue(76, "Gambia, The (GMB)") + gaza_strip_israel = EnumValue(77, "Gaza Strip (Israel)") + germany_deu = EnumValue(78, "Germany (DEU)") + ghana_gha = EnumValue(79, "Ghana (GHA)") + gibraltar_gib = EnumValue(80, "Gibraltar (GIB)") + glorioso_islands_france = EnumValue(81, "Glorioso Islands (France)") + greece_grc = EnumValue(82, "Greece (GRC)") + greenland_grl = EnumValue(83, "Greenland (GRL)") + grenada_grd = EnumValue(84, "Grenada (GRD)") + guadeloupe_glp = EnumValue(85, "Guadeloupe (GLP)") + guam_gum = EnumValue(86, "Guam (GUM)") + guatemala_gtm = EnumValue(87, "Guatemala (GTM)") + guernsey_ggy = EnumValue(88, "Guernsey (GGY)") + guinea_gin = EnumValue(89, "Guinea (GIN)") + guinea_bissau_gnb = EnumValue(90, "Guinea-Bissau (GNB)") + guyana_guy = EnumValue(91, "Guyana (GUY)") + haiti_hti = EnumValue(92, "Haiti (HTI)") + heard_island_and_mcdonald_islands_hmd = EnumValue(93, "Heard Island and McDonald Islands (HMD)") + honduras_hnd = EnumValue(94, "Honduras (HND)") + hong_kong_hkg = EnumValue(95, "Hong Kong (HKG)") + howland_island_united_states = EnumValue(96, "Howland Island (United States)") + hungary_hun = EnumValue(97, "Hungary (HUN)") + iceland_isl = EnumValue(98, "Iceland (ISL)") + india_ind = EnumValue(99, "India (IND)") + indonesia_idn = EnumValue(100, "Indonesia (IDN)") + iran_islamic_republic_of_irn = EnumValue(101, "Iran (Islamic Republic of) (IRN)") + iraq_irq = EnumValue(102, "Iraq (IRQ)") + ireland_irl = EnumValue(104, "Ireland (IRL)") + israel_isr = EnumValue(105, "Israel (ISR)") + italy_ita = EnumValue(106, "Italy (ITA)") + cote_divoire_civ = EnumValue(107, "Cote d'Ivoire (CIV)") + jamaica_jam = EnumValue(108, "Jamaica (JAM)") + jan_mayen_norway = EnumValue(109, "Jan Mayen (Norway)") + japan_jpn = EnumValue(110, "Japan (JPN)") + jarvis_island_united_states = EnumValue(111, "Jarvis Island (United States)") + jersey_jey = EnumValue(112, "Jersey (JEY)") + johnston_atoll_united_states = EnumValue(113, "Johnston Atoll (United States)") + jordan_jor = EnumValue(114, "Jordan (JOR)") + juan_de_nova_island = EnumValue(115, "Juan de Nova Island") + kenya_ken = EnumValue(116, "Kenya (KEN)") + kingman_reef_united_states = EnumValue(117, "Kingman Reef (United States)") + kiribati_kir = EnumValue(118, "Kiribati (KIR)") + korea_democratic_peoples_republic_of_prk = EnumValue(119, "Korea (Democratic People's Republic of) (PRK)") + korea_republic_of_kor = EnumValue(120, "Korea (Republic of) (KOR)") + kuwait_kwt = EnumValue(121, "Kuwait (KWT)") + lao_peoples_democratic_republic_lao = EnumValue(122, "Lao People's Democratic Republic (LAO)") + lebanon_lbn = EnumValue(123, "Lebanon (LBN)") + lesotho_lso = EnumValue(124, "Lesotho (LSO)") + liberia_lbr = EnumValue(125, "Liberia (LBR)") + libya_lby = EnumValue(126, "Libya (LBY)") + liechtenstein_lie = EnumValue(127, "Liechtenstein (LIE)") + luxembourg_lux = EnumValue(128, "Luxembourg (LUX)") + madagascar_mdg = EnumValue(129, "Madagascar (MDG)") + macao_mac = EnumValue(130, "Macao (MAC)") + malawi_mwi = EnumValue(131, "Malawi (MWI)") + malaysia_mys = EnumValue(132, "Malaysia (MYS)") + maldives_mdv = EnumValue(133, "Maldives (MDV)") + mali_mli = EnumValue(134, "Mali (MLI)") + malta_mlt = EnumValue(135, "Malta (MLT)") + isle_of_man_imn = EnumValue(136, "Isle of Man (IMN)") + marshall_islands_mhl = EnumValue(137, "Marshall Islands (MHL)") + martinique_mtq = EnumValue(138, "Martinique (MTQ)") + mauritania_mrt = EnumValue(139, "Mauritania (MRT)") + mauritius_mus = EnumValue(140, "Mauritius (MUS)") + mayotte_myt = EnumValue(141, "Mayotte (MYT)") + mexico_mex = EnumValue(142, "Mexico (MEX)") + micronesia_federated_states_of_fsm = EnumValue(143, "Micronesia (Federated States of) (FSM)") + monaco_mco = EnumValue(144, "Monaco (MCO)") + mongolia_mng = EnumValue(145, "Mongolia (MNG)") + montserrat_msr = EnumValue(146, "Montserrat (MSR)") + morocco_mar = EnumValue(147, "Morocco (MAR)") + mozambique_moz = EnumValue(148, "Mozambique (MOZ)") + namibia_nam = EnumValue(149, "Namibia (NAM)") + nauru_nru = EnumValue(150, "Nauru (NRU)") + navassa_island_united_states = EnumValue(151, "Navassa Island (United States)") + nepal_npl = EnumValue(152, "Nepal (NPL)") + netherlands_nld = EnumValue(153, "Netherlands (NLD)") + netherlands_antilles_curacao_bonaire_saba_sint_maarten_sint_eustatius = EnumValue(154, "Netherlands Antilles (Curacao, Bonaire, Saba, Sint Maarten Sint Eustatius)") + new_caledonia_ncl = EnumValue(155, "New Caledonia (NCL)") + new_zealand_nzl = EnumValue(156, "New Zealand (NZL)") + nicaragua_nic = EnumValue(157, "Nicaragua (NIC)") + niger_ner = EnumValue(158, "Niger (NER)") + nigeria_nga = EnumValue(159, "Nigeria (NGA)") + niue_niu = EnumValue(160, "Niue (NIU)") + norfolk_island_nfk = EnumValue(161, "Norfolk Island (NFK)") + northern_mariana_islands_mnp = EnumValue(162, "Northern Mariana Islands (MNP)") + norway_nor = EnumValue(163, "Norway (NOR)") + oman_omn = EnumValue(164, "Oman (OMN)") + pakistan_pak = EnumValue(165, "Pakistan (PAK)") + palmyra_atoll_united_states = EnumValue(166, "Palmyra Atoll (United States)") + panama_pan = EnumValue(168, "Panama (PAN)") + papua_new_guinea_png = EnumValue(169, "Papua New Guinea (PNG)") + paracel_islands_international_occupied_by_china_also_claimed_by_taiwan_and_vietnam = EnumValue(170, "Paracel Islands (International - Occupied by China, also claimed by Taiwan and Vietnam)") + paraguay_pry = EnumValue(171, "Paraguay (PRY)") + peru_per = EnumValue(172, "Peru (PER)") + philippines_phl = EnumValue(173, "Philippines (PHL)") + pitcairn_pcn = EnumValue(174, "Pitcairn (PCN)") + poland_pol = EnumValue(175, "Poland (POL)") + portugal_prt = EnumValue(176, "Portugal (PRT)") + puerto_rico_pri = EnumValue(177, "Puerto Rico (PRI)") + qatar_qat = EnumValue(178, "Qatar (QAT)") + reunion_reu = EnumValue(179, "Reunion (REU)") + romania_rou = EnumValue(180, "Romania (ROU)") + rwanda_rwa = EnumValue(181, "Rwanda (RWA)") + saint_kitts_and_nevis_kna = EnumValue(182, "Saint Kitts and Nevis (KNA)") + saint_helena_ascension_and_tristan_da_cunha_shn = EnumValue(183, "Saint Helena, Ascension and Tristan da Cunha (SHN)") + saint_lucia_lca = EnumValue(184, "Saint Lucia (LCA)") + saint_pierre_and_miquelon_spm = EnumValue(185, "Saint Pierre and Miquelon (SPM)") + saint_vincent_and_the_grenadines_vct = EnumValue(186, "Saint Vincent and the Grenadines (VCT)") + san_marino_smr = EnumValue(187, "San Marino (SMR)") + sao_tome_and_principe_stp = EnumValue(188, "Sao Tome and Principe (STP)") + saudi_arabia_sau = EnumValue(189, "Saudi Arabia (SAU)") + senegal_sen = EnumValue(190, "Senegal (SEN)") + seychelles_syc = EnumValue(191, "Seychelles (SYC)") + sierra_leone_sle = EnumValue(192, "Sierra Leone (SLE)") + singapore_sgp = EnumValue(193, "Singapore (SGP)") + solomon_islands_slb = EnumValue(194, "Solomon Islands (SLB)") + somalia_som = EnumValue(195, "Somalia (SOM)") + south_georgia_and_the_south_sandwich_islands_sgs = EnumValue(196, "South Georgia and the South Sandwich Islands (SGS)") + south_africa_zaf = EnumValue(197, "South Africa (ZAF)") + spain_esp = EnumValue(198, "Spain (ESP)") + spratly_islands_international_parts_occupied_and_claimed_by_china_malaysia_philippines_taiwan_vietnam = EnumValue(199, "Spratly Islands (International - parts occupied and claimed by China,Malaysia, Philippines, Taiwan, Vietnam)") + sri_lanka_lka = EnumValue(200, "Sri Lanka (LKA)") + sudan_sdn = EnumValue(201, "Sudan (SDN)") + suriname_sur = EnumValue(202, "Suriname (SUR)") + svalbard_norway = EnumValue(203, "Svalbard (Norway)") + eswatini_swz = EnumValue(204, "Eswatini (SWZ)") + sweden_swe = EnumValue(205, "Sweden (SWE)") + switzerland_che = EnumValue(206, "Switzerland (CHE)") + syrian_arab_republic_syr = EnumValue(207, "Syrian Arab Republic (SYR)") + taiwan_province_of_china_twn = EnumValue(208, "Taiwan, Province of China (TWN)") + tanzania_united_republic_of_tza = EnumValue(209, "Tanzania, United Republic of (TZA)") + thailand_tha = EnumValue(210, "Thailand (THA)") + togo_tgo = EnumValue(211, "Togo (TGO)") + tokelau_tkl = EnumValue(212, "Tokelau (TKL)") + tonga_ton = EnumValue(213, "Tonga (TON)") + trinidad_and_tobago_tto = EnumValue(214, "Trinidad and Tobago (TTO)") + tromelin_island_france = EnumValue(215, "Tromelin Island (France)") + palau_plw = EnumValue(216, "Palau (PLW)") + tunisia_tun = EnumValue(217, "Tunisia (TUN)") + turkiye_republic_of_tur = EnumValue(218, "Turkiye (Republic of) (TUR)") + turks_and_caicos_islands_tca = EnumValue(219, "Turks and Caicos Islands (TCA)") + tuvalu_tuv = EnumValue(220, "Tuvalu (TUV)") + uganda_uga = EnumValue(221, "Uganda (UGA)") + russia_rus = EnumValue(222, "Russia (RUS)") + united_arab_emirates_are = EnumValue(223, "United Arab Emirates (ARE)") + united_kingdom_of_great_britain_and_northern_ireland_gbr = EnumValue(224, "United Kingdom of Great Britain and Northern Ireland (GBR)") + united_states_of_america_usa = EnumValue(225, "United States of America (USA)") + uruguay_ury = EnumValue(226, "Uruguay (URY)") + vanuatu_vut = EnumValue(227, "Vanuatu (VUT)") + holy_see_vat = EnumValue(228, "Holy See (VAT)") + venezuela_bolivarian_republic_of_ven = EnumValue(229, "Venezuela (Bolivarian Republic of) (VEN)") + viet_nam_vnm = EnumValue(230, "Viet Nam (VNM)") + virgin_islands_us_vir = EnumValue(231, "Virgin Islands (U.S.) (VIR)") + wake_island_united_states = EnumValue(232, "Wake Island (United States)") + wallis_and_futuna_wlf = EnumValue(233, "Wallis and Futuna (WLF)") + western_sahara_esh = EnumValue(234, "Western Sahara (ESH)") + west_bank_israel = EnumValue(235, "West Bank (Israel)") + samoa_wsm = EnumValue(236, "Samoa (WSM)") + yemen_yem = EnumValue(237, "Yemen (YEM)") + serbia_and_montenegro = EnumValue(240, "Serbia and Montenegro") + zaire = EnumValue(241, "Zaire") + zambia_zmb = EnumValue(242, "Zambia (ZMB)") + zimbabwe_zwe = EnumValue(243, "Zimbabwe (ZWE)") + armenia_arm = EnumValue(244, "Armenia (ARM)") + azerbaijan_aze = EnumValue(245, "Azerbaijan (AZE)") + belarus_blr = EnumValue(246, "Belarus (BLR)") + bosnia_and_herzegovina_bih = EnumValue(247, "Bosnia and Herzegovina (BIH)") + clipperton_island_france = EnumValue(248, "Clipperton Island (France)") + croatia_hrv = EnumValue(249, "Croatia (HRV)") + estonia_est = EnumValue(250, "Estonia (EST)") + georgia_geo = EnumValue(251, "Georgia (GEO)") + kazakhstan_kaz = EnumValue(252, "Kazakhstan (KAZ)") + kyrgyzstan_kgz = EnumValue(253, "Kyrgyzstan (KGZ)") + latvia_lva = EnumValue(254, "Latvia (LVA)") + lithuania_ltu = EnumValue(255, "Lithuania (LTU)") + north_macedonia_mkd = EnumValue(256, "North Macedonia (MKD)") + midway_islands_united_states = EnumValue(257, "Midway Islands (United States)") + moldova_republic_of_mda = EnumValue(258, "Moldova (Republic of) (MDA)") + montenegro_mne = EnumValue(259, "Montenegro (MNE)") + russia = EnumValue(260, "Russia") + serbia_and_montenegro_montenegro_to_separate = EnumValue(261, "Serbia and Montenegro (Montenegro to separate)") + slovenia_svn = EnumValue(262, "Slovenia (SVN)") + tajikistan_tjk = EnumValue(263, "Tajikistan (TJK)") + turkmenistan_tkm = EnumValue(264, "Turkmenistan (TKM)") + ukraine_ukr = EnumValue(265, "Ukraine (UKR)") + uzbekistan_uzb = EnumValue(266, "Uzbekistan (UZB)") + czech_republic_cze = EnumValue(267, "Czech Republic (CZE)") + slovakia_svk = EnumValue(268, "Slovakia (SVK)") + aaland_islands_ala = EnumValue(269, "Aaland Islands (ALA)") + bonaire_sint_eustatius_and_saba_bes = EnumValue(270, "Bonaire, Sint Eustatius and Saba (BES)") + congo_democratic_republic_of_the_cod = EnumValue(271, "Congo (Democratic Republic of the) (COD)") + curacao_cuw = EnumValue(272, "Curacao (CUW)") + eritrea_eri = EnumValue(273, "Eritrea (ERI)") + saint_barthelemy_blm = EnumValue(274, "Saint Barthelemy (BLM)") + saint_martin_french_part_maf = EnumValue(275, "Saint Martin (French Part) (MAF)") + serbia_srb = EnumValue(276, "Serbia (SRB)") + sint_maarten_dutch_part_sxm = EnumValue(277, "Sint Maarten (Dutch part) (SXM)") + south_sudan_ssd = EnumValue(278, "South Sudan (SSD)") + svalbard_and_jan_mayen_sjm = EnumValue(279, "Svalbard and Jan Mayen (SJM)") + timor_leste_tls = EnumValue(280, "Timor-Leste (TLS)") + united_states_minor_outlying_islands_umi = EnumValue(281, "United States Minor Outlying Islands (UMI)") + palestine_state_of_pse = EnumValue(282, "Palestine, State of (PSE)") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/cover_shroud_status.py b/dis/siso_ref_010/enums/cover_shroud_status.py new file mode 100644 index 0000000..aff4856 --- /dev/null +++ b/dis/siso_ref_010/enums/cover_shroud_status.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 426, + * marshal size 2; + * CoverShroudStatus has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CoverShroudStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + closed = EnumValue(0, "Closed") + opening = EnumValue(1, "Opening") + cover_shroud_blown_detached = EnumValue(2, "Cover/Shroud Blown/Detached") + open_attached = EnumValue(3, "Open/Attached") + default = closed + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/crypto_key_idcrypto_mode.py b/dis/siso_ref_010/enums/crypto_key_idcrypto_mode.py new file mode 100644 index 0000000..44f08e2 --- /dev/null +++ b/dis/siso_ref_010/enums/crypto_key_idcrypto_mode.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 449, + * marshal size 1; + * CryptoKeyIDCryptoMode has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CryptoKeyIDCryptoMode(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + baseband = EnumValue(0, "Baseband") + diphase = EnumValue(1, "Diphase") + default = baseband + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cultural_feature_appearance.py b/dis/siso_ref_010/enums/cultural_feature_appearance.py new file mode 100644 index 0000000..d03e609 --- /dev/null +++ b/dis/siso_ref_010/enums/cultural_feature_appearance.py @@ -0,0 +1,181 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .damage_area import DamageArea +from .appearance_damage import AppearanceDamage +from .appearance_entityor_object_state import AppearanceEntityorObjectState + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 39, marshal size 32, + * CulturalFeatureAppearance + */ + +""" + +class CulturalFeatureAppearanceBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=3) Describes the damaged area, use {@link DamageArea} values for this field + ("_damageArea", UByte, 3), + + # (bit position 3, length=2) Describes the damaged appearance, use {@link AppearanceDamage} values for this field + ("_damage", UByte, 2), + + # (bit position 5, boolean) Describes whether or not smoke is emanating from the entity, use {@link UInt8} values for this field + ("_isSmokeEmanating", UByte, 1), + + # (bit position 15, boolean) Describes whether the entity is burning and flames are visible, use {@link UInt8} values for this field + ("_isFlaming", UByte, 1), + + # (bit position 21, boolean) Describes whether the entity is frozen and should not be dead reckoned, use {@link UInt8} values for this field + ("_isFrozen", UByte, 1), + + # (bit position 22, boolean) Describes whether the internal heat is on or off, use {@link UInt8} values for this field + ("_internalHeatOn", UByte, 1), + + # (bit position 23, boolean) Describes whether the entity is active or deactivated, use {@link AppearanceEntityorObjectState} values for this field + ("_state", UByte, 1), + + # (bit position 28, boolean) Describes whether the exterior lights are on or off, use {@link UInt8} values for this field + ("_exteriorLightsOn", UByte, 1), + + # (bit position 29, boolean) Describes whether the interior lights are on or off, use {@link UInt8} values for this field + ("_interiorLightsOn", UByte, 1), + + # (bit position 31, boolean) Describes whether or not the entity is masked or cloaked, use {@link UInt8} values for this field + ("_maskedCloaked", UByte, 1) + ] + +class CulturalFeatureAppearance(ctypes.Union): + _fields_ = [ + ("capabilities", CulturalFeatureAppearanceBitField), + ("asbyte", UInt8) + ] + + def set_damageArea(self, value : DamageArea): + self.capabilities._damageArea = int(value) + def get_damageArea(self) -> DamageArea: + return DamageArea.get_enum(self._damageArea) + DamageArea = property(get_damageArea, set_damageArea) + + def set_damage(self, value : AppearanceDamage): + self.capabilities._damage = int(value) + def get_damage(self) -> AppearanceDamage: + return AppearanceDamage.get_enum(self._damage) + Damage = property(get_damage, set_damage) + + def set_isSmokeEmanating(self, value : UInt8): + self.capabilities._isSmokeEmanating = int(value) + def get_isSmokeEmanating(self) -> UInt8: + return self.capabilities._isSmokeEmanating + IsSmokeEmanating = property(get_isSmokeEmanating, set_isSmokeEmanating) + + def set_isFlaming(self, value : UInt8): + self.capabilities._isFlaming = int(value) + def get_isFlaming(self) -> UInt8: + return self.capabilities._isFlaming + IsFlaming = property(get_isFlaming, set_isFlaming) + + def set_isFrozen(self, value : UInt8): + self.capabilities._isFrozen = int(value) + def get_isFrozen(self) -> UInt8: + return self.capabilities._isFrozen + IsFrozen = property(get_isFrozen, set_isFrozen) + + def set_internalHeatOn(self, value : UInt8): + self.capabilities._internalHeatOn = int(value) + def get_internalHeatOn(self) -> UInt8: + return self.capabilities._internalHeatOn + InternalHeatOn = property(get_internalHeatOn, set_internalHeatOn) + + def set_state(self, value : AppearanceEntityorObjectState): + self.capabilities._state = int(value) + def get_state(self) -> AppearanceEntityorObjectState: + return AppearanceEntityorObjectState.get_enum(self._state) + State = property(get_state, set_state) + + def set_exteriorLightsOn(self, value : UInt8): + self.capabilities._exteriorLightsOn = int(value) + def get_exteriorLightsOn(self) -> UInt8: + return self.capabilities._exteriorLightsOn + ExteriorLightsOn = property(get_exteriorLightsOn, set_exteriorLightsOn) + + def set_interiorLightsOn(self, value : UInt8): + self.capabilities._interiorLightsOn = int(value) + def get_interiorLightsOn(self) -> UInt8: + return self.capabilities._interiorLightsOn + InteriorLightsOn = property(get_interiorLightsOn, set_interiorLightsOn) + + def set_maskedCloaked(self, value : UInt8): + self.capabilities._maskedCloaked = int(value) + def get_maskedCloaked(self) -> UInt8: + return self.capabilities._maskedCloaked + MaskedCloaked = property(get_maskedCloaked, set_maskedCloaked) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "DamageArea : " + self.DamageArea.get_description + "\n" + outputStream += "Damage : " + self.Damage.get_description + "\n" + outputStream += "IsSmokeEmanating : " + str(self.IsSmokeEmanating) + "\n" + outputStream += "IsFlaming : " + str(self.IsFlaming) + "\n" + outputStream += "IsFrozen : " + str(self.IsFrozen) + "\n" + outputStream += "InternalHeatOn : " + str(self.InternalHeatOn) + "\n" + outputStream += "State : " + self.State.get_description + "\n" + outputStream += "ExteriorLightsOn : " + str(self.ExteriorLightsOn) + "\n" + outputStream += "InteriorLightsOn : " + str(self.InteriorLightsOn) + "\n" + outputStream += "MaskedCloaked : " + str(self.MaskedCloaked) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/cultural_feature_capabilities.py b/dis/siso_ref_010/enums/cultural_feature_capabilities.py new file mode 100644 index 0000000..31179e3 --- /dev/null +++ b/dis/siso_ref_010/enums/cultural_feature_capabilities.py @@ -0,0 +1,108 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 458, marshal size 32, + * CulturalFeatureCapabilities + */ + +""" + +class CulturalFeatureCapabilitiesBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=5) This entry is reserved for backward compatibility and may not be reused, use {@link UInt8} values for this field + ("_reserved", UByte, 5), + + # (bit position 6, boolean) The Entity is able to be carried as a sling load payload. The extended appearance record (if available) will identify if it is currently sling loaded and entity association and/or entity offset records (if available) will provide additional sling load details (such as carrier)., use {@link UInt8} values for this field + ("_slingLoadable", UByte, 1), + + # (bit position 7, boolean) The Entity is an IED or contains an IED. The extended appearance record (if available) will identify how well hidden the IED is on the Entity. An Attached Part (if applicable, for instance a jury-rigged munition does not apply here) will identify the IED explicitly., use {@link UInt8} values for this field + ("_iEDPresenceIndicator", UByte, 1) + ] + +class CulturalFeatureCapabilities(ctypes.Union): + _fields_ = [ + ("capabilities", CulturalFeatureCapabilitiesBitField), + ("asbyte", UInt8) + ] + + def set_reserved(self, value : UInt8): + self.capabilities._reserved = int(value) + def get_reserved(self) -> UInt8: + return self.capabilities._reserved + Reserved = property(get_reserved, set_reserved) + + def set_slingLoadable(self, value : UInt8): + self.capabilities._slingLoadable = int(value) + def get_slingLoadable(self) -> UInt8: + return self.capabilities._slingLoadable + SlingLoadable = property(get_slingLoadable, set_slingLoadable) + + def set_iEDPresenceIndicator(self, value : UInt8): + self.capabilities._iEDPresenceIndicator = int(value) + def get_iEDPresenceIndicator(self) -> UInt8: + return self.capabilities._iEDPresenceIndicator + IEDPresenceIndicator = property(get_iEDPresenceIndicator, set_iEDPresenceIndicator) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Reserved : " + str(self.Reserved) + "\n" + outputStream += "SlingLoadable : " + str(self.SlingLoadable) + "\n" + outputStream += "IEDPresenceIndicator : " + str(self.IEDPresenceIndicator) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/cyber_acknowledge_response_type.py b/dis/siso_ref_010/enums/cyber_acknowledge_response_type.py new file mode 100644 index 0000000..b4cca03 --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_acknowledge_response_type.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 677, + * marshal size 8; + * CyberAcknowledgeResponseType has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberAcknowledgeResponseType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + able_to_comply = EnumValue(1, "Able To Comply") + unable_to_comply = EnumValue(2, "Unable To Comply") + default = able_to_comply + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_admin_type.py b/dis/siso_ref_010/enums/cyber_admin_type.py new file mode 100644 index 0000000..5da999f --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_admin_type.py @@ -0,0 +1,145 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 678, + * marshal size 8; + * CyberAdminType has 10 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberAdminType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + administration = EnumValue(1, "Administration") + assessment = EnumValue(2, "Assessment") + collection = EnumValue(3, "Collection") + configuration = EnumValue(4, "Configuration") + evaluation = EnumValue(5, "Evaluation") + forensics = EnumValue(6, "Forensics") + investigation = EnumValue(7, "Investigation") + operations = EnumValue(8, "Operations") + provisioning = EnumValue(9, "Provisioning") + testing = EnumValue(10, "Testing") + default = administration + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_cyber_event_phase_type.py b/dis/siso_ref_010/enums/cyber_cyber_event_phase_type.py new file mode 100644 index 0000000..e7dd2ef --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_cyber_event_phase_type.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 679, + * marshal size 8; + * CyberCyberEventPhaseType has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberCyberEventPhaseType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + start = EnumValue(1, "Start") + suspend = EnumValue(2, "Suspend") + continue = EnumValue(3, "Continue") + continue_with_changes = EnumValue(4, "Continue With Changes") + end = EnumValue(5, "End") + cancel = EnumValue(6, "Cancel") + default = start + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_data_link_protocol_type.py b/dis/siso_ref_010/enums/cyber_data_link_protocol_type.py new file mode 100644 index 0000000..bb69522 --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_data_link_protocol_type.py @@ -0,0 +1,145 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 680, + * marshal size 8; + * CyberDataLinkProtocolType has 10 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberDataLinkProtocolType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + ethernet = EnumValue(1, "Ethernet") + wifi = EnumValue(2, "Wifi") + atm = EnumValue(3, "ATM") + localtalk = EnumValue(4, "LocalTalk") + ppp = EnumValue(5, "PPP") + token_ring = EnumValue(6, "Token Ring") + vlan = EnumValue(7, "VLAN") + bluetooth = EnumValue(8, "Bluetooth") + _1553bus = EnumValue(9, "1553Bus") + llc = EnumValue(10, "LLC") + default = ethernet + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_data_status_type.py b/dis/siso_ref_010/enums/cyber_data_status_type.py new file mode 100644 index 0000000..15c58d2 --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_data_status_type.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 681, + * marshal size 8; + * CyberDataStatusType has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberDataStatusType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + intact = EnumValue(1, "Intact") + compromised = EnumValue(2, "Compromised") + corrupted = EnumValue(3, "Corrupted") + manipulated = EnumValue(4, "Manipulated") + non_decryptable = EnumValue(5, "Non Decryptable") + erased = EnumValue(6, "Erased") + default = intact + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_data_type.py b/dis/siso_ref_010/enums/cyber_data_type.py new file mode 100644 index 0000000..753ee28 --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_data_type.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 682, + * marshal size 8; + * CyberDataType has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberDataType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + file = EnumValue(1, "File") + code = EnumValue(2, "Code") + credentials = EnumValue(3, "Credentials") + communications = EnumValue(4, "Communications") + system_configuration = EnumValue(5, "System Configuration") + default = file + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_device_type.py b/dis/siso_ref_010/enums/cyber_device_type.py new file mode 100644 index 0000000..2000f6e --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_device_type.py @@ -0,0 +1,149 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 683, + * marshal size 8; + * CyberDeviceType has 14 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberDeviceType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + generic = EnumValue(1, "Generic") + networking = EnumValue(2, "Networking") + computer_node = EnumValue(3, "Computer Node") + portable_computer = EnumValue(4, "Portable Computer") + controller = EnumValue(5, "Controller") + storage = EnumValue(6, "Storage") + sensor = EnumValue(7, "Sensor") + printer = EnumValue(8, "Printer") + scanner = EnumValue(9, "Scanner") + communications = EnumValue(10, "Communications") + hmi = EnumValue(11, "HMI") + monitoring = EnumValue(12, "Monitoring") + iot = EnumValue(13, "IoT") + security = EnumValue(14, "Security") + default = generic + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_encryption_type.py b/dis/siso_ref_010/enums/cyber_encryption_type.py new file mode 100644 index 0000000..07d8d84 --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_encryption_type.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 684, + * marshal size 8; + * CyberEncryptionType has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberEncryptionType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_encrypted = EnumValue(1, "Not Encrypted") + des = EnumValue(2, "DES") + triple_des = EnumValue(3, "Triple DES") + rsa = EnumValue(4, "RSA") + aes = EnumValue(5, "AES") + twofish = EnumValue(6, "Twofish") + default = not_encrypted + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_hardware_damage_type.py b/dis/siso_ref_010/enums/cyber_hardware_damage_type.py new file mode 100644 index 0000000..3317b48 --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_hardware_damage_type.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 685, + * marshal size 8; + * CyberHardwareDamageType has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberHardwareDamageType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + boot_loop = EnumValue(1, "Boot Loop") + physical_destruction = EnumValue(2, "Physical Destruction") + hard_drive_erased = EnumValue(3, "Hard Drive Erased") + default = boot_loop + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_hardware_degrade_type.py b/dis/siso_ref_010/enums/cyber_hardware_degrade_type.py new file mode 100644 index 0000000..c1498c2 --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_hardware_degrade_type.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 686, + * marshal size 8; + * CyberHardwareDegradeType has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberHardwareDegradeType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + keyboard = EnumValue(1, "Keyboard") + mouse = EnumValue(2, "Mouse") + display = EnumValue(3, "Display") + sound = EnumValue(4, "Sound") + kernel_panic = EnumValue(5, "Kernel Panic") + random_text = EnumValue(6, "Random Text") + reboot = EnumValue(7, "Reboot") + default = keyboard + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_load_rate_type.py b/dis/siso_ref_010/enums/cyber_load_rate_type.py new file mode 100644 index 0000000..0c42ae1 --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_load_rate_type.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 687, + * marshal size 8; + * CyberLoadRateType has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberLoadRateType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + upload = EnumValue(1, "Upload") + download = EnumValue(2, "Download") + default = upload + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_manipulation_type.py b/dis/siso_ref_010/enums/cyber_manipulation_type.py new file mode 100644 index 0000000..1e05850 --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_manipulation_type.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 688, + * marshal size 8; + * CyberManipulationType has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberManipulationType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + packet = EnumValue(1, "Packet") + file = EnumValue(2, "File") + database = EnumValue(3, "Database") + default = packet + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_message_type.py b/dis/siso_ref_010/enums/cyber_message_type.py new file mode 100644 index 0000000..aa77fed --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_message_type.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 689, + * marshal size 8; + * CyberMessageType has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberMessageType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + email = EnumValue(1, "Email") + chat = EnumValue(2, "Chat") + text = EnumValue(3, "Text") + social_media = EnumValue(4, "Social Media") + default = email + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_network_protocol_type.py b/dis/siso_ref_010/enums/cyber_network_protocol_type.py new file mode 100644 index 0000000..4fe0015 --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_network_protocol_type.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 690, + * marshal size 8; + * CyberNetworkProtocolType has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberNetworkProtocolType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + internet_protocol = EnumValue(1, "Internet Protocol") + nat = EnumValue(2, "NAT") + icmp = EnumValue(3, "ICMP") + arp = EnumValue(4, "ARP") + rip = EnumValue(5, "RIP") + ospf = EnumValue(6, "OSPF") + ipsec = EnumValue(7, "IPsec") + default = internet_protocol + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_operating_system_type.py b/dis/siso_ref_010/enums/cyber_operating_system_type.py new file mode 100644 index 0000000..7510980 --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_operating_system_type.py @@ -0,0 +1,145 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 691, + * marshal size 8; + * CyberOperatingSystemType has 10 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberOperatingSystemType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + microsoft_dos = EnumValue(1, "Microsoft DOS") + microsoft_windows = EnumValue(2, "Microsoft Windows") + apple_mac_os = EnumValue(3, "Apple Mac OS") + dec_vms = EnumValue(4, "DEC VMS") + ibm_os_2 = EnumValue(5, "IBM OS_2") + android = EnumValue(6, "Android") + apple_ios = EnumValue(7, "Apple iOS") + cisco_ios = EnumValue(8, "Cisco IOS") + firmware = EnumValue(9, "Firmware") + unix_linux = EnumValue(10, "UNIX - Linux") + default = microsoft_dos + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_packet_manipulation_type.py b/dis/siso_ref_010/enums/cyber_packet_manipulation_type.py new file mode 100644 index 0000000..e5adb06 --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_packet_manipulation_type.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 692, + * marshal size 8; + * CyberPacketManipulationType has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberPacketManipulationType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + duplication = EnumValue(1, "Duplication") + corruption = EnumValue(2, "Corruption") + reordering = EnumValue(3, "Reordering") + dropped = EnumValue(4, "Dropped") + default = duplication + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_physical_layer_type.py b/dis/siso_ref_010/enums/cyber_physical_layer_type.py new file mode 100644 index 0000000..2d5dbe7 --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_physical_layer_type.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 693, + * marshal size 8; + * CyberPhysicalLayerType has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberPhysicalLayerType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + wired = EnumValue(1, "Wired") + wireless = EnumValue(2, "Wireless") + default = wired + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_recon_type.py b/dis/siso_ref_010/enums/cyber_recon_type.py new file mode 100644 index 0000000..d9c3625 --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_recon_type.py @@ -0,0 +1,210 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 694, + * marshal size 8; + * CyberReconType has 75 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberReconType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + account_discovery = EnumValue(1, "Account Discovery") + ad_malware = EnumValue(2, "Ad Malware") + antivirus_trojan = EnumValue(3, "Antivirus Trojan") + application_window_discovery = EnumValue(4, "Application Window Discovery") + arp_scan = EnumValue(5, "ARP Scan") + banner_grabbing = EnumValue(6, "Banner Grabbing") + bounce_scan = EnumValue(7, "Bounce Scan") + browser_bookmark_discovery = EnumValue(8, "Browser Bookmark Discovery") + cloud_infrastructure_discovery = EnumValue(9, "Cloud Infrastructure Discovery") + cloud_service_dashboard = EnumValue(10, "Cloud Service Dashboard") + cloud_service_discovery = EnumValue(11, "Cloud Service Discovery") + compliance = EnumValue(12, "Compliance") + csrf = EnumValue(13, "CSRF") + database_injection = EnumValue(14, "Database Injection") + database_structure = EnumValue(15, "Database Structure") + db_manufacture_version = EnumValue(16, "DB Manufacture Version") + device = EnumValue(17, "Device") + dns = EnumValue(18, "DNS") + domain = EnumValue(19, "Domain") + domain_trust_discovery = EnumValue(20, "Domain Trust Discovery") + file_and_directory_discovery = EnumValue(21, "File And Directory Discovery") + fin_scan = EnumValue(22, "FIN Scan") + ftp = EnumValue(23, "FTP") + http = EnumValue(24, "HTTP") + idle_scan = EnumValue(25, "Idle Scan") + igmp = EnumValue(26, "IGMP") + input_validation = EnumValue(27, "Input Validation") + ip = EnumValue(28, "IP") + ldap_scan = EnumValue(29, "LDAP Scan") + net_bios_scan = EnumValue(30, "Net Bios Scan") + network_map = EnumValue(31, "Network Map") + network_service_scanning = EnumValue(32, "Network Service Scanning") + network_share_discovery = EnumValue(33, "Network Share Discovery") + network_sniffing = EnumValue(34, "Network Sniffing") + ntp = EnumValue(35, "NTP") + null_scan = EnumValue(36, "NULL Scan") + os_scan = EnumValue(37, "OS Scan") + password_policy_discovery = EnumValue(38, "Password Policy Discovery") + patch_history = EnumValue(39, "Patch History") + peripheral_device_discovery = EnumValue(40, "Peripheral Device Discovery") + permission_groups_discovery = EnumValue(41, "Permission Groups Discovery") + ping = EnumValue(42, "Ping") + ping_scan = EnumValue(43, "Ping Scan") + port_scan = EnumValue(44, "Port Scan") + port_sweep = EnumValue(45, "Port Sweep") + ppp = EnumValue(46, "PPP") + process_discovery = EnumValue(47, "Process Discovery") + query_registry = EnumValue(48, "Query Registry") + rarp = EnumValue(49, "RARP") + remote_system_discovery = EnumValue(50, "Remote System Discovery") + rootkit = EnumValue(51, "Rootkit") + rpc_scan = EnumValue(52, "RPC Scan") + service = EnumValue(53, "Service") + slip = EnumValue(54, "SLIP") + smtp = EnumValue(55, "SMTP") + snmp_sweep = EnumValue(56, "SNMP Sweep") + software_discover = EnumValue(57, "Software Discover") + syn_scan = EnumValue(58, "SYN Scan") + system_information_discovery = EnumValue(59, "System Information Discovery") + system_network_configuration_discovery = EnumValue(60, "System Network Configuration Discovery") + system_network_connections_discovery = EnumValue(61, "System Network Connections Discovery") + system_owner_user_discovery = EnumValue(62, "System Owner User Discovery") + system_service_discovery = EnumValue(63, "System Service Discovery") + system_time_discovery = EnumValue(64, "System Time Discovery") + tcp_connect = EnumValue(65, "TCP Connect") + trace_route = EnumValue(66, "Trace Route") + unix_linux = EnumValue(67, "UNIX - Linux") + virtualization_sandbox_evasion = EnumValue(68, "Virtualization Sandbox Evasion") + vulnerability = EnumValue(69, "Vulnerability") + web_crawler = EnumValue(70, "Web Crawler") + windows = EnumValue(71, "Windows") + wireless_active = EnumValue(72, "Wireless Active") + wireless_passive = EnumValue(73, "Wireless Passive") + xmas_scan = EnumValue(74, "XMAS Scan") + xss = EnumValue(75, "XSS") + default = account_discovery + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_relationship_type.py b/dis/siso_ref_010/enums/cyber_relationship_type.py new file mode 100644 index 0000000..0b84245 --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_relationship_type.py @@ -0,0 +1,145 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 695, + * marshal size 8; + * CyberRelationshipType has 10 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberRelationshipType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + administers = EnumValue(1, "Administers") + administered_by = EnumValue(2, "Administered By") + component_of = EnumValue(3, "Component Of") + has_component = EnumValue(4, "Has Component") + contained_in = EnumValue(5, "Contained In") + contains = EnumValue(6, "Contains") + provided_by = EnumValue(7, "Provided By") + provides = EnumValue(8, "Provides") + resides_on = EnumValue(9, "Resides On") + has_resident = EnumValue(10, "Has Resident") + default = administers + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_sensitivity_type.py b/dis/siso_ref_010/enums/cyber_sensitivity_type.py new file mode 100644 index 0000000..b0dbb62 --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_sensitivity_type.py @@ -0,0 +1,153 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 696, + * marshal size 8; + * CyberSensitivityType has 18 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberSensitivityType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + unclassified = EnumValue(1, "Unclassified") + confidential = EnumValue(2, "Confidential") + fouo = EnumValue(3, "FOUO") + secret = EnumValue(4, "Secret") + secret_noforn = EnumValue(5, "Secret NoForn") + ts = EnumValue(6, "TS") + ts_sci = EnumValue(7, "TS_SCI") + nato_restricted = EnumValue(8, "NATO Restricted") + nato_confidential = EnumValue(9, "NATO Confidential") + nato_secret = EnumValue(10, "NATO Secret") + cosmic_top_secret = EnumValue(11, "Cosmic Top Secret") + fvey_proprietary = EnumValue(12, "FVEY Proprietary") + proprietary = EnumValue(13, "Proprietary") + pii = EnumValue(14, "PII") + hipaa = EnumValue(15, "HIPAA") + gdpr = EnumValue(16, "GDPR") + public = EnumValue(17, "Public") + cui = EnumValue(18, "CUI") + default = unclassified + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_service_type.py b/dis/siso_ref_010/enums/cyber_service_type.py new file mode 100644 index 0000000..85440f6 --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_service_type.py @@ -0,0 +1,146 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 697, + * marshal size 8; + * CyberServiceType has 11 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberServiceType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + dns = EnumValue(1, "DNS") + email = EnumValue(2, "Email") + web = EnumValue(3, "Web") + database = EnumValue(4, "Database") + file = EnumValue(5, "File") + chat = EnumValue(6, "Chat") + forum = EnumValue(7, "Forum") + social_media = EnumValue(8, "Social Media") + containerization = EnumValue(9, "Containerization") + virtualization = EnumValue(10, "Virtualization") + network_time = EnumValue(11, "Network Time") + default = dns + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/cyber_system_type.py b/dis/siso_ref_010/enums/cyber_system_type.py new file mode 100644 index 0000000..63bf655 --- /dev/null +++ b/dis/siso_ref_010/enums/cyber_system_type.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 698, + * marshal size 8; + * CyberSystemType has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class CyberSystemType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + generic = EnumValue(1, "Generic") + scada = EnumValue(2, "SCADA") + c2 = EnumValue(3, "C2") + ics = EnumValue(4, "ICS") + default = generic + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/damage_area.py b/dis/siso_ref_010/enums/damage_area.py new file mode 100644 index 0000000..8b6499a --- /dev/null +++ b/dis/siso_ref_010/enums/damage_area.py @@ -0,0 +1,143 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 889, + * marshal size 3; + * DamageArea has 8 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DamageArea(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + damage_area_1_default_is_side_1_=_front_side_or_not_applicable_if_damage_areas_are_not_defined = EnumValue(0, "Damage Area 1 (default is Side 1 = Front Side) or Not Applicable if Damage Areas are not defined.") + damage_area_2_default_is_side_2_=_right_side = EnumValue(1, "Damage Area 2 (default is Side 2 = Right Side)") + damage_area_3_default_is_side_3_=_back_side = EnumValue(2, "Damage Area 3 (default is Side 3 = Back Side)") + damage_area_4_default_is_side_4_=_left_side = EnumValue(3, "Damage Area 4 (default is Side 4 = Left Side)") + damage_area_5_default_is_corner_1_=_front_right_corner = EnumValue(4, "Damage Area 5 (default is Corner 1 = Front Right Corner)") + damage_area_6_default_is_corner_2_=_back_right_corner = EnumValue(5, "Damage Area 6 (default is Corner 2 = Back Right Corner)") + damage_area_7_default_is_corner_3_=_back_left_corner = EnumValue(6, "Damage Area 7 (default is Corner 3 = Back Left Corner)") + damage_area_8_default_is_corner_4_=_front_left_corner = EnumValue(7, "Damage Area 8 (default is Corner 4 = Front Left Corner)") + default = damage_area_1_default_is_side_1_=_front_side_or_not_applicable_if_damage_areas_are_not_defined + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/data_category.py b/dis/siso_ref_010/enums/data_category.py new file mode 100644 index 0000000..b46160b --- /dev/null +++ b/dis/siso_ref_010/enums/data_category.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 369, + * marshal size 8; + * DataCategory has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DataCategory(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + functional_data = EnumValue(1, "Functional Data") + transponder_interrogator_data_link_messages = EnumValue(2, "Transponder/Interrogator Data Link Messages") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/dead_reckoning_algorithm.py b/dis/siso_ref_010/enums/dead_reckoning_algorithm.py new file mode 100644 index 0000000..7850ead --- /dev/null +++ b/dis/siso_ref_010/enums/dead_reckoning_algorithm.py @@ -0,0 +1,145 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 44, + * marshal size 8; + * DeadReckoningAlgorithm has 10 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DeadReckoningAlgorithm(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + static_non_moving_entity = EnumValue(1, "Static - Non-moving Entity") + drm_fpw_constant_velocity_low_acceleration_linear_motion_entity = EnumValue(2, "DRM (FPW) - Constant Velocity / Low Acceleration Linear Motion Entity") + drm_rpw_constant_velocity_low_acceleration_linear_motion_entity_with_extrapolation_of_orientation = EnumValue(3, "DRM (RPW) - Constant Velocity / Low Acceleration Linear Motion Entity with Extrapolation of Orientation") + drm_rvw_high_speed_or_maneuvering_entity_with_extrapolation_of_orientation = EnumValue(4, "DRM (RVW) - High Speed or Maneuvering Entity with Extrapolation of Orientation") + drm_fvw_high_speed_or_maneuvering_entity = EnumValue(5, "DRM (FVW) - High Speed or Maneuvering Entity") + drm_fpb_similar_to_fpw_except_in_body_coordinates = EnumValue(6, "DRM (FPB) - Similar to FPW except in Body Coordinates") + drm_rpb_similar_to_rpw_except_in_body_coordinates = EnumValue(7, "DRM (RPB) - Similar to RPW except in Body Coordinates") + drm_rvb_similar_to_rvw_except_in_body_coordinates = EnumValue(8, "DRM (RVB) - Similar to RVW except in Body Coordinates") + drm_fvb_similar_to_fvw_except_in_body_coordinates = EnumValue(9, "DRM (FVB) - Similar to FVW except in Body Coordinates") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/dedamage_description_component_damage_status.py b/dis/siso_ref_010/enums/dedamage_description_component_damage_status.py new file mode 100644 index 0000000..8e666a1 --- /dev/null +++ b/dis/siso_ref_010/enums/dedamage_description_component_damage_status.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 315, + * marshal size 8; + * DEDamageDescriptionComponentDamageStatus has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DEDamageDescriptionComponentDamageStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_damage = EnumValue(0, "No Damage") + minor_damage = EnumValue(1, "Minor Damage") + medium_damage = EnumValue(2, "Medium Damage") + major_damage = EnumValue(3, "Major Damage") + destroyed = EnumValue(4, "Destroyed") + default = no_damage + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/dedamage_description_component_visual_damage_status.py b/dis/siso_ref_010/enums/dedamage_description_component_visual_damage_status.py new file mode 100644 index 0000000..2b4daba --- /dev/null +++ b/dis/siso_ref_010/enums/dedamage_description_component_visual_damage_status.py @@ -0,0 +1,110 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .component_visual_damage_status_smoke import ComponentVisualDamageStatusSmoke +from .component_visual_damage_status_surface_damage import ComponentVisualDamageStatusSurfaceDamage + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 317, marshal size 8, + * DEDamageDescriptionComponentVisualDamageStatus + */ + +""" + +class DEDamageDescriptionComponentVisualDamageStatusBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes presence of fire at the damage site, use {@link UInt8} values for this field + ("_isFirePresent", UByte, 1), + + # (bit position 1, length=2) Describes presence of smoke emanating from the damage site, use {@link ComponentVisualDamageStatusSmoke} values for this field + ("_smoke", UByte, 2), + + # (bit position 3, length=2) Describes general surface appearance at the damage site, use {@link ComponentVisualDamageStatusSurfaceDamage} values for this field + ("_surfaceDamage", UByte, 2) + ] + +class DEDamageDescriptionComponentVisualDamageStatus(ctypes.Union): + _fields_ = [ + ("capabilities", DEDamageDescriptionComponentVisualDamageStatusBitField), + ("asbyte", UInt8) + ] + + def set_isFirePresent(self, value : UInt8): + self.capabilities._isFirePresent = int(value) + def get_isFirePresent(self) -> UInt8: + return self.capabilities._isFirePresent + IsFirePresent = property(get_isFirePresent, set_isFirePresent) + + def set_smoke(self, value : ComponentVisualDamageStatusSmoke): + self.capabilities._smoke = int(value) + def get_smoke(self) -> ComponentVisualDamageStatusSmoke: + return ComponentVisualDamageStatusSmoke.get_enum(self._smoke) + Smoke = property(get_smoke, set_smoke) + + def set_surfaceDamage(self, value : ComponentVisualDamageStatusSurfaceDamage): + self.capabilities._surfaceDamage = int(value) + def get_surfaceDamage(self) -> ComponentVisualDamageStatusSurfaceDamage: + return ComponentVisualDamageStatusSurfaceDamage.get_enum(self._surfaceDamage) + SurfaceDamage = property(get_surfaceDamage, set_surfaceDamage) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "IsFirePresent : " + str(self.IsFirePresent) + "\n" + outputStream += "Smoke : " + self.Smoke.get_description + "\n" + outputStream += "SurfaceDamage : " + self.SurfaceDamage.get_description + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/dedamage_description_component_visual_smoke_color.py b/dis/siso_ref_010/enums/dedamage_description_component_visual_smoke_color.py new file mode 100644 index 0000000..eefb019 --- /dev/null +++ b/dis/siso_ref_010/enums/dedamage_description_component_visual_smoke_color.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 316, + * marshal size 8; + * DEDamageDescriptionComponentVisualSmokeColor has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DEDamageDescriptionComponentVisualSmokeColor(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_smoke = EnumValue(0, "No Smoke") + white = EnumValue(1, "White") + gray = EnumValue(2, "Gray") + black = EnumValue(3, "Black") + default = no_smoke + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/defire_flags.py b/dis/siso_ref_010/enums/defire_flags.py new file mode 100644 index 0000000..7fb53b3 --- /dev/null +++ b/dis/siso_ref_010/enums/defire_flags.py @@ -0,0 +1,99 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .defire_flags_state_update_flag import DEFireFlagsStateUpdateFlag + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 313, marshal size 16, + * DEFireFlags + */ + +""" + +class DEFireFlagsBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Identifies the State of the DE Weapon, use {@link UInt8} values for this field + ("_weaponOn", UByte, 1), + + # (bit position 1, boolean) Identifies a DE Weapon State Change, use {@link DEFireFlagsStateUpdateFlag} values for this field + ("_stateUpdateFlag", UByte, 1) + ] + +class DEFireFlags(ctypes.Union): + _fields_ = [ + ("capabilities", DEFireFlagsBitField), + ("asbyte", UInt8) + ] + + def set_weaponOn(self, value : UInt8): + self.capabilities._weaponOn = int(value) + def get_weaponOn(self) -> UInt8: + return self.capabilities._weaponOn + WeaponOn = property(get_weaponOn, set_weaponOn) + + def set_stateUpdateFlag(self, value : DEFireFlagsStateUpdateFlag): + self.capabilities._stateUpdateFlag = int(value) + def get_stateUpdateFlag(self) -> DEFireFlagsStateUpdateFlag: + return DEFireFlagsStateUpdateFlag.get_enum(self._stateUpdateFlag) + StateUpdateFlag = property(get_stateUpdateFlag, set_stateUpdateFlag) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "WeaponOn : " + str(self.WeaponOn) + "\n" + outputStream += "StateUpdateFlag : " + self.StateUpdateFlag.get_description + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/defire_flags_state_update_flag.py b/dis/siso_ref_010/enums/defire_flags_state_update_flag.py new file mode 100644 index 0000000..26d0a0e --- /dev/null +++ b/dis/siso_ref_010/enums/defire_flags_state_update_flag.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 374, + * marshal size 1; + * DEFireFlagsStateUpdateFlag has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DEFireFlagsStateUpdateFlag(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + update_due_to_heartbeat_timer = EnumValue(0, "Update Due to Heartbeat Timer") + state_change = EnumValue(1, "State Change") + default = update_due_to_heartbeat_timer + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/defire_pulse_shape.py b/dis/siso_ref_010/enums/defire_pulse_shape.py new file mode 100644 index 0000000..358f8b8 --- /dev/null +++ b/dis/siso_ref_010/enums/defire_pulse_shape.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 312, + * marshal size 8; + * DEFirePulseShape has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DEFirePulseShape(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + square_wave = EnumValue(1, "Square Wave") + continuous_wave = EnumValue(2, "Continuous Wave") + gaussian = EnumValue(3, "Gaussian") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/delta_mode5saltitude_positive_negative_indicator.py b/dis/siso_ref_010/enums/delta_mode5saltitude_positive_negative_indicator.py new file mode 100644 index 0000000..1e1d77f --- /dev/null +++ b/dis/siso_ref_010/enums/delta_mode5saltitude_positive_negative_indicator.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 362, + * marshal size 1; + * DeltaMode5SAltitudePositiveNegativeIndicator has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DeltaMode5SAltitudePositiveNegativeIndicator(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + positive = EnumValue(0, "Positive") + negative = EnumValue(1, "Negative") + default = positive + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/deprecision_aimpoint_beam_spot_type.py b/dis/siso_ref_010/enums/deprecision_aimpoint_beam_spot_type.py new file mode 100644 index 0000000..bd078e1 --- /dev/null +++ b/dis/siso_ref_010/enums/deprecision_aimpoint_beam_spot_type.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 311, + * marshal size 8; + * DEPrecisionAimpointBeamSpotType has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DEPrecisionAimpointBeamSpotType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + gaussian = EnumValue(1, "Gaussian") + top_hat = EnumValue(2, "Top Hat") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/designator_designator_code.py b/dis/siso_ref_010/enums/designator_designator_code.py new file mode 100644 index 0000000..75273a9 --- /dev/null +++ b/dis/siso_ref_010/enums/designator_designator_code.py @@ -0,0 +1,116 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 81, marshal size 16; + * DesignatorDesignatorCode has 1 enumerations total. + * UID table only for historical purposes. Do not add new entries + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class DesignatorDesignatorCode(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/designator_system_name.py b/dis/siso_ref_010/enums/designator_system_name.py new file mode 100644 index 0000000..9971967 --- /dev/null +++ b/dis/siso_ref_010/enums/designator_system_name.py @@ -0,0 +1,238 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 80, + * marshal size 16; + * DesignatorSystemName has 103 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DesignatorSystemName(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_specified = EnumValue(0, "Not Specified") + an_aaq_4 = EnumValue(1000, "AN/AAQ-4") + an_aaq_7 = EnumValue(1100, "AN/AAQ-7") + an_aaq_8 = EnumValue(1200, "AN/AAQ-8") + an_aaq_14_lantirn = EnumValue(1300, "AN/AAQ-14 LANTIRN") + an_aaq_19 = EnumValue(1400, "AN/AAQ-19") + an_aaq_22a_safire = EnumValue(1500, "AN/AAQ-22A; SAFIRE") + an_aaq_22b_safire_lp = EnumValue(1600, "AN/AAQ-22B; SAFIRE LP") + an_aaq_22c_star_safire_i = EnumValue(1700, "AN/AAQ-22C; Star SAFIRE I") + an_aaq_22d_brite_star = EnumValue(1800, "AN/AAQ-22D; BRITE Star") + an_aaq_24v_dircm_nemesis = EnumValue(1900, "AN/AAQ-24(V) DIRCM; Nemesis") + an_aaq_25_lts = EnumValue(2000, "AN/AAQ-25 LTS") + an_aaq_28v_litening_ii = EnumValue(2100, "AN/AAQ-28(V) LITENING II") + an_aaq_30 = EnumValue(2200, "AN/AAQ-30") + an_aaq_32 = EnumValue(2300, "AN/AAQ-32") + an_aaq_33_sniper = EnumValue(2400, "AN/AAQ-33; Sniper") + an_aaq_37 = EnumValue(2500, "AN/AAQ-37") + an_aaq_38 = EnumValue(2600, "AN/AAQ-38") + an_aaq_40 = EnumValue(2650, "AN/AAQ-40") + an_aas_32 = EnumValue(2700, "AN/AAS-32") + an_aas_35v = EnumValue(2800, "AN/AAS-35V") + an_aas_37 = EnumValue(2900, "AN/AAS-37") + an_aas_38 = EnumValue(3000, "AN/AAS-38") + an_aas_44v = EnumValue(3100, "AN/AAS-44(V)") + an_aas_46 = EnumValue(3200, "AN/AAS-46") + an_aas_49 = EnumValue(3300, "AN/AAS-49") + an_aas_51 = EnumValue(3400, "AN/AAS-51") + an_aas_52_mts_a = EnumValue(3500, "AN/AAS-52; MTS-A") + an_alq_10 = EnumValue(3600, "AN/ALQ-10") + an_asq_228 = EnumValue(3700, "AN/ASQ-228") + an_avq_25 = EnumValue(4400, "AN/AVQ-25") + an_avq_26 = EnumValue(4500, "AN/AVQ-26") + an_gvs_5 = EnumValue(4600, "AN/GVS-5") + an_ped_1_lldr = EnumValue(4700, "AN/PED-1 LLDR") + tads_lrf_d = EnumValue(4800, "TADS LRF/D") + mms_lrf_d = EnumValue(4900, "MMS LRF/D") + ah_1_c_nite = EnumValue(5000, "AH-1 C-NITE") + mates = EnumValue(5100, "MATES") + tcv_115 = EnumValue(5200, "TCV 115") + tim = EnumValue(5300, "TIM") + tms_303 = EnumValue(5400, "TMS 303") + tmy_303 = EnumValue(5500, "TMY 303") + alrad = EnumValue(5600, "ALRAD") + rftdl = EnumValue(5700, "RFTDL") + vvlr = EnumValue(5800, "VVLR") + p0705_hell = EnumValue(6000, "P0705 HELL") + p0708_pulse = EnumValue(6100, "P0708 PULSE") + held = EnumValue(6200, "HELD") + type_105 = EnumValue(6300, "TYPE 105") + type_118 = EnumValue(6400, "TYPE 118") + type_121 = EnumValue(6500, "TYPE 121") + type_126 = EnumValue(6600, "TYPE 126") + type_629 = EnumValue(6700, "TYPE 629") + clds = EnumValue(6800, "CLDS") + tav_38 = EnumValue(6900, "TAV-38") + tmv_630 = EnumValue(7000, "TMV 630") + altm_1020 = EnumValue(7100, "ALTM 1020") + alats = EnumValue(7200, "ALATS") + dark_star_lamps = EnumValue(7300, "Dark Star/LAMPS") + gltd_ii = EnumValue(7400, "GLTD II") + mbt_elrf = EnumValue(7500, "MBT-ELRF") + mark_vii = EnumValue(7600, "Mark VII") + sire_v = EnumValue(7700, "SIRE V") + an_aaq_16b = EnumValue(7800, "AN/AAQ-16B") + an_aaq_16d_aesop = EnumValue(7900, "AN/AAQ-16D; AESOP") + an_aaq_21_star_safire_iii = EnumValue(8000, "AN/AAQ-21; Star SAFIRE III") + an_aaq_22e_brite_star = EnumValue(8100, "AN/AAQ-22E; BRITE Star") + an_aaq_36_star_safire_ii = EnumValue(8200, "AN/AAQ-36; Star SAFIRE II") + an_aas_38a_nite_hawk = EnumValue(8300, "AN/AAS-38A; Nite Hawk") + an_aas_38b_nite_hawk = EnumValue(8400, "AN/AAS-38B; Nite Hawk") + an_aas_44cv = EnumValue(8500, "AN/AAS-44C(V)") + an_aas_53_csp = EnumValue(8600, "AN/AAS-53; CSP") + an_asq_28_atflir = EnumValue(8700, "AN/ASQ-28 ATFLIR") + an_das_1_mts_b = EnumValue(8800, "AN/DAS-1; MTS-B") + an_paq_1_ltd = EnumValue(8900, "AN/PAQ-1 LTD") + an_paq_3_mule = EnumValue(9000, "AN/PAQ-3 MULE") + an_peq_1_soflam = EnumValue(9090, "AN/PEQ-1; SOFLAM") + an_peq_3 = EnumValue(9100, "AN/PEQ-3") + an_peq_15_atpial = EnumValue(9140, "AN/PEQ-15; ATPIAL") + an_peq_18_izlid_1000p = EnumValue(9150, "AN/PEQ-18; IZLID 1000P") + an_tvq_2_g_vlld = EnumValue(9200, "AN/TVQ-2 G/VLLD") + an_zsq_2v1_eos = EnumValue(9300, "AN/ZSQ-2(V)1 EOS") + an_zsq_2v2_eos = EnumValue(9400, "AN/ZSQ-2(V)2 EOS") + circm = EnumValue(9500, "CIRCM") + guardian = EnumValue(9600, "Guardian") + izlid_200p = EnumValue(9700, "IZLID 200P") + izlid_1000p_w = EnumValue(9800, "IZLID 1000P-W") + mms = EnumValue(9900, "MMS") + m_tads_pnvs_arrowhead = EnumValue(10000, "M-TADS/PNVS; Arrowhead") + rbs_70 = EnumValue(10100, "RBS-70") + rbs_90 = EnumValue(10200, "RBS-90") + tads_pnvs = EnumValue(10300, "TADS/PNVS") + colibri = EnumValue(10400, "COLIBRI") + damocles = EnumValue(10500, "Damocles") + i_251_shkval = EnumValue(10600, "I-251 Shkval") + kps_53av_eots = EnumValue(10700, "KPS-53AV EOTS") + star_safire_380 = EnumValue(10800, "Star SAFIRE 380") + janus_t_eos = EnumValue(10900, "JANUS-T EOS") + lothar_eos = EnumValue(11000, "LOTHAR EOS") + mk46_mod_1_eos = EnumValue(11100, "MK46 MOD 1 EOS") + mtk_201me_eos = EnumValue(11200, "MTK-201ME EOS") + thales_mirador_mk2_eos = EnumValue(11300, "Thales Mirador Mk2 EOS") + tpn_1m_49_23_eos = EnumValue(11400, "TPN-1M-49-23 EOS") + default = not_specified + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/detonation_result.py b/dis/siso_ref_010/enums/detonation_result.py new file mode 100644 index 0000000..63ec4c8 --- /dev/null +++ b/dis/siso_ref_010/enums/detonation_result.py @@ -0,0 +1,169 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 62, + * marshal size 8; + * DetonationResult has 34 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DetonationResult(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + entity_impact = EnumValue(1, "Entity Impact") + entity_proximate_detonation = EnumValue(2, "Entity Proximate Detonation") + ground_impact = EnumValue(3, "Ground Impact") + ground_proximate_detonation = EnumValue(4, "Ground Proximate Detonation") + detonation = EnumValue(5, "Detonation") + none_or_no_detonation_dud = EnumValue(6, "None or No Detonation (Dud)") + he_hit_small = EnumValue(7, "HE hit, small") + he_hit_medium = EnumValue(8, "HE hit, medium") + he_hit_large = EnumValue(9, "HE hit, large") + armor_piercing_hit = EnumValue(10, "Armor-piercing hit") + dirt_blast_small = EnumValue(11, "Dirt blast, small") + dirt_blast_medium = EnumValue(12, "Dirt blast, medium") + dirt_blast_large = EnumValue(13, "Dirt blast, large") + water_blast_small = EnumValue(14, "Water blast, small") + water_blast_medium = EnumValue(15, "Water blast, medium") + water_blast_large = EnumValue(16, "Water blast, large") + air_hit = EnumValue(17, "Air hit") + building_hit_small = EnumValue(18, "Building hit, small") + building_hit_medium = EnumValue(19, "Building hit, medium") + building_hit_large = EnumValue(20, "Building hit, large") + mine_clearing_line_charge = EnumValue(21, "Mine-clearing line charge") + environment_object_impact = EnumValue(22, "Environment object impact") + environment_object_proximate_detonation = EnumValue(23, "Environment object proximate detonation") + water_impact = EnumValue(24, "Water Impact") + air_burst = EnumValue(25, "Air Burst") + kill_with_fragment_type_1 = EnumValue(26, "Kill with fragment type 1") + kill_with_fragment_type_2 = EnumValue(27, "Kill with fragment type 2") + kill_with_fragment_type_3 = EnumValue(28, "Kill with fragment type 3") + kill_with_fragment_type_1_after_fly_out_failure = EnumValue(29, "Kill with fragment type 1 after fly-out failure") + kill_with_fragment_type_2_after_fly_out_failure = EnumValue(30, "Kill with fragment type 2 after fly-out failure") + miss_due_to_fly_out_failure = EnumValue(31, "Miss due to fly-out failure") + miss_due_to_end_game_failure = EnumValue(32, "Miss due to end-game failure") + miss_due_to_fly_out_and_end_game_failure = EnumValue(33, "Miss due to fly-out and end-game failure") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/dis_pdu_type.py b/dis/siso_ref_010/enums/dis_pdu_type.py new file mode 100644 index 0000000..c57e197 --- /dev/null +++ b/dis/siso_ref_010/enums/dis_pdu_type.py @@ -0,0 +1,208 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 4, + * marshal size 8; + * DISPDUType has 73 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DisPduType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + entity_state = EnumValue(1, "Entity State") + fire = EnumValue(2, "Fire") + detonation = EnumValue(3, "Detonation") + collision = EnumValue(4, "Collision") + service_request = EnumValue(5, "Service Request") + resupply_offer = EnumValue(6, "Resupply Offer") + resupply_received = EnumValue(7, "Resupply Received") + resupply_cancel = EnumValue(8, "Resupply Cancel") + repair_complete = EnumValue(9, "Repair Complete") + repair_response = EnumValue(10, "Repair Response") + create_entity = EnumValue(11, "Create Entity") + remove_entity = EnumValue(12, "Remove Entity") + start_resume = EnumValue(13, "Start/Resume") + stop_freeze = EnumValue(14, "Stop/Freeze") + acknowledge = EnumValue(15, "Acknowledge") + action_request = EnumValue(16, "Action Request") + action_response = EnumValue(17, "Action Response") + data_query = EnumValue(18, "Data Query") + set_data = EnumValue(19, "Set Data") + data = EnumValue(20, "Data") + event_report = EnumValue(21, "Event Report") + comment = EnumValue(22, "Comment") + electromagnetic_emission = EnumValue(23, "Electromagnetic Emission") + designator = EnumValue(24, "Designator") + transmitter = EnumValue(25, "Transmitter") + signal = EnumValue(26, "Signal") + receiver = EnumValue(27, "Receiver") + identification_friend_or_foe = EnumValue(28, "IFF") + underwater_acoustic = EnumValue(29, "Underwater Acoustic") + supplemental_emission_entity_state = EnumValue(30, "Supplemental Emission / Entity State") + intercom_signal = EnumValue(31, "Intercom Signal") + intercom_control = EnumValue(32, "Intercom Control") + aggregate_state = EnumValue(33, "Aggregate State") + isgroupof = EnumValue(34, "IsGroupOf") + transfer_ownership = EnumValue(35, "Transfer Ownership") + ispartof = EnumValue(36, "IsPartOf") + minefield_state = EnumValue(37, "Minefield State") + minefield_query = EnumValue(38, "Minefield Query") + minefield_data = EnumValue(39, "Minefield Data") + minefield_response_nack = EnumValue(40, "Minefield Response NACK") + environmental_process = EnumValue(41, "Environmental Process") + gridded_data = EnumValue(42, "Gridded Data") + point_object_state = EnumValue(43, "Point Object State") + linear_object_state = EnumValue(44, "Linear Object State") + areal_object_state = EnumValue(45, "Areal Object State") + time_space_position_information = EnumValue(46, "TSPI") + appearance = EnumValue(47, "Appearance") + articulated_parts = EnumValue(48, "Articulated Parts") + live_entity_fire = EnumValue(49, "LE Fire") + live_entity_detonation = EnumValue(50, "LE Detonation") + create_entity_reliable = EnumValue(51, "Create Entity-R") + remove_entity_reliable = EnumValue(52, "Remove Entity-R") + start_resume_reliable = EnumValue(53, "Start/Resume-R") + stop_freeze_reliable = EnumValue(54, "Stop/Freeze-R") + acknowledge_reliable = EnumValue(55, "Acknowledge-R") + action_request_reliable = EnumValue(56, "Action Request-R") + action_response_reliable = EnumValue(57, "Action Response-R") + data_query_reliable = EnumValue(58, "Data Query-R") + set_data_reliable = EnumValue(59, "Set Data-R") + data_reliable = EnumValue(60, "Data-R") + event_report_reliable = EnumValue(61, "Event Report-R") + comment_reliable = EnumValue(62, "Comment-R") + record_reliable = EnumValue(63, "Record-R") + set_record_reliable = EnumValue(64, "Set Record-R") + record_query_reliable = EnumValue(65, "Record Query-R") + collision_elastic = EnumValue(66, "Collision-Elastic") + entity_state_update = EnumValue(67, "Entity State Update") + directed_energy_fire = EnumValue(68, "Directed Energy Fire") + entity_damage_status = EnumValue(69, "Entity Damage Status") + information_operations_action = EnumValue(70, "Information Operations Action") + information_operations_report = EnumValue(71, "Information Operations Report") + attribute = EnumValue(72, "Attribute") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/disattribute_action_code.py b/dis/siso_ref_010/enums/disattribute_action_code.py new file mode 100644 index 0000000..8c1f70b --- /dev/null +++ b/dis/siso_ref_010/enums/disattribute_action_code.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 295, + * marshal size 8; + * DISAttributeActionCode has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DISAttributeActionCode(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/dislive_entity_subprotocol_number.py b/dis/siso_ref_010/enums/dislive_entity_subprotocol_number.py new file mode 100644 index 0000000..262f0cd --- /dev/null +++ b/dis/siso_ref_010/enums/dislive_entity_subprotocol_number.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 417, + * marshal size 8; + * DISLiveEntitySubprotocolNumber has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DISLiveEntitySubprotocolNumber(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_subprotocol = EnumValue(0, "No Subprotocol") + default = no_subprotocol + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/dispdustatus_active_interrogation_indicator_aii.py b/dis/siso_ref_010/enums/dispdustatus_active_interrogation_indicator_aii.py new file mode 100644 index 0000000..39e8139 --- /dev/null +++ b/dis/siso_ref_010/enums/dispdustatus_active_interrogation_indicator_aii.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 389, + * marshal size 1; + * DISPDUStatusActiveInterrogationIndicator(AII) has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DISPDUStatusActiveInterrogationIndicatorAII(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_active = EnumValue(0, "Not Active") + active = EnumValue(1, "Active") + default = not_active + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/dispdustatus_coupled_extension_indicator_cei.py b/dis/siso_ref_010/enums/dispdustatus_coupled_extension_indicator_cei.py new file mode 100644 index 0000000..5efea7a --- /dev/null +++ b/dis/siso_ref_010/enums/dispdustatus_coupled_extension_indicator_cei.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 303, + * marshal size 1; + * DISPDUStatusCoupledExtensionIndicator(CEI) has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DISPDUStatusCoupledExtensionIndicatorCEI(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_coupled = EnumValue(0, "Not Coupled") + coupled = EnumValue(1, "Coupled") + default = not_coupled + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/dispdustatus_detonation_type_indicator_dti.py b/dis/siso_ref_010/enums/dispdustatus_detonation_type_indicator_dti.py new file mode 100644 index 0000000..e767a5b --- /dev/null +++ b/dis/siso_ref_010/enums/dispdustatus_detonation_type_indicator_dti.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 305, + * marshal size 2; + * DISPDUStatusDetonationTypeIndicator(DTI) has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DISPDUStatusDetonationTypeIndicatorDTI(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + munition = EnumValue(0, "Munition") + expendable = EnumValue(1, "Expendable") + non_munition_explosion = EnumValue(2, "Non-munition Explosion") + default = munition + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/dispdustatus_fire_type_indicator_fti.py b/dis/siso_ref_010/enums/dispdustatus_fire_type_indicator_fti.py new file mode 100644 index 0000000..62e5b11 --- /dev/null +++ b/dis/siso_ref_010/enums/dispdustatus_fire_type_indicator_fti.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 304, + * marshal size 1; + * DISPDUStatusFireTypeIndicator(FTI) has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DISPDUStatusFireTypeIndicatorFTI(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + munition = EnumValue(0, "Munition") + expendable = EnumValue(1, "Expendable") + default = munition + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/dispdustatus_iffsimulation_mode_ism.py b/dis/siso_ref_010/enums/dispdustatus_iffsimulation_mode_ism.py new file mode 100644 index 0000000..9eda21c --- /dev/null +++ b/dis/siso_ref_010/enums/dispdustatus_iffsimulation_mode_ism.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 308, + * marshal size 1; + * DISPDUStatusIFFSimulationMode(ISM) has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DISPDUStatusIFFSimulationModeISM(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + regeneration = EnumValue(0, "Regeneration") + interactive = EnumValue(1, "Interactive") + default = regeneration + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/dispdustatus_intercom_attached_indicator_iai.py b/dis/siso_ref_010/enums/dispdustatus_intercom_attached_indicator_iai.py new file mode 100644 index 0000000..73c9b09 --- /dev/null +++ b/dis/siso_ref_010/enums/dispdustatus_intercom_attached_indicator_iai.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 307, + * marshal size 2; + * DISPDUStatusIntercomAttachedIndicator(IAI) has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DISPDUStatusIntercomAttachedIndicatorIAI(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + unattached = EnumValue(1, "Unattached") + attached = EnumValue(2, "Attached") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/dispdustatus_lvcindicator_lvc.py b/dis/siso_ref_010/enums/dispdustatus_lvcindicator_lvc.py new file mode 100644 index 0000000..00dcd76 --- /dev/null +++ b/dis/siso_ref_010/enums/dispdustatus_lvcindicator_lvc.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 302, + * marshal size 2; + * LVCIndicator has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DISPDUStatusLVCIndicatorLVC(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + live = EnumValue(1, "Live") + Virtual = EnumValue(2, "Virtual") + constructive = EnumValue(3, "Constructive") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/dispdustatus_radio_attached_indicator_rai.py b/dis/siso_ref_010/enums/dispdustatus_radio_attached_indicator_rai.py new file mode 100644 index 0000000..3b07954 --- /dev/null +++ b/dis/siso_ref_010/enums/dispdustatus_radio_attached_indicator_rai.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 306, + * marshal size 2; + * RadioAttachedIndicator has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DISPDUStatusRadioAttachedIndicatorRAI(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + unattached = EnumValue(1, "Unattached") + attached = EnumValue(2, "Attached") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/dispdustatus_transferred_entity_indicator_tei.py b/dis/siso_ref_010/enums/dispdustatus_transferred_entity_indicator_tei.py new file mode 100644 index 0000000..d0f476d --- /dev/null +++ b/dis/siso_ref_010/enums/dispdustatus_transferred_entity_indicator_tei.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 301, + * marshal size 1; + * DISPDUStatusTransferredEntityIndicator(TEI) has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DISPDUStatusTransferredEntityIndicatorTEI(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_difference = EnumValue(0, "No Difference") + difference = EnumValue(1, "Difference") + default = no_difference + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/disprotocol_family.py b/dis/siso_ref_010/enums/disprotocol_family.py new file mode 100644 index 0000000..bfdff96 --- /dev/null +++ b/dis/siso_ref_010/enums/disprotocol_family.py @@ -0,0 +1,149 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 5, + * marshal size 8; + * DISProtocolFamily has 14 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DISProtocolFamily(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + entity_information_interaction = EnumValue(1, "Entity Information/Interaction") + warfare = EnumValue(2, "Warfare") + logistics = EnumValue(3, "Logistics") + radio_communications = EnumValue(4, "Radio Communications") + simulation_management = EnumValue(5, "Simulation Management") + distributed_emission_regeneration = EnumValue(6, "Distributed Emission Regeneration") + entity_management = EnumValue(7, "Entity Management") + minefield = EnumValue(8, "Minefield") + synthetic_environment = EnumValue(9, "Synthetic Environment") + simulation_management_with_reliability = EnumValue(10, "Simulation Management with Reliability") + live_entity_le_information_interaction = EnumValue(11, "Live Entity (LE) Information/Interaction") + non_real_time = EnumValue(12, "Non-Real-Time") + information_operations = EnumValue(13, "Information Operations") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/disprotocol_version.py b/dis/siso_ref_010/enums/disprotocol_version.py new file mode 100644 index 0000000..33bdd21 --- /dev/null +++ b/dis/siso_ref_010/enums/disprotocol_version.py @@ -0,0 +1,143 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 3, + * marshal size 8; + * DISProtocolVersion has 8 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DISProtocolVersion(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + dis_pdu_version_10_may_92 = EnumValue(1, "DIS PDU version 1.0 (May 92)") + ieee_1278_1993 = EnumValue(2, "IEEE 1278-1993") + dis_applications_version_20_third_draft_28_may_1993 = EnumValue(3, "DIS Applications Version 2.0 - Third Draft (28 May 1993)") + dis_application_protocols_version_20_fourth_draft_revised_16_march_1994 = EnumValue(4, "DIS Application Protocols Version 2.0 - Fourth Draft (Revised) (16 March 1994)") + ieee_12781_1995 = EnumValue(5, "IEEE 1278.1-1995") + ieee_12781a_1998 = EnumValue(6, "IEEE 1278.1A-1998") + ieee_12781_2012 = EnumValue(7, "IEEE 1278.1-2012") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/drparameters_type.py b/dis/siso_ref_010/enums/drparameters_type.py new file mode 100644 index 0000000..80b6509 --- /dev/null +++ b/dis/siso_ref_010/enums/drparameters_type.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 296, + * marshal size 8; + * DRParametersType has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class DRParametersType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + none = EnumValue(0, "None") + local_euler_angles_yaw_pitch_roll = EnumValue(1, "Local Euler Angles (Yaw, Pitch, Roll)") + world_orientation_quaternion = EnumValue(2, "World Orientation Quaternion") + default = none + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/eeattribute_state_indicator.py b/dis/siso_ref_010/enums/eeattribute_state_indicator.py new file mode 100644 index 0000000..7a39bc8 --- /dev/null +++ b/dis/siso_ref_010/enums/eeattribute_state_indicator.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 300, + * marshal size 8; + * StateIndicator has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class EEAttributeStateIndicator(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + heartbeat_update = EnumValue(0, "Heartbeat Update") + changed_data = EnumValue(1, "Changed Data") + has_ceased = EnumValue(2, "Has Ceased") + default = heartbeat_update + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/electromagnetic_emission_beam_function.py b/dis/siso_ref_010/enums/electromagnetic_emission_beam_function.py new file mode 100644 index 0000000..7556146 --- /dev/null +++ b/dis/siso_ref_010/enums/electromagnetic_emission_beam_function.py @@ -0,0 +1,159 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 78, + * marshal size 8; + * ElectromagneticEmissionBeamFunction has 24 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ElectromagneticEmissionBeamFunction(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + search = EnumValue(1, "Search") + height_finding = EnumValue(2, "Height Finding") + acquisition = EnumValue(3, "Acquisition") + tracking = EnumValue(4, "Tracking") + acquisition_and_tracking = EnumValue(5, "Acquisition and tracking") + command_guidance = EnumValue(6, "Command guidance") + illumination = EnumValue(7, "Illumination") + ranging = EnumValue(8, "Ranging") + missile_beacon = EnumValue(9, "Missile beacon") + missile_fusing = EnumValue(10, "Missile Fusing") + active_radar_missile_seeker = EnumValue(11, "Active radar missile seeker") + jamming = EnumValue(12, "Jamming") + iff = EnumValue(13, "IFF") + navigation_weather = EnumValue(14, "Navigation / Weather") + meteorological = EnumValue(15, "Meteorological") + data_transmission = EnumValue(16, "Data transmission") + navigational_directional_beacon = EnumValue(17, "Navigational directional beacon") + time_shared_search = EnumValue(20, "Time-Shared Search") + time_shared_acquisition = EnumValue(21, "Time-Shared Acquisition") + time_shared_track = EnumValue(22, "Time-Shared Track") + time_shared_command_guidance = EnumValue(23, "Time-Shared Command Guidance") + time_shared_illumination = EnumValue(24, "Time-Shared Illumination") + time_shared_jamming = EnumValue(25, "Time-Shared Jamming") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/electromagnetic_emission_state_update_indicator.py b/dis/siso_ref_010/enums/electromagnetic_emission_state_update_indicator.py new file mode 100644 index 0000000..9c45d17 --- /dev/null +++ b/dis/siso_ref_010/enums/electromagnetic_emission_state_update_indicator.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 77, + * marshal size 8; + * ElectromagneticEmissionStateUpdateIndicator has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ElectromagneticEmissionStateUpdateIndicator(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + heartbeat_update = EnumValue(0, "Heartbeat Update") + changed_data_update = EnumValue(1, "Changed Data Update") + default = heartbeat_update + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/emitter_name.py b/dis/siso_ref_010/enums/emitter_name.py new file mode 100644 index 0000000..f8d1433 --- /dev/null +++ b/dis/siso_ref_010/enums/emitter_name.py @@ -0,0 +1,2954 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 75, + * marshal size 16; + * EmitterName has 2819 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class EmitterName(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + _1245_6x = EnumValue(2, "1245/6X") + _1l117 = EnumValue(3, "1L117") + _1l121e = EnumValue(4, "1L121E") + _1l250 = EnumValue(5, "1L250") + _1l220_u = EnumValue(6, "1L220-U") + _1l122_1e = EnumValue(7, "1L122-1E") + _1rl257 = EnumValue(9, "1RL257") + _1rl138 = EnumValue(10, "1RL138") + _1rl257_krasukha_4_jammer = EnumValue(11, "1RL257 (Krasukha-4) Jammer") + _5n20 = EnumValue(12, "5N20") + _5h62b = EnumValue(13, "5H62B") + _5p_10 = EnumValue(14, "5P-10") + _5p_10e = EnumValue(15, "5P-10E") + _5p_10_01 = EnumValue(16, "5P-10-01") + _5p_10_01e = EnumValue(17, "5P-10-01E") + _5p_10_02 = EnumValue(18, "5P-10-02") + _5p_10_02e = EnumValue(19, "5P-10-02E") + _5p_10_03 = EnumValue(20, "5P-10-03") + _5p_10_03e = EnumValue(21, "5P-10-03E") + _5p_10e_mod = EnumValue(22, "5P-10E MOD") + _621a_3 = EnumValue(25, "621A-3") + commid_860f_1_al_101 = EnumValue(40, "COMMID_860F-1 / AL-101") + _9b_1103m2 = EnumValue(42, "9B-1103M2") + _1226_decca_mil = EnumValue(45, "1226 DECCA MIL") + _9b_1348 = EnumValue(46, "9B-1348") + _3km6 = EnumValue(47, "3KM6") + _9kr400 = EnumValue(48, "9KR400") + _50n6a = EnumValue(49, "50N6A") + _55g6_1 = EnumValue(50, "55G6-1") + _59n6 = EnumValue(55, "59N6") + _5n69 = EnumValue(57, "5N69") + _67n6 = EnumValue(60, "67N6") + _79k6_pelican = EnumValue(62, "79K6 Pelican") + _76t6 = EnumValue(63, "76T6") + _77t6_abm = EnumValue(64, "77T6 ABM") + _80k6 = EnumValue(65, "80K6") + _91n6am = EnumValue(66, "91N6A(M)") + _80k6m = EnumValue(67, "80K6M") + _96l6e = EnumValue(70, "96L6E") + _96l6_tsp = EnumValue(75, "96L6-TsP") + _9c18m3 = EnumValue(76, "9C18M3") + _9c36m = EnumValue(77, "9C36M") + _9gr400 = EnumValue(80, "9GR400") + _9_gr_400a = EnumValue(81, "9 GR 400A") + _9gr600 = EnumValue(90, "9GR600") + _9gr606 = EnumValue(91, "9GR606") + _9_lv_100 = EnumValue(125, "9 LV 100") + _9lv_200_ta = EnumValue(135, "9LV 200 TA") + _9lv_200_tv = EnumValue(180, "9LV 200 TV") + _9lv_200_tt = EnumValue(181, "9LV 200 TT") + _9lv200_mk_iii = EnumValue(183, "9LV200 MK III") + _9lv326 = EnumValue(185, "9LV326") + _9m96e2_seeker = EnumValue(190, "9M96E2 Seeker") + _9s15m2 = EnumValue(195, "9S15M2") + _9s19m2 = EnumValue(196, "9S19M2") + _9s19me = EnumValue(197, "9S19ME") + _9s32m = EnumValue(198, "9S32M") + _9s32me = EnumValue(199, "9S32ME") + _9s36e = EnumValue(200, "9S36E") + _9s112 = EnumValue(215, "9S112") + natoid_a310z = EnumValue(225, "NATOID_A310Z") + natoid_a325a = EnumValue(270, "NATOID_A325A") + natoid_a346z = EnumValue(315, "NATOID_A346Z") + natoid_a353b = EnumValue(360, "NATOID_A353B") + natoid_a372a = EnumValue(405, "NATOID_A372A") + natoid_a372b = EnumValue(450, "NATOID_A372B") + natoid_a372c = EnumValue(495, "NATOID_A372C") + natoid_a377a = EnumValue(540, "NATOID_A377A") + natoid_a377b = EnumValue(585, "NATOID_A377B") + natoid_a380z = EnumValue(630, "NATOID_A380Z") + natoid_a381z = EnumValue(675, "NATOID_A381Z") + natoid_a398z = EnumValue(720, "NATOID_A398Z") + natoid_a403z = EnumValue(765, "NATOID_A403Z") + natoid_a409a = EnumValue(810, "NATOID_A409A") + natoid_a418a = EnumValue(855, "NATOID_A418A") + natoid_a419z = EnumValue(900, "NATOID_A419Z") + natoid_a429z = EnumValue(945, "NATOID_A429Z") + natoid_a432z = EnumValue(990, "NATOID_A432Z") + natoid_a434z = EnumValue(1035, "NATOID_A434Z") + aa_6c_acrid_r_40 = EnumValue(1070, "AA-6C Acrid (R-40)") + aa_7c_apex_r_24r = EnumValue(1073, "AA-7C Apex (R-24R)") + natoid_a401a = EnumValue(1080, "NATOID_A401A") + aa_10a_r_27r = EnumValue(1081, "AA-10A (R-27R)") + natoid_aa_10c_alamo_c = EnumValue(1082, "NATOID_AA-10C Alamo-C") + aa_13_arrow_seeker = EnumValue(1085, "AA-13 Arrow Seeker") + aam_4b_mh = EnumValue(1090, "AAM-4B MH") + aa_300 = EnumValue(1094, "AA-300") + aa_12_seeker = EnumValue(1095, "AA-12 Seeker") + commid_ad4a = EnumValue(1096, "COMMID_AD4A") + ades = EnumValue(1097, "ADES") + ads_4_lrsr = EnumValue(1098, "ADS-4 LRSR") + acr_430 = EnumValue(1099, "ACR-430") + agave = EnumValue(1100, "Agave") + acsopri_e = EnumValue(1101, "ACSOPRI-E") + abd_2000 = EnumValue(1102, "ABD 2000") + adac_mk_1 = EnumValue(1110, "ADAC MK 1") + adac_mk_2 = EnumValue(1111, "ADAC MK 2") + adar = EnumValue(1113, "ADAR") + adour = EnumValue(1115, "ADOUR") + agat_9b_1348 = EnumValue(1117, "AGAT 9B-1348") + adros_kt_01av = EnumValue(1118, "Adros KT-01AV") + agat_9e420 = EnumValue(1120, "Agat 9E420") + agm_158_jassm_sar = EnumValue(1122, "AGM-158 JASSM SAR") + agm_88_harm_mmw = EnumValue(1123, "AGM-88 HARM MMW") + agrion_15 = EnumValue(1125, "AGRION 15") + commid_ahv_7 = EnumValue(1130, "COMMID_AHV-7") + ahv_17 = EnumValue(1150, "AHV-17") + ai_mk_23 = EnumValue(1170, "AI MK 23") + aida_ii = EnumValue(1215, "AIDA II") + aim_120a = EnumValue(1216, "AIM-120A") + aim_7m_sparrow = EnumValue(1218, "AIM-7M Sparrow") + _1l271 = EnumValue(1230, "1L271") + ala_51 = EnumValue(1240, "ALA-51") + albatros_mk2 = EnumValue(1260, "Albatros MK2") + alt_50 = EnumValue(1263, "ALT-50") + altair = EnumValue(1264, "ALTAIR") + am_aps_717 = EnumValue(1265, "AM/APS-717") + ames_13_mk_1 = EnumValue(1268, "AMES 13 MK 1") + wgu_16_b = EnumValue(1270, "WGU-16/B") + _1l13_3_55g6 = EnumValue(1280, "1L13-3 (55G6)") + _1l13_3_55g6_2 = EnumValue(1282, "1L13-3 (55G6)") + amdr_3d = EnumValue(1288, "AMDR 3D") + ana_sps_502 = EnumValue(1305, "ANA SPS 502") + commid_anemone = EnumValue(1306, "COMMID_Anemone") + anritsu_electric_ar_30a = EnumValue(1350, "ANRITSU Electric AR-30A") + antilope_v = EnumValue(1395, "Antilope V") + an_aaq_24 = EnumValue(1397, "AN/AAQ-24") + an_adm_160 = EnumValue(1398, "AN/ADM-160") + an_ale_50 = EnumValue(1400, "AN/ALE-50") + an_alq_76 = EnumValue(1410, "AN/ALQ-76") + an_alq_99 = EnumValue(1440, "AN/ALQ-99") + an_alq_99_band_4 = EnumValue(1441, "AN/ALQ-99 Band 4") + an_alq_99_lbt = EnumValue(1442, "AN/ALQ-99 LBT") + an_alq_100 = EnumValue(1485, "AN/ALQ-100") + an_alq_101 = EnumValue(1530, "AN/ALQ-101") + an_alq_119 = EnumValue(1575, "AN/ALQ-119") + an_alq_122 = EnumValue(1585, "AN/ALQ-122") + an_alq_126a = EnumValue(1620, "AN/ALQ-126A") + an_alq_128 = EnumValue(1621, "AN/ALQ-128") + an_alq_126b = EnumValue(1622, "AN/ALQ-126B") + an_alq_131 = EnumValue(1626, "AN/ALQ-131") + an_alq_131_blk_ii = EnumValue(1627, "AN/ALQ-131 Blk II") + an_alq_135c_d = EnumValue(1628, "AN/ALQ-135C/D") + an_alq_144av3 = EnumValue(1630, "AN/ALQ-144A(V)3") + an_alq_153 = EnumValue(1632, "AN/ALQ-153") + an_alq_157jammer = EnumValue(1633, "AN/ALQ-157Jammer") + an_alq_155 = EnumValue(1634, "AN/ALQ-155") + an_alq_156 = EnumValue(1635, "AN/ALQ-156") + an_alq_161_a = EnumValue(1636, "AN/ALQ-161/A") + an_alq_161 = EnumValue(1637, "AN/ALQ-161") + an_alq_162 = EnumValue(1638, "AN/ALQ-162") + an_alq_164 = EnumValue(1639, "AN/ALQ-164") + an_alq_165 = EnumValue(1640, "AN/ALQ-165") + an_alq_187_jammer = EnumValue(1641, "AN/ALQ-187 Jammer") + an_alq_167 = EnumValue(1642, "AN/ALQ-167") + an_alq_172v1 = EnumValue(1643, "AN/ALQ-172(V)1") + an_alq_172v2 = EnumValue(1644, "AN/ALQ-172(V)2") + an_alq_172v3 = EnumValue(1645, "AN/ALQ-172(V)3") + an_alq_176 = EnumValue(1646, "AN/ALQ-176") + an_alq_178 = EnumValue(1647, "AN/ALQ-178") + an_alq_184 = EnumValue(1648, "AN/ALQ-184") + an_alq_184v9 = EnumValue(1649, "AN/ALQ-184(V)9") + an_alq_188 = EnumValue(1650, "AN/ALQ-188") + an_alq_214 = EnumValue(1651, "AN/ALQ-214") + an_alr_56 = EnumValue(1652, "AN/ALR-56") + an_alq_221 = EnumValue(1653, "AN/ALQ-221") + an_alr_69 = EnumValue(1654, "AN/ALR-69") + an_alq_211v = EnumValue(1655, "AN/ALQ-211(V)") + an_alt_16a = EnumValue(1656, "AN/ALT-16A") + an_alq_173 = EnumValue(1657, "AN/ALQ-173") + an_alt_28 = EnumValue(1658, "AN/ALT-28") + an_alr_66b_jammer = EnumValue(1659, "AN/ALR-66B Jammer") + an_alt_32a = EnumValue(1660, "AN/ALT-32A") + an_alq_196 = EnumValue(1661, "AN/ALQ-196") + an_alq_249v1 = EnumValue(1662, "AN/ALQ-249(V)1") + an_alq_240v1_jammer = EnumValue(1663, "AN/ALQ-240(V)1 Jammer") + an_alr_66b_jammer_2 = EnumValue(1664, "AN/ALR-66B Jammer") + an_apd_10 = EnumValue(1665, "AN/APD 10") + an_alq_249v2 = EnumValue(1666, "AN/ALQ-249(V)2") + an_alq_213 = EnumValue(1670, "AN/ALQ-213") + alq_214av4_5_jammer = EnumValue(1672, "ALQ-214A(V)4/5 Jammer") + an_alq_218 = EnumValue(1680, "AN/ALQ-218") + an_alq_250_epawss = EnumValue(1685, "AN/ALQ-250 EPAWSS") + an_apg_50 = EnumValue(1700, "AN/APG-50") + an_apg_53 = EnumValue(1710, "AN/APG-53") + an_apg_59 = EnumValue(1755, "AN/APG-59") + an_apg_63 = EnumValue(1800, "AN/APG-63") + an_apg_63v1 = EnumValue(1805, "AN/APG-63(V)1") + an_apg_63v2 = EnumValue(1807, "AN/APG-63(V)2") + an_apg_63v3 = EnumValue(1809, "AN/APG-63(V)3") + an_apg_65 = EnumValue(1845, "AN/APG-65") + an_apg_66 = EnumValue(1870, "AN/APG-66") + an_apg_66v = EnumValue(1871, "AN/APG-66(V)") + an_apg_66v2 = EnumValue(1872, "AN/APG-66(V)2") + an_apg_67 = EnumValue(1880, "AN/APG-67") + an_apg_68 = EnumValue(1890, "AN/APG-68") + an_apg_68v9 = EnumValue(1895, "AN/APG-68(v)9") + an_apg_70 = EnumValue(1935, "AN/APG-70") + an_apg_71 = EnumValue(1940, "AN/APG-71") + an_apg_73 = EnumValue(1945, "AN/APG-73") + an_apg_77 = EnumValue(1960, "AN/APG-77") + an_apg_78 = EnumValue(1970, "AN/APG-78") + an_apg_79 = EnumValue(1971, "AN/APG-79") + an_apg_80 = EnumValue(1972, "AN/APG-80") + an_apg_81 = EnumValue(1974, "AN/APG-81") + an_apg_82v1 = EnumValue(1975, "AN/APG-82(V)1") + an_apg_83 = EnumValue(1976, "AN/APG-83") + an_apg_502 = EnumValue(1980, "AN/APG-502") + an_apn_1 = EnumValue(2025, "AN/APN-1") + an_apn_22 = EnumValue(2070, "AN/APN-22") + an_apn_59 = EnumValue(2115, "AN/APN-59") + an_apn_69 = EnumValue(2160, "AN/APN-69") + an_apn_81 = EnumValue(2205, "AN/APN-81") + an_apn_102 = EnumValue(2220, "AN/APN-102") + an_apn_117 = EnumValue(2250, "AN/APN-117") + an_apn_118 = EnumValue(2295, "AN/APN-118") + an_apn_122 = EnumValue(2320, "AN/APN-122") + an_apn_130 = EnumValue(2340, "AN/APN-130") + an_apn_131 = EnumValue(2385, "AN/APN-131") + an_apn_133 = EnumValue(2430, "AN/APN-133") + an_apn_134 = EnumValue(2475, "AN/APN-134") + an_apn_141v = EnumValue(2476, "AN/APN-141(V)") + an_apn_147 = EnumValue(2520, "AN/APN-147") + an_apn_150 = EnumValue(2565, "AN/APN-150") + an_apn_153 = EnumValue(2610, "AN/APN-153") + an_apn_154 = EnumValue(2655, "AN/APN-154") + an_apn_155 = EnumValue(2700, "AN/APN-155") + an_apn_159 = EnumValue(2745, "AN/APN-159") + an_apn_177 = EnumValue(2746, "AN/APN-177") + an_apn_179 = EnumValue(2747, "AN/APN-179") + an_apn_169 = EnumValue(2748, "AN/APN-169") + an_apn_182 = EnumValue(2790, "AN/APN-182") + an_apn_187 = EnumValue(2835, "AN/APN-187") + an_apn_190 = EnumValue(2880, "AN/APN-190") + an_apn_194 = EnumValue(2925, "AN/APN-194") + an_apn_195 = EnumValue(2970, "AN/APN-195") + an_apn_198 = EnumValue(3015, "AN/APN-198") + an_apn_200 = EnumValue(3060, "AN/APN-200") + an_apn_202 = EnumValue(3105, "AN/APN-202") + an_apn_205 = EnumValue(3106, "AN/APN-205") + an_apn_209 = EnumValue(3120, "AN/APN-209") + an_apn_209d = EnumValue(3121, "AN/APN-209D") + an_apn_209a = EnumValue(3122, "AN/APN-209A") + an_apn_215 = EnumValue(3148, "AN/APN-215") + an_apn_217 = EnumValue(3150, "AN/APN-217") + an_apn_218 = EnumValue(3152, "AN/APN-218") + an_apn_224 = EnumValue(3153, "AN/APN-224") + an_apn_227 = EnumValue(3154, "AN/APN-227") + an_apn_230 = EnumValue(3155, "AN/APN-230") + an_apn_232 = EnumValue(3156, "AN/APN-232") + an_apn_237a = EnumValue(3157, "AN/APN-237A") + an_apn_234 = EnumValue(3158, "AN/APN-234") + an_apn_235 = EnumValue(3159, "AN/APN-235") + an_apn_238 = EnumValue(3160, "AN/APN-238") + an_apn_222 = EnumValue(3161, "AN/APN-222") + an_apn_239 = EnumValue(3162, "AN/APN-239") + an_apn_241 = EnumValue(3164, "AN/APN-241") + an_apn_242 = EnumValue(3166, "AN/APN-242") + an_apn_243 = EnumValue(3170, "AN/APN-243") + an_apn_506 = EnumValue(3195, "AN/APN-506") + an_apq_72 = EnumValue(3240, "AN/APQ-72") + an_apq_99 = EnumValue(3285, "AN/APQ-99") + an_apq_100 = EnumValue(3330, "AN/APQ-100") + an_apq_102 = EnumValue(3375, "AN/APQ-102") + an_apq_107 = EnumValue(3376, "AN/APQ-107") + an_apq_109 = EnumValue(3420, "AN/APQ-109") + an_apq_113 = EnumValue(3465, "AN/APQ-113") + an_apq_120 = EnumValue(3510, "AN/APQ-120") + an_apq_122 = EnumValue(3512, "AN/APQ-122") + an_apq_126 = EnumValue(3555, "AN/APQ-126") + an_apq_128 = EnumValue(3600, "AN/APQ-128") + an_apq_129 = EnumValue(3645, "AN/APQ-129") + an_apq_148 = EnumValue(3690, "AN/APQ-148") + an_apq_150a = EnumValue(3700, "AN/APQ-150A") + an_apq_153 = EnumValue(3735, "AN/APQ-153") + an_apq_155 = EnumValue(3770, "AN/APQ-155") + an_apq_159 = EnumValue(3780, "AN/APQ-159") + an_apq_164 = EnumValue(3785, "AN/APQ-164") + an_apq_166 = EnumValue(3788, "AN/APQ-166") + an_apq_170 = EnumValue(3790, "AN/APQ-170") + an_apq_174 = EnumValue(3791, "AN/APQ-174") + an_apq_180 = EnumValue(3794, "AN/APQ-180") + an_apq_181 = EnumValue(3795, "AN/APQ-181") + an_apq_186 = EnumValue(3800, "AN/APQ-186") + an_aps_15j = EnumValue(3810, "AN/APS-15J") + an_aps_16v2 = EnumValue(3813, "AN/APS-16(V)2") + an_aps_31 = EnumValue(3820, "AN/APS-31") + an_aps_42 = EnumValue(3825, "AN/APS-42") + an_aps_80 = EnumValue(3870, "AN/APS-80") + an_aps_88 = EnumValue(3915, "AN/APS-88") + an_aps_88a = EnumValue(3916, "AN/APS-88A") + an_aps_94 = EnumValue(3920, "AN/APS-94") + an_aps_96 = EnumValue(3922, "AN/APS-96") + an_aps_113 = EnumValue(3958, "AN/APS-113") + an_aps_115 = EnumValue(3960, "AN/APS-115") + an_aps_116 = EnumValue(4005, "AN/APS-116") + an_aps_120 = EnumValue(4050, "AN/APS-120") + an_aps_121 = EnumValue(4095, "AN/APS-121") + an_aps_124 = EnumValue(4140, "AN/APS-124") + an_aps_125 = EnumValue(4185, "AN/APS-125") + an_aps_127 = EnumValue(4190, "AN/APS-127") + an_aps_128 = EnumValue(4230, "AN/APS-128") + an_aps_130 = EnumValue(4275, "AN/APS-130") + an_aps_133 = EnumValue(4320, "AN/APS-133") + an_aps_134 = EnumValue(4365, "AN/APS-134") + an_aps_137 = EnumValue(4410, "AN/APS-137") + an_aps_137v5 = EnumValue(4413, "AN/APS-137(V)5") + an_aps_137b = EnumValue(4415, "AN/APS-137B") + an_aps_137bv5 = EnumValue(4420, "AN/APS-137B(V)5") + an_aps_137dv5_elta = EnumValue(4425, "AN/APS-137D(V)5 Elta") + an_aps_138 = EnumValue(4455, "AN/APS-138") + an_aps_139 = EnumValue(4460, "AN/APS-139") + an_aps_143 = EnumValue(4464, "AN/APS-143") + an_aps_143_v_1 = EnumValue(4465, "AN/APS-143 (V) 1") + an_aps_143b = EnumValue(4466, "AN/APS-143B") + an_aps_143v3 = EnumValue(4467, "AN/APS-143(V)3") + an_aps_143bv3 = EnumValue(4468, "AN/APS-143B(V)3") + an_aps_153 = EnumValue(4475, "AN/APS-153") + an_aps_154 = EnumValue(4476, "AN/APS-154") + an_aps_150 = EnumValue(4480, "AN/APS-150") + an_aps_145 = EnumValue(4482, "AN/APS-145") + an_aps_147 = EnumValue(4485, "AN/APS-147") + an_aps_149 = EnumValue(4486, "AN/APS-149") + an_aps_503 = EnumValue(4489, "AN/APS-503") + an_aps_504 = EnumValue(4490, "AN/APS-504") + an_aps_705 = EnumValue(4491, "AN/APS-705") + an_apw_22 = EnumValue(4500, "AN/APW-22") + an_apw_23 = EnumValue(4545, "AN/APW-23") + an_apx_6 = EnumValue(4590, "AN/APX-6") + an_apx_7 = EnumValue(4635, "AN/APX-7") + an_apx_39 = EnumValue(4680, "AN/APX-39") + an_apx_64v = EnumValue(4681, "AN/APX-64(V)") + an_apx_72 = EnumValue(4725, "AN/APX-72") + an_apx_76 = EnumValue(4770, "AN/APX-76") + an_apx_78 = EnumValue(4815, "AN/APX-78") + an_apx_100 = EnumValue(4816, "AN/APX-100") + an_apx_101 = EnumValue(4860, "AN/APX-101") + an_apx_113_aiff = EnumValue(4870, "AN/APX-113 AIFF") + an_apy_1 = EnumValue(4900, "AN/APY-1") + an_apy_2 = EnumValue(4905, "AN/APY-2") + an_apy_3 = EnumValue(4950, "AN/APY-3") + an_apy_7 = EnumValue(4952, "AN/APY-7") + an_apy_8 = EnumValue(4953, "AN/APY-8") + an_apy_9 = EnumValue(4954, "AN/APY-9") + an_apy_10 = EnumValue(4955, "AN/APY-10") + an_arn_21 = EnumValue(4995, "AN/ARN-21") + an_arn_52 = EnumValue(5040, "AN/ARN-52") + an_arn_84 = EnumValue(5085, "AN/ARN-84") + an_arn_118 = EnumValue(5130, "AN/ARN-118") + an_arn_153v = EnumValue(5131, "AN/ARN-153(V)") + an_arn_153 = EnumValue(5165, "AN/ARN-153") + an_arw_73 = EnumValue(5175, "AN/ARW 73") + an_asb_1 = EnumValue(5220, "AN/ASB 1") + an_asg_21 = EnumValue(5265, "AN/ASG 21") + an_asn_137 = EnumValue(5266, "AN/ASN-137") + an_asn_128 = EnumValue(5270, "AN/ASN-128") + an_asq_108 = EnumValue(5280, "AN/ASQ-108") + an_asq_239 = EnumValue(5285, "AN/ASQ-239") + an_ast_502 = EnumValue(5290, "AN/AST-502") + an_avq_55 = EnumValue(5300, "AN/AVQ-55") + an_awg_9 = EnumValue(5310, "AN/AWG 9") + an_brn_1 = EnumValue(5320, "AN/BRN-1") + an_bps_5 = EnumValue(5325, "AN/BPS-5") + an_bps_9 = EnumValue(5355, "AN/BPS-9") + an_bps_15 = EnumValue(5400, "AN/BPS 15") + an_bps_15_h = EnumValue(5401, "AN/BPS-15 H") + an_bps_15j = EnumValue(5402, "AN/BPS-15J") + an_bps_16 = EnumValue(5405, "AN/BPS-16") + an_bps_16v2 = EnumValue(5406, "AN/BPS-16(V)2") + an_cpn_4 = EnumValue(5410, "AN/CPN-4") + an_cpn_18 = EnumValue(5415, "AN/CPN-18") + an_crm_30 = EnumValue(5420, "AN/CRM-30") + an_dpw_23 = EnumValue(5430, "AN/DPW-23") + an_dsq_26_phoenix_mh = EnumValue(5445, "AN/DSQ 26 Phoenix MH") + an_dsq_28_harpoon_mh = EnumValue(5490, "AN/DSQ 28 Harpoon MH") + an_fpn_1 = EnumValue(5491, "AN/FPN-1") + an_fpn_28 = EnumValue(5493, "AN/FPN-28") + an_fpn_33 = EnumValue(5494, "AN/FPN-33") + an_fpn_40 = EnumValue(5495, "AN/FPN-40") + an_fpn_62 = EnumValue(5500, "AN/FPN-62") + an_fpn_66 = EnumValue(5502, "AN/FPN-66") + an_fps_8 = EnumValue(5503, "AN/FPS-8") + an_fpn_67 = EnumValue(5504, "AN/FPN-67") + an_fps_16 = EnumValue(5505, "AN/FPS-16") + an_fps_5 = EnumValue(5506, "AN/FPS-5") + an_fps_18 = EnumValue(5507, "AN/FPS-18") + an_fps_89 = EnumValue(5508, "AN/FPS-89") + an_fps_49 = EnumValue(5509, "AN/FPS-49") + an_fps_117 = EnumValue(5510, "AN/FPS-117") + an_fps_85 = EnumValue(5511, "AN/FPS-85") + an_fps_88 = EnumValue(5512, "AN/FPS-88") + an_fps_113 = EnumValue(5513, "AN/FPS-113") + an_fps_115 = EnumValue(5514, "AN/FPS-115") + an_fps_20r = EnumValue(5515, "AN/FPS-20R") + an_fps_132 = EnumValue(5516, "AN/FPS-132") + an_fps_77 = EnumValue(5520, "AN/FPS-77") + an_fps_41 = EnumValue(5521, "AN/FPS-41") + an_fps_100a = EnumValue(5522, "AN/FPS-100A") + an_fps_103 = EnumValue(5525, "AN/FPS-103") + an_fps_108 = EnumValue(5526, "AN/FPS-108") + an_gpn_12 = EnumValue(5527, "AN/GPN-12") + an_fps_124v = EnumValue(5528, "AN/FPS-124(V)") + an_fps_129 = EnumValue(5529, "AN/FPS-129") + an_gpx_6 = EnumValue(5530, "AN/GPX-6") + an_gpx_8 = EnumValue(5535, "AN/GPX 8") + an_grn_12 = EnumValue(5537, "AN/GRN-12") + an_mpn_14k = EnumValue(5538, "AN/MPN-14K") + an_mpn_14 = EnumValue(5539, "AN/MPN-14") + an_mpq_10 = EnumValue(5540, "AN/MPQ-10") + an_mpn_17 = EnumValue(5541, "AN/MPN-17") + an_mpq_33_39_46_57_61_hpir_ill = EnumValue(5545, "AN/MPQ-33/39/46/57/61 (HPIR) ILL") + an_mpq_34_48_55_62_cwar_ta = EnumValue(5550, "AN/MPQ-34/48/55/62 (CWAR) TA") + an_mpq_49 = EnumValue(5551, "AN/MPQ-49") + an_mpq_35_50_par_ta = EnumValue(5555, "AN/MPQ-35/50 (PAR) TA") + an_mpq_50c = EnumValue(5556, "AN/MPQ-50C") + an_mpq_37_51_ror_tt = EnumValue(5560, "AN/MPQ-37/51 (ROR) TT") + an_mpq_43 = EnumValue(5565, "AN/MPQ-43") + an_mpq_50 = EnumValue(5567, "AN/MPQ-50") + an_mpq_53 = EnumValue(5570, "AN/MPQ-53") + an_mpq_63 = EnumValue(5571, "AN/MPQ-63") + an_mpq_64 = EnumValue(5575, "AN/MPQ-64") + an_slq_32 = EnumValue(5576, "AN/SLQ-32") + an_mpq_65 = EnumValue(5577, "AN/MPQ-65") + an_slq_32v4 = EnumValue(5578, "AN/SLQ-32(V)4") + an_slq_32a = EnumValue(5579, "AN/SLQ-32A") + an_spg_34 = EnumValue(5580, "AN/SPG-34") + an_msq_104 = EnumValue(5582, "AN/MSQ-104") + an_mps_36 = EnumValue(5583, "AN/MPS-36") + an_slq_503 = EnumValue(5584, "AN/SLQ-503") + an_spg_48_mk_25_mod_3 = EnumValue(5620, "AN/SPG-48/MK 25 MOD 3") + an_spg_50 = EnumValue(5625, "AN/SPG-50") + an_spg_51 = EnumValue(5670, "AN/SPG-51") + an_ppq_2 = EnumValue(5690, "AN/PPQ-2") + an_pps_15 = EnumValue(5700, "AN/PPS-15") + an_pps_5 = EnumValue(5705, "AN/PPS-5") + an_pps_5d = EnumValue(5710, "AN/PPS-5D") + an_spg_51_cwi_ti = EnumValue(5715, "AN/SPG-51 CWI TI") + an_spg_51_fc = EnumValue(5760, "AN/SPG-51 FC") + an_spg_51c_d = EnumValue(5761, "AN/SPG-51C/D") + an_spg_52 = EnumValue(5805, "AN/SPG-52") + an_spg_53 = EnumValue(5850, "AN/SPG-53") + an_spg_55b = EnumValue(5895, "AN/SPG-55B") + an_spg_60 = EnumValue(5940, "AN/SPG-60") + an_spg_62 = EnumValue(5985, "AN/SPG-62") + an_spg_503 = EnumValue(5995, "AN/SPG-503") + an_spn_4 = EnumValue(6015, "AN/SPN-4") + an_spn_11 = EnumValue(6025, "AN/SPN-11") + an_spn_35 = EnumValue(6030, "AN/SPN-35") + an_spn_41 = EnumValue(6050, "AN/SPN-41") + an_spn_43 = EnumValue(6075, "AN/SPN-43") + an_spn_43a = EnumValue(6076, "AN/SPN-43A") + an_spn_43c = EnumValue(6078, "AN/SPN-43C") + an_spn_46 = EnumValue(6085, "AN/SPN-46") + an_spq_2 = EnumValue(6120, "AN/SPQ-2") + an_spq_5a = EnumValue(6155, "AN/SPQ-5A") + an_spq_9a = EnumValue(6165, "AN/SPQ-9A") + an_spq_9b = EnumValue(6166, "AN/SPQ-9B") + an_spq_34 = EnumValue(6190, "AN/SPQ-34") + an_sps_4 = EnumValue(6210, "AN/SPS-4") + an_sps_5 = EnumValue(6255, "AN/SPS-5") + an_sps_5c = EnumValue(6300, "AN/SPS-5C") + an_sps_6 = EnumValue(6345, "AN/SPS-6") + an_sps_10 = EnumValue(6390, "AN/SPS-10") + an_sps_21 = EnumValue(6435, "AN/SPS-21") + an_sps_28 = EnumValue(6480, "AN/SPS-28") + an_sps_37 = EnumValue(6525, "AN/SPS-37") + an_sps_39a = EnumValue(6570, "AN/SPS-39A") + an_sps_40 = EnumValue(6615, "AN/SPS-40") + an_sps_41 = EnumValue(6660, "AN/SPS-41") + an_sps_48 = EnumValue(6705, "AN/SPS-48") + an_sps_48c = EnumValue(6750, "AN/SPS-48C") + an_sps_48e = EnumValue(6752, "AN/SPS-48E") + an_sps_49 = EnumValue(6795, "AN/SPS-49") + an_sps_49v1 = EnumValue(6796, "AN/SPS-49(V)1") + an_sps_49v2 = EnumValue(6797, "AN/SPS-49(V)2") + an_sps_49v3 = EnumValue(6798, "AN/SPS-49(V)3") + an_sps_49v4 = EnumValue(6799, "AN/SPS-49(V)4") + an_sps_49v5 = EnumValue(6800, "AN/SPS-49(V)5") + an_sps_49v6 = EnumValue(6801, "AN/SPS-49(V)6") + an_sps_49v7 = EnumValue(6802, "AN/SPS-49(V)7") + an_sps_49v8 = EnumValue(6803, "AN/SPS-49(V)8") + an_sps_49av1 = EnumValue(6804, "AN/SPS-49A(V)1") + an_sps_52 = EnumValue(6840, "AN/SPS-52") + an_sps_53 = EnumValue(6885, "AN/SPS-53") + an_sps_55 = EnumValue(6930, "AN/SPS-55") + an_sps_52c = EnumValue(6945, "AN/SPS-52C") + an_sps_55_cs = EnumValue(6970, "AN/SPS-55 CS") + an_sps_55_ss = EnumValue(6975, "AN/SPS-55 SS") + an_sps_58 = EnumValue(7020, "AN/SPS-58") + an_sps_58c = EnumValue(7025, "AN/SPS-58C") + an_sps_59 = EnumValue(7065, "AN/SPS-59") + an_sps_64 = EnumValue(7110, "AN/SPS-64") + an_sps_64v9 = EnumValue(7119, "AN/SPS-64(V)9") + sps64v12 = EnumValue(7120, "SPS64(V)12") + an_sps_65 = EnumValue(7155, "AN/SPS-65") + an_sps_66 = EnumValue(7175, "AN/SPS-66") + an_sps_67 = EnumValue(7200, "AN/SPS-67") + an_sps_73i = EnumValue(7201, "AN/SPS-73(I)") + an_sps_69 = EnumValue(7210, "AN/SPS-69") + an_sps_73 = EnumValue(7215, "AN/SPS-73") + an_sps_74 = EnumValue(7216, "AN/SPS-74") + an_sps_88 = EnumValue(7225, "AN/SPS-88") + an_sps_501 = EnumValue(7226, "AN/SPS-501") + an_sps_505 = EnumValue(7230, "AN/SPS-505") + an_spy_1 = EnumValue(7245, "AN/SPY-1") + an_spy_1a = EnumValue(7250, "AN/SPY-1A") + an_spy_1b = EnumValue(7252, "AN/SPY-1B") + an_spy_1bv = EnumValue(7253, "AN/SPY-1B(V)") + an_spy_1d = EnumValue(7260, "AN/SPY-1D") + an_spy_1dv = EnumValue(7261, "AN/SPY-1D(V)") + an_spy_1f = EnumValue(7265, "AN/SPY-1F") + an_spy_3 = EnumValue(7266, "AN/SPY-3") + an_tpn_12 = EnumValue(7267, "AN/TPN-12") + an_spy_4 = EnumValue(7268, "AN/SPY-4") + an_tlq_32_arm_decoy = EnumValue(7269, "AN/TLQ-32 ARM Decoy") + an_tpn_17 = EnumValue(7270, "AN/TPN-17") + an_tpn_8 = EnumValue(7271, "AN/TPN-8") + an_tpn_22 = EnumValue(7272, "AN/TPN-22") + an_tlq_17a = EnumValue(7273, "AN/TLQ-17A") + an_tms_1 = EnumValue(7274, "AN/TMS-1") + an_tpn_24 = EnumValue(7275, "AN/TPN-24") + an_tpn_25 = EnumValue(7276, "AN/TPN-25") + an_tms_2 = EnumValue(7277, "AN/TMS-2") + an_tpn_19 = EnumValue(7278, "AN/TPN-19") + an_tpn_31 = EnumValue(7279, "AN/TPN-31") + an_tpq_18 = EnumValue(7280, "AN/TPQ-18") + an_spy_6v = EnumValue(7281, "AN/SPY-6(V)") + an_tpq_36 = EnumValue(7295, "AN/TPQ-36") + an_tpq_37 = EnumValue(7300, "AN/TPQ-37") + an_tpq_38_v8 = EnumValue(7301, "AN/TPQ-38 (V8)") + an_tpq_39v = EnumValue(7302, "AN/TPQ-39(V)") + an_tpq_47 = EnumValue(7303, "AN/TPQ-47") + an_tps_43 = EnumValue(7305, "AN/TPS-43") + an_tps_43e = EnumValue(7310, "AN/TPS-43E") + an_tpq_48 = EnumValue(7311, "AN/TPQ-48") + an_tpq_49 = EnumValue(7312, "AN/TPQ-49") + an_tpq_46a = EnumValue(7313, "AN/TPQ-46A") + an_tps_34 = EnumValue(7314, "AN/TPS-34") + an_tps_59 = EnumValue(7315, "AN/TPS-59") + an_tps_44 = EnumValue(7316, "AN/TPS-44") + an_tpq_50 = EnumValue(7317, "AN/TPQ-50") + an_tps_63 = EnumValue(7320, "AN/TPS-63") + an_tps_65 = EnumValue(7321, "AN/TPS-65") + an_tps_70_v_1 = EnumValue(7322, "AN/TPS-70 (V) 1") + an_tps_63ss = EnumValue(7323, "AN/TPS-63SS") + an_tps_73 = EnumValue(7324, "AN/TPS-73") + an_tps_75 = EnumValue(7325, "AN/TPS-75") + an_tps_77 = EnumValue(7326, "AN/TPS-77") + an_tps_78 = EnumValue(7327, "AN/TPS-78") + an_tps_79 = EnumValue(7328, "AN/TPS-79") + an_tps_703 = EnumValue(7329, "AN/TPS-703") + an_tpx_46v7 = EnumValue(7330, "AN/TPX-46(V)7") + an_tps_80 = EnumValue(7331, "AN/TPS-80") + an_tpy_2 = EnumValue(7333, "AN/TPY-2") + an_tsq_288 = EnumValue(7334, "AN/TSQ-288") + an_ulq_6a = EnumValue(7335, "AN/ULQ-6A") + an_ulq_19 = EnumValue(7340, "AN/ULQ-19") + an_ulq_21 = EnumValue(7345, "AN/ULQ-21") + an_upn_25 = EnumValue(7380, "AN/UPN 25") + an_ups_1 = EnumValue(7425, "AN/UPS 1") + an_ups_2 = EnumValue(7426, "AN/UPS-2") + an_ups_3 = EnumValue(7427, "AN/UPS-3") + an_upx_1 = EnumValue(7470, "AN/UPX 1") + an_upx_5 = EnumValue(7515, "AN/UPX 5") + an_upx_11 = EnumValue(7560, "AN/UPX 11") + an_upx_12 = EnumValue(7605, "AN/UPX 12") + an_upx_17 = EnumValue(7650, "AN/UPX 17") + an_upx_23 = EnumValue(7695, "AN/UPX 23") + an_usq_113v3 = EnumValue(7700, "AN/USQ-113(V)3") + an_vps_2 = EnumValue(7740, "AN/VPS 2") + an_plm_3 = EnumValue(7750, "AN/PLM-3") + an_plm_3a = EnumValue(7751, "AN/PLM-3A") + an_plm_4 = EnumValue(7752, "AN/PLM-4") + an_zpy1 = EnumValue(7753, "AN/ZPY1") + an_zpy_2_mp_rtip = EnumValue(7754, "AN/ZPY-2 MP-RTIP") + an_zpy_3 = EnumValue(7755, "AN/ZPY-3") + an_zpy_8 = EnumValue(7760, "AN/ZPY-8") + aorl_1as = EnumValue(7761, "AORL-1AS") + aorl_85k_tk_mta = EnumValue(7762, "AORL-85K/TK/MTA") + apar = EnumValue(7765, "APAR") + aparna = EnumValue(7770, "Aparna") + apecs_ii = EnumValue(7780, "APECS II") + commid_apelco_ad_7_7 = EnumValue(7785, "COMMID_Apelco AD 7 7") + apg_71 = EnumValue(7830, "APG 71") + apn_148 = EnumValue(7875, "APN 148") + apn_227 = EnumValue(7920, "APN 227") + apq_113 = EnumValue(7965, "APQ 113") + apq_120 = EnumValue(8010, "APQ 120") + apq_148 = EnumValue(8055, "APQ 148") + aps_504_v3 = EnumValue(8100, "APS 504 V3") + aquitaine_ii = EnumValue(8102, "AQUITAINE II") + ar_1 = EnumValue(8103, "AR-1") + ar_3d = EnumValue(8105, "AR 3D") + commid_plessey_ar_5 = EnumValue(8112, "COMMID_Plessey AR-5") + commid_ar_15 = EnumValue(8113, "COMMID_AR-15") + ar_15_2 = EnumValue(8114, "AR-15/2") + ar_320 = EnumValue(8115, "AR 320") + ar_325 = EnumValue(8118, "AR-325") + ar_327 = EnumValue(8120, "AR 327") + arbalet_52 = EnumValue(8121, "Arbalet-52") + arbb_31 = EnumValue(8122, "ARBB-31") + commid_arbb_33 = EnumValue(8123, "COMMID_ARBB 33") + commid_aries = EnumValue(8126, "COMMID_ARIES") + aries_nav = EnumValue(8127, "Aries-Nav") + aries_cs = EnumValue(8128, "Aries-CS") + args_14e = EnumValue(8134, "ARGS-14E") + args_31 = EnumValue(8135, "ARGS 31") + argus = EnumValue(8140, "ARGUS") + ar_m31 = EnumValue(8145, "AR M31") + arecibo = EnumValue(8150, "ARECIBO") + ared = EnumValue(8160, "ARED") + ari_5954 = EnumValue(8190, "ARI 5954") + ari_5955 = EnumValue(8235, "ARI 5955") + ari_5979 = EnumValue(8280, "ARI 5979") + argsn_31 = EnumValue(8281, "ARGSN-31") + argos_10 = EnumValue(8282, "ARGOS-10") + argos_800 = EnumValue(8283, "ARGOS-800") + ari_5983 = EnumValue(8284, "ARI 5983") + ari_5991 = EnumValue(8285, "ARI 5991") + ari_5995 = EnumValue(8290, "ARI 5995") + commid_arinc_564_bndx_king_rdr_1e = EnumValue(8325, "COMMID_ARINC 564 BNDX/KING RDR 1E") + commid_arinc_700_bndx_king_rdr_1e = EnumValue(8370, "COMMID_ARINC 700 BNDX/KING RDR 1E") + ark_1 = EnumValue(8375, "ARK-1") + commid_arl_m_mti = EnumValue(8378, "COMMID_ARL-M MTI") + armor = EnumValue(8379, "ARMOR") + arsr_3 = EnumValue(8380, "ARSR-3") + ars_400 = EnumValue(8381, "ARS-400") + arsr_1 = EnumValue(8382, "ARSR-1") + arsr_4 = EnumValue(8384, "ARSR-4") + arsr_18 = EnumValue(8390, "ARSR-18") + commid_arthur = EnumValue(8395, "COMMID_ARTHUR") + arthur_mod_b = EnumValue(8400, "ARTHUR MOD B") + arthur_mod_c = EnumValue(8405, "ARTHUR MOD C") + artisan_3d = EnumValue(8410, "ARTISAN 3D") + natoid_as_2_kipper = EnumValue(8415, "NATOID_AS 2 Kipper") + natoid_as_2_kipper_mh = EnumValue(8460, "NATOID_AS 2 Kipper MH") + as_3_yj_83k_mmw_mh = EnumValue(8470, "AS 3 YJ-83K mmW MH") + as34_kormoran_seeker = EnumValue(8480, "AS.34 Kormoran Seeker") + natoid_as_4_kitchen = EnumValue(8505, "NATOID_AS 4 Kitchen") + natoid_as_4_kitchen_mh = EnumValue(8550, "NATOID_AS 4 Kitchen MH") + natoid_as_5_kelt_mh = EnumValue(8595, "NATOID_AS 5 Kelt MH") + natoid_as_6_kingfish_mh = EnumValue(8640, "NATOID_AS 6 Kingfish MH") + natoid_as_7_kerry = EnumValue(8685, "NATOID_AS 7 Kerry") + natoid_as_7_kerry_mg = EnumValue(8730, "NATOID_AS 7 Kerry MG") + natoid_as_15_kent_altimeter = EnumValue(8735, "NATOID_AS 15 KENT altimeter") + natoid_as_17a_krypton_seeker = EnumValue(8736, "NATOID_AS-17A Krypton Seeker") + natoid_as_17b_krypton_seeker = EnumValue(8737, "NATOID_AS-17B Krypton Seeker") + commid_as901 = EnumValue(8750, "COMMID_AS901") + as901a = EnumValue(8751, "AS901A") + asars2 = EnumValue(8755, "ASARS2") + asde_kdd = EnumValue(8756, "ASDE-KDD") + aslesha = EnumValue(8757, "ASLESHA") + a_smgcs = EnumValue(8758, "A-SMGCS") + asmi_18x = EnumValue(8759, "ASMI-18X") + aspide_aam_sam_ill = EnumValue(8760, "Aspide AAM/SAM ILL") + asmi_3 = EnumValue(8761, "ASMI-3") + aselsan_mar = EnumValue(8762, "Aselsan MAR") + asr_2000 = EnumValue(8771, "ASR-2000") + asr_4 = EnumValue(8772, "ASR-4") + asr_4d = EnumValue(8773, "ASR-4D") + asr_o = EnumValue(8775, "ASR O") + asr_12 = EnumValue(8776, "ASR-12") + asr_22al = EnumValue(8778, "ASR-22AL") + asr_3 = EnumValue(8779, "ASR-3") + asr_5 = EnumValue(8780, "ASR-5") + asr_7 = EnumValue(8782, "ASR-7") + asr_8 = EnumValue(8785, "ASR-8") + asr_9 = EnumValue(8790, "ASR-9") + asr_9000 = EnumValue(8791, "ASR-9000") + asti = EnumValue(8792, "ASTI") + asr_11_dasr = EnumValue(8793, "ASR-11/DASR") + asr_12_2 = EnumValue(8795, "ASR-12") + commid_raytheon_asr_10ss = EnumValue(8812, "COMMID_Raytheon ASR-10SS") + asr_23ss = EnumValue(8816, "ASR-23SS") + arabel = EnumValue(8818, "Arabel") + commid_astre = EnumValue(8819, "COMMID_ASTRE") + natoid_at_2_swatter_mg = EnumValue(8820, "NATOID_AT 2 Swatter MG") + _9k114_shturm_mg = EnumValue(8824, "9K114 Shturm MG") + astor = EnumValue(8825, "ASTOR") + astra_rci = EnumValue(8826, "ASTRA RCI") + atcr_22 = EnumValue(8830, "ATCR-22") + atcr_22_m = EnumValue(8831, "ATCR-22 M") + atcr_2t = EnumValue(8832, "ATCR-2T") + atcr_33 = EnumValue(8840, "ATCR-33") + atcr_33_k_m = EnumValue(8845, "ATCR 33 K/M") + atcr_33s = EnumValue(8846, "ATCR-33S") + atcr_3t = EnumValue(8847, "ATCR-3T") + atcr_44 = EnumValue(8848, "ATCR-44") + atcr_44_k = EnumValue(8849, "ATCR-44 K") + commid_argos_73 = EnumValue(8850, "COMMID_Argos 73") + atcr_44_m_s = EnumValue(8851, "ATCR-44 M/S") + atcr_4t = EnumValue(8852, "ATCR-4T") + commid_atlas_elektronk_trs_n = EnumValue(8865, "COMMID_Atlas Elektronk TRS N") + atlas_8600x = EnumValue(8866, "ATLAS-8600X") + atlas_9600m = EnumValue(8867, "Atlas-9600M") + atlas_9600x = EnumValue(8868, "ATLAS-9600X") + atlas_9600s = EnumValue(8869, "ATLAS-9600S") + atlas_9740_vts = EnumValue(8870, "ATLAS-9740 VTS") + atlass = EnumValue(8871, "ATLASS") + atr_500c = EnumValue(8880, "ATR-500C") + avg_65 = EnumValue(8910, "AVG 65") + avh_7 = EnumValue(8955, "AVH 7") + avia_cm = EnumValue(8980, "AVIA CM") + avia_d = EnumValue(8985, "AVIA D") + commid_aviaconversia = EnumValue(8990, "COMMID_Aviaconversia") + commid_aviaconversia_ii = EnumValue(8993, "COMMID_Aviaconversia II") + commid_aviaconversia_iii = EnumValue(8995, "COMMID_Aviaconversia III") + avq_20 = EnumValue(9000, "AVQ 20") + avq_21 = EnumValue(9005, "AVQ-21") + avq30x = EnumValue(9045, "AVQ30X") + avq_50_rca = EnumValue(9075, "AVQ-50 (RCA)") + avq_70 = EnumValue(9090, "AVQ 70") + aws_5 = EnumValue(9135, "AWS 5") + aws_6 = EnumValue(9180, "AWS 6") + aws_6b_300 = EnumValue(9185, "AWS-6B/300") + b597z = EnumValue(9200, "B597Z") + b636z = EnumValue(9205, "B636Z") + natoid_back_board = EnumValue(9215, "NATOID_Back Board") + natoid_back_net_a_b = EnumValue(9225, "NATOID_Back Net A B") + natoid_back_trap = EnumValue(9270, "NATOID_Back Trap") + commid_bae_systems_rt_1805_apn = EnumValue(9280, "COMMID_BAE Systems RT-1805/APN") + baes_dass_2000_jammer = EnumValue(9281, "BAES DASS-2000 Jammer") + balance_beam = EnumValue(9285, "Balance Beam") + baltika_b = EnumValue(9300, "BALTIKA-B") + baltyk = EnumValue(9310, "BALTYK") + natoid_ball_end = EnumValue(9315, "NATOID_Ball End") + natoid_ball_gun = EnumValue(9360, "NATOID_Ball Gun") + natoid_ball_point = EnumValue(9370, "NATOID_BALL POINT") + natoid_band_stand = EnumValue(9405, "NATOID_Band Stand") + commid_band_stand_3 = EnumValue(9406, "COMMID_Band Stand 3") + p_35_37_a_p_50_b = EnumValue(9450, "P-35/37 ('A'); P-50 ('B')") + barax = EnumValue(9475, "BARAX") + basir_110d = EnumValue(9485, "BASIR-110D") + natoid_bass_tilt = EnumValue(9495, "NATOID_Bass Tilt") + badger = EnumValue(9505, "Badger") + barracuda_jammer = EnumValue(9510, "Barracuda Jammer") + bavar_373_ttr = EnumValue(9511, "Bavar-373 TTR") + bavar_373_tar = EnumValue(9512, "Bavar-373 TAR") + bavar_373_telar_ter = EnumValue(9520, "Bavar-373 TELAR TER") + baykal_countermeasures_suite = EnumValue(9530, "Baykal Countermeasures Suite") + natoid_beacon = EnumValue(9540, "NATOID_Beacon") + natoid_bean_sticks = EnumValue(9585, "NATOID_Bean Sticks") + natoid_bee_hind = EnumValue(9630, "NATOID_Bee Hind") + bell_nip_jammer = EnumValue(9638, "Bell Nip Jammer") + bell_push_jammer = EnumValue(9639, "Bell Push Jammer") + natoid_bell_crown_a = EnumValue(9640, "NATOID_Bell Crown A") + natoid_bell_crown_b = EnumValue(9642, "NATOID_Bell Crown B") + natoid_bell_squat = EnumValue(9643, "NATOID_Bell Squat") + natoid_big_back = EnumValue(9645, "NATOID_BIG BACK") + natoid_big_bird_a_b_c = EnumValue(9659, "NATOID_Big Bird A/B/C") + natoid_big_bird_d = EnumValue(9660, "NATOID_Big Bird D") + natoid_big_bird_d_mod = EnumValue(9661, "NATOID_Big Bird D Mod") + natoid_big_bird_e_91n6e = EnumValue(9662, "NATOID_Big Bird E 91N6E") + natoid_big_bulge = EnumValue(9675, "NATOID_Big Bulge") + natoid_big_bulge_a = EnumValue(9720, "NATOID_Big Bulge A") + natoid_big_bulge_b = EnumValue(9765, "NATOID_Big Bulge B") + commid_big_eye = EnumValue(9775, "COMMID_BIG EYE") + snar_10 = EnumValue(9780, "SNAR-10") + commid_big_head_b = EnumValue(9781, "COMMID_BIG HEAD B") + natoid_big_mesh = EnumValue(9810, "NATOID_Big Mesh") + natoid_big_net = EnumValue(9855, "NATOID_Big Net") + natoid_big_rest_b = EnumValue(9875, "NATOID_Big Rest B") + _9s15mt = EnumValue(9885, "9S15MT") + natoid_bill_fold = EnumValue(9900, "NATOID_Bill Fold") + blighter_400 = EnumValue(9903, "BLIGHTER 400") + blowpipe_mg = EnumValue(9905, "Blowpipe MG") + blr = EnumValue(9920, "BLR") + blue_fox = EnumValue(9930, "Blue Fox") + blue_kestrel = EnumValue(9933, "Blue Kestrel") + blue_vixen = EnumValue(9935, "Blue Vixen") + blue_silk = EnumValue(9945, "Blue Silk") + blue_parrot = EnumValue(9990, "Blue Parrot") + blue_orchid = EnumValue(10035, "Blue Orchid") + bm_djg_8715 = EnumValue(10057, "BM/DJG-8715") + natoid_boat_sail = EnumValue(10080, "NATOID_Boat Sail") + bor_a_550 = EnumValue(10090, "BOR-A 550") + commid_bofors_electronic_9lv_331 = EnumValue(10125, "COMMID_Bofors Electronic 9LV 331") + commid_bofors_ericsson_sea_giraffe_50_hc = EnumValue(10170, "COMMID_Bofors Ericsson Sea Giraffe 50 HC") + natoid_bowl_mesh = EnumValue(10215, "NATOID_Bowl Mesh") + natoid_box_brick = EnumValue(10260, "NATOID_Box Brick") + natoid_box_tail = EnumValue(10305, "NATOID_Box Tail") + bm_kg300g_jamming_pod = EnumValue(10308, "BM/KG300G Jamming Pod") + bm_kg600_jamming_pod = EnumValue(10310, "BM KG600 Jamming Pod") + bm_kg800_jamming_pod = EnumValue(10312, "BM KG800 Jamming Pod") + bm_kg_8601_8605_8606 = EnumValue(10315, "BM/KG 8601/8605/8606") + bps_11a = EnumValue(10350, "BPS 11A") + bps_14 = EnumValue(10395, "BPS 14") + bps_15a = EnumValue(10440, "BPS 15A") + br_3440ca_x57 = EnumValue(10450, "BR-3440CA-X57") + br_15_tokyo_keiki = EnumValue(10485, "BR-15 Tokyo KEIKI") + brahmos = EnumValue(10500, "BrahMos") + commid_bridgemaster = EnumValue(10510, "COMMID_BridgeMaster") + commid_bridgemaster_e_epa = EnumValue(10511, "COMMID_BridgeMaster E EPA") + commid_bridgemaster_e_ata_and_arpa = EnumValue(10512, "COMMID_BridgeMaster E ATA and ARPA") + commid_bridgemaster_e_naval = EnumValue(10513, "COMMID_BridgeMaster E naval") + brimstone_mmw_mh = EnumValue(10520, "Brimstone mmW MH") + natoid_bread_bin = EnumValue(10530, "NATOID_Bread Bin") + asr = EnumValue(10540, "Asr") + bt_271 = EnumValue(10575, "BT 271") + bu_304 = EnumValue(10595, "BU-304") + bx_732 = EnumValue(10620, "BX 732") + buk_mb = EnumValue(10630, "BUK-MB") + buran_d = EnumValue(10642, "Buran-D") + burevisnyk_1 = EnumValue(10650, "BUREVISNYK-1") + natoid_buzz_stand = EnumValue(10665, "NATOID_Buzz Stand") + c_5a_multi_mode_radar = EnumValue(10710, "C 5A Multi Mode Radar") + c_802_al = EnumValue(10711, "C-802 AL") + commid_caesar = EnumValue(10740, "COMMID_CAESAR") + caiman = EnumValue(10755, "Caiman") + natoid_cake_stand = EnumValue(10800, "NATOID_Cake Stand") + calypso_c61 = EnumValue(10845, "Calypso C61") + calypso_c63 = EnumValue(10846, "Calypso C63") + calypso_ii = EnumValue(10890, "Calypso Ii") + calypso_iii = EnumValue(10891, "Calypso III") + calypso_iv = EnumValue(10892, "Calypso IV") + commid_cardion_coastal = EnumValue(10895, "COMMID_Cardion Coastal") + castor_ii = EnumValue(10935, "Castor Ii") + castor_2j_tt_crotale_ng = EnumValue(10940, "Castor 2J TT (Crotale NG)") + natoid_cat_house = EnumValue(10980, "NATOID_Cat House") + cdr_431 = EnumValue(10985, "CDR-431") + ceafar = EnumValue(10987, "CEAFAR") + ceamount = EnumValue(10988, "CEAMOUNT") + ceafar2_l = EnumValue(10989, "CEAFAR2-L") + ceros_200 = EnumValue(10990, "CEROS 200") + ceros_200_cwi = EnumValue(10991, "CEROS 200 CWI") + ceatac = EnumValue(10992, "CEATAC") + ceaops = EnumValue(10993, "CEAOPS") + cerberus_iii = EnumValue(10994, "Cerberus III") + ch_ss_n_6 = EnumValue(10995, "CH/SS-N-6") + cerberus_iv = EnumValue(10996, "Cerberus IV") + natoid_chair_back_tt = EnumValue(11000, "NATOID_Chair Back TT") + natoid_chair_back_ill = EnumValue(11010, "NATOID_Chair Back ILL") + lemz_96l6 = EnumValue(11020, "LEMZ 96L6") + natoid_cheese_brick = EnumValue(11025, "NATOID_Cheese Brick") + natoid_cheese_cake = EnumValue(11030, "NATOID_Cheese Cake") + natoid_chrome_dome = EnumValue(11060, "NATOID_Chrome Dome") + leninetz_obzor_ms = EnumValue(11070, "Leninetz Obzor MS") + natoid_clamshell = EnumValue(11115, "NATOID_Clamshell") + clc_1 = EnumValue(11117, "CLC-1") + clc_2 = EnumValue(11118, "CLC-2") + clc_3 = EnumValue(11119, "CLC-3") + clr_155 = EnumValue(11120, "CLR-155") + coast_watcher_100 = EnumValue(11123, "COAST WATCHER 100") + coastal_giraffe = EnumValue(11125, "Coastal Giraffe") + cobra = EnumValue(11130, "COBRA") + cobra_shoe = EnumValue(11133, "Cobra Shoe") + colibri = EnumValue(11137, "Colibri") + commid_collins_wxr_300 = EnumValue(11155, "COMMID_Collins WXR-300") + commid_collins_wxr_700x = EnumValue(11160, "COMMID_Collins WXR-700X") + collins_twr_850 = EnumValue(11165, "Collins TWR-850") + commid_collins_dn_101 = EnumValue(11205, "COMMID_Collins DN 101") + natoid_comet_1 = EnumValue(11230, "NATOID_COMET-1") + condor_mk_2 = EnumValue(11235, "CONDOR MK 2") + commid_consilium_selesmar_rtm_25_xim = EnumValue(11240, "COMMID_Consilium Selesmar RTM 25 XIM") + commid_contraves_sea_hunter_mk_4 = EnumValue(11250, "COMMID_Contraves Sea Hunter MK 4") + natoid_corn_can = EnumValue(11260, "NATOID_Corn Can") + cosmo_skymed_1 = EnumValue(11265, "COSMO SKYMED-1") + cr_105_rmca = EnumValue(11270, "CR-105 RMCA") + crew_duke_2 = EnumValue(11280, "CREW Duke 2") + crew_duke_3 = EnumValue(11290, "CREW Duke 3") + natoid_cross_bird = EnumValue(11295, "NATOID_Cross Bird") + natoid_cross_dome = EnumValue(11340, "NATOID_Cross Dome") + natoid_cross_legs = EnumValue(11385, "NATOID_Cross Legs") + natoid_cross_out = EnumValue(11430, "NATOID_Cross Out") + natoid_cross_slot = EnumValue(11475, "NATOID_Cross Slot") + natoid_cross_sword = EnumValue(11520, "NATOID_Cross Sword") + natoid_cross_up = EnumValue(11565, "NATOID_Cross Up") + natoid_cross_sword_fc = EnumValue(11610, "NATOID_Cross Sword FC") + crotale_acquisition_ta = EnumValue(11655, "Crotale Acquisition TA") + crotale_ng_ta = EnumValue(11660, "Crotale NG TA") + crotale_tt = EnumValue(11665, "Crotale TT") + crotale_mgmissile_system = EnumValue(11700, "Crotale MGMissile System") + cs_10_ta = EnumValue(11715, "CS-10-TA") + natoid_csa_20_ter = EnumValue(11717, "NATOID_CSA-20 TER") + natoid_csa_20_tar = EnumValue(11718, "NATOID_CSA-20 TAR") + natoid_csa_23_fdv_mg = EnumValue(11719, "NATOID_CSA-23 FDV MG") + natoid_csa_23_missile_mh = EnumValue(11720, "NATOID_CSA-23 Missile MH") + csf_varan = EnumValue(11725, "CSF-Varan") + css_n_4_mh = EnumValue(11735, "CSS-N-4 MH") + css_c_3c_cas_1m1_m2_mh = EnumValue(11745, "CSS C 3C CAS 1M1 M2 MH") + hy_2b_mh = EnumValue(11748, "HY-2B MH") + css_c_2b_hy_1a_mh = EnumValue(11790, "CSS C 2B HY 1A MH") + css_n_4_sardine = EnumValue(11800, "CSS-N-4 Sardine") + css_n_8_saccade = EnumValue(11810, "CSS-N-8 Saccade") + natoid_curl_stone_b = EnumValue(11825, "NATOID_Curl Stone B") + cws_1 = EnumValue(11830, "CWS-1") + cws_2 = EnumValue(11835, "CWS 2") + cws_3 = EnumValue(11840, "CWS-3") + commid_cygnus = EnumValue(11860, "COMMID_Cygnus") + natoid_cylinder_head = EnumValue(11880, "NATOID_Cylinder Head") + cymbeline = EnumValue(11902, "Cymbeline") + cyrano_ii = EnumValue(11925, "Cyrano II") + cyrano_iv = EnumValue(11970, "Cyrano IV") + cyrano_iv_m = EnumValue(11975, "Cyrano IV-M") + da_01_00 = EnumValue(12010, "DA-01/00") + da_05_00 = EnumValue(12015, "DA 05 00") + da_05_2 = EnumValue(12016, "DA-05/2") + da08 = EnumValue(12018, "DA.08") + natoid_dawn = EnumValue(12060, "NATOID_Dawn") + dcr = EnumValue(12090, "DCR") + natoid_dead_duck = EnumValue(12105, "NATOID_Dead Duck") + commid_decca_20_v90_9 = EnumValue(12110, "COMMID_DECCA-20 V90/9") + commid_decca_20_v90s = EnumValue(12111, "COMMID_DECCA-20 V90S") + commid_decca_45 = EnumValue(12150, "COMMID_DECCA 45") + commid_decca_50 = EnumValue(12195, "COMMID_DECCA 50") + commid_decca_71 = EnumValue(12196, "COMMID_DECCA 71") + decca_72 = EnumValue(12197, "Decca 72") + commid_decca_110 = EnumValue(12240, "COMMID_DECCA 110") + commid_decca_170 = EnumValue(12285, "COMMID_DECCA 170") + commid_decca_hf_2 = EnumValue(12292, "COMMID_DECCA HF 2") + commid_decca_202 = EnumValue(12330, "COMMID_DECCA 202") + commid_decca_d202 = EnumValue(12375, "COMMID_DECCA D202") + commid_decca_303 = EnumValue(12420, "COMMID_DECCA 303") + commid_decca_535 = EnumValue(12430, "COMMID_DECCA 535") + commid_decca_626 = EnumValue(12465, "COMMID_DECCA 626") + commid_decca_629 = EnumValue(12510, "COMMID_DECCA 629") + commid_decca_914 = EnumValue(12555, "COMMID_DECCA 914") + commid_decca_916 = EnumValue(12600, "COMMID_DECCA 916") + commid_decca_926 = EnumValue(12610, "COMMID_DECCA 926") + commid_decca_1070a = EnumValue(12615, "COMMID_DECCA 1070A") + commid_decca_1008 = EnumValue(12616, "COMMID_Decca 1008") + commid_decca_1226_commercial = EnumValue(12645, "COMMID_DECCA 1226 Commercial") + commid_decca_1290 = EnumValue(12655, "COMMID_DECCA 1290") + commid_decca_1626 = EnumValue(12690, "COMMID_DECCA 1626") + commid_decca_2070 = EnumValue(12691, "COMMID_DECCA 2070") + commid_decca_1630 = EnumValue(12694, "COMMID_Decca 1630") + commid_decca_2459 = EnumValue(12735, "COMMID_DECCA 2459") + commid_decca_aws_1 = EnumValue(12780, "COMMID_DECCA AWS 1") + commid_decca_aws_2 = EnumValue(12782, "COMMID_DECCA AWS 2") + commid_decca_aws_4 = EnumValue(12785, "COMMID_DECCA AWS 4") + commid_decca_aws_4_2 = EnumValue(12787, "COMMID_DECCA AWS-4 (2)") + commid_decca_mar = EnumValue(12800, "COMMID_DECCA MAR") + commid_decca_rm_326 = EnumValue(12805, "COMMID_DECCA RM 326") + commid_decca_rm_416 = EnumValue(12825, "COMMID_DECCA RM 416") + decca_rm_970bt = EnumValue(12850, "DECCA RM 970BT") + commid_decca_rm_914 = EnumValue(12870, "COMMID_DECCA RM 914") + df_21d_seeker = EnumValue(12875, "DF-21D Seeker") + commid_decca_rm_1690 = EnumValue(12915, "COMMID_DECCA RM 1690") + commid_decca_1690 = EnumValue(12916, "COMMID_DECCA 1690") + commid_decca_super_101_mk_3 = EnumValue(12960, "COMMID_DECCA Super 101 MK 3") + diss_1 = EnumValue(13005, "DISS 1") + diss_7 = EnumValue(13006, "DISS-7") + diss_013 = EnumValue(13007, "DISS-013") + diss_15d = EnumValue(13015, "DISS-15D") + dld_100a = EnumValue(13020, "DLD-100A") + rapier_ttdn_181 = EnumValue(13050, "Rapier TTDN 181") + rapier_2000_tt = EnumValue(13055, "Rapier 2000 TT") + natoid_dog_ear = EnumValue(13095, "NATOID_Dog Ear") + natoid_dog_house = EnumValue(13140, "NATOID_Dog House") + dm3 = EnumValue(13141, "DM3") + dm_3b = EnumValue(13142, "DM-3B") + dm_5 = EnumValue(13143, "DM-5") + don_2 = EnumValue(13185, "Don 2") + natoid_don_a_b_2_kay = EnumValue(13230, "NATOID_Don A/B/2/Kay") + natoid_donets = EnumValue(13275, "NATOID_Donets") + commid_doppler_90_series = EnumValue(13280, "COMMID_Doppler 90 Series") + natoid_down_beat = EnumValue(13320, "NATOID_Down Beat") + dr_582 = EnumValue(13360, "DR-582") + draa_2a = EnumValue(13365, "DRAA 2A") + draa_2b = EnumValue(13410, "DRAA 2B") + draa_9a = EnumValue(13415, "DRAA 9A") + draa_11a = EnumValue(13420, "DRAA 11A") + drac_37b = EnumValue(13450, "DRAC 37B") + drac_38 = EnumValue(13452, "DRAC 38") + drac_39 = EnumValue(13455, "DRAC 39") + drac_39a = EnumValue(13456, "DRAC 39A") + drac_43a = EnumValue(13460, "DRAC 43A") + drac_44a = EnumValue(13465, "DRAC 44A") + natoid_dragon_eye = EnumValue(13477, "NATOID_Dragon Eye") + natoid_dragon_eye_2 = EnumValue(13480, "NATOID_Dragon Eye 2") + natoid_dragon_eye_3 = EnumValue(13481, "NATOID_Dragon Eye 3") + natoid_dragon_eye_4 = EnumValue(13485, "NATOID_Dragon Eye 4") + drbc_30b = EnumValue(13500, "DRBC 30B") + drbc_31a = EnumValue(13545, "DRBC 31A") + drbc_31d = EnumValue(13546, "DRBC-31D") + drbc_32 = EnumValue(13585, "DRBC-32") + drbc_32a = EnumValue(13590, "DRBC 32A") + drbc_32d = EnumValue(13635, "DRBC 32D") + drbc_33a = EnumValue(13680, "DRBC 33A") + drbi_10 = EnumValue(13725, "DRBI 10") + drbi_23 = EnumValue(13770, "DRBI 23") + drbj_11b = EnumValue(13815, "DRBJ 11B") + drbn_30 = EnumValue(13860, "DRBN 30") + drbn_32 = EnumValue(13905, "DRBN 32") + drbn_34 = EnumValue(13915, "DRBN 34") + drbr_51 = EnumValue(13950, "DRBR 51") + drbv_20a = EnumValue(13994, "DRBV-20A") + drbv_20b = EnumValue(13995, "DRBV 20B") + drbv_21_mars_05 = EnumValue(14020, "DRBV-21 Mars 05") + drbv_22 = EnumValue(14040, "DRBV 22") + drbv_23 = EnumValue(14041, "DRBV-23") + drbv_26c = EnumValue(14085, "DRBV 26C") + drbv_26d = EnumValue(14086, "DRBV 26D") + drbv_30 = EnumValue(14130, "DRBV 30") + drbv_31 = EnumValue(14131, "DRBV-31") + drbv_50 = EnumValue(14175, "DRBV 50") + drbv_51 = EnumValue(14220, "DRBV 51") + drbv_51a = EnumValue(14265, "DRBV 51A") + drbv_51b = EnumValue(14310, "DRBV 51B") + drbv_51c = EnumValue(14355, "DRBV 51C") + drop_kick = EnumValue(14400, "Drop Kick") + drua_31 = EnumValue(14445, "DRUA 31") + natoid_drum_tilt = EnumValue(14490, "NATOID_Drum Tilt") + natoid_drum_tilt_a = EnumValue(14535, "NATOID_Drum Tilt A") + natoid_drum_tilt_b = EnumValue(14545, "NATOID_Drum Tilt B") + drun_30a = EnumValue(14560, "DRUN 30A") + natoid_dumbo = EnumValue(14580, "NATOID_Dumbo") + dwsr_92 = EnumValue(14583, "DWSR-92") + dwsr_93s = EnumValue(14585, "DWSR-93S") + eagle = EnumValue(14586, "EAGLE") + eagle_mk_1 = EnumValue(14587, "EAGLE Mk 1") + eajp_jamming_pod = EnumValue(14588, "EAJP Jamming Pod") + ekco_e390 = EnumValue(14590, "EKCO E390") + ecr_90 = EnumValue(14600, "ECR-90") + ecr_90_jammer = EnumValue(14601, "ECR-90 Jammer") + natoid_egg_cup_a_b = EnumValue(14625, "NATOID_Egg Cup A/B") + eiscat = EnumValue(14640, "EISCAT") + ekco_e120 = EnumValue(14660, "EKCO E120") + ekco_190 = EnumValue(14670, "EKCO 190") + ekran_1 = EnumValue(14677, "Ekran-1") + el_l_8222 = EnumValue(14710, "EL/L-8222") + commid_el_l_8240 = EnumValue(14713, "COMMID_EL/L-8240") + el_m_2001b = EnumValue(14715, "EL M 2001B") + el_m_2022 = EnumValue(14725, "EL/M-2022") + el_m_2032 = EnumValue(14726, "EL/M-2032") + el_m_2052 = EnumValue(14727, "EL/M-2052") + el_m_2055 = EnumValue(14728, "EL/M-2055") + el_m_2060 = EnumValue(14730, "EL/M-2060") + el_m_2075 = EnumValue(14735, "EL/M-2075") + el_m_2022uv3 = EnumValue(14736, "EL/M-2022U(V)3") + el_m_2080 = EnumValue(14737, "EL/M-2080") + el_m_2080s = EnumValue(14738, "EL/M-2080S") + el_m_2085 = EnumValue(14739, "EL/M-2085") + el_m_2106 = EnumValue(14740, "EL/M-2106") + el_m_2106ng = EnumValue(14741, "EL/M-2106NG") + el_m_2125 = EnumValue(14742, "EL/M-2125") + el_m_2129 = EnumValue(14743, "EL/M-2129") + el_m_2150 = EnumValue(14744, "EL/M-2150") + el_m_2083 = EnumValue(14745, "EL/M-2083") + el_m_2084 = EnumValue(14746, "EL/M-2084") + el_m_2160_v1 = EnumValue(14747, "EL/M-2160-V1") + el_m_2084_mmr = EnumValue(14748, "EL/M-2084 MMR") + el_m_2112 = EnumValue(14749, "EL/M-2112") + el_m_2200 = EnumValue(14750, "EL/M-2200") + el_m_2133 = EnumValue(14751, "EL/M-2133") + el_m_2205 = EnumValue(14755, "EL/M-2205") + el_m_2207 = EnumValue(14760, "EL M 2207") + el_m_2215 = EnumValue(14765, "EL/M-2215") + natoid_el_m_2216v = EnumValue(14770, "NATOID_EL/M 2216(V)") + el_m_2216xh = EnumValue(14772, "EL/M-2216XH") + el_m_2218s = EnumValue(14775, "EL/M-2218S") + elt_361 = EnumValue(14776, "ELT-361") + el_m_2258 = EnumValue(14777, "EL/M-2258") + elt_553 = EnumValue(14779, "ELT-553") + elt_558 = EnumValue(14780, "ELT-558") + elt_572 = EnumValue(14785, "ELT-572") + elt_715 = EnumValue(14790, "ELT 715") + elta_elm_2022a = EnumValue(14800, "Elta ELM 2022A") + elta_el_m_2221_gm_stgr = EnumValue(14805, "ELTA EL/M 2221 GM STGR") + el_m_2228s_3d = EnumValue(14806, "EL/M-2228S/3D") + el_m_2705 = EnumValue(14807, "EL/M-2705") + el_m_2226 = EnumValue(14808, "EL/M-2226") + el_m_2228x = EnumValue(14809, "EL/M-2228X") + elta_sis = EnumValue(14810, "ELTA SIS") + el_m_2238 = EnumValue(14811, "EL/M-2238") + el_m_2248 = EnumValue(14815, "EL/M-2248") + el_m_2288 = EnumValue(14820, "EL/M-2288") + el_m_2311 = EnumValue(14821, "EL/M-2311") + elm_2026 = EnumValue(14822, "ELM-2026") + commid_elna_4007 = EnumValue(14830, "COMMID_ELNA 4007") + elt_318 = EnumValue(14831, "ELT/318") + elw_2085 = EnumValue(14832, "ELW-2085") + elt_521 = EnumValue(14833, "ELT/521") + elw_2090 = EnumValue(14835, "ELW-2090") + commid_enhanced_meteor_detection_radar_emdr = EnumValue(14845, "COMMID_Enhanced Meteor Detection Radar EMDR") + emd_2900 = EnumValue(14850, "EMD 2900") + empar = EnumValue(14851, "EMPAR") + natoid_end_tray = EnumValue(14895, "NATOID_End Tray") + eq_36 = EnumValue(14896, "EQ-36") + ericsson_slar = EnumValue(14897, "Ericsson SLAR") + erieye = EnumValue(14898, "Erieye") + commid_es_3701s_esm = EnumValue(14899, "COMMID_ES-3701S ESM") + esr_1 = EnumValue(14900, "ESR 1") + esr_220 = EnumValue(14901, "ESR 220") + esr380 = EnumValue(14902, "ESR380") + esterel = EnumValue(14903, "ESTEREL") + et_316 = EnumValue(14905, "ET-316") + exocet_type = EnumValue(14935, "Exocet Type") + exocet_al = EnumValue(14936, "Exocet AL") + exocet_1 = EnumValue(14940, "Exocet 1") + exocet_1_mh = EnumValue(14985, "Exocet 1 MH") + exocet_2 = EnumValue(15030, "Exocet 2") + natoid_eye_bowl = EnumValue(15075, "NATOID_Eye Bowl") + natoid_eye_shield = EnumValue(15120, "NATOID_Eye Shield") + natoid_f332z = EnumValue(15140, "NATOID_F332Z") + natoid_falcon_claw_ti = EnumValue(15155, "NATOID_Falcon Claw TI") + natoid_falcon_claw_tt = EnumValue(15156, "NATOID_Falcon Claw TT") + falcon = EnumValue(15160, "FALCON") + falcon_g = EnumValue(15161, "FALCON-G") + natoid_falcon_eye = EnumValue(15163, "NATOID_Falcon Eye") + natoid_fan_song_a = EnumValue(15165, "NATOID_Fan Song A") + natoid_fan_song_b_f_ta = EnumValue(15200, "NATOID_Fan Song B/F TA") + natoid_fan_song_b_f_tt = EnumValue(15210, "NATOID_Fan Song B/F TT") + natoid_fan_song_c_e_ta = EnumValue(15220, "NATOID_Fan Song C/E TA") + natoid_fan_song_c_e_tt = EnumValue(15230, "NATOID_Fan Song C/E TT") + natoid_fan_song_c_e_mg = EnumValue(15240, "NATOID_Fan Song C/E MG") + natoid_fan_song_b_ff_mg = EnumValue(15255, "NATOID_Fan Song B/FF MG") + natoid_fan_tail = EnumValue(15300, "NATOID_Fan Tail") + far_2117 = EnumValue(15301, "FAR-2117") + far_2827 = EnumValue(15302, "FAR-2827") + far_2837s = EnumValue(15303, "FAR-2837S") + commid_far_3000 = EnumValue(15304, "COMMID_FAR-3000") + fb_7_radar = EnumValue(15305, "FB-7 Radar") + fcr_1401 = EnumValue(15310, "FCR-1401") + fcs_2_12e = EnumValue(15312, "FCS-2-12E") + fcs_2_12g = EnumValue(15313, "FCS-2-12G") + fcs_2_21a = EnumValue(15315, "FCS-2-21A") + fcs_2_21c = EnumValue(15317, "FCS-2-21C") + fcs_2_22 = EnumValue(15318, "FCS-2-22") + fcs_2_31 = EnumValue(15319, "FCS-2-31") + fcs_3 = EnumValue(15320, "FCS-3") + natoid_fin_curve = EnumValue(15345, "NATOID_Fin Curve") + natoid_fire_can = EnumValue(15390, "NATOID_Fire Can") + natoid_fire_dish = EnumValue(15435, "NATOID_Fire Dish") + natoid_fire_dome_ta = EnumValue(15470, "NATOID_Fire Dome TA") + natoid_fire_dome_tt = EnumValue(15475, "NATOID_Fire Dome TT") + natoid_fire_dome_ti = EnumValue(15480, "NATOID_Fire Dome TI") + natoid_fire_iron = EnumValue(15525, "NATOID_Fire Iron") + natoid_fire_wheel = EnumValue(15570, "NATOID_Fire Wheel") + natoid_fish_bowl = EnumValue(15615, "NATOID_Fish Bowl") + fk_3 = EnumValue(15620, "FK-3") + flair = EnumValue(15650, "FLAIR") + natoid_flap_lid = EnumValue(15660, "NATOID_Flap Lid") + _30n6e = EnumValue(15661, "30N6E") + natoid_flap_truck = EnumValue(15705, "NATOID_Flap Truck") + natoid_flap_wheel = EnumValue(15750, "NATOID_Flap Wheel") + natoid_flash_dance = EnumValue(15795, "NATOID_Flash Dance") + natoid_flash_dance_m = EnumValue(15800, "NATOID_Flash Dance M") + p_15 = EnumValue(15840, "P-15") + _35n6 = EnumValue(15842, "35N6") + natoid_flat_screen = EnumValue(15885, "NATOID_Flat Screen") + natoid_flat_spin = EnumValue(15930, "NATOID_Flat Spin") + flat_track_jammer = EnumValue(15970, "Flat Track Jammer") + natoid_flat_twin = EnumValue(15975, "NATOID_Flat Twin") + fl_400 = EnumValue(15980, "FL-400") + fl_1800 = EnumValue(15985, "FL 1800") + fl_1800u = EnumValue(15990, "FL 1800U") + fl_1800s = EnumValue(16000, "FL 1800S") + fledermaus = EnumValue(16020, "Fledermaus") + natoid_flycatcher = EnumValue(16030, "NATOID_FLYCATCHER") + flycatcher_mk_2 = EnumValue(16035, "FLYCATCHER MK 2") + natoid_fly_screen = EnumValue(16065, "NATOID_Fly Screen") + natoid_fly_screen_aamp_b = EnumValue(16110, "NATOID_Fly Screen A&B") + natoid_fly_trap_b = EnumValue(16155, "NATOID_Fly Trap B") + fm_90 = EnumValue(16160, "FM-90") + natoid_fog_lamp_mg = EnumValue(16200, "NATOID_Fog Lamp MG") + natoid_fog_lamp_tt = EnumValue(16245, "NATOID_Fog Lamp TT") + natoid_foil_two = EnumValue(16290, "NATOID_Foil Two") + football = EnumValue(16300, "FootBall") + fox_hunter = EnumValue(16335, "Fox Hunter") + natoid_fox_fire_al = EnumValue(16380, "NATOID_Fox Fire AL") + natoid_fox_fire_ill = EnumValue(16390, "NATOID_Fox Fire ILL") + fr_151a = EnumValue(16400, "FR-151A") + commid_furuno_fr_1500_fr_1600 = EnumValue(16405, "COMMID_Furuno FR-1500/FR-1600") + fr_1505_da = EnumValue(16410, "FR-1505 DA") + fr_1510ds = EnumValue(16412, "FR-1510DS") + fr_2000 = EnumValue(16420, "FR-2000") + furuno_2855w = EnumValue(16421, "Furuno-2855W") + commid_fregat_mae = EnumValue(16422, "COMMID_Fregat MAE") + commid_fregat_n1 = EnumValue(16423, "COMMID_Fregat N1") + commid_fregat_n2 = EnumValue(16424, "COMMID_Fregat N2") + natoid_front_dome = EnumValue(16425, "NATOID_Front Dome") + fregat_mae_5 = EnumValue(16426, "Fregat MAE-5") + natoid_front_door = EnumValue(16470, "NATOID_Front Door") + natoid_front_piece = EnumValue(16515, "NATOID_Front Piece") + furby_mmw_mh = EnumValue(16520, "Furby mmW MH") + natoid_furke = EnumValue(16550, "NATOID_Furke") + furke_2_furke_e_positiv_me1 = EnumValue(16552, "Furke 2 (Furke-E, Positiv-ME1)") + furke_4 = EnumValue(16554, "Furke-4") + furuno = EnumValue(16560, "Furuno") + furuno_1721 = EnumValue(16561, "Furuno 1721") + commid_furuno_1934c = EnumValue(16564, "COMMID_Furuno 1934C") + commid_furuno_1715 = EnumValue(16565, "COMMID_Furuno 1715") + furuno_1730 = EnumValue(16580, "Furuno 1730") + furuno_1731_mark_3 = EnumValue(16581, "Furuno 1731 Mark 3") + furuno_1832 = EnumValue(16585, "Furuno 1832") + commid_furuno_1835 = EnumValue(16587, "COMMID_Furuno 1835") + furuno_1932 = EnumValue(16590, "Furuno 1932") + commid_furuno_1935 = EnumValue(16596, "COMMID_Furuno 1935") + furuno_701 = EnumValue(16605, "Furuno 701") + furuno_1940 = EnumValue(16606, "Furuno 1940") + furuno_711_2 = EnumValue(16650, "Furuno 711 2") + commid_furuno_fr_2130s = EnumValue(16652, "COMMID_Furuno FR-2130S") + furuno_far_2137s = EnumValue(16654, "Furuno FAR-2137S") + furuno_far_28x7 = EnumValue(16655, "Furuno FAR-28X7") + commid_furuno_far_3230s = EnumValue(16658, "COMMID_Furuno FAR-3230S") + fr_2110 = EnumValue(16660, "FR-2110") + fr_2115 = EnumValue(16662, "FR-2115") + fr_8062 = EnumValue(16663, "FR-8062") + furuno_2125 = EnumValue(16670, "Furuno 2125") + furuno_240 = EnumValue(16690, "Furuno 240") + furuno_2400 = EnumValue(16695, "Furuno 2400") + fr_801d = EnumValue(16725, "FR-801D") + furuno_8051 = EnumValue(16730, "Furuno 8051") + commid_furuno_drs_2d = EnumValue(16732, "COMMID_Furuno DRS-2D") + commid_furuno_drs_4d = EnumValue(16733, "COMMID_Furuno DRS-4D") + commid_furuno_drs_4a = EnumValue(16734, "COMMID_Furuno DRS-4A") + g030aapd_31 = EnumValue(16735, "G030A(APD-31)") + commid_furuno_drs6a_x_class = EnumValue(16736, "COMMID_Furuno DRS6A X-Class") + commid_drs4w = EnumValue(16737, "COMMID_DRS4W") + ga_01_00 = EnumValue(16740, "GA 01 00") + gabbiano = EnumValue(16750, "Gabbiano") + natoid_gage = EnumValue(16785, "NATOID_Gage") + gaofen_3 = EnumValue(16787, "Gaofen-3") + gaofen_12 = EnumValue(16789, "GAOFEN-12") + gap_gate = EnumValue(16790, "GAP GATE") + natoid_gardenia = EnumValue(16800, "NATOID_Gardenia") + commid_garmin_gmr_1224 = EnumValue(16815, "COMMID_Garmin GMR 1224") + commid_garmin_fantom_24 = EnumValue(16820, "COMMID_Garmin Fantom 24") + garmin_gwx_68_weather_radar = EnumValue(16825, "Garmin GWX 68 Weather Radar") + natoid_garpin = EnumValue(16830, "NATOID_Garpin") + natoid_gate_guard = EnumValue(16833, "NATOID_Gate Guard") + garpun_bal_e = EnumValue(16835, "Garpun-Bal-E") + gazetchik = EnumValue(16837, "Gazetchik") + gbs1 = EnumValue(16840, "GBS1") + gca_2000 = EnumValue(16850, "GCA-2000") + commid_furuno_1832_1921_series = EnumValue(16858, "COMMID_Furuno 1832/1921 Series") + commid_gemini_db = EnumValue(16870, "COMMID_GEMINI-DB") + commid_gem_olympus = EnumValue(16871, "COMMID_GEM Olympus") + commid_gem_sentinel = EnumValue(16872, "COMMID_GEM Sentinel") + gem_bx_132 = EnumValue(16875, "GEM BX 132") + gem_sc_2050x = EnumValue(16876, "GEM SC-2050X") + commid_gem_sea_eagle_200_n = EnumValue(16877, "COMMID_GEM Sea Eagle 200 N") + commid_generic_internal_jammer = EnumValue(16879, "COMMID_Generic Internal Jammer") + mpdr_12 = EnumValue(16880, "MPDR-12") + gen_x = EnumValue(16881, "GEN-X") + natoid_gepard_tt = EnumValue(16884, "NATOID_Gepard TT") + geran_f = EnumValue(16888, "GERAN-F") + gerfaut = EnumValue(16890, "GERFAUT") + gfel1 = EnumValue(16895, "GFE(L)1") + giraffe = EnumValue(16900, "GIRAFFE") + giraffe_1x = EnumValue(16903, "GIRAFFE 1X") + giraffe_40 = EnumValue(16905, "Giraffe-40") + giraffe_50_at = EnumValue(16908, "Giraffe-50 AT") + giraffe_75 = EnumValue(16912, "Giraffe 75") + natoid_gin_sling_ta = EnumValue(16915, "NATOID_Gin Sling TA") + gin_sling = EnumValue(16920, "Gin Sling") + natoid_gin_sling_mg = EnumValue(16925, "NATOID_Gin Sling MG") + goal_keeper = EnumValue(16930, "Goal Keeper") + natoid_golden_dome = EnumValue(16935, "NATOID_Golden Dome") + natoid_golden_heart = EnumValue(16940, "NATOID_Golden Heart") + natoid_golden_rock = EnumValue(16942, "NATOID_Golden Rock") + natoid_gory_mh = EnumValue(16943, "NATOID_Gory MH") + gpn_22 = EnumValue(16945, "GPN-22") + gpsj_10 = EnumValue(16946, "GPSJ-10") + gpsj_25 = EnumValue(16947, "GPSJ-25") + gpsj_40 = EnumValue(16948, "GPSJ-40") + gpsj_50 = EnumValue(16949, "GPSJ-50") + grn_9 = EnumValue(16950, "GRN-9") + gran_k = EnumValue(16951, "GRAN-K") + natoid_grackle_mh = EnumValue(16953, "NATOID_Grackle MH") + natoid_grave_stone = EnumValue(16960, "NATOID_Grave Stone") + graves = EnumValue(16963, "GRAVES") + green_stain = EnumValue(16965, "Green Stain") + natoid_grid_bow = EnumValue(17010, "NATOID_Grid Bow") + grifo_f = EnumValue(17016, "Grifo-F") + _9s32 = EnumValue(17025, "9S32") + natoid_grill_screen = EnumValue(17027, "NATOID_GRILL SCREEN") + grom_2 = EnumValue(17029, "Grom-2") + ground_master_400 = EnumValue(17030, "GROUND MASTER 400") + gt_4 = EnumValue(17031, "GT-4") + grs_440 = EnumValue(17032, "GRS 440") + natoid_gruesome_mh = EnumValue(17034, "NATOID_Gruesome MH") + guardian = EnumValue(17050, "GUARDIAN") + guardsman = EnumValue(17055, "Guardsman") + rpk_2 = EnumValue(17070, "RPK-2") + natoid_gusher_mh = EnumValue(17072, "NATOID_Gusher MH") + h_rjz_726_4a_jammer = EnumValue(17075, "H/RJZ-726-4A Jammer") + h025_no25e = EnumValue(17079, "H025 (NO25E)") + hadr = EnumValue(17080, "HADR") + natoid_hair_net = EnumValue(17100, "NATOID_Hair Net") + natoid_half_plate_a = EnumValue(17145, "NATOID_Half Plate A") + natoid_half_plate_b = EnumValue(17190, "NATOID_Half Plate B") + hard = EnumValue(17220, "HARD") + harpoon = EnumValue(17225, "Harpoon") + natoid_hat_box = EnumValue(17230, "NATOID_Hat Box") + natoid_hawk_screech = EnumValue(17235, "NATOID_Hawk Screech") + natoid_hay_pole = EnumValue(17250, "NATOID_Hay Pole") + natoid_hay_rick = EnumValue(17255, "NATOID_Hay Rick") + natoid_head_light_a = EnumValue(17280, "NATOID_Head Light A") + natoid_head_lights = EnumValue(17325, "NATOID_Head Lights") + natoid_head_lights_c = EnumValue(17370, "NATOID_Head Lights C") + natoid_head_lights_mg_a = EnumValue(17415, "NATOID_Head Lights MG A") + natoid_head_lights_mg_b = EnumValue(17460, "NATOID_Head Lights MG B") + natoid_head_lights_tt = EnumValue(17505, "NATOID_Head Lights TT") + natoid_head_net = EnumValue(17550, "NATOID_Head Net") + natoid_heart_ache_b = EnumValue(17572, "NATOID_Heart Ache B") + hellfire_mmw_mh = EnumValue(17590, "Hellfire mmW MH") + natoid_hen_egg = EnumValue(17595, "NATOID_Hen Egg") + natoid_hen_house = EnumValue(17640, "NATOID_Hen House") + natoid_hen_nest = EnumValue(17685, "NATOID_Hen Nest") + natoid_hen_roost = EnumValue(17730, "NATOID_Hen Roost") + commid_herakles = EnumValue(17732, "COMMID_Herakles") + hf_2_mg = EnumValue(17735, "HF-2 MG") + hgr_105 = EnumValue(17745, "HGR-105") + herz_9_tar = EnumValue(17750, "Herz-9 TAR") + herz_9_ttr = EnumValue(17751, "Herz-9 TTR") + herz_9_mg = EnumValue(17752, "Herz-9 MG") + natoid_high_brick = EnumValue(17775, "NATOID_High Brick") + natoid_high_fix = EnumValue(17820, "NATOID_High Fix") + ylc_2v = EnumValue(17842, "YLC-2V") + natoid_high_lark_ti = EnumValue(17865, "NATOID_High Lark TI") + natoid_high_lark_1 = EnumValue(17910, "NATOID_High Lark 1") + natoid_high_lark_2 = EnumValue(17955, "NATOID_High Lark 2") + natoid_high_lark_4 = EnumValue(18000, "NATOID_High Lark 4") + natoid_high_lune = EnumValue(18045, "NATOID_High Lune") + natoid_high_pole_aamp_b = EnumValue(18090, "NATOID_High Pole A&B") + natoid_high_scoop = EnumValue(18135, "NATOID_High Scoop") + _9s19mt = EnumValue(18150, "9S19MT") + natoid_high_sieve = EnumValue(18180, "NATOID_High Sieve") + natoid_hill_block = EnumValue(18185, "NATOID_Hill Block") + himalayas_countermeasures_suite = EnumValue(18189, "Himalayas Countermeasures Suite") + commid_hg_9550 = EnumValue(18190, "COMMID_HG-9550") + hj_6374 = EnumValue(18193, "HJ-6374") + commid_hld_radar_900 = EnumValue(18194, "COMMID_HLD-RADAR 900") + hljq_520 = EnumValue(18195, "HLJQ-520") + hn_503 = EnumValue(18200, "HN-503") + hn_c03_m = EnumValue(18201, "HN-C03-M") + natoid_home_talk = EnumValue(18225, "NATOID_Home Talk") + natoid_horn_spoon = EnumValue(18270, "NATOID_Horn Spoon") + natoid_hot_brick = EnumValue(18280, "NATOID_Hot Brick") + natoid_hot_flash = EnumValue(18315, "NATOID_Hot Flash") + natoid_hot_flash_2 = EnumValue(18316, "NATOID_Hot Flash 2") + ihs_6 = EnumValue(18318, "IHS-6") + irl144m = EnumValue(18320, "IRL144M") + irl144m_2 = EnumValue(18325, "IRL144M") + irl144m_3 = EnumValue(18330, "IRL144M") + hps_106 = EnumValue(18331, "HPS-106") + hps_104 = EnumValue(18332, "HPS-104") + hq_9_mh = EnumValue(18339, "HQ-9 MH") + commid_hsr_1128 = EnumValue(18340, "COMMID_HSR-1128") + hq_9a_ter = EnumValue(18342, "HQ-9A TER") + hq_9b_ter = EnumValue(18344, "HQ-9B TER") + ht_233 = EnumValue(18348, "HT-233") + hq_61 = EnumValue(18350, "HQ-61") + hrjs = EnumValue(18351, "HRJS") + i_derby_er = EnumValue(18352, "I-Derby ER") + ibis_80 = EnumValue(18353, "IBIS-80") + ibis_150 = EnumValue(18355, "IBIS-150") + ibis_200 = EnumValue(18357, "IBIS-200") + hq_16_ter = EnumValue(18359, "HQ-16 TER") + iff_mk_xii_aims_upx_29 = EnumValue(18360, "IFF MK XII AIMS UPX 29") + commid_janet = EnumValue(18400, "COMMID_Janet") + iff_mk_xv = EnumValue(18405, "IFF MK XV") + iff_int = EnumValue(18406, "IFF INT") + natoid_jack_knife = EnumValue(18407, "NATOID_Jack Knife") + iff_trsp = EnumValue(18408, "IFF TRSP") + j_music_elbit_systems_jammer = EnumValue(18409, "J-MUSIC Elbit Systems Jammer") + javelin_mg = EnumValue(18410, "Javelin MG") + igla_1_slar = EnumValue(18411, "Igla-1 SLAR") + natoid_ir_sa_2b_ter = EnumValue(18415, "NATOID_IR-SA-2B TER") + natoid_ir_sa_4_ter = EnumValue(18417, "NATOID_IR-SA-4 TER") + natoid_ir_sa_5_telar_ter = EnumValue(18419, "NATOID_IR-SA-5 TELAR TER") + j_10b_pesa = EnumValue(18420, "J-10B PESA") + j_10c_aesa = EnumValue(18421, "J-10C AESA") + j_11d_aesa = EnumValue(18422, "J-11D AESA") + jl_10mp = EnumValue(18443, "JL-10MP") + j_alq_8 = EnumValue(18445, "J/ALQ-8") + j_fps_7 = EnumValue(18449, "J/FPS-7") + natoid_jay_bird = EnumValue(18450, "NATOID_Jay Bird") + j_fps_3 = EnumValue(18451, "J/FPS-3") + jh_10 = EnumValue(18452, "JH-10") + j_mpq_p7 = EnumValue(18453, "J/MPQ-P7") + jl_7 = EnumValue(18454, "JL-7") + jl_10b = EnumValue(18455, "JL-10B") + jma_1576 = EnumValue(18456, "JMA 1576") + jrc_jma_9252_6ca = EnumValue(18457, "JRC JMA-9252-6CA") + jlp_40 = EnumValue(18458, "JLP-40") + jrc_jmr_9200_series_x = EnumValue(18459, "JRC JMR-9200 Series X") + jrc_nmd_401 = EnumValue(18460, "JRC-NMD-401") + jrc_jrm_310_mk2 = EnumValue(18461, "JRC JRM 310 MK2") + jma_1596 = EnumValue(18462, "JMA 1596") + jn_1104 = EnumValue(18463, "JN-1104") + jma_7000 = EnumValue(18464, "JMA 7000") + jrc_jma_7700 = EnumValue(18465, "JRC JMA 7700") + jma_5320 = EnumValue(18466, "JMA 5320") + jrc_jmr_9210_6xc = EnumValue(18467, "JRC JMR-9210-6XC") + jers_1 = EnumValue(18468, "JERS-1") + jindalee = EnumValue(18469, "JINDALEE") + jrc_jma_9900_series = EnumValue(18470, "JRC JMA-9900 series") + jlp_40d = EnumValue(18471, "JLP-40D") + jrc_jma_5300_series = EnumValue(18475, "JRC JMA-5300 series") + jupiter = EnumValue(18495, "Jupiter") + jupiter_ii = EnumValue(18540, "Jupiter II") + jy_8 = EnumValue(18550, "JY-8") + jy_8a = EnumValue(18551, "JY-8A") + jy_9 = EnumValue(18555, "JY-9") + jy_9_modified = EnumValue(18556, "JY-9 Modified") + jy_11_ew = EnumValue(18557, "JY-11 EW") + jy_14 = EnumValue(18560, "JY-14") + jy_14a = EnumValue(18561, "JY-14A") + jy_16 = EnumValue(18565, "JY-16") + jy_24 = EnumValue(18570, "JY-24") + j_apg_1 = EnumValue(18571, "J/APG-1") + j_apg_2 = EnumValue(18572, "J/APG-2") + jy_29 = EnumValue(18575, "JY-29") + jyl_1 = EnumValue(18578, "JYL-1") + jyl_6 = EnumValue(18580, "JYL-6") + jyl_6a = EnumValue(18582, "JYL-6A") + jz_qf_612 = EnumValue(18583, "JZ/QF-612") + natoid_k376z = EnumValue(18585, "NATOID_K376Z") + k77m = EnumValue(18586, "K77M") + kaige = EnumValue(18600, "Kaige") + kalkan = EnumValue(18610, "KALKAN") + kbp_afganit = EnumValue(18611, "KBP Afganit") + kalkan_ii = EnumValue(18615, "KALKAN II") + commid_kelvin_hughes_2a = EnumValue(18630, "COMMID_Kelvin Hughes 2A") + commid_kelvin_hughes_14_9 = EnumValue(18675, "COMMID_Kelvin Hughes 14/9") + natoid_karpaty = EnumValue(18700, "NATOID_Karpaty") + kashtan_3_jamming_system = EnumValue(18710, "Kashtan-3 Jamming System") + commid_kelvin_hughes_type_1006 = EnumValue(18720, "COMMID_Kelvin Hughes type 1006") + commid_kelvin_hughes_type_1007 = EnumValue(18765, "COMMID_Kelvin Hughes type 1007") + commid_kelvin_hughes_type_1007_f_band = EnumValue(18766, "COMMID_Kelvin Hughes Type 1007 F Band") + commid_kelvin_hughes_2007_f_band = EnumValue(18767, "COMMID_Kelvin Hughes 2007 F Band") + commid_kelvin_hughes_2007_i_band = EnumValue(18768, "COMMID_Kelvin Hughes 2007 I Band") + commid_kh_nucleus_5000 = EnumValue(18770, "COMMID_KH Nucleus 5000") + commid_kh_manta = EnumValue(18774, "COMMID_KH MANTA") + commid_kh_nucleus_2_6000 = EnumValue(18775, "COMMID_KH NUCLEUS 2 6000") + commid_kh_nucleus_3_5000 = EnumValue(18776, "COMMID_KH NUCLEUS 3 5000") + commid_kh_nucleus_3_6000a = EnumValue(18777, "COMMID_KH NUCLEUS 3 6000A") + kh_family = EnumValue(18780, "KH Family") + commid_kelvin_hughes_6000a = EnumValue(18781, "COMMID_Kelvin Hughes 6000A") + kh_38mae_mh = EnumValue(18782, "Kh-38MAE MH") + kg8605a = EnumValue(18784, "KG8605A") + kh_902m = EnumValue(18785, "KH-902M") + khorom_k = EnumValue(18786, "KHOROM-K") + khibiny = EnumValue(18787, "KHIBINY") + kg300e = EnumValue(18789, "KG300E") + commid_kh_sharpeye = EnumValue(18790, "COMMID_KH SharpEye") + commid_kh_sharp_eye_b = EnumValue(18791, "COMMID_KH Sharp Eye B") + commid_kh_sharp_eye_c = EnumValue(18792, "COMMID_KH Sharp Eye C") + kh_1700 = EnumValue(18795, "KH 1700") + natoid_king_pin = EnumValue(18797, "NATOID_King Pin") + _3rd_khordad_telar_tir = EnumValue(18800, "3rd Khordad TELAR TIR") + _3rd_khordad_tar = EnumValue(18801, "3rd Khordad TAR") + _15th_khordad_ter = EnumValue(18803, "15th Khordad TER") + kg_300 = EnumValue(18805, "KG-300") + natoid_kite_screech = EnumValue(18810, "NATOID_Kite Screech") + natoid_kite_screech_a = EnumValue(18855, "NATOID_Kite Screech A") + natoid_kite_screech_b = EnumValue(18900, "NATOID_Kite Screech B") + klc_3b = EnumValue(18930, "KLC-3B") + kj_500_nanjing_radar = EnumValue(18944, "KJ-500 Nanjing Radar") + natoid_kivach = EnumValue(18945, "NATOID_Kivach") + kj_500_jammer = EnumValue(18946, "KJ-500 Jammer") + klc_1 = EnumValue(18947, "KLC-1") + klj_1 = EnumValue(18948, "KLJ-1") + klj_3_type_1473 = EnumValue(18950, "KLJ-3 (Type 1473)") + klj_4 = EnumValue(18951, "KLJ-4") + klj_4b = EnumValue(18952, "KLJ-4B") + klj_5 = EnumValue(18955, "KLJ-5") + klj_7 = EnumValue(18960, "KLJ-7") + klj_7b = EnumValue(18961, "KLJ-7B") + klj_7a = EnumValue(18962, "KLJ-7A") + natoid_knife_rest = EnumValue(18990, "NATOID_Knife Rest") + p_10 = EnumValue(19035, "P-10") + natoid_knife_rest_c = EnumValue(19037, "NATOID_KNIFE REST C") + commid_koden_md_3730 = EnumValue(19039, "COMMID_Koden MD 3730") + kj_2000 = EnumValue(19040, "KJ-2000") + commid_koden_mdc_900 = EnumValue(19041, "COMMID_KODEN MDC-900") + koopol = EnumValue(19042, "Koopol") + kopyo_i = EnumValue(19045, "KOPYO-I") + kr_75 = EnumValue(19050, "KR-75") + kronos = EnumValue(19051, "KRONOS") + kredo_1e = EnumValue(19052, "KREDO-1E") + krasukha_2 = EnumValue(19053, "Krasukha-2") + kronos_grand_naval = EnumValue(19054, "KRONOS GRAND NAVAL") + krm_66e = EnumValue(19060, "KRM-66E") + krtz_125_2m = EnumValue(19065, "KRTZ-125-2M") + ksa_srn = EnumValue(19080, "KSA SRN") + ksa_tsr = EnumValue(19125, "KSA TSR") + ks_1a_phased_array = EnumValue(19127, "KS-1A PHASED ARRAY") + ks418 = EnumValue(19129, "KS418") + ks418e = EnumValue(19130, "KS418E") + kz100 = EnumValue(19131, "KZ100") + kz900 = EnumValue(19132, "KZ900") + l175v = EnumValue(19140, "L175V") + l370_5_president_s_jammer = EnumValue(19142, "L370-5 President-S Jammer") + l_415 = EnumValue(19143, "L-415") + l_88 = EnumValue(19145, "L-88") + laads = EnumValue(19150, "LAADS") + natoid_land_fall = EnumValue(19170, "NATOID_Land Fall") + natoid_land_roll_mg = EnumValue(19215, "NATOID_Land Roll MG") + natoid_land_roll_ta = EnumValue(19260, "NATOID_Land Roll TA") + natoid_land_roll_tt = EnumValue(19305, "NATOID_Land Roll TT") + lazur = EnumValue(19306, "LAZUR") + model_791_a = EnumValue(19307, "Model 791-A") + lap_3000 = EnumValue(19309, "LAP-3000") + lc_150 = EnumValue(19310, "LC-150") + leer_3 = EnumValue(19320, "LEER-3") + natoid_leg_drive = EnumValue(19330, "NATOID_Leg Drive") + leninetz_v_004 = EnumValue(19340, "Leninetz V-004") + natoid_leningraf = EnumValue(19350, "NATOID_Leningraf") + liana = EnumValue(19370, "LIANA") + natoid_light_bulb = EnumValue(19395, "NATOID_Light Bulb") + lira_a10 = EnumValue(19396, "LIRA-A10") + lirod_8 = EnumValue(19397, "LIROD 8") + lirod_mk_ii = EnumValue(19398, "LIROD MK II") + llx05k = EnumValue(19399, "LLX05K") + lmt_nrai_6a = EnumValue(19400, "LMT NRAI-6A") + ln_55 = EnumValue(19440, "LN 55") + natoid_ln_66 = EnumValue(19485, "NATOID_Ln 66") + natoid_liman = EnumValue(19500, "NATOID_Liman") + natoid_liman_2 = EnumValue(19505, "NATOID_Liman 2") + lockheed_vigilance = EnumValue(19520, "Lockheed Vigilance") + natoid_long_bow = EnumValue(19530, "NATOID_Long Bow") + natoid_long_brick = EnumValue(19575, "NATOID_Long Brick") + natoid_long_bull = EnumValue(19620, "NATOID_Long Bull") + natoid_long_eye = EnumValue(19665, "NATOID_Long Eye") + natoid_long_head = EnumValue(19710, "NATOID_Long Head") + natoid_long_talk = EnumValue(19755, "NATOID_Long Talk") + natoid_long_track = EnumValue(19800, "NATOID_Long Track") + natoid_long_trough = EnumValue(19845, "NATOID_Long Trough") + natoid_look_two = EnumValue(19890, "NATOID_Look Two") + lopar = EnumValue(19920, "LOPAR") + loran = EnumValue(19935, "LORAN") + natoid_low_blow_ta = EnumValue(19950, "NATOID_Low Blow TA") + natoid_low_blow_tt = EnumValue(19955, "NATOID_Low Blow TT") + natoid_low_blow_mg = EnumValue(19960, "NATOID_Low Blow MG") + natoid_low_jack_tt = EnumValue(19970, "NATOID_Low Jack TT") + natoid_low_jack_mg = EnumValue(19971, "NATOID_Low Jack MG") + natoid_low_sieve = EnumValue(19980, "NATOID_Low Sieve") + natoid_low_trough = EnumValue(20025, "NATOID_Low Trough") + lr66 = EnumValue(20029, "LR66") + lra_900 = EnumValue(20030, "LRA-900") + trs_2050 = EnumValue(20040, "TRS-2050") + lw_01 = EnumValue(20060, "LW 01") + lw_08 = EnumValue(20070, "LW 08") + natoid_m_1983_fcr = EnumValue(20090, "NATOID_M-1983 FCR") + m22_40 = EnumValue(20115, "M22-40") + m44 = EnumValue(20160, "M44") + natoid_m401z = EnumValue(20205, "NATOID_M401Z") + natoid_m585z = EnumValue(20250, "NATOID_M585Z") + natoid_m588z = EnumValue(20295, "NATOID_M588Z") + ma_1_iff_portion = EnumValue(20340, "MA 1 IFF Portion") + mad_hack = EnumValue(20350, "MAD HACK") + natoid_mareld = EnumValue(20360, "NATOID_MARELD") + commid_ma_type_909 = EnumValue(20385, "COMMID_MA Type 909#") + marc_s_152 = EnumValue(20420, "MARC S-152") + commid_marconi_1810 = EnumValue(20430, "COMMID_Marconi 1810") + commid_marconi_canada_hc_75 = EnumValue(20475, "COMMID_Marconi Canada HC 75") + commid_marconi_s_713 = EnumValue(20495, "COMMID_Marconi S 713") + commid_marconi_s_1802 = EnumValue(20520, "COMMID_Marconi S 1802") + commid_marconi_s247 = EnumValue(20530, "COMMID_Marconi S247") + commid_marconi_s_810 = EnumValue(20565, "COMMID_Marconi S 810") + commid_marconi_sa_10 = EnumValue(20585, "COMMID_Marconi SA 10") + marconi_st801 = EnumValue(20589, "MARCONI ST801") + commid_marconi_st805 = EnumValue(20590, "COMMID_Marconi ST805") + commid_marconi_type_967 = EnumValue(20610, "COMMID_Marconi type 967") + commid_marconi_type_968 = EnumValue(20655, "COMMID_Marconi type 968") + commid_marconi_type_992 = EnumValue(20700, "COMMID_Marconi type 992") + commid_marconi_signaal_type_1022 = EnumValue(20745, "COMMID_Marconi/signaal type 1022") + commid_marconi_signaal_type_910 = EnumValue(20790, "COMMID_Marconi/signaal type 910") + commid_marconi_signaal_type_911 = EnumValue(20835, "COMMID_Marconi/signaal type 911") + commid_marconi_signaal_type_992r = EnumValue(20880, "COMMID_Marconi/signaal type 992R") + martello_743d = EnumValue(20890, "MARTELLO 743D") + martello_s_723a = EnumValue(20895, "MARTELLO S-723A") + master_a = EnumValue(20897, "MASTER-A") + mbda_flaads_m_sea_ceptor_jammer = EnumValue(20898, "MBDA FLAADS-M (Sea Ceptor) Jammer") + melco_3 = EnumValue(20915, "MELCO-3") + melodi = EnumValue(20917, "MELODI") + merlin = EnumValue(20918, "MERLIN") + meraj_4_ascension = EnumValue(20919, "Meraj-4 (Ascension)") + commid_northrop_grumman_mesa = EnumValue(20920, "COMMID_Northrop Grumman MESA") + natoid_mesh_brick = EnumValue(20925, "NATOID_Mesh Brick") + meteor_1500s = EnumValue(20927, "METEOR 1500S") + meteor_200 = EnumValue(20929, "METEOR 200") + meteor_50dx = EnumValue(20930, "METEOR 50DX") + meteor_300 = EnumValue(20931, "METEOR 300") + meteor_bvraam = EnumValue(20933, "Meteor BVRAAM") + mfr = EnumValue(20935, "MFR") + mfsr_2100_45 = EnumValue(20940, "MFSR 2100/45") + mica_mh = EnumValue(20942, "MICA MH") + mica_rf = EnumValue(20943, "MICA-RF") + mineral_me = EnumValue(20945, "Mineral-ME") + mirage_ill = EnumValue(20950, "Mirage ILL") + miysis_jammer = EnumValue(20955, "Miysis Jammer") + mk_15_phalanx_blk_0 = EnumValue(20969, "MK 15 (Phalanx BLK 0)") + commid_mk_15_ciws = EnumValue(20970, "COMMID_MK 15 CIWS") + mk_23 = EnumValue(21015, "MK-23") + mk_23_tas = EnumValue(21060, "MK 23 TAS") + mk_25 = EnumValue(21105, "MK 25") + mk_25_mod_3 = EnumValue(21110, "Mk-25 Mod-3") + mk_25_mod_7 = EnumValue(21130, "Mk 25 Mod 7") + mk_35_m2 = EnumValue(21150, "MK-35 M2") + mk_92 = EnumValue(21195, "MK 92") + mk_92_cas = EnumValue(21240, "MK-92 CAS") + mk_92_stir = EnumValue(21285, "MK-92 STIR") + mk_95 = EnumValue(21330, "MK 95") + mks_818 = EnumValue(21332, "MKS-818") + mla_1 = EnumValue(21340, "MLA-1") + mm_apq_706 = EnumValue(21359, "MM/APQ-706") + mm_950 = EnumValue(21360, "MM 950") + mm_aps_705 = EnumValue(21375, "MM APS 705") + mm_aps_784 = EnumValue(21390, "MM/APS-784") + mm_spg_73_rtn_12x = EnumValue(21419, "MM/SPG-73 (RTN-12X)") + mm_spg_74 = EnumValue(21420, "MM SPG 74") + mm_spg_75 = EnumValue(21465, "MM SPG 75") + mm_spn_703 = EnumValue(21490, "MM SPN 703") + mm_spn_730 = EnumValue(21492, "MM SPN 730") + mm_spn_753b = EnumValue(21495, "MM SPN-753B") + mm_spq_3 = EnumValue(21500, "MM/SPQ-3") + mm_sps_702 = EnumValue(21510, "MM SPS 702") + mm_sps_768 = EnumValue(21555, "MM SPS 768") + mm_sps_774 = EnumValue(21600, "MM SPS 774") + mm_sps_791_ran_30x = EnumValue(21610, "MM/SPS-791 (RAN-30X)") + mm_sps_794_ran_21s = EnumValue(21615, "MM SPS-794 (RAN-21S)") + mm_sps_798_ran_40l = EnumValue(21620, "MM/SPS-798 (RAN-40L)") + mmsr = EnumValue(21623, "MMSR") + model_17c = EnumValue(21625, "Model-17C") + moon_4 = EnumValue(21645, "Moon 4") + natoid_moon_pie = EnumValue(21646, "NATOID_Moon Pie") + moon_cone = EnumValue(21647, "MOON CONE") + natoid_moon_rack = EnumValue(21648, "NATOID_Moon Rack") + moon_face = EnumValue(21649, "MOON FACE") + natoid_mmrs = EnumValue(21650, "NATOID_MMRS") + natoid_moon_shade = EnumValue(21651, "NATOID_Moon Shade") + model_360 = EnumValue(21655, "Model 360") + model_378 = EnumValue(21660, "Model 378") + model_970 = EnumValue(21661, "Model-970") + model_974 = EnumValue(21665, "Model 974") + monolit_b = EnumValue(21672, "MONOLIT-B") + natoid_monument = EnumValue(21675, "NATOID_Monument") + natoid_mouse = EnumValue(21680, "NATOID_Mouse") + mp_411_esm = EnumValue(21682, "MP-411 ESM") + mpdr_18_s = EnumValue(21685, "MPDR 18/S") + mpdr_18_x = EnumValue(21690, "MPDR 18 X") + mpdr_45_e = EnumValue(21692, "MPDR 45/E") + mr_231_1 = EnumValue(21693, "MR-231-1") + mr_231_3 = EnumValue(21694, "MR-231-3") + mpr = EnumValue(21695, "MPR") + commid_mr_231_4 = EnumValue(21696, "COMMID_MR-231-4") + mps_1 = EnumValue(21697, "MPS-1") + commid_mr_36b = EnumValue(21698, "COMMID_MR-36B") + natoid_mr_231_mod = EnumValue(21699, "NATOID_MR-231 MOD") + mr_1600 = EnumValue(21700, "MR-1600") + mrr = EnumValue(21701, "MRR") + mr35 = EnumValue(21702, "MR35") + mr36 = EnumValue(21703, "MR36") + mrl_1 = EnumValue(21704, "MRL-1") + mrl_4 = EnumValue(21705, "MRL-4") + mrl_5 = EnumValue(21706, "MRL-5") + msam = EnumValue(21707, "MSAM") + mr_36a = EnumValue(21708, "MR-36A") + mstar = EnumValue(21709, "MSTAR") + mt_305x = EnumValue(21710, "MT-305X") + mr_10m1e = EnumValue(21711, "MR-10M1E") + mr_90 = EnumValue(21712, "MR-90") + mrk_411 = EnumValue(21715, "MRK-411") + mr_320m_topaz_v = EnumValue(21716, "MR-320M Topaz-V") + msp_418k = EnumValue(21720, "MSP-418K") + natoid_muff_cob = EnumValue(21735, "NATOID_Muff Cob") + mushroom = EnumValue(21780, "Mushroom") + mushroom_1 = EnumValue(21825, "Mushroom 1") + mushroom_2 = EnumValue(21870, "Mushroom 2") + natoid_mushroom_3 = EnumValue(21871, "NATOID_Mushroom 3") + n_23 = EnumValue(21872, "N-23") + n_011m_bars = EnumValue(21873, "N-011M Bars") + n_011m_bars_b = EnumValue(21874, "N-011M Bars-B") + n_011m_bars_c = EnumValue(21875, "N-011M Bars-C") + n_011m_bars_r = EnumValue(21876, "N-011M Bars-R") + n035_irbis_e = EnumValue(21877, "N035 Irbis-E") + n036_byelka = EnumValue(21878, "N036 Byelka") + n_25 = EnumValue(21879, "N-25") + n920z = EnumValue(21880, "N920Z") + n001v = EnumValue(21881, "N001V") + n001ve = EnumValue(21882, "N001VE") + n001vep = EnumValue(21883, "N001VEP") + nacos_radarpilot_platinum = EnumValue(21884, "NACOS RADARPILOT Platinum") + natoid_nampo_b = EnumValue(21885, "NATOID_Nampo B") + nagira = EnumValue(21886, "NAGIRA") + natoid_nanjing_b = EnumValue(21890, "NATOID_Nanjing B") + natoid_nanjing_c = EnumValue(21895, "NATOID_Nanjing C") + nayada = EnumValue(21915, "Nayada") + nayada_5m = EnumValue(21917, "NAYADA-5M") + nayada_5pv = EnumValue(21918, "NAYADA-5PV") + nebo_m = EnumValue(21919, "NEBO-M") + nebo_svu = EnumValue(21920, "Nebo-SVU") + neptun = EnumValue(21960, "Neptun") + nettuno_4100 = EnumValue(21965, "Nettuno 4100") + nike_hercules_mtr = EnumValue(21970, "NIKE HERCULES MTR") + natoid_nike_tt = EnumValue(21980, "NATOID_NIKE TT") + northrop_grumman_mfew_jammer = EnumValue(21981, "Northrop Grumman MFEW Jammer") + norinco_3d = EnumValue(21982, "NORINCO 3D") + nj_81e = EnumValue(21983, "NJ-81E") + normandie = EnumValue(21984, "Normandie") + nrj_6a = EnumValue(21985, "NRJ-6A") + nostradamus = EnumValue(21986, "NOSTRADAMUS") + npg_1240 = EnumValue(21987, "NPG-1240") + npg_1460 = EnumValue(21988, "NPG-1460") + npg_434 = EnumValue(21989, "NPG-434") + npg_630 = EnumValue(21990, "NPG-630") + npm_510 = EnumValue(21991, "NPM-510") + natoid_nut_can = EnumValue(21992, "NATOID_Nut Can") + np_vega_liana = EnumValue(21995, "NP Vega Liana") + novella_nv170 = EnumValue(22000, "Novella NV1.70") + novella_p_38 = EnumValue(22001, "Novella-P-38") + nrba_50 = EnumValue(22005, "NRBA 50") + nrba_51 = EnumValue(22050, "NRBA 51") + nrbf_20a = EnumValue(22095, "NRBF 20A") + nrj_5 = EnumValue(22110, "NRJ-5") + commid_ns_9005 = EnumValue(22115, "COMMID_NS-9005") + ns_100_series = EnumValue(22125, "NS-100 Series") + nur_31 = EnumValue(22127, "NUR-31") + nws_3 = EnumValue(22130, "NWS-3") + natoid_nysa_b = EnumValue(22140, "NATOID_Nysa B") + natoid_o524a = EnumValue(22185, "NATOID_O524A") + natoid_o580b = EnumValue(22230, "NATOID_O580B") + natoid_o625z = EnumValue(22275, "NATOID_O625Z") + natoid_o626z = EnumValue(22320, "NATOID_O626Z") + ocean_master = EnumValue(22335, "Ocean Master") + commid_ocean_master_400 = EnumValue(22340, "COMMID_Ocean Master 400") + natoid_odd_group = EnumValue(22345, "NATOID_Odd Group") + natoid_odd_lot = EnumValue(22365, "NATOID_Odd Lot") + natoid_odd_pair = EnumValue(22410, "NATOID_Odd Pair") + natoid_odd_rods = EnumValue(22411, "NATOID_Odd Rods") + natoid_oka = EnumValue(22455, "NATOID_Oka") + ofogh = EnumValue(22460, "OFOGH") + ofogh_3 = EnumValue(22463, "OFOGH-3") + okean = EnumValue(22500, "OKEAN") + okean_a = EnumValue(22505, "OKEAN A") + okinxe_12c = EnumValue(22545, "OKINXE 12C") + oko = EnumValue(22560, "OKO") + omega = EnumValue(22590, "OMEGA") + omera_orb32 = EnumValue(22635, "Omera ORB32") + omul = EnumValue(22640, "OMUL") + natoid_one_eye = EnumValue(22680, "NATOID_One Eye") + op_28 = EnumValue(22690, "OP-28") + oprl_4 = EnumValue(22695, "OPRL-4") + oprm_71 = EnumValue(22696, "OPRM-71") + ops_9 = EnumValue(22697, "OPS-9") + ops_11_b_c = EnumValue(22700, "OPS-11 B/C") + ops_12 = EnumValue(22701, "OPS-12") + ops_14b = EnumValue(22705, "OPS-14B") + ops_14c = EnumValue(22706, "OPS-14C") + ops_16b = EnumValue(22725, "OPS-16B") + ops_18 = EnumValue(22730, "OPS-18") + ops_19 = EnumValue(22732, "OPS-19") + ops_20 = EnumValue(22735, "OPS-20") + ops_22 = EnumValue(22736, "OPS-22") + ops_24 = EnumValue(22737, "OPS-24") + ops_28 = EnumValue(22740, "OPS-28") + ops_28c = EnumValue(22745, "OPS-28C") + ops_39 = EnumValue(22750, "OPS-39") + optima_32 = EnumValue(22760, "OPTIMA 3.2") + natoid_or_2 = EnumValue(22770, "NATOID_OR-2") + orb_31d = EnumValue(22800, "ORB-31D") + orb_31s = EnumValue(22810, "ORB-31S") + orb_32 = EnumValue(22815, "ORB 32") + orb_42 = EnumValue(22830, "ORB-42") + orion_rtn_10x = EnumValue(22860, "Orion Rtn 10X") + surface_wave_over_the_horizon = EnumValue(22890, "Surface Wave (Over The Horizon)") + otomat_mk_1 = EnumValue(22900, "Otomat MK 1") + otomat_mk_ii_teseo = EnumValue(22905, "Otomat MK II Teseo") + otomat_series_al = EnumValue(22906, "Otomat Series AL") + natoid_owl_screech = EnumValue(22950, "NATOID_Owl Screech") + p360z = EnumValue(22955, "P360Z") + p_14 = EnumValue(22956, "P-14") + p_180u = EnumValue(22957, "P-180U") + p_18_2 = EnumValue(22959, "P-18-2") + pa_1660 = EnumValue(22960, "PA-1660") + p_18m = EnumValue(22961, "P-18M") + p_190u = EnumValue(22962, "P-190U") + p_30 = EnumValue(22963, "P-30") + p_18_mod = EnumValue(22964, "P-18 MOD") + p_35m = EnumValue(22965, "P-35M") + page = EnumValue(22970, "PAGE") + natoid_paint_box = EnumValue(22977, "NATOID_Paint Box") + natoid_palm_frond = EnumValue(22995, "NATOID_Palm Frond") + natoid_modified_paint_box = EnumValue(22998, "NATOID_Modified Paint Box") + natoid_palm_frond_ab = EnumValue(23040, "NATOID_Palm Frond AB") + pandora = EnumValue(23041, "Pandora") + palsar_2 = EnumValue(23042, "PALSAR-2") + pantsir_sm_tar = EnumValue(23043, "Pantsir-SM TAR") + par_2 = EnumValue(23045, "PAR-2") + pantsir_s1_2rl80_tar = EnumValue(23046, "Pantsir-S1 2RL80 TAR") + pantsir_s1_1rs2_1_tt = EnumValue(23047, "Pantsir-S1 1RS2-1 TT") + par_2000 = EnumValue(23050, "PAR-2000") + par_2090c = EnumValue(23053, "PAR-2090C") + par_80 = EnumValue(23055, "PAR-80") + natoid_pat_hand_tt = EnumValue(23085, "NATOID_Pat Hand TT") + natoid_pat_hand_mg = EnumValue(23095, "NATOID_Pat Hand MG") + patriot = EnumValue(23100, "PATRIOT") + natoid_patty_cake = EnumValue(23130, "NATOID_Patty Cake") + natoid_pawn_cake = EnumValue(23175, "NATOID_Pawn Cake") + pbr_4_rubin = EnumValue(23220, "PBR 4 Rubin") + pcs_514 = EnumValue(23240, "PCS 514") + natoid_pea_sticks = EnumValue(23265, "NATOID_Pea Sticks") + pechora_sc = EnumValue(23295, "Pechora SC") + natoid_peel_cone = EnumValue(23310, "NATOID_Peel Cone") + natoid_peel_group = EnumValue(23355, "NATOID_Peel Group") + natoid_peel_group_a = EnumValue(23400, "NATOID_Peel Group A") + natoid_peel_group_b = EnumValue(23445, "NATOID_Peel Group B") + natoid_peel_group_mg = EnumValue(23450, "NATOID_Peel Group MG") + natoid_peel_pair = EnumValue(23490, "NATOID_Peel Pair") + natoid_pelena = EnumValue(23500, "NATOID_Pelena") + pgz07 = EnumValue(23515, "PGZ07") + phalanx = EnumValue(23525, "Phalanx") + phazotron_gukol_4 = EnumValue(23529, "Phazotron Gukol-4") + phazotron_zhuk_a_ae = EnumValue(23530, "Phazotron Zhuk-A/AE") + commid_philips_9lv_200 = EnumValue(23535, "COMMID_Philips 9LV 200") + commid_philips_9lv_331 = EnumValue(23580, "COMMID_Philips 9LV 331") + commid_philips_lv_223 = EnumValue(23625, "COMMID_Philips LV 223") + commid_philips_sea_giraffe_50_hc = EnumValue(23670, "COMMID_Philips Sea Giraffe 50 HC") + phimat_jammer = EnumValue(23675, "Phimat Jammer") + picosar = EnumValue(23680, "PICOSAR") + commid_pilot_mk2 = EnumValue(23685, "COMMID_PILOT MK2") + natoid_pin_jib = EnumValue(23690, "NATOID_Pin Jib") + natoid_pin_tip = EnumValue(23695, "NATOID_Pin Tip") + pl_11 = EnumValue(23700, "PL-11") + pl_12 = EnumValue(23701, "PL-12") + pl_15 = EnumValue(23704, "PL-15") + natoid_plank_shad = EnumValue(23710, "NATOID_Plank Shad") + natoid_plank_shave = EnumValue(23715, "NATOID_Plank Shave") + natoid_plank_shave_a = EnumValue(23760, "NATOID_Plank Shave A") + natoid_plank_shave_b = EnumValue(23805, "NATOID_Plank Shave B") + natoid_plate_steer = EnumValue(23850, "NATOID_Plate Steer") + commid_plessey_aws_1 = EnumValue(23895, "COMMID_Plessey AWS 1") + commid_plessey_aws_2 = EnumValue(23925, "COMMID_Plessey AWS-2") + commid_plessey_aws_4 = EnumValue(23940, "COMMID_Plessey AWS 4") + commid_plessey_aws_6 = EnumValue(23985, "COMMID_Plessey AWS 6") + commid_plessey_rj = EnumValue(23990, "COMMID_Plessey RJ") + commid_plessey_type_904 = EnumValue(24020, "COMMID_Plessey Type 904") + commid_plessey_type_996 = EnumValue(24030, "COMMID_Plessey type 996") + plessey_aws_9 = EnumValue(24035, "Plessey AWS 9") + natoid_plinth_net = EnumValue(24075, "NATOID_Plinth Net") + natoid_pluto = EnumValue(24095, "NATOID_Pluto") + pna_b_rubin_down_beat = EnumValue(24098, "PNA-B Rubin / Down Beat") + pohjanpalo = EnumValue(24100, "POHJANPALO") + poliment_k = EnumValue(24110, "Poliment-K") + pollux = EnumValue(24120, "POLLUX") + polozhennya_2 = EnumValue(24130, "Polozhennya-2") + natoid_pop_group = EnumValue(24165, "NATOID_Pop Group") + natoid_pop_group_mg = EnumValue(24210, "NATOID_Pop Group MG") + natoid_pop_group_ta = EnumValue(24255, "NATOID_Pop Group TA") + natoid_pop_group_tt = EnumValue(24300, "NATOID_Pop Group TT") + natoid_pork_fist = EnumValue(24320, "NATOID_Pork Fist") + natoid_pork_trough = EnumValue(24345, "NATOID_Pork Trough") + pozitiv_me1_5p_26 = EnumValue(24385, "Pozitiv-ME1 5P-26") + positive_me12 = EnumValue(24386, "Positive-ME1.2") + pozitiv_mk = EnumValue(24387, "Pozitiv-MK") + natoid_post_bow = EnumValue(24390, "NATOID_Post Bow") + natoid_post_lamp = EnumValue(24435, "NATOID_Post Lamp") + natoid_pot_drum = EnumValue(24480, "NATOID_Pot Drum") + natoid_pot_head = EnumValue(24525, "NATOID_Pot Head") + natoid_pot_shot = EnumValue(24535, "NATOID_Pot Shot") + praetorian_countermeasures_suite = EnumValue(24540, "Praetorian Countermeasures Suite") + primus_30a = EnumValue(24569, "PRIMUS 30A") + primus_40_wxd = EnumValue(24570, "PRIMUS 40 WXD") + primus_400 = EnumValue(24614, "Primus 400") + primus_300sl = EnumValue(24615, "PRIMUS 300SL") + primus_500 = EnumValue(24616, "Primus 500") + primus_650 = EnumValue(24617, "Primus 650") + primus_700 = EnumValue(24618, "Primus 700") + primus_800 = EnumValue(24619, "PRIMUS 800") + commid_primus_3000 = EnumValue(24620, "COMMID_Primus 3000") + primus_870 = EnumValue(24622, "Primus 870") + prora = EnumValue(24630, "PRORA") + prs_2 = EnumValue(24631, "PRS-2") + prs_3_argon_2 = EnumValue(24633, "PRS-3 Argon-2") + prora_pa_1660 = EnumValue(24635, "PRORA PA-1660") + ps_15 = EnumValue(24640, "PS-15") + ps_05a = EnumValue(24650, "PS-05A") + ps_46_a = EnumValue(24660, "PS 46 A") + ps_70_r = EnumValue(24705, "PS 70 R") + ps_171_r = EnumValue(24706, "PS-171/R") + ps_860 = EnumValue(24707, "PS-860") + ps_870 = EnumValue(24709, "PS-870") + ps_890 = EnumValue(24710, "PS-890") + psm_33 = EnumValue(24720, "PSM-33") + natoid_puff_ball = EnumValue(24750, "NATOID_Puff Ball") + quadradar_vi = EnumValue(24755, "Quadradar VI") + qw_1a = EnumValue(24757, "QW-1A") + phazotron_1rs2_1e = EnumValue(24758, "Phazotron 1RS2-1E") + pvs_200 = EnumValue(24760, "PVS-200") + pvs_2000 = EnumValue(24761, "PVS 2000") + r_330zh = EnumValue(24768, "R-330ZH") + r_045 = EnumValue(24769, "R 045") + r_76 = EnumValue(24770, "R-76") + r_934b = EnumValue(24771, "R-934B") + ra_20 = EnumValue(24772, "RA-20") + ra723 = EnumValue(24774, "RA723") + r41xxx = EnumValue(24775, "R41XXX") + rac_3d = EnumValue(24776, "RAC-3D") + commid_rac_30 = EnumValue(24780, "COMMID_RAC-30") + r_423am = EnumValue(24781, "R-423AM") + raad_1_ter = EnumValue(24785, "Raad-1 TER") + raad_2_ter = EnumValue(24787, "Raad-2 TER") + commid_racal_1229 = EnumValue(24795, "COMMID_Racal 1229") + decca_1230 = EnumValue(24800, "DECCA 1230") + commid_racal_ac_2690_bt = EnumValue(24840, "COMMID_Racal AC 2690 BT") + commid_racal_decca_1216 = EnumValue(24885, "COMMID_Racal Decca 1216") + racal_decca_20v90_9 = EnumValue(24890, "Racal-DECCA 20V90/9") + commid_racal_decca_360 = EnumValue(24930, "COMMID_Racal Decca 360") + commid_racal_decca_ac_1290 = EnumValue(24975, "COMMID_Racal Decca AC 1290") + commid_racal_decca_tm_1229 = EnumValue(25020, "COMMID_Racal Decca TM 1229") + commid_racal_decca_tm_1626 = EnumValue(25065, "COMMID_Racal Decca TM 1626") + commid_racal_drbn_34a = EnumValue(25110, "COMMID_Racal DRBN 34A") + rada_mhr = EnumValue(25150, "RADA MHR") + commid_radar_24 = EnumValue(25155, "COMMID_Radar 24") + commid_radarpilot_1000 = EnumValue(25170, "COMMID_RADARPILOT 1000") + commid_radarpilot_1100 = EnumValue(25171, "COMMID_RADARPILOT 1100") + rajendra = EnumValue(25180, "RAJENDRA") + ran_7s = EnumValue(25200, "RAN 7S") + ran_10s = EnumValue(25205, "RAN 10S") + ran_11_lx = EnumValue(25245, "RAN 11 LX") + rani = EnumValue(25250, "Rani") + raphael_th = EnumValue(25259, "RAPHAEL-TH") + rapier_ta = EnumValue(25260, "Rapier TA") + rapier_2000_ta = EnumValue(25265, "Rapier 2000 TA") + rapier_mg = EnumValue(25270, "Rapier MG") + rascar_3400c = EnumValue(25273, "RASCAR 3400C") + rashmi = EnumValue(25275, "Rashmi") + rasit = EnumValue(25276, "Rasit") + rasit_3190b = EnumValue(25277, "Rasit 3190B") + rat_31_dl_m = EnumValue(25278, "RAT-31 DL/M") + rat_31_dl = EnumValue(25279, "RAT-31 DL") + rat_31s = EnumValue(25280, "RAT-31S") + rat_8_s = EnumValue(25281, "RAT-8 S") + rat_31_sl = EnumValue(25282, "RAT-31 SL") + raven_es_05 = EnumValue(25283, "Raven ES-05") + ratac_lct = EnumValue(25285, "RATAC (LCT)") + rawl = EnumValue(25286, "RAWL") + natoid_rattler = EnumValue(25287, "NATOID_Rattler") + raws = EnumValue(25288, "RAWS") + rawl_02 = EnumValue(25289, "RAWL-02") + commid_raytheon_1220 = EnumValue(25290, "COMMID_Raytheon 1220") + raws_03 = EnumValue(25291, "RAWS-03") + commid_raytheon_1210xx = EnumValue(25292, "COMMID_Raytheon 1210xx") + commid_raytheon_1302 = EnumValue(25300, "COMMID_Raytheon 1302") + commid_raytheon_1500 = EnumValue(25335, "COMMID_Raytheon 1500") + commid_raytheon_1645 = EnumValue(25380, "COMMID_Raytheon 1645") + commid_raytheon_1650 = EnumValue(25425, "COMMID_Raytheon 1650") + commid_raytheon_1900 = EnumValue(25470, "COMMID_Raytheon 1900") + commid_raytheon_2502 = EnumValue(25515, "COMMID_Raytheon 2502") + raytheon_anschutz_nautoscan_nx = EnumValue(25530, "Raytheon Anschutz NautoScan NX") + commid_raytheon_r41 = EnumValue(25540, "COMMID_Raytheon R41") + commid_raytheon_rm_1025_6x = EnumValue(25545, "COMMID_Raytheon RM 1025 6X") + commid_raytheon_sl_72 = EnumValue(25550, "COMMID_Raytheon SL 72") + commid_raytheon_tm_1650_6x = EnumValue(25560, "COMMID_Raytheon TM 1650/6X") + commid_raytheon_tm_1660_12s = EnumValue(25605, "COMMID_Raytheon TM 1660/12S") + ray_1220xr = EnumValue(25630, "RAY-1220XR") + commid_ray_1401 = EnumValue(25635, "COMMID_RAY-1401") + commid_ray_2900 = EnumValue(25650, "COMMID_Ray 2900") + commid_raymarine_rd218 = EnumValue(25694, "COMMID_Raymarine RD218") + commid_raypath = EnumValue(25695, "COMMID_Raypath") + commid_raytheon_pathfinder_st_mk2 = EnumValue(25698, "COMMID_Raytheon Pathfinder ST mk2") + rbe2 = EnumValue(25735, "RBE2") + rbe2_aa = EnumValue(25736, "RBE2-AA") + rct_180 = EnumValue(25739, "RCT-180") + rdm = EnumValue(25740, "RDM") + rdm_3 = EnumValue(25745, "RDM-3") + rdi = EnumValue(25750, "RDI") + rdy = EnumValue(25760, "RDY") + rdy_3 = EnumValue(25762, "RDY-3") + rds_86 = EnumValue(25770, "RDS-86") + rdn_72 = EnumValue(25785, "RDN 72") + rdr_1a = EnumValue(25830, "RDR 1A") + rdr_1e = EnumValue(25835, "RDR 1E") + rdr_4a = EnumValue(25840, "RDR 4A") + rdr_150 = EnumValue(25845, "RDR-150") + rdr_160xd = EnumValue(25850, "RDR-160XD") + rdr_230_hp = EnumValue(25853, "RDR-230 HP") + rdr_1100 = EnumValue(25855, "RDR 1100") + rdr_1150 = EnumValue(25860, "RDR-1150") + rdr_1200 = EnumValue(25875, "RDR 1200") + rdr_1400 = EnumValue(25885, "RDR 1400") + rdr_1400_c = EnumValue(25890, "RDR 1400 C") + rdr_4000 = EnumValue(25891, "RDR-4000") + rdr_4000_2 = EnumValue(25892, "RDR 4000") + rdr_1500 = EnumValue(25895, "RDR 1500") + natoid_rice_cake = EnumValue(25896, "NATOID_Rice Cake") + rdr_1600 = EnumValue(25897, "RDR 1600") + rdr_2000 = EnumValue(25898, "RDR 2000") + rdr_1700b = EnumValue(25899, "RDR 1700B") + remora = EnumValue(25900, "Remora") + rice_field = EnumValue(25901, "Rice Field") + rec_1a = EnumValue(25902, "REC-1A") + rec_1b = EnumValue(25903, "REC-1B") + rec_1c = EnumValue(25904, "REC-1C") + resolve_eas = EnumValue(25906, "Resolve EAS") + natoid_rice_cup_c = EnumValue(25907, "NATOID_Rice Cup C") + rel_6e = EnumValue(25908, "REL-6E") + rec_1 = EnumValue(25909, "REC-1") + natoid_rice_bowl = EnumValue(25910, "NATOID_Rice Bowl") + improved_reporter = EnumValue(25911, "Improved Reporter") + natoid_rice_bug = EnumValue(25912, "NATOID_Rice Bug") + natoid_rice_cup = EnumValue(25915, "NATOID_Rice Cup") + natoid_rice_lamp = EnumValue(25920, "NATOID_Rice Lamp") + natoid_rice_bird = EnumValue(25921, "NATOID_Rice Bird") + retia_revisor = EnumValue(25930, "Retia ReVisor") + revathi = EnumValue(25940, "REVATHI") + rezonans = EnumValue(25950, "REZONANS") + rgm_ugm_109b = EnumValue(25955, "RGM/UGM-109B") + rgm_ugm_109e_homing_radar = EnumValue(25958, "RGM/UGM-109E Homing Radar") + natoid_rice_pad = EnumValue(25965, "NATOID_Rice Pad") + rkl_526 = EnumValue(25966, "RKL-526") + rkz_764 = EnumValue(25967, "RKZ-764") + rkz_766 = EnumValue(25968, "RKZ-766") + rkl_165 = EnumValue(25969, "RKL-165") + rkl_609 = EnumValue(25970, "RKL-609") + rkl_800 = EnumValue(25971, "RKL-800") + rkz_761 = EnumValue(25972, "RKZ-761") + rkz_2000 = EnumValue(25973, "RKZ-2000") + ris_4c_a = EnumValue(25974, "RIS-4C/A") + rl_2000 = EnumValue(25975, "RL-2000") + rl_41 = EnumValue(25976, "RL-41") + rir_778 = EnumValue(25977, "RIR 778") + risat = EnumValue(25978, "RISAT") + rlm_s = EnumValue(25979, "RLM-S") + rim_hat_esm_ecm_suite = EnumValue(25980, "Rim Hat ESM/ECM Suite") + natoid_rice_scoop = EnumValue(26008, "NATOID_Rice Scoop") + natoid_rice_screen = EnumValue(26010, "NATOID_Rice Screen") + commid_decca_rm_1070a = EnumValue(26011, "COMMID_DECCA RM 1070A") + rm370bt = EnumValue(26015, "RM370BT") + commid_rockwell_collins_fmr_200x = EnumValue(26020, "COMMID_Rockwell Collins FMR-200X") + natoid_rm_231_2 = EnumValue(26040, "NATOID_RM-231-2") + natoid_rm_231_3 = EnumValue(26041, "NATOID_RM-231-3") + rmt_0100a = EnumValue(26043, "RMT 0100A") + rn_222 = EnumValue(26045, "RN-222") + roland_2 = EnumValue(26053, "ROLAND 2") + roland_bn = EnumValue(26055, "ROLAND BN") + roland_mg = EnumValue(26100, "ROLAND MG") + roland_ta = EnumValue(26145, "ROLAND TA") + roland_tt = EnumValue(26190, "ROLAND TT") + rotodome = EnumValue(26210, "ROTODOME") + natoid_round_ball = EnumValue(26235, "NATOID_Round Ball") + rp_379d_tirada_d = EnumValue(26236, "RP-379D Tirada D") + rp_3 = EnumValue(26237, "RP-3") + rp_4g = EnumValue(26238, "RP-4G") + natoid_round_house = EnumValue(26280, "NATOID_Round House") + natoid_round_house_b = EnumValue(26325, "NATOID_Round House B") + rpr_117 = EnumValue(26326, "RPR-117") + rs_02_50 = EnumValue(26327, "RS-02/50") + commid_rsr_210n = EnumValue(26328, "COMMID_RSR 210N") + rt_02_50 = EnumValue(26330, "RT-02/50") + rta_4100 = EnumValue(26340, "RTA-4100") + rtn_1a = EnumValue(26350, "RTN-1A") + rtn_25x = EnumValue(26353, "RTN-25X") + rts_6400 = EnumValue(26354, "RTS-6400") + natoid_ruby_rake = EnumValue(26355, "NATOID_Ruby Rake") + natoid_rum_sling = EnumValue(26360, "NATOID_Rum Sling") + natoid_rum_sling_ro = EnumValue(26361, "NATOID_Rum Sling RO") + natoid_rum_sling_tt = EnumValue(26362, "NATOID_Rum Sling TT") + rv2 = EnumValue(26370, "RV2") + rv3 = EnumValue(26415, "RV3") + rv5 = EnumValue(26460, "RV5") + rv10 = EnumValue(26505, "RV10") + rv_15m = EnumValue(26506, "RV-15M") + rv17 = EnumValue(26550, "RV17") + rv18 = EnumValue(26595, "RV18") + rv_21 = EnumValue(26596, "RV-21") + rv_21b = EnumValue(26597, "RV-21B") + rv_25 = EnumValue(26600, "RV-25") + rv_377 = EnumValue(26610, "RV-377") + rv_um = EnumValue(26640, "RV UM") + rwd_8 = EnumValue(26650, "RWD-8") + commid_rxn_2_60 = EnumValue(26660, "COMMID_RXN 2-60") + natoid_rye_house = EnumValue(26665, "NATOID_Rye House") + s_1810cd = EnumValue(26670, "S-1810CD") + sahab = EnumValue(26672, "Sahab") + salamandre = EnumValue(26673, "Salamandre") + commid_samyung_smr_7200 = EnumValue(26674, "COMMID_Samyung SMR-7200") + s1850m = EnumValue(26675, "S1850M") + s_511 = EnumValue(26676, "S-511") + s_512 = EnumValue(26677, "S-512") + s_600 = EnumValue(26678, "S-600") + s_604 = EnumValue(26679, "S-604") + s_763_lanza_3d = EnumValue(26680, "S-763 LANZA 3D") + s_613 = EnumValue(26681, "S-613") + s_631 = EnumValue(26682, "S-631") + s_654 = EnumValue(26683, "S-654") + s_669 = EnumValue(26684, "S-669") + natoid_sa_2_guideline = EnumValue(26685, "NATOID_SA 2 Guideline") + s_244 = EnumValue(26686, "S-244") + s_711 = EnumValue(26687, "S-711") + natoid_sa_3_goa = EnumValue(26730, "NATOID_SA 3 Goa") + natoid_sa_8_gecko_dt = EnumValue(26775, "NATOID_SA 8 Gecko DT") + natoid_gladiator_telar_tir = EnumValue(26795, "NATOID_Gladiator TELAR TIR") + natoid_giant_telar_tir = EnumValue(26797, "NATOID_Giant TELAR TIR") + saber_m60 = EnumValue(26799, "SABER-M60") + samovar = EnumValue(26805, "Samovar") + sampson = EnumValue(26810, "Sampson") + natoid_sa_n_7_gadfly_ti = EnumValue(26820, "NATOID_SA N 7 Gadfly TI") + natoid_sa_n_11_cads_1_un = EnumValue(26865, "NATOID_SA N 11 Cads 1 UN") + saccade_mh = EnumValue(26900, "Saccade MH") + natoid_salt_pot_aamp_b = EnumValue(26910, "NATOID_Salt Pot A&B") + sap_14 = EnumValue(26920, "SAP-14") + sap_518 = EnumValue(26925, "SAP-518") + sap_518m = EnumValue(26926, "SAP-518M") + sand_bar = EnumValue(26930, "Sand Bar") + natoid_sa_26_pechora_2m_ttr = EnumValue(26935, "NATOID_SA-26 Pechora-2M TTR") + sar_on_uavs = EnumValue(26945, "SAR (on UAVs)") + satrape = EnumValue(26950, "SATRAPE") + saturne_ii = EnumValue(26955, "SATURNE II") + sayyad_2_ter = EnumValue(26957, "Sayyad-2 TER") + natoid_scan_can = EnumValue(27000, "NATOID_Scan Can") + natoid_scan_fix = EnumValue(27045, "NATOID_Scan Fix") + natoid_scan_odd = EnumValue(27090, "NATOID_Scan Odd") + scanter_1002 = EnumValue(27095, "SCANTER 1002") + commid_scanter_2001 = EnumValue(27100, "COMMID_SCANTER 2001") + commid_scanter_2002 = EnumValue(27101, "COMMID_SCANTER 2002") + commid_scanter_2100 = EnumValue(27102, "COMMID_SCANTER 2100") + scanter_4002 = EnumValue(27109, "SCANTER 4002") + commid_scanter_4100 = EnumValue(27110, "COMMID_SCANTER 4100") + scanter_5102 = EnumValue(27111, "SCANTER 5102") + scanter_5502 = EnumValue(27113, "SCANTER 5502") + commid_scanter_6000 = EnumValue(27115, "COMMID_SCANTER 6000") + commid_scanter_6002 = EnumValue(27116, "COMMID_SCANTER 6002") + commid_scanter_mil_009 = EnumValue(27125, "COMMID_Scanter Mil 009") + natoid_scan_three = EnumValue(27135, "NATOID_Scan Three") + scanter_mil_s = EnumValue(27137, "SCANTER MIL S") + scanter_smr = EnumValue(27139, "Scanter SMR") + scanter_csr = EnumValue(27140, "SCANTER (CSR)") + scorads = EnumValue(27141, "SCORADS") + scimitar = EnumValue(27142, "Scimitar") + star_2000 = EnumValue(27143, "STAR 2000") + natoid_scoreboard = EnumValue(27150, "NATOID_SCOREBOARD") + scoop_pair = EnumValue(27175, "Scoop Pair") + natoid_scoup_plate = EnumValue(27180, "NATOID_Scoup Plate") + commid_scout = EnumValue(27183, "COMMID_SCOUT") + scr_584 = EnumValue(27190, "SCR-584") + sea_archer_2 = EnumValue(27225, "Sea Archer 2") + sea_based_x_band = EnumValue(27230, "Sea Based X-Band") + sea_dragon = EnumValue(27235, "Sea Dragon") + sea_eagle_type_381 = EnumValue(27239, "Sea Eagle (Type 381)") + sea_eagle_s_c_type_382 = EnumValue(27240, "Sea Eagle S/C (Type 382)") + sea_falcon = EnumValue(27245, "SEA FALCON") + commid_sea_giraffe_amb = EnumValue(27248, "COMMID_Sea Giraffe AMB") + commid_seaguard = EnumValue(27251, "COMMID_Seaguard") + sea_hawk_shn_x12 = EnumValue(27260, "Sea-Hawk SHN X12") + sea_hunter_4_mg = EnumValue(27270, "Sea Hunter 4 MG") + sea_hunter_4_ta = EnumValue(27315, "Sea Hunter 4 TA") + sea_hunter_4_tt = EnumValue(27360, "Sea Hunter 4 TT") + natoid_sea_gull = EnumValue(27405, "NATOID_Sea Gull") + commid_sea_master_400 = EnumValue(27430, "COMMID_Sea Master 400") + natoid_sea_net = EnumValue(27450, "NATOID_Sea Net") + sea_sparrow = EnumValue(27451, "Sea Sparrow") + sea_spray = EnumValue(27495, "Sea Spray") + sea_tiger = EnumValue(27540, "Sea Tiger") + sea_tiger_m = EnumValue(27550, "Sea Tiger M") + seastar = EnumValue(27560, "Seastar") + searchwater = EnumValue(27570, "Searchwater") + searchwater_2000 = EnumValue(27575, "Searchwater 2000") + seasonde = EnumValue(27580, "SEASONDE") + seaspray_7000e = EnumValue(27582, "SEASPRAY 7000E") + seavue = EnumValue(27583, "SeaVue") + commid_seaspray_mk3 = EnumValue(27584, "COMMID_Seaspray Mk3") + commid_selenia_orion_7 = EnumValue(27585, "COMMID_Selenia Orion 7") + commid_selenia_type_912 = EnumValue(27630, "COMMID_Selenia type 912") + commid_selennia_ran_12_l_x = EnumValue(27675, "COMMID_Selennia RAN 12 L/X") + selenia_ran_20s = EnumValue(27680, "Selenia RAN 20S") + commid_selennia_rtn_10x = EnumValue(27720, "COMMID_Selennia RTN 10X") + commid_selinia_arp_1645 = EnumValue(27765, "COMMID_Selinia ARP 1645") + sentir_m20 = EnumValue(27770, "SENTIR-M20") + serdar = EnumValue(27771, "SERDAR") + serhat = EnumValue(27773, "SERHAT") + commid_series_10_compact_submarine_radar_csr = EnumValue(27775, "COMMID_Series 10 Compact Submarine Radar (CSR)") + series_52 = EnumValue(27780, "SERIES 52") + series_320 = EnumValue(27790, "SERIES 320") + sg = EnumValue(27800, "SG") + natoid_sgj_02 = EnumValue(27802, "NATOID_SGJ-02") + natoid_sgj_03 = EnumValue(27803, "NATOID_SGJ-03") + sgr_102_00 = EnumValue(27810, "SGR 102 00") + sgr_103_02 = EnumValue(27855, "SGR 103/02") + sgr_104 = EnumValue(27870, "SGR-104") + shahed_129_sar = EnumValue(27873, "Shahed-129 SAR") + shahine = EnumValue(27875, "SHAHINE") + natoid_sheet_bend = EnumValue(27900, "NATOID_Sheet Bend") + natoid_sheet_curve = EnumValue(27945, "NATOID_Sheet Curve") + shikra = EnumValue(27980, "SHIKRA") + natoid_ship_globe = EnumValue(27990, "NATOID_Ship Globe") + natoid_ship_wheel = EnumValue(28035, "NATOID_Ship Wheel") + sgr_114 = EnumValue(28080, "SGR 114") + natoid_shore_walk_a = EnumValue(28125, "NATOID_Shore Walk A") + natoid_short_horn = EnumValue(28170, "NATOID_Short Horn") + natoid_shot_dome = EnumValue(28215, "NATOID_Shot Dome") + natoid_side_globe_jn = EnumValue(28260, "NATOID_Side Globe JN") + prv_11 = EnumValue(28280, "PRV-11") + natoid_side_walk_a = EnumValue(28305, "NATOID_Side Walk A") + signaal_bharat = EnumValue(28340, "Signaal - Bharat") + commid_signaal_da_02 = EnumValue(28350, "COMMID_Signaal DA 02") + commid_signaal_da_05 = EnumValue(28395, "COMMID_Signaal DA 05") + commid_signaal_da_08 = EnumValue(28440, "COMMID_Signaal DA 08") + commid_signaal_da_08_2ls = EnumValue(28445, "COMMID_Signaal DA 08/2LS") + commid_signaal_lw_04 = EnumValue(28480, "COMMID_Signaal LW 04") + commid_signaal_lw_08 = EnumValue(28485, "COMMID_Signaal LW 08") + commid_signaal_lwor = EnumValue(28530, "COMMID_Signaal LWOR") + commid_signaal_m45 = EnumValue(28575, "COMMID_Signaal M45") + commid_signaal_mw_08 = EnumValue(28620, "COMMID_Signaal MW 08") + commid_signaal_smart = EnumValue(28665, "COMMID_Signaal SMART") + commid_signaal_sting = EnumValue(28710, "COMMID_Signaal STING") + commid_signaal_stir = EnumValue(28755, "COMMID_Signaal STIR") + commid_signaal_stir_18m = EnumValue(28760, "COMMID_Signaal STIR 1.8M") + commid_signaal_stir_24m = EnumValue(28770, "COMMID_Signaal STIR 24M") + commid_signaal_wm_20_2 = EnumValue(28800, "COMMID_Signaal WM 20/2") + commid_signaal_wm_25 = EnumValue(28845, "COMMID_Signaal WM 25") + commid_signaal_wm_27 = EnumValue(28890, "COMMID_Signaal WM 27") + commid_signaal_wm_28 = EnumValue(28935, "COMMID_Signaal WM 28") + commid_signaal_zw_01 = EnumValue(28980, "COMMID_Signaal ZW 01") + commid_signaal_zw_06 = EnumValue(29025, "COMMID_Signaal ZW 06") + commid_signaal_zw_07 = EnumValue(29030, "COMMID_Signaal ZW 07") + commid_signaal_zw_0800 = EnumValue(29035, "COMMID_Signaal ZW 0800") + simrad_3g = EnumValue(29043, "SIMRAD 3G") + simrad_4g = EnumValue(29045, "SIMRAD 4G") + commid_simrad_ca54 = EnumValue(29050, "COMMID_Simrad CA54") + commid_simrad_halo_6 = EnumValue(29060, "COMMID_SIMRAD Halo-6") + natoid_ski_pole = EnumValue(29070, "NATOID_Ski Pole") + natoid_skin_head = EnumValue(29115, "NATOID_Skin Head") + natoid_skip_spin = EnumValue(29160, "NATOID_Skip Spin") + skyfender = EnumValue(29172, "SKYFENDER") + sky_wave_over_the_horizon = EnumValue(29175, "Sky Wave (Over The Horizon)") + skyguard_b = EnumValue(29180, "Skyguard B") + skyguard_ta = EnumValue(29185, "SKYGUARD TA") + skyguard_tt = EnumValue(29190, "SKYGUARD TT") + skyguard_lr = EnumValue(29191, "Skyguard LR") + skymaster = EnumValue(29200, "Skymaster") + natoid_sky_watch = EnumValue(29205, "NATOID_Sky Watch") + sky_ranger = EnumValue(29210, "Sky Ranger") + commid_skyshadow = EnumValue(29215, "COMMID_SKYSHADOW") + skyshield_ta = EnumValue(29220, "SKYSHIELD TA") + sl = EnumValue(29250, "SL") + sl_alq_234 = EnumValue(29270, "SL/ALQ-234") + natoid_slap_shot = EnumValue(29295, "NATOID_Slap Shot") + natoid_slap_shot_g = EnumValue(29297, "NATOID_Slap Shot G") + slc_2 = EnumValue(29300, "SLC-2") + slc_2e = EnumValue(29301, "SLC-2E") + slc_4 = EnumValue(29305, "SLC-4") + natoid_slim_net = EnumValue(29340, "NATOID_Slim Net") + natoid_slot_back_a = EnumValue(29385, "NATOID_Slot Back A") + natoid_slot_back_ill = EnumValue(29400, "NATOID_Slot Back ILL") + natoid_slot_back_b = EnumValue(29430, "NATOID_Slot Back B") + natoid_slot_back_iv = EnumValue(29431, "NATOID_Slot Back IV") + natoid_slot_back_b_topaz = EnumValue(29432, "NATOID_Slot Back B Topaz") + natoid_slot_back_e = EnumValue(29433, "NATOID_Slot Back E") + natoid_slot_back_g = EnumValue(29434, "NATOID_Slot Back G") + natoid_slot_back_vi = EnumValue(29435, "NATOID_Slot Back VI") + natoid_slot_rest = EnumValue(29440, "NATOID_Slot Rest") + sm_674a_upm = EnumValue(29450, "SM-674A/UPM") + commid_sma_3_rm = EnumValue(29475, "COMMID_SMA 3 RM") + commid_sma_3_rm_20 = EnumValue(29520, "COMMID_SMA 3 RM 20") + commid_sma_3rm_20a_smg = EnumValue(29565, "COMMID_SMA 3RM 20A/SMG") + commid_sma_bps_704 = EnumValue(29610, "COMMID_SMA BPS 704") + commid_sma_spin_749_v_2 = EnumValue(29655, "COMMID_SMA SPIN 749 (V) 2") + commid_sma_spn_703 = EnumValue(29700, "COMMID_SMA SPN 703") + commid_sma_spn_751 = EnumValue(29745, "COMMID_SMA SPN 751") + commid_sma_spos_748 = EnumValue(29790, "COMMID_SMA SPOS 748") + commid_sma_spq_2 = EnumValue(29835, "COMMID_SMA SPQ 2") + commid_sma_spq_2d = EnumValue(29880, "COMMID_SMA SPQ 2D") + commid_sma_spq_701 = EnumValue(29925, "COMMID_SMA SPQ 701") + commid_sma_sps_702_upx = EnumValue(29970, "COMMID_SMA SPS 702 UPX") + commid_sma_st_2_otomat_ii_mh = EnumValue(30015, "COMMID_SMA ST 2 OTOMAT II MH") + sr_47a = EnumValue(30016, "SR-47A") + commid_sma_718_beacon = EnumValue(30060, "COMMID_SMA 718 Beacon") + natoid_small_fred = EnumValue(30065, "NATOID_Small Fred") + smart_s = EnumValue(30068, "SMART-S") + smart_s_mk2 = EnumValue(30069, "SMART-S Mk2") + smart_l = EnumValue(30070, "SMART-L") + sm_932 = EnumValue(30072, "SM-932") + natoid_smog_lamp = EnumValue(30075, "NATOID_Smog Lamp") + natoid_snap_shot = EnumValue(30080, "NATOID_Snap Shot") + natoid_snoop_drift = EnumValue(30105, "NATOID_Snoop Drift") + natoid_snoop_half = EnumValue(30140, "NATOID_Snoop Half") + natoid_snoop_head = EnumValue(30150, "NATOID_Snoop Head") + natoid_snoop_pair = EnumValue(30195, "NATOID_Snoop Pair") + natoid_snoop_ping = EnumValue(30200, "NATOID_Snoop Ping") + natoid_snoop_plate = EnumValue(30240, "NATOID_Snoop Plate") + natoid_snoop_ping_2 = EnumValue(30255, "NATOID_Snoop Ping") + natoid_snoop_slab = EnumValue(30285, "NATOID_Snoop Slab") + natoid_snoop_tray = EnumValue(30330, "NATOID_Snoop Tray") + natoid_snoop_tray_1 = EnumValue(30375, "NATOID_Snoop Tray 1") + natoid_snoop_tray_2 = EnumValue(30420, "NATOID_Snoop Tray 2") + natoid_snoop_tray_3 = EnumValue(30421, "NATOID_SNOOP TRAY 3") + natoid_snoop_watch = EnumValue(30465, "NATOID_Snoop Watch") + _9s18m1 = EnumValue(30470, "9S18M1") + _9s18m1e = EnumValue(30471, "9S18M1E") + spb_7 = EnumValue(30475, "SPB-7") + natoid_snow_drop = EnumValue(30480, "NATOID_Snow Drop") + snw_10 = EnumValue(30490, "SNW-10") + so_1 = EnumValue(30510, "SO-1") + so_12 = EnumValue(30520, "SO-12") + so_a_communist = EnumValue(30555, "SO A Communist") + so_69 = EnumValue(30580, "SO-69") + natoid_sock_eye = EnumValue(30600, "NATOID_Sock Eye") + som_64 = EnumValue(30645, "SOM 64") + sopka_hill = EnumValue(30650, "Sopka (Hill)") + natoid_sorbsiya = EnumValue(30660, "NATOID_Sorbsiya") + sorbtsiya_l005 = EnumValue(30661, "Sorbtsiya L005") + sorbtsiya_l005s = EnumValue(30662, "Sorbtsiya L005S") + spada_sir = EnumValue(30665, "SPADA SIR") + natoid_spada_tt = EnumValue(30670, "NATOID_SPADA TT") + sparrow_aim_rim_7_ill = EnumValue(30690, "Sparrow (AIM/RIM-7) ILL") + sperry_rascar = EnumValue(30691, "SPERRY RASCAR") + spectra = EnumValue(30692, "SPECTRA") + spear3_mmw = EnumValue(30696, "SPEAR3 MMW") + commid_sperry_m_3 = EnumValue(30700, "COMMID_Sperry M-3") + commid_sperry_visionmaster_ft = EnumValue(30701, "COMMID_SPERRY VISIONMASTER FT") + spexer_2000 = EnumValue(30710, "SPEXER 2000") + spg_53f = EnumValue(30735, "SPG 53F") + spg_70_rtn_10x = EnumValue(30780, "SPG 70 (RTN 10X)") + spg_74_rtn_20x = EnumValue(30825, "SPG 74 (RTN 20X)") + spg_75_rtn_30x = EnumValue(30870, "SPG 75 (RTN 30X)") + spg_76_rtn_30x = EnumValue(30915, "SPG 76 (RTN 30X)") + natoid_spin_scan_a = EnumValue(30960, "NATOID_Spin Scan A") + natoid_spin_scan_b = EnumValue(31005, "NATOID_Spin Scan B") + natoid_spin_trough = EnumValue(31050, "NATOID_Spin Trough") + spino_dadda_wtr = EnumValue(31070, "SPINO D'ADDA WTR") + spj_40 = EnumValue(31080, "SPJ-40") + natoid_splash_drop = EnumValue(31095, "NATOID_Splash Drop") + spn_2 = EnumValue(31096, "SPN-2") + spn_4 = EnumValue(31097, "SPN-4") + spn_30 = EnumValue(31100, "SPN-30") + spn_35a = EnumValue(31140, "SPN 35A") + spn_41 = EnumValue(31185, "SPN 41") + spn_42 = EnumValue(31230, "SPN 42") + spn_43a = EnumValue(31275, "SPN 43A") + spn_43b = EnumValue(31320, "SPN 43B") + spn_44 = EnumValue(31365, "SPN 44") + spn_46 = EnumValue(31410, "SPN 46") + spn_703 = EnumValue(31455, "SPN 703") + spn_720 = EnumValue(31475, "SPN 720") + spn_728_v_1 = EnumValue(31500, "SPN 728 (V) 1") + spn_748 = EnumValue(31545, "SPN 748") + spn_750 = EnumValue(31590, "SPN 750") + spo_8 = EnumValue(31592, "SPO-8") + spn_753g = EnumValue(31593, "SPN 753G") + natoid_sponge_cake = EnumValue(31635, "NATOID_Sponge Cake") + p_12 = EnumValue(31680, "P-12") + p_18 = EnumValue(31681, "P-18") + p_18_3 = EnumValue(31682, "P-18") + p_18_4 = EnumValue(31684, "P-18") + p_18mh2 = EnumValue(31685, "P-18MH2") + p_18ma = EnumValue(31686, "P-18MA") + p_18mu = EnumValue(31687, "P-18MU") + p_18_malachite = EnumValue(31688, "P-18 Malachite") + p_18ou = EnumValue(31689, "P-18OU") + natoid_spork_rest = EnumValue(31700, "NATOID_Spork Rest") + spq_712_ran_12_l_x = EnumValue(31725, "SPQ 712 (RAN 12 L/X)") + spr_2 = EnumValue(31730, "SPR-2") + spr_51 = EnumValue(31740, "SPR-51") + sps_5_fasol = EnumValue(31765, "SPS-5 FASOL") + sps_6 = EnumValue(31766, "SPS-6") + sps_6c = EnumValue(31770, "SPS 6C") + sps_10f = EnumValue(31815, "SPS 10F") + sps_12 = EnumValue(31860, "SPS 12") + sps_22n_buket = EnumValue(31870, "SPS-22N BUKET") + sps_33n_buket = EnumValue(31875, "SPS-33N BUKET") + sps_44n_buket = EnumValue(31880, "SPS-44N BUKET") + sps_55n_buket = EnumValue(31890, "SPS-55N BUKET") + sps_58 = EnumValue(31905, "SPS 58") + sps_62 = EnumValue(31925, "SPS-62") + sps_100k = EnumValue(31935, "SPS-100K") + sps_64 = EnumValue(31950, "SPS 64") + sps_141 = EnumValue(31951, "SPS-141") + sps_142 = EnumValue(31952, "SPS-142") + sps_143 = EnumValue(31953, "SPS-143") + sps_151 = EnumValue(31955, "SPS-151") + sps_152 = EnumValue(31956, "SPS-152") + sps_153 = EnumValue(31957, "SPS-153") + sps_160_geran = EnumValue(31959, "SPS-160 Geran") + sps_161 = EnumValue(31960, "SPS-161") + sps_95k = EnumValue(31970, "SPS-95K") + sps_171_jammer = EnumValue(31971, "SPS-171 Jammer") + sps_172_jammer = EnumValue(31972, "SPS-172 Jammer") + sps_768_ran_el = EnumValue(31995, "SPS 768 (RAN EL)") + sps_540k = EnumValue(32010, "SPS-540K") + sps_550k_mf = EnumValue(32020, "SPS-550K MF") + sps_774_ran_10s = EnumValue(32040, "SPS 774 (RAN 10S)") + spy_790 = EnumValue(32085, "SPY 790") + natoid_square_head = EnumValue(32130, "NATOID_Square Head") + natoid_square_pair = EnumValue(32175, "NATOID_Square Pair") + natoid_square_slot = EnumValue(32220, "NATOID_Square Slot") + natoid_square_tie = EnumValue(32265, "NATOID_Square Tie") + shmel = EnumValue(32310, "Shmel") + p_15m = EnumValue(32330, "P-15M") + natoid_squint_eye = EnumValue(32355, "NATOID_Squint Eye") + squire = EnumValue(32365, "SQUIRE") + sr2410c = EnumValue(32373, "SR2410C") + sr47b_g = EnumValue(32375, "SR47B-G") + sre_m5 = EnumValue(32385, "SRE-M5") + srn_6 = EnumValue(32400, "SRN 6") + srn_15 = EnumValue(32445, "SRN 15") + srn_206 = EnumValue(32455, "SRN 206") + srn_745 = EnumValue(32490, "SRN 745") + sro_1 = EnumValue(32535, "SRO 1") + sro_2 = EnumValue(32580, "SRO 2") + natoid_ss_c_2b_samlet_mg = EnumValue(32625, "NATOID_SS C 2B Samlet MG") + natoid_ss_n_2a_b_cssc = EnumValue(32670, "NATOID_SS N 2A B CSSC") + natoid_ss_n_2a_b_cssc_2a_3a2_mh = EnumValue(32715, "NATOID_SS N 2A B CSSC 2A 3A2 MH") + natoid_ss_n_2c_seeker = EnumValue(32760, "NATOID_SS N 2C Seeker") + natoid_ss_n_2c_d_styx = EnumValue(32805, "NATOID_SS N 2C D Styx") + natoid_ss_n_2c_d_styx_c_d_mh = EnumValue(32850, "NATOID_SS N 2C D Styx C D MH") + natoid_ss_n_2c_styx_al = EnumValue(32851, "NATOID_SS-N-2C Styx AL") + natoid_ss_n_2d_styx_al = EnumValue(32852, "NATOID_SS-N-2D Styx AL") + natoid_ss_n_3_ssc_ss_c_18_bn = EnumValue(32895, "NATOID_SS N 3 SSC SS C 18 BN") + natoid_ss_n_3b_sepal_al = EnumValue(32940, "NATOID_SS N 3B Sepal AL") + natoid_ss_n_3b_sepal_mh = EnumValue(32985, "NATOID_SS N 3B Sepal MH") + natoid_ss_n_7_starbright = EnumValue(33025, "NATOID_SS-N-7 Starbright") + natoid_ss_n_9_siren = EnumValue(33030, "NATOID_SS N 9 Siren") + natoid_ss_n_9_siren_al = EnumValue(33075, "NATOID_SS N 9 Siren AL") + natoid_ss_n_9_siren_mh = EnumValue(33120, "NATOID_SS N 9 Siren MH") + ss_n_10a_fl_10_mmw_mh = EnumValue(33125, "SS-N-10A FL-10 mmW MH") + ss_n_11_nasr_1_mmw_mh = EnumValue(33140, "SS-N-11 Nasr-1 mmW MH") + natoid_ss_n_12_sandbox_al = EnumValue(33165, "NATOID_SS N 12 Sandbox AL") + ss_n_12_yj_83j_mmw_mh = EnumValue(33166, "SS-N-12 YJ-83J mmW MH") + natoid_ss_n_12_sandbox_mh = EnumValue(33210, "NATOID_SS N 12 Sandbox MH") + natoid_ss_nx_13_shredder = EnumValue(33230, "NATOID_SS-NX-13 Shredder") + natoid_ss_n_14b_silex_al = EnumValue(33231, "NATOID_SS-N-14B Silex AL") + natoid_ss_n_19_shipwreck = EnumValue(33255, "NATOID_SS N 19 Shipwreck") + natoid_ss_n_19_shipwreck_al = EnumValue(33300, "NATOID_SS N 19 Shipwreck AL") + natoid_ss_n_19_shipwreck_mh = EnumValue(33345, "NATOID_SS N 19 Shipwreck MH") + natoid_ss_n_21_al = EnumValue(33390, "NATOID_SS N 21 AL") + natoid_ss_n_22_sunburn = EnumValue(33435, "NATOID_SS N 22 Sunburn") + natoid_ss_n_22_sunburn_mh = EnumValue(33480, "NATOID_SS N 22 Sunburn MH") + natoid_ss_n_22_sunburn_al = EnumValue(33481, "NATOID_SS-N-22 Sunburn AL") + natoid_ss_n_25_switchblade_mh = EnumValue(33483, "NATOID_SS-N-25 Switchblade MH") + ss_n_26_strobile_mmw_mh = EnumValue(33484, "SS-N-26 Strobile MMW MH") + natoid_ss_n_27_sizzler_mh = EnumValue(33485, "NATOID_SS-N-27 Sizzler MH") + natoid_ss_n_27a_sizzler_al = EnumValue(33486, "NATOID_SS-N-27A Sizzler AL") + commid_sting_eo_mk2 = EnumValue(33505, "COMMID_STING EO Mk2") + commid_stir_12_eo_mk2 = EnumValue(33510, "COMMID_STIR 1.2 EO Mk2") + commid_stir_24_hp_mk2 = EnumValue(33511, "COMMID_STIR 2.4 HP Mk2") + natoid_stone_cake = EnumValue(33525, "NATOID_Stone Cake") + str_41 = EnumValue(33570, "STR 41") + st_858 = EnumValue(33580, "ST-858") + start_1m = EnumValue(33582, "START-1M") + stentor = EnumValue(33584, "STENTOR") + storm_shadow_ahr = EnumValue(33585, "Storm Shadow AHR") + straight_flush = EnumValue(33586, "STRAIGHT FLUSH") + natoid_straight_flush_ta = EnumValue(33590, "NATOID_Straight Flush TA") + natoid_straight_flush_tt = EnumValue(33595, "NATOID_Straight Flush TT") + natoid_straight_flush_ill = EnumValue(33600, "NATOID_Straight Flush ILL") + natoid_strike_out = EnumValue(33615, "NATOID_Strike Out") + natoid_strut_curve = EnumValue(33660, "NATOID_Strut Curve") + natoid_strut_pair = EnumValue(33705, "NATOID_Strut Pair") + natoid_strut_pair_1 = EnumValue(33750, "NATOID_Strut Pair 1") + natoid_strut_pair_2 = EnumValue(33795, "NATOID_Strut Pair 2") + natoid_sun_visor = EnumValue(33840, "NATOID_Sun Visor") + superdarn = EnumValue(33850, "SUPERDARN") + superfledermaus = EnumValue(33860, "Superfledermaus") + supersearcher = EnumValue(33870, "Supersearcher") + natoid_swift_rod_1 = EnumValue(33885, "NATOID_Swift Rod 1") + natoid_swift_rod_2 = EnumValue(33930, "NATOID_Swift Rod 2") + symphony = EnumValue(33933, "SYMPHONY") + synapsis_mk2 = EnumValue(33935, "SYNAPSIS Mk2") + sy80 = EnumValue(33950, "SY80") + natoid_t1166 = EnumValue(33975, "NATOID_T1166") + natoid_t1171 = EnumValue(34020, "NATOID_T1171") + natoid_t1202 = EnumValue(34040, "NATOID_T1202") + natoid_t6004 = EnumValue(34065, "NATOID_T6004") + natoid_t6031 = EnumValue(34110, "NATOID_T6031") + natoid_t8067 = EnumValue(34155, "NATOID_T8067") + natoid_t8068 = EnumValue(34200, "NATOID_T8068") + natoid_t8124 = EnumValue(34245, "NATOID_T8124") + natoid_t8408 = EnumValue(34290, "NATOID_T8408") + natoid_t8911 = EnumValue(34335, "NATOID_T8911") + natoid_t8937 = EnumValue(34380, "NATOID_T8937") + natoid_t8944 = EnumValue(34425, "NATOID_T8944") + natoid_t8987 = EnumValue(34470, "NATOID_T8987") + ta_10k = EnumValue(34480, "TA-10K") + jy_11b = EnumValue(34500, "JY-11B") + tacan_surf = EnumValue(34505, "TACAN/SURF") + p_14_2 = EnumValue(34515, "P-14") + natoid_tall_king_b = EnumValue(34516, "NATOID_TALL KING B") + natoid_tall_king_c = EnumValue(34517, "NATOID_TALL KING C") + natoid_tall_mike = EnumValue(34560, "NATOID_Tall Mike") + natoid_tall_path = EnumValue(34605, "NATOID_Tall Path") + tdr_94_mode_s = EnumValue(34607, "TDR-94 (MODE S)") + natoid_tea_spoon = EnumValue(34610, "NATOID_Tea Spoon") + natoid_team_play = EnumValue(34620, "NATOID_Team Play") + talisman = EnumValue(34624, "TALISMAN") + natoid_team_work = EnumValue(34625, "NATOID_Team Work") + t1135 = EnumValue(34626, "T1135") + tancan_surf = EnumValue(34627, "TANCAN/SURF") + tecsar = EnumValue(34628, "TECSAR") + terrasar_x = EnumValue(34629, "TERRASAR-X") + tesar = EnumValue(34630, "TESAR") + thaad_gbr = EnumValue(34640, "THAAD GBR") + thales_apar_block2 = EnumValue(34643, "Thales APAR Block2") + thales_rdy_2 = EnumValue(34644, "Thales RDY-2") + thales_nederland_signaal_apar = EnumValue(34645, "Thales Nederland Signaal APAR") + thales_scorpion_jammer = EnumValue(34646, "Thales Scorpion Jammer") + thales_variant = EnumValue(34647, "Thales Variant") + thales_icms_jammer = EnumValue(34648, "Thales ICMS Jammer") + thales_imews_jammer = EnumValue(34649, "Thales IMEWS Jammer") + thd_225 = EnumValue(34650, "THD 225") + thd_1012 = EnumValue(34655, "THD 1012") + thd_1098 = EnumValue(34660, "THD 1098") + thd_1213 = EnumValue(34665, "THD 1213") + thd_1940 = EnumValue(34670, "THD 1940") + thd_1955_palmier = EnumValue(34680, "THD-1955 Palmier") + thd_5500 = EnumValue(34695, "THD 5500") + third_of_khordad = EnumValue(34700, "Third of Khordad") + natoid_thin_path = EnumValue(34740, "NATOID_Thin Path") + prv_9 = EnumValue(34785, "PRV-9") + prv_16 = EnumValue(34786, "PRV-16") + commid_thompson_csf_ta_10 = EnumValue(34795, "COMMID_Thompson CSF TA-10") + commid_thompson_csf_th_d_1040_neptune = EnumValue(34830, "COMMID_Thompson CSF TH D 1040 Neptune") + commid_thompson_csf_calypso = EnumValue(34875, "COMMID_Thompson CSF Calypso") + commid_thompson_csf_castor = EnumValue(34920, "COMMID_Thompson CSF CASTOR") + commid_thompson_csf_castor_ii = EnumValue(34965, "COMMID_Thompson CSF Castor II") + thomson_csf_domino_30 = EnumValue(34966, "Thomson-CSF Domino 30") + commid_thompson_csf_drbc_32a = EnumValue(35010, "COMMID_Thompson CSF DRBC 32A") + commid_thompson_csf_drbj_11_d_e = EnumValue(35055, "COMMID_Thompson CSF DRBJ 11 D/E") + commid_thompson_csf_drbv_15a = EnumValue(35100, "COMMID_Thompson CSF DRBV 15A") + commid_thompson_csf_drbv_15c = EnumValue(35145, "COMMID_Thompson CSF DRBV 15C") + commid_thompson_csf_drbv_22d = EnumValue(35190, "COMMID_Thompson CSF DRBV 22D") + commid_thompson_csf_drbv_23b = EnumValue(35235, "COMMID_Thompson CSF DRBV 23B") + commid_thompson_csf_drua_33 = EnumValue(35280, "COMMID_Thompson CSF DRUA 33") + commid_thompson_csf_mars_drbv_21a = EnumValue(35325, "COMMID_Thompson CSF Mars DRBV 21A") + commid_thompson_csf_sea_tiger = EnumValue(35370, "COMMID_Thompson CSF Sea Tiger") + commid_thompson_csf_triton = EnumValue(35415, "COMMID_Thompson CSF Triton") + commid_thompson_csf_vega_with_drbc_32e = EnumValue(35460, "COMMID_Thompson CSF Vega with DRBC 32E") + thomson_enr_european_navy_radar = EnumValue(35470, "Thomson ENR (European Navy Radar)") + thomson_rdi = EnumValue(35475, "Thomson RDI") + tier_ii_plus = EnumValue(35477, "Tier II Plus") + tps_755 = EnumValue(35478, "TPS-755") + tps_830k = EnumValue(35479, "TPS-830K") + trs_2105 = EnumValue(35480, "TRS-2105") + tr_23k = EnumValue(35481, "TR-23K") + tr_23mr = EnumValue(35482, "TR-23MR") + trac_2100 = EnumValue(35483, "TRAC-2100") + trac_2300 = EnumValue(35484, "TRAC-2300") + ht_223 = EnumValue(35485, "HT-223") + tradex = EnumValue(35486, "TRADEX") + trail_xi = EnumValue(35487, "TRAIL XI") + trd_1211 = EnumValue(35488, "TRD-1211") + trd_1235 = EnumValue(35489, "TRD-1235") + trs_2100 = EnumValue(35490, "TRS-2100") + trac_ng = EnumValue(35491, "TRAC NG") + natoid_tie_rods = EnumValue(35505, "NATOID_Tie Rods") + _36d6 = EnumValue(35550, "36D6") + natoid_tin_trap = EnumValue(35570, "NATOID_Tin Trap") + tirsponder = EnumValue(35580, "TIRSPONDER") + tk_25e_5 = EnumValue(35583, "TK-25E-5") + tmk_mk2 = EnumValue(35585, "TMK Mk2") + tmx_mk2 = EnumValue(35586, "TMX Mk2") + natoid_toad_stool_1 = EnumValue(35595, "NATOID_Toad Stool 1") + natoid_toad_stool_2 = EnumValue(35640, "NATOID_Toad Stool 2") + natoid_toad_stool_3 = EnumValue(35685, "NATOID_Toad Stool 3") + natoid_toad_stool_4 = EnumValue(35730, "NATOID_Toad Stool 4") + natoid_toad_stool_5 = EnumValue(35775, "NATOID_Toad Stool 5") + token_b = EnumValue(35785, "Token B") + natoid_tomb_stone = EnumValue(35800, "NATOID_Tomb Stone") + tonson = EnumValue(35810, "Tonson") + natoid_top_bow = EnumValue(35820, "NATOID_Top Bow") + natoid_top_dome = EnumValue(35865, "NATOID_Top Dome") + natoid_top_knot = EnumValue(35910, "NATOID_Top Knot") + natoid_top_mesh = EnumValue(35955, "NATOID_Top Mesh") + natoid_top_pair = EnumValue(36000, "NATOID_Top Pair") + natoid_top_plate = EnumValue(36045, "NATOID_Top Plate") + natoid_top_plate_b = EnumValue(36046, "NATOID_Top Plate B") + natoid_top_sail = EnumValue(36090, "NATOID_Top Sail") + type_208 = EnumValue(36120, "TYPE-208") + natoid_top_steer = EnumValue(36135, "NATOID_Top Steer") + natoid_top_trough = EnumValue(36180, "NATOID_Top Trough") + tornado_gmr = EnumValue(36200, "Tornado GMR") + tornado_tfr = EnumValue(36201, "Tornado TFR") + natoid_scrum_half_ta = EnumValue(36220, "NATOID_Scrum Half TA") + natoid_scrum_half_tt = EnumValue(36225, "NATOID_Scrum Half TT") + tor_m2_ter = EnumValue(36226, "TOR-M2 TER") + natoid_scrum_half_mg = EnumValue(36230, "NATOID_Scrum Half MG") + natoid_track_dish = EnumValue(36270, "NATOID_Track Dish") + tr_47c = EnumValue(36300, "TR-47C") + torso_m = EnumValue(36315, "TORSO M") + tqn_2 = EnumValue(36320, "TQN-2") + natoid_trap_door = EnumValue(36360, "NATOID_Trap Door") + trd_1500 = EnumValue(36365, "TRD-1500") + natoid_trick_shot_tar = EnumValue(36370, "NATOID_Trick Shot TAR") + natoid_trick_shot_ter = EnumValue(36371, "NATOID_Trick Shot TER") + trisponde = EnumValue(36380, "TRISPONDE") + trml = EnumValue(36381, "TRML") + trs_2215 = EnumValue(36382, "TRS-2215") + trml_3d = EnumValue(36383, "TRML-3D") + trm_s = EnumValue(36384, "TRM-S") + trs_2056 = EnumValue(36385, "TRS-2056") + trs_3010 = EnumValue(36386, "TRS 3010") + trs_2060 = EnumValue(36387, "TRS-2060") + trs_2245 = EnumValue(36388, "TRS-2245") + trs_2310 = EnumValue(36389, "TRS-2310") + triton_g = EnumValue(36390, "Triton G") + trs_22xx = EnumValue(36391, "TRS-22XX") + trs_3030 = EnumValue(36400, "TRS 3030") + trs_3033 = EnumValue(36405, "TRS 3033") + trs_3203 = EnumValue(36417, "TRS 3203") + trs_3405 = EnumValue(36420, "TRS 3405") + trs_3410 = EnumValue(36425, "TRS 3410") + trs_3415 = EnumValue(36430, "TRS 3415") + trs_3d = EnumValue(36440, "TRS-3D") + trs_3d_16 = EnumValue(36441, "TRS-3D/16") + trs_3d_16_es = EnumValue(36442, "TRS-3D/16-ES") + trs_3d_32 = EnumValue(36443, "TRS-3D/32") + trs_4d = EnumValue(36446, "TRS-4D") + trs_c = EnumValue(36447, "TRS-C") + trs_n = EnumValue(36450, "TRS-N") + trml_4d = EnumValue(36455, "TRML-4D") + ts_4478a = EnumValue(36460, "TS-4478A") + tse_5000 = EnumValue(36495, "TSE 5000") + tsr_333 = EnumValue(36540, "TSR 333") + tsr_793 = EnumValue(36550, "TSR 793") + natoid_tub_brick = EnumValue(36563, "NATOID_Tub Brick") + natoid_tube_arm = EnumValue(36585, "NATOID_Tube Arm") + tw_1374 = EnumValue(36590, "TW 1374") + tw_1378 = EnumValue(36595, "TW 1378") + tw_1446 = EnumValue(36600, "TW 1446") + natoid_twin_eyes = EnumValue(36630, "NATOID_Twin Eyes") + natoid_twin_pill = EnumValue(36675, "NATOID_Twin Pill") + natoid_twin_scan = EnumValue(36720, "NATOID_Twin Scan") + natoid_twin_scan_ro = EnumValue(36765, "NATOID_Twin Scan Ro") + natoid_two_spot = EnumValue(36810, "NATOID_Two Spot") + type_071_lpd = EnumValue(36821, "Type 071 LPD") + type_2_12_j_a = EnumValue(36827, "Type 2-12 J/A") + type_2_21_j_a = EnumValue(36830, "Type 2-21 J/A") + type_2_23 = EnumValue(36835, "Type 2-23") + type_80_asm_1 = EnumValue(36836, "Type 80/ASM-1") + type_120 = EnumValue(36838, "Type 120") + type_208_2 = EnumValue(36840, "Type 208") + type_222 = EnumValue(36843, "Type 222") + type_226 = EnumValue(36846, "Type 226") + type_232h = EnumValue(36850, "Type 232H") + type_245 = EnumValue(36853, "TYPE 245") + type_262 = EnumValue(36855, "TYPE 262") + type_275 = EnumValue(36900, "TYPE 275") + type_278 = EnumValue(36905, "TYPE 278") + type_293 = EnumValue(36945, "TYPE 293") + type_341 = EnumValue(36946, "Type 341") + type_313 = EnumValue(36947, "TYPE 313") + type_305a = EnumValue(36948, "Type 305A") + type_334 = EnumValue(36960, "Type 334") + type_342 = EnumValue(36985, "Type 342") + type_343_sun_visor_b = EnumValue(36990, "TYPE 343 SUN VISOR B") + type_344 = EnumValue(36992, "Type 344") + type_345 = EnumValue(37010, "Type 345") + type_346 = EnumValue(37011, "Type 346") + type_349a = EnumValue(37033, "Type 349A") + type_347b = EnumValue(37035, "TYPE 347B") + type_347g = EnumValue(37038, "Type 347G") + type_359 = EnumValue(37039, "Type 359") + type_352 = EnumValue(37040, "Type 352") + type_360 = EnumValue(37041, "Type 360") + type_362_esr_1_sr_47b = EnumValue(37043, "Type 362 ESR-1 SR-47B") + type_354 = EnumValue(37045, "Type 354") + type_366 = EnumValue(37047, "Type 366") + type_363 = EnumValue(37048, "Type 363") + type_364 = EnumValue(37049, "Type 364") + type_404ach = EnumValue(37050, "Type-404A(CH)") + type_405 = EnumValue(37052, "Type 405") + type_405j = EnumValue(37053, "TYPE 405J") + type_408d = EnumValue(37058, "Type 408D") + type_517b = EnumValue(37059, "Type 517B") + type_518_hai_ying_god_eye_rel_2 = EnumValue(37060, "Type 518 (Hai Ying, God Eye, REL-2)") + type_589 = EnumValue(37070, "Type 589") + type_651 = EnumValue(37073, "TYPE 651") + type_753 = EnumValue(37075, "Type 753") + type_702 = EnumValue(37077, "Type 702") + type_704 = EnumValue(37078, "Type 704") + type_753_2 = EnumValue(37079, "Type 753") + type_756 = EnumValue(37080, "Type 756") + type_713 = EnumValue(37081, "TYPE 713") + type_714 = EnumValue(37082, "TYPE 714") + type_702_d = EnumValue(37083, "TYPE 702-D") + type_760 = EnumValue(37084, "TYPE 760") + type_760_2 = EnumValue(37086, "Type 760") + type_815 = EnumValue(37090, "Type 815") + type_793 = EnumValue(37095, "Type 793") + type_8a_813 = EnumValue(37100, "Type 8A-813") + type_901m = EnumValue(37105, "TYPE 901M") + type_902 = EnumValue(37110, "TYPE 902") + type_902b = EnumValue(37124, "Type 902B") + type_903 = EnumValue(37125, "TYPE 903") + type_909_ti = EnumValue(37170, "TYPE 909 TI") + type_909_tt = EnumValue(37215, "TYPE 909 TT") + type_910 = EnumValue(37260, "TYPE 910") + type_931ch = EnumValue(37265, "TYPE-931(CH)") + type_965 = EnumValue(37305, "TYPE 965") + type_967 = EnumValue(37350, "TYPE 967") + type_968 = EnumValue(37395, "TYPE 968") + type_974 = EnumValue(37440, "TYPE 974") + type_975 = EnumValue(37485, "TYPE 975") + type_978 = EnumValue(37530, "TYPE 978") + type_981 = EnumValue(37534, "Type 981") + type_981_3 = EnumValue(37535, "Type 981-3") + type_982 = EnumValue(37540, "TYPE 982") + type_984 = EnumValue(37543, "Type 984") + type_985 = EnumValue(37544, "Type 985") + type_992 = EnumValue(37575, "TYPE 992") + type_993 = EnumValue(37620, "TYPE 993") + type_994 = EnumValue(37665, "TYPE 994") + type_996 = EnumValue(37670, "Type 996") + type_997_artisan = EnumValue(37675, "Type 997 Artisan") + type_10061 = EnumValue(37710, "TYPE 1006(1)") + type_10062 = EnumValue(37755, "TYPE 1006(2)") + type_1022 = EnumValue(37800, "TYPE 1022") + type_1047 = EnumValue(37810, "Type 1047") + type_1048 = EnumValue(37815, "Type 1048") + type_1474 = EnumValue(37825, "Type 1474") + type_1493 = EnumValue(37828, "Type 1493") + ultra = EnumValue(37840, "ULTRA") + uk_mk_10 = EnumValue(37845, "UK MK 10") + ups_220c = EnumValue(37850, "UPS-220C") + upx_1_10 = EnumValue(37890, "UPX 1 10") + upx_27 = EnumValue(37935, "UPX 27") + urn_20 = EnumValue(37980, "URN 20") + utes_a = EnumValue(37985, "UTES-A") + utes_t = EnumValue(37990, "UTES-T") + urn_25 = EnumValue(38025, "URN 25") + vigilant = EnumValue(38035, "VIGILANT") + vitebsk_l370_jammer = EnumValue(38038, "Vitebsk L370 Jammer") + volex_iii_iv = EnumValue(38045, "VOLEX III/IV") + volga = EnumValue(38046, "VOLGA") + voronezh_dm = EnumValue(38047, "VORONEZH-DM") + vostok = EnumValue(38048, "VOSTOK") + vostok_e = EnumValue(38049, "VOSTOK-E") + vsr = EnumValue(38050, "VSR") + vostok_3d = EnumValue(38051, "VOSTOK-3D") + vstar_pt = EnumValue(38055, "VSTAR-PT") + w_160 = EnumValue(38058, "W-160") + w1028 = EnumValue(38060, "W1028") + w8818 = EnumValue(38070, "W8818") + w8838 = EnumValue(38115, "W8838") + w8852 = EnumValue(38120, "W8852") + natoid_wall_board = EnumValue(38140, "NATOID_WALL BOARD") + natoid_wall_rust = EnumValue(38150, "NATOID_Wall Rust") + was_74s = EnumValue(38160, "WAS-74S") + natoid_wasp_head = EnumValue(38205, "NATOID_Wasp Head") + watchdog = EnumValue(38210, "WATCHDOG") + natoid_watch_guard = EnumValue(38250, "NATOID_Watch Guard") + watchman = EnumValue(38260, "Watchman") + wavestorm = EnumValue(38270, "WAVESTORM") + watchman_s = EnumValue(38275, "WATCHMAN-S") + watchman_t = EnumValue(38276, "WATCHMAN-T") + weather_scout_2 = EnumValue(38280, "WEATHER SCOUT 2") + commid_western_electric_mk_10 = EnumValue(38295, "COMMID_Western Electric MK 10") + commid_westinghouse_adr_4_lrsr = EnumValue(38320, "COMMID_Westinghouse ADR-4 LRSR") + commid_westinghouse_electric_spg_50 = EnumValue(38340, "COMMID_Westinghouse Electric SPG 50") + commid_westinghouse_electric_w_120 = EnumValue(38385, "COMMID_Westinghouse Electric W 120") + commid_westinghouse_sps_29c = EnumValue(38430, "COMMID_Westinghouse SPS 29C") + commid_westinghouse_sps_37 = EnumValue(38475, "COMMID_Westinghouse SPS 37") + wet_eye = EnumValue(38520, "Wet Eye") + wet_eye_2 = EnumValue(38525, "Wet Eye 2") + wet_eye_mod = EnumValue(38565, "Wet Eye Mod") + wf44s = EnumValue(38568, "WF44S") + wgu_41_b = EnumValue(38570, "WGU-41/B") + wgu_44_b = EnumValue(38572, "WGU-44/B") + natoid_whiff = EnumValue(38610, "NATOID_Whiff") + natoid_whiff_brick = EnumValue(38655, "NATOID_Whiff Brick") + natoid_whiff_fire = EnumValue(38700, "NATOID_Whiff Fire") + natoid_white_house = EnumValue(38715, "NATOID_WHITE HOUSE") + natoid_wide_mat = EnumValue(38730, "NATOID_Wide Mat") + wine_glass_jammer = EnumValue(38735, "Wine Glass Jammer") + wild_card = EnumValue(38745, "Wild Card") + wildcat = EnumValue(38748, "WILDCAT") + natoid_witch_eight = EnumValue(38790, "NATOID_Witch Eight") + natoid_witch_five = EnumValue(38835, "NATOID_Witch Five") + wlr = EnumValue(38840, "WLR") + wm2x_series = EnumValue(38880, "WM2X Series") + wm2x_series_cas = EnumValue(38925, "WM2X Series CAS") + wr_10x = EnumValue(38930, "WR-10X") + wr_2100 = EnumValue(38935, "WR-2100") + wsr_74c = EnumValue(38950, "WSR-74C") + wsr_74s = EnumValue(38955, "WSR-74S") + wsr_81 = EnumValue(38957, "WSR-81") + wxr_700c = EnumValue(38960, "WXR-700C") + wxr_2100_mstt = EnumValue(38965, "WXR-2100 MSTT") + wxr_2100mstt = EnumValue(38966, "WXR-2100MSTT") + natoid_wood_gage = EnumValue(38970, "NATOID_Wood Gage") + x_tar25 = EnumValue(38990, "X-TAR25") + x_tar3d = EnumValue(38995, "X-TAR3D") + yaogan_3 = EnumValue(39000, "YAOGAN 3") + yaogan_29 = EnumValue(39014, "Yaogan-29") + natoid_yard_rake = EnumValue(39015, "NATOID_Yard Rake") + yh_96 = EnumValue(39050, "YH-96") + natoid_yew_loop = EnumValue(39060, "NATOID_Yew Loop") + yitian_ads = EnumValue(39061, "YITIAN ADS") + yd_3 = EnumValue(39062, "YD-3") + yj_12_mh = EnumValue(39063, "YJ-12 MH") + yj_62_mh = EnumValue(39065, "YJ-62 MH") + yj_82_mh = EnumValue(39066, "YJ-82 MH") + yj_83_mh = EnumValue(39067, "YJ-83 MH") + yj_63 = EnumValue(39068, "YJ-63") + ylc_2 = EnumValue(39070, "YLC-2") + ylc_2a = EnumValue(39071, "YLC-2A") + ylc_4 = EnumValue(39073, "YLC-4") + ylc_6 = EnumValue(39074, "YLC-6") + ylc_6m = EnumValue(39075, "YLC-6M") + ylc_8 = EnumValue(39080, "YLC-8") + ylc_8b = EnumValue(39081, "YLC-8B") + ylc_18 = EnumValue(39085, "YLC-18") + natoid_yo_yo = EnumValue(39105, "NATOID_Yo-Yo") + zaslon_a = EnumValue(39110, "Zaslon-A") + zaslon_multi_purpose_x_and_s_band = EnumValue(39112, "Zaslon Multi-purpose (X- and S-band)") + zoo_park_1 = EnumValue(39125, "Zoo Park 1") + zps_6 = EnumValue(39126, "ZPS-6") + zoopark_3 = EnumValue(39127, "ZOOPARK-3") + zoopark_1m = EnumValue(39128, "ZOOPARK-1M") + zd_12 = EnumValue(39131, "ZD-12") + zw_06 = EnumValue(39150, "ZW-06") + an_alq_136v1 = EnumValue(39200, "AN/ALQ-136(V)1") + an_alq_136v2 = EnumValue(39201, "AN/ALQ-136(V)2") + an_alq_136v3 = EnumValue(39202, "AN/ALQ-136(V)3") + an_alq_136v4 = EnumValue(39203, "AN/ALQ-136(V)4") + an_alq_136v5 = EnumValue(39204, "AN/ALQ-136(V)5") + an_alq_162v2 = EnumValue(39210, "AN/ALQ-162(V)2") + an_alq_162v3 = EnumValue(39211, "AN/ALQ-162(V)3") + an_alq_162v4 = EnumValue(39212, "AN/ALQ-162(V)4") + zhuk_m = EnumValue(45300, "Zhuk-M") + zhuk_mae = EnumValue(45303, "ZHUK-MAE") + zhuk_me = EnumValue(45304, "ZHUK-ME") + zhuk_mme = EnumValue(45305, "ZHUK-MME") + zhuk_mse = EnumValue(45307, "Zhuk-MSE") + default = _1245_6x + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/emitter_system_function.py b/dis/siso_ref_010/enums/emitter_system_function.py new file mode 100644 index 0000000..3e00c27 --- /dev/null +++ b/dis/siso_ref_010/enums/emitter_system_function.py @@ -0,0 +1,217 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 76, + * marshal size 8; + * EmitterSystemFunction has 82 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class EmitterSystemFunction(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + multi_function = EnumValue(1, "Multi-function") + early_warning_surveillance = EnumValue(2, "Early Warning/Surveillance") + height_finder = EnumValue(3, "Height Finder") + fire_control = EnumValue(4, "Fire Control") + acquisition_detection = EnumValue(5, "Acquisition/Detection") + tracker = EnumValue(6, "Tracker") + guidance_illumination = EnumValue(7, "Guidance/Illumination") + firing_point_launch_point_location = EnumValue(8, "Firing point/launch point location") + range_only = EnumValue(9, "Range-Only") + radar_altimeter = EnumValue(10, "Radar Altimeter") + imaging = EnumValue(11, "Imaging") + motion_detection = EnumValue(12, "Motion Detection") + navigation = EnumValue(13, "Navigation") + weather_meteorological = EnumValue(14, "Weather / Meteorological") + instrumentation = EnumValue(15, "Instrumentation") + identification_classification_including_iff = EnumValue(16, "Identification/Classification (including IFF)") + aaa_anti_aircraft_artillery_fire_control = EnumValue(17, "AAA (Anti-Aircraft Artillery) Fire Control") + air_search_bomb = EnumValue(18, "Air Search/Bomb") + air_intercept = EnumValue(19, "Air Intercept") + altimeter = EnumValue(20, "Altimeter") + air_mapping = EnumValue(21, "Air Mapping") + air_traffic_control = EnumValue(22, "Air Traffic Control") + beacon = EnumValue(23, "Beacon") + battlefield_surveillance = EnumValue(24, "Battlefield Surveillance") + ground_control_approach = EnumValue(25, "Ground Control Approach") + ground_control_intercept = EnumValue(26, "Ground Control Intercept") + coastal_surveillance = EnumValue(27, "Coastal Surveillance") + decoy_mimic = EnumValue(28, "Decoy/Mimic") + data_transmission = EnumValue(29, "Data Transmission") + earth_surveillance = EnumValue(30, "Earth Surveillance") + gun_lay_beacon = EnumValue(31, "Gun Lay Beacon") + ground_mapping = EnumValue(32, "Ground Mapping") + harbor_surveillance = EnumValue(33, "Harbor Surveillance") + iff_identify_friend_or_foe = EnumValue(34, "IFF (Identify Friend or Foe)") + ils_instrument_landing_system = EnumValue(35, "ILS (Instrument Landing System)") + ionospheric_sound = EnumValue(36, "Ionospheric Sound") + interrogator = EnumValue(37, "Interrogator") + barrage_jamming = EnumValue(38, "Barrage Jamming") + click_jamming = EnumValue(39, "Click Jamming") + deceptive_jamming = EnumValue(40, "Deceptive Jamming") + frequency_swept_jamming = EnumValue(41, "Frequency Swept Jamming") + jammer = EnumValue(42, "Jammer") + noise_jamming = EnumValue(43, "Noise Jamming") + pulsed_jamming = EnumValue(44, "Pulsed Jamming") + repeater_jamming = EnumValue(45, "Repeater Jamming") + spot_noise_jamming = EnumValue(46, "Spot Noise Jamming") + missile_acquisition = EnumValue(47, "Missile Acquisition") + missile_downlink = EnumValue(48, "Missile Downlink") + meteorological = EnumValue(49, "Meteorological") + space = EnumValue(50, "Space") + surface_search = EnumValue(51, "Surface Search") + shell_tracking = EnumValue(52, "Shell Tracking") + television = EnumValue(56, "Television") + unknown = EnumValue(57, "Unknown") + video_remoting = EnumValue(58, "Video Remoting") + experimental_or_training = EnumValue(59, "Experimental or Training") + missile_guidance = EnumValue(60, "Missile Guidance") + missile_homing = EnumValue(61, "Missile Homing") + missile_tracking = EnumValue(62, "Missile Tracking") + jamming_noise = EnumValue(64, "Jamming, noise") + jamming_deception = EnumValue(65, "Jamming, deception") + decoy = EnumValue(66, "Decoy") + navigation_distance_measuring_equipment = EnumValue(71, "Navigation/Distance Measuring Equipment") + terrain_following = EnumValue(72, "Terrain Following") + weather_avoidance = EnumValue(73, "Weather Avoidance") + proximity_fuse = EnumValue(74, "Proximity Fuse") + instrumentation_2 = EnumValue(75, "Instrumentation") + radiosonde = EnumValue(76, "Radiosonde") + sonobuoy = EnumValue(77, "Sonobuoy") + bathythermal_sensor = EnumValue(78, "Bathythermal Sensor") + towed_counter_measure = EnumValue(79, "Towed Counter Measure") + dipping_sonar = EnumValue(80, "Dipping Sonar") + towed_acoustic_sensor = EnumValue(81, "Towed Acoustic Sensor") + weapon_non_lethal = EnumValue(96, "Weapon, non-lethal") + weapon_lethal = EnumValue(97, "Weapon, lethal") + test_equipment = EnumValue(98, "Test Equipment") + acquisition_track = EnumValue(99, "Acquisition Track") + track_guidance = EnumValue(100, "Track Guidance") + guidance_illumination_track_acquisition = EnumValue(101, "Guidance Illumination Track Acquisition") + search_acquisition = EnumValue(102, "Search Acquisition") + dropsonde = EnumValue(103, "Dropsonde") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/entity_association_association_status.py b/dis/siso_ref_010/enums/entity_association_association_status.py new file mode 100644 index 0000000..fcdf3ec --- /dev/null +++ b/dis/siso_ref_010/enums/entity_association_association_status.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 319, + * marshal size 8; + * EntityAssociationAssociationStatus has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class EntityAssociationAssociationStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_specified = EnumValue(0, "Not Specified") + physical_association_general_object_1 = EnumValue(1, "Physical Association (General/Object 1)") + functional_association_general = EnumValue(2, "Functional Association (General)") + association_broken = EnumValue(3, "Association Broken") + physical_association_object_2 = EnumValue(4, "Physical Association (Object 2)") + functional_association_object_1 = EnumValue(5, "Functional Association (Object 1)") + functional_association_object_2 = EnumValue(6, "Functional Association (Object 2)") + default = not_specified + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/entity_association_association_type.py b/dis/siso_ref_010/enums/entity_association_association_type.py new file mode 100644 index 0000000..2751e4c --- /dev/null +++ b/dis/siso_ref_010/enums/entity_association_association_type.py @@ -0,0 +1,150 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 330, + * marshal size 8; + * EntityAssociationAssociationType has 15 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class EntityAssociationAssociationType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + target_entity = EnumValue(1, "Target Entity") + target_location = EnumValue(2, "Target Location") + home_base_location = EnumValue(3, "Home Base Location") + cap_point_location = EnumValue(4, "CAP Point Location") + flight_leader = EnumValue(5, "Flight Leader") + flight_member = EnumValue(6, "Flight Member") + ip_point = EnumValue(7, "IP Point") + rendezvous_point = EnumValue(8, "Rendezvous Point") + on_station_location = EnumValue(9, "On-Station Location") + landing_zone_location = EnumValue(10, "Landing Zone Location") + downed_pilot = EnumValue(11, "Downed Pilot") + tanker_entity_that_is_currently_refueling_the_transferred_entity = EnumValue(12, "Tanker Entity that Is Currently Refueling the Transferred Entity") + tanker_entity_the_transferred_entity_is_headed_towards_to_refuel = EnumValue(13, "Tanker Entity the Transferred Entity Is Headed towards to Refuel") + entity_headed_towards_to_join_up_with = EnumValue(14, "Entity Headed towards to Join Up With") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/entity_association_group_member_type.py b/dis/siso_ref_010/enums/entity_association_group_member_type.py new file mode 100644 index 0000000..4c31b42 --- /dev/null +++ b/dis/siso_ref_010/enums/entity_association_group_member_type.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 321, + * marshal size 8; + * EntityAssociationGroupMemberType has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class EntityAssociationGroupMemberType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_part_of_a_group = EnumValue(0, "Not Part of a Group") + group_leader = EnumValue(1, "Group Leader") + group_member = EnumValue(2, "Group Member") + formation_leader = EnumValue(3, "Formation Leader") + formation_member = EnumValue(4, "Formation Member") + convoy_leader = EnumValue(5, "Convoy Leader") + convoy_member = EnumValue(6, "Convoy Member") + default = not_part_of_a_group + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/entity_association_physical_association_type.py b/dis/siso_ref_010/enums/entity_association_physical_association_type.py new file mode 100644 index 0000000..d3d4c88 --- /dev/null +++ b/dis/siso_ref_010/enums/entity_association_physical_association_type.py @@ -0,0 +1,163 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 323, + * marshal size 8; + * EntityAssociationPhysicalAssociationType has 28 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class EntityAssociationPhysicalAssociationType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_specified = EnumValue(0, "Not Specified") + towed_in_air_single_hook_not_specified = EnumValue(1, "Towed in Air (Single Hook, Not Specified)") + towed_on_land = EnumValue(2, "Towed on Land") + towed_on_water_surface = EnumValue(3, "Towed on Water Surface") + towed_underwater = EnumValue(4, "Towed Underwater") + mounted_attached = EnumValue(5, "Mounted Attached") + mounted_unattached_and_unsupported = EnumValue(6, "Mounted Unattached and Unsupported") + mounted_unattached_and_supported = EnumValue(7, "Mounted Unattached and Supported") + towed_in_air_center_hook = EnumValue(8, "Towed in Air (Center Hook)") + towed_in_air_forward_hook = EnumValue(9, "Towed in Air (Forward Hook)") + towed_in_air_aft_hook = EnumValue(10, "Towed in Air (Aft Hook)") + towed_in_air_tandem_hook_fore_and_aft = EnumValue(11, "Towed in Air (Tandem Hook - Fore and Aft)") + towed_in_air_mismanaged_tandem_fore_and_center = EnumValue(12, "Towed in Air (Mismanaged Tandem - Fore and Center)") + towed_in_air_mismanaged_tandem_center_and_aft = EnumValue(13, "Towed in Air (Mismanaged Tandem - Center and Aft)") + towed_in_air_all_hooks = EnumValue(14, "Towed in Air (All Hooks)") + hoisted = EnumValue(15, "Hoisted") + restrained_to_a_life_form = EnumValue(30, "Restrained to a Life Form") + restrained_to_a_platform = EnumValue(31, "Restrained to a Platform") + restrained_to_an_object = EnumValue(32, "Restrained to an Object") + refueling_operation = EnumValue(61, "Refueling Operation") + search_and_rescue_basket = EnumValue(62, "Search and Rescue Basket") + search_and_rescue_rescue_collar = EnumValue(63, "Search and Rescue Rescue Collar") + engagement_object_2_is_being_engaged = EnumValue(64, "Engagement/Object 2 is Being Engaged") + return_to_base_object_2_is_the_destination_object = EnumValue(65, "Return To Base/Object 2 is the Destination Object") + line_between_communication_towers = EnumValue(90, "Line between Communication Towers") + line_between_power_towers = EnumValue(91, "Line Between Power Towers") + indoors = EnumValue(92, "Indoors") + top_surface = EnumValue(93, "Top Surface") + default = not_specified + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/entity_association_physical_connection_type.py b/dis/siso_ref_010/enums/entity_association_physical_connection_type.py new file mode 100644 index 0000000..cc10b40 --- /dev/null +++ b/dis/siso_ref_010/enums/entity_association_physical_connection_type.py @@ -0,0 +1,148 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 324, + * marshal size 8; + * EntityAssociationPhysicalConnectionType has 13 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class EntityAssociationPhysicalConnectionType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_specified = EnumValue(0, "Not Specified") + attached_directly_to_surface = EnumValue(1, "Attached Directly to Surface") + cable_wire = EnumValue(2, "Cable Wire") + rope = EnumValue(3, "Rope") + chain = EnumValue(4, "Chain") + power_line = EnumValue(5, "Power Line") + telephone_line = EnumValue(6, "Telephone Line") + cable_line = EnumValue(7, "Cable Line") + refueling_drogue = EnumValue(8, "Refueling Drogue") + refueling_boom = EnumValue(9, "Refueling Boom") + handcuffs = EnumValue(10, "Handcuffs") + in_contact_with = EnumValue(11, "In Contact With") + fast_rope = EnumValue(12, "Fast Rope") + default = not_specified + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/entity_capability_types.py b/dis/siso_ref_010/enums/entity_capability_types.py new file mode 100644 index 0000000..505604c --- /dev/null +++ b/dis/siso_ref_010/enums/entity_capability_types.py @@ -0,0 +1,161 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 55, + * marshal size 32; + * EntityCapabilities has 13 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class EntityCapabilityTypes(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + # XREF UID 450 - CLASS LandPlatformCapabilities + land_platform_entity_capabilities = EnumValue(0, "Land Platform Entity Capabilities") + # XREF UID 451 - CLASS AirPlatformCapabilities + air_platform_entity_capabilities = EnumValue(1, "Air Platform Entity Capabilities") + # XREF UID 452 - CLASS SurfacePlatformCapabilities + surface_platform_entity_capabilities = EnumValue(2, "Surface Platform Entity Capabilities") + # XREF UID 453 - CLASS SubsurfacePlatformCapabilities + subsurface_platform_entity_capabilities = EnumValue(3, "Subsurface Platform Entity Capabilities") + # XREF UID 454 - CLASS SpacePlatformCapabilities + space_platform_entity_capabilities = EnumValue(4, "Space Platform Entity Capabilities") + # XREF UID 455 - CLASS MunitionCapabilities + munition_entity_capabilities = EnumValue(5, "Munition Entity Capabilities") + # XREF UID 456 - CLASS LifeFormsCapabilities + life_forms_entity_capabilities = EnumValue(6, "Life Forms Entity Capabilities") + # XREF UID 457 - CLASS EnvironmentalCapabilities + environmental_entity_capabilities = EnumValue(7, "Environmental Entity Capabilities") + # XREF UID 458 - CLASS CulturalFeatureCapabilities + cultural_feature_entity_capabilities = EnumValue(8, "Cultural Feature Entity Capabilities") + # XREF UID 459 - CLASS SupplyCapabilities + supply_entity_capabilities = EnumValue(9, "Supply Entity Capabilities") + # XREF UID 460 - CLASS RadioCapabilities + radio_entity_capabilities = EnumValue(10, "Radio Entity Capabilities") + # XREF UID 461 - CLASS ExpendableCapabilities + expendable_entity_capabilities = EnumValue(11, "Expendable Entity Capabilities") + # XREF UID 462 - CLASS SensorEmitterCapabilities + sensor_emitter_entity_capabilities = EnumValue(12, "Sensor/Emitter Entity Capabilities") + default = land_platform_entity_capabilities + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/entity_damage_status_component_identification.py b/dis/siso_ref_010/enums/entity_damage_status_component_identification.py new file mode 100644 index 0000000..55f319d --- /dev/null +++ b/dis/siso_ref_010/enums/entity_damage_status_component_identification.py @@ -0,0 +1,145 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 314, + * marshal size 8; + * EntityDamageStatusComponentIdentification has 10 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class EntityDamageStatusComponentIdentification(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + entity_center_no_specific_component = EnumValue(0, "Entity Center (No Specific Component)") + entity_structure = EnumValue(1, "Entity Structure") + control_system = EnumValue(2, "Control System") + control_surface = EnumValue(3, "Control Surface") + engine_propulsion_system = EnumValue(4, "Engine / Propulsion System") + crew_member = EnumValue(5, "Crew Member") + fuse = EnumValue(6, "Fuse") + acquisition_sensor = EnumValue(7, "Acquisition Sensor") + tracking_sensor = EnumValue(8, "Tracking Sensor") + fuel_tank_solid_rocket_motor = EnumValue(9, "Fuel Tank / Solid Rocket Motor") + default = entity_center_no_specific_component + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/entity_kind.py b/dis/siso_ref_010/enums/entity_kind.py new file mode 100644 index 0000000..532e40f --- /dev/null +++ b/dis/siso_ref_010/enums/entity_kind.py @@ -0,0 +1,145 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 7, + * marshal size 8; + * EntityKind has 10 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class EntityKind(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + platform = EnumValue(1, "Platform") + munition = EnumValue(2, "Munition") + life_form = EnumValue(3, "Life form") + environmental = EnumValue(4, "Environmental") + cultural_feature = EnumValue(5, "Cultural feature") + supply = EnumValue(6, "Supply") + radio = EnumValue(7, "Radio") + expendable = EnumValue(8, "Expendable") + sensor_emitter = EnumValue(9, "Sensor/Emitter") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/entity_marking_character_set.py b/dis/siso_ref_010/enums/entity_marking_character_set.py new file mode 100644 index 0000000..ba8b1b1 --- /dev/null +++ b/dis/siso_ref_010/enums/entity_marking_character_set.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 45, + * marshal size 8; + * EntityMarkingCharacterSet has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class EntityMarkingCharacterSet(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + unused = EnumValue(0, "Unused") + ascii = EnumValue(1, "ASCII") + us_army_marking = EnumValue(2, "U.S. Army Marking") + digit_chevron = EnumValue(3, "Digit Chevron") + default = unused + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/entity_vprecord_change_indicator.py b/dis/siso_ref_010/enums/entity_vprecord_change_indicator.py new file mode 100644 index 0000000..2feb742 --- /dev/null +++ b/dis/siso_ref_010/enums/entity_vprecord_change_indicator.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 320, + * marshal size 8; + * EntityVPRecordChangeIndicator has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class EntityVPRecordChangeIndicator(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + initial_report_or_no_change_since_last_issuance = EnumValue(0, "Initial Report or No Change Since Last Issuance") + change_since_last_issuance = EnumValue(1, "Change Since Last Issuance") + default = initial_report_or_no_change_since_last_issuance + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/environment_record_type_groups.py b/dis/siso_ref_010/enums/environment_record_type_groups.py new file mode 100644 index 0000000..61e4281 --- /dev/null +++ b/dis/siso_ref_010/enums/environment_record_type_groups.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 273, + * marshal size 8; + * EnvironmentRecordTypeGroups has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class EnvironmentRecordTypeGroups(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + state = EnumValue(0, "State") + geometry = EnumValue(1, "Geometry") + default = state + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/environmental_appearance.py b/dis/siso_ref_010/enums/environmental_appearance.py new file mode 100644 index 0000000..1cb6170 --- /dev/null +++ b/dis/siso_ref_010/enums/environmental_appearance.py @@ -0,0 +1,120 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_environmental_density import AppearanceEnvironmentalDensity +from .appearance_entityor_object_state import AppearanceEntityorObjectState + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 38, marshal size 32, + * EnvironmentalAppearance + */ + +""" + +class EnvironmentalAppearanceBitField(ctypes.Structure): + _fields_ = [ + # (bit position 16, length=4) Describes the density, use {@link AppearanceEnvironmentalDensity} values for this field + ("_density", UByte, 4), + + # (bit position 21, boolean) Describes whether the entity is frozen and should not be dead reckoned, use {@link UInt8} values for this field + ("_isFrozen", UByte, 1), + + # (bit position 23, boolean) Describes whether the entity is active or deactivated, use {@link AppearanceEntityorObjectState} values for this field + ("_state", UByte, 1), + + # (bit position 31, boolean) Describes whether or not the entity is masked or cloaked, use {@link UInt8} values for this field + ("_maskedCloaked", UByte, 1) + ] + +class EnvironmentalAppearance(ctypes.Union): + _fields_ = [ + ("capabilities", EnvironmentalAppearanceBitField), + ("asbyte", UInt8) + ] + + def set_density(self, value : AppearanceEnvironmentalDensity): + self.capabilities._density = int(value) + def get_density(self) -> AppearanceEnvironmentalDensity: + return AppearanceEnvironmentalDensity.get_enum(self._density) + Density = property(get_density, set_density) + + def set_isFrozen(self, value : UInt8): + self.capabilities._isFrozen = int(value) + def get_isFrozen(self) -> UInt8: + return self.capabilities._isFrozen + IsFrozen = property(get_isFrozen, set_isFrozen) + + def set_state(self, value : AppearanceEntityorObjectState): + self.capabilities._state = int(value) + def get_state(self) -> AppearanceEntityorObjectState: + return AppearanceEntityorObjectState.get_enum(self._state) + State = property(get_state, set_state) + + def set_maskedCloaked(self, value : UInt8): + self.capabilities._maskedCloaked = int(value) + def get_maskedCloaked(self) -> UInt8: + return self.capabilities._maskedCloaked + MaskedCloaked = property(get_maskedCloaked, set_maskedCloaked) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Density : " + self.Density.get_description + "\n" + outputStream += "IsFrozen : " + str(self.IsFrozen) + "\n" + outputStream += "State : " + self.State.get_description + "\n" + outputStream += "MaskedCloaked : " + str(self.MaskedCloaked) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/environmental_capabilities.py b/dis/siso_ref_010/enums/environmental_capabilities.py new file mode 100644 index 0000000..454304c --- /dev/null +++ b/dis/siso_ref_010/enums/environmental_capabilities.py @@ -0,0 +1,98 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 457, marshal size 32, + * EnvironmentalCapabilities + */ + +""" + +class EnvironmentalCapabilitiesBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=5) This entry is reserved for backward compatibility and may not be reused, use {@link UInt8} values for this field + ("_reserved", UByte, 5), + + # (bit position 7, boolean) The Entity is an IED or contains an IED. The extended appearance record (if available) will identify how well hidden the IED is on the Entity. An Attached Part (if applicable, for instance a jury-rigged munition does not apply here) will identify the IED explicitly., use {@link UInt8} values for this field + ("_iEDPresenceIndicator", UByte, 1) + ] + +class EnvironmentalCapabilities(ctypes.Union): + _fields_ = [ + ("capabilities", EnvironmentalCapabilitiesBitField), + ("asbyte", UInt8) + ] + + def set_reserved(self, value : UInt8): + self.capabilities._reserved = int(value) + def get_reserved(self) -> UInt8: + return self.capabilities._reserved + Reserved = property(get_reserved, set_reserved) + + def set_iEDPresenceIndicator(self, value : UInt8): + self.capabilities._iEDPresenceIndicator = int(value) + def get_iEDPresenceIndicator(self) -> UInt8: + return self.capabilities._iEDPresenceIndicator + IEDPresenceIndicator = property(get_iEDPresenceIndicator, set_iEDPresenceIndicator) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Reserved : " + str(self.Reserved) + "\n" + outputStream += "IEDPresenceIndicator : " + str(self.IEDPresenceIndicator) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/environmental_process_environment_status.py b/dis/siso_ref_010/enums/environmental_process_environment_status.py new file mode 100644 index 0000000..b312332 --- /dev/null +++ b/dis/siso_ref_010/enums/environmental_process_environment_status.py @@ -0,0 +1,98 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 249, marshal size 8, + * EnvironmentalProcessEnvironmentStatus + */ + +""" + +class EnvironmentalProcessEnvironmentStatusBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Indicates that the current update shall be the last update for the specified process, use {@link UInt8} values for this field + ("_isLast", UByte, 1), + + # (bit position 1, boolean) Describes whether the environmental process is active or not, use {@link UInt8} values for this field + ("_isActive", UByte, 1) + ] + +class EnvironmentalProcessEnvironmentStatus(ctypes.Union): + _fields_ = [ + ("capabilities", EnvironmentalProcessEnvironmentStatusBitField), + ("asbyte", UInt8) + ] + + def set_isLast(self, value : UInt8): + self.capabilities._isLast = int(value) + def get_isLast(self) -> UInt8: + return self.capabilities._isLast + IsLast = property(get_isLast, set_isLast) + + def set_isActive(self, value : UInt8): + self.capabilities._isActive = int(value) + def get_isActive(self) -> UInt8: + return self.capabilities._isActive + IsActive = property(get_isActive, set_isActive) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "IsLast : " + str(self.IsLast) + "\n" + outputStream += "IsActive : " + str(self.IsActive) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/environmental_process_model_type.py b/dis/siso_ref_010/enums/environmental_process_model_type.py new file mode 100644 index 0000000..6c8b591 --- /dev/null +++ b/dis/siso_ref_010/enums/environmental_process_model_type.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 248, + * marshal size 8; + * EnvironmentalProcessModelType has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class EnvironmentalProcessModelType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/environmental_process_record_type.py b/dis/siso_ref_010/enums/environmental_process_record_type.py new file mode 100644 index 0000000..21d9795 --- /dev/null +++ b/dis/siso_ref_010/enums/environmental_process_record_type.py @@ -0,0 +1,154 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 250, + * marshal size 32; + * EnvironmentalProcessRecordType has 19 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class EnvironmentalProcessRecordType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + combic_state = EnumValue(256, "COMBIC State") + flare_state = EnumValue(259, "Flare State") + bounding_sphere_record = EnumValue(65536, "Bounding Sphere Record") + uniform_geometry_record = EnumValue(327680, "Uniform Geometry Record") + point_record_1 = EnumValue(655360, "Point Record 1") + line_record_1 = EnumValue(786432, "Line Record 1") + sphere_record_1 = EnumValue(851968, "Sphere Record 1") + ellipsoid_record_1 = EnumValue(1048576, "Ellipsoid Record 1") + cone_record_1 = EnumValue(3145728, "Cone Record 1") + rectangular_volume_record_1 = EnumValue(5242880, "Rectangular Volume Record 1") + rectangular_volume_record_3 = EnumValue(83886080, "Rectangular Volume Record 3") + point_record_2 = EnumValue(167772160, "Point Record 2") + line_record_2 = EnumValue(201326592, "Line Record 2") + sphere_record_2 = EnumValue(218103808, "Sphere Record 2") + ellipsoid_record_2 = EnumValue(268435456, "Ellipsoid Record 2") + cone_record_2 = EnumValue(805306368, "Cone Record 2") + rectangular_volume_record_2 = EnumValue(1342177280, "Rectangular Volume Record 2") + gaussian_plume_record = EnumValue(1610612736, "Gaussian Plume Record") + gaussian_puff_record = EnumValue(1879048192, "Gaussian Puff Record") + default = combic_state + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/environmental_subcategory.py b/dis/siso_ref_010/enums/environmental_subcategory.py new file mode 100644 index 0000000..7f8f9e3 --- /dev/null +++ b/dis/siso_ref_010/enums/environmental_subcategory.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 21, + * marshal size 8; + * EnvironmentalSubcategory has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class EnvironmentalSubcategory(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + very_small = EnumValue(20, "Very Small") + small = EnumValue(40, "Small") + medium = EnumValue(60, "Medium") + large = EnumValue(80, "Large") + very_large = EnumValue(100, "Very Large") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/event_report_event_type.py b/dis/siso_ref_010/enums/event_report_event_type.py new file mode 100644 index 0000000..33025a1 --- /dev/null +++ b/dis/siso_ref_010/enums/event_report_event_type.py @@ -0,0 +1,154 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 73, + * marshal size 32; + * EventReportEventType has 19 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class EventReportEventType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + ran_out_of_ammunition = EnumValue(2, "Ran Out of Ammunition") + killed_in_action_kia = EnumValue(3, "Killed in Action (KIA)") + damage = EnumValue(4, "Damage") + mobility_disabled = EnumValue(5, "Mobility Disabled") + fire_disabled = EnumValue(6, "Fire Disabled") + ran_out_of_fuel = EnumValue(7, "Ran Out of Fuel") + entity_initialization = EnumValue(8, "Entity Initialization") + request_for_indirect_fire_or_cas_mission = EnumValue(9, "Request for Indirect Fire or CAS Mission") + indirect_fire_or_cas_fire = EnumValue(10, "Indirect Fire or CAS Fire") + minefield_entry = EnumValue(11, "Minefield Entry") + minefield_detonation = EnumValue(12, "Minefield Detonation") + vehicle_master_power_on = EnumValue(13, "Vehicle Master Power On") + vehicle_master_power_off = EnumValue(14, "Vehicle Master Power Off") + aggregate_state_change_requested = EnumValue(15, "Aggregate State Change Requested") + prevent_collision_detonation = EnumValue(16, "Prevent Collision / Detonation") + ownership_report = EnumValue(17, "Ownership Report") + radar_perception = EnumValue(18, "Radar Perception") + detect = EnumValue(19, "Detect") + default = other + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/expendable_air_category.py b/dis/siso_ref_010/enums/expendable_air_category.py new file mode 100644 index 0000000..90f5e20 --- /dev/null +++ b/dis/siso_ref_010/enums/expendable_air_category.py @@ -0,0 +1,147 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 25, + * marshal size 8; + * ExpendableAirCategory has 12 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ExpendableAirCategory(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + chaff = EnumValue(1, "Chaff") + flare = EnumValue(2, "Flare") + combined_chaff_and_flare = EnumValue(3, "Combined Chaff and Flare") + active_emitter = EnumValue(4, "Active Emitter") + passive_decoy = EnumValue(5, "Passive Decoy") + winged_decoy = EnumValue(6, "Winged Decoy") + signal_illumination_flare = EnumValue(7, "Signal/Illumination Flare") + smoke_generator = EnumValue(8, "Smoke Generator") + combined_flare_and_smoke_generator = EnumValue(12, "Combined Flare and Smoke Generator") + sar_night_light_srnl = EnumValue(13, "SAR Night Light (SRNL)") + sar_buoy = EnumValue(14, "SAR Buoy") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/expendable_appearance.py b/dis/siso_ref_010/enums/expendable_appearance.py new file mode 100644 index 0000000..0ee255e --- /dev/null +++ b/dis/siso_ref_010/enums/expendable_appearance.py @@ -0,0 +1,204 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_damage import AppearanceDamage +from .parachute import Parachute +from .flare_smoke_color import FlareSmokeColor +from .flare_smoke_status import FlareSmokeStatus +from .appearance_entityor_object_state import AppearanceEntityorObjectState +from .spot_chaff_status import SpotChaffStatus + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 42, marshal size 32, + * ExpendableAppearance + */ + +""" + +class ExpendableAppearanceBitField(ctypes.Structure): + _fields_ = [ + # (bit position 3, length=2) Describes the damaged appearance, use {@link AppearanceDamage} values for this field + ("_damage", UByte, 2), + + # (bit position 5, boolean) Describes whether or not smoke is emanating from the entity, use {@link UInt8} values for this field + ("_isSmokeEmanating", UByte, 1), + + # (bit position 7, length=2) Describes the status of a flare's parachute, use {@link Parachute} values for this field + ("_parachuteStatus", UByte, 2), + + # (bit position 9, length=3) Describes the color of a flare's light output or the color of smoke emanating from a smoke expendable, use {@link FlareSmokeColor} values for this field + ("_flareSmokeColor", UByte, 3), + + # (bit position 15, boolean) Describes whether the entity is burning and flames are visible, use {@link UInt8} values for this field + ("_isFlaming", UByte, 1), + + # (bit position 16, boolean) Describes whether or not launch flash is present, use {@link UInt8} values for this field + ("_launchFlashPresent", UByte, 1), + + # (bit position 17, length=2) Describes the status of a flare or smoke expendable, use {@link FlareSmokeStatus} values for this field + ("_flareSmokeStatus", UByte, 2), + + # (bit position 21, boolean) Describes whether the entity is frozen and should not be dead reckoned, use {@link UInt8} values for this field + ("_isFrozen", UByte, 1), + + # (bit position 22, boolean) Describes whether the power plant is on or off, use {@link UInt8} values for this field + ("_powerPlantOn", UByte, 1), + + # (bit position 23, boolean) Describes whether the entity is active or deactivated, use {@link AppearanceEntityorObjectState} values for this field + ("_state", UByte, 1), + + # (bit position 24, length=2) Describes the status of spot chaff, use {@link SpotChaffStatus} values for this field + ("_spotChaffStatus", UByte, 2), + + # (bit position 31, boolean) Describes whether or not the entity is masked or cloaked, use {@link UInt8} values for this field + ("_maskedCloaked", UByte, 1) + ] + +class ExpendableAppearance(ctypes.Union): + _fields_ = [ + ("capabilities", ExpendableAppearanceBitField), + ("asbyte", UInt8) + ] + + def set_damage(self, value : AppearanceDamage): + self.capabilities._damage = int(value) + def get_damage(self) -> AppearanceDamage: + return AppearanceDamage.get_enum(self._damage) + Damage = property(get_damage, set_damage) + + def set_isSmokeEmanating(self, value : UInt8): + self.capabilities._isSmokeEmanating = int(value) + def get_isSmokeEmanating(self) -> UInt8: + return self.capabilities._isSmokeEmanating + IsSmokeEmanating = property(get_isSmokeEmanating, set_isSmokeEmanating) + + def set_parachuteStatus(self, value : Parachute): + self.capabilities._parachuteStatus = int(value) + def get_parachuteStatus(self) -> Parachute: + return Parachute.get_enum(self._parachuteStatus) + ParachuteStatus = property(get_parachuteStatus, set_parachuteStatus) + + def set_flareSmokeColor(self, value : FlareSmokeColor): + self.capabilities._flareSmokeColor = int(value) + def get_flareSmokeColor(self) -> FlareSmokeColor: + return FlareSmokeColor.get_enum(self._flareSmokeColor) + FlareSmokeColor = property(get_flareSmokeColor, set_flareSmokeColor) + + def set_isFlaming(self, value : UInt8): + self.capabilities._isFlaming = int(value) + def get_isFlaming(self) -> UInt8: + return self.capabilities._isFlaming + IsFlaming = property(get_isFlaming, set_isFlaming) + + def set_launchFlashPresent(self, value : UInt8): + self.capabilities._launchFlashPresent = int(value) + def get_launchFlashPresent(self) -> UInt8: + return self.capabilities._launchFlashPresent + LaunchFlashPresent = property(get_launchFlashPresent, set_launchFlashPresent) + + def set_flareSmokeStatus(self, value : FlareSmokeStatus): + self.capabilities._flareSmokeStatus = int(value) + def get_flareSmokeStatus(self) -> FlareSmokeStatus: + return FlareSmokeStatus.get_enum(self._flareSmokeStatus) + FlareSmokeStatus = property(get_flareSmokeStatus, set_flareSmokeStatus) + + def set_isFrozen(self, value : UInt8): + self.capabilities._isFrozen = int(value) + def get_isFrozen(self) -> UInt8: + return self.capabilities._isFrozen + IsFrozen = property(get_isFrozen, set_isFrozen) + + def set_powerPlantOn(self, value : UInt8): + self.capabilities._powerPlantOn = int(value) + def get_powerPlantOn(self) -> UInt8: + return self.capabilities._powerPlantOn + PowerPlantOn = property(get_powerPlantOn, set_powerPlantOn) + + def set_state(self, value : AppearanceEntityorObjectState): + self.capabilities._state = int(value) + def get_state(self) -> AppearanceEntityorObjectState: + return AppearanceEntityorObjectState.get_enum(self._state) + State = property(get_state, set_state) + + def set_spotChaffStatus(self, value : SpotChaffStatus): + self.capabilities._spotChaffStatus = int(value) + def get_spotChaffStatus(self) -> SpotChaffStatus: + return SpotChaffStatus.get_enum(self._spotChaffStatus) + SpotChaffStatus = property(get_spotChaffStatus, set_spotChaffStatus) + + def set_maskedCloaked(self, value : UInt8): + self.capabilities._maskedCloaked = int(value) + def get_maskedCloaked(self) -> UInt8: + return self.capabilities._maskedCloaked + MaskedCloaked = property(get_maskedCloaked, set_maskedCloaked) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Damage : " + self.Damage.get_description + "\n" + outputStream += "IsSmokeEmanating : " + str(self.IsSmokeEmanating) + "\n" + outputStream += "ParachuteStatus : " + self.ParachuteStatus.get_description + "\n" + outputStream += "FlareSmokeColor : " + self.FlareSmokeColor.get_description + "\n" + outputStream += "IsFlaming : " + str(self.IsFlaming) + "\n" + outputStream += "LaunchFlashPresent : " + str(self.LaunchFlashPresent) + "\n" + outputStream += "FlareSmokeStatus : " + self.FlareSmokeStatus.get_description + "\n" + outputStream += "IsFrozen : " + str(self.IsFrozen) + "\n" + outputStream += "PowerPlantOn : " + str(self.PowerPlantOn) + "\n" + outputStream += "State : " + self.State.get_description + "\n" + outputStream += "SpotChaffStatus : " + self.SpotChaffStatus.get_description + "\n" + outputStream += "MaskedCloaked : " + str(self.MaskedCloaked) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/expendable_capabilities.py b/dis/siso_ref_010/enums/expendable_capabilities.py new file mode 100644 index 0000000..45d79cf --- /dev/null +++ b/dis/siso_ref_010/enums/expendable_capabilities.py @@ -0,0 +1,88 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 461, marshal size 32, + * ExpendableCapabilities + */ + +""" + +class ExpendableCapabilitiesBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=5) This entry is reserved for backward compatibility and may not be reused, use {@link UInt8} values for this field + ("_reserved", UByte, 5) + ] + +class ExpendableCapabilities(ctypes.Union): + _fields_ = [ + ("capabilities", ExpendableCapabilitiesBitField), + ("asbyte", UInt8) + ] + + def set_reserved(self, value : UInt8): + self.capabilities._reserved = int(value) + def get_reserved(self) -> UInt8: + return self.capabilities._reserved + Reserved = property(get_reserved, set_reserved) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Reserved : " + str(self.Reserved) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/expendable_subsurface_category.py b/dis/siso_ref_010/enums/expendable_subsurface_category.py new file mode 100644 index 0000000..8458179 --- /dev/null +++ b/dis/siso_ref_010/enums/expendable_subsurface_category.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 27, + * marshal size 8; + * ExpendableSubsurfaceCategory has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ExpendableSubsurfaceCategory(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + active_emitter = EnumValue(4, "Active emitter") + passive_decoy = EnumValue(5, "Passive decoy") + signal = EnumValue(7, "Signal") + noise_maker_decoy = EnumValue(9, "Noise-Maker Decoy") + bubble_maker_decoy = EnumValue(10, "Bubble-Maker Decoy") + multi_mode_decoy = EnumValue(11, "Multi-Mode Decoy") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/expendable_surface_category.py b/dis/siso_ref_010/enums/expendable_surface_category.py new file mode 100644 index 0000000..94ad752 --- /dev/null +++ b/dis/siso_ref_010/enums/expendable_surface_category.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 26, + * marshal size 8; + * ExpendableSurfaceCategory has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ExpendableSurfaceCategory(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + flare = EnumValue(2, "Flare") + active_emitter = EnumValue(4, "Active Emitter") + passive_decoy = EnumValue(5, "Passive Decoy") + smoke_generator = EnumValue(8, "Smoke Generator") + combined_flare_and_smoke_generator = EnumValue(12, "Combined Flare and Smoke Generator") + sar_buoy = EnumValue(14, "SAR Buoy") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/explosive_material_categories.py b/dis/siso_ref_010/enums/explosive_material_categories.py new file mode 100644 index 0000000..b96f7fd --- /dev/null +++ b/dis/siso_ref_010/enums/explosive_material_categories.py @@ -0,0 +1,180 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 310, + * marshal size 16; + * ExplosiveMaterialCategories has 45 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ExplosiveMaterialCategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + avgas_aviation_gas = EnumValue(10, "AVGAS (Aviation Gas)") + jet_fuel_unspecified = EnumValue(11, "Jet Fuel (Unspecified)") + jp_4_f_40_jet_b = EnumValue(12, "JP-4 (F-40/JET B)") + jp_5_f_44_jet_a = EnumValue(13, "JP-5 (F-44/JET A)") + jp_7 = EnumValue(14, "JP-7") + jp_8_f_34_jet_a_1 = EnumValue(15, "JP-8 (F-34/JET A-1)") + jp_10_missile_fuel = EnumValue(16, "JP-10 Missile Fuel") + jpts = EnumValue(17, "JPTS") + jet_a = EnumValue(18, "Jet A") + jet_a_1 = EnumValue(19, "Jet A-1") + jet_b = EnumValue(20, "Jet B") + jet_biofuel = EnumValue(21, "Jet Biofuel") + gasoline_petrol_unspecified_octane = EnumValue(151, "Gasoline/Petrol (Unspecified Octane)") + diesel_fuel_unspecified_grade = EnumValue(152, "Diesel Fuel (Unspecified Grade)") + ethanol = EnumValue(153, "Ethanol") + e85_ethanol = EnumValue(154, "E85 Ethanol") + fuel_oil = EnumValue(155, "Fuel Oil") + kerosene = EnumValue(156, "Kerosene") + crude_oil_unspecified = EnumValue(157, "Crude Oil (Unspecified)") + light_crude_oil = EnumValue(158, "Light Crude Oil") + liquid_petroleum_gas_lpg = EnumValue(159, "Liquid Petroleum Gas (LPG)") + rp_1_rocket_fuel = EnumValue(160, "RP-1 Rocket Fuel") + lh_2_rocket_fuel = EnumValue(161, "LH-2 Rocket Fuel") + lox_rocket_fuel = EnumValue(162, "LOX Rocket Fuel") + alcohol = EnumValue(164, "Alcohol") + hydrogen_liquid = EnumValue(166, "Hydrogen (Liquid)") + nitroglycerin_ng = EnumValue(301, "Nitroglycerin (NG)") + anfo = EnumValue(302, "ANFO") + dynamite = EnumValue(451, "Dynamite") + tnt = EnumValue(452, "TNT") + rdx = EnumValue(453, "RDX") + petn = EnumValue(454, "PETN") + hmx = EnumValue(455, "HMX") + c_4 = EnumValue(456, "C-4") + composition_c_4 = EnumValue(457, "Composition C-4") + natural_gas_ng = EnumValue(601, "Natural Gas (NG)") + butane = EnumValue(602, "Butane") + propane = EnumValue(603, "Propane") + helium = EnumValue(604, "Helium") + hydrogen_gaseous = EnumValue(605, "Hydrogen (Gaseous)") + dust_unspecified_type = EnumValue(801, "Dust (Unspecified Type)") + grain_dust = EnumValue(802, "Grain Dust") + flour_dust = EnumValue(803, "Flour Dust") + sugar_dust = EnumValue(804, "Sugar Dust") + default = no_statement + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/explosive_material_groups.py b/dis/siso_ref_010/enums/explosive_material_groups.py new file mode 100644 index 0000000..c41872c --- /dev/null +++ b/dis/siso_ref_010/enums/explosive_material_groups.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 309, + * marshal size 8; + * ExplosiveMaterialGroups has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ExplosiveMaterialGroups(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + general = EnumValue(0, "General") + liquid_aviation_missile_fuels = EnumValue(1, "Liquid - Aviation/Missile Fuels") + liquid_other_fuels = EnumValue(2, "Liquid - Other Fuels") + liquid_explosive_material = EnumValue(3, "Liquid Explosive Material") + solid = EnumValue(4, "Solid") + gaseous = EnumValue(5, "Gaseous") + dust_material = EnumValue(6, "Dust Material") + default = general + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/flare_smoke_color.py b/dis/siso_ref_010/enums/flare_smoke_color.py new file mode 100644 index 0000000..9001669 --- /dev/null +++ b/dis/siso_ref_010/enums/flare_smoke_color.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 402, + * marshal size 3; + * FlareSmokeColor has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class FlareSmokeColor(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + white = EnumValue(0, "White") + red = EnumValue(1, "Red") + green = EnumValue(2, "Green") + ir = EnumValue(3, "IR") + default = white + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/flare_smoke_status.py b/dis/siso_ref_010/enums/flare_smoke_status.py new file mode 100644 index 0000000..7ffeffe --- /dev/null +++ b/dis/siso_ref_010/enums/flare_smoke_status.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 403, + * marshal size 2; + * FlareSmokeStatus has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class FlareSmokeStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_ignited = EnumValue(0, "Not Ignited") + burning = EnumValue(1, "Burning") + burned_out = EnumValue(2, "Burned Out") + default = not_ignited + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/force_id.py b/dis/siso_ref_010/enums/force_id.py new file mode 100644 index 0000000..ee9901e --- /dev/null +++ b/dis/siso_ref_010/enums/force_id.py @@ -0,0 +1,166 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 6, + * marshal size 8; + * ForceID has 31 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ForceID(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + friendly = EnumValue(1, "Friendly") + opposing = EnumValue(2, "Opposing") + neutral = EnumValue(3, "Neutral") + friendly_2 = EnumValue(4, "Friendly 2") + opposing_2 = EnumValue(5, "Opposing 2") + neutral_2 = EnumValue(6, "Neutral 2") + friendly_3 = EnumValue(7, "Friendly 3") + opposing_3 = EnumValue(8, "Opposing 3") + neutral_3 = EnumValue(9, "Neutral 3") + friendly_4 = EnumValue(10, "Friendly 4") + opposing_4 = EnumValue(11, "Opposing 4") + neutral_4 = EnumValue(12, "Neutral 4") + friendly_5 = EnumValue(13, "Friendly 5") + opposing_5 = EnumValue(14, "Opposing 5") + neutral_5 = EnumValue(15, "Neutral 5") + friendly_6 = EnumValue(16, "Friendly 6") + opposing_6 = EnumValue(17, "Opposing 6") + neutral_6 = EnumValue(18, "Neutral 6") + friendly_7 = EnumValue(19, "Friendly 7") + opposing_7 = EnumValue(20, "Opposing 7") + neutral_7 = EnumValue(21, "Neutral 7") + friendly_8 = EnumValue(22, "Friendly 8") + opposing_8 = EnumValue(23, "Opposing 8") + neutral_8 = EnumValue(24, "Neutral 8") + friendly_9 = EnumValue(25, "Friendly 9") + opposing_9 = EnumValue(26, "Opposing 9") + neutral_9 = EnumValue(27, "Neutral 9") + friendly_10 = EnumValue(28, "Friendly 10") + opposing_10 = EnumValue(29, "Opposing 10") + neutral_10 = EnumValue(30, "Neutral 10") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/format_type.py b/dis/siso_ref_010/enums/format_type.py new file mode 100644 index 0000000..0009ed0 --- /dev/null +++ b/dis/siso_ref_010/enums/format_type.py @@ -0,0 +1,149 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 363, + * marshal size 5; + * FormatType has 14 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class FormatType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_data = EnumValue(0, "No Data") + identity_format = EnumValue(4, "Identity Format") + surface_format_5_meter_rnp = EnumValue(5, "Surface Format, 5 meter RNP") + surface_format_100_meter_rnp = EnumValue(6, "Surface Format, 100 meter RNP") + airborne_format_5_meter_rnp_25_foot_barometric_altitude = EnumValue(7, "Airborne Format, 5 meter RNP, 25-foot Barometric Altitude") + airborne_format_100_meter_rnp_25_foot_barometric_altitude = EnumValue(8, "Airborne Format, 100 meter RNP, 25-foot Barometric Altitude") + airborne_format_025_nmi_rnp_25_foot_barometric_altitude = EnumValue(9, "Airborne Format, 0.25 nmi RNP, 25-foot Barometric Altitude") + airborne_format_10_nmi_rnp_25_foot_barometric_altitude = EnumValue(10, "Airborne Format, 1.0 nmi RNP, 25-foot Barometric Altitude") + airborne_format_5_meter_rnp_100_foot_barometric_altitude = EnumValue(11, "Airborne Format, 5 meter RNP, 100-foot Barometric Altitude") + airborne_format_100_meter_rnp_100_foot_barometric_altitude = EnumValue(12, "Airborne Format, 100 meter RNP, 100-foot Barometric Altitude") + airborne_format_025_nmi_rnp_100_foot_barometric_altitude = EnumValue(13, "Airborne Format, 0.25 nmi RNP, 100-foot Barometric Altitude") + airborne_format_10_nmi_rnp_100_foot_barometric_altitude = EnumValue(14, "Airborne Format, 1.0 nmi RNP, 100-foot Barometric Altitude") + airborne_format_5_meter_rnp_gps_height = EnumValue(15, "Airborne Format, 5 meter RNP, GPS Height") + airborne_format_100_meter_rnp_gps_height = EnumValue(16, "Airborne Format, 100 meter RNP, GPS Height") + default = no_data + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/fuel_location.py b/dis/siso_ref_010/enums/fuel_location.py new file mode 100644 index 0000000..de4eeab --- /dev/null +++ b/dis/siso_ref_010/enums/fuel_location.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 329, + * marshal size 8; + * FuelLocation has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class FuelLocation(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/fuel_measurement_units.py b/dis/siso_ref_010/enums/fuel_measurement_units.py new file mode 100644 index 0000000..4ff41df --- /dev/null +++ b/dis/siso_ref_010/enums/fuel_measurement_units.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 328, + * marshal size 8; + * FuelMeasurementUnits has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class FuelMeasurementUnits(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + liter = EnumValue(1, "Liter") + kilogram = EnumValue(2, "Kilogram") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/grid_axis_descriptor_axis_type.py b/dis/siso_ref_010/enums/grid_axis_descriptor_axis_type.py new file mode 100644 index 0000000..e803b14 --- /dev/null +++ b/dis/siso_ref_010/enums/grid_axis_descriptor_axis_type.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 377, + * marshal size 8; + * GridAxisDescriptorAxisType has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class GridAxisDescriptorAxisType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + regular_axis = EnumValue(0, "Regular Axis") + irregular_axis = EnumValue(1, "Irregular Axis") + default = regular_axis + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/gridded_data_constant_grid.py b/dis/siso_ref_010/enums/gridded_data_constant_grid.py new file mode 100644 index 0000000..cfa9139 --- /dev/null +++ b/dis/siso_ref_010/enums/gridded_data_constant_grid.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 245, + * marshal size 8; + * GriddedDataConstantGrid has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class GriddedDataConstantGrid(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + constant_grid = EnumValue(0, "Constant grid") + updated_grid = EnumValue(1, "Updated grid") + default = constant_grid + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/gridded_data_coordinate_system.py b/dis/siso_ref_010/enums/gridded_data_coordinate_system.py new file mode 100644 index 0000000..36bd6f7 --- /dev/null +++ b/dis/siso_ref_010/enums/gridded_data_coordinate_system.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 244, + * marshal size 16; + * GriddedDataCoordinateSystem has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class GriddedDataCoordinateSystem(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + right_handed_cartesian_local_topographic_projection_east_north_up = EnumValue(0, "Right handed Cartesian (local topographic projection: east, north, up)") + left_handed_cartesian_local_topographic_projection_east_north_down = EnumValue(1, "Left handed Cartesian (local topographic projection: east, north, down)") + latitude_longitude_height = EnumValue(2, "Latitude, Longitude, Height") + latitude_longitude_depth = EnumValue(3, "Latitude, Longitude, Depth") + default = right_handed_cartesian_local_topographic_projection_east_north_up + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/gridded_data_data_representation.py b/dis/siso_ref_010/enums/gridded_data_data_representation.py new file mode 100644 index 0000000..37420c7 --- /dev/null +++ b/dis/siso_ref_010/enums/gridded_data_data_representation.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 247, + * marshal size 16; + * GriddedDataDataRepresentation has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class GriddedDataDataRepresentation(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + type_0 = EnumValue(0, "Type 0") + type_1 = EnumValue(1, "Type 1") + type_2 = EnumValue(2, "Type 2") + default = type_0 + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/gridded_data_field_number.py b/dis/siso_ref_010/enums/gridded_data_field_number.py new file mode 100644 index 0000000..b9d60d9 --- /dev/null +++ b/dis/siso_ref_010/enums/gridded_data_field_number.py @@ -0,0 +1,135 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 243, + * marshal size 16; + * GriddedDataFieldNumber has 0 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class GriddedDataFieldNumber(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + default = + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/gridded_data_sample_type.py b/dis/siso_ref_010/enums/gridded_data_sample_type.py new file mode 100644 index 0000000..e131525 --- /dev/null +++ b/dis/siso_ref_010/enums/gridded_data_sample_type.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 246, + * marshal size 16; + * GriddedDataSampleType has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class GriddedDataSampleType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_specified = EnumValue(0, "Not Specified") + default = not_specified + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/high_density_track_jam.py b/dis/siso_ref_010/enums/high_density_track_jam.py new file mode 100644 index 0000000..44d7d15 --- /dev/null +++ b/dis/siso_ref_010/enums/high_density_track_jam.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 79, + * marshal size 8; + * HighDensityTrackJam has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class HighDensityTrackJam(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_selected = EnumValue(0, "Not Selected") + selected = EnumValue(1, "Selected") + default = not_selected + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/high_fidelity_havequicktodtransmit_indicator.py b/dis/siso_ref_010/enums/high_fidelity_havequicktodtransmit_indicator.py new file mode 100644 index 0000000..12a9629 --- /dev/null +++ b/dis/siso_ref_010/enums/high_fidelity_havequicktodtransmit_indicator.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 297, + * marshal size 8; + * HighFidelityHAVEQUICKTODTransmitIndicator has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class HighFidelityHAVEQUICKTODTransmitIndicator(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_tod_is_being_transmitted = EnumValue(0, "No TOD Is Being Transmitted") + tod_transmission_in_progress = EnumValue(1, "TOD Transmission in Progress") + default = no_tod_is_being_transmitted + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/icapabilities.cs b/dis/siso_ref_010/enums/icapabilities.cs new file mode 100644 index 0000000..bb76a03 --- /dev/null +++ b/dis/siso_ref_010/enums/icapabilities.cs @@ -0,0 +1,21 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +using System; + + public interface ICapabilities + { + string ToString(); + Int32 GetMarshaledSize(); + void Marshal(dis.DataOutputStream dataOutputStream); + void Unmarshal(dis.DataInputStream dataInputStream); + } + + diff --git a/dis/siso_ref_010/enums/iffalternate_mode4challenge_reply.py b/dis/siso_ref_010/enums/iffalternate_mode4challenge_reply.py new file mode 100644 index 0000000..d58b932 --- /dev/null +++ b/dis/siso_ref_010/enums/iffalternate_mode4challenge_reply.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 96, + * marshal size 8; + * IFFAlternateMode4ChallengeReply has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IFFAlternateMode4ChallengeReply(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + valid = EnumValue(1, "Valid") + invalid = EnumValue(2, "Invalid") + no_response = EnumValue(3, "No response") + unable_to_verify = EnumValue(4, "Unable to Verify") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/iffapplicable_modes.py b/dis/siso_ref_010/enums/iffapplicable_modes.py new file mode 100644 index 0000000..f35bb2e --- /dev/null +++ b/dis/siso_ref_010/enums/iffapplicable_modes.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 339, + * marshal size 8; + * IFFApplicableModes has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IFFApplicableModes(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_applicable_modes_data = EnumValue(0, "No Applicable Modes Data") + all_modes = EnumValue(1, "All Modes") + default = no_applicable_modes_data + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/iffdata_record_available.py b/dis/siso_ref_010/enums/iffdata_record_available.py new file mode 100644 index 0000000..c36983d --- /dev/null +++ b/dis/siso_ref_010/enums/iffdata_record_available.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 360, + * marshal size 1; + * IFFDataRecordAvailable has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IFFDataRecordAvailable(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + compute_locally = EnumValue(0, "Compute Locally") + iff_data_record_available = EnumValue(1, "IFF Data Record Available") + default = compute_locally + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/ifflayer_specific_information.py b/dis/siso_ref_010/enums/ifflayer_specific_information.py new file mode 100644 index 0000000..93fd35f --- /dev/null +++ b/dis/siso_ref_010/enums/ifflayer_specific_information.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 87, + * marshal size 8; + * IFFLayerSpecificInformation has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IFFLayerSpecificInformation(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_layer_specific_information_is_present = EnumValue(0, "No Layer-Specific Information Is Present") + default = no_layer_specific_information_is_present + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/iffsimulation_mode.py b/dis/siso_ref_010/enums/iffsimulation_mode.py new file mode 100644 index 0000000..7e259fb --- /dev/null +++ b/dis/siso_ref_010/enums/iffsimulation_mode.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 338, + * marshal size 1; + * IFFSimulationMode has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IFFSimulationMode(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + regeneration = EnumValue(0, "Regeneration") + interactive = EnumValue(1, "Interactive") + default = regeneration + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/iffsystem_mode.py b/dis/siso_ref_010/enums/iffsystem_mode.py new file mode 100644 index 0000000..b8037fe --- /dev/null +++ b/dis/siso_ref_010/enums/iffsystem_mode.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 84, + * marshal size 8; + * IFFSystemMode has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IFFSystemMode(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + off = EnumValue(1, "Off") + standby = EnumValue(2, "Standby") + normal = EnumValue(3, "Normal") + emergency = EnumValue(4, "Emergency") + low_or_low_sensitivity = EnumValue(5, "Low or Low Sensitivity") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/iffsystem_name.py b/dis/siso_ref_010/enums/iffsystem_name.py new file mode 100644 index 0000000..2dbbb9b --- /dev/null +++ b/dis/siso_ref_010/enums/iffsystem_name.py @@ -0,0 +1,154 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 83, + * marshal size 16; + * IFFSystemName has 19 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IFFSystemName(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_used_invalid_value = EnumValue(0, "Not Used (Invalid Value)") + generic_mark_x = EnumValue(1, "Generic Mark X") + generic_mark_xii = EnumValue(2, "Generic Mark XII") + generic_atcrbs = EnumValue(3, "Generic ATCRBS") + generic_soviet = EnumValue(4, "Generic Soviet") + generic_mode_s = EnumValue(5, "Generic Mode S") + generic_mark_x_xii_atcrbs = EnumValue(6, "Generic Mark X/XII/ATCRBS") + generic_mark_x_xii_atcrbs_mode_s = EnumValue(7, "Generic Mark X/XII/ATCRBS/Mode S") + ari_5954_rrb = EnumValue(8, "ARI 5954 (RRB)") + ari_5983_rrb = EnumValue(9, "ARI 5983 (RRB)") + generic_rrb = EnumValue(10, "Generic RRB") + generic_mark_xiia = EnumValue(11, "Generic Mark XIIA") + generic_mode_5 = EnumValue(12, "Generic Mode 5") + generic_mark_xiia_combined_interrogator_transponder_cit = EnumValue(13, "Generic Mark XIIA Combined Interrogator/Transponder (CIT)") + generic_mark_xii_combined_interrogator_transponder_cit = EnumValue(14, "Generic Mark XII Combined Interrogator/Transponder (CIT)") + generic_tcas_i_acas_i_transceiver = EnumValue(15, "Generic TCAS I/ACAS I Transceiver") + generic_tcas_ii_acas_ii_transceiver = EnumValue(16, "Generic TCAS II/ACAS II Transceiver") + generic_mark_x_a = EnumValue(17, "Generic Mark X (A)") + generic_mark_x_sif = EnumValue(18, "Generic Mark X (SIF)") + default = not_used_invalid_value + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/iffsystem_type.py b/dis/siso_ref_010/enums/iffsystem_type.py new file mode 100644 index 0000000..260f300 --- /dev/null +++ b/dis/siso_ref_010/enums/iffsystem_type.py @@ -0,0 +1,150 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 82, + * marshal size 16; + * IFFSystemType has 15 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IFFSystemType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_used_invalid_value = EnumValue(0, "Not Used (Invalid Value)") + mark_x_xii_atcrbs_transponder = EnumValue(1, "Mark X/XII/ATCRBS Transponder") + mark_x_xii_atcrbs_interrogator = EnumValue(2, "Mark X/XII/ATCRBS Interrogator") + soviet_transponder = EnumValue(3, "Soviet Transponder") + soviet_interrogator = EnumValue(4, "Soviet Interrogator") + rrb_transponder = EnumValue(5, "RRB Transponder") + mark_xiia_interrogator = EnumValue(6, "Mark XIIA Interrogator") + mode_5_interrogator = EnumValue(7, "Mode 5 Interrogator") + mode_s_interrogator = EnumValue(8, "Mode S Interrogator") + mark_xiia_transponder = EnumValue(9, "Mark XIIA Transponder") + mode_5_transponder = EnumValue(10, "Mode 5 Transponder") + mode_s_transponder = EnumValue(11, "Mode S Transponder") + mark_xiia_combined_interrogator_transponder_cit = EnumValue(12, "Mark XIIA Combined Interrogator/Transponder (CIT)") + mark_xii_combined_interrogator_transponder_cit = EnumValue(13, "Mark XII Combined Interrogator/Transponder (CIT)") + tcas_acas_transceiver = EnumValue(14, "TCAS/ACAS Transceiver") + default = not_used_invalid_value + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/iffsystem_type1operational_parameter1.py b/dis/siso_ref_010/enums/iffsystem_type1operational_parameter1.py new file mode 100644 index 0000000..f2f9dad --- /dev/null +++ b/dis/siso_ref_010/enums/iffsystem_type1operational_parameter1.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 97, + * marshal size 8; + * IFFSystemType1OperationalParameter1 has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IFFSystemType1OperationalParameter1(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_operational_parameter_1_data = EnumValue(0, "No Operational Parameter 1 Data") + default = no_operational_parameter_1_data + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/iffsystem_type1operational_parameter2.py b/dis/siso_ref_010/enums/iffsystem_type1operational_parameter2.py new file mode 100644 index 0000000..353968e --- /dev/null +++ b/dis/siso_ref_010/enums/iffsystem_type1operational_parameter2.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 98, + * marshal size 8; + * IFFSystemType1OperationalParameter2 has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IFFSystemType1OperationalParameter2(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_operational_parameter_2_data = EnumValue(0, "No Operational Parameter 2 Data") + default = no_operational_parameter_2_data + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/intercom_control_command.py b/dis/siso_ref_010/enums/intercom_control_command.py new file mode 100644 index 0000000..005c964 --- /dev/null +++ b/dis/siso_ref_010/enums/intercom_control_command.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 182, + * marshal size 8; + * IntercomControlCommand has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IntercomControlCommand(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_command = EnumValue(0, "No Command") + status = EnumValue(1, "Status") + connect = EnumValue(2, "Connect") + disconnect = EnumValue(3, "Disconnect") + reset = EnumValue(4, "Reset") + on = EnumValue(5, "On") + off = EnumValue(6, "Off") + default = no_command + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/intercom_control_communications_class.py b/dis/siso_ref_010/enums/intercom_control_communications_class.py new file mode 100644 index 0000000..1e271da --- /dev/null +++ b/dis/siso_ref_010/enums/intercom_control_communications_class.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 416, + * marshal size 1; + * IntercomControlCommunicationsClass has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IntercomControlCommunicationsClass(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + simulated_communications_channel = EnumValue(0, "Simulated Communications Channel") + simulation_support_communications_channel = EnumValue(1, "Simulation Support Communications Channel") + default = simulated_communications_channel + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/intercom_control_communications_type.py b/dis/siso_ref_010/enums/intercom_control_communications_type.py new file mode 100644 index 0000000..b1f17b1 --- /dev/null +++ b/dis/siso_ref_010/enums/intercom_control_communications_type.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 181, + * marshal size 7; + * IntercomControlCommunicationsType has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IntercomControlCommunicationsType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + reserved = EnumValue(0, "Reserved") + connection_fdx = EnumValue(1, "Connection FDX") + connection_hdx_destination_is_receive_only = EnumValue(2, "Connection HDX - Destination is Receive Only") + connection_hdx_destination_is_transmit_only = EnumValue(3, "Connection HDX - Destination is Transmit Only") + connection_hdx = EnumValue(4, "Connection HDX") + default = reserved + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/intercom_control_control_type.py b/dis/siso_ref_010/enums/intercom_control_control_type.py new file mode 100644 index 0000000..739bc19 --- /dev/null +++ b/dis/siso_ref_010/enums/intercom_control_control_type.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 180, + * marshal size 8; + * IntercomControlControlType has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IntercomControlControlType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + reserved = EnumValue(0, "Reserved") + status = EnumValue(1, "Status") + request_acknowledge_required = EnumValue(2, "Request - Acknowledge Required") + request_no_acknowledge = EnumValue(3, "Request - No Acknowledge") + ack_request_granted = EnumValue(4, "Ack - Request Granted") + nack_request_denied = EnumValue(5, "Nack - Request Denied") + default = reserved + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/intercom_control_destination_line_state_command.py b/dis/siso_ref_010/enums/intercom_control_destination_line_state_command.py new file mode 100644 index 0000000..ceb231e --- /dev/null +++ b/dis/siso_ref_010/enums/intercom_control_destination_line_state_command.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 184, + * marshal size 8; + * IntercomControlDestinationLineStateCommand has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IntercomControlDestinationLineStateCommand(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + none = EnumValue(0, "None") + set_line_state_transmitting = EnumValue(1, "Set Line State - Transmitting") + set_line_state_not_transmitting = EnumValue(2, "Set Line State - Not Transmitting") + return_to_local_line_state_control = EnumValue(3, "Return to Local Line State Control") + default = none + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/intercom_control_record_type.py b/dis/siso_ref_010/enums/intercom_control_record_type.py new file mode 100644 index 0000000..28eeb95 --- /dev/null +++ b/dis/siso_ref_010/enums/intercom_control_record_type.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 185, + * marshal size 16; + * IntercomControlRecordType has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IntercomControlRecordType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + specific_destination_record = EnumValue(1, "Specific Destination record") + group_destination_record = EnumValue(2, "Group Destination record") + group_assignment_record = EnumValue(3, "Group Assignment record") + default = specific_destination_record + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/intercom_control_transmit_line_state.py b/dis/siso_ref_010/enums/intercom_control_transmit_line_state.py new file mode 100644 index 0000000..73f41aa --- /dev/null +++ b/dis/siso_ref_010/enums/intercom_control_transmit_line_state.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 183, + * marshal size 8; + * IntercomControlTransmitLineState has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IntercomControlTransmitLineState(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + transmit_line_state_not_applicable = EnumValue(0, "Transmit Line State not applicable") + not_transmitting = EnumValue(1, "Not Transmitting") + transmitting = EnumValue(2, "Transmitting") + default = transmit_line_state_not_applicable + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/ioaction_ioaction_phase.py b/dis/siso_ref_010/enums/ioaction_ioaction_phase.py new file mode 100644 index 0000000..79fdc08 --- /dev/null +++ b/dis/siso_ref_010/enums/ioaction_ioaction_phase.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 288, + * marshal size 16; + * IOActionIOActionPhase has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IOActionIOActionPhase(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + start_attack_profile = EnumValue(1, "Start Attack Profile") + end_attack_profile = EnumValue(2, "End Attack Profile") + continue_attack_profile_with_changes = EnumValue(3, "Continue Attack Profile with Changes") + start_attack_effects = EnumValue(4, "Start Attack Effects") + end_attacked_effects = EnumValue(5, "End Attacked Effects") + continue_attack_effects_with_changes = EnumValue(6, "Continue Attack Effects with Changes") + default = no_statement + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/ioaction_ioaction_type.py b/dis/siso_ref_010/enums/ioaction_ioaction_type.py new file mode 100644 index 0000000..120f72a --- /dev/null +++ b/dis/siso_ref_010/enums/ioaction_ioaction_type.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 287, + * marshal size 16; + * IOActionIOActionType has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IOActionIOActionType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + io_attack_profile_data_parametrics = EnumValue(1, "IO Attack - Profile Data (Parametrics)") + io_attack_computed_effects = EnumValue(2, "IO Attack - Computed Effects") + intent_based_ew = EnumValue(3, "Intent-Based-EW") + intent_based_ew_computed_effects = EnumValue(4, "Intent-Based-EW - Computed Effects") + default = no_statement + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/ioaction_iosimulation_source.py b/dis/siso_ref_010/enums/ioaction_iosimulation_source.py new file mode 100644 index 0000000..0c734c8 --- /dev/null +++ b/dis/siso_ref_010/enums/ioaction_iosimulation_source.py @@ -0,0 +1,116 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 286, marshal size 16; + * IOActionIOSimulationSource has 1 enumerations total. + * Values 1-999 are reserved for United States IO Simulation Sources – See applicable agreement of the organizers of the event (training, exercise, etc.) in which information operations is included. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class IOActionIOSimulationSource(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + default = no_statement + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/ioaction_iowarfare_type.py b/dis/siso_ref_010/enums/ioaction_iowarfare_type.py new file mode 100644 index 0000000..2badfa9 --- /dev/null +++ b/dis/siso_ref_010/enums/ioaction_iowarfare_type.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 285, + * marshal size 16; + * IOActionIOWarfareType has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IOActionIOWarfareType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + electronic_warfare_ew = EnumValue(1, "Electronic Warfare (EW)") + computer_network_operations_cno = EnumValue(2, "Computer Network Operations (CNO)") + psychological_operations_psyops = EnumValue(3, "Psychological Operations (PSYOPS)") + military_deception_mildec = EnumValue(4, "Military Deception (MILDEC)") + operations_security_opsec = EnumValue(5, "Operations Security (OPSEC)") + physical_attack = EnumValue(6, "Physical Attack") + default = no_statement + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/iocomms_node_record_comms_node_type.py b/dis/siso_ref_010/enums/iocomms_node_record_comms_node_type.py new file mode 100644 index 0000000..e75e401 --- /dev/null +++ b/dis/siso_ref_010/enums/iocomms_node_record_comms_node_type.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 294, + * marshal size 8; + * IOCommsNodeRecordCommsNodeType has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IOCommsNodeRecordCommsNodeType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + sender_node_id = EnumValue(1, "Sender Node ID") + receiver_node_id = EnumValue(2, "Receiver Node ID") + sender_receiver_node_id = EnumValue(3, "Sender/Receiver Node ID") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/ioeffects_record_ioeffect.py b/dis/siso_ref_010/enums/ioeffects_record_ioeffect.py new file mode 100644 index 0000000..a058d0d --- /dev/null +++ b/dis/siso_ref_010/enums/ioeffects_record_ioeffect.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 292, + * marshal size 8; + * IOEffectsRecordIOEffect has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IOEffectsRecordIOEffect(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + denial = EnumValue(1, "Denial") + degradation = EnumValue(2, "Degradation") + disruption = EnumValue(3, "Disruption") + terminate_effect = EnumValue(255, "Terminate Effect") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/ioeffects_record_iolink_type.py b/dis/siso_ref_010/enums/ioeffects_record_iolink_type.py new file mode 100644 index 0000000..8029919 --- /dev/null +++ b/dis/siso_ref_010/enums/ioeffects_record_iolink_type.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 291, + * marshal size 8; + * IOEffectsRecordIOLinkType has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IOEffectsRecordIOLinkType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + logical_link = EnumValue(1, "Logical Link") + physical_node = EnumValue(2, "Physical Node") + physical_link = EnumValue(3, "Physical Link") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/ioeffects_record_ioprocess.py b/dis/siso_ref_010/enums/ioeffects_record_ioprocess.py new file mode 100644 index 0000000..2c40a30 --- /dev/null +++ b/dis/siso_ref_010/enums/ioeffects_record_ioprocess.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 293, + * marshal size 16; + * IOEffectsRecordIOProcess has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IOEffectsRecordIOProcess(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + default = no_statement + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/ioeffects_record_iostatus.py b/dis/siso_ref_010/enums/ioeffects_record_iostatus.py new file mode 100644 index 0000000..79c4670 --- /dev/null +++ b/dis/siso_ref_010/enums/ioeffects_record_iostatus.py @@ -0,0 +1,143 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 290, + * marshal size 8; + * IOEffectsRecordIOStatus has 8 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IOEffectsRecordIOStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + effect_on_sender = EnumValue(1, "Effect on Sender") + effect_on_receiver = EnumValue(2, "Effect on Receiver") + effect_on_sender_and_receiver = EnumValue(3, "Effect on Sender and Receiver") + effect_on_message = EnumValue(4, "Effect on Message") + effect_on_sender_and_message = EnumValue(5, "Effect on Sender and Message") + effect_on_receiver_and_message = EnumValue(6, "Effect on Receiver and Message") + effect_on_sender_receiver_and_message = EnumValue(7, "Effect on Sender, Receiver, and Message") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/ioreport_ioreport_type.py b/dis/siso_ref_010/enums/ioreport_ioreport_type.py new file mode 100644 index 0000000..5c91c9c --- /dev/null +++ b/dis/siso_ref_010/enums/ioreport_ioreport_type.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 289, + * marshal size 8; + * IOReportIOReportType has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IOReportIOReportType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + initial_report = EnumValue(1, "Initial Report") + update_report = EnumValue(2, "Update Report") + final_report = EnumValue(3, "Final Report") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/is_group_of_grouped_entity_category.py b/dis/siso_ref_010/enums/is_group_of_grouped_entity_category.py new file mode 100644 index 0000000..f776dbc --- /dev/null +++ b/dis/siso_ref_010/enums/is_group_of_grouped_entity_category.py @@ -0,0 +1,145 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 213, + * marshal size 8; + * IsGroupOfGroupedEntityCategory has 10 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IsGroupOfGroupedEntityCategory(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + undefined = EnumValue(0, "Undefined") + basic_ground_combat_vehicle = EnumValue(1, "Basic Ground Combat Vehicle") + enhanced_ground_combat_vehicle = EnumValue(2, "Enhanced Ground Combat Vehicle") + basic_ground_combat_soldier = EnumValue(3, "Basic Ground Combat Soldier") + enhanced_ground_combat_soldier = EnumValue(4, "Enhanced Ground Combat Soldier") + basic_rotor_wing_aircraft = EnumValue(5, "Basic Rotor Wing Aircraft") + enhanced_rotor_wing_aircraft = EnumValue(6, "Enhanced Rotor Wing Aircraft") + basic_fixed_wing_aircraft = EnumValue(7, "Basic Fixed Wing Aircraft") + enhanced_fixed_wing_aircraft = EnumValue(8, "Enhanced Fixed Wing Aircraft") + ground_logistics_vehicle = EnumValue(9, "Ground Logistics Vehicle") + default = undefined + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/is_group_of_rest_status.py b/dis/siso_ref_010/enums/is_group_of_rest_status.py new file mode 100644 index 0000000..d630d81 --- /dev/null +++ b/dis/siso_ref_010/enums/is_group_of_rest_status.py @@ -0,0 +1,144 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 214, + * marshal size 8; + * IsGroupOfRestStatus has 9 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IsGroupOfRestStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_rested_has_not_slept_in_the_last_three_days = EnumValue(0, "Not rested (Has not slept in the last three days)") + has_slept_an_average_of_1_hour_per_day_in_the_last_three_days = EnumValue(1, "Has slept an average of 1 hour per day in the last three days.") + has_slept_an_average_of_2_hours_per_day_in_the_last_three_days = EnumValue(2, "Has slept an average of 2 hours per day in the last three days.") + has_slept_an_average_of_3_hours_per_day_in_the_last_three_days = EnumValue(3, "Has slept an average of 3 hours per day in the last three days.") + has_slept_an_average_of_4_hours_per_day_in_the_last_three_days = EnumValue(4, "Has slept an average of 4 hours per day in the last three days.") + has_slept_an_average_of_5_hours_per_day_in_the_last_three_days = EnumValue(5, "Has slept an average of 5 hours per day in the last three days.") + has_slept_an_average_of_6_hours_per_day_in_the_last_three_days = EnumValue(6, "Has slept an average of 6 hours per day in the last three days.") + has_slept_an_average_of_7_hours_per_day_in_the_last_three_days = EnumValue(7, "Has slept an average of 7 hours per day in the last three days.") + fully_rested_has_slept_an_average_of_8_hours_per_day_in_the_last_three_days = EnumValue(8, "Fully rested (Has slept an average of 8 hours per day in the last three days)") + default = not_rested_has_not_slept_in_the_last_three_days + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/is_part_of_nature.py b/dis/siso_ref_010/enums/is_part_of_nature.py new file mode 100644 index 0000000..ab137fb --- /dev/null +++ b/dis/siso_ref_010/enums/is_part_of_nature.py @@ -0,0 +1,146 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 210, + * marshal size 16; + * IsPartOfNature has 11 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IsPartOfNature(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + host_fireable_munition = EnumValue(1, "Host-fireable munition") + munition_carried_as_cargo = EnumValue(2, "Munition carried as cargo") + fuel_carried_as_cargo = EnumValue(3, "Fuel carried as cargo") + gunmount_attached_to_host = EnumValue(4, "Gunmount attached to host") + computer_generated_forces_carried_as_cargo = EnumValue(5, "Computer generated forces carried as cargo") + vehicle_carried_as_cargo = EnumValue(6, "Vehicle carried as cargo") + emitter_mounted_on_host = EnumValue(7, "Emitter mounted on host") + mobile_command_and_control_entity_carried_aboard_host = EnumValue(8, "Mobile command and control entity carried aboard host") + entity_stationed_at_position_with_respect_to_host = EnumValue(9, "Entity stationed at position with respect to host") + team_member_in_formation_with = EnumValue(10, "Team member in formation with") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/is_part_of_position.py b/dis/siso_ref_010/enums/is_part_of_position.py new file mode 100644 index 0000000..ad11267 --- /dev/null +++ b/dis/siso_ref_010/enums/is_part_of_position.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 211, + * marshal size 16; + * IsPartOfPosition has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IsPartOfPosition(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + on_top_of = EnumValue(1, "On top of") + inside_of = EnumValue(2, "Inside of") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/is_part_of_station_name.py b/dis/siso_ref_010/enums/is_part_of_station_name.py new file mode 100644 index 0000000..b56f85e --- /dev/null +++ b/dis/siso_ref_010/enums/is_part_of_station_name.py @@ -0,0 +1,158 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 212, + * marshal size 16; + * IsPartOfStationName has 23 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IsPartOfStationName(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + aircraft_wingstation = EnumValue(1, "Aircraft Wingstation") + ships_forward_gunmount_starboard = EnumValue(2, "Ship's Forward Gunmount (Starboard)") + ships_forward_gunmount_port = EnumValue(3, "Ship's Forward Gunmount (Port)") + ships_forward_gunmount_centerline = EnumValue(4, "Ship's Forward Gunmount (Centerline)") + ships_aft_gunmount_starboard = EnumValue(5, "Ship's Aft Gunmount (Starboard)") + ships_aft_gunmount_port = EnumValue(6, "Ship's Aft Gunmount (Port)") + ships_aft_gunmount_centerline = EnumValue(7, "Ship's Aft Gunmount (Centerline)") + forward_torpedo_tube = EnumValue(8, "Forward Torpedo Tube") + aft_torpedo_tube = EnumValue(9, "Aft Torpedo Tube") + bomb_bay = EnumValue(10, "Bomb Bay") + cargo_bay = EnumValue(11, "Cargo Bay") + truck_bed = EnumValue(12, "Truck Bed") + trailer_bed = EnumValue(13, "Trailer Bed") + well_deck = EnumValue(14, "Well Deck") + on_station_range_and_bearing = EnumValue(15, "On Station Range and Bearing") + on_station_xyz = EnumValue(16, "On Station xyz") + air_to_air_refueling_boom = EnumValue(17, "Air-to-Air Refueling Boom") + aerial_refueling_receptacle = EnumValue(18, "Aerial Refueling Receptacle") + port_side_refueling_drogue = EnumValue(19, "Port Side Refueling Drogue") + starboard_side_refueling_drogue = EnumValue(20, "Starboard Side Refueling Drogue") + center_refueling_drogue = EnumValue(21, "Center Refueling Drogue") + air_refueling_probe = EnumValue(22, "Air Refueling Probe") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/island_subcategory.py b/dis/siso_ref_010/enums/island_subcategory.py new file mode 100644 index 0000000..e999eab --- /dev/null +++ b/dis/siso_ref_010/enums/island_subcategory.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 715, + * marshal size 16; + * IslandSubcategory has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class IslandSubcategory(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + islands_1_000_2_499_km2_386_965_sq_mi = EnumValue(1, "Islands 1,000-2,499 km2 (386-965 sq mi)") + islands_2_500_4_999_km2_965_1_930_sq_mi = EnumValue(2, "Islands 2,500-4,999 km2 (965-1,930 sq mi)") + islands_5_000_9_999_km2_1_931_3_861_sq_mi = EnumValue(3, "Islands 5,000-9,999 km2 (1,931-3,861 sq mi)") + islands_10_000_24_999_km2_3_861_9_652_sq_mi = EnumValue(4, "Islands 10,000-24,999 km2 (3,861-9,652 sq mi)") + islands_25_000_99_999_km2_9_653_38_610_sq_mi = EnumValue(5, "Islands 25,000-99,999 km2 (9,653-38,610 sq mi)") + islands_100_000_km2_39_000_sq_mi_and_greater = EnumValue(6, "Islands 100,000 km2 (39,000 sq mi) and Greater") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/islsantenna_type.py b/dis/siso_ref_010/enums/islsantenna_type.py new file mode 100644 index 0000000..2d23d95 --- /dev/null +++ b/dis/siso_ref_010/enums/islsantenna_type.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 349, + * marshal size 8; + * ISLSAntennaType has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ISLSAntennaType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + monopulse_antenna = EnumValue(1, "Monopulse Antenna") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/jtidsmidsmodulation_parameters_synchronization_state.py b/dis/siso_ref_010/enums/jtidsmidsmodulation_parameters_synchronization_state.py new file mode 100644 index 0000000..3f13d67 --- /dev/null +++ b/dis/siso_ref_010/enums/jtidsmidsmodulation_parameters_synchronization_state.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 175, + * marshal size 8; + * JTIDSMIDSModulationParametersSynchronizationState has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class JTIDSMIDSModulationParametersSynchronizationState(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + initial_net_entry = EnumValue(1, "Initial Net Entry") + coarse_synchronization = EnumValue(2, "Coarse Synchronization") + fine_synchronization = EnumValue(3, "Fine Synchronization") + synchronization_maintenance = EnumValue(4, "Synchronization Maintenance") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/jtidsmidsmodulation_parameters_transmitting_terminal_primary_mode.py b/dis/siso_ref_010/enums/jtidsmidsmodulation_parameters_transmitting_terminal_primary_mode.py new file mode 100644 index 0000000..3a471ef --- /dev/null +++ b/dis/siso_ref_010/enums/jtidsmidsmodulation_parameters_transmitting_terminal_primary_mode.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 173, + * marshal size 8; + * JTIDSMIDSModulationParametersTransmittingTerminalPrimaryMode has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class JTIDSMIDSModulationParametersTransmittingTerminalPrimaryMode(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + ntr = EnumValue(1, "NTR") + jtids_unit_participant = EnumValue(2, "JTIDS Unit Participant") + default = ntr + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/jtidsmidsmodulation_parameters_transmitting_terminal_secondary_mode.py b/dis/siso_ref_010/enums/jtidsmidsmodulation_parameters_transmitting_terminal_secondary_mode.py new file mode 100644 index 0000000..db628bd --- /dev/null +++ b/dis/siso_ref_010/enums/jtidsmidsmodulation_parameters_transmitting_terminal_secondary_mode.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 174, + * marshal size 8; + * JTIDSMIDSModulationParametersTransmittingTerminalSecondaryMode has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class JTIDSMIDSModulationParametersTransmittingTerminalSecondaryMode(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + none = EnumValue(0, "None") + net_position_reference = EnumValue(1, "Net Position Reference") + primary_navigation_controller = EnumValue(2, "Primary Navigation Controller") + secondary_navigation_controller = EnumValue(3, "Secondary Navigation Controller") + default = none + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/land_platform_appearance.py b/dis/siso_ref_010/enums/land_platform_appearance.py new file mode 100644 index 0000000..97582a3 --- /dev/null +++ b/dis/siso_ref_010/enums/land_platform_appearance.py @@ -0,0 +1,346 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_paint_scheme import AppearancePaintScheme +from .appearance_damage import AppearanceDamage +from .appearance_trailing_effects import AppearanceTrailingEffects +from .appearance_hatch import AppearanceHatch +from .appearance_launcher_operational import AppearanceLauncherOperational +from .appearance_camouflage_type import AppearanceCamouflageType +from .appearance_concealed_position import AppearanceConcealedPosition +from .appearance_entityor_object_state import AppearanceEntityorObjectState + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 31, marshal size 32, + * LandPlatformAppearance + */ + +""" + +class LandPlatformAppearanceBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes the visual paint design, use {@link AppearancePaintScheme} values for this field + ("_paintScheme", UByte, 1), + + # (bit position 1, boolean) Describes whether it is capable of moving on its own power, use {@link UInt8} values for this field + ("_mobilityKilled", UByte, 1), + + # (bit position 2, boolean) Describes whether it can fire weapons, use {@link UInt8} values for this field + ("_firePowerKilled", UByte, 1), + + # (bit position 3, length=2) Describes the damaged appearance, use {@link AppearanceDamage} values for this field + ("_damage", UByte, 2), + + # (bit position 5, boolean) Describes whether or not smoke is emanating from the entity, use {@link UInt8} values for this field + ("_isSmokeEmanating", UByte, 1), + + # (bit position 6, boolean) Describes whether or not the engine is emitting smoke, use {@link UInt8} values for this field + ("_isEngineEmittingSmoke", UByte, 1), + + # (bit position 7, length=2) Describes the size of the dust cloud trailing effect, use {@link AppearanceTrailingEffects} values for this field + ("_trailingDustCloud", UByte, 2), + + # (bit position 9, length=3) Describes whether the primary hatch is open or closed and whether someone is visible, use {@link AppearanceHatch} values for this field + ("_primaryHatch", UByte, 3), + + # (bit position 12, boolean) Describes whether head lights are on or off, use {@link UInt8} values for this field + ("_headLightsOn", UByte, 1), + + # (bit position 13, boolean) Describes whether tail lights are on or off, use {@link UInt8} values for this field + ("_tailLightsOn", UByte, 1), + + # (bit position 14, boolean) Describes whether brake lights are on or off, use {@link UInt8} values for this field + ("_brakeLightsOn", UByte, 1), + + # (bit position 15, boolean) Describes whether the entity is burning and flames are visible, use {@link UInt8} values for this field + ("_isFlaming", UByte, 1), + + # (bit position 16, boolean) Describes the status of the mechanism required for the platform to be operational, such as the elevated status of the primary launcher, use {@link AppearanceLauncherOperational} values for this field + ("_launcherOperational", UByte, 1), + + # (bit position 17, length=2) Describes the camouflage color, use {@link AppearanceCamouflageType} values for this field + ("_camouflageType", UByte, 2), + + # (bit position 19, boolean) Describes the type of concealment, use {@link AppearanceConcealedPosition} values for this field + ("_concealedPosition", UByte, 1), + + # (bit position 21, boolean) Describes whether the entity is frozen and should not be dead reckoned, use {@link UInt8} values for this field + ("_isFrozen", UByte, 1), + + # (bit position 22, boolean) Describes whether the power plant is on or off, use {@link UInt8} values for this field + ("_powerPlantOn", UByte, 1), + + # (bit position 23, boolean) Describes whether the entity is active or deactivated, use {@link AppearanceEntityorObjectState} values for this field + ("_state", UByte, 1), + + # (bit position 24, boolean) Describes whether or not the tent is extended, use {@link UInt8} values for this field + ("_tentExtended", UByte, 1), + + # (bit position 25, boolean) Describes whether or not the ramp is extended, use {@link UInt8} values for this field + ("_rampExtended", UByte, 1), + + # (bit position 26, boolean) Describes whether blackout lights are on or off, use {@link UInt8} values for this field + ("_blackoutLightsOn", UByte, 1), + + # (bit position 27, boolean) Describes whether blackout brake lights are on or off, use {@link UInt8} values for this field + ("_blackoutBrakeLightsOn", UByte, 1), + + # (bit position 28, boolean) Describes whether spot/search light #1 is on or off, use {@link UInt8} values for this field + ("_spotSearchLight1On", UByte, 1), + + # (bit position 29, boolean) Describes whether interior lights (forward) are on or off, use {@link UInt8} values for this field + ("_interiorLightsForwardOn", UByte, 1), + + # (bit position 30, boolean) Describes whether or not the vehicle occupants have surrendered, use {@link UInt8} values for this field + ("_occupantsSurrendered", UByte, 1), + + # (bit position 31, boolean) Describes whether or not the entity is masked or cloaked, use {@link UInt8} values for this field + ("_maskedCloaked", UByte, 1) + ] + +class LandPlatformAppearance(ctypes.Union): + _fields_ = [ + ("capabilities", LandPlatformAppearanceBitField), + ("asbyte", UInt8) + ] + + def set_paintScheme(self, value : AppearancePaintScheme): + self.capabilities._paintScheme = int(value) + def get_paintScheme(self) -> AppearancePaintScheme: + return AppearancePaintScheme.get_enum(self._paintScheme) + PaintScheme = property(get_paintScheme, set_paintScheme) + + def set_mobilityKilled(self, value : UInt8): + self.capabilities._mobilityKilled = int(value) + def get_mobilityKilled(self) -> UInt8: + return self.capabilities._mobilityKilled + MobilityKilled = property(get_mobilityKilled, set_mobilityKilled) + + def set_firePowerKilled(self, value : UInt8): + self.capabilities._firePowerKilled = int(value) + def get_firePowerKilled(self) -> UInt8: + return self.capabilities._firePowerKilled + FirePowerKilled = property(get_firePowerKilled, set_firePowerKilled) + + def set_damage(self, value : AppearanceDamage): + self.capabilities._damage = int(value) + def get_damage(self) -> AppearanceDamage: + return AppearanceDamage.get_enum(self._damage) + Damage = property(get_damage, set_damage) + + def set_isSmokeEmanating(self, value : UInt8): + self.capabilities._isSmokeEmanating = int(value) + def get_isSmokeEmanating(self) -> UInt8: + return self.capabilities._isSmokeEmanating + IsSmokeEmanating = property(get_isSmokeEmanating, set_isSmokeEmanating) + + def set_isEngineEmittingSmoke(self, value : UInt8): + self.capabilities._isEngineEmittingSmoke = int(value) + def get_isEngineEmittingSmoke(self) -> UInt8: + return self.capabilities._isEngineEmittingSmoke + IsEngineEmittingSmoke = property(get_isEngineEmittingSmoke, set_isEngineEmittingSmoke) + + def set_trailingDustCloud(self, value : AppearanceTrailingEffects): + self.capabilities._trailingDustCloud = int(value) + def get_trailingDustCloud(self) -> AppearanceTrailingEffects: + return AppearanceTrailingEffects.get_enum(self._trailingDustCloud) + TrailingDustCloud = property(get_trailingDustCloud, set_trailingDustCloud) + + def set_primaryHatch(self, value : AppearanceHatch): + self.capabilities._primaryHatch = int(value) + def get_primaryHatch(self) -> AppearanceHatch: + return AppearanceHatch.get_enum(self._primaryHatch) + PrimaryHatch = property(get_primaryHatch, set_primaryHatch) + + def set_headLightsOn(self, value : UInt8): + self.capabilities._headLightsOn = int(value) + def get_headLightsOn(self) -> UInt8: + return self.capabilities._headLightsOn + HeadLightsOn = property(get_headLightsOn, set_headLightsOn) + + def set_tailLightsOn(self, value : UInt8): + self.capabilities._tailLightsOn = int(value) + def get_tailLightsOn(self) -> UInt8: + return self.capabilities._tailLightsOn + TailLightsOn = property(get_tailLightsOn, set_tailLightsOn) + + def set_brakeLightsOn(self, value : UInt8): + self.capabilities._brakeLightsOn = int(value) + def get_brakeLightsOn(self) -> UInt8: + return self.capabilities._brakeLightsOn + BrakeLightsOn = property(get_brakeLightsOn, set_brakeLightsOn) + + def set_isFlaming(self, value : UInt8): + self.capabilities._isFlaming = int(value) + def get_isFlaming(self) -> UInt8: + return self.capabilities._isFlaming + IsFlaming = property(get_isFlaming, set_isFlaming) + + def set_launcherOperational(self, value : AppearanceLauncherOperational): + self.capabilities._launcherOperational = int(value) + def get_launcherOperational(self) -> AppearanceLauncherOperational: + return AppearanceLauncherOperational.get_enum(self._launcherOperational) + LauncherOperational = property(get_launcherOperational, set_launcherOperational) + + def set_camouflageType(self, value : AppearanceCamouflageType): + self.capabilities._camouflageType = int(value) + def get_camouflageType(self) -> AppearanceCamouflageType: + return AppearanceCamouflageType.get_enum(self._camouflageType) + CamouflageType = property(get_camouflageType, set_camouflageType) + + def set_concealedPosition(self, value : AppearanceConcealedPosition): + self.capabilities._concealedPosition = int(value) + def get_concealedPosition(self) -> AppearanceConcealedPosition: + return AppearanceConcealedPosition.get_enum(self._concealedPosition) + ConcealedPosition = property(get_concealedPosition, set_concealedPosition) + + def set_isFrozen(self, value : UInt8): + self.capabilities._isFrozen = int(value) + def get_isFrozen(self) -> UInt8: + return self.capabilities._isFrozen + IsFrozen = property(get_isFrozen, set_isFrozen) + + def set_powerPlantOn(self, value : UInt8): + self.capabilities._powerPlantOn = int(value) + def get_powerPlantOn(self) -> UInt8: + return self.capabilities._powerPlantOn + PowerPlantOn = property(get_powerPlantOn, set_powerPlantOn) + + def set_state(self, value : AppearanceEntityorObjectState): + self.capabilities._state = int(value) + def get_state(self) -> AppearanceEntityorObjectState: + return AppearanceEntityorObjectState.get_enum(self._state) + State = property(get_state, set_state) + + def set_tentExtended(self, value : UInt8): + self.capabilities._tentExtended = int(value) + def get_tentExtended(self) -> UInt8: + return self.capabilities._tentExtended + TentExtended = property(get_tentExtended, set_tentExtended) + + def set_rampExtended(self, value : UInt8): + self.capabilities._rampExtended = int(value) + def get_rampExtended(self) -> UInt8: + return self.capabilities._rampExtended + RampExtended = property(get_rampExtended, set_rampExtended) + + def set_blackoutLightsOn(self, value : UInt8): + self.capabilities._blackoutLightsOn = int(value) + def get_blackoutLightsOn(self) -> UInt8: + return self.capabilities._blackoutLightsOn + BlackoutLightsOn = property(get_blackoutLightsOn, set_blackoutLightsOn) + + def set_blackoutBrakeLightsOn(self, value : UInt8): + self.capabilities._blackoutBrakeLightsOn = int(value) + def get_blackoutBrakeLightsOn(self) -> UInt8: + return self.capabilities._blackoutBrakeLightsOn + BlackoutBrakeLightsOn = property(get_blackoutBrakeLightsOn, set_blackoutBrakeLightsOn) + + def set_spotSearchLight1On(self, value : UInt8): + self.capabilities._spotSearchLight1On = int(value) + def get_spotSearchLight1On(self) -> UInt8: + return self.capabilities._spotSearchLight1On + SpotSearchLight1On = property(get_spotSearchLight1On, set_spotSearchLight1On) + + def set_interiorLightsForwardOn(self, value : UInt8): + self.capabilities._interiorLightsForwardOn = int(value) + def get_interiorLightsForwardOn(self) -> UInt8: + return self.capabilities._interiorLightsForwardOn + InteriorLightsForwardOn = property(get_interiorLightsForwardOn, set_interiorLightsForwardOn) + + def set_occupantsSurrendered(self, value : UInt8): + self.capabilities._occupantsSurrendered = int(value) + def get_occupantsSurrendered(self) -> UInt8: + return self.capabilities._occupantsSurrendered + OccupantsSurrendered = property(get_occupantsSurrendered, set_occupantsSurrendered) + + def set_maskedCloaked(self, value : UInt8): + self.capabilities._maskedCloaked = int(value) + def get_maskedCloaked(self) -> UInt8: + return self.capabilities._maskedCloaked + MaskedCloaked = property(get_maskedCloaked, set_maskedCloaked) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "PaintScheme : " + self.PaintScheme.get_description + "\n" + outputStream += "MobilityKilled : " + str(self.MobilityKilled) + "\n" + outputStream += "FirePowerKilled : " + str(self.FirePowerKilled) + "\n" + outputStream += "Damage : " + self.Damage.get_description + "\n" + outputStream += "IsSmokeEmanating : " + str(self.IsSmokeEmanating) + "\n" + outputStream += "IsEngineEmittingSmoke : " + str(self.IsEngineEmittingSmoke) + "\n" + outputStream += "TrailingDustCloud : " + self.TrailingDustCloud.get_description + "\n" + outputStream += "PrimaryHatch : " + self.PrimaryHatch.get_description + "\n" + outputStream += "HeadLightsOn : " + str(self.HeadLightsOn) + "\n" + outputStream += "TailLightsOn : " + str(self.TailLightsOn) + "\n" + outputStream += "BrakeLightsOn : " + str(self.BrakeLightsOn) + "\n" + outputStream += "IsFlaming : " + str(self.IsFlaming) + "\n" + outputStream += "LauncherOperational : " + self.LauncherOperational.get_description + "\n" + outputStream += "CamouflageType : " + self.CamouflageType.get_description + "\n" + outputStream += "ConcealedPosition : " + self.ConcealedPosition.get_description + "\n" + outputStream += "IsFrozen : " + str(self.IsFrozen) + "\n" + outputStream += "PowerPlantOn : " + str(self.PowerPlantOn) + "\n" + outputStream += "State : " + self.State.get_description + "\n" + outputStream += "TentExtended : " + str(self.TentExtended) + "\n" + outputStream += "RampExtended : " + str(self.RampExtended) + "\n" + outputStream += "BlackoutLightsOn : " + str(self.BlackoutLightsOn) + "\n" + outputStream += "BlackoutBrakeLightsOn : " + str(self.BlackoutBrakeLightsOn) + "\n" + outputStream += "SpotSearchLight1On : " + str(self.SpotSearchLight1On) + "\n" + outputStream += "InteriorLightsForwardOn : " + str(self.InteriorLightsForwardOn) + "\n" + outputStream += "OccupantsSurrendered : " + str(self.OccupantsSurrendered) + "\n" + outputStream += "MaskedCloaked : " + str(self.MaskedCloaked) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/land_platform_capabilities.py b/dis/siso_ref_010/enums/land_platform_capabilities.py new file mode 100644 index 0000000..212a06e --- /dev/null +++ b/dis/siso_ref_010/enums/land_platform_capabilities.py @@ -0,0 +1,158 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 450, marshal size 32, + * LandPlatformCapabilities + */ + +""" + +class LandPlatformCapabilitiesBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes whether the entity is able to supply some type of ammunition in response to an appropriate service request, use {@link UInt8} values for this field + ("_ammunitionSupply", UByte, 1), + + # (bit position 1, boolean) Describes whether the entity is able to supply some type of fuel in response to an appropriate service request, use {@link UInt8} values for this field + ("_fuelSupply", UByte, 1), + + # (bit position 2, boolean) Describes whether the entity is able to provide recovery (e.g., towing) services in response to an appropriate service request, use {@link UInt8} values for this field + ("_recovery", UByte, 1), + + # (bit position 3, boolean) Describes whether the entity is able to supply certain repair services in response to an appropriate service request, use {@link UInt8} values for this field + ("_repair", UByte, 1), + + # (bit position 4, boolean) This entry is reserved for backward compatibility and may not be reused, use {@link UInt8} values for this field + ("_reserved", UByte, 1), + + # (bit position 6, boolean) The Entity is able to be carried as a sling load payload. The extended appearance record (if available) will identify if it is currently sling loaded and entity association and/or entity offset records (if available) will provide additional sling load details (such as carrier)., use {@link UInt8} values for this field + ("_slingLoadable", UByte, 1), + + # (bit position 7, boolean) The Entity is an IED or contains an IED. The extended appearance record (if available) will identify how well hidden the IED is on the Entity. An Attached Part (if applicable, for instance a jury-rigged munition does not apply here) will identify the IED explicitly., use {@link UInt8} values for this field + ("_iEDPresenceIndicator", UByte, 1), + + # (bit position 8, boolean) The Entity (normally a virtual manned module) can be task organized into an existing mixed mode unit (where mixed mode is intended to comprise a combination of computer-generated forces and virtual or even live forces)., use {@link UInt8} values for this field + ("_taskOrganizable", UByte, 1) + ] + +class LandPlatformCapabilities(ctypes.Union): + _fields_ = [ + ("capabilities", LandPlatformCapabilitiesBitField), + ("asbyte", UInt8) + ] + + def set_ammunitionSupply(self, value : UInt8): + self.capabilities._ammunitionSupply = int(value) + def get_ammunitionSupply(self) -> UInt8: + return self.capabilities._ammunitionSupply + AmmunitionSupply = property(get_ammunitionSupply, set_ammunitionSupply) + + def set_fuelSupply(self, value : UInt8): + self.capabilities._fuelSupply = int(value) + def get_fuelSupply(self) -> UInt8: + return self.capabilities._fuelSupply + FuelSupply = property(get_fuelSupply, set_fuelSupply) + + def set_recovery(self, value : UInt8): + self.capabilities._recovery = int(value) + def get_recovery(self) -> UInt8: + return self.capabilities._recovery + Recovery = property(get_recovery, set_recovery) + + def set_repair(self, value : UInt8): + self.capabilities._repair = int(value) + def get_repair(self) -> UInt8: + return self.capabilities._repair + Repair = property(get_repair, set_repair) + + def set_reserved(self, value : UInt8): + self.capabilities._reserved = int(value) + def get_reserved(self) -> UInt8: + return self.capabilities._reserved + Reserved = property(get_reserved, set_reserved) + + def set_slingLoadable(self, value : UInt8): + self.capabilities._slingLoadable = int(value) + def get_slingLoadable(self) -> UInt8: + return self.capabilities._slingLoadable + SlingLoadable = property(get_slingLoadable, set_slingLoadable) + + def set_iEDPresenceIndicator(self, value : UInt8): + self.capabilities._iEDPresenceIndicator = int(value) + def get_iEDPresenceIndicator(self) -> UInt8: + return self.capabilities._iEDPresenceIndicator + IEDPresenceIndicator = property(get_iEDPresenceIndicator, set_iEDPresenceIndicator) + + def set_taskOrganizable(self, value : UInt8): + self.capabilities._taskOrganizable = int(value) + def get_taskOrganizable(self) -> UInt8: + return self.capabilities._taskOrganizable + TaskOrganizable = property(get_taskOrganizable, set_taskOrganizable) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "AmmunitionSupply : " + str(self.AmmunitionSupply) + "\n" + outputStream += "FuelSupply : " + str(self.FuelSupply) + "\n" + outputStream += "Recovery : " + str(self.Recovery) + "\n" + outputStream += "Repair : " + str(self.Repair) + "\n" + outputStream += "Reserved : " + str(self.Reserved) + "\n" + outputStream += "SlingLoadable : " + str(self.SlingLoadable) + "\n" + outputStream += "IEDPresenceIndicator : " + str(self.IEDPresenceIndicator) + "\n" + outputStream += "TaskOrganizable : " + str(self.TaskOrganizable) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/leaf_coverage.py b/dis/siso_ref_010/enums/leaf_coverage.py new file mode 100644 index 0000000..d214eba --- /dev/null +++ b/dis/siso_ref_010/enums/leaf_coverage.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 509, + * marshal size 2; + * LeafCoverage has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LeafCoverage(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + normal = EnumValue(0, "Normal") + bare = EnumValue(1, "Bare") + default = normal + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/level2squitter_status.py b/dis/siso_ref_010/enums/level2squitter_status.py new file mode 100644 index 0000000..76a3324 --- /dev/null +++ b/dis/siso_ref_010/enums/level2squitter_status.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 353, + * marshal size 1; + * Level2SquitterStatus has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Level2SquitterStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + disabled = EnumValue(0, "Disabled") + enabled = EnumValue(1, "Enabled") + default = disabled + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_air_categories.py b/dis/siso_ref_010/enums/life_form_air_categories.py new file mode 100644 index 0000000..ddfbb91 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_air_categories.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 478, + * marshal size 8; + * LifeFormAirCategories has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormAirCategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + # XREF UID 110 - CLASS SubcategoriesforAirCategory200Bird + bird = EnumValue(200, "Bird") + # XREF UID 111 - CLASS SubcategoriesforAirCategory201Insect + insect = EnumValue(201, "Insect") + # XREF UID 112 - CLASS SubcategoriesforAirCategory202Mammal + mammal = EnumValue(202, "Mammal") + default = bird + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_categories_afghanistan.py b/dis/siso_ref_010/enums/life_form_categories_afghanistan.py new file mode 100644 index 0000000..2e88039 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_categories_afghanistan.py @@ -0,0 +1,148 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 501, + * marshal size 8; + * LifeFormCategoriesAfghanistan has 13 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormCategoriesAfghanistan(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + afghan_national_army_ana = EnumValue(11, "Afghan National Army (ANA)") + afghan_air_force_aaf = EnumValue(13, "Afghan Air Force (AAF)") + national_directorate_of_security_nds = EnumValue(51, "National Directorate of Security (NDS)") + afghan_national_police_anp = EnumValue(52, "Afghan National Police (ANP)") + afghan_border_police_abp = EnumValue(53, "Afghan Border Police (ABP)") + afghan_national_civil_order_police_ancop = EnumValue(54, "Afghan National Civil Order Police (ANCOP)") + afghan_public_protection_force_appf = EnumValue(55, "Afghan Public Protection Force (APPF)") + non_military_national_government_agencies = EnumValue(70, "Non-Military National Government Agencies") + terrorist_combatant = EnumValue(101, "Terrorist Combatant") + humanitarian_organizations = EnumValue(120, "Humanitarian Organizations") + red_crescent = EnumValue(121, "Red Crescent") + civilian = EnumValue(130, "Civilian") + press = EnumValue(133, "Press") + default = afghan_national_army_ana + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_categories_us.py b/dis/siso_ref_010/enums/life_form_categories_us.py new file mode 100644 index 0000000..83547b5 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_categories_us.py @@ -0,0 +1,158 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 476, + * marshal size 8; + * LifeFormCategoriesUS has 23 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormCategoriesUS(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + us_army_usa = EnumValue(11, "U.S. Army (USA)") + us_marine_corps_usmc = EnumValue(12, "U.S. Marine Corps (USMC)") + us_air_force_usaf = EnumValue(13, "U.S. Air Force (USAF)") + us_navy_usn = EnumValue(14, "U.S. Navy (USN)") + us_coast_guard_uscg = EnumValue(15, "U.S. Coast Guard (USCG)") + special_forces = EnumValue(30, "Special Forces") + rangers = EnumValue(31, "Rangers") + arsof = EnumValue(32, "ARSOF") + force_reconnaissance = EnumValue(33, "Force Reconnaissance") + navy_seal = EnumValue(34, "Navy SEAL") + afsof = EnumValue(35, "AFSOF") + delta_force = EnumValue(36, "Delta Force") + federal_bureau_of_investigation_fbi = EnumValue(51, "Federal Bureau of Investigation (FBI)") + central_intelligence_agency_cia = EnumValue(52, "Central Intelligence Agency (CIA)") + department_of_homeland_security_dhs = EnumValue(53, "Department of Homeland Security (DHS)") + bureau_of_alcohol_tobacco_firearms_and_explosives_atf = EnumValue(54, "Bureau of Alcohol, Tobacco, Firearms and Explosives (ATF)") + us_secret_service_usss = EnumValue(55, "U.S. Secret Service (USSS)") + us_marshal = EnumValue(56, "U.S. Marshal") + law_enforcement_non_military = EnumValue(70, "Law Enforcement (Non-military)") + state_police_highway_patrol = EnumValue(71, "State Police (Highway Patrol)") + county_sheriff_police = EnumValue(72, "County Sheriff/Police") + municipal_police = EnumValue(73, "Municipal Police") + red_cross = EnumValue(124, "Red Cross") + default = us_army_usa + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_extra_personal_data.py b/dis/siso_ref_010/enums/life_form_extra_personal_data.py new file mode 100644 index 0000000..84c69b0 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_extra_personal_data.py @@ -0,0 +1,153 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 477, marshal size 8; + * LifeFormExtraPersonalData has 38 enumerations total. + * The 1's digit is reserved for Race/Ethnicity and the enumerations are taken from the U.S. OMB. The 10's digit is reserved for general age group. The 100's digit is reserved for gender, where 0 is Male and 1 is Female. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class LifeFormExtraPersonalData(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_specified_male = EnumValue(0, "Not Specified (Male)") + asian_male = EnumValue(1, "Asian (Male)") + pacific_islander_male = EnumValue(2, "Pacific Islander (Male)") + black_male = EnumValue(3, "Black (Male)") + east_asian_male = EnumValue(4, "East Asian (Male)") + hispanic_male = EnumValue(5, "Hispanic (Male)") + white_male = EnumValue(6, "White (Male)") + arab_male = EnumValue(7, "Arab (Male)") + homogenous_country_code_male = EnumValue(8, "Homogenous Country Code (Male)") + indigenous_country_code_male = EnumValue(9, "Indigenous Country Code (Male)") + infant_0_months_1_year_male = EnumValue(10, "Infant (0 months-1 year) (Male)") + toddler_1_3_years_male = EnumValue(20, "Toddler (1-3 years) (Male)") + child_3_10_years_male = EnumValue(30, "Child (3-10 years) (Male)") + adolescent_10_12_years_male = EnumValue(40, "Adolescent (10-12 years) (Male)") + teenager_13_16_years_male = EnumValue(50, "Teenager (13-16 years) (Male)") + young_adult_17_25_years_male = EnumValue(60, "Young Adult (17-25 years) (Male)") + adult_25_55_years_male = EnumValue(70, "Adult (25-55 years) (Male)") + senior_adult_55_70_years_male = EnumValue(80, "Senior Adult (55-70 years) (Male)") + elderly_71PLUS_years_male = EnumValue(90, "Elderly (71+ years) (Male)") + female = EnumValue(100, "Female") + asian_female = EnumValue(101, "Asian (Female)") + pacific_islander_female = EnumValue(102, "Pacific Islander (Female)") + black_female = EnumValue(103, "Black (Female)") + east_asian_female = EnumValue(104, "East Asian (Female)") + hispanic_female = EnumValue(105, "Hispanic (Female)") + white_female = EnumValue(106, "White (Female)") + arab_female = EnumValue(107, "Arab (Female)") + homogenous_country_code_female = EnumValue(108, "Homogenous Country Code (Female)") + indigenous_country_code_female = EnumValue(109, "Indigenous Country Code (Female)") + infant_0_months_1_year_female = EnumValue(110, "Infant (0 months-1 year) (Female)") + toddler_1_3_years_female = EnumValue(120, "Toddler (1-3 years) (Female)") + child_3_10_years_female = EnumValue(130, "Child (3-10 years) (Female)") + adolescent_10_12_years_female = EnumValue(140, "Adolescent (10-12 years) (Female)") + teenager_13_16_years_female = EnumValue(150, "Teenager (13-16 years) (Female)") + young_adult_17_25_years_female = EnumValue(160, "Young Adult (17-25 years) (Female)") + adult_25_55_years_female = EnumValue(170, "Adult (25-55 years) (Female)") + senior_adult_55_70_years_female = EnumValue(180, "Senior Adult (55-70 years) (Female)") + elderly_71PLUS_years_female = EnumValue(190, "Elderly (71+ years) (Female)") + default = not_specified_male + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_animal_companions.py b/dis/siso_ref_010/enums/life_form_human_specific_animal_companions.py new file mode 100644 index 0000000..b65af5a --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_animal_companions.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 531, + * marshal size 8; + * LifeFormHumanSpecificAnimalCompanions has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificAnimalCompanions(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + military_working_dog = EnumValue(1, "Military Working Dog") + military_working_dog_mine_detection = EnumValue(2, "Military Working Dog, Mine Detection") + military_working_dog_drug_detection = EnumValue(3, "Military Working Dog, Drug Detection") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_anti_materiel_rifles.py b/dis/siso_ref_010/enums/life_form_human_specific_anti_materiel_rifles.py new file mode 100644 index 0000000..b7de02b --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_anti_materiel_rifles.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 510, + * marshal size 8; + * LifeFormHumanSpecificAntiMaterielRifles has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificAntiMaterielRifles(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + _127mm_aw50 = EnumValue(10, "12.7mm AW50") + _127mm_aw50f = EnumValue(11, "12.7mm AW50F") + _127mm_tasko_7et3 = EnumValue(12, "12.7mm TASKO 7ET3") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_anti_tank_missiles.py b/dis/siso_ref_010/enums/life_form_human_specific_anti_tank_missiles.py new file mode 100644 index 0000000..72d07ab --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_anti_tank_missiles.py @@ -0,0 +1,210 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 519, + * marshal size 8; + * LifeFormHumanSpecificAntiTankMissiles has 75 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificAntiTankMissiles(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + _120mm_type_64_mat_kam_3 = EnumValue(30, "120mm Type 64 MAT KAM-3") + _153mm_type_79_jyu_mat_kam_9 = EnumValue(31, "153mm Type 79 Jyu-MAT KAM-9") + _120mm_type_87_chu_mat = EnumValue(32, "120mm Type 87 Chu-MAT") + _140mm_type_01_lmat = EnumValue(33, "140mm Type 01 LMAT") + _140mm_m47_dragon = EnumValue(58, "140mm M47 Dragon") + _140mm_saeghe_1_2 = EnumValue(59, "140mm Saeghe 1-2") + _127mm_fgm_148_javelin = EnumValue(60, "127mm FGM-148 Javelin") + _139mm_fgm_172_sraw = EnumValue(63, "139mm FGM-172 SRAW") + _139mm_fgm_172b_sraw_mpv = EnumValue(64, "139mm FGM-172B SRAW-MPV") + _152mm_bgm_71_tow = EnumValue(68, "152mm BGM-71 TOW") + _152mm_orev_tow_ii = EnumValue(69, "152mm Orev TOW II") + _120mm_vickers_vigilant_clevite = EnumValue(75, "120mm Vickers Vigilant / Clevite") + _110mm_bantam_rb_53 = EnumValue(80, "110mm Bantam (Rb 53)") + _150mm_rbs_56_bill_1 = EnumValue(81, "150mm RBS-56 BILL 1") + _150mm_rbs_56_2_bill_2 = EnumValue(82, "150mm RBS-56-2 BILL 2") + _150mm_rb_57_nlaw_mbt_law = EnumValue(83, "150mm RB-57 NLAW (MBT-LAW)") + _130mm_spike_sr = EnumValue(85, "130mm Spike SR") + _130mm_spike_mr_clu = EnumValue(86, "130mm Spike MR (CLU)") + _130mm_spike_lr_clu = EnumValue(87, "130mm Spike LR (CLU)") + _60mm_mosquito = EnumValue(95, "60mm Mosquito") + _160mm_ss10 = EnumValue(98, "160mm SS.10") + _103mm_milan = EnumValue(100, "103mm MILAN") + _115mm_milan_2 = EnumValue(101, "115mm MILAN 2") + _115mm_milan_2t = EnumValue(102, "115mm MILAN 2T") + _115mm_milan_3 = EnumValue(103, "115mm MILAN 3") + _115mm_milan_er = EnumValue(104, "115mm MILAN ER") + _136mm_eryx = EnumValue(105, "136mm ERYX") + _152mm_entac = EnumValue(107, "152mm Entac") + _125mm_raad = EnumValue(110, "125mm RAAD") + _125mm_i_raad_t = EnumValue(111, "125mm I-RAAD-T") + _152mm_toophan = EnumValue(112, "152mm Toophan") + _152mm_toophan_2 = EnumValue(113, "152mm Toophan 2") + _152mm_toophan_5 = EnumValue(114, "152mm Toophan 5") + _136mm_bumbar = EnumValue(120, "136mm Bumbar") + _130mm_shershen_pk_2 = EnumValue(125, "130mm Shershen PK-2") + _152mm_shershen_q_p_2b = EnumValue(126, "152mm Shershen-Q P-2B") + _130mm_mectron_mss_12 = EnumValue(130, "130mm Mectron MSS-1.2") + _120mm_hj_8 = EnumValue(140, "120mm HJ-8") + _120mm_hj_8a = EnumValue(141, "120mm HJ-8A") + _120mm_hj_8b = EnumValue(142, "120mm HJ-8B") + _120mm_hj_8c = EnumValue(143, "120mm HJ-8C") + _120mm_hj_8d = EnumValue(144, "120mm HJ-8D") + _120mm_hj_8e = EnumValue(145, "120mm HJ-8E") + _120mm_hj_8f = EnumValue(146, "120mm HJ-8F") + _120mm_hj_8fae = EnumValue(147, "120mm HJ-8FAE") + _120mm_hj_8l = EnumValue(148, "120mm HJ-8L") + _120mm_hj_8h = EnumValue(149, "120mm HJ-8H") + _120mm_hj_8s = EnumValue(150, "120mm HJ-8S") + _120mm_baktar_shikan = EnumValue(151, "120mm Baktar-Shikan") + _120mm_hj_11_aft_11 = EnumValue(152, "120mm HJ-11 (AFT-11)") + _152mm_hj_9a = EnumValue(153, "152mm HJ-9A") + _135mm_hj_12_red_arrow = EnumValue(154, "135mm HJ-12 Red Arrow") + _125mm_hj_73_mclos = EnumValue(155, "125mm HJ-73 MCLOS") + _125mm_hj_73b_saclos = EnumValue(156, "125mm HJ-73B SACLOS") + _125mm_hj_73c_saclos_era = EnumValue(157, "125mm HJ-73C SACLOS ERA") + _125mm_at_3_sagger_a_9m14_malyutka = EnumValue(170, "125mm AT-3 Sagger A/9M14 Malyutka") + _125mm_at_3b_sagger_b_9m14m_malyutka_m = EnumValue(171, "125mm AT-3B Sagger B/9M14M Malyutka-M") + _125mm_at_3c_sagger_c_9m14p_malyutka_p = EnumValue(172, "125mm AT-3C Sagger C/9M14P Malyutka-P") + _125mm_at_3d_sagger_d_9m14_2_malyutka_2 = EnumValue(173, "125mm AT-3D Sagger D/9M14-2 Malyutka-2") + _125mm_susong_po = EnumValue(174, "125mm Susong-Po") + _125mm_at_3c_polk = EnumValue(175, "125mm AT-3C POLK") + _125mm_kun_wu_1 = EnumValue(176, "125mm Kun Wu 1") + _125mm_maliutka_m2t = EnumValue(177, "125mm Maliutka M2T") + _120mm_at_4a_spigot_a_9m111_fagot = EnumValue(178, "120mm AT-4A Spigot A/9M111 Fagot") + _120mm_at_4b_spigot_b_9m111_2_fagot = EnumValue(179, "120mm AT-4B Spigot B/9M111-2 Fagot") + _120mm_at_4c_spigot_c_9m111m_faktoriya = EnumValue(180, "120mm AT-4C Spigot C/9M111M Faktoriya") + _135mm_at_5a_spandrel_9m113_kronkurs = EnumValue(181, "135mm AT-5A Spandrel/9M113 Kronkurs") + _135mm_at_5b_spandrel_9m113m_kronkurs_m = EnumValue(182, "135mm AT-5B Spandrel/9M113M Kronkurs-M") + _135mm_tosan = EnumValue(183, "135mm Tosan") + _94mm_at_7_saxhorn_9k115_metis = EnumValue(184, "94mm AT-7 Saxhorn/9K115 Metis") + _130mm_at_13_saxhorn_2_9k115_2_metis_m = EnumValue(185, "130mm AT-13 Saxhorn-2/9K115-2 Metis-M") + _152mm_at_14_spriggan_9m133_kornet = EnumValue(186, "152mm AT-14 Spriggan/9M133 Kornet") + _152mm_dehlavie = EnumValue(187, "152mm Dehlavie") + _102mm_mathogo = EnumValue(200, "102mm Mathogo") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_anti_tank_rockets.py b/dis/siso_ref_010/enums/life_form_human_specific_anti_tank_rockets.py new file mode 100644 index 0000000..57ba3f8 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_anti_tank_rockets.py @@ -0,0 +1,206 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 518, + * marshal size 8; + * LifeFormHumanSpecificAntiTankRockets has 71 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificAntiTankRockets(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + _82mm_b_300 = EnumValue(10, "82mm B-300") + _82mm_shipon = EnumValue(11, "82mm Shipon") + _83mm_mk153_mod_0_smaw = EnumValue(12, "83mm MK153 Mod 0 SMAW") + _66mm_m72_law = EnumValue(20, "66mm M72 LAW") + _66mm_m72a1_law = EnumValue(21, "66mm M72A1 LAW") + _66mm_m72a2_law = EnumValue(22, "66mm M72A2 LAW") + _66mm_m72a3_law = EnumValue(23, "66mm M72A3 LAW") + _66mm_m72a4_law = EnumValue(24, "66mm M72A4 LAW") + _66mm_m72a5_law = EnumValue(25, "66mm M72A5 LAW") + _66mm_m72a6_law = EnumValue(26, "66mm M72A6 LAW") + _66mm_m72a7_law = EnumValue(27, "66mm M72A7 LAW") + _66mm_m72e8_law = EnumValue(28, "66mm M72E8 LAW") + _66mm_m72e9_law = EnumValue(29, "66mm M72E9 LAW") + _66mm_m72e10_law = EnumValue(30, "66mm M72E10 LAW") + _66mm_m72as_law = EnumValue(31, "66mm M72AS LAW") + _94mm_law_80 = EnumValue(35, "94mm LAW 80") + _60mm_m1_bazooka = EnumValue(40, "60mm M1 Bazooka") + _60mm_m1a1_bazooka = EnumValue(41, "60mm M1A1 Bazooka") + _60mm_m9_bazooka = EnumValue(42, "60mm M9 Bazooka") + _60mm_m9a1_bazooka = EnumValue(43, "60mm M9A1 Bazooka") + _89mm_m20_super_bazooka = EnumValue(44, "89mm M20 Super Bazooka") + _89mm_m20a1_super_bazooka = EnumValue(45, "89mm M20A1 Super Bazooka") + _89mm_m20b1_super_bazooka = EnumValue(46, "89mm M20B1 Super Bazooka") + _89mm_m20a1b1_super_bazooka = EnumValue(47, "89mm M20A1B1 Super Bazooka") + _89mm_m25_three_shot_bazooka = EnumValue(48, "89mm M25 Three Shot Bazooka") + _89mm_instalaza_m65 = EnumValue(49, "89mm Instalaza M65") + _90mm_instalaza_c90 = EnumValue(50, "90mm Instalaza C90") + _90mm_c90_cr_m3 = EnumValue(51, "90mm C90-CR (M3)") + _90mm_c90_cr_am_m3 = EnumValue(52, "90mm C90-CR-AM (M3)") + _90mm_c90_cr_bk_m3 = EnumValue(53, "90mm C90-CR-BK (M3)") + _90mm_c90_cr_in_m3 = EnumValue(54, "90mm C90-CR-IN (M3)") + _60mm_pzf_3 = EnumValue(60, "60mm PzF 3") + _60mm_pzf_3_it = EnumValue(61, "60mm PzF 3-IT") + _60mm_pzf_3_bunkerfaust = EnumValue(62, "60mm PzF 3 Bunkerfaust") + _44mm_pzf_44 = EnumValue(65, "44mm PzF 44") + _30mm_panzerfaust_30 = EnumValue(70, "30mm Panzerfaust 30") + _50mm_panzerfaust_60 = EnumValue(71, "50mm Panzerfaust 60") + _60mm_panzerfaust_100 = EnumValue(72, "60mm Panzerfaust 100") + _60mm_panzerfaust_150 = EnumValue(73, "60mm Panzerfaust 150") + _88mm_panzerschreck_rpzb = EnumValue(75, "88mm Panzerschreck RPzB") + _83mm_rl_83_blindicide = EnumValue(80, "83mm RL-83 Blindicide") + _100mm_rl_100_blindicide = EnumValue(81, "100mm RL-100 Blindicide") + _90mm_m79_osa_wasp = EnumValue(85, "90mm M79 Osa (Wasp)") + _64mm_m80_zolja_wasp = EnumValue(86, "64mm M80 Zolja (Wasp)") + _67mm_armburst_crossbow = EnumValue(90, "67mm Armburst Crossbow") + _40mm_type_69_rpg = EnumValue(93, "40mm Type-69 RPG") + _89mm_piat = EnumValue(95, "89mm PIAT") + _40mm_rpg_2 = EnumValue(100, "40mm RPG-2") + _64mm_rpg_18_mukha = EnumValue(101, "64mm RPG-18 Mukha") + _725mm_rpg_22_netto = EnumValue(102, "72.5mm RPG-22 Netto") + _725mm_rpg_26_aglen = EnumValue(103, "72.5mm RPG-26 Aglen") + _105mm_rpg_29_vampir = EnumValue(104, "105mm RPG-29 Vampir") + _105mm_rpg_30_kryuk = EnumValue(105, "105mm RPG-30 Kryuk") + _105mm_rpg_32_nashshab = EnumValue(106, "105mm RPG-32 Nashshab") + _105mm_rpg_27_tavolga = EnumValue(107, "105mm RPG-27 Tavolga") + _125mm_rpg_28_klyukva = EnumValue(108, "125mm RPG-28 Klyukva") + _40mm_rpg_7 = EnumValue(110, "40mm RPG-7") + _40mm_psrl_1_rpg_7usa = EnumValue(111, "40mm PSRL-1 (RPG-7USA)") + _40mm_gs_777_psrl_2 = EnumValue(112, "40mm GS-777/PSRL-2") + _68mm_rpg_76_komar_mosquito = EnumValue(120, "68mm RPG-76 Komar (Mosquito)") + _120mm_sep_dard_120 = EnumValue(125, "120mm SEP Dard 120") + _58mm_wasp_58 = EnumValue(128, "58mm WASP 58") + _73mm_lrac_73_50 = EnumValue(130, "73mm LRAC 73-50") + _89mm_lrac_89_f1_strim = EnumValue(131, "89mm LRAC 89-F1 STRIM") + _90mm_matador_man_portable_anti_tank_anti_door = EnumValue(135, "90mm MATADOR (Man-Portable Anti-Tank, Anti-DOoR)") + _90mm_matador_mp = EnumValue(136, "90mm MATADOR-MP") + _90mm_matador_wb = EnumValue(137, "90mm MATADOR-WB") + _90mm_matador_as = EnumValue(138, "90mm MATADOR-AS") + _78mm_mara_anti_tank_rocket_launcher = EnumValue(140, "78mm MARA Anti-Tank Rocket Launcher") + _120mm_type_98_pf98 = EnumValue(145, "120mm Type-98 PF98") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_assault_rifles.py b/dis/siso_ref_010/enums/life_form_human_specific_assault_rifles.py new file mode 100644 index 0000000..66564cf --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_assault_rifles.py @@ -0,0 +1,215 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 474, + * marshal size 8; + * LifeFormHumanSpecificAssaultRifles has 80 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificAssaultRifles(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + _45mm_interdynamics_mkr = EnumValue(1, "4.5mm Interdynamics MKR") + _545mm_ak_74 = EnumValue(10, "5.45mm AK-74") + _545mm_aks_74 = EnumValue(11, "5.45mm AKS-74") + _545mm_ak_74m = EnumValue(12, "5.45mm AK-74M") + _545mm_kbk_wz_1988_tantal = EnumValue(13, "5.45mm Kbk wz. 1988 Tantal") + _545mm_fort_221 = EnumValue(14, "5.45mm Fort-221") + _545mm_556mm_762mm_ipi_malyuk = EnumValue(20, "5.45mm/5.56mm/7.62mm IPI Malyuk") + _556mm_ak_101 = EnumValue(30, "5.56mm AK-101") + _556mm_diemaco_c7 = EnumValue(31, "5.56mm Diemaco C7") + _556mm_colt_canada_c8_carbine = EnumValue(32, "5.56mm Colt Canada C8 Carbine") + _556mm_giat_famas_g2 = EnumValue(33, "5.56mm GIAT FAMAS G2") + _556mm_fn_fnc = EnumValue(34, "5.56mm FN FNC") + _556mm_hk_g36 = EnumValue(35, "5.56mm HK G36") + _556mm_imi_galil = EnumValue(36, "5.56mm IMI Galil") + _556mm_insas = EnumValue(37, "5.56mm INSAS") + _556mm_daewoo_k1 = EnumValue(38, "5.56mm Daewoo K1") + _556mm_daewoo_k2 = EnumValue(39, "5.56mm Daewoo K2") + _556mm_m16a1 = EnumValue(40, "5.56mm M16A1") + _556mm_m16a2_a3_a4 = EnumValue(41, "5.56mm M16A2/A3/A4") + _556mm_colt_m4 = EnumValue(42, "5.56mm Colt M4") + _556mm_colt_m4_special_operations_peculiar_modification_sopmod = EnumValue(43, "5.56mm Colt M4 Special Operations Peculiar Modification (SOPMOD)") + _556mm_ruger_mini_14 = EnumValue(44, "5.56mm Ruger Mini-14") + _556mm_enfield_sa_80a2 = EnumValue(45, "5.56mm Enfield SA-80A2") + _556mm_pindad_ss1_v1 = EnumValue(46, "5.56mm Pindad SS1 V1") + _556mm_pindad_ss1_v2 = EnumValue(47, "5.56mm Pindad SS1 V2") + _556mm_pindad_ss1_v3 = EnumValue(48, "5.56mm Pindad SS1 V3") + _556mm_steyr_aug_a1 = EnumValue(49, "5.56mm Steyr AUG A1") + _556mm_t65 = EnumValue(50, "5.56mm T65") + _556mm_t91 = EnumValue(51, "5.56mm T91") + _556mm_tavor_tar_21 = EnumValue(52, "5.56mm Tavor TAR-21") + _556mm_type_cq_m311 = EnumValue(53, "5.56mm Type CQ / M311") + _556mm_daewoo_k11 = EnumValue(54, "5.56mm Daewoo K11") + _556mm_austeyr_f88 = EnumValue(55, "5.56mm Austeyr F88") + _556mm_austeyr_f88_gla = EnumValue(56, "5.56mm Austeyr F88-GLA") + _556mm_austeyr_f88_s_a1 = EnumValue(57, "5.56mm Austeyr F88-S-A1") + _556mm_austeyr_f88_s_a2 = EnumValue(58, "5.56mm Austeyr F88-S-A2") + _556mm_austeyr_f88_c = EnumValue(59, "5.56mm Austeyr F88-C") + _556mm_austeyr_f88_s_a1c = EnumValue(60, "5.56mm Austeyr F88-S-A1C") + _556mm_austeyr_f88_s_a1_ltr = EnumValue(61, "5.56mm Austeyr F88-S-A1 LTR") + _556mm_austeyr_ef88 = EnumValue(62, "5.56mm Austeyr EF88") + _556mm_bushmaster_xm15 = EnumValue(63, "5.56mm Bushmaster XM15") + _556mm_hk416 = EnumValue(64, "5.56mm HK416") + _556mm_f90 = EnumValue(65, "5.56mm F90") + _556mm_f90g = EnumValue(66, "5.56mm F90(G)") + _556mm_f90m = EnumValue(67, "5.56mm F90M") + _556mm_f90mg = EnumValue(68, "5.56mm F90M(G)") + _556mm_f90cqb = EnumValue(69, "5.56mm F90CQB") + _556mm_mk17_scar_l = EnumValue(70, "5.56mm MK17 SCAR-L") + _556mm_cz_805_bren = EnumValue(71, "5.56mm CZ 805 BREN") + _556mm_fort_224 = EnumValue(72, "5.56mm Fort-224") + _556mm_fort_227 = EnumValue(73, "5.56mm Fort-227") + _556mm_zbroyar_uar_15 = EnumValue(74, "5.56mm Zbroyar UAR-15") + _556mm_zbroyar_z_15 = EnumValue(75, "5.56mm Zbroyar Z-15") + _556mm_762mm_cz_bren_2 = EnumValue(76, "5.56mm/7.62mm CZ BREN 2") + _58mm_qbz_95_type_95 = EnumValue(100, "5.8mm QBZ-95 (Type 95)") + _762mm_ak_103 = EnumValue(110, "7.62mm AK-103") + _762mm_ak_104 = EnumValue(111, "7.62mm AK-104") + _762mm_ak_47 = EnumValue(112, "7.62mm AK-47") + _762mm_akm = EnumValue(113, "7.62mm AKM") + _762mm_aks_47 = EnumValue(114, "7.62mm AKS-47") + _762mm_hk_g3a3 = EnumValue(115, "7.62mm HK G3A3") + _762mm_imi_galil = EnumValue(116, "7.62mm IMI Galil") + _762mm_kls = EnumValue(117, "7.62mm KLS") + _762mm_sks = EnumValue(118, "7.62mm SKS") + _762mm_type_56 = EnumValue(119, "7.62mm Type 56") + _762mm_type_63_68 = EnumValue(120, "7.62mm Type 63/68") + _762mm_type_81 = EnumValue(121, "7.62mm Type 81") + _762mm_mk17_scar_h = EnumValue(122, "7.62mm MK17 SCAR-H") + _762mm_fort_228 = EnumValue(123, "7.62mm Fort-228") + _762mm_fort_229 = EnumValue(124, "7.62mm Fort-229") + _762mm_zbroyar_z_008_non_sniper_variant = EnumValue(125, "7.62mm Zbroyar Z-008 (non-sniper variant)") + _762mm_zbroyar_z_10 = EnumValue(126, "7.62mm Zbroyar Z-10") + _762mm_mayak_mz_10 = EnumValue(127, "7.62mm Mayak MZ-10") + _762mm_stiletto_systems_stl_016_300_winchester = EnumValue(128, "7.62mm Stiletto Systems STL-016 .300 Winchester") + _762mm_cz_bren_2_br = EnumValue(129, "7.62mm CZ BREN 2 BR") + _762mm_sa_vz_58_p = EnumValue(130, "7.62mm Sa vz. 58 P") + _762mm_sa_vz_58_v = EnumValue(131, "7.62mm Sa vz. 58 V") + _68mm_m7_next_generation_squad_weapon_ngsw = EnumValue(150, "6.8mm M7 Next Generation Squad Weapon (NGSW)") + _8mm_lebel_m16 = EnumValue(240, "8mm Lebel M16") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_drone_guns.py b/dis/siso_ref_010/enums/life_form_human_specific_drone_guns.py new file mode 100644 index 0000000..e179420 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_drone_guns.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 524, + * marshal size 8; + * LifeFormHumanSpecificDroneGuns has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificDroneGuns(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + dronegun_tactical = EnumValue(15, "DroneGun Tactical") + dronegun_mkii = EnumValue(16, "DroneGun MKII") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_equipment_class.py b/dis/siso_ref_010/enums/life_form_human_specific_equipment_class.py new file mode 100644 index 0000000..f90f214 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_equipment_class.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 505, + * marshal size 8; + * LifeFormHumanSpecificEquipmentClass has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificEquipmentClass(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + signal_smoke = EnumValue(1, "Signal Smoke") + flash_light = EnumValue(2, "Flash Light") + signal_mirror = EnumValue(3, "Signal Mirror") + ir_strobe = EnumValue(4, "IR Strobe") + ir_illuminator = EnumValue(5, "IR Illuminator") + spotlight = EnumValue(6, "Spotlight") + default = signal_smoke + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_equipment_nonspecific.py b/dis/siso_ref_010/enums/life_form_human_specific_equipment_nonspecific.py new file mode 100644 index 0000000..ca87cee --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_equipment_nonspecific.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 529, + * marshal size 8; + * LifeFormHumanSpecificEquipmentNonspecific has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificEquipmentNonspecific(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + toolbox = EnumValue(1, "Toolbox") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_flame_rockets.py b/dis/siso_ref_010/enums/life_form_human_specific_flame_rockets.py new file mode 100644 index 0000000..9c5e8d1 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_flame_rockets.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 522, + * marshal size 8; + * LifeFormHumanSpecificFlameRockets has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificFlameRockets(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + _66mm_m202_flash = EnumValue(20, "66mm M202 Flash") + _62mm_fhj_84 = EnumValue(30, "62mm FHJ-84") + _90mm_c90_cr_fim_m3 = EnumValue(40, "90mm C90-CR-FIM (M3)") + _93mm_rpo_a_shmel = EnumValue(50, "93mm RPO-A Shmel") + _93mm_rpo_z_shmel = EnumValue(51, "93mm RPO-Z Shmel") + _93mm_rpo_d_shmel = EnumValue(52, "93mm RPO-D Shmel") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_flame_throwers.py b/dis/siso_ref_010/enums/life_form_human_specific_flame_throwers.py new file mode 100644 index 0000000..c3f93e5 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_flame_throwers.py @@ -0,0 +1,150 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 523, + * marshal size 8; + * LifeFormHumanSpecificFlameThrowers has 15 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificFlameThrowers(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + handflammpatrone = EnumValue(10, "Handflammpatrone") + fmw_41 = EnumValue(11, "FmW 41") + m1a1 = EnumValue(20, "M1A1") + m2a1_7 = EnumValue(21, "M2A1-7") + m9a1_7 = EnumValue(22, "M9A1-7") + lpo_50 = EnumValue(30, "LPO-50") + k_pattern = EnumValue(35, "K Pattern") + portable_no_2_ack_pack = EnumValue(36, "Portable, No 2 Ack Pack") + marsden = EnumValue(37, "Marsden") + harvey = EnumValue(38, "Harvey") + roks_2 = EnumValue(45, "ROKS-2") + roks_3 = EnumValue(46, "ROKS-3") + type_93 = EnumValue(50, "Type-93") + type_100 = EnumValue(51, "Type-100") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_grenade_launchers.py b/dis/siso_ref_010/enums/life_form_human_specific_grenade_launchers.py new file mode 100644 index 0000000..54452bc --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_grenade_launchers.py @@ -0,0 +1,180 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 515, + * marshal size 8; + * LifeFormHumanSpecificGrenadeLaunchers has 45 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificGrenadeLaunchers(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + _40x46mm_arsenal_uggl_m1 = EnumValue(1, "40x46mm Arsenal UGGL-M1") + _40x46mm_arsenal_msgl = EnumValue(2, "40x46mm Arsenal MSGL") + _40mm_vog_arsenal_msgl = EnumValue(3, "40mm VOG Arsenal MSGL") + _40x46mm_arsenal_ubgl_m16 = EnumValue(4, "40x46mm Arsenal UBGL-M16") + _40x46mm_arsenal_ubgl_m8 = EnumValue(5, "40x46mm Arsenal UBGL-M8") + _40x46mm_arsenal_ubgl_m7 = EnumValue(6, "40x46mm Arsenal UBGL-M7") + _30mm_bs_1_tishina = EnumValue(10, "30mm BS-1 Tishina") + _40mm_bts_203 = EnumValue(11, "40mm BTS-203") + _40mm_indumil_imc_40 = EnumValue(12, "40mm Indumil IMC-40") + _40mm_vog_bg_15 = EnumValue(20, "40mm VOG BG-15") + _40mm_vog_gp_25_kostoyor = EnumValue(21, "40mm VOG GP-25 Kostoyor") + _40mm_vog_gp_30_obuvka = EnumValue(22, "40mm VOG GP-30 Obuvka") + _40mm_vog_gp_34 = EnumValue(23, "40mm VOG GP-34") + _40mm_vog_rgm_40_kastet = EnumValue(24, "40mm VOG RGM-40 Kastet") + _40mm_vog_rg_6 = EnumValue(25, "40mm VOG RG-6") + _40x46mm_cz_805_g1_ubgl = EnumValue(26, "40x46mm CZ 805 G1 UBGL") + _40x46mm_m79 = EnumValue(30, "40x46mm M79") + _40x46mm_m203 = EnumValue(31, "40x46mm M203") + _40x36mm_m320 = EnumValue(32, "40x36mm M320") + _40x46mm_cis_40_gl = EnumValue(35, "40x46mm CIS 40 GL") + _40x46mm_eagle_gl = EnumValue(36, "40x46mm EAGLE GL") + _40x46mm_hk_ag36 = EnumValue(37, "40x46mm HK AG36") + _40x46mm_hk_ag_c_glm = EnumValue(38, "40x46mm HK AG-C/GLM") + _40x46mm_hk69a1 = EnumValue(39, "40x46mm HK69A1") + _40x46mm_beretta_glx_160 = EnumValue(40, "40x46mm Beretta GLX 160") + _40x46mm_arde_ubgl = EnumValue(41, "40x46mm ARDE UBGL") + _40x46mm_xml148 = EnumValue(42, "40x46mm XML148") + _40x46mm_china_lake_gl = EnumValue(43, "40x46mm China Lake GL") + _40x46mm_hawk_mm_1 = EnumValue(44, "40x46mm Hawk MM-1") + _25x40mm_xm25_cdte = EnumValue(50, "25x40mm XM25 CDTE") + _37mm_milkor37_38_ll_stopper = EnumValue(60, "37mm Milkor37/38 LL Stopper") + _40mm_milkor40_gl = EnumValue(61, "40mm Milkor40 GL") + _40mm_milkor_mgl = EnumValue(62, "40mm Milkor MGL") + _40x47mm_pallad_wz1974 = EnumValue(65, "40x47mm Pallad wz1974") + _40x47mm_pallad_wz1983 = EnumValue(66, "40x47mm Pallad wz1983") + ugl_200_canister_rwgl_3 = EnumValue(70, "UGL 200 Canister RWGL-3") + _20x30mm_st_daewoo_k11 = EnumValue(80, "20x30mm ST Daewoo K11") + _30mm_rgsh_30_gl = EnumValue(85, "30mm RGSh-30 GL") + _35mm_type_91_breechload_gl = EnumValue(90, "35mm Type-91 BreechLoad GL") + _40x53mm_czw_40 = EnumValue(95, "40x53mm CZW-40") + _40x53mm_uag_40_agl = EnumValue(96, "40x53mm UAG-40 AGL") + _45mm_dp_64 = EnumValue(100, "45mm DP-64") + _20x42mm_neopup_paw_20 = EnumValue(105, "20x42mm Neopup PAW-20") + _68mm_rpg_75_mp = EnumValue(110, "68mm RPG-75-MP") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_grenade_launching_machine_gun.py b/dis/siso_ref_010/enums/life_form_human_specific_grenade_launching_machine_gun.py new file mode 100644 index 0000000..573fabe --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_grenade_launching_machine_gun.py @@ -0,0 +1,155 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 517, + * marshal size 8; + * LifeFormHumanSpecificGrenadeLaunchingMachineGun has 20 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificGrenadeLaunchingMachineGun(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + _40x53mm_hk_gmg = EnumValue(20, "40x53mm HK GMG") + _40x53mm_mk47_striker = EnumValue(25, "40x53mm Mk47 Striker") + _40mm_m75 = EnumValue(26, "40mm M75") + _40mm_m129 = EnumValue(27, "40mm M129") + _40x46mm_xm_174 = EnumValue(28, "40x46mm XM 174") + _40x46mm_mk18_mod_0 = EnumValue(29, "40x46mm Mk18 Mod 0") + _40x53mm_mk19 = EnumValue(30, "40x53mm Mk19") + _40x46mm_mk20_mod_0 = EnumValue(31, "40x46mm Mk20 Mod 0") + _30x29mm_rag_30_sag_30 = EnumValue(40, "30x29mm RAG-30/SAG-30") + _30x29mm_ags_17_plamya = EnumValue(41, "30x29mm AGS-17 Plamya") + _30x29mm_ags_30_atlant = EnumValue(42, "30x29mm AGS-30 Atlant") + _40mm_vog_ags_40_balkan = EnumValue(43, "40mm VOG AGS-40 Balkan") + _40x53mm_sb_lag_40 = EnumValue(44, "40x53mm SB LAG 40") + _40x53mm_vektor_y3 = EnumValue(50, "40x53mm Vektor Y3") + _40x53mm_cis_40 = EnumValue(55, "40x53mm CIS 40") + _40x56mm_howa_type_96 = EnumValue(60, "40x56mm Howa Type-96") + _40x53mm_daewoo_precision_industries_k4 = EnumValue(65, "40x53mm Daewoo Precision Industries K4") + _25x59mm_xm307_advanced_crew_served_weapon = EnumValue(70, "25x59mm XM307 Advanced Crew Served Weapon") + _35x32mm_qlz87 = EnumValue(80, "35x32mm QLZ87") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_hand_guns.py b/dis/siso_ref_010/enums/life_form_human_specific_hand_guns.py new file mode 100644 index 0000000..2f11972 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_hand_guns.py @@ -0,0 +1,161 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 513, + * marshal size 8; + * LifeFormHumanSpecificHandGuns has 26 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificHandGuns(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + _545mm_psm = EnumValue(1, "5.45mm PSM") + _58mm_norinco_qsz_92 = EnumValue(10, "5.8mm Norinco QSZ-92") + _9mm_mk3_slp = EnumValue(30, "9mm MK3 SLP") + _9mm_beretta_92s_92fs_m9 = EnumValue(31, "9mm Beretta 92S/92FS (M9)") + _9mm_hamp_k_usp = EnumValue(32, "9mm H&K USP") + _9mm_stechkin_aps = EnumValue(33, "9mm Stechkin APS") + _9mm_makarov_pm = EnumValue(34, "9mm Makarov PM") + _9mm_smith_and_wesson_sd_sigma = EnumValue(35, "9mm Smith and Wesson SD (Sigma)") + _9mm_glock_17 = EnumValue(36, "9mm Glock 17") + _9mm_sig_sauer_m17 = EnumValue(37, "9mm SIG Sauer M17") + _9mm_sig_pro = EnumValue(38, "9mm SIG Pro") + _9mm_smith_and_wesson_sw1911 = EnumValue(39, "9mm Smith and Wesson SW1911") + _9mm_smith_and_wesson_5900_series = EnumValue(40, "9mm Smith and Wesson 5900-series") + _45_cal_m1911 = EnumValue(41, ".45 Cal M1911") + _9mm_cz_75 = EnumValue(42, "9mm CZ 75") + _9mm_cz_82 = EnumValue(43, "9mm CZ 82") + _9mm_norinco_qsz_92_cf_98 = EnumValue(44, "9mm Norinco QSZ-92 (CF-98)") + _9mm_cz_p_10_c = EnumValue(45, "9mm CZ P-10 C") + _907mm_ruger_gp_100 = EnumValue(50, "9.07mm Ruger GP 100") + _10mm_glock_20 = EnumValue(60, "10mm Glock 20") + _9mm_fort_12 = EnumValue(70, "9mm Fort-12") + _9mm_fort_14tp = EnumValue(71, "9mm Fort-14TP") + _9mm_fort_17 = EnumValue(72, "9mm Fort-17") + _9mm_fort_21 = EnumValue(73, "9mm Fort-21") + _127mm_norinco_np762_px_3 = EnumValue(80, "12.7mm Norinco NP762 (PX-3)") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_high_power_rifles.py b/dis/siso_ref_010/enums/life_form_human_specific_high_power_rifles.py new file mode 100644 index 0000000..aecc100 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_high_power_rifles.py @@ -0,0 +1,145 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 475, + * marshal size 8; + * LifeFormHumanSpecificHighPowerRifles has 10 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificHighPowerRifles(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + _762mm_m14 = EnumValue(10, "7.62mm M14") + _762mm_remington_700 = EnumValue(11, "7.62mm Remington 700") + _762mm_sig_sauer_ssg_2000 = EnumValue(12, "7.62mm SIG-Sauer SSG-2000") + _762mm_stoner_sr_25 = EnumValue(13, "7.62mm Stoner SR-25") + _762mm_mosin_nagant_model_1891_30 = EnumValue(14, "7.62mm Mosin-Nagant Model 1891/30") + _762mm_hk417 = EnumValue(15, "7.62mm HK417") + _762mm_hk417_16_recce = EnumValue(16, "7.62mm HK417 16' Recce") + _765mm_bar_m1918 = EnumValue(50, "7.65mm BAR M1918") + _765mm_m1_garand = EnumValue(51, "7.65mm M1 Garand") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_lasers_class.py b/dis/siso_ref_010/enums/life_form_human_specific_lasers_class.py new file mode 100644 index 0000000..fc78eb4 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_lasers_class.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 527, + * marshal size 8; + * LifeFormHumanSpecificLasersClass has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificLasersClass(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + generic_laser_designator = EnumValue(1, "Generic Laser Designator") + generic_laser_pointer = EnumValue(2, "Generic Laser Pointer") + default = generic_laser_designator + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_logistics_eqclass.py b/dis/siso_ref_010/enums/life_form_human_specific_logistics_eqclass.py new file mode 100644 index 0000000..f5e0681 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_logistics_eqclass.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 525, + * marshal size 8; + * LifeFormHumanSpecificLogisticsEQClass has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificLogisticsEQClass(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + sling_load_pendant = EnumValue(1, "Sling Load Pendant") + default = sling_load_pendant + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_machine_guns.py b/dis/siso_ref_010/enums/life_form_human_specific_machine_guns.py new file mode 100644 index 0000000..8fe59b3 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_machine_guns.py @@ -0,0 +1,223 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 516, + * marshal size 8; + * LifeFormHumanSpecificMachineGuns has 88 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificMachineGuns(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + _556x45mm_xm214_microgun_six_pak = EnumValue(10, "5.56x45mm XM214 Microgun Six-Pak") + _762x51mm_m134_xm196_minigun = EnumValue(11, "7.62x51mm M134/XM196 Minigun") + _556x45mm_m249_fn_minimi_saw_lmg = EnumValue(20, "5.56x45mm M249/FN Minimi SAW/LMG") + _556x45mm_fn_minimi_mk3_lmg = EnumValue(21, "5.56x45mm FN Minimi Mk3 LMG") + _762x51mm_fn_minimi_762_mk3_gpmg = EnumValue(22, "7.62x51mm FN Minimi 7.62 Mk3 GPMG") + _762x63mm_m1941_johnson = EnumValue(25, "7.62x63mm M1941 Johnson") + _762x63mm_m1918_bar = EnumValue(26, "7.62x63mm M1918 BAR") + _762x51mm_m1919a4_mk_21_mod_0_browning_mmg = EnumValue(27, "7.62x51mm M1919A4/Mk 21 Mod 0 Browning MMG") + _762x63mm_m1919a6_browning_mmg = EnumValue(28, "7.62x63mm M1919A6 Browning MMG") + _762x51mm_m37_browning_mmg = EnumValue(29, "7.62x51mm M37 Browning MMG") + _556x45mm_ares_shrike_556_lmg = EnumValue(30, "5.56x45mm Ares Shrike 5.56 LMG") + _556x45mm_lsat_lmg = EnumValue(31, "5.56x45mm LSAT LMG") + _556x45mm_cmg_1_lmg = EnumValue(32, "5.56x45mm CMG-1 LMG") + _556x45mm_cmg_2_lmg = EnumValue(33, "5.56x45mm CMG-2 LMG") + _556x45mm_stoner_63a_lmg = EnumValue(34, "5.56x45mm Stoner 63A LMG") + _556x45mm_ultimax_100_lmg = EnumValue(35, "5.56x45mm Ultimax 100 LMG") + _556x54mm_beretta_as70_90_lmg = EnumValue(36, "5.56x54mm Beretta AS70/90 LMG") + _556x45mm_cetme_ameli_lmg = EnumValue(37, "5.56x45mm CETME Ameli LMG") + _556x45mm_imi_negev_lmg = EnumValue(38, "5.56x45mm IMI Negev LMG") + _556x45mm_insas_lmg = EnumValue(39, "5.56x45mm INSAS LMG") + _556x45mm_aug_lmg = EnumValue(40, "5.56x45mm AUG LMG") + _556x45mm_aug_hbar_lmg = EnumValue(41, "5.56x45mm AUG HBAR LMG") + _556x45mm_hk_mg4_lmg = EnumValue(43, "5.56x45mm HK MG4 LMG") + _556x45mm_hk23_gr_9_lmg = EnumValue(44, "5.56x45mm HK23/GR-9 LMG") + _556x45mm_m27_iar_saw = EnumValue(46, "5.56x45mm M27 IAR SAW") + _556x45mm_l86_lsw = EnumValue(47, "5.56x45mm L86 LSW") + _556x45mm_daewoo_k3_lmg = EnumValue(48, "5.56x45mm Daewoo K3 LMG") + _556x45mm_vector_mini_ss_gpmg = EnumValue(49, "5.56x45mm Vector Mini SS GPMG") + _762x51mm_m60_gpmg = EnumValue(50, "7.62x51mm M60 GPMG") + _762x51mm_m60e3_gpmg = EnumValue(51, "7.62x51mm M60E3 GPMG") + _762x51mm_m60e4_gpmg = EnumValue(52, "7.62x51mm M60E4 GPMG") + _762x51mm_m60e6_gpmg = EnumValue(53, "7.62x51mm M60E6 GPMG") + _762x51mm_mark_48_gmpg = EnumValue(55, "7.62x51mm Mark 48 GMPG") + _762x51mm_m240_fn_mag_58_gpmg = EnumValue(58, "7.62x51mm M240/FN MAG 58 GPMG") + _762x51mm_m240e4_m240b_gpmg = EnumValue(59, "7.62x51mm M240E4/M240B GPMG") + _762x51mm_m240e1_m240d_gpmg = EnumValue(60, "7.62x51mm M240E1/M240D GPMG") + _762x51mm_m240g_gpmg = EnumValue(61, "7.62x51mm M240G GPMG") + _762x51mm_m240e5_m240h_gpmg = EnumValue(62, "7.62x51mm M240E5/M240H GPMG") + _762x51mm_m240l_gpmg = EnumValue(63, "7.62x51mm M240L GPMG") + _762x39mm_kk_62_lmg = EnumValue(65, "7.62x39mm Kk 62 LMG") + _762x51mm_vector_ss_77_gpmg = EnumValue(70, "7.62x51mm Vector SS-77 GPMG") + _762x51mm_sig_mg_710_3_gpmg = EnumValue(71, "7.62x51mm SIG MG 710-3 GPMG") + _762x51mm_sterling_762_gmpg = EnumValue(72, "7.62x51mm Sterling 7.62 GMPG") + _762x51mm_sumitomo_type_62_gpmg = EnumValue(73, "7.62x51mm Sumitomo Type-62 GPMG") + _762x51mm_daewoo_k12_gpmg = EnumValue(74, "7.62x51mm Daewoo K12 GPMG") + _762x51mm_mg_51_gpmg = EnumValue(75, "7.62x51mm MG 51 GPMG") + _762x51mm_rheinmetall_mg_3 = EnumValue(76, "7.62x51mm Rheinmetall MG 3") + _762x51mm_rheinmetall_mg_3kws = EnumValue(77, "7.62x51mm Rheinmetall MG 3KWS") + _762x51mm_mg5_hk121_gpmg = EnumValue(80, "7.62x51mm MG5/HK121 GPMG") + _762x51mm_hk21_gpmg = EnumValue(81, "7.62x51mm HK21 GPMG") + _762x51mm_aa_52_gpmp = EnumValue(85, "7.62x51mm AA-52 GPMP") + _762x51mm_ukm_2000_gpmg = EnumValue(86, "7.62x51mm UKM-2000 GPMG") + _762x54mm_uk_vz_59_gpmg = EnumValue(88, "7.62x54mm Uk vz. 59 GPMG") + _792x57mm_mg_42_gpmg = EnumValue(89, "7.92x57mm MG 42 GPMG") + _127x99mm_m2a1_browning_hmg = EnumValue(100, "12.7x99mm M2A1 Browning HMG") + _127x99mm_m2hb_browning_hmg = EnumValue(101, "12.7x99mm M2HB Browning HMG") + _127x99mm_m2hb_qcb_browning_hmg = EnumValue(102, "12.7x99mm M2HB-QCB Browning HMG") + _127x99mm_m85c_hmg = EnumValue(105, "12.7x99mm M85C HMG") + _127x99mm_rheinmetall_rmg50_hmg = EnumValue(108, "12.7x99mm Rheinmetall RMG.50 HMG") + _127x99mm_hk25_hmg = EnumValue(110, "12.7x99mm HK25 HMG") + _127x99mm_cis_50mg = EnumValue(112, "12.7x99mm CIS 50MG") + _545x39mm_ip_2_lmg = EnumValue(120, "5.45x39mm IP-2 LMG") + _545x39mm_nikonov_lmg = EnumValue(121, "5.45x39mm Nikonov LMG") + _545x39mm_m74_rpk = EnumValue(122, "5.45x39mm M74 RPK") + _762x39mm_m43_rpk = EnumValue(125, "7.62x39mm M43 RPK") + _762x39mm_rpd_saw = EnumValue(126, "7.62x39mm RPD SAW") + _762x39mm_zastava_m72 = EnumValue(127, "7.62x39mm Zastava M72") + _762x39mm_type_81_lmg = EnumValue(128, "7.62x39mm Type-81 LMG") + _762x51mm_zastava_m77 = EnumValue(135, "7.62x51mm Zastava M77") + _762x54mm_pk_gpmg = EnumValue(140, "7.62x54mm PK GPMG") + _762x54mm_aek_999_gpmp = EnumValue(141, "7.62x54mm AEK-999 GPMP") + _762x54mm_pecheneg_gpmg = EnumValue(142, "7.62x54mm Pecheneg GPMG") + _762x54mm_zastava_m84 = EnumValue(143, "7.62x54mm Zastava M84") + _762x54mm_type_67_gpmg = EnumValue(144, "7.62x54mm Type-67 GPMG") + _762x54mm_type_80_gpmg = EnumValue(145, "7.62x54mm Type-80 GPMG") + _127x108mm_nsv_hmg = EnumValue(150, "12.7x108mm NSV HMG") + _127x108mm_kord_hmg = EnumValue(151, "12.7x108mm Kord HMG") + _127x108mm_kpd_127_hmg = EnumValue(152, "12.7x108mm KPD-12.7 HMG") + _127x108mm_zastava_m02_coyotoe_hmg = EnumValue(153, "12.7x108mm Zastava M02 Coyotoe HMG") + _127x108mm_zastava_m87 = EnumValue(154, "12.7x108mm Zastava M87") + _127x108mm_type_77_hmg = EnumValue(155, "12.7x108mm Type-77 HMG") + _127x108mm_w85_hmg = EnumValue(156, "12.7x108mm W85 HMG") + _127x108mm_type_90_hmg = EnumValue(157, "12.7x108mm Type-90 HMG") + _58x42mm_qjy_88_lmg = EnumValue(164, "5.8x42mm QJY-88 LMG") + _58x42mm_qbb_95_dbp87_lmg = EnumValue(165, "5.8x42mm QBB-95 DBP87 LMG") + _556x45mm_qbb_95_1_lmg = EnumValue(166, "5.56x45mm QBB-95-1 LMG") + _68mm_m250_next_generation_squad_weapon_ngsw = EnumValue(170, "6.8mm M250 Next Generation Squad Weapon (NGSW)") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_man_portable_air_defense_system.py b/dis/siso_ref_010/enums/life_form_human_specific_man_portable_air_defense_system.py new file mode 100644 index 0000000..abcda39 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_man_portable_air_defense_system.py @@ -0,0 +1,162 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 520, + * marshal size 8; + * LifeFormHumanSpecificManPortableAirDefenseSystem has 27 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificManPortableAirDefenseSystem(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + _70mm_fim_43_redeye = EnumValue(1, "70mm FIM-43 Redeye") + _70mm_fim_92_stinger = EnumValue(2, "70mm FIM-92 Stinger") + _76mm_blowpipe = EnumValue(10, "76mm Blowpipe") + _76mm_starburst_javelin_s_15 = EnumValue(11, "76mm Starburst (Javelin S-15)") + _130mm_starstreak_hvm = EnumValue(12, "130mm Starstreak HVM") + _90mm_mistral = EnumValue(15, "90mm Mistral") + _72mm_9k32m_strela_2_sa_7 = EnumValue(20, "72mm 9K32M Strela-2 (SA-7)") + _72mm_9k36_strela_3_sa_14 = EnumValue(21, "72mm 9K36 Strela-3 (SA-14)") + _72mm_9k38_igla_sa_18 = EnumValue(22, "72mm 9K38 Igla (SA-18)") + _72mm_9k310_igla_m_sa_16 = EnumValue(23, "72mm 9K310 Igla-M (SA-16)") + _72mm_9k333_verba_sa_29 = EnumValue(24, "72mm 9K333 Verba (SA-29)") + _72mm_9k338_igla_s_sa_24_grinch = EnumValue(25, "72mm 9K338 Igla-S (SA-24 Grinch)") + _72mm_9k32m_strela_2m_sa_7b = EnumValue(26, "72mm 9K32M Strela-2M (SA-7B)") + _72mm_ppzr_piorun_grom_m = EnumValue(27, "72mm PPZR Piorun (Grom-M)") + _72mm_hn_5_hong_ying_5 = EnumValue(30, "72mm HN-5 Hong-Ying-5") + _72mm_csa_7_qw_1_vanguard = EnumValue(31, "72mm CSA-7 (QW-1, Vanguard)") + _72mm_csa_8_qw_2 = EnumValue(32, "72mm CSA-8 (QW-2)") + _90mm_qw_3 = EnumValue(33, "90mm QW-3") + _72mm_csa_10_fn_6 = EnumValue(34, "72mm CSA-10 (FN-6)") + _72mm_csa_11_qw_18 = EnumValue(35, "72mm CSA-11 (QW-18)") + _72mm_csa_14_fn_16 = EnumValue(36, "72mm CSA-14 (FN-16)") + _71mm_misagh_1 = EnumValue(45, "71mm Misagh-1") + _71mm_misagh_2 = EnumValue(46, "71mm Misagh-2") + _80mm_type_91_kin_sam = EnumValue(50, "80mm Type-91 Kin-SAM") + _80mm_kp_sam_shun_gung_chiron = EnumValue(55, "80mm KP-SAM Shun-Gung (Chiron)") + _106mm_rbs_70 = EnumValue(60, "106mm RBS-70") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_medical_equipment.py b/dis/siso_ref_010/enums/life_form_human_specific_medical_equipment.py new file mode 100644 index 0000000..1317065 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_medical_equipment.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 530, + * marshal size 8; + * LifeFormHumanSpecificMedicalEquipment has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificMedicalEquipment(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + field_medical_kit = EnumValue(1, "Field Medical Kit") + surgical_kit = EnumValue(2, "Surgical Kit") + first_aid_kit = EnumValue(3, "First Aid Kit") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_mortars.py b/dis/siso_ref_010/enums/life_form_human_specific_mortars.py new file mode 100644 index 0000000..99f0cb6 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_mortars.py @@ -0,0 +1,148 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 512, + * marshal size 8; + * LifeFormHumanSpecificMortars has 13 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificMortars(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + others = EnumValue(0, "Others") + _60mm_m224 = EnumValue(30, "60mm M224") + _60mm_antos = EnumValue(31, "60mm ANTOS") + _60mm_kba_118 = EnumValue(32, "60mm KBA-118") + _60mm_kba_48m = EnumValue(33, "60mm KBA-48M") + _81mm_f2 = EnumValue(50, "81mm F2") + _81mm_l16 = EnumValue(51, "81mm L16") + _81mm_m252 = EnumValue(52, "81mm M252") + _81mm_mx2_km = EnumValue(53, "81mm MX2-KM") + _82mm_upik_82 = EnumValue(54, "82mm UPIK-82") + _120mm_soltam_k6_m120 = EnumValue(60, "120mm Soltam K6/M120") + _120mm_m121 = EnumValue(61, "120mm M121") + _120mm_m120_15_molot = EnumValue(62, "120mm M120-15 Molot") + default = others + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_personal_electronics_class.py b/dis/siso_ref_010/enums/life_form_human_specific_personal_electronics_class.py new file mode 100644 index 0000000..3ddec41 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_personal_electronics_class.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 526, + * marshal size 8; + * LifeFormHumanSpecificPersonalElectronicsClass has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificPersonalElectronicsClass(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + cell_phone = EnumValue(1, "Cell Phone") + radio_telephone_pack = EnumValue(2, "Radio/Telephone Pack") + uav_uas_remote_controller = EnumValue(3, "UAV/UAS Remote Controller") + default = cell_phone + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_recoilless_rifles.py b/dis/siso_ref_010/enums/life_form_human_specific_recoilless_rifles.py new file mode 100644 index 0000000..25ca0fa --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_recoilless_rifles.py @@ -0,0 +1,168 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 521, + * marshal size 8; + * LifeFormHumanSpecificRecoillessRifles has 33 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificRecoillessRifles(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + _84mm_m136_at_4_cs = EnumValue(15, "84mm M136 AT-4 CS") + _57mm_m18_rr = EnumValue(20, "57mm M18 RR") + _75mm_m20_rr = EnumValue(21, "75mm M20 RR") + _120mm_m_28_davy_crockett = EnumValue(22, "120mm M-28 Davy Crockett") + _155mm_m_29_davy_crockett = EnumValue(23, "155mm M-29 Davy Crockett") + _106mm_m40_recoilless_rifle = EnumValue(24, "106mm M40 Recoilless Rifle") + _82mm_m60_rr = EnumValue(25, "82mm M60 RR") + _90mm_m67_rr = EnumValue(26, "90mm M67 RR") + _84mm_m1_carl_gustav = EnumValue(30, "84mm M1 Carl Gustav") + _84mm_m2_carl_gustav = EnumValue(31, "84mm M2 Carl Gustav") + _84mm_m3_carl_gustav = EnumValue(32, "84mm M3 Carl Gustav") + _84mm_m4_carl_gustav = EnumValue(33, "84mm M4 Carl Gustav") + _74mm_pansarskott_m_68_miniman = EnumValue(35, "74mm Pansarskott m/68 Miniman") + _84mm_alac = EnumValue(40, "84mm ALAC") + _82mm_b_10_rr = EnumValue(45, "82mm B-10 RR") + _107mm_b_11_rr = EnumValue(46, "107mm B-11 RR") + _80mm_breda_folgore = EnumValue(50, "80mm Breda Folgore") + _120mm_bat_rr = EnumValue(55, "120mm BAT RR") + _73mm_spg_9_kopye = EnumValue(60, "73mm SPG-9 Kopye") + _88mm_rcl_345in = EnumValue(65, "88mm RCL 3.45in") + _90mm_pvpj_110 = EnumValue(70, "90mm Pvpj 110") + _50mm_jagdfaust = EnumValue(75, "50mm Jagdfaust") + _30mm_rheinmetall_rmk30 = EnumValue(80, "30mm Rheinmetall RMK30") + _90mm_matador_mp_rgw_90 = EnumValue(85, "90mm Matador-MP (RGW-90)") + _90mm_matador_wb = EnumValue(86, "90mm Matador-WB") + _90mm_matador_as = EnumValue(87, "90mm Matador-AS") + _60mm_rgw_60 = EnumValue(88, "60mm RGW-60") + _88mm_55_s_55_raikka = EnumValue(90, "88mm 55 S 55 Raikka") + _95mm_95_s_58_61 = EnumValue(91, "95mm 95 S 58-61") + _73mm_lg40 = EnumValue(95, "73mm LG40") + _105mm_lg40 = EnumValue(96, "105mm LG40") + _105mm_lg42 = EnumValue(97, "105mm LG42") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_rocket_launchers.py b/dis/siso_ref_010/enums/life_form_human_specific_rocket_launchers.py new file mode 100644 index 0000000..9ddac3a --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_rocket_launchers.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 528, + * marshal size 8; + * LifeFormHumanSpecificRocketLaunchers has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificRocketLaunchers(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + _90mm_enforcer = EnumValue(1, "90mm Enforcer") + default = _90mm_enforcer + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_shot_guns.py b/dis/siso_ref_010/enums/life_form_human_specific_shot_guns.py new file mode 100644 index 0000000..9f89b86 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_shot_guns.py @@ -0,0 +1,274 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 511, + * marshal size 8; + * LifeFormHumanSpecificShotGuns has 139 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificShotGuns(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + browning_superposed_o_u = EnumValue(20, "Browning Superposed O/U") + browning_cynergy = EnumValue(21, "Browning Cynergy") + browning_auto_5 = EnumValue(22, "Browning Auto-5") + _185mm_browning_citori_o_u_12_gauge = EnumValue(23, "18.5mm Browning Citori O/U 12 Gauge") + _168mm_browning_citori_o_u_16_gauge = EnumValue(24, "16.8mm Browning Citori O/U 16 Gauge") + _156mm_browning_citori_o_u_20_gauge = EnumValue(25, "15.6mm Browning Citori O/U 20 Gauge") + _14mm_browning_citori_o_u_28_gauge = EnumValue(26, "14mm Browning Citori O/U 28 Gauge") + _104mm_browning_citori_o_u_410_bore = EnumValue(27, "10.4mm Browning Citori O/U .410 Bore") + _185mm_browning_double_automatic_12_gauge = EnumValue(28, "18.5mm Browning Double Automatic 12 Gauge") + _185mm_ithaca_37_12_gauge = EnumValue(29, "18.5mm Ithaca 37 12 Gauge") + _168mm_ithaca_37_16_gauge = EnumValue(30, "16.8mm Ithaca 37 16 Gauge") + _156mm_ithaca_37_20_gauge = EnumValue(31, "15.6mm Ithaca 37 20 Gauge") + _14mm_ithaca_37_28_gauge = EnumValue(32, "14mm Ithaca 37 28 Gauge") + _197mm_ithaca_mag_10_sa_10_gauge = EnumValue(33, "19.7mm Ithaca Mag-10 SA 10 Gauge") + _197mm_marlin_model_55_10_gauge = EnumValue(34, "19.7mm Marlin Model 55 10 Gauge") + _185mm_marlin_model_55_12_gauge = EnumValue(35, "18.5mm Marlin Model 55 12 Gauge") + _168mm_marlin_model_55_16_gauge = EnumValue(36, "16.8mm Marlin Model 55 16 Gauge") + _156mm_marlin_model_55_20_gauge = EnumValue(37, "15.6mm Marlin Model 55 20 Gauge") + _185mm_mossberg_500_12_gauge = EnumValue(38, "18.5mm Mossberg 500 12 Gauge") + _156mm_mossberg_500_20_gauge = EnumValue(39, "15.6mm Mossberg 500 20 Gauge") + _104mm_mossberg_500_410_bore = EnumValue(40, "10.4mm Mossberg 500 .410 Bore") + _185mm_mossberg_590_12_gauge = EnumValue(41, "18.5mm Mossberg 590 12 Gauge") + _156mm_mossberg_590_20_gauge = EnumValue(42, "15.6mm Mossberg 590 20 Gauge") + _104mm_mossberg_590_410_bore = EnumValue(43, "10.4mm Mossberg 590 .410 Bore") + _185mm_mossberg_930_sa_12_gauge = EnumValue(44, "18.5mm Mossberg 930 SA 12 Gauge") + remington_model_11_sa = EnumValue(45, "Remington Model 11 SA") + remington_model_10_12_gauge = EnumValue(46, "Remington Model 10 12 Gauge") + _156mm_remington_model_17_20_gauge = EnumValue(47, "15.6mm Remington Model 17 20 Gauge") + remington_model_31 = EnumValue(48, "Remington Model 31") + remington_model_11_48_sa = EnumValue(49, "Remington Model 11-48 SA") + _185mm_remington_870_12_gauge = EnumValue(50, "18.5mm Remington 870 12 Gauge") + _168mm_remington_870_16_gauge = EnumValue(51, "16.8mm Remington 870 16 Gauge") + _156mm_remington_870_20_gauge = EnumValue(52, "15.6mm Remington 870 20 Gauge") + _14mm_remington_870_28_gauge = EnumValue(53, "14mm Remington 870 28 Gauge") + _104mm_remington_870_410_bore = EnumValue(54, "10.4mm Remington 870 .410 Bore") + remington_model_58_sa = EnumValue(55, "Remington Model 58 SA") + _185mm_remington_878_sa_12_gauge = EnumValue(56, "18.5mm Remington 878 SA 12 Gauge") + _185mm_remington_model_1100_sa_12_gauge = EnumValue(57, "18.5mm Remington Model 1100 SA 12 Gauge") + _168mm_remington_model_1100_sa_16_gauge = EnumValue(58, "16.8mm Remington Model 1100 SA 16 Gauge") + _156mm_remington_model_1100_sa_20_gauge = EnumValue(59, "15.6mm Remington Model 1100 SA 20 Gauge") + _14mm_remington_model_1100_sa_28_gauge = EnumValue(60, "14mm Remington Model 1100 SA 28 Gauge") + _104mm_remington_model_1100_sa_410_bore = EnumValue(61, "10.4mm Remington Model 1100 SA .410 Bore") + _185mm_remington_11_87_sa_12_gauge = EnumValue(62, "18.5mm Remington 11-87 SA 12 Gauge") + _156mm_remington_11_87_sa_20_gauge = EnumValue(63, "15.6mm Remington 11-87 SA 20 Gauge") + _197mm_remington_model_sp_10_sa_10_gauge = EnumValue(64, "19.7mm Remington Model SP-10 SA 10 Gauge") + _185mm_remington_887_12_gauge = EnumValue(65, "18.5mm Remington 887 12 Gauge") + _185mm_remington_sparta_100_sxs_12_gauge = EnumValue(70, "18.5mm Remington Sparta 100 SxS 12 Gauge") + _156mm_remington_sparta_100_sxs_20_gauge = EnumValue(71, "15.6mm Remington Sparta 100 SxS 20 Gauge") + _104mm_remington_sparta_100_sxs_410_bore = EnumValue(72, "10.4mm Remington Sparta 100 SxS .410 Bore") + _185mm_remington_spartan_310_o_u_12_gauge = EnumValue(73, "18.5mm Remington Spartan 310 O/U 12 Gauge") + _156mm_remington_spartan_310_o_u_20_gauge = EnumValue(74, "15.6mm Remington Spartan 310 O/U 20 Gauge") + _14mm_remington_spartan_310_o_u_28_gauge = EnumValue(75, "14mm Remington Spartan 310 O/U 28 Gauge") + _104mm_remington_spartan_310_o_u_410_bore = EnumValue(76, "10.4mm Remington Spartan 310 O/U .410 Bore") + _185mm_remington_spartan_453_sa_12_gauge = EnumValue(77, "18.5mm Remington Spartan 453 SA 12 Gauge") + _185mm_winchester_model_1200_12_gauge = EnumValue(80, "18.5mm Winchester Model 1200 12 Gauge") + _168mm_winchester_model_1200_16_gauge = EnumValue(81, "16.8mm Winchester Model 1200 16 Gauge") + _156mm_winchester_model_1200_20_gauge = EnumValue(82, "15.6mm Winchester Model 1200 20 Gauge") + winchester_model_1887_1901 = EnumValue(83, "Winchester Model 1887/1901") + winchester_model_1897 = EnumValue(84, "Winchester Model 1897") + winchester_model_1912 = EnumValue(85, "Winchester Model 1912") + winchester_model_21_sxs = EnumValue(86, "Winchester Model 21 SxS") + winchester_model_37_sxs = EnumValue(87, "Winchester Model 37 SxS") + _185mm_hr_ultraslug_sxs_12_gauge = EnumValue(88, "18.5mm HR Ultraslug SxS 12 Gauge") + _156mm_hr_ultraslug_sxs_20_gauge = EnumValue(89, "15.6mm HR Ultraslug SxS 20 Gauge") + _185mm_ciener_ultimate_o_u_12_gauge = EnumValue(90, "18.5mm Ciener Ultimate O/U 12 Gauge") + _185mm_coach_gun_sxs_double_barrel_12_gauge = EnumValue(91, "18.5mm Coach Gun SxS Double Barrel 12 Gauge") + _185mm_ruger_gold_label_sxs_12_gauge = EnumValue(92, "18.5mm Ruger Gold Label SxS 12 Gauge") + _185mm_high_standard_model_10_sa_12_gauge = EnumValue(93, "18.5mm High Standard Model 10 SA 12 Gauge") + _185mm_kel_tex_ksg_12_gauge = EnumValue(94, "18.5mm Kel-Tex KSG 12 Gauge") + _185_kac_masterkey_12_gauge = EnumValue(95, "18.5 KAC Masterkey 12 Gauge") + _185mm_m26_mass_12_gauge = EnumValue(96, "18.5mm M26 M.A.S.S. 12 Gauge") + _185mm_srm_arms_m1216_sa_12_gauge = EnumValue(97, "18.5mm SRM Arms M1216 SA 12 Gauge") + _185mm_aa_12_fa_atchisson_assault = EnumValue(98, "18.5mm AA-12 FA Atchisson Assault") + _185mm_pancor_jackhammer_fa_12_gauge = EnumValue(99, "18.5mm Pancor Jackhammer FA 12 Gauge") + _185mm_usas_12_fa_12_gauge = EnumValue(110, "18.5mm USAS-12 FA 12 Gauge") + _185mm_maul_sa_12_gauge = EnumValue(111, "18.5mm MAUL SA 12 Gauge") + _185mm_fn_slp_sa_12_gauge = EnumValue(112, "18.5mm FN SLP SA 12 Gauge") + _185mm_fn_tps_12_gauge = EnumValue(113, "18.5mm FN TPS 12 Gauge") + _185mm_enarm_pentagun_sa_12_gauge = EnumValue(115, "18.5mm ENARM Pentagun SA 12 Gauge") + stevens_model_520_620 = EnumValue(116, "Stevens Model 520/620") + stoeger_coach_gun_sxs = EnumValue(117, "Stoeger Coach Gun SxS") + stoeger_condor_o_u = EnumValue(118, "Stoeger Condor O/U") + _185mm_armscor_model_30_sa_12_gauge = EnumValue(120, "18.5mm Armscor Model 30 SA 12 Gauge") + weatherby_sa_08_sa = EnumValue(121, "Weatherby SA-08 SA") + _185mm_fabarm_sdass_tactical_12_gauge = EnumValue(122, "18.5mm Fabarm SDASS Tactical 12 Gauge") + _185mm_mag_7_12_gauge = EnumValue(123, "18.5mm MAG-7 12 Gauge") + _185mm_neostead_12_gauge = EnumValue(124, "18.5mm Neostead 12 Gauge") + _185mm_armsel_striker_sa_12_gauge = EnumValue(125, "18.5mm Armsel Striker SA 12 Gauge") + _185mm_parker_hale_rogun_sa_12_gauge = EnumValue(127, "18.5mm Parker Hale Rogun SA 12 Gauge") + _26mm_rga_86_revolver = EnumValue(130, "26mm RGA-86 Revolver") + _185mm_sjorgren_sa_12_gauge = EnumValue(131, "18.5mm Sjorgren SA 12 Gauge") + _185mm_akdal_mka_1919_sa_12_gauge = EnumValue(132, "18.5mm Akdal MKA 1919 SA 12 Gauge") + _185mm_retay_masai_mara_sa_12_gauge = EnumValue(133, "18.5mm Retay Masai Mara SA 12 Gauge") + _185mm_safir_t_14_sa_12_gauge = EnumValue(134, "18.5mm Safir T-14 SA 12 Gauge") + _185mm_benelli_m1_super_90_sa_12_gauge = EnumValue(150, "18.5mm Benelli M1 Super 90 SA 12 Gauge") + _156mm_benelli_m1_super_90_sa_20_gauge = EnumValue(151, "15.6mm Benelli M1 Super 90 SA 20 Gauge") + _185mm_benelli_m3_super_90_sa_12_gauge = EnumValue(152, "18.5mm Benelli M3 Super 90 SA 12 Gauge") + _156mm_benelli_m3_super_90_sa_20_gauge = EnumValue(153, "15.6mm Benelli M3 Super 90 SA 20 Gauge") + _185mm_benelli_m4_super_90_sa_12_gauge = EnumValue(154, "18.5mm Benelli M4 Super 90 SA 12 Gauge") + _185mm_benelli_nova_12_gauge = EnumValue(155, "18.5mm Benelli Nova 12 Gauge") + _156mm_benelli_nove_20_gauge = EnumValue(156, "15.6mm Benelli Nove 20 Gauge") + _185mm_benelli_raffaello_sa_12_gauge = EnumValue(157, "18.5mm Benelli Raffaello SA 12 Gauge") + _185mm_benelli_supernova_12_gauge = EnumValue(158, "18.5mm Benelli Supernova 12 Gauge") + _185mm_benelli_vinci_sa_12_gauge = EnumValue(159, "18.5mm Benelli Vinci SA 12 Gauge") + _185mm_beretta_1201fp_sa_12_gauge = EnumValue(160, "18.5mm Beretta 1201FP SA 12 Gauge") + _185mm_beretta_682_o_u_12_gauge = EnumValue(161, "18.5mm Beretta 682 O/U 12 Gauge") + _156mm_beretta_682_o_u_20_gauge = EnumValue(162, "15.6mm Beretta 682 O/U 20 Gauge") + _14mm_beretta_682_o_u_28_gauge = EnumValue(163, "14mm Beretta 682 O/U 28 Gauge") + _104mm_beretta_682_o_u_410_bore = EnumValue(164, "10.4mm Beretta 682 O/U .410 Bore") + _185mm_beretta_a303_sa_12_gauge = EnumValue(165, "18.5mm Beretta A303 SA 12 Gauge") + _185mm_beretta_al391_sa_12_gauge = EnumValue(166, "18.5mm Beretta AL391 SA 12 Gauge") + _156mm_beretta_al391_sa_20_gauge = EnumValue(167, "15.6mm Beretta AL391 SA 20 Gauge") + _185mm_beretta_dt_10_o_u_12_gauge = EnumValue(168, "18.5mm Beretta DT-10 O/U 12 Gauge") + beretta_silver_pigeon_o_u = EnumValue(169, "Beretta Silver Pigeon O/U") + _185mm_beretta_xtrema_2_sa_12_gauge = EnumValue(170, "18.5mm Beretta Xtrema 2 SA 12 Gauge") + _156mm_franchi_al_48_sa_20_gauge = EnumValue(171, "15.6mm Franchi AL-48 SA 20 Gauge") + _14mm_franchi_al_48_sa_28_gauge = EnumValue(172, "14mm Franchi AL-48 SA 28 Gauge") + _104mm_franchi_mod_410_fa_410_bore = EnumValue(173, "10.4mm Franchi mod .410 FA .410 Bore") + _185mm_franchi_spas_12_sa_12_gauge = EnumValue(174, "18.5mm Franchi SPAS-12 SA 12 Gauge") + _185mm_franchi_spas_15_sa_12_gauge = EnumValue(175, "18.5mm Franchi SPAS-15 SA 12 Gauge") + _185mm_valtro_pm_5_pm_5_350_12_gauge = EnumValue(176, "18.5mm Valtro PM-5/PM-5-350 12 Gauge") + blazer_f3_o_u = EnumValue(180, "Blazer F3 O/U") + _185mm_hk_fabarm_fp6_12_gauge = EnumValue(181, "18.5mm HK FABARM FP6 12 Gauge") + _185mm_hk_caws_fa_12_gauge = EnumValue(182, "18.5mm HK CAWS FA 12 Gauge") + _185mm_baikal_mp_153_sa_12_gauge = EnumValue(200, "18.5mm Baikal MP-153 SA 12 Gauge") + _185mm_bandayevsky_rb_12_12_gauge = EnumValue(201, "18.5mm Bandayevsky RB-12 12 Gauge") + _185mm_molot_bekas_m_12_gauge = EnumValue(202, "18.5mm Molot Bekas-M 12 Gauge") + _168mm_molot_bekas_m_16_gauge = EnumValue(203, "16.8mm Molot Bekas-M 16 Gauge") + _185mm_toz_194_12_gauge = EnumValue(204, "18.5mm TOZ-194 12 Gauge") + _23mm_ks_23 = EnumValue(205, "23mm KS-23") + mts_255_revoler_12_gauge = EnumValue(206, "MTs-255 Revoler 12 Gauge") + _185mm_rmb_93_12_gauge = EnumValue(207, "18.5mm RMB-93 12 Gauge") + _185mm_saiga_12_sa_12_gauge = EnumValue(208, "18.5mm Saiga-12 SA 12 Gauge") + _156mm_saiga_12_sa_20_gauge = EnumValue(209, "15.6mm Saiga-12 SA 20 Gauge") + _104mm_saiga_12_sa_410_bore = EnumValue(210, "10.4mm Saiga-12 SA .410 Bore") + _185mm_vepr_12_sa_12_gauge = EnumValue(211, "18.5mm Vepr-12 SA 12 Gauge") + _185mm_fort_500_12_gauge = EnumValue(212, "18.5mm Fort 500 12 Gauge") + _185mm_norinco_hp9_1_12_gauge = EnumValue(220, "18.5mm Norinco HP9-1 12 Gauge") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_sniper.py b/dis/siso_ref_010/enums/life_form_human_specific_sniper.py new file mode 100644 index 0000000..b55ccff --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_sniper.py @@ -0,0 +1,183 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 481, + * marshal size 8; + * LifeFormHumanSpecificSniper has 48 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificSniper(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + _58mm_qbu_88_type_88 = EnumValue(1, "5.8mm QBU-88 (Type 88)") + _762mm_c3 = EnumValue(30, "7.62mm C3") + _762mm_fr_f2 = EnumValue(31, "7.62mm FR F2") + _762mm_awm_f_g22 = EnumValue(32, "7.62mm AWM-F (G22)") + _762mm_g3_sg_1 = EnumValue(33, "7.62mm G3 SG/1") + _762mm_galil_sniper = EnumValue(34, "7.62mm Galil Sniper") + _762mm_l96a1 = EnumValue(35, "7.62mm L96A1") + _762mm_m14_dmr = EnumValue(36, "7.62mm M14 DMR") + _762mm_m24_sniper_weapon_system_sws = EnumValue(37, "7.62mm M24 Sniper Weapon System (SWS)") + _762mm_m40a1_a3 = EnumValue(38, "7.62mm M40A1/A3") + _762mm_steyr_ssg_69 = EnumValue(39, "7.62mm Steyr SSG 69") + _762mm_svd_dragunov = EnumValue(40, "7.62mm SVD (Dragunov)") + _762mm_type_79 = EnumValue(41, "7.62mm TYPE 79") + _762mm_sr_25_mk11 = EnumValue(42, "7.62mm SR-25 MK11") + _762mm_aw_sr_98 = EnumValue(43, "7.62mm AW SR-98") + _762mm_blaser_r93 = EnumValue(44, "7.62mm Blaser R93") + _762mm_m2010_enhanced_sniper_rifle_esr = EnumValue(45, "7.62mm M2010 Enhanced Sniper Rifle (ESR)") + _762mm_m110_semi_automatic_sniper_system_sass = EnumValue(46, "7.62mm M110 Semi-Automatic Sniper System (SASS)") + _762mm_l129a1 = EnumValue(47, "7.62mm L129A1") + _762mm_sako_trg_22 = EnumValue(48, "7.62mm Sako TRG-22") + _762mm_colt_canada_c20_dmr = EnumValue(49, "7.62mm Colt Canada C20 DMR") + _762mm_bren_2_pps = EnumValue(50, "7.62mm BREN 2 PPS") + _762mm_zbroyar_vpr_308_sniper_version_of_z_008 = EnumValue(51, "7.62mm Zbroyar VPR-308 (Sniper version of Z-008)") + _762mm_zbroyar_uar_10 = EnumValue(52, "7.62mm Zbroyar UAR-10") + _762mm_fort_301 = EnumValue(53, "7.62mm Fort-301") + _762mm_awm_300_winchester = EnumValue(54, "7.62mm AWM .300 Winchester") + _762mm_cz_750 = EnumValue(55, "7.62mm CZ 750") + _77mm_type_99 = EnumValue(100, "7.7mm TYPE 99") + _858mm_blaser_r93_tactical_2 = EnumValue(105, "8.58mm Blaser R93 Tactical 2") + _86mm_sako_trg_42 = EnumValue(106, "8.6mm Sako TRG-42") + _86mm_awsm_338_lapua_magnum = EnumValue(107, "8.6mm AWSM .338 Lapua Magnum") + _9mm_vss_vintorez = EnumValue(110, "9mm VSS Vintorez") + _95mm_1036mm_cheytac_m200_375_cal_408_cal = EnumValue(120, "9.5mm/10.36mm CheyTac M200 (.375 cal/.408 cal)") + _127mm_steyr_hs_50 = EnumValue(170, "12.7mm Steyr HS .50") + _127mm_m82a1a_special_applications_scoped_rifle_sasr = EnumValue(171, "12.7mm M82A1A Special Applications Scoped Rifle (SASR)") + _127mm_nsv = EnumValue(172, "12.7mm NSV") + _127mm_osv_96 = EnumValue(173, "12.7mm OSV-96") + _127mm_rangemaster_50 = EnumValue(174, "12.7mm Rangemaster 50") + _127mm_v94 = EnumValue(175, "12.7mm V94") + _127mm_m107 = EnumValue(176, "12.7mm M107") + _127mm_zvi_falcon_op99 = EnumValue(177, "12.7mm ZVI Falcon OP99") + _127mm_snipex_rhino_hunter = EnumValue(178, "12.7mm Snipex Rhino Hunter") + _127mm_snipex_alligator = EnumValue(179, "12.7mm Snipex Alligator") + _127mm_desert_tech_hti_375_cal_408_cal_416_cal_50_cal = EnumValue(180, "12.7mm Desert Tech HTI (.375 cal/.408 cal/.416 cal/.50 cal)") + _127mm_aw50_50_cal_bmg = EnumValue(181, "12.7mm AW50 (.50 cal BMG)") + _145mm_snipex_t_rex = EnumValue(190, "14.5mm Snipex T-Rex") + _20mm_denel_ntw_20 = EnumValue(200, "20mm Denel NTW-20") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_sub_machine_gun.py b/dis/siso_ref_010/enums/life_form_human_specific_sub_machine_gun.py new file mode 100644 index 0000000..8ec46c6 --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_sub_machine_gun.py @@ -0,0 +1,152 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 482, + * marshal size 8; + * LifeFormHumanSpecificSubMachineGun has 17 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificSubMachineGun(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + _545mm_aks_74u_aksu_74 = EnumValue(10, "5.45mm AKS-74U (AKSU-74)") + _556mm_daewoo_k1a = EnumValue(20, "5.56mm Daewoo K1A") + _765mm_sa_vz_61_skorpion = EnumValue(40, "7.65mm Sa vz 61 Skorpion") + _9mm_daewoo_k7 = EnumValue(60, "9mm Daewoo K7") + _9mm_mac_10 = EnumValue(61, "9mm MAC-10") + _9mm_madsen_mk_ii = EnumValue(62, "9mm Madsen MK II") + _9mm_mini_uzi = EnumValue(63, "9mm Mini-Uzi") + _9mm_model_83_skorpion_smg = EnumValue(64, "9mm Model 83 Skorpion SMG") + _9mm_mp5a2 = EnumValue(65, "9mm MP5A2") + _9mm_mp5_n = EnumValue(66, "9mm MP5-N") + _9mm_sterling_smg = EnumValue(67, "9mm Sterling SMG") + _9mm_type_cf_05 = EnumValue(68, "9mm Type CF-05") + _9mm_uzi = EnumValue(69, "9mm Uzi") + _9mm_cz_scorpion_evo = EnumValue(70, "9mm CZ Scorpion Evo") + _9mm_mp7a2 = EnumValue(71, "9mm MP7A2") + _9mm_ump9 = EnumValue(72, "9mm UMP9") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_specific_weapon_nonspecific.py b/dis/siso_ref_010/enums/life_form_human_specific_weapon_nonspecific.py new file mode 100644 index 0000000..0a9924e --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_specific_weapon_nonspecific.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 514, + * marshal size 8; + * LifeFormHumanSpecificWeaponNonspecific has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSpecificWeaponNonspecific(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + knife = EnumValue(10, "Knife") + machete = EnumValue(50, "Machete") + explosive_vest = EnumValue(100, "Explosive Vest") + m18a1_claymore = EnumValue(150, "M18A1 Claymore") + mine_clearing_line_charge = EnumValue(160, "Mine Clearing Line Charge") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_human_subcategory_equipment_class.py b/dis/siso_ref_010/enums/life_form_human_subcategory_equipment_class.py new file mode 100644 index 0000000..0f7589b --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_human_subcategory_equipment_class.py @@ -0,0 +1,192 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 473, + * marshal size 8; + * LifeFormHumanSubcategoryEquipmentClass has 30 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormHumanSubcategoryEquipmentClass(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + none = EnumValue(0, "None") + # XREF UID 514 - CLASS LifeFormHumanSpecificWeaponNonspecific + weapon_non_specific = EnumValue(1, "Weapon, Non-specific") + # XREF UID 474 - CLASS LifeFormHumanSpecificAssaultRifles + assault_rifles = EnumValue(5, "Assault Rifles") + # XREF UID 475 - CLASS LifeFormHumanSpecificHighPowerRifles + high_power_rifles = EnumValue(10, "High Power Rifles") + # XREF UID 481 - CLASS LifeFormHumanSpecificSniper + sniper_rifles = EnumValue(15, "Sniper Rifles") + # XREF UID 510 - CLASS LifeFormHumanSpecificAntiMaterielRifles + anti_materiel_rifle_amr = EnumValue(17, "Anti-Materiel Rifle (AMR)") + # XREF UID 482 - CLASS LifeFormHumanSpecificSubMachineGun + sub_machine_guns = EnumValue(20, "Sub Machine Guns") + # XREF UID 511 - CLASS LifeFormHumanSpecificShotGuns + shot_guns = EnumValue(25, "Shot Guns") + # XREF UID 515 - CLASS LifeFormHumanSpecificGrenadeLaunchers + grenade_launchers = EnumValue(30, "Grenade Launchers") + # XREF UID 516 - CLASS LifeFormHumanSpecificMachineGuns + machine_guns = EnumValue(35, "Machine Guns") + # XREF UID 517 - CLASS LifeFormHumanSpecificGrenadeLaunchingMachineGun + grenade_launching_machine_gun = EnumValue(40, "Grenade Launching Machine Gun") + # XREF UID 518 - CLASS LifeFormHumanSpecificAntiTankRockets + anti_tank_rockets = EnumValue(45, "Anti-Tank Rockets") + # XREF UID 519 - CLASS LifeFormHumanSpecificAntiTankMissiles + anti_tank_missiles = EnumValue(50, "Anti-Tank Missiles") + anti_tank_guns = EnumValue(55, "Anti-Tank Guns") + # XREF UID 522 - CLASS LifeFormHumanSpecificFlameRockets + flame_rockets = EnumValue(60, "Flame Rockets") + # XREF UID 523 - CLASS LifeFormHumanSpecificFlameThrowers + flame_throwers = EnumValue(65, "Flame Throwers") + # XREF UID 528 - CLASS LifeFormHumanSpecificRocketLaunchers + rocket_launchers = EnumValue(70, "Rocket Launchers") + # XREF UID 512 - CLASS LifeFormHumanSpecificMortars + mortars = EnumValue(75, "Mortars") + # XREF UID 513 - CLASS LifeFormHumanSpecificHandGuns + hand_guns = EnumValue(80, "Hand Guns") + # XREF UID 520 - CLASS LifeFormHumanSpecificManPortableAirDefenseSystem + man_portable_air_defense_system_manpads = EnumValue(85, "Man-Portable Air Defense System (MANPADS)") + # XREF UID 521 - CLASS LifeFormHumanSpecificRecoillessRifles + recoilless_rifles = EnumValue(90, "Recoilless Rifles") + # XREF UID 524 - CLASS LifeFormHumanSpecificDroneGuns + drone_guns = EnumValue(95, "Drone Guns") + # XREF UID 529 - CLASS LifeFormHumanSpecificEquipmentNonspecific + equipment_non_specific = EnumValue(150, "Equipment, Non-specific") + sensors = EnumValue(151, "Sensors") + # XREF UID 505 - CLASS LifeFormHumanSpecificEquipmentClass + signal_sensor = EnumValue(152, "Signal Sensor") + # XREF UID 527 - CLASS LifeFormHumanSpecificLasersClass + lasers = EnumValue(153, "Lasers") + # XREF UID 531 - CLASS LifeFormHumanSpecificAnimalCompanions + animal_companion = EnumValue(160, "Animal Companion") + # XREF UID 526 - CLASS LifeFormHumanSpecificPersonalElectronicsClass + personal_electronics = EnumValue(171, "Personal Electronics") + # XREF UID 525 - CLASS LifeFormHumanSpecificLogisticsEQClass + logistics_equipment = EnumValue(172, "Logistics Equipment") + # XREF UID 530 - CLASS LifeFormHumanSpecificMedicalEquipment + medical_equipment = EnumValue(173, "Medical Equipment") + default = none + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_land_categories.py b/dis/siso_ref_010/enums/life_form_land_categories.py new file mode 100644 index 0000000..2495f7c --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_land_categories.py @@ -0,0 +1,169 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 472, + * marshal size 8; + * LifeFormLandCategories has 27 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormLandCategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + conventional_armed_forces = EnumValue(10, "Conventional Armed Forces") + army = EnumValue(11, "Army") + naval_infantry_marines = EnumValue(12, "Naval Infantry (Marines)") + air_force = EnumValue(13, "Air Force") + navy = EnumValue(14, "Navy") + coast_guard = EnumValue(15, "Coast Guard") + united_nations = EnumValue(16, "United Nations") + special_operations_forces_sof = EnumValue(30, "Special Operations Forces (SOF)") + law_enforcement = EnumValue(50, "Law Enforcement") + non_military_national_government_agencies = EnumValue(70, "Non-Military National Government Agencies") + regional_local_forces = EnumValue(90, "Regional / Local Forces") + irregular_forces = EnumValue(100, "Irregular Forces") + terrorist_combatant = EnumValue(101, "Terrorist Combatant") + insurgent = EnumValue(102, "Insurgent") + paramilitary_forces = EnumValue(110, "Paramilitary Forces") + humanitarian_organizations = EnumValue(120, "Humanitarian Organizations") + civilian = EnumValue(130, "Civilian") + emergency_medical_technician_emt = EnumValue(131, "Emergency Medical Technician (EMT)") + firefighter = EnumValue(132, "Firefighter") + press = EnumValue(133, "Press") + # XREF UID 100 - CLASS SubcategoriesforLandCategory200Mammal + mammal = EnumValue(200, "Mammal") + # XREF UID 101 - CLASS SubcategoriesforLandCategory201Reptile + reptile = EnumValue(201, "Reptile") + # XREF UID 102 - CLASS SubcategoriesforLandCategory202Amphibian + amphibian = EnumValue(202, "Amphibian") + # XREF UID 103 - CLASS SubcategoriesforLandCategory203Insect + insect = EnumValue(203, "Insect") + # XREF UID 104 - CLASS SubcategoriesforLandCategory204Arachnid + arachnid = EnumValue(204, "Arachnid") + # XREF UID 105 - CLASS SubcategoriesforLandCategory205Mollusk + mollusk = EnumValue(205, "Mollusk") + # XREF UID 106 - CLASS SubcategoriesforLandCategory206Marsupial + marsupial = EnumValue(206, "Marsupial") + default = conventional_armed_forces + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_form_subsurface_categories.py b/dis/siso_ref_010/enums/life_form_subsurface_categories.py new file mode 100644 index 0000000..fdf95bd --- /dev/null +++ b/dis/siso_ref_010/enums/life_form_subsurface_categories.py @@ -0,0 +1,145 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 479, + * marshal size 8; + * LifeFormSubsurfaceCategories has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormSubsurfaceCategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + # XREF UID 120 - CLASS SubcategoriesforSubsurfaceCategory200Fish + fish = EnumValue(200, "Fish") + # XREF UID 121 - CLASS SubcategoriesforSubsurfaceCategory201Mammal + mammal = EnumValue(201, "Mammal") + # XREF UID 122 - CLASS SubcategoriesforSubsurfaceCategory202Mollusk + mollusk = EnumValue(202, "Mollusk") + # XREF UID 123 - CLASS SubcategoriesforSubsurfaceCategory203Crustacean + crustacean = EnumValue(203, "Crustacean") + # XREF UID 124 - CLASS SubcategoriesforSubsurfaceCategory204Insect + insect = EnumValue(204, "Insect") + default = fish + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_forms_appearance.py b/dis/siso_ref_010/enums/life_forms_appearance.py new file mode 100644 index 0000000..14c23bb --- /dev/null +++ b/dis/siso_ref_010/enums/life_forms_appearance.py @@ -0,0 +1,279 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_paint_scheme import AppearancePaintScheme +from .appearance_lifeform_health import AppearanceLifeformHealth +from .appearance_life_form_compliance_status import AppearanceLifeFormComplianceStatus +from .clothing_irsignature import ClothingIRSignature +from .appearance_life_form_posture import AppearanceLifeFormPosture +from .appearance_entityor_object_state import AppearanceEntityorObjectState +from .appearance_life_form_weapon_implement import AppearanceLifeFormWeaponImplement +from .appearance_life_form_weapon_implement import AppearanceLifeFormWeaponImplement +from .appearance_camouflage_type import AppearanceCamouflageType +from .appearance_concealed_position import AppearanceConcealedPosition +from .appearance_concealed_movement import AppearanceConcealedMovement + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 37, marshal size 32, + * LifeFormsAppearance + */ + +""" + +class LifeFormsAppearanceBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes the visual paint design, use {@link AppearancePaintScheme} values for this field + ("_paintScheme", UByte, 1), + + # (bit position 3, length=2) Describes the visual appearance of the severity of any injury, use {@link AppearanceLifeformHealth} values for this field + ("_health", UByte, 2), + + # (bit position 5, length=4) Describes the manner and degree to which the life form is complying, use {@link AppearanceLifeFormComplianceStatus} values for this field + ("_complianceStatus", UByte, 4), + + # (bit position 9, length=2) Describes the general nature of the IR Signature due to clothing or covering., use {@link ClothingIRSignature} values for this field + ("_clothingIRSignature", UByte, 2), + + # (bit position 11, boolean) Describes whether signal smoke is being used or not, use {@link UInt8} values for this field + ("_signalSmokeinUse", UByte, 1), + + # (bit position 12, boolean) Describes whether flash lights are on or off, use {@link UInt8} values for this field + ("_flashLightsOn", UByte, 1), + + # (bit position 13, boolean) Describes whether a signal mirror is being used or not, use {@link UInt8} values for this field + ("_signalMirrorinUse", UByte, 1), + + # (bit position 14, boolean) Describes whether an IR strobe is on or off, use {@link UInt8} values for this field + ("_iRStrobeOn", UByte, 1), + + # (bit position 15, boolean) Describes whether an IR illuminator (flare) is on or off, use {@link UInt8} values for this field + ("_iRIlluminatorOn", UByte, 1), + + # (bit position 16, length=4) Describes the posture (position) of the life form, use {@link AppearanceLifeFormPosture} values for this field + ("_lifeFormPosture", UByte, 4), + + # (bit position 20, boolean) Describes whether the life form has a lit cigarette or not. The primary purpose is for IR signature generation, so it could be a cigar or other item., use {@link UInt8} values for this field + ("_isSmokingCigarette", UByte, 1), + + # (bit position 21, boolean) Describes whether the entity is frozen and should not be dead reckoned, use {@link UInt8} values for this field + ("_isFrozen", UByte, 1), + + # (bit position 22, boolean) Describes whether or not the life form is mounted/hoisted on another platform, such as a troop transport or helicopter hoist, use {@link UInt8} values for this field + ("_mountedHoistedStatus", UByte, 1), + + # (bit position 23, boolean) Describes whether the entity is active or deactivated, use {@link AppearanceEntityorObjectState} values for this field + ("_state", UByte, 1), + + # (bit position 24, length=2) Describes the position of the life form's primary weapon/implement, use {@link AppearanceLifeFormWeaponImplement} values for this field + ("_weaponImplement1", UByte, 2), + + # (bit position 26, length=2) Describes the position of the life form's secondary weapon/implement, use {@link AppearanceLifeFormWeaponImplement} values for this field + ("_weaponImplement2", UByte, 2), + + # (bit position 28, length=2) Describes the camouflage color, use {@link AppearanceCamouflageType} values for this field + ("_camouflageType", UByte, 2), + + # (bit position 30, boolean) Describes whether or not the life form is in a prepared concealed position, use {@link AppearanceConcealedPosition} values for this field + ("_concealedStationary", UByte, 1), + + # (bit position 31, boolean) Describes whether or not the life form uses concealment during movement, use {@link AppearanceConcealedMovement} values for this field + ("_concealedMovement", UByte, 1) + ] + +class LifeFormsAppearance(ctypes.Union): + _fields_ = [ + ("capabilities", LifeFormsAppearanceBitField), + ("asbyte", UInt8) + ] + + def set_paintScheme(self, value : AppearancePaintScheme): + self.capabilities._paintScheme = int(value) + def get_paintScheme(self) -> AppearancePaintScheme: + return AppearancePaintScheme.get_enum(self._paintScheme) + PaintScheme = property(get_paintScheme, set_paintScheme) + + def set_health(self, value : AppearanceLifeformHealth): + self.capabilities._health = int(value) + def get_health(self) -> AppearanceLifeformHealth: + return AppearanceLifeformHealth.get_enum(self._health) + Health = property(get_health, set_health) + + def set_complianceStatus(self, value : AppearanceLifeFormComplianceStatus): + self.capabilities._complianceStatus = int(value) + def get_complianceStatus(self) -> AppearanceLifeFormComplianceStatus: + return AppearanceLifeFormComplianceStatus.get_enum(self._complianceStatus) + ComplianceStatus = property(get_complianceStatus, set_complianceStatus) + + def set_clothingIRSignature(self, value : ClothingIRSignature): + self.capabilities._clothingIRSignature = int(value) + def get_clothingIRSignature(self) -> ClothingIRSignature: + return ClothingIRSignature.get_enum(self._clothingIRSignature) + ClothingIRSignature = property(get_clothingIRSignature, set_clothingIRSignature) + + def set_signalSmokeinUse(self, value : UInt8): + self.capabilities._signalSmokeinUse = int(value) + def get_signalSmokeinUse(self) -> UInt8: + return self.capabilities._signalSmokeinUse + SignalSmokeinUse = property(get_signalSmokeinUse, set_signalSmokeinUse) + + def set_flashLightsOn(self, value : UInt8): + self.capabilities._flashLightsOn = int(value) + def get_flashLightsOn(self) -> UInt8: + return self.capabilities._flashLightsOn + FlashLightsOn = property(get_flashLightsOn, set_flashLightsOn) + + def set_signalMirrorinUse(self, value : UInt8): + self.capabilities._signalMirrorinUse = int(value) + def get_signalMirrorinUse(self) -> UInt8: + return self.capabilities._signalMirrorinUse + SignalMirrorinUse = property(get_signalMirrorinUse, set_signalMirrorinUse) + + def set_iRStrobeOn(self, value : UInt8): + self.capabilities._iRStrobeOn = int(value) + def get_iRStrobeOn(self) -> UInt8: + return self.capabilities._iRStrobeOn + IRStrobeOn = property(get_iRStrobeOn, set_iRStrobeOn) + + def set_iRIlluminatorOn(self, value : UInt8): + self.capabilities._iRIlluminatorOn = int(value) + def get_iRIlluminatorOn(self) -> UInt8: + return self.capabilities._iRIlluminatorOn + IRIlluminatorOn = property(get_iRIlluminatorOn, set_iRIlluminatorOn) + + def set_lifeFormPosture(self, value : AppearanceLifeFormPosture): + self.capabilities._lifeFormPosture = int(value) + def get_lifeFormPosture(self) -> AppearanceLifeFormPosture: + return AppearanceLifeFormPosture.get_enum(self._lifeFormPosture) + LifeFormPosture = property(get_lifeFormPosture, set_lifeFormPosture) + + def set_isSmokingCigarette(self, value : UInt8): + self.capabilities._isSmokingCigarette = int(value) + def get_isSmokingCigarette(self) -> UInt8: + return self.capabilities._isSmokingCigarette + IsSmokingCigarette = property(get_isSmokingCigarette, set_isSmokingCigarette) + + def set_isFrozen(self, value : UInt8): + self.capabilities._isFrozen = int(value) + def get_isFrozen(self) -> UInt8: + return self.capabilities._isFrozen + IsFrozen = property(get_isFrozen, set_isFrozen) + + def set_mountedHoistedStatus(self, value : UInt8): + self.capabilities._mountedHoistedStatus = int(value) + def get_mountedHoistedStatus(self) -> UInt8: + return self.capabilities._mountedHoistedStatus + MountedHoistedStatus = property(get_mountedHoistedStatus, set_mountedHoistedStatus) + + def set_state(self, value : AppearanceEntityorObjectState): + self.capabilities._state = int(value) + def get_state(self) -> AppearanceEntityorObjectState: + return AppearanceEntityorObjectState.get_enum(self._state) + State = property(get_state, set_state) + + def set_weaponImplement1(self, value : AppearanceLifeFormWeaponImplement): + self.capabilities._weaponImplement1 = int(value) + def get_weaponImplement1(self) -> AppearanceLifeFormWeaponImplement: + return AppearanceLifeFormWeaponImplement.get_enum(self._weaponImplement1) + WeaponImplement1 = property(get_weaponImplement1, set_weaponImplement1) + + def set_weaponImplement2(self, value : AppearanceLifeFormWeaponImplement): + self.capabilities._weaponImplement2 = int(value) + def get_weaponImplement2(self) -> AppearanceLifeFormWeaponImplement: + return AppearanceLifeFormWeaponImplement.get_enum(self._weaponImplement2) + WeaponImplement2 = property(get_weaponImplement2, set_weaponImplement2) + + def set_camouflageType(self, value : AppearanceCamouflageType): + self.capabilities._camouflageType = int(value) + def get_camouflageType(self) -> AppearanceCamouflageType: + return AppearanceCamouflageType.get_enum(self._camouflageType) + CamouflageType = property(get_camouflageType, set_camouflageType) + + def set_concealedStationary(self, value : AppearanceConcealedPosition): + self.capabilities._concealedStationary = int(value) + def get_concealedStationary(self) -> AppearanceConcealedPosition: + return AppearanceConcealedPosition.get_enum(self._concealedStationary) + ConcealedStationary = property(get_concealedStationary, set_concealedStationary) + + def set_concealedMovement(self, value : AppearanceConcealedMovement): + self.capabilities._concealedMovement = int(value) + def get_concealedMovement(self) -> AppearanceConcealedMovement: + return AppearanceConcealedMovement.get_enum(self._concealedMovement) + ConcealedMovement = property(get_concealedMovement, set_concealedMovement) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "PaintScheme : " + self.PaintScheme.get_description + "\n" + outputStream += "Health : " + self.Health.get_description + "\n" + outputStream += "ComplianceStatus : " + self.ComplianceStatus.get_description + "\n" + outputStream += "ClothingIRSignature : " + self.ClothingIRSignature.get_description + "\n" + outputStream += "SignalSmokeinUse : " + str(self.SignalSmokeinUse) + "\n" + outputStream += "FlashLightsOn : " + str(self.FlashLightsOn) + "\n" + outputStream += "SignalMirrorinUse : " + str(self.SignalMirrorinUse) + "\n" + outputStream += "IRStrobeOn : " + str(self.IRStrobeOn) + "\n" + outputStream += "IRIlluminatorOn : " + str(self.IRIlluminatorOn) + "\n" + outputStream += "LifeFormPosture : " + self.LifeFormPosture.get_description + "\n" + outputStream += "IsSmokingCigarette : " + str(self.IsSmokingCigarette) + "\n" + outputStream += "IsFrozen : " + str(self.IsFrozen) + "\n" + outputStream += "MountedHoistedStatus : " + str(self.MountedHoistedStatus) + "\n" + outputStream += "State : " + self.State.get_description + "\n" + outputStream += "WeaponImplement1 : " + self.WeaponImplement1.get_description + "\n" + outputStream += "WeaponImplement2 : " + self.WeaponImplement2.get_description + "\n" + outputStream += "CamouflageType : " + self.CamouflageType.get_description + "\n" + outputStream += "ConcealedStationary : " + self.ConcealedStationary.get_description + "\n" + outputStream += "ConcealedMovement : " + self.ConcealedMovement.get_description + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/life_forms_capabilities.py b/dis/siso_ref_010/enums/life_forms_capabilities.py new file mode 100644 index 0000000..1655ff6 --- /dev/null +++ b/dis/siso_ref_010/enums/life_forms_capabilities.py @@ -0,0 +1,128 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 456, marshal size 32, + * LifeFormsCapabilities + */ + +""" + +class LifeFormsCapabilitiesBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes whether the entity is able to supply some type of ammunition in response to an appropriate service request, use {@link UInt8} values for this field + ("_ammunitionSupply", UByte, 1), + + # (bit position 1, boolean) Describes whether the entity is able to supply some type of fuel in response to an appropriate service request, use {@link UInt8} values for this field + ("_fuelSupply", UByte, 1), + + # (bit position 2, boolean) Describes whether the entity is able to provide recovery (e.g., towing) services in response to an appropriate service request, use {@link UInt8} values for this field + ("_recovery", UByte, 1), + + # (bit position 3, boolean) Describes whether the entity is able to supply certain repair services in response to an appropriate service request, use {@link UInt8} values for this field + ("_repair", UByte, 1), + + # (bit position 4, boolean) This entry is reserved for backward compatibility and may not be reused, use {@link UInt8} values for this field + ("_reserved", UByte, 1) + ] + +class LifeFormsCapabilities(ctypes.Union): + _fields_ = [ + ("capabilities", LifeFormsCapabilitiesBitField), + ("asbyte", UInt8) + ] + + def set_ammunitionSupply(self, value : UInt8): + self.capabilities._ammunitionSupply = int(value) + def get_ammunitionSupply(self) -> UInt8: + return self.capabilities._ammunitionSupply + AmmunitionSupply = property(get_ammunitionSupply, set_ammunitionSupply) + + def set_fuelSupply(self, value : UInt8): + self.capabilities._fuelSupply = int(value) + def get_fuelSupply(self) -> UInt8: + return self.capabilities._fuelSupply + FuelSupply = property(get_fuelSupply, set_fuelSupply) + + def set_recovery(self, value : UInt8): + self.capabilities._recovery = int(value) + def get_recovery(self) -> UInt8: + return self.capabilities._recovery + Recovery = property(get_recovery, set_recovery) + + def set_repair(self, value : UInt8): + self.capabilities._repair = int(value) + def get_repair(self) -> UInt8: + return self.capabilities._repair + Repair = property(get_repair, set_repair) + + def set_reserved(self, value : UInt8): + self.capabilities._reserved = int(value) + def get_reserved(self) -> UInt8: + return self.capabilities._reserved + Reserved = property(get_reserved, set_reserved) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "AmmunitionSupply : " + str(self.AmmunitionSupply) + "\n" + outputStream += "FuelSupply : " + str(self.FuelSupply) + "\n" + outputStream += "Recovery : " + str(self.Recovery) + "\n" + outputStream += "Repair : " + str(self.Repair) + "\n" + outputStream += "Reserved : " + str(self.Reserved) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/life_forms_subcategory_cisweapons.py b/dis/siso_ref_010/enums/life_forms_subcategory_cisweapons.py new file mode 100644 index 0000000..7b91c3d --- /dev/null +++ b/dis/siso_ref_010/enums/life_forms_subcategory_cisweapons.py @@ -0,0 +1,187 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 17, + * marshal size 8; + * LifeFormsSubcategoryCISWeapons has 52 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormsSubcategoryCISWeapons(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + automatic_aps_9_mm_stechkin = EnumValue(201, "Automatic (APS) 9-mm, Stechkin") + psm_545_mm = EnumValue(202, "PSM 5.45-mm") + self_loading_pm_9_mm_makarov = EnumValue(203, "Self-loading (PM) 9-mm, Makarov") + tt_33_762_mm_tokarev = EnumValue(204, "TT-33 7.62-mm, Tokarev") + assault_rifle_ak_and_akm_762_mm = EnumValue(205, "Assault rifle AK and AKM, 7.62-mm") + assault_rifle_ak_74_and_aks_74_545_mm = EnumValue(206, "Assault rifle AK-74 and AKS-74, 5.45-mm") + self_loading_rifle_sks_762_mm_simonov = EnumValue(207, "Self-loading rifle (SKS), 7.62-mm, Simonov") + sniper_rifle_svd_762_mm_dragunov = EnumValue(208, "Sniper rifle SVD 7.62-mm, Dragunov") + aksu_74_545_mm = EnumValue(209, "AKSU-74 5.45-mm") + pps_43_762_mm = EnumValue(210, "PPS-43 7.62-mm") + ppsh_41_762_mm = EnumValue(211, "PPSh-41 7.62-mm") + general_purpose_pk_762_mm = EnumValue(212, "General purpose PK 7.62-mm") + heavy_dshk_38_and_model_38_46_127_mm_degtyarev = EnumValue(213, "Heavy DShK-38 and Model 38/46 12.7-mm, Degtyarev") + heavy_nsv_127_mm = EnumValue(214, "Heavy NSV 12.7-mm") + light_rpd_762_mm = EnumValue(215, "Light RPD 7.62-mm") + light_rpk_762_mm = EnumValue(216, "Light RPK 7.62-mm") + light_rpk_74_545_mm = EnumValue(217, "Light RPK-74 5.45-mm") + hand_grenade_m75 = EnumValue(218, "Hand grenade M75") + hand_grenade_rgd_5 = EnumValue(219, "Hand grenade RGD-5") + ap_hand_grenade_f1 = EnumValue(220, "AP hand grenade F1") + at_hand_grenade_rkg_3 = EnumValue(221, "AT hand grenade RKG-3") + at_hand_grenade_rkg_3m = EnumValue(222, "AT hand grenade RKG-3M") + at_hand_grenade_rkg_3t = EnumValue(223, "AT hand grenade RKG-3T") + fragmentation_hand_grenade_rgn = EnumValue(224, "Fragmentation hand grenade RGN") + fragmentation_hand_grenade_rgo = EnumValue(225, "Fragmentation hand grenade RGO") + smoke_hand_grenade_rdg_1 = EnumValue(226, "Smoke hand grenade RDG-1") + plamya_launcher_30_mm_ags_17 = EnumValue(227, "Plamya launcher, 30-mm AGS-17") + rifle_mounted_launcher_bg_15_40_mm = EnumValue(228, "Rifle-mounted launcher, BG-15 40-mm") + lpo_50 = EnumValue(229, "LPO-50") + roks_3 = EnumValue(230, "ROKS-3") + cart_mounted_tpo_50 = EnumValue(231, "Cart-mounted TPO-50") + gimlet_sa_16 = EnumValue(232, "Gimlet SA-16") + grail_sa_7 = EnumValue(233, "Grail SA-7") + gremlin_sa_14 = EnumValue(234, "Gremlin SA-14") + sagger_at_3_mclos = EnumValue(235, "Sagger AT-3 (MCLOS)") + saxhorn_at_7 = EnumValue(236, "Saxhorn AT-7") + spigot_a_b_at_14 = EnumValue(237, "Spigot A/B AT-14") + sa_18 = EnumValue(238, "SA-18") + sa_19 = EnumValue(239, "SA-19") + grad_1p_manportable_tripod_rocket_launcher_122_mm_for_spesnatz_and_other_specialists_aka_9p132 = EnumValue(240, "Grad-1P manportable tripod rocket launcher, 122-mm (for Spesnatz and other specialists; aka 9P132)") + light_anti_armor_weapon_rpg_18 = EnumValue(241, "Light Anti-Armor weapon RPG-18") + light_anti_tank_weapon_rpg_22 = EnumValue(242, "Light Anti-Tank weapon RPG-22") + mg_amp_rpg = EnumValue(243, "MG & RPG") + portable_rocket_launcher_rpg_16 = EnumValue(244, "Portable rocket launcher RPG-16") + recoilless_gun_73_mm_spg_9 = EnumValue(245, "Recoilless gun 73-mm SPG-9") + vat_rocket_launcher_rpg_7 = EnumValue(246, "VAT rocket launcher RPG-7") + mon_50_anti_personnel_mine = EnumValue(248, "Mon-50 Anti-Personnel mine") + rpg_29_vampir = EnumValue(249, "RPG-29 Vampir") + laser_designator = EnumValue(250, "Laser Designator") + at_4_spigot = EnumValue(251, "AT-4 Spigot") + sa_24_igla_s = EnumValue(252, "SA-24 Igla-S") + type_69_rpg = EnumValue(253, "Type 69 RPG") + default = automatic_aps_9_mm_stechkin + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_forms_subcategory_french_weapons.py b/dis/siso_ref_010/enums/life_forms_subcategory_french_weapons.py new file mode 100644 index 0000000..39f8601 --- /dev/null +++ b/dis/siso_ref_010/enums/life_forms_subcategory_french_weapons.py @@ -0,0 +1,143 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 19, + * marshal size 8; + * LifeFormsSubcategoryFrenchWeapons has 8 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormsSubcategoryFrenchWeapons(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + acl_strim = EnumValue(1, "ACL-STRIM") + mistral_missile = EnumValue(2, "Mistral missile") + milan_at_missile = EnumValue(3, "Milan AT missile") + lrac_f1_89_mm_at_rocket_launcher = EnumValue(4, "LRAC F1 89-mm AT rocket launcher") + fa_mas_rifle = EnumValue(5, "FA-MAS rifle") + aa_52_machine_gun = EnumValue(6, "AA-52 machine gun") + _58_mm_rifle_grenade = EnumValue(7, "58-mm rifle grenade") + fr_f1_sniper_rifle = EnumValue(8, "FR-F1 sniper rifle") + default = acl_strim + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_forms_subcategory_german_weapons.py b/dis/siso_ref_010/enums/life_forms_subcategory_german_weapons.py new file mode 100644 index 0000000..b84b434 --- /dev/null +++ b/dis/siso_ref_010/enums/life_forms_subcategory_german_weapons.py @@ -0,0 +1,144 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 20, + * marshal size 8; + * LifeFormsSubcategoryGermanWeapons has 9 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormsSubcategoryGermanWeapons(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + g3_rifle = EnumValue(1, "G3 rifle") + g11_rifle = EnumValue(2, "G11 rifle") + p1_pistol = EnumValue(3, "P1 pistol") + mg3_machine_gun = EnumValue(4, "MG3 machine gun") + milan_missile = EnumValue(5, "Milan missile") + mp1_uzi_submachine_gun = EnumValue(6, "MP1 Uzi submachine gun") + panzerfaust_3_light_anti_tank_weapon = EnumValue(7, "Panzerfaust 3 Light Anti-Tank Weapon") + dm19_hand_grenade = EnumValue(8, "DM19 hand grenade") + dm29_hand_grenade = EnumValue(9, "DM29 hand grenade") + default = g3_rifle + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_forms_subcategory_iranian_weapons.py b/dis/siso_ref_010/enums/life_forms_subcategory_iranian_weapons.py new file mode 100644 index 0000000..924dcea --- /dev/null +++ b/dis/siso_ref_010/enums/life_forms_subcategory_iranian_weapons.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 471, + * marshal size 8; + * LifeFormsSubcategoryIranianWeapons has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormsSubcategoryIranianWeapons(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + misagh_2 = EnumValue(1, "Misagh-2") + rbs_70 = EnumValue(2, "RBS-70") + default = misagh_2 + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_forms_subcategory_ukweapons.py b/dis/siso_ref_010/enums/life_forms_subcategory_ukweapons.py new file mode 100644 index 0000000..262bb03 --- /dev/null +++ b/dis/siso_ref_010/enums/life_forms_subcategory_ukweapons.py @@ -0,0 +1,147 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 18, + * marshal size 8; + * LifeFormsSubcategoryUKWeapons has 12 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormsSubcategoryUKWeapons(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + law_80 = EnumValue(1, "LAW 80") + blowpipe = EnumValue(2, "Blowpipe") + javelin = EnumValue(3, "Javelin") + _51_mm_mortar = EnumValue(4, "51-mm mortar") + slr_762_mm_rifle = EnumValue(5, "SLR 7.62-mm rifle") + sterling_9_mm_submachine_gun = EnumValue(6, "Sterling 9-mm submachine gun") + l7a2_general_purpose_mg = EnumValue(7, "L7A2 general purpose MG") + l6_wombat_recoilless_rifle_ = EnumValue(8, "L6 Wombat Recoilless rifle,") + carl_gustav_89_mm_recoilless_rifle = EnumValue(9, "Carl Gustav 89-mm recoilless rifle") + sa80_individual_light_support_weapon = EnumValue(10, "SA80 Individual/light support weapon") + trigat = EnumValue(11, "Trigat") + milan_at_missile = EnumValue(12, "Milan AT missile") + default = law_80 + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_forms_subcategory_usweapons.py b/dis/siso_ref_010/enums/life_forms_subcategory_usweapons.py new file mode 100644 index 0000000..cb2655d --- /dev/null +++ b/dis/siso_ref_010/enums/life_forms_subcategory_usweapons.py @@ -0,0 +1,257 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 16, + * marshal size 8; + * LifeFormsSubcategoryUSWeapons has 122 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class LifeFormsSubcategoryUSWeapons(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + assault_machine_pistol_kf_amp = EnumValue(1, "Assault machine pistol, KF-AMP") + automatic_model_1911a1_45 = EnumValue(2, "Automatic model 1911A1 .45") + combat_master_mark_vi_45_detronics = EnumValue(3, "Combat Master Mark VI .45, Detronics") + de_cocker_kp90dc_45 = EnumValue(4, "De-cocker KP90DC .45") + de_cocker_kp91dc_40 = EnumValue(5, "De-cocker KP91DC .40") + general_officers_model_15_45 = EnumValue(6, "General officer's Model 15 .45") + nova_9_mm_lafrance = EnumValue(7, "Nova 9-mm, LaFrance") + personal_defense_weapon_mp5k_pdw_9_mm = EnumValue(8, "Personal Defense Weapon MP5K-PDW 9-mm") + silenced_colt_45_lafrance = EnumValue(9, "Silenced Colt .45, LaFrance") + _5900_series_9_mm_smith_amp_wesson_samp_w = EnumValue(10, "5900-series 9-mm, Smith & Wesson (S&W)") + m9 = EnumValue(11, "M9") + model_1911a1_springfield_armory = EnumValue(12, "Model 1911A1, Springfield Armory") + model_2000_9_mm = EnumValue(13, "Model 2000 9-mm") + p_9_9_mm_springfield_armory = EnumValue(14, "P-9 9-mm, Springfield Armory") + p_12_9_mm = EnumValue(15, "P-12 9-mm") + p_85_mark_ii_9_mm_ruger = EnumValue(16, "P-85 Mark II 9-mm, Ruger") + advanced_combat_rifle_556_mm_aai = EnumValue(17, "Advanced Combat Rifle 5.56-mm, AAI") + commando_assault_rifle_model_733_556_mm_colt = EnumValue(18, "Commando assault rifle, Model 733 5.56-mm, Colt") + infantry_rifle_mini_14_20_gb_556_mm_ruger = EnumValue(19, "Infantry rifle, Mini-14/20 GB 5.56-mm, Ruger") + mini_14_556_mm_ruger = EnumValue(20, "Mini-14 5.56-mm, Ruger") + mini_thirty_762_mm_ruger = EnumValue(21, "Mini Thirty 7.62-mm, Ruger") + semi_automatic_model_82a2_50_barrett = EnumValue(22, "Semi-automatic model 82A2 .50, Barrett") + sniper_weapon_system_m24_762_mm = EnumValue(23, "Sniper Weapon System M24 7.62-mm") + sniping_rifle_m21_springfield_armory = EnumValue(24, "Sniping rifle M21, Springfield Armory") + sniping_rifle_m40a1_762_mm = EnumValue(25, "Sniping rifle M40A1 7.62-mm") + sniping_rifle_m600_762_mm = EnumValue(26, "Sniping rifle M600 7.62-mm") + ar_15_m16_556_mm = EnumValue(27, "AR-15 (M16) 5.56-mm") + m1_30 = EnumValue(28, "M1 .30") + m14_762_mm_nato = EnumValue(29, "M14 7.62-mm, NATO") + m14_m1a_m1a1_a1_springfield_armory = EnumValue(30, "M14 (M1A, M1A1-A1), Springfield Armory") + m14k_assault_rifle_lafrance = EnumValue(31, "M14K assault rifle, LaFrance") + m16a2_assault_rifle_556_mm_colt = EnumValue(32, "M16A2 assault rifle 5.56-mm, Colt") + m21_762_mm_us = EnumValue(33, "M21 7.62-mm, U.S.") + m77_mark_ii_556_mm_ruger = EnumValue(34, "M77 Mark II 5.56-mm, Ruger") + m77v_762_mm_ruger = EnumValue(35, "M77V 7.62-mm, Ruger") + s_16_762_x_36_mm_grendel = EnumValue(36, "S-16 7.62 x 36-mm, Grendel") + sar_8_762_mm = EnumValue(37, "SAR-8 7.62-mm") + sar_4800_762_mm = EnumValue(38, "SAR-4800 7.62-mm") + assault_carbine_m16k_lafrance = EnumValue(39, "Assault carbine M16K, LaFrance") + m1_30_2 = EnumValue(40, "M1 .30") + m4_model_720_556_mm_colt = EnumValue(41, "M4 (Model 720) 5.56-mm, Colt") + m_900_9_mm_calico = EnumValue(42, "M-900 9-mm, Calico") + ac_556f_556_mm_ruger = EnumValue(43, "AC-556F 5.56-mm, Ruger") + m3_45 = EnumValue(44, "M3 .45") + m11_cobray = EnumValue(45, "M11, Cobray") + m951_9_mm_calico = EnumValue(46, "M951 9-mm, Calico") + mp5_10_10_mm = EnumValue(47, "MP5/10 10-mm") + _9_mm_colt = EnumValue(48, "9-mm, Colt") + ingram = EnumValue(49, "Ingram") + externally_powered_epg_762_mm_ares = EnumValue(50, "Externally powered (EPG) 7.62-mm, Ares") + gecal_50 = EnumValue(51, "GECAL 50") + general_purpose_m60_762_mm = EnumValue(52, "General purpose M60 7.62-mm") + heavy_m2hb_qcb_50_ramo = EnumValue(53, "Heavy M2HB-QCB .50, RAMO") + light_assault_m60e3_enhanced_762_mm = EnumValue(54, "Light assault M60E3 (Enhanced) 7.62-mm") + light_m16a2_556_mm_colt = EnumValue(55, "Light M16A2 5.56-mm, Colt") + light_556_mm_ares = EnumValue(56, "Light 5.56-mm, Ares") + lightweight_m2_50_ramo = EnumValue(57, "Lightweight M2 .50, RAMO") + lightweight_assault_m60e3_762_mm = EnumValue(58, "Lightweight assault M60E3 7.62-mm") + minigun_m134_762_mm_general_electric = EnumValue(59, "Minigun M134 7.62-mm, General Electric") + mg_system_mk19_mod_3_40_mm = EnumValue(60, "MG system MK19 Mod 3, 40-mm") + mg_system_or_kit_m2hb_qcb_50_saco_defense = EnumValue(61, "MG system (or kit) M2HB QCB .50, Saco Defense") + m1919a4_30_cal_browning = EnumValue(62, "M1919A4 .30-cal, Browning") + _50_cal_browning = EnumValue(63, ".50-cal, Browning") + colored_smoke_hand_grenade_m18 = EnumValue(64, "Colored-smoke hand grenade M18") + colored_smoke_grenades_federal_laboratories = EnumValue(65, "Colored-smoke grenades, Federal Laboratories") + infrared_smoke_grenade_m76 = EnumValue(66, "Infrared smoke grenade M76") + smoke_hand_grenade_an_m8_hc = EnumValue(67, "Smoke hand grenade AN-M8 HC") + delay_fragmentation_hand_grenade_m61 = EnumValue(68, "Delay fragmentation hand grenade M61") + delay_fragmentation_hand_grenade_m67 = EnumValue(69, "Delay fragmentation hand grenade M67") + impact_fragmentation_hand_grenade_m57 = EnumValue(70, "Impact fragmentation hand grenade M57") + impact_fragmentation_hand_grenade_m68 = EnumValue(71, "Impact fragmentation hand grenade M68") + incendiary_hand_grenade_an_m14_th3 = EnumValue(72, "Incendiary hand grenade AN-M14 TH3") + launcher_i_m203_40_mm = EnumValue(73, "Launcher I-M203 40-mm") + launcher_m79_40_mm = EnumValue(74, "Launcher M79 40-mm") + multiple_grenade_launcher_mm_1_40_mm = EnumValue(75, "Multiple grenade launcher MM-1 40-mm") + multi_shot_portable_flame_weapon_m202a2_66_mm = EnumValue(76, "Multi-shot portable flame weapon M202A2 66-mm") + portable_abc_m9_7 = EnumValue(77, "Portable ABC-M9-7") + portable_m2a1_7 = EnumValue(78, "Portable M2A1-7") + portable_m9e1_7 = EnumValue(79, "Portable M9E1-7") + dragon_medium_anti_armor_missile_m47_fgm_77a = EnumValue(80, "Dragon medium Anti-Armor missile, M47, FGM-77A") + javelin_aaws_m = EnumValue(81, "Javelin AAWS-M") + light_anti_tank_weapon_m72_law_ii = EnumValue(82, "Light Anti-Tank Weapon M72 (LAW II)") + redeye_fim_43_general_dynamics = EnumValue(83, "Redeye, FIM-43, General Dynamics") + saber_dual_purpose_missile_system = EnumValue(84, "Saber dual-purpose missile system") + stinger_fim_92_general_dynamics = EnumValue(85, "Stinger, FIM-92, General Dynamics") + tow_heavy_anti_tank_weapon = EnumValue(86, "TOW heavy Anti-Tank weapon") + bear_trap_ap_device_pancor = EnumValue(87, "Bear Trap AP device, Pancor") + chain_gun_automatic_weapon_ex_34_762_mm = EnumValue(88, "Chain Gun automatic weapon EX-34 7.62-mm") + close_assault_weapon_system_caws_aai = EnumValue(89, "Close Assault Weapon System (CAWS), AAI") + caws_olin_heckler_and_koch = EnumValue(90, "CAWS, Olin/Heckler and Koch") + crossfire_sam_model_88 = EnumValue(91, "Crossfire SAM Model 88") + dragon_and_m16 = EnumValue(92, "Dragon and M16") + firing_port_weapon_m231_556_mm_colt = EnumValue(93, "Firing port weapon M231, 5.56-mm, Colt") + foxhole_digger_explosive_kit_exfoda = EnumValue(94, "Foxhole Digger Explosive Kit (EXFODA)") + infantry_support_weapon_asp_30_rm_30_mm = EnumValue(95, "Infantry Support Weapon ASP-30 {RM} 30-mm") + jackhammer_mk_3_a2_pancor = EnumValue(96, "Jackhammer Mk 3-A2, Pancor") + light_anti_armor_weapon_m136_at4 = EnumValue(97, "Light Anti-Armor weapon M136 (AT4)") + m26a2 = EnumValue(98, "M26A2") + master_key_s = EnumValue(99, "Master Key S") + minigun_556_mm = EnumValue(100, "Minigun 5.56-mm") + multipurpose_individual_munition_mpim_marquardt = EnumValue(101, "Multipurpose Individual Munition (MPIM), Marquardt") + multipurpose_weapon_at8 = EnumValue(102, "Multipurpose weapon AT8") + recoilless_rifle_m40_m40a2_and_m40a4_106_mm = EnumValue(103, "Recoilless rifle M40, M40A2, and M40A4; 106-mm") + recoilless_rifle_m67_90_mm = EnumValue(104, "Recoilless rifle M67, 90-mm") + revolver_sp_101 = EnumValue(105, "Revolver, SP 101") + revolver_super_redhawk_44_magnum_ruger = EnumValue(106, "Revolver, Super Redhawk .44 magnum, Ruger") + raw_rocket_140_mm_brunswick = EnumValue(107, "RAW rocket, 140-mm, Brunswick") + rifle_launcher_anti_armor_munition_raam_olin = EnumValue(108, "Rifle-launcher Anti-Armor Munition (RAAM), Olin") + rocket_launcher_m_20_35_in = EnumValue(109, "Rocket launcher M-20 3.5-in") + rocket_launcher_enhanced_m72_e_series_heat_66_mm = EnumValue(110, "Rocket launcher, Enhanced M72 'E series' HEAT, 66-mm") + selective_fire_weapon_ac_556_556_mm_ruger = EnumValue(111, "Selective fire weapon AC-556 5.56-mm, Ruger") + selective_fire_weapon_ac_556f_556_mm_ruger = EnumValue(112, "Selective fire weapon AC-556F 5.56-mm, Ruger") + shotgun_m870_mk_1_us_marine_corps_remington = EnumValue(113, "Shotgun M870 Mk 1 (U.S. Marine Corps), Remington") + smaw_mk_193_83_mm_mcdonnell_douglas = EnumValue(114, "SMAW Mk 193, 83-mm, McDonnell-Douglas") + smaw_d_disposable_smaw = EnumValue(115, "SMAW-D: Disposable SMAW") + squad_automatic_weapon_saw_m249_556_mm = EnumValue(116, "Squad Automatic Weapon (SAW) M249 5.56-mm") + tactical_support_weapon_50_12_50_cal_peregrine = EnumValue(117, "Tactical Support Weapon 50/12, .50-cal, Peregrine") + telescoped_ammunition_revolver_gun_targ_50_cal_ares = EnumValue(118, "Telescoped Ammunition Revolver Gun (TARG) .50-cal, Ares") + ultimate_over_under_combination_ciener = EnumValue(119, "Ultimate over-under combination, Ciener") + m18a1_claymore_mine = EnumValue(120, "M18A1 Claymore mine") + mortar_81_mm = EnumValue(121, "Mortar 81-mm") + machinegun_m240_762mm = EnumValue(134, "Machinegun M240 7.62mm") + default = assault_machine_pistol_kf_amp + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/life_saving_equipment.py b/dis/siso_ref_010/enums/life_saving_equipment.py new file mode 100644 index 0000000..92622c8 --- /dev/null +++ b/dis/siso_ref_010/enums/life_saving_equipment.py @@ -0,0 +1,119 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 633, marshal size 8; + * LifeSavingEquipment has 4 enumerations total. + * Subcategories for Surface Platform Category 101. For Subcategory 1-3. Use the Extra field to specify the capacity 1-255 persons. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class LifeSavingEquipment(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + lifeboat = EnumValue(1, "Lifeboat") + liferaft = EnumValue(2, "Liferaft") + mob_boat = EnumValue(3, "MOB Boat") + lifebuoy = EnumValue(4, "Lifebuoy") + default = lifeboat + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/linear_object_appearance_breach.py b/dis/siso_ref_010/enums/linear_object_appearance_breach.py new file mode 100644 index 0000000..91996e4 --- /dev/null +++ b/dis/siso_ref_010/enums/linear_object_appearance_breach.py @@ -0,0 +1,79 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 238, marshal size 16, + * LinearObjectAppearanceBreach + */ + +""" + +class LinearObjectAppearanceBreachBitField(ctypes.Structure): + _fields_ = [ + ] + +class LinearObjectAppearanceBreach(ctypes.Union): + _fields_ = [ + ("capabilities", LinearObjectAppearanceBreachBitField), + ("asbyte", UInt8) + ] + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/linear_object_appearance_exhaust_smoke.py b/dis/siso_ref_010/enums/linear_object_appearance_exhaust_smoke.py new file mode 100644 index 0000000..963b7d4 --- /dev/null +++ b/dis/siso_ref_010/enums/linear_object_appearance_exhaust_smoke.py @@ -0,0 +1,109 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_object_specific_chemical_type import AppearanceObjectSpecificChemicalType + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 236, marshal size 16, + * LinearObjectAppearanceExhaustsmoke + */ + +""" + +class LinearObjectAppearanceExhaustSmokeBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=8) 8-bit unsigned integer indicating the percent opacity of the smoke (0..100), use {@link UInt8} values for this field + ("_opacityPercent", UByte, 8), + + # (bit position 8, boolean) Describes whether or not the smoke is attached to the vehicle, use {@link UInt8} values for this field + ("_smokeIsAttached", UByte, 1), + + # (bit position 9, length=2) Describes the chemical content of the smoke, use {@link AppearanceObjectSpecificChemicalType} values for this field + ("_chemicalType", UByte, 2) + ] + +class LinearObjectAppearanceExhaustSmoke(ctypes.Union): + _fields_ = [ + ("capabilities", LinearObjectAppearanceExhaustSmokeBitField), + ("asbyte", UInt8) + ] + + def set_opacityPercent(self, value : UInt8): + self.capabilities._opacityPercent = int(value) + def get_opacityPercent(self) -> UInt8: + return self.capabilities._opacityPercent + OpacityPercent = property(get_opacityPercent, set_opacityPercent) + + def set_smokeIsAttached(self, value : UInt8): + self.capabilities._smokeIsAttached = int(value) + def get_smokeIsAttached(self) -> UInt8: + return self.capabilities._smokeIsAttached + SmokeIsAttached = property(get_smokeIsAttached, set_smokeIsAttached) + + def set_chemicalType(self, value : AppearanceObjectSpecificChemicalType): + self.capabilities._chemicalType = int(value) + def get_chemicalType(self) -> AppearanceObjectSpecificChemicalType: + return AppearanceObjectSpecificChemicalType.get_enum(self._chemicalType) + ChemicalType = property(get_chemicalType, set_chemicalType) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "OpacityPercent : " + str(self.OpacityPercent) + "\n" + outputStream += "SmokeIsAttached : " + str(self.SmokeIsAttached) + "\n" + outputStream += "ChemicalType : " + self.ChemicalType.get_description + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/linear_object_appearance_minefield_lane_marker.py b/dis/siso_ref_010/enums/linear_object_appearance_minefield_lane_marker.py new file mode 100644 index 0000000..9ab4971 --- /dev/null +++ b/dis/siso_ref_010/enums/linear_object_appearance_minefield_lane_marker.py @@ -0,0 +1,89 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_linear_object_lane_marker_visible import AppearanceLinearObjectLaneMarkerVisible + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 237, marshal size 16, + * LinearObjectAppearanceMinefieldLaneMarker + */ + +""" + +class LinearObjectAppearanceMinefieldLaneMarkerBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=2) Describes the visible side of the lane marker, use {@link AppearanceLinearObjectLaneMarkerVisible} values for this field + ("_visibleSide", UByte, 2) + ] + +class LinearObjectAppearanceMinefieldLaneMarker(ctypes.Union): + _fields_ = [ + ("capabilities", LinearObjectAppearanceMinefieldLaneMarkerBitField), + ("asbyte", UInt8) + ] + + def set_visibleSide(self, value : AppearanceLinearObjectLaneMarkerVisible): + self.capabilities._visibleSide = int(value) + def get_visibleSide(self) -> AppearanceLinearObjectLaneMarkerVisible: + return AppearanceLinearObjectLaneMarkerVisible.get_enum(self._visibleSide) + VisibleSide = property(get_visibleSide, set_visibleSide) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "VisibleSide : " + self.VisibleSide.get_description + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/linear_object_appearance_speed_bump.py b/dis/siso_ref_010/enums/linear_object_appearance_speed_bump.py new file mode 100644 index 0000000..d3ce842 --- /dev/null +++ b/dis/siso_ref_010/enums/linear_object_appearance_speed_bump.py @@ -0,0 +1,110 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .color import Color +from .material import Material + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 489, marshal size 32, + * LinearObjectAppearanceSpeedBump + */ + +""" + +class LinearObjectAppearanceSpeedBumpBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=8) 8-bit enumeration indicating the color, use {@link Color} values for this field + ("_color", UByte, 8), + + # (bit position 16, length=4) 4-bit unsigned integer indicating 16 levels of contrast (low to high) distinguishing variation of object from surrounding surface, use {@link UInt8} values for this field + ("_contrast", UByte, 4), + + # (bit position 20, length=4) 4-bit enumeration indicating the type of material, use {@link Material} values for this field + ("_material", UByte, 4) + ] + +class LinearObjectAppearanceSpeedBump(ctypes.Union): + _fields_ = [ + ("capabilities", LinearObjectAppearanceSpeedBumpBitField), + ("asbyte", UInt8) + ] + + def set_color(self, value : Color): + self.capabilities._color = int(value) + def get_color(self) -> Color: + return Color.get_enum(self._color) + Color = property(get_color, set_color) + + def set_contrast(self, value : UInt8): + self.capabilities._contrast = int(value) + def get_contrast(self) -> UInt8: + return self.capabilities._contrast + Contrast = property(get_contrast, set_contrast) + + def set_material(self, value : Material): + self.capabilities._material = int(value) + def get_material(self) -> Material: + return Material.get_enum(self._material) + Material = property(get_material, set_material) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Color : " + self.Color.get_description + "\n" + outputStream += "Contrast : " + str(self.Contrast) + "\n" + outputStream += "Material : " + self.Material.get_description + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/linear_object_appearance_tank_ditch_and_concertina_wire.py b/dis/siso_ref_010/enums/linear_object_appearance_tank_ditch_and_concertina_wire.py new file mode 100644 index 0000000..aa95702 --- /dev/null +++ b/dis/siso_ref_010/enums/linear_object_appearance_tank_ditch_and_concertina_wire.py @@ -0,0 +1,109 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_linear_object_tank_ditch_breach import AppearanceLinearObjectTankDitchBreach + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 235, marshal size 16, + * LinearObjectAppearanceTankDitchandConcertinaWire + */ + +""" + +class LinearObjectAppearanceTankDitchAndConcertinaWireBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=2) Describes the breached appearance of the object, use {@link AppearanceLinearObjectTankDitchBreach} values for this field + ("_breachState", UByte, 2), + + # (bit position 16, length=8) 8-bit unsigned integer indicating the fixed length in meters of a breached segment, use {@link UInt8} values for this field + ("_breachLength", UByte, 8), + + # (bit position 24, length=8) 8-bit record where each bit indicates whether its associated segment is breached or not, such that bit 0 of the record is the first segment, use {@link UInt8} values for this field + ("_breachLocation", UByte, 8) + ] + +class LinearObjectAppearanceTankDitchAndConcertinaWire(ctypes.Union): + _fields_ = [ + ("capabilities", LinearObjectAppearanceTankDitchAndConcertinaWireBitField), + ("asbyte", UInt8) + ] + + def set_breachState(self, value : AppearanceLinearObjectTankDitchBreach): + self.capabilities._breachState = int(value) + def get_breachState(self) -> AppearanceLinearObjectTankDitchBreach: + return AppearanceLinearObjectTankDitchBreach.get_enum(self._breachState) + BreachState = property(get_breachState, set_breachState) + + def set_breachLength(self, value : UInt8): + self.capabilities._breachLength = int(value) + def get_breachLength(self) -> UInt8: + return self.capabilities._breachLength + BreachLength = property(get_breachLength, set_breachLength) + + def set_breachLocation(self, value : UInt8): + self.capabilities._breachLocation = int(value) + def get_breachLocation(self) -> UInt8: + return self.capabilities._breachLocation + BreachLocation = property(get_breachLocation, set_breachLocation) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "BreachState : " + self.BreachState.get_description + "\n" + outputStream += "BreachLength : " + str(self.BreachLength) + "\n" + outputStream += "BreachLocation : " + str(self.BreachLocation) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/linear_object_appearance_wire.py b/dis/siso_ref_010/enums/linear_object_appearance_wire.py new file mode 100644 index 0000000..c65e3ab --- /dev/null +++ b/dis/siso_ref_010/enums/linear_object_appearance_wire.py @@ -0,0 +1,109 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .color import Color + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 488, marshal size 32, + * LinearObjectAppearanceWire + */ + +""" + +class LinearObjectAppearanceWireBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=8) 8-bit enumeration indicating the color, use {@link Color} values for this field + ("_color", UByte, 8), + + # (bit position 16, length=4) 4-bit unsigned integer indicating 16 levels of contrast (low to high) distinguishing variation of object from surrounding surface, use {@link UInt8} values for this field + ("_contrast", UByte, 4), + + # (bit position 20, boolean) Describes whether the wire is buried or not, use {@link UInt8} values for this field + ("_isBuried", UByte, 1) + ] + +class LinearObjectAppearanceWire(ctypes.Union): + _fields_ = [ + ("capabilities", LinearObjectAppearanceWireBitField), + ("asbyte", UInt8) + ] + + def set_color(self, value : Color): + self.capabilities._color = int(value) + def get_color(self) -> Color: + return Color.get_enum(self._color) + Color = property(get_color, set_color) + + def set_contrast(self, value : UInt8): + self.capabilities._contrast = int(value) + def get_contrast(self) -> UInt8: + return self.capabilities._contrast + Contrast = property(get_contrast, set_contrast) + + def set_isBuried(self, value : UInt8): + self.capabilities._isBuried = int(value) + def get_isBuried(self) -> UInt8: + return self.capabilities._isBuried + IsBuried = property(get_isBuried, set_isBuried) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Color : " + self.Color.get_description + "\n" + outputStream += "Contrast : " + str(self.Contrast) + "\n" + outputStream += "IsBuried : " + str(self.IsBuried) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/link1111bdata_terminal_set_indicator.py b/dis/siso_ref_010/enums/link1111bdata_terminal_set_indicator.py new file mode 100644 index 0000000..279d6d2 --- /dev/null +++ b/dis/siso_ref_010/enums/link1111bdata_terminal_set_indicator.py @@ -0,0 +1,123 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 469, marshal size 8; + * Link11DataTerminalSetIndicator has 8 enumerations total. + * UID table only for historical purposes. Do not add new entries + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class Link11DataTerminalSetIndicator(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + transmit = EnumValue(1, "Transmit") + receive = EnumValue(2, "Receive") + net_busy = EnumValue(3, "Net Busy") + transmit_data_error = EnumValue(4, "Transmit Data Error") + receive_data_error = EnumValue(5, "Receive Data Error") + code_error = EnumValue(6, "Code Error") + synchronization_complete = EnumValue(7, "Synchronization Complete") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/link1111bencryption_flag.py b/dis/siso_ref_010/enums/link1111bencryption_flag.py new file mode 100644 index 0000000..519fb6c --- /dev/null +++ b/dis/siso_ref_010/enums/link1111bencryption_flag.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 735, + * marshal size 8; + * Link1111BEncryptionFlag has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Link1111BEncryptionFlag(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_encryption_used = EnumValue(0, "No Encryption Used") + encryption_used = EnumValue(1, "Encryption Used") + default = no_encryption_used + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/link1111bfidelity_level.py b/dis/siso_ref_010/enums/link1111bfidelity_level.py new file mode 100644 index 0000000..8c9430d --- /dev/null +++ b/dis/siso_ref_010/enums/link1111bfidelity_level.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 467, + * marshal size 8; + * Link1111BFidelityLevel has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Link1111BFidelityLevel(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + fidelity_level_0 = EnumValue(0, "Fidelity Level 0") + fidelity_level_1 = EnumValue(1, "Fidelity Level 1") + fidelity_level_2 = EnumValue(2, "Fidelity Level 2") + default = fidelity_level_0 + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/link1111bmodeof_operation.py b/dis/siso_ref_010/enums/link1111bmodeof_operation.py new file mode 100644 index 0000000..69d160a --- /dev/null +++ b/dis/siso_ref_010/enums/link1111bmodeof_operation.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 470, + * marshal size 16; + * Link11ModeofOperation has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Link1111BModeofOperation(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + net_sync = EnumValue(1, "Net Sync") + net_test = EnumValue(2, "Net Test") + roll_call = EnumValue(3, "Roll Call") + short_broadcast = EnumValue(4, "Short Broadcast") + broadcast = EnumValue(5, "Broadcast") + default = no_statement + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/link1111bterminal_mode.py b/dis/siso_ref_010/enums/link1111bterminal_mode.py new file mode 100644 index 0000000..c590dee --- /dev/null +++ b/dis/siso_ref_010/enums/link1111bterminal_mode.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 468, + * marshal size 8; + * Link11TerminalMode has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Link1111BTerminalMode(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + network_control_station = EnumValue(1, "Network Control Station") + picket = EnumValue(2, "Picket") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/link11bdata_signaling_rate.py b/dis/siso_ref_010/enums/link11bdata_signaling_rate.py new file mode 100644 index 0000000..2d4ae66 --- /dev/null +++ b/dis/siso_ref_010/enums/link11bdata_signaling_rate.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 740, + * marshal size 8; + * Link11BDataSignalingRate has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Link11BDataSignalingRate(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + not_used = EnumValue(1, "Not Used") + not_used_2 = EnumValue(2, "Not Used") + _1200_bps = EnumValue(3, "1200 bps") + _2400_bps = EnumValue(4, "2400 bps") + _600_bps = EnumValue(5, "600 bps") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/link11blink_state.py b/dis/siso_ref_010/enums/link11blink_state.py new file mode 100644 index 0000000..b16aedc --- /dev/null +++ b/dis/siso_ref_010/enums/link11blink_state.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 737, + * marshal size 8; + * Link11BLinkState has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Link11BLinkState(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + inactive = EnumValue(1, "Inactive") + ready = EnumValue(2, "Ready") + active = EnumValue(3, "Active") + operational = EnumValue(4, "Operational") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/link11bmessage_sub_type.py b/dis/siso_ref_010/enums/link11bmessage_sub_type.py new file mode 100644 index 0000000..7cc675b --- /dev/null +++ b/dis/siso_ref_010/enums/link11bmessage_sub_type.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 739, + * marshal size 8; + * Link11BMessageSubType has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Link11BMessageSubType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + transmission_frame = EnumValue(1, "Transmission Frame") + standby_signal = EnumValue(2, "Standby Signal") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/link11bmodeof_operation.py b/dis/siso_ref_010/enums/link11bmodeof_operation.py new file mode 100644 index 0000000..2de2f5d --- /dev/null +++ b/dis/siso_ref_010/enums/link11bmodeof_operation.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 738, + * marshal size 16; + * Link11BModeofOperation has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Link11BModeofOperation(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + full_transmission_of_data = EnumValue(1, "Full Transmission of Data") + limited_transmission_of_data = EnumValue(2, "Limited Transmission of Data") + receive_only = EnumValue(3, "Receive only") + default = no_statement + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/link11bmodulation_standard.py b/dis/siso_ref_010/enums/link11bmodulation_standard.py new file mode 100644 index 0000000..12b75dd --- /dev/null +++ b/dis/siso_ref_010/enums/link11bmodulation_standard.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 741, + * marshal size 8; + * Link11BModulationStandard has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Link11BModulationStandard(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + ccitt_v23 = EnumValue(1, "CCITT V.23") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/link11data_signalling_rate.py b/dis/siso_ref_010/enums/link11data_signalling_rate.py new file mode 100644 index 0000000..b1e43a9 --- /dev/null +++ b/dis/siso_ref_010/enums/link11data_signalling_rate.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 732, + * marshal size 8; + * Link11DataSignallingRate has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Link11DataSignallingRate(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + _1364_bps = EnumValue(1, "1364 bps") + _2250_bps = EnumValue(2, "2250 bps") + _1200_bps = EnumValue(3, "1200 bps") + _2400_bps = EnumValue(4, "2400 bps") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/link11message_sub_type.py b/dis/siso_ref_010/enums/link11message_sub_type.py new file mode 100644 index 0000000..a44f309 --- /dev/null +++ b/dis/siso_ref_010/enums/link11message_sub_type.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 730, + * marshal size 8; + * Link11MessageSubType has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Link11MessageSubType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + interrogation = EnumValue(1, "Interrogation") + data_start = EnumValue(2, "Data Start") + data = EnumValue(3, "Data") + data_stop = EnumValue(4, "Data Stop") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/link11message_type_identifier.py b/dis/siso_ref_010/enums/link11message_type_identifier.py new file mode 100644 index 0000000..ca5a019 --- /dev/null +++ b/dis/siso_ref_010/enums/link11message_type_identifier.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 731, + * marshal size 8; + * Link11MessageTypeIdentifier has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Link11MessageTypeIdentifier(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + net_test = EnumValue(1, "Net Test") + roll_call = EnumValue(2, "Roll Call") + picket_reply = EnumValue(3, "Picket Reply") + short_broadcast = EnumValue(4, "Short Broadcast") + broadcast = EnumValue(5, "Broadcast") + net_sync = EnumValue(6, "Net Sync") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/link11signal_integration_interval.py b/dis/siso_ref_010/enums/link11signal_integration_interval.py new file mode 100644 index 0000000..d2a27f7 --- /dev/null +++ b/dis/siso_ref_010/enums/link11signal_integration_interval.py @@ -0,0 +1,118 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 733, marshal size 8; + * Link11SignalIntegrationInterval has 3 enumerations total. + * UID table only for historical purposes. Do not add new entries + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class Link11SignalIntegrationInterval(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + _9_ms = EnumValue(1, "9 ms") + _18_ms = EnumValue(2, "18 ms") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/link11signal_waveform.py b/dis/siso_ref_010/enums/link11signal_waveform.py new file mode 100644 index 0000000..04b63fd --- /dev/null +++ b/dis/siso_ref_010/enums/link11signal_waveform.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 734, + * marshal size 8; + * Link11SignalWaveform has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Link11SignalWaveform(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement_clew_format = EnumValue(0, "No Statement - CLEW Format") + conventional_link_eleven_waveform_clew = EnumValue(1, "Conventional Link Eleven Waveform (CLEW)") + single_tone_link_eleven_waveform_slew = EnumValue(2, "Single Tone Link Eleven Waveform (SLEW)") + default = no_statement_clew_format + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/link16version.py b/dis/siso_ref_010/enums/link16version.py new file mode 100644 index 0000000..2c4dfeb --- /dev/null +++ b/dis/siso_ref_010/enums/link16version.py @@ -0,0 +1,146 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 800, + * marshal size 8; + * Link16Version has 11 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Link16Version(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + mil_std_6016c = EnumValue(1, "MIL-STD-6016C") + mil_std_6016d = EnumValue(2, "MIL-STD-6016D") + mil_std_6016e = EnumValue(3, "MIL-STD-6016E") + mil_std_6016f = EnumValue(4, "MIL-STD-6016F") + mil_std_6016f_c1 = EnumValue(5, "MIL-STD-6016F C1") + stanag_5516_ed_3 = EnumValue(103, "STANAG 5516 Ed 3") + stanag_5516_ed_4 = EnumValue(104, "STANAG 5516 Ed 4") + stanag_5516_ed_5 = EnumValue(105, "STANAG 5516 Ed 5") + stanag_5516_ed_6 = EnumValue(106, "STANAG 5516 Ed 6") + stanag_5516_ed_8 = EnumValue(108, "STANAG 5516 Ed 8") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/material.py b/dis/siso_ref_010/enums/material.py new file mode 100644 index 0000000..f4c81cb --- /dev/null +++ b/dis/siso_ref_010/enums/material.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 466, + * marshal size 4; + * Material has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Material(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_specified = EnumValue(0, "Not Specified") + plastic = EnumValue(1, "Plastic") + rubber = EnumValue(2, "Rubber") + road = EnumValue(3, "Road") + default = not_specified + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/message_type_identifier.py b/dis/siso_ref_010/enums/message_type_identifier.py new file mode 100644 index 0000000..844df35 --- /dev/null +++ b/dis/siso_ref_010/enums/message_type_identifier.py @@ -0,0 +1,143 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 176, + * marshal size 8; + * MessageTypeIdentifier has 8 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MessageTypeIdentifier(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + jtids_header_messages = EnumValue(0, "JTIDS Header/Messages") + rtt_a_b = EnumValue(1, "RTT A/B") + rtt_reply = EnumValue(2, "RTT Reply") + jtids_voice_cvsd = EnumValue(3, "JTIDS Voice CVSD") + jtids_voice_lpc10 = EnumValue(4, "JTIDS Voice LPC10") + jtids_voice_lpc12 = EnumValue(5, "JTIDS Voice LPC12") + jtids_let = EnumValue(6, "JTIDS LET") + vmf = EnumValue(7, "VMF") + default = jtids_header_messages + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/minefield_appearance_active_status.py b/dis/siso_ref_010/enums/minefield_appearance_active_status.py new file mode 100644 index 0000000..d9ab836 --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_appearance_active_status.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 419, + * marshal size 1; + * MinefieldAppearanceActiveStatus has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MinefieldAppearanceActiveStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + active = EnumValue(0, "Active") + inactive = EnumValue(1, "Inactive") + default = active + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/minefield_appearance_lane.py b/dis/siso_ref_010/enums/minefield_appearance_lane.py new file mode 100644 index 0000000..4b700eb --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_appearance_lane.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 420, + * marshal size 1; + * MinefieldAppearanceLane has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MinefieldAppearanceLane(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + minefield_has_active_lane = EnumValue(0, "Minefield Has Active Lane") + minefield_has_an_inactive_lane = EnumValue(1, "Minefield Has an Inactive Lane") + default = minefield_has_active_lane + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/minefield_appearance_minefield_type.py b/dis/siso_ref_010/enums/minefield_appearance_minefield_type.py new file mode 100644 index 0000000..f77c31a --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_appearance_minefield_type.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 418, + * marshal size 2; + * MinefieldAppearanceMinefieldType has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MinefieldAppearanceMinefieldType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + mixed_anti_personnel_and_anti_tank_minefield = EnumValue(0, "Mixed Anti-Personnel and Anti-Tank Minefield") + pure_anti_personnel_minefield = EnumValue(1, "Pure Anti-Personnel Minefield") + pure_anti_tank_minefield = EnumValue(2, "Pure Anti-Tank Minefield") + default = mixed_anti_personnel_and_anti_tank_minefield + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/minefield_appearance_state.py b/dis/siso_ref_010/enums/minefield_appearance_state.py new file mode 100644 index 0000000..96114c4 --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_appearance_state.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 421, + * marshal size 1; + * MinefieldAppearanceState has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MinefieldAppearanceState(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + active = EnumValue(0, "Active") + deactivated = EnumValue(1, "Deactivated") + default = active + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/minefield_data_fusing.py b/dis/siso_ref_010/enums/minefield_data_fusing.py new file mode 100644 index 0000000..79e19bd --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_data_fusing.py @@ -0,0 +1,110 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .minefield_fusing_fuse_type import MinefieldFusingFuseType +from .minefield_fusing_fuse_type import MinefieldFusingFuseType + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 192, marshal size 16, + * MinefieldDataFusing + */ + +""" + +class MinefieldDataFusingBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=7) Identifies the type of the primary fuse, use {@link MinefieldFusingFuseType} values for this field + ("_primary", UByte, 7), + + # (bit position 7, length=7) Identifies the type of the secondary fuse, use {@link MinefieldFusingFuseType} values for this field + ("_secondary", UByte, 7), + + # (bit position 14, boolean) Describes whether the mine has an Anti-Handling device, use {@link UInt8} values for this field + ("_hasAntiHandlingDevice", UByte, 1) + ] + +class MinefieldDataFusing(ctypes.Union): + _fields_ = [ + ("capabilities", MinefieldDataFusingBitField), + ("asbyte", UInt8) + ] + + def set_primary(self, value : MinefieldFusingFuseType): + self.capabilities._primary = int(value) + def get_primary(self) -> MinefieldFusingFuseType: + return MinefieldFusingFuseType.get_enum(self._primary) + Primary = property(get_primary, set_primary) + + def set_secondary(self, value : MinefieldFusingFuseType): + self.capabilities._secondary = int(value) + def get_secondary(self) -> MinefieldFusingFuseType: + return MinefieldFusingFuseType.get_enum(self._secondary) + Secondary = property(get_secondary, set_secondary) + + def set_hasAntiHandlingDevice(self, value : UInt8): + self.capabilities._hasAntiHandlingDevice = int(value) + def get_hasAntiHandlingDevice(self) -> UInt8: + return self.capabilities._hasAntiHandlingDevice + HasAntiHandlingDevice = property(get_hasAntiHandlingDevice, set_hasAntiHandlingDevice) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Primary : " + self.Primary.get_description + "\n" + outputStream += "Secondary : " + self.Secondary.get_description + "\n" + outputStream += "HasAntiHandlingDevice : " + str(self.HasAntiHandlingDevice) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/minefield_data_paint_scheme.py b/dis/siso_ref_010/enums/minefield_data_paint_scheme.py new file mode 100644 index 0000000..90ea300 --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_data_paint_scheme.py @@ -0,0 +1,100 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .minefield_paint_scheme_algae import MinefieldPaintSchemeAlgae +from .minefield_paint_scheme_paint_scheme import MinefieldPaintSchemePaintScheme + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 202, marshal size 8, + * MinefieldDataPaintScheme + */ + +""" + +class MinefieldDataPaintSchemeBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=2) Identifies the algae build-up on the mine, use {@link MinefieldPaintSchemeAlgae} values for this field + ("_algae", UByte, 2), + + # (bit position 2, length=6) Identifies the paint scheme of the mine, use {@link MinefieldPaintSchemePaintScheme} values for this field + ("_paintScheme", UByte, 6) + ] + +class MinefieldDataPaintScheme(ctypes.Union): + _fields_ = [ + ("capabilities", MinefieldDataPaintSchemeBitField), + ("asbyte", UInt8) + ] + + def set_algae(self, value : MinefieldPaintSchemeAlgae): + self.capabilities._algae = int(value) + def get_algae(self) -> MinefieldPaintSchemeAlgae: + return MinefieldPaintSchemeAlgae.get_enum(self._algae) + Algae = property(get_algae, set_algae) + + def set_paintScheme(self, value : MinefieldPaintSchemePaintScheme): + self.capabilities._paintScheme = int(value) + def get_paintScheme(self) -> MinefieldPaintSchemePaintScheme: + return MinefieldPaintSchemePaintScheme.get_enum(self._paintScheme) + PaintScheme = property(get_paintScheme, set_paintScheme) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Algae : " + self.Algae.get_description + "\n" + outputStream += "PaintScheme : " + self.PaintScheme.get_description + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/minefield_fusing_fuse_type.py b/dis/siso_ref_010/enums/minefield_fusing_fuse_type.py new file mode 100644 index 0000000..771a93b --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_fusing_fuse_type.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 422, + * marshal size 7; + * MinefieldFusingFuseType has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MinefieldFusingFuseType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_fuse = EnumValue(0, "No Fuse") + other = EnumValue(1, "Other") + pressure = EnumValue(2, "Pressure") + magnetic = EnumValue(3, "Magnetic") + tilt_rod = EnumValue(4, "Tilt Rod") + command = EnumValue(5, "Command") + trip_wire = EnumValue(6, "Trip Wire") + default = no_fuse + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/minefield_paint_scheme_algae.py b/dis/siso_ref_010/enums/minefield_paint_scheme_algae.py new file mode 100644 index 0000000..2995056 --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_paint_scheme_algae.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 424, + * marshal size 2; + * MinefieldPaintSchemeAlgae has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MinefieldPaintSchemeAlgae(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + none = EnumValue(0, "None") + light = EnumValue(1, "Light") + moderate = EnumValue(2, "Moderate") + heavy = EnumValue(3, "Heavy") + default = none + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/minefield_paint_scheme_paint_scheme.py b/dis/siso_ref_010/enums/minefield_paint_scheme_paint_scheme.py new file mode 100644 index 0000000..5620c4b --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_paint_scheme_paint_scheme.py @@ -0,0 +1,154 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 425, + * marshal size 6; + * MinefieldPaintSchemePaintScheme has 19 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MinefieldPaintSchemePaintScheme(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + standard = EnumValue(1, "Standard") + camouflage_desert = EnumValue(2, "Camouflage Desert") + camouflage_jungle = EnumValue(3, "Camouflage Jungle") + camouflage_snow = EnumValue(4, "Camouflage Snow") + camouflage_gravel = EnumValue(5, "Camouflage Gravel") + camouflage_pavement = EnumValue(6, "Camouflage Pavement") + camouflage_sand = EnumValue(7, "Camouflage Sand") + natural_wood = EnumValue(8, "Natural Wood") + clear = EnumValue(9, "Clear") + red = EnumValue(10, "Red") + blue = EnumValue(11, "Blue") + green = EnumValue(12, "Green") + olive = EnumValue(13, "Olive") + white = EnumValue(14, "White") + tan = EnumValue(15, "Tan") + black = EnumValue(16, "Black") + yellow = EnumValue(17, "Yellow") + brown = EnumValue(18, "Brown") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/minefield_sensor_types.py b/dis/siso_ref_010/enums/minefield_sensor_types.py new file mode 100644 index 0000000..922ec3e --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_sensor_types.py @@ -0,0 +1,152 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 193, + * marshal size 4; + * MinefieldSensorTypes has 9 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MinefieldSensorTypes(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + # XREF UID 194 - CLASS MinefieldSensorTypesOptical + optical = EnumValue(1, "Optical") + # XREF UID 195 - CLASS MinefieldSensorTypesFLIR + flir = EnumValue(2, "FLIR") + # XREF UID 196 - CLASS MinefieldSensorTypesRADAR + radar = EnumValue(3, "RADAR") + # XREF UID 197 - CLASS MinefieldSensorTypesMagnetic + magnetic = EnumValue(4, "Magnetic") + # XREF UID 198 - CLASS MinefieldSensorTypesLaser + laser = EnumValue(5, "Laser") + # XREF UID 199 - CLASS MinefieldSensorTypesSONAR + sonar = EnumValue(6, "SONAR") + # XREF UID 200 - CLASS MinefieldSensorTypesPhysical + physical = EnumValue(7, "Physical") + # XREF UID 201 - CLASS MinefieldSensorTypesMultispectral + multispectral = EnumValue(8, "Multispectral") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/minefield_sensor_types_flir.py b/dis/siso_ref_010/enums/minefield_sensor_types_flir.py new file mode 100644 index 0000000..6f80825 --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_sensor_types_flir.py @@ -0,0 +1,145 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 195, + * marshal size 12; + * MinefieldSensorTypesFLIR has 10 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MinefieldSensorTypesFLIR(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + generic_3_5 = EnumValue(0, "Generic 3-5") + generic_8_12 = EnumValue(1, "Generic 8-12") + astamids_i = EnumValue(2, "ASTAMIDS I") + astamids_ii = EnumValue(3, "ASTAMIDS II") + gstamids_3_5 = EnumValue(4, "GSTAMIDS 3-5") + gstamids_8_12 = EnumValue(5, "GSTAMIDS 8-12") + hstamids_3_5 = EnumValue(6, "HSTAMIDS 3-5") + hstamids_8_12 = EnumValue(7, "HSTAMIDS 8-12") + cobra_3_5 = EnumValue(8, "COBRA 3-5") + cobra_8_12 = EnumValue(9, "COBRA 8-12") + default = generic_3_5 + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/minefield_sensor_types_laser.py b/dis/siso_ref_010/enums/minefield_sensor_types_laser.py new file mode 100644 index 0000000..6248535 --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_sensor_types_laser.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 198, + * marshal size 12; + * MinefieldSensorTypesLaser has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MinefieldSensorTypesLaser(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + generic = EnumValue(0, "Generic") + astamids = EnumValue(1, "ASTAMIDS") + default = generic + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/minefield_sensor_types_magnetic.py b/dis/siso_ref_010/enums/minefield_sensor_types_magnetic.py new file mode 100644 index 0000000..ac517e1 --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_sensor_types_magnetic.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 197, + * marshal size 12; + * MinefieldSensorTypesMagnetic has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MinefieldSensorTypesMagnetic(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + generic = EnumValue(0, "Generic") + an_pss_11 = EnumValue(1, "AN-PSS-11") + an_pss_12 = EnumValue(2, "AN-PSS-12") + gstamids = EnumValue(3, "GSTAMIDS") + default = generic + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/minefield_sensor_types_multispectral.py b/dis/siso_ref_010/enums/minefield_sensor_types_multispectral.py new file mode 100644 index 0000000..ae24566 --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_sensor_types_multispectral.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 201, + * marshal size 12; + * MinefieldSensorTypesMultispectral has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MinefieldSensorTypesMultispectral(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + generic = EnumValue(0, "Generic") + default = generic + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/minefield_sensor_types_optical.py b/dis/siso_ref_010/enums/minefield_sensor_types_optical.py new file mode 100644 index 0000000..c17d58a --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_sensor_types_optical.py @@ -0,0 +1,147 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 194, + * marshal size 12; + * MinefieldSensorTypesOptical has 12 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MinefieldSensorTypesOptical(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + unaided_eye_actively_searching = EnumValue(0, "Unaided Eye, Actively Searching") + unaided_eye_not_actively_searching = EnumValue(1, "Unaided Eye, Not Actively Searching") + binoculars = EnumValue(2, "Binoculars") + image_intensifier = EnumValue(3, "Image Intensifier") + hmmwv_occupant_actively_searching = EnumValue(4, "HMMWV occupant, Actively Searching") + hmmwv_occupant_not_actively_searching = EnumValue(5, "HMMWV occupant, Not Actively Searching") + truck_occupant_actively_searching = EnumValue(6, "Truck occupant, Actively Searching") + truck_occupant_not_actively_searching = EnumValue(7, "Truck occupant, Not Actively Searching") + tracked_vehicle_occupant_closed_hatch_actively_searching = EnumValue(8, "Tracked vehicle occupant, closed hatch, Actively Searching") + tracked_vehicle_occupant_closed_hatch_not_actively_searching = EnumValue(9, "Tracked vehicle occupant, closed hatch, Not Actively Searching") + tracked_vehicle_occupant_open_hatch_actively_searching = EnumValue(10, "Tracked vehicle occupant, open hatch, Actively Searching") + tracked_vehicle_occupant_open_hatch_not_actively_searching = EnumValue(11, "Tracked vehicle occupant, open hatch, Not Actively Searching") + default = unaided_eye_actively_searching + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/minefield_sensor_types_physical.py b/dis/siso_ref_010/enums/minefield_sensor_types_physical.py new file mode 100644 index 0000000..fe1b1f7 --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_sensor_types_physical.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 200, + * marshal size 12; + * MinefieldSensorTypesPhysical has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MinefieldSensorTypesPhysical(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + generic_probe = EnumValue(0, "Generic Probe") + probe_metal_content = EnumValue(1, "Probe, metal content") + probe_no_metal_content = EnumValue(2, "Probe, no metal content") + default = generic_probe + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/minefield_sensor_types_radar.py b/dis/siso_ref_010/enums/minefield_sensor_types_radar.py new file mode 100644 index 0000000..6b2bc07 --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_sensor_types_radar.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 196, + * marshal size 12; + * MinefieldSensorTypesRADAR has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MinefieldSensorTypesRADAR(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + generic = EnumValue(0, "Generic") + generic_gpr = EnumValue(1, "Generic GPR") + gstamids_i = EnumValue(2, "GSTAMIDS I") + gstamids_ii = EnumValue(3, "GSTAMIDS II") + hstamids_i = EnumValue(4, "HSTAMIDS I") + hstamids_ii = EnumValue(5, "HSTAMIDS II") + default = generic + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/minefield_sensor_types_sonar.py b/dis/siso_ref_010/enums/minefield_sensor_types_sonar.py new file mode 100644 index 0000000..932b404 --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_sensor_types_sonar.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 199, + * marshal size 12; + * MinefieldSensorTypesSONAR has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MinefieldSensorTypesSONAR(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + generic = EnumValue(0, "Generic") + default = generic + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/minefield_state_appearance_bit_map.py b/dis/siso_ref_010/enums/minefield_state_appearance_bit_map.py new file mode 100644 index 0000000..dd964ca --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_state_appearance_bit_map.py @@ -0,0 +1,122 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .minefield_appearance_minefield_type import MinefieldAppearanceMinefieldType +from .minefield_appearance_active_status import MinefieldAppearanceActiveStatus +from .minefield_appearance_lane import MinefieldAppearanceLane +from .minefield_appearance_state import MinefieldAppearanceState + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 190, marshal size 16, + * MinefieldStateAppearanceBitMap + */ + +""" + +class MinefieldStateAppearanceBitMapBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=2) Identifies the type of minefield, use {@link MinefieldAppearanceMinefieldType} values for this field + ("_minefieldType", UByte, 2), + + # (bit position 2, boolean) Describes whether the minefield is active or inactive, use {@link MinefieldAppearanceActiveStatus} values for this field + ("_activeStatus", UByte, 1), + + # (bit position 3, boolean) Identifies whether the minefield has an active or inactive lane, use {@link MinefieldAppearanceLane} values for this field + ("_lane", UByte, 1), + + # (bit position 13, boolean) Describes the state of the minefield, use {@link MinefieldAppearanceState} values for this field + ("_state", UByte, 1) + ] + +class MinefieldStateAppearanceBitMap(ctypes.Union): + _fields_ = [ + ("capabilities", MinefieldStateAppearanceBitMapBitField), + ("asbyte", UInt8) + ] + + def set_minefieldType(self, value : MinefieldAppearanceMinefieldType): + self.capabilities._minefieldType = int(value) + def get_minefieldType(self) -> MinefieldAppearanceMinefieldType: + return MinefieldAppearanceMinefieldType.get_enum(self._minefieldType) + MinefieldType = property(get_minefieldType, set_minefieldType) + + def set_activeStatus(self, value : MinefieldAppearanceActiveStatus): + self.capabilities._activeStatus = int(value) + def get_activeStatus(self) -> MinefieldAppearanceActiveStatus: + return MinefieldAppearanceActiveStatus.get_enum(self._activeStatus) + ActiveStatus = property(get_activeStatus, set_activeStatus) + + def set_lane(self, value : MinefieldAppearanceLane): + self.capabilities._lane = int(value) + def get_lane(self) -> MinefieldAppearanceLane: + return MinefieldAppearanceLane.get_enum(self._lane) + Lane = property(get_lane, set_lane) + + def set_state(self, value : MinefieldAppearanceState): + self.capabilities._state = int(value) + def get_state(self) -> MinefieldAppearanceState: + return MinefieldAppearanceState.get_enum(self._state) + State = property(get_state, set_state) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "MinefieldType : " + self.MinefieldType.get_description + "\n" + outputStream += "ActiveStatus : " + self.ActiveStatus.get_description + "\n" + outputStream += "Lane : " + self.Lane.get_description + "\n" + outputStream += "State : " + self.State.get_description + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/minefield_state_protocol_mode.py b/dis/siso_ref_010/enums/minefield_state_protocol_mode.py new file mode 100644 index 0000000..e2c4ba8 --- /dev/null +++ b/dis/siso_ref_010/enums/minefield_state_protocol_mode.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 336, + * marshal size 2; + * MinefieldStateProtocolMode has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MinefieldStateProtocolMode(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + heartbeat_mode = EnumValue(0, "Heartbeat Mode") + qrp_mode = EnumValue(1, "QRP Mode") + default = heartbeat_mode + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/mode5iffmission.py b/dis/siso_ref_010/enums/mode5iffmission.py new file mode 100644 index 0000000..a965179 --- /dev/null +++ b/dis/siso_ref_010/enums/mode5iffmission.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 346, + * marshal size 3; + * Mode5IFFMission has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Mode5IFFMission(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + surveillance_shorad = EnumValue(1, "Surveillance SHORAD") + shorad_associated_with_a_weapons_system = EnumValue(2, "SHORAD associated with a Weapons System") + weapon_system = EnumValue(3, "Weapon System") + airborne_and_surface_ship_surveillance_platforms = EnumValue(4, "Airborne and Surface (Ship) Surveillance Platforms") + airborne_and_surface_ship_weapons_platforms = EnumValue(5, "Airborne and Surface (Ship) Weapons Platforms") + ground_to_ground = EnumValue(6, "Ground-to-Ground") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/mode5level_selection.py b/dis/siso_ref_010/enums/mode5level_selection.py new file mode 100644 index 0000000..544638f --- /dev/null +++ b/dis/siso_ref_010/enums/mode5level_selection.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 412, + * marshal size 1; + * Mode5LevelSelection has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Mode5LevelSelection(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + mode_5_level_1 = EnumValue(0, "Mode 5 Level 1") + mode_5_level_2 = EnumValue(1, "Mode 5 Level 2") + default = mode_5_level_1 + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/mode5location_errors.py b/dis/siso_ref_010/enums/mode5location_errors.py new file mode 100644 index 0000000..8efdfb8 --- /dev/null +++ b/dis/siso_ref_010/enums/mode5location_errors.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 423, + * marshal size 1; + * Mode5LocationErrors has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Mode5LocationErrors(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_location_errors = EnumValue(0, "No Location Errors") + iff_data_record_present = EnumValue(1, "IFF Data Record Present") + default = no_location_errors + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/mode5message_formats_status.py b/dis/siso_ref_010/enums/mode5message_formats_status.py new file mode 100644 index 0000000..75051d3 --- /dev/null +++ b/dis/siso_ref_010/enums/mode5message_formats_status.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 380, + * marshal size 1; + * Mode5MessageFormatsStatus has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Mode5MessageFormatsStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + capability = EnumValue(0, "Capability") + active_interrogation = EnumValue(1, "Active Interrogation") + default = capability + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/mode5platform_type.py b/dis/siso_ref_010/enums/mode5platform_type.py new file mode 100644 index 0000000..5e89a8d --- /dev/null +++ b/dis/siso_ref_010/enums/mode5platform_type.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 396, + * marshal size 1; + * Mode5PlatformType has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Mode5PlatformType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + ground_vehicle = EnumValue(0, "Ground Vehicle") + air_vehicle = EnumValue(1, "Air Vehicle") + default = ground_vehicle + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/mode5reply.py b/dis/siso_ref_010/enums/mode5reply.py new file mode 100644 index 0000000..2dbd663 --- /dev/null +++ b/dis/siso_ref_010/enums/mode5reply.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 350, + * marshal size 3; + * Mode5Reply has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Mode5Reply(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_response = EnumValue(0, "No Response") + valid = EnumValue(1, "Valid") + invalid = EnumValue(2, "Invalid") + unable_to_verify = EnumValue(3, "Unable to Verify") + default = no_response + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/mode5saltitude_resolution.py b/dis/siso_ref_010/enums/mode5saltitude_resolution.py new file mode 100644 index 0000000..c38122a --- /dev/null +++ b/dis/siso_ref_010/enums/mode5saltitude_resolution.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 361, + * marshal size 1; + * Mode5SAltitudeResolution has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Mode5SAltitudeResolution(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + _100_foot = EnumValue(0, "100-foot") + _25_foot = EnumValue(1, "25-foot") + default = _100_foot + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/mode5squitter_type.py b/dis/siso_ref_010/enums/mode5squitter_type.py new file mode 100644 index 0000000..c4b1385 --- /dev/null +++ b/dis/siso_ref_010/enums/mode5squitter_type.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 352, + * marshal size 3; + * Mode5SquitterType has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Mode5SquitterType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_capable = EnumValue(0, "Not Capable") + Short = EnumValue(1, "Short") + extended = EnumValue(2, "Extended") + default = not_capable + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/mode_caltitude_indicator.py b/dis/siso_ref_010/enums/mode_caltitude_indicator.py new file mode 100644 index 0000000..f7f7b73 --- /dev/null +++ b/dis/siso_ref_010/enums/mode_caltitude_indicator.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 340, + * marshal size 1; + * ModeCAltitudeIndicator has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ModeCAltitudeIndicator(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + positive_altitude_above_msl = EnumValue(0, "Positive Altitude Above MSL") + negative_altitude_below_msl_use_alternate_mode_c_altitude = EnumValue(1, "Negative Altitude Below MSL/Use Alternate Mode C Altitude") + default = positive_altitude_above_msl + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/mode_sinterrogator_identifier_ictype.py b/dis/siso_ref_010/enums/mode_sinterrogator_identifier_ictype.py new file mode 100644 index 0000000..8b63e58 --- /dev/null +++ b/dis/siso_ref_010/enums/mode_sinterrogator_identifier_ictype.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 348, + * marshal size 1; + * ModeSInterrogatorIdentifierICType has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ModeSInterrogatorIdentifierICType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + ii = EnumValue(0, "II") + si = EnumValue(1, "SI") + default = ii + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/mode_sinterrogator_status_transmit_state.py b/dis/siso_ref_010/enums/mode_sinterrogator_status_transmit_state.py new file mode 100644 index 0000000..6c08635 --- /dev/null +++ b/dis/siso_ref_010/enums/mode_sinterrogator_status_transmit_state.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 347, + * marshal size 3; + * ModeSInterrogatorStatusTransmitState has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ModeSInterrogatorStatusTransmitState(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + roll_call = EnumValue(1, "Roll-Call") + all_call = EnumValue(2, "All Call") + lockout_override = EnumValue(3, "Lockout Override") + temporary_lockout = EnumValue(4, "Temporary Lockout") + intermittent_lockout = EnumValue(5, "Intermittent Lockout") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/mode_ssquitter_record_source.py b/dis/siso_ref_010/enums/mode_ssquitter_record_source.py new file mode 100644 index 0000000..1ab3341 --- /dev/null +++ b/dis/siso_ref_010/enums/mode_ssquitter_record_source.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 355, + * marshal size 1; + * ModeSSquitterRecordSource has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ModeSSquitterRecordSource(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + layer_4_iff_data_records = EnumValue(0, "Layer 4 IFF Data Records") + layer_5_gicb_iff_data_records = EnumValue(1, "Layer 5 GICB IFF Data Records") + default = layer_4_iff_data_records + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/mode_ssquitter_type.py b/dis/siso_ref_010/enums/mode_ssquitter_type.py new file mode 100644 index 0000000..20dbb25 --- /dev/null +++ b/dis/siso_ref_010/enums/mode_ssquitter_type.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 354, + * marshal size 3; + * ModeSSquitterType has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ModeSSquitterType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_capable = EnumValue(0, "Not Capable") + acquisition = EnumValue(1, "Acquisition") + extended = EnumValue(2, "Extended") + Short = EnumValue(3, "Short") + default = not_capable + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/munition_appearance.py b/dis/siso_ref_010/enums/munition_appearance.py new file mode 100644 index 0000000..a15182f --- /dev/null +++ b/dis/siso_ref_010/enums/munition_appearance.py @@ -0,0 +1,192 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_damage import AppearanceDamage +from .appearance_trailing_effects import AppearanceTrailingEffects +from .appearance_entityor_object_state import AppearanceEntityorObjectState +from .cover_shroud_status import CoverShroudStatus + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 36, marshal size 32, + * MunitionAppearance + */ + +""" + +class MunitionAppearanceBitField(ctypes.Structure): + _fields_ = [ + # (bit position 3, length=2) Describes the damaged appearance, use {@link AppearanceDamage} values for this field + ("_damage", UByte, 2), + + # (bit position 5, boolean) Describes whether or not smoke or vapor is emanating from the entity, use {@link UInt8} values for this field + ("_isSmokeVaporEmanating", UByte, 1), + + # (bit position 6, boolean) Describes whether or not the engine is emitting smoke, use {@link UInt8} values for this field + ("_isEngineEmittingSmoke", UByte, 1), + + # (bit position 7, length=2) Describes the size of the vapor trail, use {@link AppearanceTrailingEffects} values for this field + ("_vaporTrailSize", UByte, 2), + + # (bit position 15, boolean) Describes whether the entity is burning and flames are visible, use {@link UInt8} values for this field + ("_isFlaming", UByte, 1), + + # (bit position 16, boolean) Describes whether or not the guided munition's launch flash is present, use {@link UInt8} values for this field + ("_launchFlashPresent", UByte, 1), + + # (bit position 21, boolean) Describes whether the entity is frozen and should not be dead reckoned, use {@link UInt8} values for this field + ("_isFrozen", UByte, 1), + + # (bit position 22, boolean) Describes whether the power plant is on or off, use {@link UInt8} values for this field + ("_powerPlantOn", UByte, 1), + + # (bit position 23, boolean) Describes whether the entity is active or deactivated, use {@link AppearanceEntityorObjectState} values for this field + ("_state", UByte, 1), + + # (bit position 24, length=2) Describes the status of the cover or shroud, use {@link CoverShroudStatus} values for this field + ("_coverShroudStatus", UByte, 2), + + # (bit position 31, boolean) Describes whether or not the entity is masked or cloaked, use {@link UInt8} values for this field + ("_maskedCloaked", UByte, 1) + ] + +class MunitionAppearance(ctypes.Union): + _fields_ = [ + ("capabilities", MunitionAppearanceBitField), + ("asbyte", UInt8) + ] + + def set_damage(self, value : AppearanceDamage): + self.capabilities._damage = int(value) + def get_damage(self) -> AppearanceDamage: + return AppearanceDamage.get_enum(self._damage) + Damage = property(get_damage, set_damage) + + def set_isSmokeVaporEmanating(self, value : UInt8): + self.capabilities._isSmokeVaporEmanating = int(value) + def get_isSmokeVaporEmanating(self) -> UInt8: + return self.capabilities._isSmokeVaporEmanating + IsSmokeVaporEmanating = property(get_isSmokeVaporEmanating, set_isSmokeVaporEmanating) + + def set_isEngineEmittingSmoke(self, value : UInt8): + self.capabilities._isEngineEmittingSmoke = int(value) + def get_isEngineEmittingSmoke(self) -> UInt8: + return self.capabilities._isEngineEmittingSmoke + IsEngineEmittingSmoke = property(get_isEngineEmittingSmoke, set_isEngineEmittingSmoke) + + def set_vaporTrailSize(self, value : AppearanceTrailingEffects): + self.capabilities._vaporTrailSize = int(value) + def get_vaporTrailSize(self) -> AppearanceTrailingEffects: + return AppearanceTrailingEffects.get_enum(self._vaporTrailSize) + VaporTrailSize = property(get_vaporTrailSize, set_vaporTrailSize) + + def set_isFlaming(self, value : UInt8): + self.capabilities._isFlaming = int(value) + def get_isFlaming(self) -> UInt8: + return self.capabilities._isFlaming + IsFlaming = property(get_isFlaming, set_isFlaming) + + def set_launchFlashPresent(self, value : UInt8): + self.capabilities._launchFlashPresent = int(value) + def get_launchFlashPresent(self) -> UInt8: + return self.capabilities._launchFlashPresent + LaunchFlashPresent = property(get_launchFlashPresent, set_launchFlashPresent) + + def set_isFrozen(self, value : UInt8): + self.capabilities._isFrozen = int(value) + def get_isFrozen(self) -> UInt8: + return self.capabilities._isFrozen + IsFrozen = property(get_isFrozen, set_isFrozen) + + def set_powerPlantOn(self, value : UInt8): + self.capabilities._powerPlantOn = int(value) + def get_powerPlantOn(self) -> UInt8: + return self.capabilities._powerPlantOn + PowerPlantOn = property(get_powerPlantOn, set_powerPlantOn) + + def set_state(self, value : AppearanceEntityorObjectState): + self.capabilities._state = int(value) + def get_state(self) -> AppearanceEntityorObjectState: + return AppearanceEntityorObjectState.get_enum(self._state) + State = property(get_state, set_state) + + def set_coverShroudStatus(self, value : CoverShroudStatus): + self.capabilities._coverShroudStatus = int(value) + def get_coverShroudStatus(self) -> CoverShroudStatus: + return CoverShroudStatus.get_enum(self._coverShroudStatus) + CoverShroudStatus = property(get_coverShroudStatus, set_coverShroudStatus) + + def set_maskedCloaked(self, value : UInt8): + self.capabilities._maskedCloaked = int(value) + def get_maskedCloaked(self) -> UInt8: + return self.capabilities._maskedCloaked + MaskedCloaked = property(get_maskedCloaked, set_maskedCloaked) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Damage : " + self.Damage.get_description + "\n" + outputStream += "IsSmokeVaporEmanating : " + str(self.IsSmokeVaporEmanating) + "\n" + outputStream += "IsEngineEmittingSmoke : " + str(self.IsEngineEmittingSmoke) + "\n" + outputStream += "VaporTrailSize : " + self.VaporTrailSize.get_description + "\n" + outputStream += "IsFlaming : " + str(self.IsFlaming) + "\n" + outputStream += "LaunchFlashPresent : " + str(self.LaunchFlashPresent) + "\n" + outputStream += "IsFrozen : " + str(self.IsFrozen) + "\n" + outputStream += "PowerPlantOn : " + str(self.PowerPlantOn) + "\n" + outputStream += "State : " + self.State.get_description + "\n" + outputStream += "CoverShroudStatus : " + self.CoverShroudStatus.get_description + "\n" + outputStream += "MaskedCloaked : " + str(self.MaskedCloaked) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/munition_capabilities.py b/dis/siso_ref_010/enums/munition_capabilities.py new file mode 100644 index 0000000..fd3c6f3 --- /dev/null +++ b/dis/siso_ref_010/enums/munition_capabilities.py @@ -0,0 +1,98 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 455, marshal size 32, + * MunitionCapabilities + */ + +""" + +class MunitionCapabilitiesBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=5) This entry is reserved for backward compatibility and may not be reused, use {@link UInt8} values for this field + ("_reserved", UByte, 5), + + # (bit position 7, boolean) The Entity is an IED or contains an IED. The extended appearance record (if available) will identify how well hidden the IED is on the Entity. An Attached Part (if applicable, for instance a jury-rigged munition does not apply here) will identify the IED explicitly., use {@link UInt8} values for this field + ("_iEDPresenceIndicator", UByte, 1) + ] + +class MunitionCapabilities(ctypes.Union): + _fields_ = [ + ("capabilities", MunitionCapabilitiesBitField), + ("asbyte", UInt8) + ] + + def set_reserved(self, value : UInt8): + self.capabilities._reserved = int(value) + def get_reserved(self) -> UInt8: + return self.capabilities._reserved + Reserved = property(get_reserved, set_reserved) + + def set_iEDPresenceIndicator(self, value : UInt8): + self.capabilities._iEDPresenceIndicator = int(value) + def get_iEDPresenceIndicator(self) -> UInt8: + return self.capabilities._iEDPresenceIndicator + IEDPresenceIndicator = property(get_iEDPresenceIndicator, set_iEDPresenceIndicator) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Reserved : " + str(self.Reserved) + "\n" + outputStream += "IEDPresenceIndicator : " + str(self.IEDPresenceIndicator) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/munition_category.py b/dis/siso_ref_010/enums/munition_category.py new file mode 100644 index 0000000..f7afc32 --- /dev/null +++ b/dis/siso_ref_010/enums/munition_category.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 15, + * marshal size 8; + * MunitionCategory has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MunitionCategory(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + guided = EnumValue(1, "Guided") + ballistic = EnumValue(2, "Ballistic") + fixed = EnumValue(3, "Fixed") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/munition_descriptor_fuse.py b/dis/siso_ref_010/enums/munition_descriptor_fuse.py new file mode 100644 index 0000000..015094e --- /dev/null +++ b/dis/siso_ref_010/enums/munition_descriptor_fuse.py @@ -0,0 +1,242 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 61, + * marshal size 16; + * MunitionDescriptorFuse has 107 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MunitionDescriptorFuse(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + intelligent_influence = EnumValue(10, "Intelligent Influence") + sensor = EnumValue(20, "Sensor") + self_destruct = EnumValue(30, "Self-destruct") + ultra_quick = EnumValue(40, "Ultra Quick") + body = EnumValue(50, "Body") + deep_intrusion = EnumValue(60, "Deep Intrusion") + multifunction = EnumValue(100, "Multifunction") + point_detonation_pd = EnumValue(200, "Point Detonation (PD)") + base_detonation_bd = EnumValue(300, "Base Detonation (BD)") + contact = EnumValue(1000, "Contact") + contact_instant_impact = EnumValue(1100, "Contact, Instant (Impact)") + contact_delayed = EnumValue(1200, "Contact, Delayed") + _10_ms_delay = EnumValue(1201, "10 ms Delay") + _20_ms_delay = EnumValue(1202, "20 ms Delay") + _50_ms_delay = EnumValue(1205, "50 ms Delay") + _60_ms_delay = EnumValue(1206, "60 ms Delay") + _100_ms_delay = EnumValue(1210, "100 ms Delay") + _125_ms_delay = EnumValue(1212, "125 ms Delay") + _250_ms_delay = EnumValue(1225, "250 ms Delay") + _5_ms_delay = EnumValue(1250, "5 ms Delay") + _15_ms_delay = EnumValue(1251, "15 ms Delay") + _25_ms_delay = EnumValue(1252, "25 ms Delay") + _30_ms_delay = EnumValue(1253, "30 ms Delay") + _35_ms_delay = EnumValue(1254, "35 ms Delay") + _40_ms_delay = EnumValue(1255, "40 ms Delay") + _45_ms_delay = EnumValue(1256, "45 ms Delay") + _90_ms_delay = EnumValue(1257, "90 ms Delay") + _120_ms_delay = EnumValue(1258, "120 ms Delay") + _180_ms_delay = EnumValue(1259, "180 ms Delay") + _240_ms_delay = EnumValue(1260, "240 ms Delay") + contact_electronic_oblique_contact = EnumValue(1300, "Contact, Electronic (Oblique Contact)") + contact_graze = EnumValue(1400, "Contact, Graze") + contact_crush = EnumValue(1500, "Contact, Crush") + contact_hydrostatic = EnumValue(1600, "Contact, Hydrostatic") + contact_mechanical = EnumValue(1700, "Contact, Mechanical") + contact_chemical = EnumValue(1800, "Contact, Chemical") + contact_piezoelectric = EnumValue(1900, "Contact, Piezoelectric") + contact_point_initiating = EnumValue(1910, "Contact, Point Initiating") + contact_point_initiating_base_detonating = EnumValue(1920, "Contact, Point Initiating, Base Detonating") + contact_base_detonating = EnumValue(1930, "Contact, Base Detonating") + contact_ballistic_cap_and_base = EnumValue(1940, "Contact, Ballistic Cap and Base") + contact_base = EnumValue(1950, "Contact, Base") + contact_nose = EnumValue(1960, "Contact, Nose") + contact_fitted_in_standoff_probe = EnumValue(1970, "Contact, Fitted in Standoff Probe") + contact_non_aligned = EnumValue(1980, "Contact, Non-aligned") + timed = EnumValue(2000, "Timed") + timed_programmable = EnumValue(2100, "Timed, Programmable") + timed_burnout = EnumValue(2200, "Timed, Burnout") + timed_pyrotechnic = EnumValue(2300, "Timed, Pyrotechnic") + timed_electronic = EnumValue(2400, "Timed, Electronic") + timed_base_delay = EnumValue(2500, "Timed, Base Delay") + timed_reinforced_nose_impact_delay = EnumValue(2600, "Timed, Reinforced Nose Impact Delay") + timed_short_delay_impact = EnumValue(2700, "Timed, Short Delay Impact") + _10_ms_delay_2 = EnumValue(2701, "10 ms Delay") + _20_ms_delay_2 = EnumValue(2702, "20 ms Delay") + _50_ms_delay_2 = EnumValue(2705, "50 ms Delay") + _60_ms_delay_2 = EnumValue(2706, "60 ms Delay") + _100_ms_delay_2 = EnumValue(2710, "100 ms Delay") + _125_ms_delay_2 = EnumValue(2712, "125 ms Delay") + _250_ms_delay_2 = EnumValue(2725, "250 ms Delay") + timed_nose_mounted_variable_delay = EnumValue(2800, "Timed, Nose Mounted Variable Delay") + timed_long_delay_side = EnumValue(2900, "Timed, Long Delay Side") + timed_selectable_delay = EnumValue(2910, "Timed, Selectable Delay") + timed_impact = EnumValue(2920, "Timed, Impact") + timed_sequence = EnumValue(2930, "Timed, Sequence") + proximity = EnumValue(3000, "Proximity") + proximity_active_laser = EnumValue(3100, "Proximity, Active Laser") + proximity_magnetic_magpolarity = EnumValue(3200, "Proximity, Magnetic (Magpolarity)") + proximity_active_radar_doppler_radar = EnumValue(3300, "Proximity, Active Radar (Doppler Radar)") + proximity_radio_frequency_rf = EnumValue(3400, "Proximity, Radio Frequency (RF)") + proximity_programmable = EnumValue(3500, "Proximity, Programmable") + proximity_programmable_prefragmented = EnumValue(3600, "Proximity, Programmable, Prefragmented") + proximity_infrared = EnumValue(3700, "Proximity, Infrared") + command = EnumValue(4000, "Command") + command_electronic_remotely_set = EnumValue(4100, "Command, Electronic, Remotely Set") + altitude = EnumValue(5000, "Altitude") + altitude_radio_altimeter = EnumValue(5100, "Altitude, Radio Altimeter") + altitude_air_burst = EnumValue(5200, "Altitude, Air Burst") + depth = EnumValue(6000, "Depth") + acoustic = EnumValue(7000, "Acoustic") + pressure = EnumValue(8000, "Pressure") + pressure_delay = EnumValue(8010, "Pressure, Delay") + inert = EnumValue(8100, "Inert") + dummy = EnumValue(8110, "Dummy") + practice = EnumValue(8120, "Practice") + plug_representing = EnumValue(8130, "Plug Representing") + training = EnumValue(8150, "Training") + pyrotechnic = EnumValue(9000, "Pyrotechnic") + pyrotechnic_delay = EnumValue(9010, "Pyrotechnic, Delay") + electro_optical = EnumValue(9100, "Electro-optical") + electromechanical = EnumValue(9110, "Electromechanical") + electromechanical_nose = EnumValue(9120, "Electromechanical, Nose") + strikerless = EnumValue(9200, "Strikerless") + strikerless_nose_impact = EnumValue(9210, "Strikerless, Nose Impact") + strikerless_compression_ignition = EnumValue(9220, "Strikerless, Compression-Ignition") + compression_ignition = EnumValue(9300, "Compression-Ignition") + compression_ignition_strikerless_nose_impact = EnumValue(9310, "Compression-Ignition, Strikerless, Nose Impact") + percussion = EnumValue(9400, "Percussion") + percussion_instantaneous = EnumValue(9410, "Percussion, Instantaneous") + electronic = EnumValue(9500, "Electronic") + electronic_internally_mounted = EnumValue(9510, "Electronic, Internally Mounted") + electronic_range_setting = EnumValue(9520, "Electronic, Range Setting") + electronic_programmed = EnumValue(9530, "Electronic, Programmed") + mechanical = EnumValue(9600, "Mechanical") + mechanical_nose = EnumValue(9610, "Mechanical, Nose") + mechanical_tail = EnumValue(9620, "Mechanical, Tail") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/munition_descriptor_warhead.py b/dis/siso_ref_010/enums/munition_descriptor_warhead.py new file mode 100644 index 0000000..0c6dc59 --- /dev/null +++ b/dis/siso_ref_010/enums/munition_descriptor_warhead.py @@ -0,0 +1,231 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 60, + * marshal size 16; + * MunitionDescriptorWarhead has 96 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MunitionDescriptorWarhead(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + cargo_variable_submunitions = EnumValue(10, "Cargo (Variable Submunitions)") + fuel_air_explosive = EnumValue(20, "Fuel/Air Explosive") + glass_beads = EnumValue(30, "Glass Beads") + _1_um = EnumValue(31, "1 um") + _5_um = EnumValue(32, "5 um") + _10_um = EnumValue(33, "10 um") + high_explosive_he = EnumValue(1000, "High Explosive (HE)") + he_plastic = EnumValue(1100, "HE, Plastic") + he_incendiary = EnumValue(1200, "HE, Incendiary") + he_fragmentation = EnumValue(1300, "HE, Fragmentation") + he_anti_tank = EnumValue(1400, "HE, Anti-Tank") + he_bomblets = EnumValue(1500, "HE, Bomblets") + he_shaped_charge = EnumValue(1600, "HE, Shaped Charge") + he_continuous_rod = EnumValue(1610, "HE, Continuous Rod") + he_tungsten_ball = EnumValue(1615, "HE, Tungsten Ball") + he_blast_fragmentation = EnumValue(1620, "HE, Blast Fragmentation") + he_steerable_darts_with_he = EnumValue(1625, "HE, Steerable Darts with HE") + he_darts = EnumValue(1630, "HE, Darts") + he_flechettes = EnumValue(1635, "HE, Flechettes") + he_directed_fragmentation = EnumValue(1640, "HE, Directed Fragmentation") + he_semi_armor_piercing_sap = EnumValue(1645, "HE, Semi-Armor Piercing (SAP)") + he_shaped_charge_fragmentation = EnumValue(1650, "HE, Shaped Charge Fragmentation") + he_semi_armor_piercing_fragmentation = EnumValue(1655, "HE, Semi-Armor Piercing, Fragmentation") + he_hollow_charge = EnumValue(1660, "HE, Hollow Charge") + he_double_hollow_charge = EnumValue(1665, "HE, Double Hollow Charge") + he_general_purpose = EnumValue(1670, "HE, General Purpose") + he_blast_penetrator = EnumValue(1675, "HE, Blast Penetrator") + he_rod_penetrator = EnumValue(1680, "HE, Rod Penetrator") + he_anti_personnel = EnumValue(1685, "HE, Anti-Personnel") + he_shaped_charge_fragmentation_incendiary = EnumValue(1690, "HE, Shaped Charge, Fragmentation, Incendiary") + he_penetrator_blast_fragmentation = EnumValue(1695, "HE, Penetrator, Blast, Fragmentation") + smoke = EnumValue(2000, "Smoke") + wp_white_phosphorus = EnumValue(2005, "WP (White Phosphorus)") + fogo_fog_oil = EnumValue(2010, "FOGO (Fog Oil)") + hc_hexachloroethane = EnumValue(2015, "HC (HexaChloroEthane)") + illumination = EnumValue(3000, "Illumination") + practice = EnumValue(4000, "Practice") + blank = EnumValue(4001, "Blank") + dummy = EnumValue(4002, "Dummy") + kinetic = EnumValue(5000, "Kinetic") + mines = EnumValue(6000, "Mines") + nuclear = EnumValue(7000, "Nuclear") + nuclear_imt = EnumValue(7010, "Nuclear, IMT") + chemical_general = EnumValue(8000, "Chemical, General") + chemical_blister_agent = EnumValue(8100, "Chemical, Blister Agent") + hd_mustard = EnumValue(8110, "HD (Mustard)") + thickened_hd_mustard = EnumValue(8115, "Thickened HD (Mustard)") + dusty_hd_mustard = EnumValue(8120, "Dusty HD (Mustard)") + l_lewisite = EnumValue(8125, "L (Lewisite)") + hn3_nitrogen_mustard = EnumValue(8130, "HN3 (Nitrogen Mustard)") + hl_mustard_lewisite = EnumValue(8135, "HL (Mustard/Lewisite)") + cx_phosgene_oxime = EnumValue(8140, "CX (Phosgene Oxime)") + dmmp_phosphate_dimethyl_hydrogen = EnumValue(8145, "DMMP (Phosphate Dimethyl Hydrogen)") + dmhp_phosphite = EnumValue(8150, "DMHP (Phosphite)") + dma_dimethyl_acrylate = EnumValue(8155, "DMA (Dimethyl Acrylate)") + dem = EnumValue(8160, "DEM") + px_p_xlene = EnumValue(8165, "PX (P-xlene)") + chemical_blood_agent = EnumValue(8200, "Chemical, Blood Agent") + ac_hcn = EnumValue(8210, "AC (HCN)") + ck_cnci = EnumValue(8215, "CK (CNCI)") + cg_phosgene = EnumValue(8220, "CG (Phosgene)") + chemical_nerve_agent = EnumValue(8300, "Chemical, Nerve Agent") + vx = EnumValue(8310, "VX") + thickened_vx = EnumValue(8315, "Thickened VX") + dusty_vx = EnumValue(8320, "Dusty VX") + ga_tabun = EnumValue(8325, "GA (Tabun)") + thickened_ga_tabun = EnumValue(8330, "Thickened GA (Tabun)") + dusty_ga_tabun = EnumValue(8335, "Dusty GA (Tabun)") + gb_sarin = EnumValue(8340, "GB (Sarin)") + thickened_gb_sarin = EnumValue(8345, "Thickened GB (Sarin)") + dusty_gb_sarin = EnumValue(8350, "Dusty GB (Sarin)") + gd_soman = EnumValue(8355, "GD (Soman)") + thickened_gd_soman = EnumValue(8360, "Thickened GD (Soman)") + dusty_gd_soman = EnumValue(8365, "Dusty GD (Soman)") + gf = EnumValue(8370, "GF") + thickened_gf = EnumValue(8375, "Thickened GF") + dusty_gf = EnumValue(8380, "Dusty GF") + svx_soviet_vx = EnumValue(8385, "SVX (Soviet VX)") + bis = EnumValue(8410, "BIS") + tcp = EnumValue(8415, "TCP") + ms_methyl_salicylate = EnumValue(8425, "MS (Methyl Salicylate)") + tep = EnumValue(8430, "TEP") + h2o_water = EnumValue(8445, "H2O (Water)") + to1_toxic_organic_1 = EnumValue(8450, "TO1 (Toxic Organic 1)") + to2_toxic_organic_2 = EnumValue(8455, "TO2 (Toxic Organic 2)") + to3_toxic_organic_3 = EnumValue(8460, "TO3 (Toxic Organic 3)") + sulfur_hexafluoride = EnumValue(8465, "Sulfur Hexafluoride") + aa_acetic_acid = EnumValue(8470, "AA (Acetic Acid)") + hf_hydrofluoric_acid = EnumValue(8475, "HF (Hydrofluoric Acid)") + biological = EnumValue(9000, "Biological") + biological_virus = EnumValue(9100, "Biological, Virus") + biological_bacteria = EnumValue(9200, "Biological, Bacteria") + biological_rickettsia = EnumValue(9300, "Biological, Rickettsia") + biological_genetically_modified_micro_organisms = EnumValue(9400, "Biological, Genetically Modified Micro-organisms") + biological_toxin = EnumValue(9500, "Biological, Toxin") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/munition_domain.py b/dis/siso_ref_010/enums/munition_domain.py new file mode 100644 index 0000000..d5066d9 --- /dev/null +++ b/dis/siso_ref_010/enums/munition_domain.py @@ -0,0 +1,148 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 14, + * marshal size 8; + * MunitionDomain has 13 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MunitionDomain(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + anti_air = EnumValue(1, "Anti-Air") + anti_armor = EnumValue(2, "Anti-Armor") + anti_guided_weapon = EnumValue(3, "Anti-Guided Weapon") + anti_radar = EnumValue(4, "Anti-Radar") + anti_satellite = EnumValue(5, "Anti-Satellite") + anti_ship = EnumValue(6, "Anti-Ship") + anti_submarine = EnumValue(7, "Anti-Submarine") + anti_personnel = EnumValue(8, "Anti-Personnel") + battlefield_support = EnumValue(9, "Battlefield Support") + strategic = EnumValue(10, "Strategic") + tactical = EnumValue(11, "Tactical") + directed_energy_de_weapon = EnumValue(12, "Directed Energy (DE) Weapon") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/munition_expendable_status.py b/dis/siso_ref_010/enums/munition_expendable_status.py new file mode 100644 index 0000000..37d6633 --- /dev/null +++ b/dis/siso_ref_010/enums/munition_expendable_status.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 327, + * marshal size 8; + * MunitionExpendableStatus has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class MunitionExpendableStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + ready = EnumValue(1, "Ready") + inventory = EnumValue(2, "Inventory") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/navigation_source.py b/dis/siso_ref_010/enums/navigation_source.py new file mode 100644 index 0000000..099af28 --- /dev/null +++ b/dis/siso_ref_010/enums/navigation_source.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 359, + * marshal size 8; + * NavigationSource has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class NavigationSource(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + gps = EnumValue(1, "GPS") + ins = EnumValue(2, "INS") + ins_gps = EnumValue(3, "INS/GPS") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/netidrecord_frequency_table.py b/dis/siso_ref_010/enums/netidrecord_frequency_table.py new file mode 100644 index 0000000..6f77f24 --- /dev/null +++ b/dis/siso_ref_010/enums/netidrecord_frequency_table.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 299, + * marshal size 2; + * NETIDRecordFrequencyTable has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class NETIDRecordFrequencyTable(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + hq_i_operations = EnumValue(0, "HQ I Operations") + hqii_nato_europe_area_operations = EnumValue(1, "HQII - NATO/Europe Area Operations") + hqii_non_nato_europe_area_operations = EnumValue(2, "HQII - Non-NATO/Europe Area Operations") + saturn_operations = EnumValue(3, "SATURN Operations") + default = hq_i_operations + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/netidrecord_mode.py b/dis/siso_ref_010/enums/netidrecord_mode.py new file mode 100644 index 0000000..936d2e5 --- /dev/null +++ b/dis/siso_ref_010/enums/netidrecord_mode.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 298, + * marshal size 2; + * NETIDRecordMode has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class NETIDRecordMode(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + a_have_quick_i_or_have_quick_ii_combat = EnumValue(1, "A - HAVE QUICK I or HAVE QUICK II COMBAT") + b_saturn_combat = EnumValue(2, "B - SATURN COMBAT") + t_training = EnumValue(3, "T - TRAINING") + default = a_have_quick_i_or_have_quick_ii_combat + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/non_human_life_forms_appearance.py b/dis/siso_ref_010/enums/non_human_life_forms_appearance.py new file mode 100644 index 0000000..e8f8881 --- /dev/null +++ b/dis/siso_ref_010/enums/non_human_life_forms_appearance.py @@ -0,0 +1,120 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_lifeform_health import AppearanceLifeformHealth +from .appearance_entityor_object_state import AppearanceEntityorObjectState + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 480, marshal size 32, + * NonHumanLifeFormsAppearance + */ + +""" + +class NonHumanLifeFormsAppearanceBitField(ctypes.Structure): + _fields_ = [ + # (bit position 3, length=2) Describes the visual appearance of the severity of any injury, use {@link AppearanceLifeformHealth} values for this field + ("_health", UByte, 2), + + # (bit position 21, boolean) Describes whether the entity is frozen and should not be dead reckoned, use {@link UInt8} values for this field + ("_isFrozen", UByte, 1), + + # (bit position 22, boolean) Describes whether or not the life form is mounted/hoisted on another platform, such as a troop transport or helicopter hoist, use {@link UInt8} values for this field + ("_mountedHoistedStatus", UByte, 1), + + # (bit position 23, boolean) Describes whether the entity is active or deactivated, use {@link AppearanceEntityorObjectState} values for this field + ("_state", UByte, 1) + ] + +class NonHumanLifeFormsAppearance(ctypes.Union): + _fields_ = [ + ("capabilities", NonHumanLifeFormsAppearanceBitField), + ("asbyte", UInt8) + ] + + def set_health(self, value : AppearanceLifeformHealth): + self.capabilities._health = int(value) + def get_health(self) -> AppearanceLifeformHealth: + return AppearanceLifeformHealth.get_enum(self._health) + Health = property(get_health, set_health) + + def set_isFrozen(self, value : UInt8): + self.capabilities._isFrozen = int(value) + def get_isFrozen(self) -> UInt8: + return self.capabilities._isFrozen + IsFrozen = property(get_isFrozen, set_isFrozen) + + def set_mountedHoistedStatus(self, value : UInt8): + self.capabilities._mountedHoistedStatus = int(value) + def get_mountedHoistedStatus(self) -> UInt8: + return self.capabilities._mountedHoistedStatus + MountedHoistedStatus = property(get_mountedHoistedStatus, set_mountedHoistedStatus) + + def set_state(self, value : AppearanceEntityorObjectState): + self.capabilities._state = int(value) + def get_state(self) -> AppearanceEntityorObjectState: + return AppearanceEntityorObjectState.get_enum(self._state) + State = property(get_state, set_state) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Health : " + self.Health.get_description + "\n" + outputStream += "IsFrozen : " + str(self.IsFrozen) + "\n" + outputStream += "MountedHoistedStatus : " + str(self.MountedHoistedStatus) + "\n" + outputStream += "State : " + self.State.get_description + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/object_kind.py b/dis/siso_ref_010/enums/object_kind.py new file mode 100644 index 0000000..4287176 --- /dev/null +++ b/dis/siso_ref_010/enums/object_kind.py @@ -0,0 +1,144 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 225, + * marshal size 8; + * ObjectKind has 9 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ObjectKind(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + obstacle = EnumValue(1, "Obstacle") + prepared_position = EnumValue(2, "Prepared Position") + cultural_feature = EnumValue(3, "Cultural Feature") + passageway = EnumValue(4, "Passageway") + tactical_smoke = EnumValue(5, "Tactical Smoke") + obstacle_marker = EnumValue(6, "Obstacle Marker") + obstacle_breach = EnumValue(7, "Obstacle Breach") + environmental_object = EnumValue(8, "Environmental Object") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/object_state_appearance_general.py b/dis/siso_ref_010/enums/object_state_appearance_general.py new file mode 100644 index 0000000..9366f31 --- /dev/null +++ b/dis/siso_ref_010/enums/object_state_appearance_general.py @@ -0,0 +1,152 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_object_general_damage import AppearanceObjectGeneralDamage +from .appearance_object_general_predistributed import AppearanceObjectGeneralPredistributed +from .appearance_entityor_object_state import AppearanceEntityorObjectState +from .appearance_object_general_iedpresent import AppearanceObjectGeneralIEDPresent + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 229, marshal size 16, + * ObjectStateAppearanceGeneral + */ + +""" + +class ObjectStateAppearanceGeneralBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=8) 8-bit unsigned integer indicating the percent completion of the object (0..100), use {@link UInt8} values for this field + ("_percentComplete", UByte, 8), + + # (bit position 8, length=2) Describes the damaged appearance, use {@link AppearanceObjectGeneralDamage} values for this field + ("_damage", UByte, 2), + + # (bit position 10, boolean) Describes whether the object was predistributed, use {@link AppearanceObjectGeneralPredistributed} values for this field + ("_predistributed", UByte, 1), + + # (bit position 11, boolean) Describes the state of the object, use {@link AppearanceEntityorObjectState} values for this field + ("_state", UByte, 1), + + # (bit position 12, boolean) Describes whether or not there is a smoke plume, use {@link UInt8} values for this field + ("_isSmoking", UByte, 1), + + # (bit position 13, boolean) Describes whether the object is burning and flames are visible, use {@link UInt8} values for this field + ("_isFlaming", UByte, 1), + + # (bit position 14, length=2) Describes whether the object has or contains an IED, use {@link AppearanceObjectGeneralIEDPresent} values for this field + ("_iEDPresent", UByte, 2) + ] + +class ObjectStateAppearanceGeneral(ctypes.Union): + _fields_ = [ + ("capabilities", ObjectStateAppearanceGeneralBitField), + ("asbyte", UInt8) + ] + + def set_percentComplete(self, value : UInt8): + self.capabilities._percentComplete = int(value) + def get_percentComplete(self) -> UInt8: + return self.capabilities._percentComplete + PercentComplete = property(get_percentComplete, set_percentComplete) + + def set_damage(self, value : AppearanceObjectGeneralDamage): + self.capabilities._damage = int(value) + def get_damage(self) -> AppearanceObjectGeneralDamage: + return AppearanceObjectGeneralDamage.get_enum(self._damage) + Damage = property(get_damage, set_damage) + + def set_predistributed(self, value : AppearanceObjectGeneralPredistributed): + self.capabilities._predistributed = int(value) + def get_predistributed(self) -> AppearanceObjectGeneralPredistributed: + return AppearanceObjectGeneralPredistributed.get_enum(self._predistributed) + Predistributed = property(get_predistributed, set_predistributed) + + def set_state(self, value : AppearanceEntityorObjectState): + self.capabilities._state = int(value) + def get_state(self) -> AppearanceEntityorObjectState: + return AppearanceEntityorObjectState.get_enum(self._state) + State = property(get_state, set_state) + + def set_isSmoking(self, value : UInt8): + self.capabilities._isSmoking = int(value) + def get_isSmoking(self) -> UInt8: + return self.capabilities._isSmoking + IsSmoking = property(get_isSmoking, set_isSmoking) + + def set_isFlaming(self, value : UInt8): + self.capabilities._isFlaming = int(value) + def get_isFlaming(self) -> UInt8: + return self.capabilities._isFlaming + IsFlaming = property(get_isFlaming, set_isFlaming) + + def set_iEDPresent(self, value : AppearanceObjectGeneralIEDPresent): + self.capabilities._iEDPresent = int(value) + def get_iEDPresent(self) -> AppearanceObjectGeneralIEDPresent: + return AppearanceObjectGeneralIEDPresent.get_enum(self._iEDPresent) + IEDPresent = property(get_iEDPresent, set_iEDPresent) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "PercentComplete : " + str(self.PercentComplete) + "\n" + outputStream += "Damage : " + self.Damage.get_description + "\n" + outputStream += "Predistributed : " + self.Predistributed.get_description + "\n" + outputStream += "State : " + self.State.get_description + "\n" + outputStream += "IsSmoking : " + str(self.IsSmoking) + "\n" + outputStream += "IsFlaming : " + str(self.IsFlaming) + "\n" + outputStream += "IEDPresent : " + self.IEDPresent.get_description + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/object_state_modification_areal_object.py b/dis/siso_ref_010/enums/object_state_modification_areal_object.py new file mode 100644 index 0000000..63b9920 --- /dev/null +++ b/dis/siso_ref_010/enums/object_state_modification_areal_object.py @@ -0,0 +1,88 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 242, marshal size 16, + * ObjectStateModificationArealObject + */ + +""" + +class ObjectStateModificationArealObjectBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes whether any locations of the areal object have been modified since the last update number, use {@link UInt8} values for this field + ("_isLocationModified", UByte, 1) + ] + +class ObjectStateModificationArealObject(ctypes.Union): + _fields_ = [ + ("capabilities", ObjectStateModificationArealObjectBitField), + ("asbyte", UInt8) + ] + + def set_isLocationModified(self, value : UInt8): + self.capabilities._isLocationModified = int(value) + def get_isLocationModified(self) -> UInt8: + return self.capabilities._isLocationModified + IsLocationModified = property(get_isLocationModified, set_isLocationModified) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "IsLocationModified : " + str(self.IsLocationModified) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/object_state_modification_linear_object.py b/dis/siso_ref_010/enums/object_state_modification_linear_object.py new file mode 100644 index 0000000..94a778a --- /dev/null +++ b/dis/siso_ref_010/enums/object_state_modification_linear_object.py @@ -0,0 +1,98 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 241, marshal size 16, + * ObjectStateModificationLinearObject + */ + +""" + +class ObjectStateModificationLinearObjectBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes whether the location of the linear segment has been modified since the last update number, use {@link UInt8} values for this field + ("_isLocationModified", UByte, 1), + + # (bit position 1, boolean) Describes whether the orientation of the linear segment has been modified since the last update number, use {@link UInt8} values for this field + ("_isOrientationModified", UByte, 1) + ] + +class ObjectStateModificationLinearObject(ctypes.Union): + _fields_ = [ + ("capabilities", ObjectStateModificationLinearObjectBitField), + ("asbyte", UInt8) + ] + + def set_isLocationModified(self, value : UInt8): + self.capabilities._isLocationModified = int(value) + def get_isLocationModified(self) -> UInt8: + return self.capabilities._isLocationModified + IsLocationModified = property(get_isLocationModified, set_isLocationModified) + + def set_isOrientationModified(self, value : UInt8): + self.capabilities._isOrientationModified = int(value) + def get_isOrientationModified(self) -> UInt8: + return self.capabilities._isOrientationModified + IsOrientationModified = property(get_isOrientationModified, set_isOrientationModified) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "IsLocationModified : " + str(self.IsLocationModified) + "\n" + outputStream += "IsOrientationModified : " + str(self.IsOrientationModified) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/object_state_modification_point_object.py b/dis/siso_ref_010/enums/object_state_modification_point_object.py new file mode 100644 index 0000000..99369c7 --- /dev/null +++ b/dis/siso_ref_010/enums/object_state_modification_point_object.py @@ -0,0 +1,98 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 240, marshal size 16, + * ObjectStateModificationPointObject + */ + +""" + +class ObjectStateModificationPointObjectBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes whether the point object location has been modified since the last update number, use {@link UInt8} values for this field + ("_isLocationModified", UByte, 1), + + # (bit position 1, boolean) Describes whether the point object orientation has been modified since the last update number, use {@link UInt8} values for this field + ("_isOrientationModified", UByte, 1) + ] + +class ObjectStateModificationPointObject(ctypes.Union): + _fields_ = [ + ("capabilities", ObjectStateModificationPointObjectBitField), + ("asbyte", UInt8) + ] + + def set_isLocationModified(self, value : UInt8): + self.capabilities._isLocationModified = int(value) + def get_isLocationModified(self) -> UInt8: + return self.capabilities._isLocationModified + IsLocationModified = property(get_isLocationModified, set_isLocationModified) + + def set_isOrientationModified(self, value : UInt8): + self.capabilities._isOrientationModified = int(value) + def get_isOrientationModified(self) -> UInt8: + return self.capabilities._isOrientationModified + IsOrientationModified = property(get_isOrientationModified, set_isOrientationModified) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "IsLocationModified : " + str(self.IsLocationModified) + "\n" + outputStream += "IsOrientationModified : " + str(self.IsOrientationModified) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/ownership_status.py b/dis/siso_ref_010/enums/ownership_status.py new file mode 100644 index 0000000..03ae7d2 --- /dev/null +++ b/dis/siso_ref_010/enums/ownership_status.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 332, + * marshal size 8; + * OwnershipStatus has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class OwnershipStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + new_owner = EnumValue(1, "New Owner") + ownership_query_response = EnumValue(2, "Ownership Query Response") + ownership_conflict = EnumValue(3, "Ownership Conflict") + local_entity_cancelled_auto_resolve_conflict = EnumValue(4, "Local Entity Cancelled - Auto Resolve Conflict") + local_entity_cancelled_manual_resolve_conflict = EnumValue(5, "Local Entity Cancelled - Manual Resolve Conflict") + local_entity_cancelled_remove_entity_tcr_received = EnumValue(6, "Local Entity Cancelled - Remove Entity TCR Received") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/parachute.py b/dis/siso_ref_010/enums/parachute.py new file mode 100644 index 0000000..132ef49 --- /dev/null +++ b/dis/siso_ref_010/enums/parachute.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 401, + * marshal size 2; + * Parachute has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Parachute(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + none = EnumValue(0, "None") + deployed = EnumValue(1, "Deployed") + collapsed = EnumValue(2, "Collapsed") + malfunction_streamer = EnumValue(3, "Malfunction/Streamer") + default = none + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/physical_association_type_groups.py b/dis/siso_ref_010/enums/physical_association_type_groups.py new file mode 100644 index 0000000..54d4a57 --- /dev/null +++ b/dis/siso_ref_010/enums/physical_association_type_groups.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 322, + * marshal size 8; + * PhysicalAssociationTypeGroups has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class PhysicalAssociationTypeGroups(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_specified = EnumValue(0, "Not Specified") + towed_mounted_sling_load = EnumValue(1, "Towed / Mounted / Sling Load") + restrained = EnumValue(2, "Restrained") + mission = EnumValue(3, "Mission") + other_connections = EnumValue(4, "Other Connections") + default = not_specified + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_air_category.py b/dis/siso_ref_010/enums/platform_air_category.py new file mode 100644 index 0000000..f0d0e9c --- /dev/null +++ b/dis/siso_ref_010/enums/platform_air_category.py @@ -0,0 +1,182 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 10, + * marshal size 8; + * PlatformAirCategory has 34 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class PlatformAirCategory(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + fighter_air_defense = EnumValue(1, "Fighter/Air Defense") + attack_strike = EnumValue(2, "Attack/Strike") + bomber = EnumValue(3, "Bomber") + cargo_tanker = EnumValue(4, "Cargo/Tanker") + asw_patrol_observation = EnumValue(5, "ASW/Patrol/Observation") + electronic_warfare_ew = EnumValue(6, "Electronic Warfare (EW)") + reconnaissance = EnumValue(7, "Reconnaissance") + surveillance_c2_airborne_early_warning = EnumValue(8, "Surveillance/C2 (Airborne Early Warning)") + air_sea_rescue_asr = EnumValue(9, "Air-Sea Rescue (ASR)") + attack_helicopter = EnumValue(20, "Attack Helicopter") + utility_helicopter = EnumValue(21, "Utility Helicopter") + anti_submarine_warfare_patrol_helicopter = EnumValue(22, "Anti-Submarine Warfare/Patrol Helicopter") + cargo_helicopter = EnumValue(23, "Cargo Helicopter") + observation_helicopter = EnumValue(24, "Observation Helicopter") + special_operations_helicopter = EnumValue(25, "Special Operations Helicopter") + training_helicopter = EnumValue(26, "Training Helicopter") + trainer = EnumValue(40, "Trainer") + unmanned = EnumValue(50, "Unmanned") + non_combatant_commercial_aircraft = EnumValue(57, "Non-Combatant Commercial Aircraft") + # XREF UID 274 - CLASS PlatformAirCivilianUltralightNonrigidWingAircraftSubcategories + civilian_ultralight_aircraft_non_rigid_wing = EnumValue(80, "Civilian Ultralight Aircraft, Non-rigid Wing") + # XREF UID 275 - CLASS PlatformAirCivilianUltralightRigidWingAircraftSubcategories + civilian_ultralight_aircraft_rigid_wing = EnumValue(81, "Civilian Ultralight Aircraft, Rigid Wing") + # XREF UID 276 - CLASS PlatformAirCivilianGliderSubcategories + civilian_fixed_wing_aircraft_glider = EnumValue(83, "Civilian Fixed Wing Aircraft, Glider") + # XREF UID 277 - CLASS PlatformAirCivilianFixedWingAircraftSubcategories + civilian_fixed_wing_aircraft_light_sport_up_to_1320_lbs_600_kg = EnumValue(84, "Civilian Fixed Wing Aircraft, Light Sport (up to 1320 lbs / 600 kg)") + # XREF UID 277 - CLASS PlatformAirCivilianFixedWingAircraftSubcategories + civilian_fixed_wing_aircraft_small_up_to_12_500_lbs_5_670_kg = EnumValue(85, "Civilian Fixed Wing Aircraft, Small (up to 12,500 lbs / 5,670 kg)") + # XREF UID 277 - CLASS PlatformAirCivilianFixedWingAircraftSubcategories + civilian_fixed_wing_aircraft_medium_up_to_41_000_lbs_18_597_kg = EnumValue(86, "Civilian Fixed Wing Aircraft, Medium (up to 41,000 lbs / 18,597 kg)") + # XREF UID 277 - CLASS PlatformAirCivilianFixedWingAircraftSubcategories + civilian_fixed_wing_aircraft_large_up_to_255_000_lbs_115_666_kg = EnumValue(87, "Civilian Fixed Wing Aircraft, Large (up to 255,000 lbs / 115,666 kg)") + # XREF UID 277 - CLASS PlatformAirCivilianFixedWingAircraftSubcategories + civilian_fixed_wing_aircraft_heavy_above_255_000_lbs_115_666_kg = EnumValue(88, "Civilian Fixed Wing Aircraft, Heavy (above 255,000 lbs / 115,666 kg)") + # XREF UID 278 - CLASS PlatformAirCivilianHelicopterSubcategories + civilian_helicopter_small_up_to_7_000_lbs_3_175_kg = EnumValue(90, "Civilian Helicopter, Small (up to 7,000 lbs / 3,175 kg)") + # XREF UID 278 - CLASS PlatformAirCivilianHelicopterSubcategories + civilian_helicopter_medium_up_to_20_000_lbs_9_072_kg = EnumValue(91, "Civilian Helicopter, Medium (up to 20,000 lbs / 9,072 kg)") + # XREF UID 278 - CLASS PlatformAirCivilianHelicopterSubcategories + civilian_helicopter_large_above_20_000_lbs_9_072_kg = EnumValue(92, "Civilian Helicopter, Large (above 20,000 lbs / 9,072 kg)") + civilian_autogyro = EnumValue(93, "Civilian Autogyro") + # XREF UID 279 - CLASS PlatformAirCivilianLighterthanAirBalloonSubcategories + civilian_lighter_than_air_balloon = EnumValue(100, "Civilian Lighter than Air, Balloon") + # XREF UID 280 - CLASS PlatformAirCivilianLighterthanAirAirshipSubcategories + civilian_lighter_than_air_airship = EnumValue(101, "Civilian Lighter than Air, Airship") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_air_civilian_fixed_wing_aircraft_subcategories.py b/dis/siso_ref_010/enums/platform_air_civilian_fixed_wing_aircraft_subcategories.py new file mode 100644 index 0000000..2b82cdc --- /dev/null +++ b/dis/siso_ref_010/enums/platform_air_civilian_fixed_wing_aircraft_subcategories.py @@ -0,0 +1,123 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 277, marshal size 8; + * PlatformAirCivilianFixedWingAircraftSubcategories has 8 enumerations total. + * Subcategories for Air Platform Categories 84-88. Subcategory values have the type of engine in the 10's digit and the number of engines in the 1's digit. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformAirCivilianFixedWingAircraftSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + single_piston_engine = EnumValue(11, "Single Piston Engine") + twin_piston_engine = EnumValue(12, "Twin Piston Engine") + single_engine_turboprop = EnumValue(21, "Single Engine Turboprop") + twin_engine_turboprop = EnumValue(22, "Twin Engine Turboprop") + four_engine_turboprop = EnumValue(24, "Four Engine Turboprop") + twin_jet = EnumValue(32, "Twin Jet") + tri_jet = EnumValue(33, "Tri Jet") + four_engine_jet = EnumValue(34, "Four Engine Jet") + default = single_piston_engine + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_air_civilian_glider_subcategories.py b/dis/siso_ref_010/enums/platform_air_civilian_glider_subcategories.py new file mode 100644 index 0000000..974dc8a --- /dev/null +++ b/dis/siso_ref_010/enums/platform_air_civilian_glider_subcategories.py @@ -0,0 +1,117 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 276, marshal size 8; + * PlatformAirCivilianGliderSubcategories has 2 enumerations total. + * Subcategories for Air Platform Category 83 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformAirCivilianGliderSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + sail_plane = EnumValue(1, "Sail Plane") + motor_glider = EnumValue(2, "Motor Glider") + default = sail_plane + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_air_civilian_helicopter_subcategories.py b/dis/siso_ref_010/enums/platform_air_civilian_helicopter_subcategories.py new file mode 100644 index 0000000..9b6bb57 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_air_civilian_helicopter_subcategories.py @@ -0,0 +1,122 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 278, marshal size 8; + * PlatformAirCivilianHelicopterSubcategories has 7 enumerations total. + * Subcategories for Air Platform Categories 90-92. Subcategory values have the number of rotors in the 10's digit and the rotor configuration in the 1's digit. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformAirCivilianHelicopterSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + single_rotor_piston_engine = EnumValue(11, "Single Rotor, Piston Engine") + single_rotor_turboshaft_engine_conventional_tail_rotor = EnumValue(12, "Single Rotor, Turboshaft Engine, Conventional Tail Rotor") + single_rotor_turboshaft_engine_shrouded_tail_rotor = EnumValue(13, "Single Rotor, Turboshaft Engine, Shrouded Tail Rotor") + single_rotor_turboshaft_engine_no_tail_rotor = EnumValue(14, "Single Rotor, Turboshaft Engine, No Tail Rotor") + tandem_rotor = EnumValue(21, "Tandem Rotor") + coaxial_rotor = EnumValue(22, "Coaxial Rotor") + intermeshing_rotor = EnumValue(23, "Intermeshing Rotor") + default = single_rotor_piston_engine + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_air_civilian_lighterthan_air_airship_subcategories.py b/dis/siso_ref_010/enums/platform_air_civilian_lighterthan_air_airship_subcategories.py new file mode 100644 index 0000000..6034251 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_air_civilian_lighterthan_air_airship_subcategories.py @@ -0,0 +1,119 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 280, marshal size 8; + * PlatformAirCivilianLighterthanAirAirshipSubcategories has 4 enumerations total. + * Subcategories for Air Platform Category 101 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformAirCivilianLighterthanAirAirshipSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + non_rigid_blimp = EnumValue(1, "Non-rigid (blimp)") + semi_rigid = EnumValue(2, "Semi-rigid") + rigid = EnumValue(3, "Rigid") + hybrid = EnumValue(4, "Hybrid") + default = non_rigid_blimp + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_air_civilian_lighterthan_air_balloon_subcategories.py b/dis/siso_ref_010/enums/platform_air_civilian_lighterthan_air_balloon_subcategories.py new file mode 100644 index 0000000..341b073 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_air_civilian_lighterthan_air_balloon_subcategories.py @@ -0,0 +1,120 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 279, marshal size 8; + * PlatformAirCivilianLighterthanAirBalloonSubcategories has 5 enumerations total. + * Subcategories for Air Platform Category 100 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformAirCivilianLighterthanAirBalloonSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + gas_filled_free = EnumValue(1, "Gas-filled, free") + gas_filled_tethered = EnumValue(2, "Gas-filled, tethered") + hot_air = EnumValue(3, "Hot Air") + roziere_balloon = EnumValue(4, "Roziere Balloon") + helikite = EnumValue(5, "Helikite") + default = gas_filled_free + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_air_civilian_ultralight_nonrigid_wing_aircraft_subcategories.py b/dis/siso_ref_010/enums/platform_air_civilian_ultralight_nonrigid_wing_aircraft_subcategories.py new file mode 100644 index 0000000..ea90624 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_air_civilian_ultralight_nonrigid_wing_aircraft_subcategories.py @@ -0,0 +1,120 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 274, marshal size 8; + * PlatformAirCivilianUltralightNonrigidWingAircraftSubcategories has 5 enumerations total. + * Subcategories for Air Platform Category 80 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformAirCivilianUltralightNonrigidWingAircraftSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + hang_glider_unpowered = EnumValue(1, "Hang Glider, Unpowered") + hang_glider_powered = EnumValue(2, "Hang Glider, Powered") + paraglider_unpowered = EnumValue(3, "Paraglider, Unpowered") + paraglider_powered = EnumValue(4, "Paraglider, Powered") + powered_parachute = EnumValue(5, "Powered Parachute") + default = hang_glider_unpowered + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_air_civilian_ultralight_rigid_wing_aircraft_subcategories.py b/dis/siso_ref_010/enums/platform_air_civilian_ultralight_rigid_wing_aircraft_subcategories.py new file mode 100644 index 0000000..35c92cd --- /dev/null +++ b/dis/siso_ref_010/enums/platform_air_civilian_ultralight_rigid_wing_aircraft_subcategories.py @@ -0,0 +1,117 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 275, marshal size 8; + * PlatformAirCivilianUltralightRigidWingAircraftSubcategories has 2 enumerations total. + * Subcategories for Air Platform Category 81 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformAirCivilianUltralightRigidWingAircraftSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + weight_shift_control = EnumValue(1, "Weight-shift control") + control_surface_elevator_rudder_aileron_control = EnumValue(2, "Control surface (elevator, rudder, aileron) control") + default = weight_shift_control + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_domain.py b/dis/siso_ref_010/enums/platform_domain.py new file mode 100644 index 0000000..35cb978 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_domain.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 8, + * marshal size 8; + * PlatformDomain has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class PlatformDomain(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + land = EnumValue(1, "Land") + air = EnumValue(2, "Air") + surface = EnumValue(3, "Surface") + subsurface = EnumValue(4, "Subsurface") + space = EnumValue(5, "Space") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_land_bus_subcategories.py b/dis/siso_ref_010/enums/platform_land_bus_subcategories.py new file mode 100644 index 0000000..b947c4a --- /dev/null +++ b/dis/siso_ref_010/enums/platform_land_bus_subcategories.py @@ -0,0 +1,134 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 429, marshal size 8; + * PlatformLandBusSubcategories has 19 enumerations total. + * Subcategories for Land Platform Category 82 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformLandBusSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + commuter_flat_nose = EnumValue(1, "Commuter (Flat Nose)") + commuter_snout_nose = EnumValue(2, "Commuter (Snout Nose)") + shuttle = EnumValue(3, "Shuttle") + double_decker = EnumValue(4, "Double Decker") + guided = EnumValue(5, "Guided") + kneeling = EnumValue(6, "Kneeling") + midibus = EnumValue(7, "Midibus") + minibus = EnumValue(8, "Minibus") + mini_wheelchair = EnumValue(9, "Mini Wheelchair") + motorcoach = EnumValue(10, "Motorcoach") + prison_bus = EnumValue(11, "Prison Bus") + schoolbus = EnumValue(12, "Schoolbus") + school_wheelchair = EnumValue(13, "School Wheelchair") + tour = EnumValue(14, "Tour") + tram_parking_lot = EnumValue(15, "Tram Parking Lot") + trolley = EnumValue(16, "Trolley") + airport_transport = EnumValue(17, "Airport Transport") + articulated_multi_unit = EnumValue(18, "Articulated (Multi-Unit)") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_land_car_subcategories.py b/dis/siso_ref_010/enums/platform_land_car_subcategories.py new file mode 100644 index 0000000..1512d92 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_land_car_subcategories.py @@ -0,0 +1,159 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 428, marshal size 8; + * PlatformLandCarSubcategories has 44 enumerations total. + * Subcategories for Land Platform Category 81. Subcategory values have the general form/style in the 10's/100's digits and the size in the 1's digit. A zero in the 1's digit indicates an unspecified size. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformLandCarSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + generic = EnumValue(10, "Generic") + generic_mini_microcar_tiny = EnumValue(11, "Generic, Mini/Microcar (Tiny)") + generic_economy_compact_small = EnumValue(12, "Generic, Economy/Compact (Small)") + generic_intermediate_standard_medium = EnumValue(13, "Generic, Intermediate/Standard (Medium)") + generic_full_premium_luxury_large = EnumValue(14, "Generic, Full/Premium/Luxury (Large)") + generic_oversize = EnumValue(15, "Generic, Oversize") + _2_door_coupe = EnumValue(20, "2-Door (Coupe)") + _2_door_coupe_mini_microcar_tiny = EnumValue(21, "2-Door (Coupe), Mini/Microcar (Tiny)") + _2_door_coupe_economy_compact_small = EnumValue(22, "2-Door (Coupe), Economy/Compact (Small)") + _2_door_coupe_intermediate_standard_medium = EnumValue(23, "2-Door (Coupe), Intermediate/Standard (Medium)") + _3_door_hatchback = EnumValue(30, "3-Door Hatchback") + _3_door_hatchback_mini_microcar_tiny = EnumValue(31, "3-Door Hatchback, Mini/Microcar (Tiny)") + _3_door_hatchback_economy_compact_small = EnumValue(32, "3-Door Hatchback, Economy/Compact (Small)") + _4_door_sedan = EnumValue(40, "4-Door Sedan") + _4_door_sedan_mini_microcar_tiny = EnumValue(41, "4-Door Sedan, Mini/Microcar (Tiny)") + _4_door_sedan_economy_compact_small = EnumValue(42, "4-Door Sedan, Economy/Compact (Small)") + _4_door_sedan_intermediate_standard_medium = EnumValue(43, "4-Door Sedan, Intermediate/Standard (Medium)") + _4_door_sedan_full_premium_luxury_large = EnumValue(44, "4-Door Sedan, Full/Premium/Luxury (Large)") + _4_door_sedan_oversize = EnumValue(45, "4-Door Sedan, Oversize") + _5_door_hatchback = EnumValue(50, "5-Door Hatchback") + _5_door_hatchback_mini_microcar_tiny = EnumValue(51, "5-Door Hatchback, Mini/Microcar (Tiny)") + _5_door_hatchback_economy_compact_small = EnumValue(52, "5-Door Hatchback, Economy/Compact (Small)") + _5_door_hatchback_intermediate_standard_medium = EnumValue(53, "5-Door Hatchback, Intermediate/Standard (Medium)") + _5_door_hatchback_full_premium_luxury_large = EnumValue(54, "5-Door Hatchback, Full/Premium/Luxury (Large)") + wagon = EnumValue(60, "Wagon") + wagon_economy_compact_small = EnumValue(62, "Wagon, Economy/Compact (Small)") + wagon_intermediate_standard_medium = EnumValue(63, "Wagon, Intermediate/Standard (Medium)") + wagon_full_premium_luxury_large = EnumValue(64, "Wagon, Full/Premium/Luxury (Large)") + minivan = EnumValue(70, "Minivan") + limousine = EnumValue(80, "Limousine") + limousine_full_premium_luxury_large = EnumValue(84, "Limousine, Full/Premium/Luxury (Large)") + limousine_oversize = EnumValue(85, "Limousine, Oversize") + sports_high_performance = EnumValue(90, "Sports (High Performance)") + convertible = EnumValue(100, "Convertible") + convertible_mini_microcar_tiny = EnumValue(101, "Convertible, Mini/Microcar (Tiny)") + convertible_economy_compact_small = EnumValue(102, "Convertible, Economy/Compact (Small)") + convertible_intermediate_standard_medium = EnumValue(103, "Convertible, Intermediate/Standard (Medium)") + convertible_full_premium_luxury_large = EnumValue(104, "Convertible, Full/Premium/Luxury (Large)") + sports_utility_vehicle_suv = EnumValue(110, "Sports Utility Vehicle (SUV)") + sports_utility_vehicle_suv_economy_compact_small = EnumValue(112, "Sports Utility Vehicle (SUV), Economy/Compact (Small)") + sports_utility_vehicle_suv_intermediate_standard_medium = EnumValue(113, "Sports Utility Vehicle (SUV), Intermediate/Standard (Medium)") + sports_utility_vehicle_suv_full_premium_luxury_large = EnumValue(114, "Sports Utility Vehicle (SUV), Full/Premium/Luxury (Large)") + sports_utility_vehicle_suv_oversize = EnumValue(115, "Sports Utility Vehicle (SUV), Oversize") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_land_category.py b/dis/siso_ref_010/enums/platform_land_category.py new file mode 100644 index 0000000..868889b --- /dev/null +++ b/dis/siso_ref_010/enums/platform_land_category.py @@ -0,0 +1,206 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 9, + * marshal size 8; + * PlatformLandCategory has 57 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class PlatformLandCategory(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + tank = EnumValue(1, "Tank") + armored_fighting_vehicle = EnumValue(2, "Armored Fighting Vehicle") + armored_utility_vehicle = EnumValue(3, "Armored Utility Vehicle") + self_propelled_artillery = EnumValue(4, "Self-Propelled Artillery") + towed_artillery = EnumValue(5, "Towed Artillery") + small_wheeled_utility_vehicle = EnumValue(6, "Small Wheeled Utility Vehicle") + large_wheeled_utility_vehicle = EnumValue(7, "Large Wheeled Utility Vehicle") + small_tracked_utility_vehicle = EnumValue(8, "Small Tracked Utility Vehicle") + large_tracked_utility_vehicle = EnumValue(9, "Large Tracked Utility Vehicle") + mortar = EnumValue(10, "Mortar") + mine_plow = EnumValue(11, "Mine Plow") + mine_rake = EnumValue(12, "Mine Rake") + mine_roller = EnumValue(13, "Mine Roller") + cargo_trailer = EnumValue(14, "Cargo Trailer") + fuel_trailer = EnumValue(15, "Fuel Trailer") + generator_trailer = EnumValue(16, "Generator Trailer") + water_trailer = EnumValue(17, "Water Trailer") + engineer_equipment = EnumValue(18, "Engineer Equipment") + heavy_equipment_transport_trailer = EnumValue(19, "Heavy Equipment Transport Trailer") + maintenance_equipment_trailer = EnumValue(20, "Maintenance Equipment Trailer") + limber = EnumValue(21, "Limber") + chemical_decontamination_trailer = EnumValue(22, "Chemical Decontamination Trailer") + warning_system = EnumValue(23, "Warning System") + train_engine = EnumValue(24, "Train - Engine") + train_car = EnumValue(25, "Train - Car") + train_caboose = EnumValue(26, "Train - Caboose") + civilian_vehicle = EnumValue(27, "Civilian Vehicle") + air_defense_missile_defense_unit_equipment = EnumValue(28, "Air Defense / Missile Defense Unit Equipment") + command_control_communications_and_intelligence_c3i_system = EnumValue(29, "Command, Control, Communications, and Intelligence (C3I) System") + operations_facility = EnumValue(30, "Operations Facility") + intelligence_facility = EnumValue(31, "Intelligence Facility") + surveillance_facility = EnumValue(32, "Surveillance Facility") + communications_facility = EnumValue(33, "Communications Facility") + command_facility = EnumValue(34, "Command Facility") + c4i_facility = EnumValue(35, "C4I Facility") + control_facility = EnumValue(36, "Control Facility") + fire_control_facility = EnumValue(37, "Fire Control Facility") + missile_defense_facility = EnumValue(38, "Missile Defense Facility") + field_command_post = EnumValue(39, "Field Command Post") + observation_post = EnumValue(40, "Observation Post") + mine_flail = EnumValue(41, "Mine Flail") + unmanned = EnumValue(50, "Unmanned") + # XREF UID 427 - CLASS PlatformLandMotorcycleSubcategories + motorcycle = EnumValue(80, "Motorcycle") + # XREF UID 428 - CLASS PlatformLandCarSubcategories + car = EnumValue(81, "Car") + # XREF UID 429 - CLASS PlatformLandBusSubcategories + bus = EnumValue(82, "Bus") + # XREF UID 430 - CLASS PlatformLandSingleUnitCargoTruckSubcategories + single_unit_cargo_truck = EnumValue(83, "Single Unit Cargo Truck") + # XREF UID 431 - CLASS PlatformLandSingleUnitUtilityEmergencyTruckSubcategories + single_unit_utility_emergency_truck = EnumValue(84, "Single Unit Utility/Emergency Truck") + # XREF UID 432 - CLASS PlatformLandMultipleUnitCargoTruckSubcategories + multiple_unit_cargo_truck = EnumValue(85, "Multiple Unit Cargo Truck") + # XREF UID 433 - CLASS PlatformLandMultipleUnitUtilityEmergencyTruckSubcategories + multiple_unit_utility_emergency_truck = EnumValue(86, "Multiple Unit Utility/Emergency Truck") + # XREF UID 434 - CLASS PlatformLandConstructionSpecialtyVehicleSubcategories + construction_specialty_vehicle = EnumValue(87, "Construction Specialty Vehicle") + # XREF UID 435 - CLASS PlatformLandFarmSpecialtyVehicleSubcategories + farm_specialty_vehicle = EnumValue(88, "Farm Specialty Vehicle") + # XREF UID 436 - CLASS PlatformLandTrailerSubcategories + trailer = EnumValue(89, "Trailer") + # XREF UID 437 - CLASS PlatformLandRecreationalSubcategories + recreational = EnumValue(90, "Recreational") + # XREF UID 438 - CLASS PlatformLandNonmotorizedSubcategories + non_motorized = EnumValue(91, "Non-motorized") + # XREF UID 439 - CLASS PlatformLandTrainsSubcategories + trains = EnumValue(92, "Trains") + # XREF UID 440 - CLASS PlatformLandUtilityEmergencyCarSubcategories + utility_emergency_car = EnumValue(93, "Utility/Emergency Car") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_land_construction_specialty_vehicle_subcategories.py b/dis/siso_ref_010/enums/platform_land_construction_specialty_vehicle_subcategories.py new file mode 100644 index 0000000..2f53c03 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_land_construction_specialty_vehicle_subcategories.py @@ -0,0 +1,171 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 434, marshal size 8; + * PlatformLandConstructionSpecialtyVehicleSubcategories has 56 enumerations total. + * Subcategories for Land Platform Category 87 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformLandConstructionSpecialtyVehicleSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + tug = EnumValue(1, "Tug") + forklift = EnumValue(2, "Forklift") + loader = EnumValue(3, "Loader") + loader_backhoe = EnumValue(4, "Loader, Backhoe") + crane_tractor_mounted = EnumValue(5, "Crane, Tractor Mounted") + crane_wheeled = EnumValue(6, "Crane, Wheeled") + grader = EnumValue(7, "Grader") + road_roller_other = EnumValue(8, "Road Roller, Other") + road_roller_double_drum_smooth = EnumValue(9, "Road Roller, Double Drum, Smooth") + road_roller_single_drum_smooth = EnumValue(10, "Road Roller, Single Drum, Smooth") + road_roller_double_drum_sheeps = EnumValue(11, "Road Roller, Double Drum, Sheeps") + road_roller_single_drum_sheeps = EnumValue(12, "Road Roller, Single Drum, Sheeps") + road_roller_pneumatic_tired = EnumValue(13, "Road Roller, Pneumatic Tired") + excavator_other = EnumValue(14, "Excavator, Other") + excavator_dragline = EnumValue(15, "Excavator, Dragline") + excavator_long_reach = EnumValue(16, "Excavator, Long Reach") + excavator_mobile_tire = EnumValue(17, "Excavator, Mobile Tire") + mini_excavator = EnumValue(18, "Mini Excavator") + excavator_giant = EnumValue(19, "Excavator Giant") + bulldozer_tractor_mounted = EnumValue(20, "Bulldozer, Tractor Mounted") + bulldozer_tracked = EnumValue(21, "Bulldozer, Tracked") + scraper = EnumValue(22, "Scraper") + skid_steer = EnumValue(23, "Skid Steer") + dump_truck_other = EnumValue(24, "Dump Truck, Other") + dump_truck_articulated = EnumValue(25, "Dump Truck, Articulated") + dump_truck_transfer = EnumValue(26, "Dump Truck, Transfer") + dump_truck_super = EnumValue(27, "Dump Truck, Super") + dump_truck_off_road = EnumValue(28, "Dump Truck, Off Road") + paver = EnumValue(29, "Paver") + drilling_machine = EnumValue(30, "Drilling Machine") + concrete_mixer_other = EnumValue(31, "Concrete Mixer, Other") + concrete_mixer_rear_discharge = EnumValue(32, "Concrete Mixer, Rear Discharge") + concrete_mixer_front_discharge = EnumValue(33, "Concrete Mixer, Front Discharge") + concrete_mixer_six_axle = EnumValue(34, "Concrete Mixer, Six Axle") + concrete_mixer_long_reach_boom = EnumValue(35, "Concrete Mixer, Long Reach Boom") + concrete_mixer_volumetric = EnumValue(36, "Concrete Mixer, Volumetric") + trencher_chain = EnumValue(37, "Trencher, Chain") + trencher_rockwheel = EnumValue(38, "Trencher, Rockwheel") + snowcat = EnumValue(39, "Snowcat") + crane_tracked = EnumValue(40, "Crane, Tracked") + crane_shovel = EnumValue(41, "Crane, Shovel") + sweeper_rotary = EnumValue(42, "Sweeper, Rotary") + roller_vibratory_compactor = EnumValue(43, "Roller, Vibratory Compactor") + fork_lift_truck = EnumValue(44, "Fork Lift, Truck") + fork_lift_rought_terrain = EnumValue(45, "Fork Lift, Rought Terrain") + transloader = EnumValue(46, "Transloader") + truck_water_construction = EnumValue(47, "Truck, Water, Construction") + truck_fuel_delivery = EnumValue(48, "Truck, Fuel Delivery") + truck_sawmill = EnumValue(49, "Truck, Sawmill") + truck_line_marking_construction = EnumValue(50, "Truck, Line Marking, Construction") + tractor_industrial = EnumValue(51, "Tractor, Industrial") + compactor_high_speed = EnumValue(52, "Compactor, High Speed") + truck_drilling = EnumValue(53, "Truck, Drilling") + truck_drilling_support = EnumValue(54, "Truck, Drilling Support") + crane_construction = EnumValue(55, "Crane, Construction") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_land_farm_specialty_vehicle_subcategories.py b/dis/siso_ref_010/enums/platform_land_farm_specialty_vehicle_subcategories.py new file mode 100644 index 0000000..c1a7eea --- /dev/null +++ b/dis/siso_ref_010/enums/platform_land_farm_specialty_vehicle_subcategories.py @@ -0,0 +1,124 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 435, marshal size 8; + * PlatformLandFarmSpecialtyVehicleSubcategories has 9 enumerations total. + * Subcategories for Land Platform Category 88 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformLandFarmSpecialtyVehicleSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + tractor = EnumValue(1, "Tractor") + harvester_reaper = EnumValue(2, "Harvester/Reaper") + skidder = EnumValue(3, "Skidder") + forwarder = EnumValue(4, "Forwarder") + lawn_mower_other = EnumValue(5, "Lawn Mower, Other") + lawn_mower_riding = EnumValue(6, "Lawn Mower, Riding") + lawn_mower_standing = EnumValue(7, "Lawn Mower, Standing") + lawn_mower_push = EnumValue(8, "Lawn Mower, Push") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_land_motorcycle_subcategories.py b/dis/siso_ref_010/enums/platform_land_motorcycle_subcategories.py new file mode 100644 index 0000000..1bf9caf --- /dev/null +++ b/dis/siso_ref_010/enums/platform_land_motorcycle_subcategories.py @@ -0,0 +1,123 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 427, marshal size 8; + * PlatformLandMotorcycleSubcategories has 8 enumerations total. + * Subcategories for Land Platform Category 80 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformLandMotorcycleSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + scooter_small = EnumValue(1, "Scooter (Small)") + sport_street_mid_size = EnumValue(2, "Sport/Street (Mid-Size)") + cruiser_large = EnumValue(3, "Cruiser (Large)") + dirt_bike = EnumValue(4, "Dirt Bike") + standard = EnumValue(5, "Standard") + touring = EnumValue(6, "Touring") + dual_purpose = EnumValue(7, "Dual Purpose") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_land_multiple_unit_cargo_truck_subcategories.py b/dis/siso_ref_010/enums/platform_land_multiple_unit_cargo_truck_subcategories.py new file mode 100644 index 0000000..387ce2f --- /dev/null +++ b/dis/siso_ref_010/enums/platform_land_multiple_unit_cargo_truck_subcategories.py @@ -0,0 +1,118 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 432, marshal size 8; + * PlatformLandMultipleUnitCargoTruckSubcategories has 3 enumerations total. + * Subcategories for Land Platform Category 85 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformLandMultipleUnitCargoTruckSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + tractor_trailer = EnumValue(1, "Tractor Trailer") + tanker = EnumValue(2, "Tanker") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_land_multiple_unit_utility_emergency_truck_subcategories.py b/dis/siso_ref_010/enums/platform_land_multiple_unit_utility_emergency_truck_subcategories.py new file mode 100644 index 0000000..e14e277 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_land_multiple_unit_utility_emergency_truck_subcategories.py @@ -0,0 +1,117 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 433, marshal size 8; + * PlatformLandMultipleUnitUtilityEmergencyTruckSubcategories has 2 enumerations total. + * Subcategories for Land Platform Category 86 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformLandMultipleUnitUtilityEmergencyTruckSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + fire_engine_hook_and_ladder = EnumValue(1, "Fire Engine, Hook And Ladder") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_land_nonmotorized_subcategories.py b/dis/siso_ref_010/enums/platform_land_nonmotorized_subcategories.py new file mode 100644 index 0000000..8bbf1f9 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_land_nonmotorized_subcategories.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 438, marshal size 8; + * PlatformLandNonmotorizedSubcategories has 25 enumerations total. + * Subcategories for Land Platform Category 91 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformLandNonmotorizedSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + unicycle = EnumValue(1, "Unicycle") + bicycle = EnumValue(2, "Bicycle") + bicycle_mountain = EnumValue(3, "Bicycle, Mountain") + bicycle_racing = EnumValue(4, "Bicycle, Racing") + tricycle = EnumValue(5, "Tricycle") + quadricycle = EnumValue(6, "Quadricycle") + rickshaw_two_person = EnumValue(7, "Rickshaw, Two Person") + rickshaw_one_person = EnumValue(8, "Rickshaw, One Person") + tandem_bicycle = EnumValue(9, "Tandem Bicycle") + cycle_trailer = EnumValue(10, "Cycle Trailer") + cycle_sidecar = EnumValue(11, "Cycle Sidecar") + sled = EnumValue(12, "Sled") + skis = EnumValue(13, "Skis") + snowboard = EnumValue(14, "Snowboard") + skateboard = EnumValue(15, "Skateboard") + skates = EnumValue(16, "Skates") + skates_in_line = EnumValue(17, "Skates, In-Line") + wagon_cart = EnumValue(18, "Wagon Cart") + dolly = EnumValue(19, "Dolly") + handtruck = EnumValue(20, "Handtruck") + push_cart = EnumValue(21, "Push Cart") + wheelbarrow = EnumValue(22, "Wheelbarrow") + kick_scooter = EnumValue(23, "Kick Scooter") + wheelchair = EnumValue(24, "Wheelchair") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_land_recreational_subcategories.py b/dis/siso_ref_010/enums/platform_land_recreational_subcategories.py new file mode 100644 index 0000000..69db45d --- /dev/null +++ b/dis/siso_ref_010/enums/platform_land_recreational_subcategories.py @@ -0,0 +1,130 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 437, marshal size 8; + * PlatformLandRecreationalSubcategories has 15 enumerations total. + * Subcategories for Land Platform Category 90 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformLandRecreationalSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + atv_2x4 = EnumValue(1, "ATV, 2X4") + atv_4x4 = EnumValue(2, "ATV, 4X4") + atv_6x6 = EnumValue(3, "ATV, 6X6") + atv_3_wheeled = EnumValue(4, "ATV, 3-wheeled") + toy_other = EnumValue(5, "Toy, Other") + toy_car = EnumValue(6, "Toy, Car") + toy_atv = EnumValue(7, "Toy, ATV") + golf_cart = EnumValue(8, "Golf Cart") + snowmobile = EnumValue(9, "Snowmobile") + recreational_vehicle = EnumValue(10, "Recreational Vehicle") + recreational_vehicle_type_a_motorhome = EnumValue(11, "Recreational Vehicle, Type A Motorhome") + recreational_vehicle_type_b_motorhome = EnumValue(12, "Recreational Vehicle, Type B Motorhome") + recreational_vehicle_type_c_motorhome = EnumValue(13, "Recreational Vehicle, Type C Motorhome") + conversion_van = EnumValue(14, "Conversion Van") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_land_single_unit_cargo_truck_subcategories.py b/dis/siso_ref_010/enums/platform_land_single_unit_cargo_truck_subcategories.py new file mode 100644 index 0000000..d755f20 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_land_single_unit_cargo_truck_subcategories.py @@ -0,0 +1,147 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 430, marshal size 8; + * PlatformLandSingleUnitCargoTruckSubcategories has 32 enumerations total. + * Subcategories for Land Platform Category 83 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformLandSingleUnitCargoTruckSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + pickup_truck_mini = EnumValue(1, "Pickup Truck, Mini") + pickup_truck_mid_size = EnumValue(2, "Pickup Truck, Mid-Size") + pickup_truck_full_size = EnumValue(3, "Pickup Truck, Full-Size") + pickup_truck_crew_cab = EnumValue(4, "Pickup Truck, Crew Cab") + pickup_truck_extended_cab = EnumValue(5, "Pickup Truck, Extended Cab") + pickup_truck_long_bed = EnumValue(6, "Pickup Truck, Long Bed") + pickup_truck_cab_forward = EnumValue(7, "Pickup Truck, Cab Forward") + cargo_truck = EnumValue(10, "Cargo Truck") + cargo_truck_up_to_25_ton = EnumValue(11, "Cargo Truck, up to 2.5 Ton") + cargo_truck_up_to_5_ton = EnumValue(12, "Cargo Truck, up to 5 Ton") + cargo_truck_up_to_75_ton = EnumValue(13, "Cargo Truck, up to 7.5 Ton") + cargo_truck_up_to_10_ton = EnumValue(14, "Cargo Truck, up to 10 Ton") + cargo_truck_over_10_ton = EnumValue(15, "Cargo Truck, over 10 Ton") + tanker = EnumValue(20, "Tanker") + semi_trailer_cab_w_o_trailer = EnumValue(30, "Semi-Trailer Cab (w/o Trailer)") + van = EnumValue(70, "Van") + van_extended = EnumValue(71, "Van, Extended") + van_compact = EnumValue(72, "Van, Compact") + van_wheelchair = EnumValue(73, "Van, Wheelchair") + van_delivery = EnumValue(74, "Van, Delivery") + delivery_truck = EnumValue(100, "Delivery Truck") + delivery_truck_box = EnumValue(101, "Delivery Truck, Box") + delivery_truck_flatbed = EnumValue(102, "Delivery Truck, Flatbed") + delivery_truck_stake_bed = EnumValue(103, "Delivery Truck, Stake Bed") + mess_truck = EnumValue(104, "Mess Truck") + truck_palletised_load_system_pls = EnumValue(105, "Truck, Palletised Load System (PLS)") + truck_petroleum_oil_and_lubricants_pol_palletised_load_system_pls = EnumValue(106, "Truck, Petroleum, Oil, and Lubricants (POL) Palletised Load System (PLS)") + truck_petroleum_oil_and_lubricants_pol_surveillance = EnumValue(107, "Truck, Petroleum, Oil, and Lubricants (POL), Surveillance") + refrigerated_truck_small = EnumValue(108, "Refrigerated Truck, Small") + refrigerated_truck_medium = EnumValue(109, "Refrigerated Truck, Medium") + refrigerated_truck_large = EnumValue(110, "Refrigerated Truck, Large") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_land_single_unit_utility_emergency_truck_subcategories.py b/dis/siso_ref_010/enums/platform_land_single_unit_utility_emergency_truck_subcategories.py new file mode 100644 index 0000000..bc476a8 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_land_single_unit_utility_emergency_truck_subcategories.py @@ -0,0 +1,160 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 431, marshal size 8; + * PlatformLandSingleUnitUtilityEmergencyTruckSubcategories has 45 enumerations total. + * Subcategories for Land Platform Category 84 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformLandSingleUnitUtilityEmergencyTruckSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + ambulance_truck = EnumValue(1, "Ambulance Truck") + fire_paramedic_truck = EnumValue(2, "Fire/Paramedic Truck") + ambulance_advanced_life_support = EnumValue(3, "Ambulance, Advanced Life Support") + ambulance_pickup_truck = EnumValue(4, "Ambulance Pickup Truck") + fire_engine = EnumValue(10, "Fire Engine") + aerial_ladder_fire_engine = EnumValue(11, "Aerial Ladder Fire Engine") + airport_fire_engine = EnumValue(12, "Airport Fire Engine") + wildland_fire_engine = EnumValue(13, "Wildland Fire Engine") + fire_chief = EnumValue(14, "Fire Chief") + police_paddy_wagon = EnumValue(20, "Police Paddy Wagon") + police_swat = EnumValue(21, "Police, SWAT") + police_bomb_squad = EnumValue(22, "Police, Bomb Squad") + police_pickup_truck = EnumValue(23, "Police, Pickup Truck") + hazmat = EnumValue(30, "Hazmat") + wrecker_normal_hook_and_chain = EnumValue(40, "Wrecker, Normal Hook and Chain") + wrecker_normal_boom = EnumValue(41, "Wrecker, Normal Boom") + wrecker_normal_wheel_lift = EnumValue(42, "Wrecker, Normal Wheel Lift") + wrecker_normal_flatbed = EnumValue(43, "Wrecker, Normal Flatbed") + wrecker_normal_integrated = EnumValue(44, "Wrecker, Normal Integrated") + wrecker_heavy_hook_and_chain = EnumValue(45, "Wrecker, Heavy Hook and Chain") + wrecker_heavy_boom = EnumValue(46, "Wrecker, Heavy Boom") + wrecker_heavy_wheel_lift = EnumValue(47, "Wrecker, Heavy Wheel Lift") + wrecker_heavy_flatbed = EnumValue(48, "Wrecker, Heavy Flatbed") + wrecker_heavy_integrated = EnumValue(49, "Wrecker, Heavy Integrated") + postal_truck = EnumValue(60, "Postal Truck") + street_sweeper = EnumValue(70, "Street Sweeper") + street_sweeper_three_wheeled = EnumValue(71, "Street Sweeper, Three Wheeled") + waste_collection_other = EnumValue(80, "Waste Collection, Other") + waste_collection_front_loader = EnumValue(81, "Waste Collection, Front Loader") + waste_collection_rear_loader = EnumValue(82, "Waste Collection, Rear Loader") + waste_collection_automated_side_loader = EnumValue(83, "Waste Collection, Automated Side Loader") + waste_collection_pneumatic_collection = EnumValue(84, "Waste Collection, Pneumatic Collection") + waste_collection_grapple = EnumValue(85, "Waste Collection, Grapple") + utility_truck = EnumValue(90, "Utility Truck") + utility_truck_w_boom = EnumValue(91, "Utility Truck w/ Boom") + aerial_work_platform_other = EnumValue(100, "Aerial Work Platform, Other") + aerial_work_platform_scissor_lift = EnumValue(101, "Aerial Work Platform, Scissor Lift") + aerial_work_platform_telescoping = EnumValue(102, "Aerial Work Platform, Telescoping") + maintenance_truck = EnumValue(120, "Maintenance Truck") + decontamination_truck = EnumValue(121, "Decontamination Truck") + water_cannon_truck = EnumValue(122, "Water Cannon Truck") + water_purification_truck = EnumValue(123, "Water Purification Truck") + smoke_generator_truck = EnumValue(124, "Smoke Generator Truck") + auto_rickshaw = EnumValue(150, "Auto Rickshaw") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_land_trailer_subcategories.py b/dis/siso_ref_010/enums/platform_land_trailer_subcategories.py new file mode 100644 index 0000000..d1062f1 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_land_trailer_subcategories.py @@ -0,0 +1,143 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 436, marshal size 8; + * PlatformLandTrailerSubcategories has 28 enumerations total. + * Subcategories for Land Platform Category 89 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformLandTrailerSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + trailer_flatbed = EnumValue(1, "Trailer, Flatbed") + trailer_container = EnumValue(2, "Trailer, Container") + trailer_container_refrigerated = EnumValue(3, "Trailer, Container, Refrigerated") + trailer_double = EnumValue(4, "Trailer, Double") + trailer_auto_transport = EnumValue(5, "Trailer, Auto Transport") + trailer_articulated = EnumValue(6, "Trailer, Articulated") + trailer_tanker = EnumValue(7, "Trailer, Tanker") + trailer_tanker_small = EnumValue(8, "Trailer, Tanker, Small") + trailer_tanker_large = EnumValue(9, "Trailer, Tanker, Large") + trailer_tanker_gasoline = EnumValue(10, "Trailer, Tanker, Gasoline") + trailer_tanker_milk = EnumValue(11, "Trailer, Tanker, Milk") + trailer_tanker_water = EnumValue(12, "Trailer, Tanker, Water") + trailer_tanker_septic = EnumValue(13, "Trailer, Tanker, Septic") + trailer_boat = EnumValue(14, "Trailer, Boat") + trailer_boat_small = EnumValue(15, "Trailer, Boat, Small") + trailer_boat_large = EnumValue(16, "Trailer, Boat, Large") + trailer_recreational = EnumValue(17, "Trailer, Recreational") + trailer_recreational_conventional = EnumValue(18, "Trailer, Recreational, Conventional") + trailer_recreational_travel_expandable = EnumValue(19, "Trailer, Recreational, Travel Expandable") + trailer_recreational_fifth_wheel_travel = EnumValue(20, "Trailer, Recreational, Fifth Wheel Travel") + trailer_recreational_folding_camping = EnumValue(21, "Trailer, Recreational, Folding Camping") + trailer_recreational_truck_camper = EnumValue(22, "Trailer, Recreational, Truck Camper") + trailer_aerostat_mooring_platform = EnumValue(23, "Trailer, Aerostat Mooring Platform") + trailer_household = EnumValue(24, "Trailer, Household") + trailer_kitchen = EnumValue(25, "Trailer, Kitchen") + trailer_ultralight_aircraft = EnumValue(26, "Trailer, UltraLight Aircraft") + trailer_heavy_equipment = EnumValue(27, "Trailer, Heavy Equipment") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_land_trains_subcategories.py b/dis/siso_ref_010/enums/platform_land_trains_subcategories.py new file mode 100644 index 0000000..3b58271 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_land_trains_subcategories.py @@ -0,0 +1,123 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 439, marshal size 8; + * PlatformLandTrainsSubcategories has 8 enumerations total. + * Subcategories for Land Platform Category 92 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformLandTrainsSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + engine_locomotive = EnumValue(1, "Engine (Locomotive)") + box_car = EnumValue(2, "Box Car") + tanker = EnumValue(3, "Tanker") + flatcar = EnumValue(4, "Flatcar") + caboose = EnumValue(5, "Caboose") + passenger_car = EnumValue(6, "Passenger Car") + hopper = EnumValue(7, "Hopper") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_land_utility_emergency_car_subcategories.py b/dis/siso_ref_010/enums/platform_land_utility_emergency_car_subcategories.py new file mode 100644 index 0000000..1965d91 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_land_utility_emergency_car_subcategories.py @@ -0,0 +1,121 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 440, marshal size 8; + * PlatformLandUtilityEmergencyCarSubcategories has 6 enumerations total. + * Subcategories for Land Platform Category 93 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformLandUtilityEmergencyCarSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + ambulance_car = EnumValue(1, "Ambulance Car") + police_car = EnumValue(2, "Police Car") + police_chief = EnumValue(3, "Police Chief") + hearse = EnumValue(4, "Hearse") + taxi = EnumValue(5, "Taxi") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_space_category.py b/dis/siso_ref_010/enums/platform_space_category.py new file mode 100644 index 0000000..f90a1bc --- /dev/null +++ b/dis/siso_ref_010/enums/platform_space_category.py @@ -0,0 +1,148 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 13, + * marshal size 8; + * PlatformSpaceCategory has 13 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class PlatformSpaceCategory(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + manned_spacecraft = EnumValue(1, "Manned Spacecraft") + unmanned = EnumValue(2, "Unmanned") + booster = EnumValue(3, "Booster") + debris = EnumValue(10, "Debris") + satellite_unknown_unspecified_mission = EnumValue(11, "Satellite - Unknown/Unspecified Mission") + satellite_communication = EnumValue(12, "Satellite - Communication") + satellite_navigation = EnumValue(13, "Satellite - Navigation") + satellite_science_experimental_demonstration = EnumValue(14, "Satellite - Science/Experimental/Demonstration") + satellite_inert_target_reflector_calibration = EnumValue(15, "Satellite - Inert (Target/Reflector/Calibration)") + satellite_earth_observation = EnumValue(16, "Satellite - Earth Observation") + satellite_space_surveillance = EnumValue(17, "Satellite - Space Surveillance") + satellite_astronomy = EnumValue(18, "Satellite - Astronomy") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_subsurface_category.py b/dis/siso_ref_010/enums/platform_subsurface_category.py new file mode 100644 index 0000000..e3b6a80 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_subsurface_category.py @@ -0,0 +1,155 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 12, + * marshal size 8; + * PlatformSubsurfaceCategory has 20 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class PlatformSubsurfaceCategory(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + ssbn_nuclear_ballistic_missile = EnumValue(1, "SSBN (Nuclear Ballistic Missile)") + ssgn_nuclear_guided_missile = EnumValue(2, "SSGN (Nuclear Guided Missile)") + ssn_nuclear_attack_torpedo = EnumValue(3, "SSN (Nuclear Attack - Torpedo)") + ssg_conventional_guided_missile = EnumValue(4, "SSG (Conventional Guided Missile)") + ss_conventional_attack_torpedo_patrol = EnumValue(5, "SS (Conventional Attack - Torpedo, Patrol)") + ssan_nuclear_auxiliary = EnumValue(6, "SSAN (Nuclear Auxiliary)") + ssa_conventional_auxiliary = EnumValue(7, "SSA (Conventional Auxiliary)") + unmanned_underwater_vehicle_uuv = EnumValue(8, "Unmanned Underwater Vehicle (UUV)") + ssb_submarine_ballistic_ballistic_missile_submarine = EnumValue(9, "SSB (Submarine Ballistic, Ballistic Missile Submarine)") + ssc_coastal_submarine_over_150_tons = EnumValue(10, "SSC (Coastal Submarine, over 150 tons)") + ssp_attack_submarine_diesel_air_independent_propulsion = EnumValue(11, "SSP (Attack Submarine - Diesel Air-Independent Propulsion)") + ssm_midget_submarine_under_150_tons = EnumValue(12, "SSM (Midget Submarine, under 150 tons)") + ssnr_special_attack_submarine = EnumValue(13, "SSNR (Special Attack Submarine)") + sst_training_submarine = EnumValue(14, "SST (Training Submarine)") + agss_auxiliary_submarine = EnumValue(15, "AGSS (Auxiliary Submarine)") + semi_submersible_boats = EnumValue(16, "Semi-Submersible Boats") + civilian_submarines = EnumValue(80, "Civilian Submarines") + civilian_submersibles = EnumValue(81, "Civilian Submersibles") + civilian_semi_submersible_boats = EnumValue(82, "Civilian Semi-Submersible Boats") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_subsurface_civilian_semi_submersibles_subcategories.py b/dis/siso_ref_010/enums/platform_subsurface_civilian_semi_submersibles_subcategories.py new file mode 100644 index 0000000..92473b3 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_subsurface_civilian_semi_submersibles_subcategories.py @@ -0,0 +1,116 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 508, marshal size 8; + * PlatformSubsurfaceCivilianSemiSubmersiblesSubcategories has 1 enumerations total. + * Subcategories for Subsurface Platform Category 82 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformSubsurfaceCivilianSemiSubmersiblesSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + narco_submarine = EnumValue(1, "Narco-Submarine") + default = narco_submarine + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_subsurface_civilian_submarine_subcategories.py b/dis/siso_ref_010/enums/platform_subsurface_civilian_submarine_subcategories.py new file mode 100644 index 0000000..37e5e6c --- /dev/null +++ b/dis/siso_ref_010/enums/platform_subsurface_civilian_submarine_subcategories.py @@ -0,0 +1,115 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 506, marshal size 8; + * PlatformSubsurfaceCivilianSubmarineSubcategories has 0 enumerations total. + * Subcategories for Subsurface Platform Category 80 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformSubsurfaceCivilianSubmarineSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + default = + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_subsurface_civilian_submersible_subcategories.py b/dis/siso_ref_010/enums/platform_subsurface_civilian_submersible_subcategories.py new file mode 100644 index 0000000..564a50b --- /dev/null +++ b/dis/siso_ref_010/enums/platform_subsurface_civilian_submersible_subcategories.py @@ -0,0 +1,115 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 507, marshal size 8; + * PlatformSubsurfaceCivilianSubmersibleSubcategories has 0 enumerations total. + * Subcategories for Subsurface Platform Category 81 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformSubsurfaceCivilianSubmersibleSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + default = + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_surface_category.py b/dis/siso_ref_010/enums/platform_surface_category.py new file mode 100644 index 0000000..d133bd5 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_surface_category.py @@ -0,0 +1,191 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 11, + * marshal size 8; + * PlatformSurfaceCategory has 48 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class PlatformSurfaceCategory(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + carrier = EnumValue(1, "Carrier") + command_ship_cruiser = EnumValue(2, "Command Ship/Cruiser") + guided_missile_cruiser = EnumValue(3, "Guided Missile Cruiser") + guided_missile_destroyer_ddg = EnumValue(4, "Guided Missile Destroyer (DDG)") + destroyer_dd = EnumValue(5, "Destroyer (DD)") + guided_missile_frigate_ffg = EnumValue(6, "Guided Missile Frigate (FFG)") + light_patrol_craft = EnumValue(7, "Light/Patrol Craft") + mine_countermeasure_ship_craft = EnumValue(8, "Mine Countermeasure Ship/Craft") + dock_landing_ship = EnumValue(9, "Dock Landing Ship") + tank_landing_ship = EnumValue(10, "Tank Landing Ship") + landing_craft = EnumValue(11, "Landing Craft") + light_carrier = EnumValue(12, "Light Carrier") + cruiser_helicopter_carrier = EnumValue(13, "Cruiser/Helicopter Carrier") + hydrofoil = EnumValue(14, "Hydrofoil") + air_cushion_surface_effect = EnumValue(15, "Air Cushion/Surface Effect") + auxiliary = EnumValue(16, "Auxiliary") + auxiliary_merchant_marine = EnumValue(17, "Auxiliary, Merchant Marine") + utility = EnumValue(18, "Utility") + unmanned_surface_vehicle_usv = EnumValue(19, "Unmanned Surface Vehicle (USV)") + littoral_combat_ships_lcs = EnumValue(20, "Littoral Combat Ships (LCS)") + surveillance_ship = EnumValue(21, "Surveillance Ship") + frigate_including_corvette = EnumValue(50, "Frigate (including Corvette)") + battleship = EnumValue(51, "Battleship") + heavy_cruiser = EnumValue(52, "Heavy Cruiser") + destroyer_tender = EnumValue(53, "Destroyer Tender") + amphibious_assault_ship = EnumValue(54, "Amphibious Assault Ship") + amphibious_cargo_ship = EnumValue(55, "Amphibious Cargo Ship") + amphibious_transport_dock = EnumValue(56, "Amphibious Transport Dock") + ammunition_ship = EnumValue(57, "Ammunition Ship") + combat_stores_ship = EnumValue(58, "Combat Stores Ship") + surveillance_towed_array_sonar_system_surtass = EnumValue(59, "Surveillance Towed Array Sonar System (SURTASS)") + fast_combat_support_ship = EnumValue(60, "Fast Combat Support Ship") + non_combatant_ship = EnumValue(61, "Non-Combatant Ship") + coast_guard_cutters = EnumValue(62, "Coast Guard Cutters") + coast_guard_boats = EnumValue(63, "Coast Guard Boats") + fast_attack_craft = EnumValue(64, "Fast Attack Craft") + inflatable_boat = EnumValue(65, "Inflatable Boat") + # XREF UID 441 - CLASS PlatformSurfacePassengerVesselSubcategories + passenger_vessel_group_1_merchant = EnumValue(80, "Passenger Vessel (Group 1 Merchant)") + # XREF UID 442 - CLASS PlatformSurfaceDryCargoShipSubcategories + dry_cargo_ship_group_2_merchant = EnumValue(81, "Dry Cargo Ship (Group 2 Merchant)") + # XREF UID 443 - CLASS PlatformSurfaceTankerSubcategories + tanker_group_3_merchant = EnumValue(82, "Tanker (Group 3 Merchant)") + offshore_support_vessel = EnumValue(83, "Offshore Support Vessel") + # XREF UID 445 - CLASS PlatformSurfacePrivateMotorboatSubcategories + private_motorboat = EnumValue(84, "Private Motorboat") + # XREF UID 446 - CLASS PlatformSurfacePrivateSailboatSubcategories + private_sailboat = EnumValue(85, "Private Sailboat") + # XREF UID 447 - CLASS PlatformSurfaceFishingVesselSubcategories + fishing_vessel = EnumValue(86, "Fishing Vessel") + # XREF UID 448 - CLASS PlatformSurfaceOtherVesselsSubcategories + other_vessels = EnumValue(87, "Other Vessels") + search_and_rescue_vessels = EnumValue(100, "Search and Rescue Vessels") + # XREF UID 633 - CLASS LifeSavingEquipment + life_saving_equipment = EnumValue(101, "Life-Saving Equipment") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_surface_dry_cargo_ship_subcategories.py b/dis/siso_ref_010/enums/platform_surface_dry_cargo_ship_subcategories.py new file mode 100644 index 0000000..5f94775 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_surface_dry_cargo_ship_subcategories.py @@ -0,0 +1,122 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 442, marshal size 8; + * PlatformSurfaceDryCargoShipSubcategories has 7 enumerations total. + * Subcategories for Surface Platform Category 81. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformSurfaceDryCargoShipSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + common_dry_cargo_ship = EnumValue(1, "Common Dry Cargo Ship") + dry_bulk_cargo_ship = EnumValue(2, "Dry Bulk Cargo Ship") + container_ship = EnumValue(3, "Container Ship") + reefer_ship_refrigerator_ship = EnumValue(4, "Reefer Ship (Refrigerator Ship)") + ro_ro_ship_roll_on_roll_off_ship = EnumValue(5, "Ro-Ro Ship (Roll-on/Roll-off Ship)") + barge = EnumValue(6, "Barge") + heavy_lift_ship = EnumValue(7, "Heavy Lift Ship") + default = common_dry_cargo_ship + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_surface_fishing_vessel_subcategories.py b/dis/siso_ref_010/enums/platform_surface_fishing_vessel_subcategories.py new file mode 100644 index 0000000..437634f --- /dev/null +++ b/dis/siso_ref_010/enums/platform_surface_fishing_vessel_subcategories.py @@ -0,0 +1,120 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 447, marshal size 8; + * PlatformSurfaceFishingVesselSubcategories has 5 enumerations total. + * Subcategories for Surface Platform Category 86. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformSurfaceFishingVesselSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + small_fishing_vessel_up_to_26ft_79m = EnumValue(1, "Small Fishing Vessel (up to 26ft/7.9m)") + medium_fishing_vessel_up_to_65ft_198m = EnumValue(2, "Medium Fishing Vessel (up to 65ft/19.8m)") + large_fishing_vessel_greater_than_65ft_198m = EnumValue(3, "Large Fishing Vessel (greater than 65ft/19.8m)") + fish_processing_vessel = EnumValue(4, "Fish Processing Vessel") + masted_fishing_vessel = EnumValue(5, "Masted Fishing Vessel") + default = small_fishing_vessel_up_to_26ft_79m + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_surface_other_vessels_subcategories.py b/dis/siso_ref_010/enums/platform_surface_other_vessels_subcategories.py new file mode 100644 index 0000000..e4e3857 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_surface_other_vessels_subcategories.py @@ -0,0 +1,128 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 448, marshal size 8; + * PlatformSurfaceOtherVesselsSubcategories has 13 enumerations total. + * Subcategories for Surface Platform Category 87. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformSurfaceOtherVesselsSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + go_fast_boat = EnumValue(1, "Go-Fast Boat") + research_vessel = EnumValue(2, "Research Vessel") + hydrofoil_vessel = EnumValue(3, "Hydrofoil Vessel") + cable_layer_vessel = EnumValue(4, "Cable Layer Vessel") + dredger_vessel = EnumValue(5, "Dredger Vessel") + junk_dhow_vessel = EnumValue(6, "Junk/Dhow Vessel") + catamaran = EnumValue(7, "Catamaran") + pontoon = EnumValue(8, "Pontoon") + personal_water_craft = EnumValue(9, "Personal Water Craft") + refugee_raft = EnumValue(10, "Refugee Raft") + lightship = EnumValue(11, "Lightship") + law_enforcement_vessel = EnumValue(12, "Law Enforcement Vessel") + pilot_vessel = EnumValue(13, "Pilot Vessel") + default = go_fast_boat + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_surface_passenger_vessel_subcategories.py b/dis/siso_ref_010/enums/platform_surface_passenger_vessel_subcategories.py new file mode 100644 index 0000000..a99c2ff --- /dev/null +++ b/dis/siso_ref_010/enums/platform_surface_passenger_vessel_subcategories.py @@ -0,0 +1,120 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 441, marshal size 8; + * PlatformSurfacePassengerVesselSubcategories has 5 enumerations total. + * Subcategories for Surface Platform Category 80. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformSurfacePassengerVesselSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + cruise_ship = EnumValue(1, "Cruise Ship") + cruise_ferry = EnumValue(2, "Cruise Ferry") + high_speed_ferry = EnumValue(3, "High Speed Ferry") + ferry = EnumValue(4, "Ferry") + ocean_liner = EnumValue(5, "Ocean Liner") + default = cruise_ship + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_surface_private_motorboat_subcategories.py b/dis/siso_ref_010/enums/platform_surface_private_motorboat_subcategories.py new file mode 100644 index 0000000..0c57b78 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_surface_private_motorboat_subcategories.py @@ -0,0 +1,119 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 445, marshal size 8; + * PlatformSurfacePrivateMotorboatSubcategories has 4 enumerations total. + * Subcategories for Surface Platform Category 84. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformSurfacePrivateMotorboatSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + small_motorboat_up_to_26ft_79m = EnumValue(1, "Small Motorboat (up to 26ft/7.9m)") + medium_motorboat_up_to_39ft_119m = EnumValue(2, "Medium Motorboat (up to 39ft/11.9m)") + large_motorboat_up_to_65ft_198m = EnumValue(3, "Large Motorboat (up to 65ft/19.8m)") + very_large_motorboat_greater_than_65ft_198m = EnumValue(4, "Very Large Motorboat (greater than 65ft/19.8m)") + default = small_motorboat_up_to_26ft_79m + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_surface_private_sailboat_subcategories.py b/dis/siso_ref_010/enums/platform_surface_private_sailboat_subcategories.py new file mode 100644 index 0000000..8e49698 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_surface_private_sailboat_subcategories.py @@ -0,0 +1,119 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 446, marshal size 8; + * PlatformSurfacePrivateSailboatSubcategories has 4 enumerations total. + * Subcategories for Surface Platform Category 85. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformSurfacePrivateSailboatSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + small_sailboat_up_to_26ft_79m = EnumValue(1, "Small Sailboat (up to 26ft/7.9m)") + medium_sailboat_up_to_39ft_119m = EnumValue(2, "Medium Sailboat (up to 39ft/11.9m)") + large_sailboat_up_to_65ft_198m = EnumValue(3, "Large Sailboat (up to 65ft/19.8m)") + very_large_sailboat_greater_than_65ft_198m = EnumValue(4, "Very Large Sailboat (greater than 65ft/19.8m)") + default = small_sailboat_up_to_26ft_79m + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_surface_support_vessel_subcategories.py b/dis/siso_ref_010/enums/platform_surface_support_vessel_subcategories.py new file mode 100644 index 0000000..560c2f7 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_surface_support_vessel_subcategories.py @@ -0,0 +1,124 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 444, marshal size 8; + * PlatformSurfaceSupportVesselSubcategories has 9 enumerations total. + * Subcategories for Surface Platform Category 83 + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformSurfaceSupportVesselSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + platform_supply_vessel = EnumValue(1, "Platform Supply Vessel") + tender_vessel = EnumValue(2, "Tender Vessel") + tugboat = EnumValue(3, "Tugboat") + dive_support_vessel = EnumValue(4, "Dive Support Vessel") + fireboat = EnumValue(5, "Fireboat") + well_stimulation_vessel_wsv = EnumValue(6, "Well Stimulation Vessel (WSV)") + anchor_handling_tug_supply_vessel_ahts = EnumValue(7, "Anchor Handling Tug Supply Vessel (AHTS)") + offshore_construction_vessel_ocv = EnumValue(8, "Offshore Construction Vessel (OCV)") + emergency_response_and_rescue_vessel_errv = EnumValue(9, "Emergency Response and Rescue Vessel (ERRV)") + default = platform_supply_vessel + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/platform_surface_tanker_subcategories.py b/dis/siso_ref_010/enums/platform_surface_tanker_subcategories.py new file mode 100644 index 0000000..bfe7ca8 --- /dev/null +++ b/dis/siso_ref_010/enums/platform_surface_tanker_subcategories.py @@ -0,0 +1,124 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 443, marshal size 8; + * PlatformSurfaceTankerSubcategories has 9 enumerations total. + * Subcategories for Surface Platform Category 82. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class PlatformSurfaceTankerSubcategories(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + liquid_petroleum_gas_lpgtanker = EnumValue(1, "Liquid Petroleum Gas (LPG)Tanker") + chemical_tanker = EnumValue(2, "Chemical Tanker") + liquid_natural_gas_lng_tanker = EnumValue(3, "Liquid Natural Gas (LNG) Tanker") + coastal_trading_vessel_coaster = EnumValue(4, "Coastal Trading Vessel (Coaster)") + crude_oil_tanker_up_to_159_999_dwt = EnumValue(5, "Crude Oil Tanker (up to 159,999 DWT)") + liquid_bulk_tanker = EnumValue(6, "Liquid Bulk Tanker") + very_large_crude_carrier_160_000_319_999_dwt = EnumValue(7, "Very Large Crude Carrier (160,000–319,999 DWT)") + ultra_large_crude_carrier_320_000_549_999_dwt = EnumValue(8, "Ultra Large Crude Carrier (320,000–549,999 DWT)") + condensate_storage_tanker = EnumValue(9, "Condensate Storage Tanker") + default = liquid_petroleum_gas_lpgtanker + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/point_object_appearance_air_ground_burst.py b/dis/siso_ref_010/enums/point_object_appearance_air_ground_burst.py new file mode 100644 index 0000000..2513ce1 --- /dev/null +++ b/dis/siso_ref_010/enums/point_object_appearance_air_ground_burst.py @@ -0,0 +1,129 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_object_specific_chemical_type import AppearanceObjectSpecificChemicalType + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 232, marshal size 16, + * PointObjectAppearanceAirGroundBurst + */ + +""" + +class PointObjectAppearanceAirGroundBurstBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=8) 8-bit unsigned integer indicating the percent opacity of the smoke (0..100), use {@link UInt8} values for this field + ("_opacityPercent", UByte, 8), + + # (bit position 8, length=8) 8-bit unsigned integer indicating the radius in meters of the cylinder which approximates an individual burst, use {@link UInt8} values for this field + ("_size", UByte, 8), + + # (bit position 16, length=8) 8-bit unsigned integer indicating the height in meters of the cylinder which approximates an individual burst, use {@link UInt8} values for this field + ("_height", UByte, 8), + + # (bit position 24, length=6) 6-bit unsigned integer indicating the number of bursts in the instance of tactical smoke, use {@link UInt8} values for this field + ("_numberofBursts", UByte, 6), + + # (bit position 30, length=2) Describes the chemical content of the smoke, use {@link AppearanceObjectSpecificChemicalType} values for this field + ("_chemicalType", UByte, 2) + ] + +class PointObjectAppearanceAirGroundBurst(ctypes.Union): + _fields_ = [ + ("capabilities", PointObjectAppearanceAirGroundBurstBitField), + ("asbyte", UInt8) + ] + + def set_opacityPercent(self, value : UInt8): + self.capabilities._opacityPercent = int(value) + def get_opacityPercent(self) -> UInt8: + return self.capabilities._opacityPercent + OpacityPercent = property(get_opacityPercent, set_opacityPercent) + + def set_size(self, value : UInt8): + self.capabilities._size = int(value) + def get_size(self) -> UInt8: + return self.capabilities._size + Size = property(get_size, set_size) + + def set_height(self, value : UInt8): + self.capabilities._height = int(value) + def get_height(self) -> UInt8: + return self.capabilities._height + Height = property(get_height, set_height) + + def set_numberofBursts(self, value : UInt8): + self.capabilities._numberofBursts = int(value) + def get_numberofBursts(self) -> UInt8: + return self.capabilities._numberofBursts + NumberofBursts = property(get_numberofBursts, set_numberofBursts) + + def set_chemicalType(self, value : AppearanceObjectSpecificChemicalType): + self.capabilities._chemicalType = int(value) + def get_chemicalType(self) -> AppearanceObjectSpecificChemicalType: + return AppearanceObjectSpecificChemicalType.get_enum(self._chemicalType) + ChemicalType = property(get_chemicalType, set_chemicalType) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "OpacityPercent : " + str(self.OpacityPercent) + "\n" + outputStream += "Size : " + str(self.Size) + "\n" + outputStream += "Height : " + str(self.Height) + "\n" + outputStream += "NumberofBursts : " + str(self.NumberofBursts) + "\n" + outputStream += "ChemicalType : " + self.ChemicalType.get_description + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/point_object_appearance_building_rubble.py b/dis/siso_ref_010/enums/point_object_appearance_building_rubble.py new file mode 100644 index 0000000..856c880 --- /dev/null +++ b/dis/siso_ref_010/enums/point_object_appearance_building_rubble.py @@ -0,0 +1,79 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 483, marshal size 32, + * PointObjectAppearanceBuildingRubble + */ + +""" + +class PointObjectAppearanceBuildingRubbleBitField(ctypes.Structure): + _fields_ = [ + ] + +class PointObjectAppearanceBuildingRubble(ctypes.Union): + _fields_ = [ + ("capabilities", PointObjectAppearanceBuildingRubbleBitField), + ("asbyte", UInt8) + ] + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/point_object_appearance_building_structure.py b/dis/siso_ref_010/enums/point_object_appearance_building_structure.py new file mode 100644 index 0000000..34968a1 --- /dev/null +++ b/dis/siso_ref_010/enums/point_object_appearance_building_structure.py @@ -0,0 +1,110 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .color import Color +from .building_paint_scheme import BuildingPaintScheme + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 230, marshal size 16, + * PointObjectAppearanceBuildingStructure + */ + +""" + +class PointObjectAppearanceBuildingStructureBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=8) Describes the color of the building or structure, use {@link Color} values for this field + ("_color", UByte, 8), + + # (bit position 8, length=8) Describes the visual paint design, use {@link BuildingPaintScheme} values for this field + ("_paintScheme", UByte, 8), + + # (bit position 16, boolean) Describes whether the aperture (e.g., tent) is open or closed, use {@link UInt8} values for this field + ("_isApertureOpen", UByte, 1) + ] + +class PointObjectAppearanceBuildingStructure(ctypes.Union): + _fields_ = [ + ("capabilities", PointObjectAppearanceBuildingStructureBitField), + ("asbyte", UInt8) + ] + + def set_color(self, value : Color): + self.capabilities._color = int(value) + def get_color(self) -> Color: + return Color.get_enum(self._color) + Color = property(get_color, set_color) + + def set_paintScheme(self, value : BuildingPaintScheme): + self.capabilities._paintScheme = int(value) + def get_paintScheme(self) -> BuildingPaintScheme: + return BuildingPaintScheme.get_enum(self._paintScheme) + PaintScheme = property(get_paintScheme, set_paintScheme) + + def set_isApertureOpen(self, value : UInt8): + self.capabilities._isApertureOpen = int(value) + def get_isApertureOpen(self) -> UInt8: + return self.capabilities._isApertureOpen + IsApertureOpen = property(get_isApertureOpen, set_isApertureOpen) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Color : " + self.Color.get_description + "\n" + outputStream += "PaintScheme : " + self.PaintScheme.get_description + "\n" + outputStream += "IsApertureOpen : " + str(self.IsApertureOpen) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/point_object_appearance_crater.py b/dis/siso_ref_010/enums/point_object_appearance_crater.py new file mode 100644 index 0000000..cd5931a --- /dev/null +++ b/dis/siso_ref_010/enums/point_object_appearance_crater.py @@ -0,0 +1,119 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_linear_object_tank_ditch_breach import AppearanceLinearObjectTankDitchBreach + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 233, marshal size 16, + * PointObjectAppearanceCrater + */ + +""" + +class PointObjectAppearanceCraterBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=8) 8-bit unsigned integer indicating the diameter of the crater in meters, use {@link UInt8} values for this field + ("_diameter", UByte, 8), + + # (bit position 8, length=8) 8-bit unsigned integer indicating the depth of the crater in centimeters, use {@link UInt8} values for this field + ("_depth", UByte, 8), + + # (bit position 16, length=8) 8-bit unsigned integer indicating the height of the crater in centimeters, use {@link UInt8} values for this field + ("_height", UByte, 8), + + # (bit position 30, length=2) Describes the breached appearance of the object, use {@link AppearanceLinearObjectTankDitchBreach} values for this field + ("_breachState", UByte, 2) + ] + +class PointObjectAppearanceCrater(ctypes.Union): + _fields_ = [ + ("capabilities", PointObjectAppearanceCraterBitField), + ("asbyte", UInt8) + ] + + def set_diameter(self, value : UInt8): + self.capabilities._diameter = int(value) + def get_diameter(self) -> UInt8: + return self.capabilities._diameter + Diameter = property(get_diameter, set_diameter) + + def set_depth(self, value : UInt8): + self.capabilities._depth = int(value) + def get_depth(self) -> UInt8: + return self.capabilities._depth + Depth = property(get_depth, set_depth) + + def set_height(self, value : UInt8): + self.capabilities._height = int(value) + def get_height(self) -> UInt8: + return self.capabilities._height + Height = property(get_height, set_height) + + def set_breachState(self, value : AppearanceLinearObjectTankDitchBreach): + self.capabilities._breachState = int(value) + def get_breachState(self) -> AppearanceLinearObjectTankDitchBreach: + return AppearanceLinearObjectTankDitchBreach.get_enum(self._breachState) + BreachState = property(get_breachState, set_breachState) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Diameter : " + str(self.Diameter) + "\n" + outputStream += "Depth : " + str(self.Depth) + "\n" + outputStream += "Height : " + str(self.Height) + "\n" + outputStream += "BreachState : " + self.BreachState.get_description + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/point_object_appearance_disturbed_earth_road.py b/dis/siso_ref_010/enums/point_object_appearance_disturbed_earth_road.py new file mode 100644 index 0000000..2f88ec2 --- /dev/null +++ b/dis/siso_ref_010/enums/point_object_appearance_disturbed_earth_road.py @@ -0,0 +1,108 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 485, marshal size 32, + * PointObjectAppearanceDisturbedEarthRoad + */ + +""" + +class PointObjectAppearanceDisturbedEarthRoadBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=8) 8-bit unsigned integer indicating the diameter in decimeters, use {@link UInt8} values for this field + ("_diameter", UByte, 8), + + # (bit position 8, length=8) 8-bit unsigned integer indicating the height in centimeters, use {@link UInt8} values for this field + ("_height", UByte, 8), + + # (bit position 16, length=4) 4-bit unsigned integer indicating 16 levels of contrast (low to high) distinguishing variation of object from surrounding surface, use {@link UInt8} values for this field + ("_contrast", UByte, 4) + ] + +class PointObjectAppearanceDisturbedEarthRoad(ctypes.Union): + _fields_ = [ + ("capabilities", PointObjectAppearanceDisturbedEarthRoadBitField), + ("asbyte", UInt8) + ] + + def set_diameter(self, value : UInt8): + self.capabilities._diameter = int(value) + def get_diameter(self) -> UInt8: + return self.capabilities._diameter + Diameter = property(get_diameter, set_diameter) + + def set_height(self, value : UInt8): + self.capabilities._height = int(value) + def get_height(self) -> UInt8: + return self.capabilities._height + Height = property(get_height, set_height) + + def set_contrast(self, value : UInt8): + self.capabilities._contrast = int(value) + def get_contrast(self) -> UInt8: + return self.capabilities._contrast + Contrast = property(get_contrast, set_contrast) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Diameter : " + str(self.Diameter) + "\n" + outputStream += "Height : " + str(self.Height) + "\n" + outputStream += "Contrast : " + str(self.Contrast) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/point_object_appearance_log_crib_abatis_et_al.py b/dis/siso_ref_010/enums/point_object_appearance_log_crib_abatis_et_al.py new file mode 100644 index 0000000..45e6556 --- /dev/null +++ b/dis/siso_ref_010/enums/point_object_appearance_log_crib_abatis_et_al.py @@ -0,0 +1,89 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_object_specific_breach_state import AppearanceObjectSpecificBreachState + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 231, marshal size 16, + * PointObjectAppearanceLogcribAbatisVehicledefiladeandInfantryfightingposition + */ + +""" + +class PointObjectAppearanceLogCribAbatisEtAlBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=2) Describes the breached appearance of the object, use {@link AppearanceObjectSpecificBreachState} values for this field + ("_breachState", UByte, 2) + ] + +class PointObjectAppearanceLogCribAbatisEtAl(ctypes.Union): + _fields_ = [ + ("capabilities", PointObjectAppearanceLogCribAbatisEtAlBitField), + ("asbyte", UInt8) + ] + + def set_breachState(self, value : AppearanceObjectSpecificBreachState): + self.capabilities._breachState = int(value) + def get_breachState(self) -> AppearanceObjectSpecificBreachState: + return AppearanceObjectSpecificBreachState.get_enum(self._breachState) + BreachState = property(get_breachState, set_breachState) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "BreachState : " + self.BreachState.get_description + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/point_object_appearance_pothole.py b/dis/siso_ref_010/enums/point_object_appearance_pothole.py new file mode 100644 index 0000000..8d6676b --- /dev/null +++ b/dis/siso_ref_010/enums/point_object_appearance_pothole.py @@ -0,0 +1,98 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 486, marshal size 32, + * PointObjectAppearancePothole + */ + +""" + +class PointObjectAppearancePotholeBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=8) 8-bit unsigned integer indicating the diameter in decimeters, use {@link UInt8} values for this field + ("_diameter", UByte, 8), + + # (bit position 8, length=8) 8-bit unsigned integer indicating the depth in centimeters, use {@link UInt8} values for this field + ("_depth", UByte, 8) + ] + +class PointObjectAppearancePothole(ctypes.Union): + _fields_ = [ + ("capabilities", PointObjectAppearancePotholeBitField), + ("asbyte", UInt8) + ] + + def set_diameter(self, value : UInt8): + self.capabilities._diameter = int(value) + def get_diameter(self) -> UInt8: + return self.capabilities._diameter + Diameter = property(get_diameter, set_diameter) + + def set_depth(self, value : UInt8): + self.capabilities._depth = int(value) + def get_depth(self) -> UInt8: + return self.capabilities._depth + Depth = property(get_depth, set_depth) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Diameter : " + str(self.Diameter) + "\n" + outputStream += "Depth : " + str(self.Depth) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/point_object_appearance_ribbon_bridge.py b/dis/siso_ref_010/enums/point_object_appearance_ribbon_bridge.py new file mode 100644 index 0000000..889e653 --- /dev/null +++ b/dis/siso_ref_010/enums/point_object_appearance_ribbon_bridge.py @@ -0,0 +1,88 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 234, marshal size 16, + * PointObjectAppearanceRibbonBridge + */ + +""" + +class PointObjectAppearanceRibbonBridgeBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=8) 8-bit unsigned integer indicating the number of segments composing the ribbon bridge, use {@link UInt8} values for this field + ("_numberofSegments", UByte, 8) + ] + +class PointObjectAppearanceRibbonBridge(ctypes.Union): + _fields_ = [ + ("capabilities", PointObjectAppearanceRibbonBridgeBitField), + ("asbyte", UInt8) + ] + + def set_numberofSegments(self, value : UInt8): + self.capabilities._numberofSegments = int(value) + def get_numberofSegments(self) -> UInt8: + return self.capabilities._numberofSegments + NumberofSegments = property(get_numberofSegments, set_numberofSegments) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "NumberofSegments : " + str(self.NumberofSegments) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/point_object_appearance_stationary_bridge_and_avlb.py b/dis/siso_ref_010/enums/point_object_appearance_stationary_bridge_and_avlb.py new file mode 100644 index 0000000..cab58c5 --- /dev/null +++ b/dis/siso_ref_010/enums/point_object_appearance_stationary_bridge_and_avlb.py @@ -0,0 +1,79 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 484, marshal size 32, + * PointObjectAppearanceStationaryBridgeandAVLB + */ + +""" + +class PointObjectAppearanceStationaryBridgeAndAVLBBitField(ctypes.Structure): + _fields_ = [ + ] + +class PointObjectAppearanceStationaryBridgeAndAVLB(ctypes.Union): + _fields_ = [ + ("capabilities", PointObjectAppearanceStationaryBridgeAndAVLBBitField), + ("asbyte", UInt8) + ] + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/point_object_appearance_tree.py b/dis/siso_ref_010/enums/point_object_appearance_tree.py new file mode 100644 index 0000000..6b9fb89 --- /dev/null +++ b/dis/siso_ref_010/enums/point_object_appearance_tree.py @@ -0,0 +1,100 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .season import Season +from .leaf_coverage import LeafCoverage + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 487, marshal size 32, + * PointObjectAppearanceTree + */ + +""" + +class PointObjectAppearanceTreeBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=2) Indicates the visually represented season, use {@link Season} values for this field + ("_season", UByte, 2), + + # (bit position 2, length=2) Indicates the leaf coverage, use {@link LeafCoverage} values for this field + ("_leafCoverage", UByte, 2) + ] + +class PointObjectAppearanceTree(ctypes.Union): + _fields_ = [ + ("capabilities", PointObjectAppearanceTreeBitField), + ("asbyte", UInt8) + ] + + def set_season(self, value : Season): + self.capabilities._season = int(value) + def get_season(self) -> Season: + return Season.get_enum(self._season) + Season = property(get_season, set_season) + + def set_leafCoverage(self, value : LeafCoverage): + self.capabilities._leafCoverage = int(value) + def get_leafCoverage(self) -> LeafCoverage: + return LeafCoverage.get_enum(self._leafCoverage) + LeafCoverage = property(get_leafCoverage, set_leafCoverage) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Season : " + self.Season.get_description + "\n" + outputStream += "LeafCoverage : " + self.LeafCoverage.get_description + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/q.dat b/dis/siso_ref_010/enums/q.dat new file mode 100644 index 0000000000000000000000000000000000000000..15a41201a444450ffe470dcc791f6da4f4e7fa1a GIT binary patch literal 116 zcmezW|NpQ5|NsAEWMp74GPcw+)HBjEW*`n28t54snd%uCSn3%Y5us%P4@40FuyzdM literal 0 HcmV?d00001 diff --git a/dis/siso_ref_010/enums/radio_appearance.py b/dis/siso_ref_010/enums/radio_appearance.py new file mode 100644 index 0000000..dce9770 --- /dev/null +++ b/dis/siso_ref_010/enums/radio_appearance.py @@ -0,0 +1,99 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_entityor_object_state import AppearanceEntityorObjectState + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 41, marshal size 32, + * RadioAppearance + */ + +""" + +class RadioAppearanceBitField(ctypes.Structure): + _fields_ = [ + # (bit position 21, boolean) Describes whether the entity is frozen and should not be dead reckoned, use {@link UInt8} values for this field + ("_isFrozen", UByte, 1), + + # (bit position 23, boolean) Describes whether the entity is active or deactivated, use {@link AppearanceEntityorObjectState} values for this field + ("_state", UByte, 1) + ] + +class RadioAppearance(ctypes.Union): + _fields_ = [ + ("capabilities", RadioAppearanceBitField), + ("asbyte", UInt8) + ] + + def set_isFrozen(self, value : UInt8): + self.capabilities._isFrozen = int(value) + def get_isFrozen(self) -> UInt8: + return self.capabilities._isFrozen + IsFrozen = property(get_isFrozen, set_isFrozen) + + def set_state(self, value : AppearanceEntityorObjectState): + self.capabilities._state = int(value) + def get_state(self) -> AppearanceEntityorObjectState: + return AppearanceEntityorObjectState.get_enum(self._state) + State = property(get_state, set_state) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "IsFrozen : " + str(self.IsFrozen) + "\n" + outputStream += "State : " + self.State.get_description + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/radio_capabilities.py b/dis/siso_ref_010/enums/radio_capabilities.py new file mode 100644 index 0000000..97ff15d --- /dev/null +++ b/dis/siso_ref_010/enums/radio_capabilities.py @@ -0,0 +1,88 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 460, marshal size 32, + * RadioCapabilities + */ + +""" + +class RadioCapabilitiesBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=5) This entry is reserved for backward compatibility and may not be reused, use {@link UInt8} values for this field + ("_reserved", UByte, 5) + ] + +class RadioCapabilities(ctypes.Union): + _fields_ = [ + ("capabilities", RadioCapabilitiesBitField), + ("asbyte", UInt8) + ] + + def set_reserved(self, value : UInt8): + self.capabilities._reserved = int(value) + def get_reserved(self) -> UInt8: + return self.capabilities._reserved + Reserved = property(get_reserved, set_reserved) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Reserved : " + str(self.Reserved) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/radio_category.py b/dis/siso_ref_010/enums/radio_category.py new file mode 100644 index 0000000..417854d --- /dev/null +++ b/dis/siso_ref_010/enums/radio_category.py @@ -0,0 +1,179 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 22, + * marshal size 8; + * RadioCategory has 44 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class RadioCategory(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + voice_transmission_reception = EnumValue(1, "Voice Transmission/Reception") + data_link_transmission_reception = EnumValue(2, "Data Link Transmission/Reception") + voice_and_data_link_transmission_reception = EnumValue(3, "Voice and Data Link Transmission/Reception") + instrumented_landing_system_ils_glideslope_transmitter = EnumValue(4, "Instrumented Landing System (ILS) Glideslope Transmitter") + instrumented_landing_system_ils_localizer_transmitter = EnumValue(5, "Instrumented Landing System (ILS) Localizer Transmitter") + instrumented_landing_system_ils_outer_marker_beacon = EnumValue(6, "Instrumented Landing System (ILS) Outer Marker Beacon") + instrumented_landing_system_ils_middle_marker_beacon = EnumValue(7, "Instrumented Landing System (ILS) Middle Marker Beacon") + instrumented_landing_system_ils_inner_marker_beacon = EnumValue(8, "Instrumented Landing System (ILS) Inner Marker Beacon") + instrumented_landing_system_ils_receiver_platform_radio = EnumValue(9, "Instrumented Landing System (ILS) Receiver (Platform Radio)") + tactical_air_navigation_tacan_transmitter_ground_fixed_equipment = EnumValue(10, "Tactical Air Navigation (TACAN) Transmitter (Ground Fixed Equipment)") + tactical_air_navigation_tacan_receiver_moving_platform_equipment = EnumValue(11, "Tactical Air Navigation (TACAN) Receiver (Moving Platform Equipment)") + tactical_air_navigation_tacan_transmitter_receiver_moving_platform_equipment = EnumValue(12, "Tactical Air Navigation (TACAN) Transmitter/Receiver (Moving Platform Equipment)") + variable_omni_ranging_vor_transmitter_ground_fixed_equipment = EnumValue(13, "Variable Omni-Ranging (VOR) Transmitter (Ground Fixed Equipment)") + variable_omni_ranging_vor_with_distance_measuring_equipment_dme_transmitter_ground_fixed_equipment = EnumValue(14, "Variable Omni-Ranging (VOR) with Distance Measuring Equipment (DME) Transmitter (Ground Fixed Equipment)") + combined_vor_ils_receiver_moving_platform_equipment = EnumValue(15, "Combined VOR/ILS Receiver (Moving Platform Equipment)") + combined_vor_amp_tacan_vortac_transmitter = EnumValue(16, "Combined VOR & TACAN (VORTAC) Transmitter") + non_directional_beacon_ndb_transmitter = EnumValue(17, "Non-Directional Beacon (NDB) Transmitter") + non_directional_beacon_ndb_receiver = EnumValue(18, "Non-Directional Beacon (NDB) Receiver") + non_directional_beacon_ndb_with_distance_measuring_equipment_dme_transmitter = EnumValue(19, "Non-Directional Beacon (NDB) with Distance Measuring Equipment (DME) Transmitter") + distance_measuring_equipment_dme = EnumValue(20, "Distance Measuring Equipment (DME)") + link_16_terminal = EnumValue(21, "Link 16 Terminal") + link_11_terminal = EnumValue(22, "Link 11 Terminal") + link_11b_terminal = EnumValue(23, "Link 11B Terminal") + eplrs_sadl_terminal = EnumValue(24, "EPLRS/SADL Terminal") + f_22_intra_flight_data_link_ifdl = EnumValue(25, "F-22 Intra-Flight Data Link (IFDL)") + f_35_multifunction_advanced_data_link_madl = EnumValue(26, "F-35 Multifunction Advanced Data Link (MADL)") + sincgars_terminal = EnumValue(27, "SINCGARS Terminal") + l_band_satcom_terminal = EnumValue(28, "L-Band SATCOM Terminal") + ibs_terminal = EnumValue(29, "IBS Terminal") + gps = EnumValue(30, "GPS") + tactical_video = EnumValue(31, "Tactical Video") + air_to_air_missile_datalink = EnumValue(32, "Air-to-Air Missile Datalink") + link_16_surrogate_for_non_nato_tdl_terminal = EnumValue(33, "Link 16 Surrogate for Non-NATO TDL Terminal") + mq_1_9_c_band_los_datalink = EnumValue(34, "MQ-1/9 C-Band LOS Datalink") + mq_1_9_ku_band_satcom_datalink = EnumValue(35, "MQ-1/9 Ku-Band SATCOM Datalink") + air_to_ground_weapon_datalink = EnumValue(36, "Air-to-Ground Weapon Datalink") + automatic_identification_system_ais = EnumValue(37, "Automatic Identification System (AIS)") + jpals_data_link = EnumValue(38, "JPALS Data Link") + combat_search_and_rescue_csar_radio = EnumValue(40, "Combat Search and Rescue (CSAR) Radio") + counter_unmanned_aircraft_system_c_uas_radio = EnumValue(41, "Counter Unmanned Aircraft System (C-UAS) Radio") + emergency_position_indicating_radio_beacons_epirb = EnumValue(42, "Emergency Position-Indicating Radio Beacons (EPIRB)") + electronic_attack_systems = EnumValue(50, "Electronic Attack Systems") + tactical_targeting_network_technology_ttnt = EnumValue(51, "Tactical Targeting Network Technology (TTNT)") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/radio_subcategory.py b/dis/siso_ref_010/enums/radio_subcategory.py new file mode 100644 index 0000000..c113610 --- /dev/null +++ b/dis/siso_ref_010/enums/radio_subcategory.py @@ -0,0 +1,175 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 23, marshal size 8; + * RadioSubcategory has 60 enumerations total. + * JETDS Specific Series are reserved in the range 11-100. Each set allows for 255 radios. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class RadioSubcategory(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + joint_electronics_type_designation_system_jetds_non_specific_series = EnumValue(1, "Joint Electronics Type Designation System (JETDS) Non-specific Series") + manufacturer_designation = EnumValue(2, "Manufacturer Designation") + national_designation = EnumValue(3, "National Designation") + jetds_arc_set_1 = EnumValue(11, "JETDS ARC Set 1") + jetds_arc_set_2 = EnumValue(12, "JETDS ARC Set 2") + jetds_arc_set_3 = EnumValue(13, "JETDS ARC Set 3") + jetds_arc_set_4 = EnumValue(14, "JETDS ARC Set 4") + jetds_brc_set_1 = EnumValue(15, "JETDS BRC Set 1") + jetds_brc_set_2 = EnumValue(16, "JETDS BRC Set 2") + jetds_brc_set_3 = EnumValue(17, "JETDS BRC Set 3") + jetds_brc_set_4 = EnumValue(18, "JETDS BRC Set 4") + jetds_crc_set_1 = EnumValue(19, "JETDS CRC Set 1") + jetds_crc_set_2 = EnumValue(20, "JETDS CRC Set 2") + jetds_crc_set_3 = EnumValue(21, "JETDS CRC Set 3") + jetds_crc_set_4 = EnumValue(22, "JETDS CRC Set 4") + jetds_drc_set_1 = EnumValue(23, "JETDS DRC Set 1") + jetds_drc_set_2 = EnumValue(24, "JETDS DRC Set 2") + jetds_drc_set_3 = EnumValue(25, "JETDS DRC Set 3") + jetds_drc_set_4 = EnumValue(26, "JETDS DRC Set 4") + jetds_frc_set_1 = EnumValue(27, "JETDS FRC Set 1") + jetds_frc_set_2 = EnumValue(28, "JETDS FRC Set 2") + jetds_frc_set_3 = EnumValue(29, "JETDS FRC Set 3") + jetds_frc_set_4 = EnumValue(30, "JETDS FRC Set 4") + jetds_grc_set_1 = EnumValue(31, "JETDS GRC Set 1") + jetds_grc_set_2 = EnumValue(32, "JETDS GRC Set 2") + jetds_grc_set_3 = EnumValue(33, "JETDS GRC Set 3") + jetds_grc_set_4 = EnumValue(34, "JETDS GRC Set 4") + jetds_krc_set_1 = EnumValue(35, "JETDS KRC Set 1") + jetds_krc_set_2 = EnumValue(36, "JETDS KRC Set 2") + jetds_krc_set_3 = EnumValue(37, "JETDS KRC Set 3") + jetds_krc_set_4 = EnumValue(38, "JETDS KRC Set 4") + jetds_mrc_set_1 = EnumValue(39, "JETDS MRC Set 1") + jetds_mrc_set_2 = EnumValue(40, "JETDS MRC Set 2") + jetds_mrc_set_3 = EnumValue(41, "JETDS MRC Set 3") + jetds_mrc_set_4 = EnumValue(42, "JETDS MRC Set 4") + jetds_prc_set_1 = EnumValue(43, "JETDS PRC Set 1") + jetds_prc_set_2 = EnumValue(44, "JETDS PRC Set 2") + jetds_prc_set_3 = EnumValue(45, "JETDS PRC Set 3") + jetds_prc_set_4 = EnumValue(46, "JETDS PRC Set 4") + jetds_src_set_1 = EnumValue(47, "JETDS SRC Set 1") + jetds_src_set_2 = EnumValue(48, "JETDS SRC Set 2") + jetds_src_set_3 = EnumValue(49, "JETDS SRC Set 3") + jetds_src_set_4 = EnumValue(50, "JETDS SRC Set 4") + jetds_trc_set_1 = EnumValue(51, "JETDS TRC Set 1") + jetds_trc_set_2 = EnumValue(52, "JETDS TRC Set 2") + jetds_trc_set_3 = EnumValue(53, "JETDS TRC Set 3") + jetds_trc_set_4 = EnumValue(54, "JETDS TRC Set 4") + jetds_vrc_set_1 = EnumValue(55, "JETDS VRC Set 1") + jetds_vrc_set_2 = EnumValue(56, "JETDS VRC Set 2") + jetds_vrc_set_3 = EnumValue(57, "JETDS VRC Set 3") + jetds_vrc_set_4 = EnumValue(58, "JETDS VRC Set 4") + jetds_wrc_set_1 = EnumValue(59, "JETDS WRC Set 1") + jetds_wrc_set_2 = EnumValue(60, "JETDS WRC Set 2") + jetds_wrc_set_3 = EnumValue(61, "JETDS WRC Set 3") + jetds_wrc_set_4 = EnumValue(62, "JETDS WRC Set 4") + jetds_zrc_set_1 = EnumValue(63, "JETDS ZRC Set 1") + jetds_zrc_set_2 = EnumValue(64, "JETDS ZRC Set 2") + jetds_zrc_set_3 = EnumValue(65, "JETDS ZRC Set 3") + jetds_zrc_set_4 = EnumValue(66, "JETDS ZRC Set 4") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/receiver_receiver_state.py b/dis/siso_ref_010/enums/receiver_receiver_state.py new file mode 100644 index 0000000..4d5c47c --- /dev/null +++ b/dis/siso_ref_010/enums/receiver_receiver_state.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 179, + * marshal size 16; + * ReceiverReceiverState has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ReceiverReceiverState(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + off = EnumValue(0, "Off") + on_but_not_receiving = EnumValue(1, "On but not receiving") + on_and_receiving = EnumValue(2, "On and receiving") + default = off + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/record_query_revent_type.py b/dis/siso_ref_010/enums/record_query_revent_type.py new file mode 100644 index 0000000..42c7923 --- /dev/null +++ b/dis/siso_ref_010/enums/record_query_revent_type.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 334, + * marshal size 16; + * RecordQueryREventType has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class RecordQueryREventType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + periodic = EnumValue(0, "Periodic") + internal_entity_state_data = EnumValue(1, "Internal Entity State Data") + default = periodic + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/record_revent_type.py b/dis/siso_ref_010/enums/record_revent_type.py new file mode 100644 index 0000000..8a96c2e --- /dev/null +++ b/dis/siso_ref_010/enums/record_revent_type.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 333, + * marshal size 16; + * RecordREventType has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class RecordREventType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/repair_complete_repair.py b/dis/siso_ref_010/enums/repair_complete_repair.py new file mode 100644 index 0000000..d73a981 --- /dev/null +++ b/dis/siso_ref_010/enums/repair_complete_repair.py @@ -0,0 +1,219 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 64, + * marshal size 16; + * RepairCompleteRepair has 84 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class RepairCompleteRepair(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_repairs_performed = EnumValue(0, "no repairs performed") + all_requested_repairs_performed = EnumValue(1, "all requested repairs performed") + motor_engine = EnumValue(10, "motor / engine") + starter = EnumValue(20, "starter") + alternator = EnumValue(30, "alternator") + generator = EnumValue(40, "generator") + battery = EnumValue(50, "battery") + engine_coolant_leak = EnumValue(60, "engine-coolant leak") + fuel_filter = EnumValue(70, "fuel filter") + transmission_oil_leak = EnumValue(80, "transmission-oil leak") + engine_oil_leak = EnumValue(90, "engine-oil leak") + pumps = EnumValue(100, "pumps") + filters = EnumValue(110, "filters") + transmission = EnumValue(120, "transmission") + brakes = EnumValue(130, "brakes") + suspension_system = EnumValue(140, "suspension system") + oil_filter = EnumValue(150, "oil filter") + hull = EnumValue(1000, "hull") + airframe = EnumValue(1010, "airframe") + truck_body = EnumValue(1020, "truck body") + tank_body = EnumValue(1030, "tank body") + trailer_body = EnumValue(1040, "trailer body") + turret = EnumValue(1050, "turret") + propeller = EnumValue(1500, "propeller") + filters_2 = EnumValue(1520, "filters") + wheels = EnumValue(1540, "wheels") + tire = EnumValue(1550, "tire") + track = EnumValue(1560, "track") + gun_elevation_drive = EnumValue(2000, "gun elevation drive") + gun_stabilization_system = EnumValue(2010, "gun stabilization system") + gunners_primary_sight_gps = EnumValue(2020, "gunner's primary sight (GPS)") + commanders_extension_to_the_gps = EnumValue(2030, "commander's extension to the GPS") + loading_mechanism = EnumValue(2040, "loading mechanism") + gunners_auxiliary_sight = EnumValue(2050, "gunner's auxiliary sight") + gunners_control_panel = EnumValue(2060, "gunner's control panel") + gunners_control_assembly_handles = EnumValue(2070, "gunner's control assembly handle(s)") + commanders_control_handles_assembly = EnumValue(2090, "commander's control handles/assembly") + commanders_weapon_station = EnumValue(2100, "commander's weapon station") + commanders_independent_thermal_viewer_citv = EnumValue(2110, "commander's independent thermal viewer (CITV)") + general_weapons = EnumValue(2120, "general weapons") + fuel_transfer_pump = EnumValue(4000, "fuel transfer pump") + fuel_lines = EnumValue(4010, "fuel lines") + gauges = EnumValue(4020, "gauges") + general_fuel_system = EnumValue(4030, "general fuel system") + electronic_warfare_systems = EnumValue(4500, "electronic warfare systems") + detection_systems = EnumValue(4600, "detection systems") + detection_systems_radio_frequency = EnumValue(4610, "detection systems, radio frequency") + detection_systems_microwave = EnumValue(4620, "detection systems, microwave") + detection_systems_infrared = EnumValue(4630, "detection systems, infrared") + detection_systems_laser = EnumValue(4640, "detection systems, laser") + range_finders = EnumValue(4700, "range finders") + range_only_radar = EnumValue(4710, "range-only radar") + laser_range_finder = EnumValue(4720, "laser range finder") + electronic_systems = EnumValue(4800, "electronic systems") + electronics_systems_radio_frequency = EnumValue(4810, "electronics systems, radio frequency") + electronics_systems_microwave = EnumValue(4820, "electronics systems, microwave") + electronics_systems_infrared = EnumValue(4830, "electronics systems, infrared") + electronics_systems_laser = EnumValue(4840, "electronics systems, laser") + radios = EnumValue(5000, "radios") + communication_systems = EnumValue(5010, "communication systems") + intercoms = EnumValue(5100, "intercoms") + encoders = EnumValue(5200, "encoders") + encryption_devices = EnumValue(5250, "encryption devices") + decoders = EnumValue(5300, "decoders") + decryption_devices = EnumValue(5350, "decryption devices") + computers = EnumValue(5500, "computers") + navigation_and_control_systems = EnumValue(6000, "navigation and control systems") + fire_control_systems = EnumValue(6500, "fire control systems") + air_supply = EnumValue(8000, "air supply") + filters_3 = EnumValue(8010, "filters") + water_supply = EnumValue(8020, "water supply") + refrigeration_system = EnumValue(8030, "refrigeration system") + chemical_biological_and_radiological_protection = EnumValue(8040, "chemical, biological, and radiological protection") + water_wash_down_systems = EnumValue(8050, "water wash down systems") + decontamination_systems = EnumValue(8060, "decontamination systems") + water_supply_2 = EnumValue(9000, "water supply") + cooling_system = EnumValue(9010, "cooling system") + winches = EnumValue(9020, "winches") + catapults = EnumValue(9030, "catapults") + cranes = EnumValue(9040, "cranes") + launchers = EnumValue(9050, "launchers") + life_boats = EnumValue(10000, "life boats") + landing_craft = EnumValue(10010, "landing craft") + ejection_seats = EnumValue(10020, "ejection seats") + default = no_repairs_performed + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/repair_groups.py b/dis/siso_ref_010/enums/repair_groups.py new file mode 100644 index 0000000..6d295a8 --- /dev/null +++ b/dis/siso_ref_010/enums/repair_groups.py @@ -0,0 +1,145 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 272, + * marshal size 8; + * RepairGroups has 10 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class RepairGroups(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + general_repair_codes = EnumValue(0, "General Repair Codes") + drive_train = EnumValue(1, "Drive Train") + hull_airframe_body = EnumValue(2, "Hull/Airframe/Body") + interfaces_with_environment = EnumValue(3, "Interfaces with Environment") + weapons = EnumValue(4, "Weapons") + fuel_systems = EnumValue(5, "Fuel Systems") + electronics = EnumValue(6, "Electronics") + life_support_systems = EnumValue(7, "Life Support Systems") + hydraulic_systems_and_actuators = EnumValue(8, "Hydraulic Systems and Actuators") + auxiliary_craft = EnumValue(9, "Auxiliary Craft") + default = general_repair_codes + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/repair_response_repair_result.py b/dis/siso_ref_010/enums/repair_response_repair_result.py new file mode 100644 index 0000000..775e773 --- /dev/null +++ b/dis/siso_ref_010/enums/repair_response_repair_result.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 65, + * marshal size 8; + * RepairResponseRepairResult has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class RepairResponseRepairResult(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "other") + repair_ended = EnumValue(1, "repair ended") + invalid_repair = EnumValue(2, "invalid repair") + repair_interrupted = EnumValue(3, "repair interrupted") + service_canceled_by_the_supplier = EnumValue(4, "service canceled by the supplier") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/reply_amplification.py b/dis/siso_ref_010/enums/reply_amplification.py new file mode 100644 index 0000000..eb9431f --- /dev/null +++ b/dis/siso_ref_010/enums/reply_amplification.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 373, + * marshal size 8; + * ReplyAmplification has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ReplyAmplification(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + complete = EnumValue(1, "Complete") + limted = EnumValue(2, "Limted") + unable_to_respond = EnumValue(3, "Unable to Respond") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/required_reliability_service.py b/dis/siso_ref_010/enums/required_reliability_service.py new file mode 100644 index 0000000..e3408e0 --- /dev/null +++ b/dis/siso_ref_010/enums/required_reliability_service.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 74, + * marshal size 8; + * RequiredReliabilityService has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class RequiredReliabilityService(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + acknowledged = EnumValue(0, "Acknowledged") + unacknowledged = EnumValue(1, "Unacknowledged") + default = acknowledged + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/season.py b/dis/siso_ref_010/enums/season.py new file mode 100644 index 0000000..a0a4eaf --- /dev/null +++ b/dis/siso_ref_010/enums/season.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 465, + * marshal size 2; + * Season has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class Season(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + summer = EnumValue(0, "Summer") + winter = EnumValue(1, "Winter") + spring = EnumValue(2, "Spring") + autumn = EnumValue(3, "Autumn") + default = summer + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/sensor_emitter_appearance.py b/dis/siso_ref_010/enums/sensor_emitter_appearance.py new file mode 100644 index 0000000..eb3e1a2 --- /dev/null +++ b/dis/siso_ref_010/enums/sensor_emitter_appearance.py @@ -0,0 +1,264 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_paint_scheme import AppearancePaintScheme +from .appearance_damage import AppearanceDamage +from .appearance_trailing_effects import AppearanceTrailingEffects +from .appearance_camouflage_type import AppearanceCamouflageType +from .appearance_concealed_position import AppearanceConcealedPosition +from .appearance_entityor_object_state import AppearanceEntityorObjectState + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 43, marshal size 32, + * SensorEmitterAppearance + */ + +""" + +class SensorEmitterAppearanceBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes the visual paint design, use {@link AppearancePaintScheme} values for this field + ("_paintScheme", UByte, 1), + + # (bit position 1, boolean) Describes whether it is capable of moving on its own power, use {@link UInt8} values for this field + ("_mobilityKilled", UByte, 1), + + # (bit position 2, boolean) Describes whether it is capable of carrying out its mission (e.g., damaged antenna), use {@link UInt8} values for this field + ("_missionKilled", UByte, 1), + + # (bit position 3, length=2) Describes the damaged appearance, use {@link AppearanceDamage} values for this field + ("_damage", UByte, 2), + + # (bit position 5, boolean) Describes whether or not smoke is emanating from the entity, use {@link UInt8} values for this field + ("_isSmokeEmanating", UByte, 1), + + # (bit position 6, boolean) Describes whether or not the engine is emitting smoke, use {@link UInt8} values for this field + ("_isEngineEmittingSmoke", UByte, 1), + + # (bit position 7, length=2) Describes the size of the trailing effects, use {@link AppearanceTrailingEffects} values for this field + ("_trailingEffects", UByte, 2), + + # (bit position 12, boolean) Describes whether the lights are on or off, use {@link UInt8} values for this field + ("_lightsOn", UByte, 1), + + # (bit position 15, boolean) Describes whether the entity is burning and flames are visible, use {@link UInt8} values for this field + ("_isFlaming", UByte, 1), + + # (bit position 16, boolean) Describes whether the antenna is raised or not, use {@link UInt8} values for this field + ("_antennaRaised", UByte, 1), + + # (bit position 17, length=2) Describes the camouflage color, use {@link AppearanceCamouflageType} values for this field + ("_camouflageType", UByte, 2), + + # (bit position 19, boolean) Describes the type of concealment, use {@link AppearanceConcealedPosition} values for this field + ("_concealedPosition", UByte, 1), + + # (bit position 21, boolean) Describes whether the entity is frozen and should not be dead reckoned, use {@link UInt8} values for this field + ("_isFrozen", UByte, 1), + + # (bit position 22, boolean) Describes whether the power plant is on or off, use {@link UInt8} values for this field + ("_powerPlantOn", UByte, 1), + + # (bit position 23, boolean) Describes whether the entity is active or deactivated, use {@link AppearanceEntityorObjectState} values for this field + ("_state", UByte, 1), + + # (bit position 24, boolean) Describes whether or not the tent is extended, use {@link UInt8} values for this field + ("_tentExtended", UByte, 1), + + # (bit position 26, boolean) Describes whether blackout lights are on or off, use {@link UInt8} values for this field + ("_blackoutLightsOn", UByte, 1), + + # (bit position 29, boolean) Describes whether interior lights are on or off, use {@link UInt8} values for this field + ("_interiorLightsOn", UByte, 1) + ] + +class SensorEmitterAppearance(ctypes.Union): + _fields_ = [ + ("capabilities", SensorEmitterAppearanceBitField), + ("asbyte", UInt8) + ] + + def set_paintScheme(self, value : AppearancePaintScheme): + self.capabilities._paintScheme = int(value) + def get_paintScheme(self) -> AppearancePaintScheme: + return AppearancePaintScheme.get_enum(self._paintScheme) + PaintScheme = property(get_paintScheme, set_paintScheme) + + def set_mobilityKilled(self, value : UInt8): + self.capabilities._mobilityKilled = int(value) + def get_mobilityKilled(self) -> UInt8: + return self.capabilities._mobilityKilled + MobilityKilled = property(get_mobilityKilled, set_mobilityKilled) + + def set_missionKilled(self, value : UInt8): + self.capabilities._missionKilled = int(value) + def get_missionKilled(self) -> UInt8: + return self.capabilities._missionKilled + MissionKilled = property(get_missionKilled, set_missionKilled) + + def set_damage(self, value : AppearanceDamage): + self.capabilities._damage = int(value) + def get_damage(self) -> AppearanceDamage: + return AppearanceDamage.get_enum(self._damage) + Damage = property(get_damage, set_damage) + + def set_isSmokeEmanating(self, value : UInt8): + self.capabilities._isSmokeEmanating = int(value) + def get_isSmokeEmanating(self) -> UInt8: + return self.capabilities._isSmokeEmanating + IsSmokeEmanating = property(get_isSmokeEmanating, set_isSmokeEmanating) + + def set_isEngineEmittingSmoke(self, value : UInt8): + self.capabilities._isEngineEmittingSmoke = int(value) + def get_isEngineEmittingSmoke(self) -> UInt8: + return self.capabilities._isEngineEmittingSmoke + IsEngineEmittingSmoke = property(get_isEngineEmittingSmoke, set_isEngineEmittingSmoke) + + def set_trailingEffects(self, value : AppearanceTrailingEffects): + self.capabilities._trailingEffects = int(value) + def get_trailingEffects(self) -> AppearanceTrailingEffects: + return AppearanceTrailingEffects.get_enum(self._trailingEffects) + TrailingEffects = property(get_trailingEffects, set_trailingEffects) + + def set_lightsOn(self, value : UInt8): + self.capabilities._lightsOn = int(value) + def get_lightsOn(self) -> UInt8: + return self.capabilities._lightsOn + LightsOn = property(get_lightsOn, set_lightsOn) + + def set_isFlaming(self, value : UInt8): + self.capabilities._isFlaming = int(value) + def get_isFlaming(self) -> UInt8: + return self.capabilities._isFlaming + IsFlaming = property(get_isFlaming, set_isFlaming) + + def set_antennaRaised(self, value : UInt8): + self.capabilities._antennaRaised = int(value) + def get_antennaRaised(self) -> UInt8: + return self.capabilities._antennaRaised + AntennaRaised = property(get_antennaRaised, set_antennaRaised) + + def set_camouflageType(self, value : AppearanceCamouflageType): + self.capabilities._camouflageType = int(value) + def get_camouflageType(self) -> AppearanceCamouflageType: + return AppearanceCamouflageType.get_enum(self._camouflageType) + CamouflageType = property(get_camouflageType, set_camouflageType) + + def set_concealedPosition(self, value : AppearanceConcealedPosition): + self.capabilities._concealedPosition = int(value) + def get_concealedPosition(self) -> AppearanceConcealedPosition: + return AppearanceConcealedPosition.get_enum(self._concealedPosition) + ConcealedPosition = property(get_concealedPosition, set_concealedPosition) + + def set_isFrozen(self, value : UInt8): + self.capabilities._isFrozen = int(value) + def get_isFrozen(self) -> UInt8: + return self.capabilities._isFrozen + IsFrozen = property(get_isFrozen, set_isFrozen) + + def set_powerPlantOn(self, value : UInt8): + self.capabilities._powerPlantOn = int(value) + def get_powerPlantOn(self) -> UInt8: + return self.capabilities._powerPlantOn + PowerPlantOn = property(get_powerPlantOn, set_powerPlantOn) + + def set_state(self, value : AppearanceEntityorObjectState): + self.capabilities._state = int(value) + def get_state(self) -> AppearanceEntityorObjectState: + return AppearanceEntityorObjectState.get_enum(self._state) + State = property(get_state, set_state) + + def set_tentExtended(self, value : UInt8): + self.capabilities._tentExtended = int(value) + def get_tentExtended(self) -> UInt8: + return self.capabilities._tentExtended + TentExtended = property(get_tentExtended, set_tentExtended) + + def set_blackoutLightsOn(self, value : UInt8): + self.capabilities._blackoutLightsOn = int(value) + def get_blackoutLightsOn(self) -> UInt8: + return self.capabilities._blackoutLightsOn + BlackoutLightsOn = property(get_blackoutLightsOn, set_blackoutLightsOn) + + def set_interiorLightsOn(self, value : UInt8): + self.capabilities._interiorLightsOn = int(value) + def get_interiorLightsOn(self) -> UInt8: + return self.capabilities._interiorLightsOn + InteriorLightsOn = property(get_interiorLightsOn, set_interiorLightsOn) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "PaintScheme : " + self.PaintScheme.get_description + "\n" + outputStream += "MobilityKilled : " + str(self.MobilityKilled) + "\n" + outputStream += "MissionKilled : " + str(self.MissionKilled) + "\n" + outputStream += "Damage : " + self.Damage.get_description + "\n" + outputStream += "IsSmokeEmanating : " + str(self.IsSmokeEmanating) + "\n" + outputStream += "IsEngineEmittingSmoke : " + str(self.IsEngineEmittingSmoke) + "\n" + outputStream += "TrailingEffects : " + self.TrailingEffects.get_description + "\n" + outputStream += "LightsOn : " + str(self.LightsOn) + "\n" + outputStream += "IsFlaming : " + str(self.IsFlaming) + "\n" + outputStream += "AntennaRaised : " + str(self.AntennaRaised) + "\n" + outputStream += "CamouflageType : " + self.CamouflageType.get_description + "\n" + outputStream += "ConcealedPosition : " + self.ConcealedPosition.get_description + "\n" + outputStream += "IsFrozen : " + str(self.IsFrozen) + "\n" + outputStream += "PowerPlantOn : " + str(self.PowerPlantOn) + "\n" + outputStream += "State : " + self.State.get_description + "\n" + outputStream += "TentExtended : " + str(self.TentExtended) + "\n" + outputStream += "BlackoutLightsOn : " + str(self.BlackoutLightsOn) + "\n" + outputStream += "InteriorLightsOn : " + str(self.InteriorLightsOn) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/sensor_emitter_capabilities.py b/dis/siso_ref_010/enums/sensor_emitter_capabilities.py new file mode 100644 index 0000000..63362a7 --- /dev/null +++ b/dis/siso_ref_010/enums/sensor_emitter_capabilities.py @@ -0,0 +1,118 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 462, marshal size 32, + * SensorEmitterCapabilities + */ + +""" + +class SensorEmitterCapabilitiesBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=5) This entry is reserved for backward compatibility and may not be reused, use {@link UInt8} values for this field + ("_reserved", UByte, 5), + + # (bit position 6, boolean) The Entity is able to be carried as a sling load payload. The extended appearance record (if available) will identify if it is currently sling loaded and entity association and/or entity offset records (if available) will provide additional sling load details (such as carrier)., use {@link UInt8} values for this field + ("_slingLoadable", UByte, 1), + + # (bit position 7, boolean) The Entity is an IED or contains an IED. The extended appearance record (if available) will identify how well hidden the IED is on the Entity. An Attached Part (if applicable, for instance a jury-rigged munition does not apply here) will identify the IED explicitly., use {@link UInt8} values for this field + ("_iEDPresenceIndicator", UByte, 1), + + # (bit position 8, boolean) The Entity (normally a virtual manned module) can be task organized into an existing mixed mode unit (where mixed mode is intended to comprise a combination of computer-generated forces and virtual or even live forces)., use {@link UInt8} values for this field + ("_taskOrganizable", UByte, 1) + ] + +class SensorEmitterCapabilities(ctypes.Union): + _fields_ = [ + ("capabilities", SensorEmitterCapabilitiesBitField), + ("asbyte", UInt8) + ] + + def set_reserved(self, value : UInt8): + self.capabilities._reserved = int(value) + def get_reserved(self) -> UInt8: + return self.capabilities._reserved + Reserved = property(get_reserved, set_reserved) + + def set_slingLoadable(self, value : UInt8): + self.capabilities._slingLoadable = int(value) + def get_slingLoadable(self) -> UInt8: + return self.capabilities._slingLoadable + SlingLoadable = property(get_slingLoadable, set_slingLoadable) + + def set_iEDPresenceIndicator(self, value : UInt8): + self.capabilities._iEDPresenceIndicator = int(value) + def get_iEDPresenceIndicator(self) -> UInt8: + return self.capabilities._iEDPresenceIndicator + IEDPresenceIndicator = property(get_iEDPresenceIndicator, set_iEDPresenceIndicator) + + def set_taskOrganizable(self, value : UInt8): + self.capabilities._taskOrganizable = int(value) + def get_taskOrganizable(self) -> UInt8: + return self.capabilities._taskOrganizable + TaskOrganizable = property(get_taskOrganizable, set_taskOrganizable) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Reserved : " + str(self.Reserved) + "\n" + outputStream += "SlingLoadable : " + str(self.SlingLoadable) + "\n" + outputStream += "IEDPresenceIndicator : " + str(self.IEDPresenceIndicator) + "\n" + outputStream += "TaskOrganizable : " + str(self.TaskOrganizable) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/sensor_emitter_category.py b/dis/siso_ref_010/enums/sensor_emitter_category.py new file mode 100644 index 0000000..3c1bb25 --- /dev/null +++ b/dis/siso_ref_010/enums/sensor_emitter_category.py @@ -0,0 +1,152 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 28, + * marshal size 8; + * SensorEmitterCategory has 17 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SensorEmitterCategory(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + multi_spectral = EnumValue(1, "Multi-spectral") + rf_active = EnumValue(2, "RF Active") + rf_passive_intercept_and_df = EnumValue(3, "RF Passive (intercept and DF)") + optical_direct_viewing_with_or_without_optics = EnumValue(4, "Optical (direct viewing with or without optics)") + electro_optical = EnumValue(5, "Electro-Optical") + seismic = EnumValue(6, "Seismic") + chemical_point_detector = EnumValue(7, "Chemical, point detector") + chemical_standoff = EnumValue(8, "Chemical, standoff") + thermal_temperature_sensing = EnumValue(9, "Thermal (temperature sensing)") + acoustic_active = EnumValue(10, "Acoustic, Active") + acoustic_passive = EnumValue(11, "Acoustic, Passive") + contact_pressure_physical_hydrostatic_barometric = EnumValue(12, "Contact/Pressure (physical, hydrostatic, barometric)") + electro_magnetic_radiation_gamma_radiation = EnumValue(13, "Electro-Magnetic Radiation (gamma radiation)") + particle_radiation_neutrons_alpha_beta_particles = EnumValue(14, "Particle Radiation (Neutrons, alpha, beta particles)") + magnetic = EnumValue(15, "Magnetic") + gravitational = EnumValue(16, "Gravitational") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/sensor_on_off_status.py b/dis/siso_ref_010/enums/sensor_on_off_status.py new file mode 100644 index 0000000..f078342 --- /dev/null +++ b/dis/siso_ref_010/enums/sensor_on_off_status.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 331, + * marshal size 8; + * SensorOnOffStatus has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SensorOnOffStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + off = EnumValue(0, "Off") + on = EnumValue(1, "On") + default = off + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/sensor_record_sensor_type_other_active_sensors.py b/dis/siso_ref_010/enums/sensor_record_sensor_type_other_active_sensors.py new file mode 100644 index 0000000..7a06c20 --- /dev/null +++ b/dis/siso_ref_010/enums/sensor_record_sensor_type_other_active_sensors.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 325, + * marshal size 16; + * SensorRecordSensorTypeOtherActiveSensors has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SensorRecordSensorTypeOtherActiveSensors(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + undefined = EnumValue(0, "Undefined") + default = undefined + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/sensor_record_sensor_type_passive_sensors.py b/dis/siso_ref_010/enums/sensor_record_sensor_type_passive_sensors.py new file mode 100644 index 0000000..f4e28be --- /dev/null +++ b/dis/siso_ref_010/enums/sensor_record_sensor_type_passive_sensors.py @@ -0,0 +1,204 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 326, + * marshal size 16; + * SensorRecordSensorTypePassiveSensors has 69 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SensorRecordSensorTypePassiveSensors(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + alr_400 = EnumValue(60000, "ALR-400") + an_aar_47 = EnumValue(60001, "AN/AAR-47") + an_aar_50 = EnumValue(60002, "AN/AAR-50") + an_aar_54 = EnumValue(60003, "AN/AAR-54") + an_aar_56 = EnumValue(60004, "AN/AAR-56") + an_aar_57 = EnumValue(60005, "AN/AAR-57") + an_alq_142 = EnumValue(60006, "AN/ALQ-142") + an_alr_45 = EnumValue(60007, "AN/ALR-45") + an_alr_46 = EnumValue(60008, "AN/ALR-46") + an_alr_56 = EnumValue(60009, "AN/ALR-56") + an_alr_59 = EnumValue(60010, "AN/ALR-59") + an_alr_64 = EnumValue(60011, "AN/ALR-64") + an_alr_66 = EnumValue(60012, "AN/ALR-66") + an_alr_67 = EnumValue(60013, "AN/ALR-67") + an_alr_69 = EnumValue(60014, "AN/ALR-69") + an_alr_73 = EnumValue(60015, "AN/ALR-73") + an_alr_76 = EnumValue(60016, "AN/ALR-76") + an_alr_91 = EnumValue(60017, "AN/ALR-91") + an_alr_93 = EnumValue(60018, "AN/ALR-93") + an_alr_94 = EnumValue(60019, "AN/ALR-94") + an_alr_801 = EnumValue(60020, "AN/ALR-801") + an_apr_39 = EnumValue(60021, "AN/APR-39") + an_ayr_2 = EnumValue(60022, "AN/AYR-2") + ari_18223 = EnumValue(60023, "ARI 18223") + bow_21 = EnumValue(60024, "BOW-21") + chaparral_irst = EnumValue(60025, "Chaparral IRST") + natoid_flanker_irst = EnumValue(60026, "NATOID_Flanker IRST") + natoid_foxbat_irst = EnumValue(60027, "NATOID_Foxbat IRST") + natoid_foxhound_irst = EnumValue(60028, "NATOID_Foxhound IRST") + natoid_fulcrum_irst = EnumValue(60029, "NATOID_Fulcrum IRST") + natoid_havoc_irst = EnumValue(60030, "NATOID_Havoc IRST") + natoid_hind_irst = EnumValue(60031, "NATOID_Hind IRST") + kj_200 = EnumValue(60032, "KJ-200") + kj_8602 = EnumValue(60033, "KJ-8602") + l_150_pastel = EnumValue(60034, "L-150 Pastel") + serval = EnumValue(60035, "Serval") + sherloc = EnumValue(60036, "Sherloc") + sherlocvf = EnumValue(60037, "Sherlocvf") + sirena_2 = EnumValue(60038, "Sirena-2") + sirena_3 = EnumValue(60039, "Sirena-3") + sirena_3m = EnumValue(60040, "Sirena-3M") + sky_guardian = EnumValue(60041, "Sky Guardian") + spo_15 = EnumValue(60042, "SPO-15") + sps_200 = EnumValue(60043, "SPS-200") + tarang = EnumValue(60044, "Tarang") + an_aaq_29a = EnumValue(60045, "AN/AAQ-29A") + _101ks_u_maw = EnumValue(60046, "101KS-U MAW") + commid_abrams_2gf_flir = EnumValue(60047, "COMMID_Abrams 2GF FLIR") + commid_abrams_3gf_flir = EnumValue(60048, "COMMID_Abrams 3GF FLIR") + an_aaq_13_lantirn_flir = EnumValue(60049, "AN/AAQ-13 LANTIRN FLIR") + an_alr_74 = EnumValue(60050, "AN/ALR-74") + an_alr_90 = EnumValue(60051, "AN/ALR-90") + an_apr_48 = EnumValue(60052, "AN/APR-48") + elt_156xv = EnumValue(60053, "ELT-156X(V)") + _101ks_v = EnumValue(60054, "101KS-V") + tp_23ml = EnumValue(60055, "TP-23ML") + commid_generic_flir = EnumValue(60056, "COMMID_Generic FLIR") + commid_generic_irst = EnumValue(60057, "COMMID_Generic IRST") + commid_generic_maws = EnumValue(60058, "COMMID_Generic MAWS") + commid_generic_rwr = EnumValue(60059, "COMMID_Generic RWR") + l_136_mak = EnumValue(60060, "L-136 Mak") + commid_leonardo_sass_irst = EnumValue(60061, "COMMID_Leonardo SASS IRST") + commid_osf_irst = EnumValue(60062, "COMMID_OSF IRST") + commid_pirate_irst = EnumValue(60063, "COMMID_Pirate IRST") + commid_reccelite = EnumValue(60064, "COMMID_RECCELITE") + commid_thales_nederland_sirius_irst = EnumValue(60065, "COMMID_Thales Nederland Sirius IRST") + tornado_rwr = EnumValue(60066, "Tornado RWR") + toes_521_flir = EnumValue(60067, "TOES-521 FLIR") + commid_safran_vampir_mb = EnumValue(60068, "COMMID_Safran Vampir_MB") + default = alr_400 + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/sensor_type_source.py b/dis/siso_ref_010/enums/sensor_type_source.py new file mode 100644 index 0000000..fe7d056 --- /dev/null +++ b/dis/siso_ref_010/enums/sensor_type_source.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 414, + * marshal size 8; + * SensorTypeSource has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SensorTypeSource(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other_active_sensors = EnumValue(0, "Other Active Sensors") + electromagnetic = EnumValue(1, "Electromagnetic") + passive_sensors = EnumValue(2, "Passive Sensors") + minefield_sensors = EnumValue(3, "Minefield Sensors") + underwater_acoustics = EnumValue(4, "Underwater Acoustics") + lasers = EnumValue(5, "Lasers") + default = other_active_sensors + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/separation_vppre_entity_indicator.py b/dis/siso_ref_010/enums/separation_vppre_entity_indicator.py new file mode 100644 index 0000000..3f9cb37 --- /dev/null +++ b/dis/siso_ref_010/enums/separation_vppre_entity_indicator.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 283, + * marshal size 8; + * SeparationVPPreEntityIndicator has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SeparationVPPreEntityIndicator(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + entity_id_existed_prior_to_separation_without_entity_state_pdu = EnumValue(1, "Entity ID Existed Prior to Separation without Entity State PDU") + entity_id_existed_prior_to_separation_with_entity_state_pdu_issued = EnumValue(2, "Entity ID Existed Prior to Separation with Entity State PDU Issued") + entity_initially_created_at_separation_event = EnumValue(3, "Entity Initially Created at Separation Event") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/separation_vpreasonfor_separation.py b/dis/siso_ref_010/enums/separation_vpreasonfor_separation.py new file mode 100644 index 0000000..47c9d03 --- /dev/null +++ b/dis/siso_ref_010/enums/separation_vpreasonfor_separation.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 282, + * marshal size 8; + * SeparationVPReasonforSeparation has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SeparationVPReasonforSeparation(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + attached_part_separation = EnumValue(1, "Attached Part Separation") + submunition_separation = EnumValue(2, "Submunition Separation") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/service_request_service_type_requested.py b/dis/siso_ref_010/enums/service_request_service_type_requested.py new file mode 100644 index 0000000..1756134 --- /dev/null +++ b/dis/siso_ref_010/enums/service_request_service_type_requested.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 63, + * marshal size 8; + * ServiceRequestServiceTypeRequested has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class ServiceRequestServiceTypeRequested(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + resupply = EnumValue(1, "Resupply") + repair = EnumValue(2, "Repair") + aerial_refueling_high_fidelity = EnumValue(3, "Aerial Refueling High Fidelity") + aerial_refueling_low_fidelity = EnumValue(4, "Aerial Refueling Low Fidelity") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/signal_encoding_class.py b/dis/siso_ref_010/enums/signal_encoding_class.py new file mode 100644 index 0000000..c643d7d --- /dev/null +++ b/dis/siso_ref_010/enums/signal_encoding_class.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 270, + * marshal size 2; + * SignalEncodingClass has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SignalEncodingClass(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + encoded_audio = EnumValue(0, "Encoded audio") + raw_binary_data = EnumValue(1, "Raw Binary Data") + application_specific_data = EnumValue(2, "Application-Specific Data") + database_index = EnumValue(3, "Database index") + default = encoded_audio + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/signal_encoding_type.py b/dis/siso_ref_010/enums/signal_encoding_type.py new file mode 100644 index 0000000..a4141a8 --- /dev/null +++ b/dis/siso_ref_010/enums/signal_encoding_type.py @@ -0,0 +1,149 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 271, + * marshal size 14; + * SignalEncodingType has 14 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SignalEncodingType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + _8_bit_mu_law_itu_t_g711 = EnumValue(1, "8-bit mu-law (ITU-T G.711)") + cvsd_mil_std_188_113 = EnumValue(2, "CVSD (MIL-STD-188-113)") + adpcm_itu_t_g726 = EnumValue(3, "ADPCM (ITU-T G.726)") + _16_bit_linear_pcm_2s_complement_big_endian = EnumValue(4, "16-bit Linear PCM 2s Complement, Big Endian") + _8_bit_linear_pcm_unsigned = EnumValue(5, "8-bit Linear PCM, Unsigned") + vq_vector_quantization = EnumValue(6, "VQ (Vector Quantization)") + unavailable_for_use = EnumValue(7, "(unavailable for use)") + gsm_full_rate_etsi_0610 = EnumValue(8, "GSM Full-Rate (ETSI 06.10)") + gsm_half_rate_etsi_0620 = EnumValue(9, "GSM Half-Rate (ETSI 06.20)") + speex_narrow_band = EnumValue(10, "Speex Narrow Band") + opus = EnumValue(11, "Opus") + lpc_10_fips_pub_137 = EnumValue(12, "LPC-10 (FIPS PUB 137)") + _16_bit_linear_pcm_2s_complement_little_endian = EnumValue(100, "16-bit Linear PCM 2s Complement, Little Endian") + unavailable_for_use_2 = EnumValue(255, "(unavailable for use)") + default = _8_bit_mu_law_itu_t_g711 + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/signal_tdltype.py b/dis/siso_ref_010/enums/signal_tdltype.py new file mode 100644 index 0000000..a56e193 --- /dev/null +++ b/dis/siso_ref_010/enums/signal_tdltype.py @@ -0,0 +1,232 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 178, + * marshal size 16; + * SignalTDLType has 97 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SignalTDLType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + padil = EnumValue(1, "PADIL") + nato_link_1 = EnumValue(2, "NATO Link-1") + atdl_1 = EnumValue(3, "ATDL-1") + link_11b_tadil_b = EnumValue(4, "Link 11B (TADIL B)") + situational_awareness_data_link_sadl = EnumValue(5, "Situational Awareness Data Link (SADL)") + link_16_legacy_format_jtids_tadil_j = EnumValue(6, "Link 16 Legacy Format (JTIDS/TADIL-J)") + link_16_legacy_format_jtids_fdl_tadil_j = EnumValue(7, "Link 16 Legacy Format (JTIDS/FDL/TADIL-J)") + link_11_tadil_a = EnumValue(8, "Link 11 (TADIL A)") + ijms = EnumValue(9, "IJMS") + link_4a_tadil_c = EnumValue(10, "Link 4A (TADIL C)") + link_4c = EnumValue(11, "Link 4C") + tibs = EnumValue(12, "TIBS") + atl = EnumValue(13, "ATL") + constant_source = EnumValue(14, "Constant Source") + abbreviated_command_and_control = EnumValue(15, "Abbreviated Command and Control") + milstar = EnumValue(16, "MILSTAR") + aths = EnumValue(17, "ATHS") + othgold = EnumValue(18, "OTHGOLD") + tacelint = EnumValue(19, "TACELINT") + weapons_data_link_aww_13 = EnumValue(20, "Weapons Data Link (AWW-13)") + abbreviated_command_and_control_2 = EnumValue(21, "Abbreviated Command and Control") + enhanced_position_location_reporting_system_eplrs = EnumValue(22, "Enhanced Position Location Reporting System (EPLRS)") + position_location_reporting_system_plrs = EnumValue(23, "Position Location Reporting System (PLRS)") + sincgars = EnumValue(24, "SINCGARS") + have_quick_i = EnumValue(25, "HAVE QUICK I") + have_quick_ii = EnumValue(26, "HAVE QUICK II") + saturn = EnumValue(27, "SATURN") + intra_flight_data_link_1 = EnumValue(28, "Intra-Flight Data Link 1") + intra_flight_data_link_2 = EnumValue(29, "Intra-Flight Data Link 2") + improved_data_modem_idm = EnumValue(30, "Improved Data Modem (IDM)") + air_force_application_program_development_afapd = EnumValue(31, "Air Force Application Program Development (AFAPD)") + cooperative_engagement_capability_cec = EnumValue(32, "Cooperative Engagement Capability (CEC)") + forward_area_air_defense_faad_data_link_fdl = EnumValue(33, "Forward Area Air Defense (FAAD) Data Link (FDL)") + ground_based_data_link_gbdl = EnumValue(34, "Ground Based Data Link (GBDL)") + intra_vehicular_info_system_ivis = EnumValue(35, "Intra Vehicular Info System (IVIS)") + marine_tactical_system_mts = EnumValue(36, "Marine Tactical System (MTS)") + tactical_fire_direction_system_tacfire = EnumValue(37, "Tactical Fire Direction System (TACFIRE)") + integrated_broadcast_service_ibs = EnumValue(38, "Integrated Broadcast Service (IBS)") + airborne_information_transfer_abit = EnumValue(39, "Airborne Information Transfer (ABIT)") + advanced_tactical_airborne_reconnaissance_system_atars_data_link = EnumValue(40, "Advanced Tactical Airborne Reconnaissance System (ATARS) Data Link") + battle_group_passive_horizon_extension_system_bgphes_data_link = EnumValue(41, "Battle Group Passive Horizon Extension System (BGPHES) Data Link") + common_high_bandwidth_data_link_chbdl = EnumValue(42, "Common High Bandwidth Data Link (CHBDL)") + guardrail_interoperable_data_link_idl = EnumValue(43, "Guardrail Interoperable Data Link (IDL)") + guardrail_common_sensor_system_one_css1_data_link = EnumValue(44, "Guardrail Common Sensor System One (CSS1) Data Link") + guardrail_common_sensor_system_two_css2_data_link = EnumValue(45, "Guardrail Common Sensor System Two (CSS2) Data Link") + guardrail_css2_multi_role_data_link_mrdl = EnumValue(46, "Guardrail CSS2 Multi-Role Data Link (MRDL)") + guardrail_css2_direct_air_to_satellite_relay_dasr_data_link = EnumValue(47, "Guardrail CSS2 Direct Air to Satellite Relay (DASR) Data Link") + line_of_sight_los_data_link_implementation_los_tether = EnumValue(48, "Line of Sight (LOS) Data Link Implementation (LOS tether)") + lightweight_cdl_lwcdl = EnumValue(49, "Lightweight CDL (LWCDL)") + l_52m_sr_71 = EnumValue(50, "L-52M (SR-71)") + rivet_reach_rivet_owl_data_link = EnumValue(51, "Rivet Reach/Rivet Owl Data Link") + senior_span = EnumValue(52, "Senior Span") + senior_spur = EnumValue(53, "Senior Spur") + senior_stretch = EnumValue(54, "Senior Stretch.") + senior_year_interoperable_data_link_idl = EnumValue(55, "Senior Year Interoperable Data Link (IDL)") + space_cdl = EnumValue(56, "Space CDL") + tr_1_mode_mist_airborne_data_link = EnumValue(57, "TR-1 mode MIST Airborne Data Link") + ku_band_satcom_data_link_implementation_uav = EnumValue(58, "Ku-band SATCOM Data Link Implementation (UAV)") + mission_equipment_control_data_link_mecdl = EnumValue(59, "Mission Equipment Control Data link (MECDL)") + radar_data_transmitting_set_data_link = EnumValue(60, "Radar Data Transmitting Set Data Link") + surveillance_and_control_data_link_scdl = EnumValue(61, "Surveillance and Control Data Link (SCDL)") + tactical_uav_video = EnumValue(62, "Tactical UAV Video") + uhf_satcom_data_link_implementation_uav = EnumValue(63, "UHF SATCOM Data Link Implementation (UAV)") + tactical_common_data_link_tcdl = EnumValue(64, "Tactical Common Data Link (TCDL)") + low_level_air_picture_interface_llapi = EnumValue(65, "Low Level Air Picture Interface (LLAPI)") + weapons_data_link_agm_130 = EnumValue(66, "Weapons Data Link (AGM-130)") + automatic_identification_system_ais = EnumValue(67, "Automatic Identification System (AIS)") + weapons_data_link_aim_120 = EnumValue(68, "Weapons Data Link (AIM-120)") + weapons_data_link_aim_9 = EnumValue(69, "Weapons Data Link (AIM-9)") + weapons_data_link_camm = EnumValue(70, "Weapons Data Link (CAMM)") + gc3 = EnumValue(99, "GC3") + link_16_standardized_format_jtids_mids_tadil_j = EnumValue(100, "Link 16 Standardized Format (JTIDS/MIDS/TADIL J)") + link_16_enhanced_data_rate_edr_jtids_mids_tadil_j = EnumValue(101, "Link 16 Enhanced Data Rate (EDR JTIDS/MIDS/TADIL-J)") + jtids_mids_net_data_load_tims_toms = EnumValue(102, "JTIDS/MIDS Net Data Load (TIMS/TOMS)") + link_22 = EnumValue(103, "Link 22") + afiwc_iads_communications_links = EnumValue(104, "AFIWC IADS Communications Links") + f_22_intra_flight_data_link_ifdl = EnumValue(105, "F-22 Intra-Flight Data Link (IFDL)") + l_band_satcom = EnumValue(106, "L-Band SATCOM") + tsaf_communications_link = EnumValue(107, "TSAF Communications Link") + enhanced_sincgars_73 = EnumValue(108, "Enhanced SINCGARS 7.3") + f_35_multifunction_advanced_data_link_madl = EnumValue(109, "F-35 Multifunction Advanced Data Link (MADL)") + cursor_on_target = EnumValue(110, "Cursor on Target") + all_purpose_structured_eurocontrol_surveillance_information_exchange_asterix = EnumValue(111, "All Purpose Structured Eurocontrol Surveillance Information Exchange (ASTERIX)") + variable_message_format_vmf_over_combat_net_radio_vmf_over_cnr = EnumValue(112, "Variable Message Format (VMF) over Combat Net Radio (VMF over CNR)") + link_16_surrogate_for_non_nato_tdl = EnumValue(113, "Link 16 Surrogate for Non-NATO TDL") + mq_1_9_c_band_los_uplink = EnumValue(114, "MQ-1/9 C-Band LOS Uplink") + mq_1_9_c_band_los_downlink = EnumValue(115, "MQ-1/9 C-Band LOS Downlink") + mq_1_9_ku_band_satcom_uplink = EnumValue(116, "MQ-1/9 Ku-Band SATCOM Uplink") + mq_1_9_ku_band_satcom_downlink = EnumValue(117, "MQ-1/9 Ku-Band SATCOM Downlink") + weapons_datalink_sdb_ii = EnumValue(118, "Weapons Datalink (SDB II)") + jtac_sa_uplink = EnumValue(119, "JTAC SA Uplink") + common_interactive_broadcast_cib = EnumValue(120, "Common Interactive Broadcast (CIB)") + joint_range_extension_application_protocol_a_jreap_a = EnumValue(121, "Joint Range Extension Application Protocol A (JREAP A)") + jpals_data_link = EnumValue(125, "JPALS Data Link") + onesaf_iads_communications_link = EnumValue(126, "OneSAF IADS Communications Link") + tactical_targeting_network_technology_ttnt_application = EnumValue(127, "Tactical Targeting Network Technology (TTNT) Application") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/signal_user_protocol_identification_number.py b/dis/siso_ref_010/enums/signal_user_protocol_identification_number.py new file mode 100644 index 0000000..e23b7ef --- /dev/null +++ b/dis/siso_ref_010/enums/signal_user_protocol_identification_number.py @@ -0,0 +1,171 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 177, + * marshal size 32; + * SignalUserProtocolIdentificationNumber has 36 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SignalUserProtocolIdentificationNumber(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + ccsil = EnumValue(1, "CCSIL") + a2atd_sincgars_erf = EnumValue(5, "A2ATD SINCGARS ERF") + a2atd_cac2 = EnumValue(6, "A2ATD CAC2") + battle_command = EnumValue(20, "Battle Command") + afiwc_iads_track_report = EnumValue(30, "AFIWC IADS Track Report") + afiwc_iads_comm_c2_message = EnumValue(31, "AFIWC IADS Comm C2 Message") + afiwc_iads_ground_control_interceptor_gci_command = EnumValue(32, "AFIWC IADS Ground Control Interceptor (GCI) Command") + afiwc_voice_text_message = EnumValue(35, "AFIWC Voice Text Message") + modsaf_text_radio = EnumValue(177, "ModSAF Text Radio") + cctt_sincgars_erf_lockout = EnumValue(200, "CCTT SINCGARS ERF-LOCKOUT") + cctt_sincgars_erf_hopset = EnumValue(201, "CCTT SINCGARS ERF-HOPSET") + cctt_sincgars_otar = EnumValue(202, "CCTT SINCGARS OTAR") + cctt_sincgars_data = EnumValue(203, "CCTT SINCGARS DATA") + modsaf_fwa_forward_air_controller = EnumValue(546, "ModSAF FWA Forward Air Controller") + modsaf_threat_ada_c3 = EnumValue(832, "ModSAF Threat ADA C3") + f_16_mtc_afapd_protocol = EnumValue(1000, "F-16 MTC AFAPD Protocol") + f_16_mtc_idl_protocol = EnumValue(1100, "F-16 MTC IDL Protocol") + automatic_identification_system_ais = EnumValue(1371, "Automatic Identification System (AIS)") + modsaf_artillery_fire_control = EnumValue(4570, "ModSAF Artillery Fire Control") + agts = EnumValue(5361, "AGTS") + gc3 = EnumValue(6000, "GC3") + wncp_data = EnumValue(6010, "WNCP data") + spoken_text_message = EnumValue(6020, "Spoken text message") + longbow_idm_message = EnumValue(6661, "Longbow IDM message") + comanche_idm_message = EnumValue(6662, "Comanche IDM message") + longbow_airborne_tacfire_message = EnumValue(6663, "Longbow Airborne TACFIRE Message") + longbow_ground_tacfire_message = EnumValue(6664, "Longbow Ground TACFIRE Message") + longbow_afapd_message = EnumValue(6665, "Longbow AFAPD Message") + longbow_erf_message = EnumValue(6666, "Longbow ERF message") + vmf_idm = EnumValue(7000, "VMF IDM") + csar_radio_survivor_message = EnumValue(7010, "CSAR Radio Survivor Message") + csar_radio_interrogator_message = EnumValue(7020, "CSAR Radio Interrogator Message") + image_file_transfer_message = EnumValue(7030, "Image File Transfer Message") + geotag_data_message = EnumValue(7040, "Geotag Data Message") + tactical_video_regeneration_data = EnumValue(7050, "Tactical Video Regeneration Data") + call_message = EnumValue(8000, "Call Message") + default = ccsil + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/sisostd002version.py b/dis/siso_ref_010/enums/sisostd002version.py new file mode 100644 index 0000000..5acac96 --- /dev/null +++ b/dis/siso_ref_010/enums/sisostd002version.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 736, + * marshal size 8; + * SISOSTD002Version has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SISOSTD002Version(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + siso_std_002_2006 = EnumValue(0, "SISO-STD-002-2006") + siso_std_002_2021 = EnumValue(1, "SISO-STD-002-2021") + default = siso_std_002_2006 + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/space_platform_appearance.py b/dis/siso_ref_010/enums/space_platform_appearance.py new file mode 100644 index 0000000..c429f29 --- /dev/null +++ b/dis/siso_ref_010/enums/space_platform_appearance.py @@ -0,0 +1,171 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_paint_scheme import AppearancePaintScheme +from .appearance_damage import AppearanceDamage +from .appearance_entityor_object_state import AppearanceEntityorObjectState + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 35, marshal size 32, + * SpacePlatformAppearance + */ + +""" + +class SpacePlatformAppearanceBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes the visual paint design, use {@link AppearancePaintScheme} values for this field + ("_paintScheme", UByte, 1), + + # (bit position 1, boolean) Describes whether it is capable of moving on its own power, use {@link UInt8} values for this field + ("_mobilityKilled", UByte, 1), + + # (bit position 3, length=2) Describes the damaged appearance, use {@link AppearanceDamage} values for this field + ("_damage", UByte, 2), + + # (bit position 5, boolean) Describes whether or not smoke or vapor is emanating from the entity, use {@link UInt8} values for this field + ("_isSmokeVaporEmanating", UByte, 1), + + # (bit position 6, boolean) Describes whether or not the engine is emitting smoke, use {@link UInt8} values for this field + ("_isEngineEmittingSmoke", UByte, 1), + + # (bit position 15, boolean) Describes whether the entity is burning and flames are visible, use {@link UInt8} values for this field + ("_isFlaming", UByte, 1), + + # (bit position 21, boolean) Describes whether the entity is frozen and should not be dead reckoned, use {@link UInt8} values for this field + ("_isFrozen", UByte, 1), + + # (bit position 22, boolean) Describes whether the power plant is on or off, use {@link UInt8} values for this field + ("_powerPlantOn", UByte, 1), + + # (bit position 23, boolean) Describes whether the entity is active or deactivated, use {@link AppearanceEntityorObjectState} values for this field + ("_state", UByte, 1) + ] + +class SpacePlatformAppearance(ctypes.Union): + _fields_ = [ + ("capabilities", SpacePlatformAppearanceBitField), + ("asbyte", UInt8) + ] + + def set_paintScheme(self, value : AppearancePaintScheme): + self.capabilities._paintScheme = int(value) + def get_paintScheme(self) -> AppearancePaintScheme: + return AppearancePaintScheme.get_enum(self._paintScheme) + PaintScheme = property(get_paintScheme, set_paintScheme) + + def set_mobilityKilled(self, value : UInt8): + self.capabilities._mobilityKilled = int(value) + def get_mobilityKilled(self) -> UInt8: + return self.capabilities._mobilityKilled + MobilityKilled = property(get_mobilityKilled, set_mobilityKilled) + + def set_damage(self, value : AppearanceDamage): + self.capabilities._damage = int(value) + def get_damage(self) -> AppearanceDamage: + return AppearanceDamage.get_enum(self._damage) + Damage = property(get_damage, set_damage) + + def set_isSmokeVaporEmanating(self, value : UInt8): + self.capabilities._isSmokeVaporEmanating = int(value) + def get_isSmokeVaporEmanating(self) -> UInt8: + return self.capabilities._isSmokeVaporEmanating + IsSmokeVaporEmanating = property(get_isSmokeVaporEmanating, set_isSmokeVaporEmanating) + + def set_isEngineEmittingSmoke(self, value : UInt8): + self.capabilities._isEngineEmittingSmoke = int(value) + def get_isEngineEmittingSmoke(self) -> UInt8: + return self.capabilities._isEngineEmittingSmoke + IsEngineEmittingSmoke = property(get_isEngineEmittingSmoke, set_isEngineEmittingSmoke) + + def set_isFlaming(self, value : UInt8): + self.capabilities._isFlaming = int(value) + def get_isFlaming(self) -> UInt8: + return self.capabilities._isFlaming + IsFlaming = property(get_isFlaming, set_isFlaming) + + def set_isFrozen(self, value : UInt8): + self.capabilities._isFrozen = int(value) + def get_isFrozen(self) -> UInt8: + return self.capabilities._isFrozen + IsFrozen = property(get_isFrozen, set_isFrozen) + + def set_powerPlantOn(self, value : UInt8): + self.capabilities._powerPlantOn = int(value) + def get_powerPlantOn(self) -> UInt8: + return self.capabilities._powerPlantOn + PowerPlantOn = property(get_powerPlantOn, set_powerPlantOn) + + def set_state(self, value : AppearanceEntityorObjectState): + self.capabilities._state = int(value) + def get_state(self) -> AppearanceEntityorObjectState: + return AppearanceEntityorObjectState.get_enum(self._state) + State = property(get_state, set_state) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "PaintScheme : " + self.PaintScheme.get_description + "\n" + outputStream += "MobilityKilled : " + str(self.MobilityKilled) + "\n" + outputStream += "Damage : " + self.Damage.get_description + "\n" + outputStream += "IsSmokeVaporEmanating : " + str(self.IsSmokeVaporEmanating) + "\n" + outputStream += "IsEngineEmittingSmoke : " + str(self.IsEngineEmittingSmoke) + "\n" + outputStream += "IsFlaming : " + str(self.IsFlaming) + "\n" + outputStream += "IsFrozen : " + str(self.IsFrozen) + "\n" + outputStream += "PowerPlantOn : " + str(self.PowerPlantOn) + "\n" + outputStream += "State : " + self.State.get_description + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/space_platform_capabilities.py b/dis/siso_ref_010/enums/space_platform_capabilities.py new file mode 100644 index 0000000..dbb82a9 --- /dev/null +++ b/dis/siso_ref_010/enums/space_platform_capabilities.py @@ -0,0 +1,128 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 454, marshal size 32, + * SpacePlatformCapabilities + */ + +""" + +class SpacePlatformCapabilitiesBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes whether the entity is able to supply some type of ammunition in response to an appropriate service request, use {@link UInt8} values for this field + ("_ammunitionSupply", UByte, 1), + + # (bit position 1, boolean) Describes whether the entity is able to supply some type of fuel in response to an appropriate service request, use {@link UInt8} values for this field + ("_fuelSupply", UByte, 1), + + # (bit position 2, boolean) Describes whether the entity is able to provide recovery (e.g., towing) services in response to an appropriate service request, use {@link UInt8} values for this field + ("_recovery", UByte, 1), + + # (bit position 3, boolean) Describes whether the entity is able to supply certain repair services in response to an appropriate service request, use {@link UInt8} values for this field + ("_repair", UByte, 1), + + # (bit position 4, boolean) This entry is reserved for backward compatibility and may not be reused, use {@link UInt8} values for this field + ("_reserved", UByte, 1) + ] + +class SpacePlatformCapabilities(ctypes.Union): + _fields_ = [ + ("capabilities", SpacePlatformCapabilitiesBitField), + ("asbyte", UInt8) + ] + + def set_ammunitionSupply(self, value : UInt8): + self.capabilities._ammunitionSupply = int(value) + def get_ammunitionSupply(self) -> UInt8: + return self.capabilities._ammunitionSupply + AmmunitionSupply = property(get_ammunitionSupply, set_ammunitionSupply) + + def set_fuelSupply(self, value : UInt8): + self.capabilities._fuelSupply = int(value) + def get_fuelSupply(self) -> UInt8: + return self.capabilities._fuelSupply + FuelSupply = property(get_fuelSupply, set_fuelSupply) + + def set_recovery(self, value : UInt8): + self.capabilities._recovery = int(value) + def get_recovery(self) -> UInt8: + return self.capabilities._recovery + Recovery = property(get_recovery, set_recovery) + + def set_repair(self, value : UInt8): + self.capabilities._repair = int(value) + def get_repair(self) -> UInt8: + return self.capabilities._repair + Repair = property(get_repair, set_repair) + + def set_reserved(self, value : UInt8): + self.capabilities._reserved = int(value) + def get_reserved(self) -> UInt8: + return self.capabilities._reserved + Reserved = property(get_reserved, set_reserved) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "AmmunitionSupply : " + str(self.AmmunitionSupply) + "\n" + outputStream += "FuelSupply : " + str(self.FuelSupply) + "\n" + outputStream += "Recovery : " + str(self.Recovery) + "\n" + outputStream += "Repair : " + str(self.Repair) + "\n" + outputStream += "Reserved : " + str(self.Reserved) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/specific_dimension_enumerationsfor_air_area_size.py b/dis/siso_ref_010/enums/specific_dimension_enumerationsfor_air_area_size.py new file mode 100644 index 0000000..e1eb547 --- /dev/null +++ b/dis/siso_ref_010/enums/specific_dimension_enumerationsfor_air_area_size.py @@ -0,0 +1,121 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 132, marshal size 8; + * SpecificDimensionEnumerationsforAirAreaSize has 6 enumerations total. + * The gaps in enumeration values are intentional and are reserved for future additions. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class SpecificDimensionEnumerationsforAirAreaSize(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + small_flock_swarm_5km_long_x_5m_wide_1km_x_5m = EnumValue(222, "Small Flock/Swarm (.5km long x 5m wide - 1km x 5m)") + small_flock_swarm_dense_5km_long_x_5m_wide_1km_x_5m = EnumValue(223, "Small Flock/Swarm, Dense (.5km long x 5m wide - 1km x 5m)") + medium_flock_swarm_1km_long_x_10m_wide_2km_x_10m = EnumValue(224, "Medium Flock/Swarm (1km long x 10m wide - 2km x 10m)") + medium_flock_swarm_dense_1km_long_x_10m_wide_2km_x_10m = EnumValue(225, "Medium Flock/Swarm, Dense (1km long x 10m wide - 2km x 10m)") + large_flock_swarm_10km_long_x_100m_wide_20km_x_100m = EnumValue(226, "Large Flock/Swarm (10km long x 100m wide - 20km x 100m)") + large_flock_swarm_dense_10km_long_x_100m_wide_20km_x_100m = EnumValue(227, "Large Flock/Swarm, Dense (10km long x 100m wide - 20km x 100m)") + default = small_flock_swarm_5km_long_x_5m_wide_1km_x_5m + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/specific_dimension_enumerationsfor_land_area_size.py b/dis/siso_ref_010/enums/specific_dimension_enumerationsfor_land_area_size.py new file mode 100644 index 0000000..216cffb --- /dev/null +++ b/dis/siso_ref_010/enums/specific_dimension_enumerationsfor_land_area_size.py @@ -0,0 +1,121 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 131, marshal size 8; + * SpecificDimensionEnumerationsforLandAreaSize has 6 enumerations total. + * The gaps in enumeration values are intentional and are reserved for future additions. + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class SpecificDimensionEnumerationsforLandAreaSize(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + small_area_2_000m2_4_000m2_5_to_1_sq_acre_ = EnumValue(222, "Small Area (2,000m2 - 4,000m2 / .5 to 1 sq. acre )") + small_area_dense_2_000m2_4_000m2_5_to1_sq_acre = EnumValue(223, "Small Area, Dense (2,000m2 - 4,000m2 / .5 to1 sq. acre)") + medium_area_20_000m2_41_000m2_10_to_20_sq_acres = EnumValue(224, "Medium Area (20,000m2 - 41,000m2 / 10 to 20 sq. acres)") + medium_area_dense_20_000m2_41_000m2_10_to_20_sq_acres = EnumValue(225, "Medium Area, Dense (20,000m2 - 41,000m2 / 10 to 20 sq. acres)") + large_area_40_000m2_81_000m2_20_to_40_sq_acres = EnumValue(226, "Large Area (40,000m2 - 81,000m2 / 20 to 40 sq. acres)") + large_area_dense_40_000m2_81_000m2_20_to_40_sq_acres = EnumValue(227, "Large Area, Dense (40,000m2 - 81,000m2 / 20 to 40 sq. acres)") + default = small_area_2_000m2_4_000m2_5_to_1_sq_acre_ + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/spot_chaff_status.py b/dis/siso_ref_010/enums/spot_chaff_status.py new file mode 100644 index 0000000..441866d --- /dev/null +++ b/dis/siso_ref_010/enums/spot_chaff_status.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 404, + * marshal size 2; + * SpotChaffStatus has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SpotChaffStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + none = EnumValue(0, "None") + deployed = EnumValue(1, "Deployed") + malfunction = EnumValue(2, "Malfunction") + default = none + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/stop_freeze_frozen_behavior.py b/dis/siso_ref_010/enums/stop_freeze_frozen_behavior.py new file mode 100644 index 0000000..de1fb0e --- /dev/null +++ b/dis/siso_ref_010/enums/stop_freeze_frozen_behavior.py @@ -0,0 +1,108 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 68, marshal size 8, + * StopFreezeFrozenBehavior + */ + +""" + +class StopFreezeFrozenBehaviorBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes whether a simulation application should run the internal simulation clock or not, use {@link UInt8} values for this field + ("_runSimulationClock", UByte, 1), + + # (bit position 1, boolean) Describes whether a simulation application should transmit updates and interactions or not, use {@link UInt8} values for this field + ("_transmitUpdates", UByte, 1), + + # (bit position 2, boolean) Describes whether a simulation application should update simulation models of other entities via received updates or interactions, use {@link UInt8} values for this field + ("_processUpdates", UByte, 1) + ] + +class StopFreezeFrozenBehavior(ctypes.Union): + _fields_ = [ + ("capabilities", StopFreezeFrozenBehaviorBitField), + ("asbyte", UInt8) + ] + + def set_runSimulationClock(self, value : UInt8): + self.capabilities._runSimulationClock = int(value) + def get_runSimulationClock(self) -> UInt8: + return self.capabilities._runSimulationClock + RunSimulationClock = property(get_runSimulationClock, set_runSimulationClock) + + def set_transmitUpdates(self, value : UInt8): + self.capabilities._transmitUpdates = int(value) + def get_transmitUpdates(self) -> UInt8: + return self.capabilities._transmitUpdates + TransmitUpdates = property(get_transmitUpdates, set_transmitUpdates) + + def set_processUpdates(self, value : UInt8): + self.capabilities._processUpdates = int(value) + def get_processUpdates(self) -> UInt8: + return self.capabilities._processUpdates + ProcessUpdates = property(get_processUpdates, set_processUpdates) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "RunSimulationClock : " + str(self.RunSimulationClock) + "\n" + outputStream += "TransmitUpdates : " + str(self.TransmitUpdates) + "\n" + outputStream += "ProcessUpdates : " + str(self.ProcessUpdates) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/stop_freeze_reason.py b/dis/siso_ref_010/enums/stop_freeze_reason.py new file mode 100644 index 0000000..651917c --- /dev/null +++ b/dis/siso_ref_010/enums/stop_freeze_reason.py @@ -0,0 +1,144 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 67, + * marshal size 8; + * StopFreezeReason has 9 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class StopFreezeReason(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + recess = EnumValue(1, "Recess") + termination = EnumValue(2, "Termination") + system_failure = EnumValue(3, "System Failure") + security_violation = EnumValue(4, "Security Violation") + entity_reconstitution = EnumValue(5, "Entity Reconstitution") + stop_for_reset = EnumValue(6, "Stop for reset") + stop_for_restart = EnumValue(7, "Stop for restart") + abort_training_return_to_tactical_operations = EnumValue(8, "Abort Training Return to Tactical Operations") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/subcategoriesfor_air_category200bird.py b/dis/siso_ref_010/enums/subcategoriesfor_air_category200bird.py new file mode 100644 index 0000000..acd5654 --- /dev/null +++ b/dis/siso_ref_010/enums/subcategoriesfor_air_category200bird.py @@ -0,0 +1,162 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 110, + * marshal size 8; + * SubcategoriesforAirCategory200Bird has 27 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SubcategoriesforAirCategory200Bird(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + penguin = EnumValue(1, "Penguin") + seagull = EnumValue(2, "Seagull") + pelican = EnumValue(3, "Pelican") + albatross = EnumValue(4, "Albatross") + swan = EnumValue(5, "Swan") + cormorant = EnumValue(6, "Cormorant") + heron = EnumValue(7, "Heron") + crane = EnumValue(8, "Crane") + osprey = EnumValue(9, "Osprey") + loon = EnumValue(10, "Loon") + stork = EnumValue(11, "Stork") + flamingo = EnumValue(12, "Flamingo") + duck = EnumValue(13, "Duck") + ostrich = EnumValue(20, "Ostrich") + emu = EnumValue(21, "Emu") + chicken = EnumValue(22, "Chicken") + black_bird = EnumValue(30, "Black Bird") + starling = EnumValue(31, "Starling") + budgerigar_parakeet = EnumValue(32, "Budgerigar (Parakeet)") + canadian_goose = EnumValue(40, "Canadian Goose") + crow = EnumValue(41, "Crow") + eagle = EnumValue(50, "Eagle") + vulture = EnumValue(55, "Vulture") + falcon = EnumValue(60, "Falcon") + hawk = EnumValue(65, "Hawk") + owl = EnumValue(70, "Owl") + kite = EnumValue(80, "Kite") + default = penguin + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/subcategoriesfor_air_category201insect.py b/dis/siso_ref_010/enums/subcategoriesfor_air_category201insect.py new file mode 100644 index 0000000..74ce0be --- /dev/null +++ b/dis/siso_ref_010/enums/subcategoriesfor_air_category201insect.py @@ -0,0 +1,144 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 111, + * marshal size 8; + * SubcategoriesforAirCategory201Insect has 9 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SubcategoriesforAirCategory201Insect(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + moth = EnumValue(1, "Moth") + butterfly = EnumValue(2, "Butterfly") + fly = EnumValue(20, "Fly") + mosquito = EnumValue(30, "Mosquito") + wasp = EnumValue(40, "Wasp") + bee = EnumValue(50, "Bee") + beetle = EnumValue(60, "Beetle") + dragonfly = EnumValue(70, "Dragonfly") + locust = EnumValue(80, "Locust") + default = moth + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/subcategoriesfor_air_category202mammal.py b/dis/siso_ref_010/enums/subcategoriesfor_air_category202mammal.py new file mode 100644 index 0000000..63c954e --- /dev/null +++ b/dis/siso_ref_010/enums/subcategoriesfor_air_category202mammal.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 112, + * marshal size 8; + * SubcategoriesforAirCategory202Mammal has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SubcategoriesforAirCategory202Mammal(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + bat = EnumValue(1, "Bat") + flying_squirrel = EnumValue(10, "Flying Squirrel") + gliding_possum = EnumValue(20, "Gliding Possum") + default = bat + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/subcategoriesfor_land_category200mammal.py b/dis/siso_ref_010/enums/subcategoriesfor_land_category200mammal.py new file mode 100644 index 0000000..78f72dd --- /dev/null +++ b/dis/siso_ref_010/enums/subcategoriesfor_land_category200mammal.py @@ -0,0 +1,144 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 100, marshal size 8; + * SubcategoriesforLandCategory200Mammal has 29 enumerations total. + * 1-199 Domesticated animals, 200-255 Wild animals + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class SubcategoriesforLandCategory200Mammal(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + small_dog = EnumValue(1, "Small Dog") + chihuahua = EnumValue(2, "Chihuahua") + medium_dog = EnumValue(10, "Medium Dog") + australian_cattle_dog = EnumValue(11, "Australian Cattle Dog") + large_dog = EnumValue(20, "Large Dog") + german_shepherd = EnumValue(21, "German Shepherd") + very_large_dog = EnumValue(30, "Very Large Dog") + giant_turkish_kangal = EnumValue(31, "Giant Turkish Kangal") + sheep = EnumValue(40, "Sheep") + goat = EnumValue(41, "Goat") + pig = EnumValue(50, "Pig") + cow = EnumValue(60, "Cow") + ox = EnumValue(61, "Ox") + ox_with_cart = EnumValue(70, "Ox With Cart") + horse = EnumValue(80, "Horse") + donkey = EnumValue(81, "Donkey") + mule = EnumValue(82, "Mule") + horse_with_rider = EnumValue(90, "Horse With Rider") + horse_with_cargo = EnumValue(91, "Horse With Cargo") + donkey_with_rider = EnumValue(92, "Donkey With Rider") + donkey_with_cargo = EnumValue(93, "Donkey With Cargo") + mule_with_rider = EnumValue(94, "Mule With Rider") + mule_with_cargo = EnumValue(95, "Mule With Cargo") + camel = EnumValue(100, "Camel") + dromedary_camel_one_hump = EnumValue(101, "Dromedary Camel (One Hump)") + bactrian_camel_two_humps = EnumValue(102, "Bactrian Camel (Two Humps)") + dromedary_camel_with_rider = EnumValue(110, "Dromedary Camel With Rider") + dromedary_camel_with_cargo = EnumValue(111, "Dromedary Camel With Cargo") + rat = EnumValue(200, "Rat") + default = small_dog + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/subcategoriesfor_land_category201reptile.py b/dis/siso_ref_010/enums/subcategoriesfor_land_category201reptile.py new file mode 100644 index 0000000..3864813 --- /dev/null +++ b/dis/siso_ref_010/enums/subcategoriesfor_land_category201reptile.py @@ -0,0 +1,158 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 101, + * marshal size 8; + * SubcategoriesforLandCategory201Reptile has 23 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SubcategoriesforLandCategory201Reptile(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + new_zealand_northern_tuatara = EnumValue(1, "New Zealand Northern Tuatara") + monitor = EnumValue(3, "Monitor") + gecko = EnumValue(8, "Gecko") + iguana = EnumValue(13, "Iguana") + chameleon = EnumValue(17, "Chameleon") + non_venomous_snake = EnumValue(30, "Non-Venomous Snake") + boa = EnumValue(31, "Boa") + python = EnumValue(35, "Python") + bullsnake = EnumValue(39, "Bullsnake") + kingsnake = EnumValue(43, "Kingsnake") + venomous_snake = EnumValue(60, "Venomous Snake") + rattlesnake = EnumValue(61, "Rattlesnake") + copperhead = EnumValue(62, "Copperhead") + cottonmouth = EnumValue(63, "Cottonmouth") + taipan = EnumValue(64, "Taipan") + viper = EnumValue(65, "Viper") + cobra = EnumValue(66, "Cobra") + australian_brown_snake = EnumValue(67, "Australian Brown Snake") + tortoise = EnumValue(90, "Tortoise") + turtle = EnumValue(100, "Turtle") + american_alligator = EnumValue(120, "American Alligator") + crocodile = EnumValue(121, "Crocodile") + australian_freshwater_crocodile = EnumValue(122, "Australian Freshwater Crocodile") + default = new_zealand_northern_tuatara + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/subcategoriesfor_land_category202amphibian.py b/dis/siso_ref_010/enums/subcategoriesfor_land_category202amphibian.py new file mode 100644 index 0000000..d4f138c --- /dev/null +++ b/dis/siso_ref_010/enums/subcategoriesfor_land_category202amphibian.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 102, + * marshal size 8; + * SubcategoriesforLandCategory202Amphibian has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SubcategoriesforLandCategory202Amphibian(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + frog = EnumValue(1, "Frog") + toad = EnumValue(2, "Toad") + salamander = EnumValue(170, "Salamander") + caecilian = EnumValue(230, "Caecilian") + default = frog + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/subcategoriesfor_land_category203insect.py b/dis/siso_ref_010/enums/subcategoriesfor_land_category203insect.py new file mode 100644 index 0000000..3bbcf51 --- /dev/null +++ b/dis/siso_ref_010/enums/subcategoriesfor_land_category203insect.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 103, + * marshal size 8; + * SubcategoriesforLandCategory203Insect has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SubcategoriesforLandCategory203Insect(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + beetle = EnumValue(1, "Beetle") + mantis = EnumValue(60, "Mantis") + cockroach = EnumValue(70, "Cockroach") + army_ant = EnumValue(80, "Army Ant") + fire_ant = EnumValue(81, "Fire Ant") + grasshopper = EnumValue(90, "Grasshopper") + centipede = EnumValue(100, "Centipede") + default = beetle + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/subcategoriesfor_land_category204arachnid.py b/dis/siso_ref_010/enums/subcategoriesfor_land_category204arachnid.py new file mode 100644 index 0000000..3b5796c --- /dev/null +++ b/dis/siso_ref_010/enums/subcategoriesfor_land_category204arachnid.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 104, + * marshal size 8; + * SubcategoriesforLandCategory204Arachnid has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SubcategoriesforLandCategory204Arachnid(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + spider = EnumValue(1, "Spider") + tick = EnumValue(20, "Tick") + scorpion = EnumValue(30, "Scorpion") + harvestmen = EnumValue(40, "Harvestmen") + mite = EnumValue(50, "Mite") + default = spider + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/subcategoriesfor_land_category205mollusk.py b/dis/siso_ref_010/enums/subcategoriesfor_land_category205mollusk.py new file mode 100644 index 0000000..2e9584d --- /dev/null +++ b/dis/siso_ref_010/enums/subcategoriesfor_land_category205mollusk.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 105, + * marshal size 8; + * SubcategoriesforLandCategory205Mollusk has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SubcategoriesforLandCategory205Mollusk(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + snail = EnumValue(1, "Snail") + slug = EnumValue(50, "Slug") + default = snail + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/subcategoriesfor_land_category206marsupial.py b/dis/siso_ref_010/enums/subcategoriesfor_land_category206marsupial.py new file mode 100644 index 0000000..f4bf5c8 --- /dev/null +++ b/dis/siso_ref_010/enums/subcategoriesfor_land_category206marsupial.py @@ -0,0 +1,127 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 106, marshal size 8; + * SubcategoriesforLandCategory206Marsupial has 12 enumerations total. + * 1-99 Ameridelphia, 100-250 Australidelphia + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class SubcategoriesforLandCategory206Marsupial(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + brown_four_eyed_opossum = EnumValue(1, "Brown Four-Eyed Opossum") + bushy_tailed_opossum = EnumValue(2, "Bushy-Tailed Opossum") + tates_shrew_opossum = EnumValue(90, "Tate's Shrew Opossum") + greater_bilby = EnumValue(100, "Greater Bilby") + tasmanian_devil = EnumValue(110, "Tasmanian Devil") + brush_tailed_rock_wallaby = EnumValue(150, "Brush-Tailed Rock-Wallaby") + eastern_wallaroo = EnumValue(160, "Eastern Wallaroo") + red_kangaroo = EnumValue(170, "Red Kangaroo") + queensland_koala = EnumValue(200, "Queensland Koala") + southern_hairy_nosed_wombat = EnumValue(205, "Southern Hairy-Nosed Wombat") + brushtail_possum = EnumValue(210, "Brushtail Possum") + sugar_glider = EnumValue(211, "Sugar Glider") + default = brown_four_eyed_opossum + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/subcategoriesfor_subsurface_category200fish.py b/dis/siso_ref_010/enums/subcategoriesfor_subsurface_category200fish.py new file mode 100644 index 0000000..630bf5c --- /dev/null +++ b/dis/siso_ref_010/enums/subcategoriesfor_subsurface_category200fish.py @@ -0,0 +1,162 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 120, + * marshal size 8; + * SubcategoriesforSubsurfaceCategory200Fish has 27 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SubcategoriesforSubsurfaceCategory200Fish(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + forage_fish_small_schooling = EnumValue(1, "Forage Fish, Small Schooling") + herring = EnumValue(2, "Herring") + sardines = EnumValue(3, "Sardines") + krill = EnumValue(4, "Krill") + squid = EnumValue(5, "Squid") + medium_schooling_fish = EnumValue(30, "Medium Schooling Fish") + hake = EnumValue(31, "Hake") + cod = EnumValue(32, "Cod") + haddock = EnumValue(33, "Haddock") + mackerel = EnumValue(34, "Mackerel") + large_schooling_fish = EnumValue(60, "Large Schooling Fish") + tuna = EnumValue(61, "Tuna") + small_shark = EnumValue(90, "Small Shark") + dogfish_shark = EnumValue(91, "Dogfish Shark") + medium_shark = EnumValue(120, "Medium Shark") + mako_shark = EnumValue(121, "Mako Shark") + hammerhead_shark = EnumValue(122, "Hammerhead Shark") + large_shark = EnumValue(150, "Large Shark") + great_white_shark = EnumValue(151, "Great White Shark") + tiger_shark = EnumValue(152, "Tiger Shark") + blue_shark = EnumValue(153, "Blue Shark") + whale_shark = EnumValue(154, "Whale Shark") + skate = EnumValue(180, "Skate") + stingray = EnumValue(181, "Stingray") + eel = EnumValue(190, "Eel") + marlin = EnumValue(200, "Marlin") + swordfish = EnumValue(201, "Swordfish") + default = forage_fish_small_schooling + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/subcategoriesfor_subsurface_category201mammal.py b/dis/siso_ref_010/enums/subcategoriesfor_subsurface_category201mammal.py new file mode 100644 index 0000000..6bdb024 --- /dev/null +++ b/dis/siso_ref_010/enums/subcategoriesfor_subsurface_category201mammal.py @@ -0,0 +1,194 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 121, + * marshal size 8; + * SubcategoriesforSubsurfaceCategory201Mammal has 59 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SubcategoriesforSubsurfaceCategory201Mammal(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + whale = EnumValue(1, "Whale") + beaked_whale = EnumValue(2, "Beaked Whale") + beluga_whale = EnumValue(3, "Beluga Whale") + blue_whale = EnumValue(4, "Blue Whale") + bottlenose_whale = EnumValue(5, "Bottlenose Whale") + northern_bottlenose_whale = EnumValue(6, "Northern Bottlenose Whale") + southern_bottlenose_whale = EnumValue(7, "Southern Bottlenose Whale") + bowhead_whale = EnumValue(8, "Bowhead Whale") + brydes_whale = EnumValue(9, "Bryde's Whale") + dwarf_sperm_whale = EnumValue(10, "Dwarf Sperm Whale") + finback_whale = EnumValue(11, "Finback Whale") + gray_whale = EnumValue(12, "Gray Whale") + humpback_whale = EnumValue(13, "Humpback Whale") + long_finned_pilot_whale = EnumValue(14, "Long-Finned Pilot Whale") + minke_whale = EnumValue(15, "Minke Whale") + northern_minke_whale = EnumValue(16, "Northern Minke Whale") + southern_minke_whale = EnumValue(17, "Southern Minke Whale") + narwhal_whale = EnumValue(18, "Narwhal Whale") + orca_whale = EnumValue(19, "Orca Whale") + pygmy_sperm_whale = EnumValue(20, "Pygmy Sperm Whale") + right_whale = EnumValue(21, "Right Whale") + north_atlantic_right_whale = EnumValue(22, "North Atlantic Right Whale") + north_pacific_right_whale = EnumValue(23, "North Pacific Right Whale") + southern_right_whale = EnumValue(24, "Southern Right Whale") + sei_whale = EnumValue(25, "Sei Whale") + short_finned_pilot_whale = EnumValue(26, "Short-Finned Pilot Whale") + sperm_whale = EnumValue(27, "Sperm Whale") + dolphin = EnumValue(50, "Dolphin") + bottlenose_dolphin = EnumValue(51, "Bottlenose Dolphin") + bottlenose_indo_pacific_dolphin = EnumValue(52, "Bottlenose Indo-Pacific Dolphin") + bottlenose_burrunan_dolphin = EnumValue(53, "Bottlenose Burrunan Dolphin") + atlantic_spotted_dolphin = EnumValue(54, "Atlantic Spotted Dolphin") + australian_snubfin_dolphin = EnumValue(55, "Australian Snubfin Dolphin") + chilean_black_dolphin = EnumValue(56, "Chilean Black Dolphin") + chinese_white_dolphin = EnumValue(57, "Chinese White Dolphin") + clymene_dolphin = EnumValue(58, "Clymene Dolphin") + porpoise = EnumValue(100, "Porpoise") + harbour_porpoise = EnumValue(101, "Harbour Porpoise") + californian_porpoise = EnumValue(102, "Californian Porpoise") + dalls_porpoise = EnumValue(103, "Dall's Porpoise") + burmeisters_porpoise = EnumValue(104, "Burmeister's Porpoise") + seal = EnumValue(120, "Seal") + bearded_seal = EnumValue(121, "Bearded Seal") + harbor_seal = EnumValue(122, "Harbor Seal") + fur_seal = EnumValue(123, "Fur Seal") + weddell_seal = EnumValue(124, "Weddell Seal") + elephant_seal = EnumValue(125, "Elephant Seal") + sea_lion = EnumValue(130, "Sea Lion") + australian_sea_lion = EnumValue(131, "Australian Sea Lion") + california_sea_lion = EnumValue(132, "California Sea Lion") + walrus = EnumValue(140, "Walrus") + atlantic_walrus = EnumValue(141, "Atlantic Walrus") + pacific_walrus = EnumValue(142, "Pacific Walrus") + otter = EnumValue(150, "Otter") + sea_otter = EnumValue(151, "Sea Otter") + manatee = EnumValue(160, "Manatee") + florida_manatee = EnumValue(161, "Florida Manatee") + dugongs = EnumValue(162, "Dugongs") + polar_bear = EnumValue(200, "Polar Bear") + default = whale + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/subcategoriesfor_subsurface_category202mollusk.py b/dis/siso_ref_010/enums/subcategoriesfor_subsurface_category202mollusk.py new file mode 100644 index 0000000..72ef3e7 --- /dev/null +++ b/dis/siso_ref_010/enums/subcategoriesfor_subsurface_category202mollusk.py @@ -0,0 +1,144 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 122, + * marshal size 8; + * SubcategoriesforSubsurfaceCategory202Mollusk has 9 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SubcategoriesforSubsurfaceCategory202Mollusk(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + snail = EnumValue(1, "Snail") + slug = EnumValue(10, "Slug") + octopus = EnumValue(20, "Octopus") + squid = EnumValue(30, "Squid") + cuttlefish = EnumValue(40, "Cuttlefish") + clam = EnumValue(50, "Clam") + muscle = EnumValue(60, "Muscle") + oyster = EnumValue(70, "Oyster") + scallop = EnumValue(80, "Scallop") + default = snail + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/subcategoriesfor_subsurface_category203crustacean.py b/dis/siso_ref_010/enums/subcategoriesfor_subsurface_category203crustacean.py new file mode 100644 index 0000000..8e73e6b --- /dev/null +++ b/dis/siso_ref_010/enums/subcategoriesfor_subsurface_category203crustacean.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 123, + * marshal size 8; + * SubcategoriesforSubsurfaceCategory203Crustacean has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SubcategoriesforSubsurfaceCategory203Crustacean(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + shrimp = EnumValue(1, "Shrimp") + snapping_shrimp = EnumValue(2, "Snapping Shrimp") + crayfish = EnumValue(10, "Crayfish") + lobster = EnumValue(20, "Lobster") + crab = EnumValue(30, "Crab") + default = shrimp + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/subcategoriesfor_subsurface_category204insect.py b/dis/siso_ref_010/enums/subcategoriesfor_subsurface_category204insect.py new file mode 100644 index 0000000..8dd6d6f --- /dev/null +++ b/dis/siso_ref_010/enums/subcategoriesfor_subsurface_category204insect.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 124, + * marshal size 8; + * SubcategoriesforSubsurfaceCategory204Insect has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SubcategoriesforSubsurfaceCategory204Insect(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + sea_skater = EnumValue(1, "Sea Skater") + water_beetle = EnumValue(2, "Water Beetle") + default = sea_skater + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/subsurface_platform_appearance.py b/dis/siso_ref_010/enums/subsurface_platform_appearance.py new file mode 100644 index 0000000..b8c789a --- /dev/null +++ b/dis/siso_ref_010/enums/subsurface_platform_appearance.py @@ -0,0 +1,272 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_paint_scheme import AppearancePaintScheme +from .appearance_damage import AppearanceDamage +from .appearance_subsurface_hatch import AppearanceSubsurfaceHatch +from .appearance_entityor_object_state import AppearanceEntityorObjectState + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 34, marshal size 32, + * SubsurfacePlatformAppearance + */ + +""" + +class SubsurfacePlatformAppearanceBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes the visual paint design, use {@link AppearancePaintScheme} values for this field + ("_paintScheme", UByte, 1), + + # (bit position 1, boolean) Describes whether it is capable of moving on its own power, use {@link UInt8} values for this field + ("_mobilityKilled", UByte, 1), + + # (bit position 3, length=2) Describes the damaged appearance, use {@link AppearanceDamage} values for this field + ("_damage", UByte, 2), + + # (bit position 5, boolean) Describes whether or not smoke is emanating from the entity, use {@link UInt8} values for this field + ("_isSmokeEmanating", UByte, 1), + + # (bit position 6, boolean) Describes whether or not the engine is emitting smoke, use {@link UInt8} values for this field + ("_isEngineEmittingSmoke", UByte, 1), + + # (bit position 9, length=3) Describes whether the hatch is open or closed, use {@link AppearanceSubsurfaceHatch} values for this field + ("_hatch", UByte, 3), + + # (bit position 12, boolean) Describes whether running lights are on or off, use {@link UInt8} values for this field + ("_runningLightsOn", UByte, 1), + + # (bit position 15, boolean) Describes whether the entity is burning and flames are visible, use {@link UInt8} values for this field + ("_isFlaming", UByte, 1), + + # (bit position 16, boolean) Describes whether the periscope is extended or not, use {@link UInt8} values for this field + ("_periscope", UByte, 1), + + # (bit position 17, boolean) Describes whether the snorkel is extended or not, use {@link UInt8} values for this field + ("_snorkel", UByte, 1), + + # (bit position 18, boolean) Describes whether the radar mast is extended or not, use {@link UInt8} values for this field + ("_radarMast", UByte, 1), + + # (bit position 19, boolean) Describes whether the communication mast is extended or not, use {@link UInt8} values for this field + ("_commsMast", UByte, 1), + + # (bit position 20, boolean) Describes whether the ESM mast is extended or not, use {@link UInt8} values for this field + ("_eSMMast", UByte, 1), + + # (bit position 21, boolean) Describes whether the entity is frozen and should not be dead reckoned, use {@link UInt8} values for this field + ("_isFrozen", UByte, 1), + + # (bit position 22, boolean) Describes whether the power plant is on or off, use {@link UInt8} values for this field + ("_powerPlantOn", UByte, 1), + + # (bit position 23, boolean) Describes whether the entity is active or deactivated, use {@link AppearanceEntityorObjectState} values for this field + ("_state", UByte, 1), + + # (bit position 25, boolean) Describes whether the torpedo tubes are open or not, use {@link UInt8} values for this field + ("_torpedoTubes", UByte, 1), + + # (bit position 26, boolean) Describes whether the missile hatches are open or not, use {@link UInt8} values for this field + ("_missileHatches", UByte, 1), + + # (bit position 27, boolean) Describes whether the TAS is deployed or not, use {@link UInt8} values for this field + ("_towedArraySonar", UByte, 1) + ] + +class SubsurfacePlatformAppearance(ctypes.Union): + _fields_ = [ + ("capabilities", SubsurfacePlatformAppearanceBitField), + ("asbyte", UInt8) + ] + + def set_paintScheme(self, value : AppearancePaintScheme): + self.capabilities._paintScheme = int(value) + def get_paintScheme(self) -> AppearancePaintScheme: + return AppearancePaintScheme.get_enum(self._paintScheme) + PaintScheme = property(get_paintScheme, set_paintScheme) + + def set_mobilityKilled(self, value : UInt8): + self.capabilities._mobilityKilled = int(value) + def get_mobilityKilled(self) -> UInt8: + return self.capabilities._mobilityKilled + MobilityKilled = property(get_mobilityKilled, set_mobilityKilled) + + def set_damage(self, value : AppearanceDamage): + self.capabilities._damage = int(value) + def get_damage(self) -> AppearanceDamage: + return AppearanceDamage.get_enum(self._damage) + Damage = property(get_damage, set_damage) + + def set_isSmokeEmanating(self, value : UInt8): + self.capabilities._isSmokeEmanating = int(value) + def get_isSmokeEmanating(self) -> UInt8: + return self.capabilities._isSmokeEmanating + IsSmokeEmanating = property(get_isSmokeEmanating, set_isSmokeEmanating) + + def set_isEngineEmittingSmoke(self, value : UInt8): + self.capabilities._isEngineEmittingSmoke = int(value) + def get_isEngineEmittingSmoke(self) -> UInt8: + return self.capabilities._isEngineEmittingSmoke + IsEngineEmittingSmoke = property(get_isEngineEmittingSmoke, set_isEngineEmittingSmoke) + + def set_hatch(self, value : AppearanceSubsurfaceHatch): + self.capabilities._hatch = int(value) + def get_hatch(self) -> AppearanceSubsurfaceHatch: + return AppearanceSubsurfaceHatch.get_enum(self._hatch) + Hatch = property(get_hatch, set_hatch) + + def set_runningLightsOn(self, value : UInt8): + self.capabilities._runningLightsOn = int(value) + def get_runningLightsOn(self) -> UInt8: + return self.capabilities._runningLightsOn + RunningLightsOn = property(get_runningLightsOn, set_runningLightsOn) + + def set_isFlaming(self, value : UInt8): + self.capabilities._isFlaming = int(value) + def get_isFlaming(self) -> UInt8: + return self.capabilities._isFlaming + IsFlaming = property(get_isFlaming, set_isFlaming) + + def set_periscope(self, value : UInt8): + self.capabilities._periscope = int(value) + def get_periscope(self) -> UInt8: + return self.capabilities._periscope + Periscope = property(get_periscope, set_periscope) + + def set_snorkel(self, value : UInt8): + self.capabilities._snorkel = int(value) + def get_snorkel(self) -> UInt8: + return self.capabilities._snorkel + Snorkel = property(get_snorkel, set_snorkel) + + def set_radarMast(self, value : UInt8): + self.capabilities._radarMast = int(value) + def get_radarMast(self) -> UInt8: + return self.capabilities._radarMast + RadarMast = property(get_radarMast, set_radarMast) + + def set_commsMast(self, value : UInt8): + self.capabilities._commsMast = int(value) + def get_commsMast(self) -> UInt8: + return self.capabilities._commsMast + CommsMast = property(get_commsMast, set_commsMast) + + def set_eSMMast(self, value : UInt8): + self.capabilities._eSMMast = int(value) + def get_eSMMast(self) -> UInt8: + return self.capabilities._eSMMast + ESMMast = property(get_eSMMast, set_eSMMast) + + def set_isFrozen(self, value : UInt8): + self.capabilities._isFrozen = int(value) + def get_isFrozen(self) -> UInt8: + return self.capabilities._isFrozen + IsFrozen = property(get_isFrozen, set_isFrozen) + + def set_powerPlantOn(self, value : UInt8): + self.capabilities._powerPlantOn = int(value) + def get_powerPlantOn(self) -> UInt8: + return self.capabilities._powerPlantOn + PowerPlantOn = property(get_powerPlantOn, set_powerPlantOn) + + def set_state(self, value : AppearanceEntityorObjectState): + self.capabilities._state = int(value) + def get_state(self) -> AppearanceEntityorObjectState: + return AppearanceEntityorObjectState.get_enum(self._state) + State = property(get_state, set_state) + + def set_torpedoTubes(self, value : UInt8): + self.capabilities._torpedoTubes = int(value) + def get_torpedoTubes(self) -> UInt8: + return self.capabilities._torpedoTubes + TorpedoTubes = property(get_torpedoTubes, set_torpedoTubes) + + def set_missileHatches(self, value : UInt8): + self.capabilities._missileHatches = int(value) + def get_missileHatches(self) -> UInt8: + return self.capabilities._missileHatches + MissileHatches = property(get_missileHatches, set_missileHatches) + + def set_towedArraySonar(self, value : UInt8): + self.capabilities._towedArraySonar = int(value) + def get_towedArraySonar(self) -> UInt8: + return self.capabilities._towedArraySonar + TowedArraySonar = property(get_towedArraySonar, set_towedArraySonar) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "PaintScheme : " + self.PaintScheme.get_description + "\n" + outputStream += "MobilityKilled : " + str(self.MobilityKilled) + "\n" + outputStream += "Damage : " + self.Damage.get_description + "\n" + outputStream += "IsSmokeEmanating : " + str(self.IsSmokeEmanating) + "\n" + outputStream += "IsEngineEmittingSmoke : " + str(self.IsEngineEmittingSmoke) + "\n" + outputStream += "Hatch : " + self.Hatch.get_description + "\n" + outputStream += "RunningLightsOn : " + str(self.RunningLightsOn) + "\n" + outputStream += "IsFlaming : " + str(self.IsFlaming) + "\n" + outputStream += "Periscope : " + str(self.Periscope) + "\n" + outputStream += "Snorkel : " + str(self.Snorkel) + "\n" + outputStream += "RadarMast : " + str(self.RadarMast) + "\n" + outputStream += "CommsMast : " + str(self.CommsMast) + "\n" + outputStream += "ESMMast : " + str(self.ESMMast) + "\n" + outputStream += "IsFrozen : " + str(self.IsFrozen) + "\n" + outputStream += "PowerPlantOn : " + str(self.PowerPlantOn) + "\n" + outputStream += "State : " + self.State.get_description + "\n" + outputStream += "TorpedoTubes : " + str(self.TorpedoTubes) + "\n" + outputStream += "MissileHatches : " + str(self.MissileHatches) + "\n" + outputStream += "TowedArraySonar : " + str(self.TowedArraySonar) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/subsurface_platform_capabilities.py b/dis/siso_ref_010/enums/subsurface_platform_capabilities.py new file mode 100644 index 0000000..a76b29e --- /dev/null +++ b/dis/siso_ref_010/enums/subsurface_platform_capabilities.py @@ -0,0 +1,158 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 453, marshal size 32, + * SubsurfacePlatformCapabilities + */ + +""" + +class SubsurfacePlatformCapabilitiesBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes whether the entity is able to supply some type of ammunition in response to an appropriate service request, use {@link UInt8} values for this field + ("_ammunitionSupply", UByte, 1), + + # (bit position 1, boolean) Describes whether the entity is able to supply some type of fuel in response to an appropriate service request, use {@link UInt8} values for this field + ("_fuelSupply", UByte, 1), + + # (bit position 2, boolean) Describes whether the entity is able to provide recovery (e.g., towing) services in response to an appropriate service request, use {@link UInt8} values for this field + ("_recovery", UByte, 1), + + # (bit position 3, boolean) Describes whether the entity is able to supply certain repair services in response to an appropriate service request, use {@link UInt8} values for this field + ("_repair", UByte, 1), + + # (bit position 4, boolean) This entry is reserved for backward compatibility and may not be reused, use {@link UInt8} values for this field + ("_reserved", UByte, 1), + + # (bit position 6, boolean) The Entity is able to be carried as a sling load payload. The extended appearance record (if available) will identify if it is currently sling loaded and entity association and/or entity offset records (if available) will provide additional sling load details (such as carrier)., use {@link UInt8} values for this field + ("_slingLoadable", UByte, 1), + + # (bit position 7, boolean) The Entity is an IED or contains an IED. The extended appearance record (if available) will identify how well hidden the IED is on the Entity. An Attached Part (if applicable, for instance a jury-rigged munition does not apply here) will identify the IED explicitly., use {@link UInt8} values for this field + ("_iEDPresenceIndicator", UByte, 1), + + # (bit position 8, boolean) The Entity (normally a virtual manned module) can be task organized into an existing mixed mode unit (where mixed mode is intended to comprise a combination of computer-generated forces and virtual or even live forces)., use {@link UInt8} values for this field + ("_taskOrganizable", UByte, 1) + ] + +class SubsurfacePlatformCapabilities(ctypes.Union): + _fields_ = [ + ("capabilities", SubsurfacePlatformCapabilitiesBitField), + ("asbyte", UInt8) + ] + + def set_ammunitionSupply(self, value : UInt8): + self.capabilities._ammunitionSupply = int(value) + def get_ammunitionSupply(self) -> UInt8: + return self.capabilities._ammunitionSupply + AmmunitionSupply = property(get_ammunitionSupply, set_ammunitionSupply) + + def set_fuelSupply(self, value : UInt8): + self.capabilities._fuelSupply = int(value) + def get_fuelSupply(self) -> UInt8: + return self.capabilities._fuelSupply + FuelSupply = property(get_fuelSupply, set_fuelSupply) + + def set_recovery(self, value : UInt8): + self.capabilities._recovery = int(value) + def get_recovery(self) -> UInt8: + return self.capabilities._recovery + Recovery = property(get_recovery, set_recovery) + + def set_repair(self, value : UInt8): + self.capabilities._repair = int(value) + def get_repair(self) -> UInt8: + return self.capabilities._repair + Repair = property(get_repair, set_repair) + + def set_reserved(self, value : UInt8): + self.capabilities._reserved = int(value) + def get_reserved(self) -> UInt8: + return self.capabilities._reserved + Reserved = property(get_reserved, set_reserved) + + def set_slingLoadable(self, value : UInt8): + self.capabilities._slingLoadable = int(value) + def get_slingLoadable(self) -> UInt8: + return self.capabilities._slingLoadable + SlingLoadable = property(get_slingLoadable, set_slingLoadable) + + def set_iEDPresenceIndicator(self, value : UInt8): + self.capabilities._iEDPresenceIndicator = int(value) + def get_iEDPresenceIndicator(self) -> UInt8: + return self.capabilities._iEDPresenceIndicator + IEDPresenceIndicator = property(get_iEDPresenceIndicator, set_iEDPresenceIndicator) + + def set_taskOrganizable(self, value : UInt8): + self.capabilities._taskOrganizable = int(value) + def get_taskOrganizable(self) -> UInt8: + return self.capabilities._taskOrganizable + TaskOrganizable = property(get_taskOrganizable, set_taskOrganizable) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "AmmunitionSupply : " + str(self.AmmunitionSupply) + "\n" + outputStream += "FuelSupply : " + str(self.FuelSupply) + "\n" + outputStream += "Recovery : " + str(self.Recovery) + "\n" + outputStream += "Repair : " + str(self.Repair) + "\n" + outputStream += "Reserved : " + str(self.Reserved) + "\n" + outputStream += "SlingLoadable : " + str(self.SlingLoadable) + "\n" + outputStream += "IEDPresenceIndicator : " + str(self.IEDPresenceIndicator) + "\n" + outputStream += "TaskOrganizable : " + str(self.TaskOrganizable) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/supply_appearance.py b/dis/siso_ref_010/enums/supply_appearance.py new file mode 100644 index 0000000..04f89ef --- /dev/null +++ b/dis/siso_ref_010/enums/supply_appearance.py @@ -0,0 +1,163 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_paint_scheme import AppearancePaintScheme +from .appearance_damage import AppearanceDamage +from .parachute import Parachute +from .appearance_entityor_object_state import AppearanceEntityorObjectState +from .appearance_supply_deployed import AppearanceSupplyDeployed + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 40, marshal size 32, + * SupplyAppearance + */ + +""" + +class SupplyAppearanceBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes the visual paint design, use {@link AppearancePaintScheme} values for this field + ("_paintScheme", UByte, 1), + + # (bit position 3, length=2) Describes the damaged appearance, use {@link AppearanceDamage} values for this field + ("_damage", UByte, 2), + + # (bit position 7, length=2) Describes the status of a supply's parachute, use {@link Parachute} values for this field + ("_parachuteStatus", UByte, 2), + + # (bit position 15, boolean) Describes whether the entity is burning and flames are visible, use {@link UInt8} values for this field + ("_isFlaming", UByte, 1), + + # (bit position 21, boolean) Describes whether the entity is frozen and should not be dead reckoned, use {@link UInt8} values for this field + ("_isFrozen", UByte, 1), + + # (bit position 23, boolean) Describes whether the entity is active or deactivated, use {@link AppearanceEntityorObjectState} values for this field + ("_state", UByte, 1), + + # (bit position 24, length=2) Describes the deployed status, use {@link AppearanceSupplyDeployed} values for this field + ("_deployedStatus", UByte, 2), + + # (bit position 31, boolean) Describes whether or not the entity is masked or cloaked, use {@link UInt8} values for this field + ("_maskedCloaked", UByte, 1) + ] + +class SupplyAppearance(ctypes.Union): + _fields_ = [ + ("capabilities", SupplyAppearanceBitField), + ("asbyte", UInt8) + ] + + def set_paintScheme(self, value : AppearancePaintScheme): + self.capabilities._paintScheme = int(value) + def get_paintScheme(self) -> AppearancePaintScheme: + return AppearancePaintScheme.get_enum(self._paintScheme) + PaintScheme = property(get_paintScheme, set_paintScheme) + + def set_damage(self, value : AppearanceDamage): + self.capabilities._damage = int(value) + def get_damage(self) -> AppearanceDamage: + return AppearanceDamage.get_enum(self._damage) + Damage = property(get_damage, set_damage) + + def set_parachuteStatus(self, value : Parachute): + self.capabilities._parachuteStatus = int(value) + def get_parachuteStatus(self) -> Parachute: + return Parachute.get_enum(self._parachuteStatus) + ParachuteStatus = property(get_parachuteStatus, set_parachuteStatus) + + def set_isFlaming(self, value : UInt8): + self.capabilities._isFlaming = int(value) + def get_isFlaming(self) -> UInt8: + return self.capabilities._isFlaming + IsFlaming = property(get_isFlaming, set_isFlaming) + + def set_isFrozen(self, value : UInt8): + self.capabilities._isFrozen = int(value) + def get_isFrozen(self) -> UInt8: + return self.capabilities._isFrozen + IsFrozen = property(get_isFrozen, set_isFrozen) + + def set_state(self, value : AppearanceEntityorObjectState): + self.capabilities._state = int(value) + def get_state(self) -> AppearanceEntityorObjectState: + return AppearanceEntityorObjectState.get_enum(self._state) + State = property(get_state, set_state) + + def set_deployedStatus(self, value : AppearanceSupplyDeployed): + self.capabilities._deployedStatus = int(value) + def get_deployedStatus(self) -> AppearanceSupplyDeployed: + return AppearanceSupplyDeployed.get_enum(self._deployedStatus) + DeployedStatus = property(get_deployedStatus, set_deployedStatus) + + def set_maskedCloaked(self, value : UInt8): + self.capabilities._maskedCloaked = int(value) + def get_maskedCloaked(self) -> UInt8: + return self.capabilities._maskedCloaked + MaskedCloaked = property(get_maskedCloaked, set_maskedCloaked) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "PaintScheme : " + self.PaintScheme.get_description + "\n" + outputStream += "Damage : " + self.Damage.get_description + "\n" + outputStream += "ParachuteStatus : " + self.ParachuteStatus.get_description + "\n" + outputStream += "IsFlaming : " + str(self.IsFlaming) + "\n" + outputStream += "IsFrozen : " + str(self.IsFrozen) + "\n" + outputStream += "State : " + self.State.get_description + "\n" + outputStream += "DeployedStatus : " + self.DeployedStatus.get_description + "\n" + outputStream += "MaskedCloaked : " + str(self.MaskedCloaked) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/supply_capabilities.py b/dis/siso_ref_010/enums/supply_capabilities.py new file mode 100644 index 0000000..cae3621 --- /dev/null +++ b/dis/siso_ref_010/enums/supply_capabilities.py @@ -0,0 +1,128 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 459, marshal size 32, + * SupplyCapabilities + */ + +""" + +class SupplyCapabilitiesBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes whether the entity is able to supply some type of ammunition in response to an appropriate service request, use {@link UInt8} values for this field + ("_ammunitionSupply", UByte, 1), + + # (bit position 1, boolean) Describes whether the entity is able to supply some type of fuel in response to an appropriate service request, use {@link UInt8} values for this field + ("_fuelSupply", UByte, 1), + + # (bit position 2, length=3) This entry is reserved for backward compatibility and may not be reused, use {@link UInt8} values for this field + ("_reserved", UByte, 3), + + # (bit position 6, boolean) The Entity is able to be carried as a sling load payload. The extended appearance record (if available) will identify if it is currently sling loaded and entity association and/or entity offset records (if available) will provide additional sling load details (such as carrier)., use {@link UInt8} values for this field + ("_slingLoadable", UByte, 1), + + # (bit position 7, boolean) The Entity is an IED or contains an IED. The extended appearance record (if available) will identify how well hidden the IED is on the Entity. An Attached Part (if applicable, for instance a jury-rigged munition does not apply here) will identify the IED explicitly., use {@link UInt8} values for this field + ("_iEDPresenceIndicator", UByte, 1) + ] + +class SupplyCapabilities(ctypes.Union): + _fields_ = [ + ("capabilities", SupplyCapabilitiesBitField), + ("asbyte", UInt8) + ] + + def set_ammunitionSupply(self, value : UInt8): + self.capabilities._ammunitionSupply = int(value) + def get_ammunitionSupply(self) -> UInt8: + return self.capabilities._ammunitionSupply + AmmunitionSupply = property(get_ammunitionSupply, set_ammunitionSupply) + + def set_fuelSupply(self, value : UInt8): + self.capabilities._fuelSupply = int(value) + def get_fuelSupply(self) -> UInt8: + return self.capabilities._fuelSupply + FuelSupply = property(get_fuelSupply, set_fuelSupply) + + def set_reserved(self, value : UInt8): + self.capabilities._reserved = int(value) + def get_reserved(self) -> UInt8: + return self.capabilities._reserved + Reserved = property(get_reserved, set_reserved) + + def set_slingLoadable(self, value : UInt8): + self.capabilities._slingLoadable = int(value) + def get_slingLoadable(self) -> UInt8: + return self.capabilities._slingLoadable + SlingLoadable = property(get_slingLoadable, set_slingLoadable) + + def set_iEDPresenceIndicator(self, value : UInt8): + self.capabilities._iEDPresenceIndicator = int(value) + def get_iEDPresenceIndicator(self) -> UInt8: + return self.capabilities._iEDPresenceIndicator + IEDPresenceIndicator = property(get_iEDPresenceIndicator, set_iEDPresenceIndicator) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "AmmunitionSupply : " + str(self.AmmunitionSupply) + "\n" + outputStream += "FuelSupply : " + str(self.FuelSupply) + "\n" + outputStream += "Reserved : " + str(self.Reserved) + "\n" + outputStream += "SlingLoadable : " + str(self.SlingLoadable) + "\n" + outputStream += "IEDPresenceIndicator : " + str(self.IEDPresenceIndicator) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/supply_domain.py b/dis/siso_ref_010/enums/supply_domain.py new file mode 100644 index 0000000..8e1ac89 --- /dev/null +++ b/dis/siso_ref_010/enums/supply_domain.py @@ -0,0 +1,148 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 600, + * marshal size 8; + * SupplyDomain has 13 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SupplyDomain(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_used = EnumValue(0, "Not Used") + class_1_subsistence = EnumValue(1, "Class 1 - Subsistence") + class_2_clothing_individual_equipment_tools_admin_supplies = EnumValue(2, "Class 2 - Clothing, Individual Equipment, Tools, Admin. Supplies") + class_3_petroleum_oils_lubricants = EnumValue(3, "Class 3 - Petroleum, Oils, Lubricants") + class_4_construction_materials = EnumValue(4, "Class 4 - Construction Materials") + class_5_ammunition = EnumValue(5, "Class 5 - Ammunition") + class_6_personnel_demand_items = EnumValue(6, "Class 6 - Personnel Demand Items") + class_7_major_items = EnumValue(7, "Class 7 - Major Items") + class_8_medical_material = EnumValue(8, "Class 8 - Medical Material") + class_9_repair_parts_and_components = EnumValue(9, "Class 9 - Repair Parts and Components") + class_10_material_to_support_non_military_programs = EnumValue(10, "Class 10 - Material to Support Non-Military Programs") + class_11_supplies_non_doctrinal = EnumValue(11, "Class 11 - Supplies (Non Doctrinal)") + class_12_sling_loads_non_doctrinal = EnumValue(12, "Class 12 - Sling Loads (Non Doctrinal)") + default = not_used + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/supply_fuel_type.py b/dis/siso_ref_010/enums/supply_fuel_type.py new file mode 100644 index 0000000..f7b99bf --- /dev/null +++ b/dis/siso_ref_010/enums/supply_fuel_type.py @@ -0,0 +1,126 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1withfootnote.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * UID 413, marshal size 8; + * SupplyFuelType has 11 enumerations total. + * Specific values for Supply Subcategory Fuels (1). + * @see Java Tutorials: Enum Types + * @see java.lang.Enum + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + +class SupplyFuelType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + gasoline = EnumValue(1, "Gasoline") + diesel_fuel_f_54_df_2 = EnumValue(2, "Diesel Fuel (F-54/DF-2)") + jp_4_f_40_jet_b = EnumValue(3, "JP-4 (F-40/JET B)") + fuel_oil = EnumValue(4, "Fuel Oil") + jp_8_f_34_jet_a_1 = EnumValue(5, "JP-8 (F-34/JET A-1)") + fog_oil = EnumValue(6, "Fog Oil") + multi_spectral_fog_oil = EnumValue(7, "Multi-Spectral Fog Oil") + jp_5_f_44_jet_a = EnumValue(8, "JP-5 (F-44/JET A)") + jpts = EnumValue(9, "JPTS") + ts_1_russia_rus = EnumValue(10, "TS-1 (Russia (RUS))") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/surface_platform_appearance.py b/dis/siso_ref_010/enums/surface_platform_appearance.py new file mode 100644 index 0000000..4d9b699 --- /dev/null +++ b/dis/siso_ref_010/enums/surface_platform_appearance.py @@ -0,0 +1,252 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .appearance_paint_scheme import AppearancePaintScheme +from .appearance_damage import AppearanceDamage +from .appearance_trailing_effects import AppearanceTrailingEffects +from .appearance_entityor_object_state import AppearanceEntityorObjectState + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 33, marshal size 32, + * SurfacePlatformAppearance + */ + +""" + +class SurfacePlatformAppearanceBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes the visual paint design, use {@link AppearancePaintScheme} values for this field + ("_paintScheme", UByte, 1), + + # (bit position 1, boolean) Describes whether it is capable of moving on its own power, use {@link UInt8} values for this field + ("_mobilityKilled", UByte, 1), + + # (bit position 3, length=2) Describes the damaged appearance, use {@link AppearanceDamage} values for this field + ("_damage", UByte, 2), + + # (bit position 5, boolean) Describes whether or not smoke is emanating from the entity, use {@link UInt8} values for this field + ("_isSmokeEmanating", UByte, 1), + + # (bit position 6, boolean) Describes whether or not the engine is emitting smoke, use {@link UInt8} values for this field + ("_isEngineEmittingSmoke", UByte, 1), + + # (bit position 7, length=2) Describes the size of the wake trailing effect, use {@link AppearanceTrailingEffects} values for this field + ("_wakeSize", UByte, 2), + + # (bit position 12, boolean) Describes whether running lights are on or off, use {@link UInt8} values for this field + ("_runningLightsOn", UByte, 1), + + # (bit position 15, boolean) Describes whether the entity is burning and flames are visible, use {@link UInt8} values for this field + ("_isFlaming", UByte, 1), + + # (bit position 16, boolean) Describes if the accomodation ladder is lowered or not, use {@link UInt8} values for this field + ("_isAccomodationLadderLowered", UByte, 1), + + # (bit position 17, boolean) Describes whether the safety fence around a helicopter landing deck is raised, use {@link UInt8} values for this field + ("_isFenceRaised", UByte, 1), + + # (bit position 18, boolean) Describes whether the national identification flag is raised, use {@link UInt8} values for this field + ("_isFlagRaised", UByte, 1), + + # (bit position 21, boolean) Describes whether the entity is frozen and should not be dead reckoned, use {@link UInt8} values for this field + ("_isFrozen", UByte, 1), + + # (bit position 22, boolean) Describes whether the power plant is on or off, use {@link UInt8} values for this field + ("_powerPlantOn", UByte, 1), + + # (bit position 23, boolean) Describes whether the entity is active or deactivated, use {@link AppearanceEntityorObjectState} values for this field + ("_state", UByte, 1), + + # (bit position 27, boolean) Describes whether the TAS is deployed or not, use {@link UInt8} values for this field + ("_towedArraySonar", UByte, 1), + + # (bit position 28, boolean) Describes whether spot lights are on or off, use {@link UInt8} values for this field + ("_spotLightsOn", UByte, 1), + + # (bit position 29, boolean) Describes whether interior lights are on or off, use {@link UInt8} values for this field + ("_interiorLightsOn", UByte, 1) + ] + +class SurfacePlatformAppearance(ctypes.Union): + _fields_ = [ + ("capabilities", SurfacePlatformAppearanceBitField), + ("asbyte", UInt8) + ] + + def set_paintScheme(self, value : AppearancePaintScheme): + self.capabilities._paintScheme = int(value) + def get_paintScheme(self) -> AppearancePaintScheme: + return AppearancePaintScheme.get_enum(self._paintScheme) + PaintScheme = property(get_paintScheme, set_paintScheme) + + def set_mobilityKilled(self, value : UInt8): + self.capabilities._mobilityKilled = int(value) + def get_mobilityKilled(self) -> UInt8: + return self.capabilities._mobilityKilled + MobilityKilled = property(get_mobilityKilled, set_mobilityKilled) + + def set_damage(self, value : AppearanceDamage): + self.capabilities._damage = int(value) + def get_damage(self) -> AppearanceDamage: + return AppearanceDamage.get_enum(self._damage) + Damage = property(get_damage, set_damage) + + def set_isSmokeEmanating(self, value : UInt8): + self.capabilities._isSmokeEmanating = int(value) + def get_isSmokeEmanating(self) -> UInt8: + return self.capabilities._isSmokeEmanating + IsSmokeEmanating = property(get_isSmokeEmanating, set_isSmokeEmanating) + + def set_isEngineEmittingSmoke(self, value : UInt8): + self.capabilities._isEngineEmittingSmoke = int(value) + def get_isEngineEmittingSmoke(self) -> UInt8: + return self.capabilities._isEngineEmittingSmoke + IsEngineEmittingSmoke = property(get_isEngineEmittingSmoke, set_isEngineEmittingSmoke) + + def set_wakeSize(self, value : AppearanceTrailingEffects): + self.capabilities._wakeSize = int(value) + def get_wakeSize(self) -> AppearanceTrailingEffects: + return AppearanceTrailingEffects.get_enum(self._wakeSize) + WakeSize = property(get_wakeSize, set_wakeSize) + + def set_runningLightsOn(self, value : UInt8): + self.capabilities._runningLightsOn = int(value) + def get_runningLightsOn(self) -> UInt8: + return self.capabilities._runningLightsOn + RunningLightsOn = property(get_runningLightsOn, set_runningLightsOn) + + def set_isFlaming(self, value : UInt8): + self.capabilities._isFlaming = int(value) + def get_isFlaming(self) -> UInt8: + return self.capabilities._isFlaming + IsFlaming = property(get_isFlaming, set_isFlaming) + + def set_isAccomodationLadderLowered(self, value : UInt8): + self.capabilities._isAccomodationLadderLowered = int(value) + def get_isAccomodationLadderLowered(self) -> UInt8: + return self.capabilities._isAccomodationLadderLowered + IsAccomodationLadderLowered = property(get_isAccomodationLadderLowered, set_isAccomodationLadderLowered) + + def set_isFenceRaised(self, value : UInt8): + self.capabilities._isFenceRaised = int(value) + def get_isFenceRaised(self) -> UInt8: + return self.capabilities._isFenceRaised + IsFenceRaised = property(get_isFenceRaised, set_isFenceRaised) + + def set_isFlagRaised(self, value : UInt8): + self.capabilities._isFlagRaised = int(value) + def get_isFlagRaised(self) -> UInt8: + return self.capabilities._isFlagRaised + IsFlagRaised = property(get_isFlagRaised, set_isFlagRaised) + + def set_isFrozen(self, value : UInt8): + self.capabilities._isFrozen = int(value) + def get_isFrozen(self) -> UInt8: + return self.capabilities._isFrozen + IsFrozen = property(get_isFrozen, set_isFrozen) + + def set_powerPlantOn(self, value : UInt8): + self.capabilities._powerPlantOn = int(value) + def get_powerPlantOn(self) -> UInt8: + return self.capabilities._powerPlantOn + PowerPlantOn = property(get_powerPlantOn, set_powerPlantOn) + + def set_state(self, value : AppearanceEntityorObjectState): + self.capabilities._state = int(value) + def get_state(self) -> AppearanceEntityorObjectState: + return AppearanceEntityorObjectState.get_enum(self._state) + State = property(get_state, set_state) + + def set_towedArraySonar(self, value : UInt8): + self.capabilities._towedArraySonar = int(value) + def get_towedArraySonar(self) -> UInt8: + return self.capabilities._towedArraySonar + TowedArraySonar = property(get_towedArraySonar, set_towedArraySonar) + + def set_spotLightsOn(self, value : UInt8): + self.capabilities._spotLightsOn = int(value) + def get_spotLightsOn(self) -> UInt8: + return self.capabilities._spotLightsOn + SpotLightsOn = property(get_spotLightsOn, set_spotLightsOn) + + def set_interiorLightsOn(self, value : UInt8): + self.capabilities._interiorLightsOn = int(value) + def get_interiorLightsOn(self) -> UInt8: + return self.capabilities._interiorLightsOn + InteriorLightsOn = property(get_interiorLightsOn, set_interiorLightsOn) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "PaintScheme : " + self.PaintScheme.get_description + "\n" + outputStream += "MobilityKilled : " + str(self.MobilityKilled) + "\n" + outputStream += "Damage : " + self.Damage.get_description + "\n" + outputStream += "IsSmokeEmanating : " + str(self.IsSmokeEmanating) + "\n" + outputStream += "IsEngineEmittingSmoke : " + str(self.IsEngineEmittingSmoke) + "\n" + outputStream += "WakeSize : " + self.WakeSize.get_description + "\n" + outputStream += "RunningLightsOn : " + str(self.RunningLightsOn) + "\n" + outputStream += "IsFlaming : " + str(self.IsFlaming) + "\n" + outputStream += "IsAccomodationLadderLowered : " + str(self.IsAccomodationLadderLowered) + "\n" + outputStream += "IsFenceRaised : " + str(self.IsFenceRaised) + "\n" + outputStream += "IsFlagRaised : " + str(self.IsFlagRaised) + "\n" + outputStream += "IsFrozen : " + str(self.IsFrozen) + "\n" + outputStream += "PowerPlantOn : " + str(self.PowerPlantOn) + "\n" + outputStream += "State : " + self.State.get_description + "\n" + outputStream += "TowedArraySonar : " + str(self.TowedArraySonar) + "\n" + outputStream += "SpotLightsOn : " + str(self.SpotLightsOn) + "\n" + outputStream += "InteriorLightsOn : " + str(self.InteriorLightsOn) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/surface_platform_capabilities.py b/dis/siso_ref_010/enums/surface_platform_capabilities.py new file mode 100644 index 0000000..1610923 --- /dev/null +++ b/dis/siso_ref_010/enums/surface_platform_capabilities.py @@ -0,0 +1,158 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 452, marshal size 32, + * SurfacePlatformCapabilities + */ + +""" + +class SurfacePlatformCapabilitiesBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, boolean) Describes whether the entity is able to supply some type of ammunition in response to an appropriate service request, use {@link UInt8} values for this field + ("_ammunitionSupply", UByte, 1), + + # (bit position 1, boolean) Describes whether the entity is able to supply some type of fuel in response to an appropriate service request, use {@link UInt8} values for this field + ("_fuelSupply", UByte, 1), + + # (bit position 2, boolean) Describes whether the entity is able to provide recovery (e.g., towing) services in response to an appropriate service request, use {@link UInt8} values for this field + ("_recovery", UByte, 1), + + # (bit position 3, boolean) Describes whether the entity is able to supply certain repair services in response to an appropriate service request, use {@link UInt8} values for this field + ("_repair", UByte, 1), + + # (bit position 4, boolean) This entry is reserved for backward compatibility and may not be reused, use {@link UInt8} values for this field + ("_reserved", UByte, 1), + + # (bit position 6, boolean) The Entity is able to be carried as a sling load payload. The extended appearance record (if available) will identify if it is currently sling loaded and entity association and/or entity offset records (if available) will provide additional sling load details (such as carrier)., use {@link UInt8} values for this field + ("_slingLoadable", UByte, 1), + + # (bit position 7, boolean) The Entity is an IED or contains an IED. The extended appearance record (if available) will identify how well hidden the IED is on the Entity. An Attached Part (if applicable, for instance a jury-rigged munition does not apply here) will identify the IED explicitly., use {@link UInt8} values for this field + ("_iEDPresenceIndicator", UByte, 1), + + # (bit position 8, boolean) The Entity (normally a virtual manned module) can be task organized into an existing mixed mode unit (where mixed mode is intended to comprise a combination of computer-generated forces and virtual or even live forces)., use {@link UInt8} values for this field + ("_taskOrganizable", UByte, 1) + ] + +class SurfacePlatformCapabilities(ctypes.Union): + _fields_ = [ + ("capabilities", SurfacePlatformCapabilitiesBitField), + ("asbyte", UInt8) + ] + + def set_ammunitionSupply(self, value : UInt8): + self.capabilities._ammunitionSupply = int(value) + def get_ammunitionSupply(self) -> UInt8: + return self.capabilities._ammunitionSupply + AmmunitionSupply = property(get_ammunitionSupply, set_ammunitionSupply) + + def set_fuelSupply(self, value : UInt8): + self.capabilities._fuelSupply = int(value) + def get_fuelSupply(self) -> UInt8: + return self.capabilities._fuelSupply + FuelSupply = property(get_fuelSupply, set_fuelSupply) + + def set_recovery(self, value : UInt8): + self.capabilities._recovery = int(value) + def get_recovery(self) -> UInt8: + return self.capabilities._recovery + Recovery = property(get_recovery, set_recovery) + + def set_repair(self, value : UInt8): + self.capabilities._repair = int(value) + def get_repair(self) -> UInt8: + return self.capabilities._repair + Repair = property(get_repair, set_repair) + + def set_reserved(self, value : UInt8): + self.capabilities._reserved = int(value) + def get_reserved(self) -> UInt8: + return self.capabilities._reserved + Reserved = property(get_reserved, set_reserved) + + def set_slingLoadable(self, value : UInt8): + self.capabilities._slingLoadable = int(value) + def get_slingLoadable(self) -> UInt8: + return self.capabilities._slingLoadable + SlingLoadable = property(get_slingLoadable, set_slingLoadable) + + def set_iEDPresenceIndicator(self, value : UInt8): + self.capabilities._iEDPresenceIndicator = int(value) + def get_iEDPresenceIndicator(self) -> UInt8: + return self.capabilities._iEDPresenceIndicator + IEDPresenceIndicator = property(get_iEDPresenceIndicator, set_iEDPresenceIndicator) + + def set_taskOrganizable(self, value : UInt8): + self.capabilities._taskOrganizable = int(value) + def get_taskOrganizable(self) -> UInt8: + return self.capabilities._taskOrganizable + TaskOrganizable = property(get_taskOrganizable, set_taskOrganizable) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "AmmunitionSupply : " + str(self.AmmunitionSupply) + "\n" + outputStream += "FuelSupply : " + str(self.FuelSupply) + "\n" + outputStream += "Recovery : " + str(self.Recovery) + "\n" + outputStream += "Repair : " + str(self.Repair) + "\n" + outputStream += "Reserved : " + str(self.Reserved) + "\n" + outputStream += "SlingLoadable : " + str(self.SlingLoadable) + "\n" + outputStream += "IEDPresenceIndicator : " + str(self.IEDPresenceIndicator) + "\n" + outputStream += "TaskOrganizable : " + str(self.TaskOrganizable) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/surveillance_status.py b/dis/siso_ref_010/enums/surveillance_status.py new file mode 100644 index 0000000..650a571 --- /dev/null +++ b/dis/siso_ref_010/enums/surveillance_status.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 365, + * marshal size 2; + * SurveillanceStatus has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SurveillanceStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_information = EnumValue(0, "No Information") + emergency_loss_of_communications = EnumValue(1, "Emergency/Loss of Communications") + spi = EnumValue(2, "SPI") + atcrbs_code_change = EnumValue(3, "ATCRBS Code Change") + default = no_information + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/system_on_off_status.py b/dis/siso_ref_010/enums/system_on_off_status.py new file mode 100644 index 0000000..67f635f --- /dev/null +++ b/dis/siso_ref_010/enums/system_on_off_status.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 2120, + * marshal size 8; + * SystemOnOffStatus has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class SystemOnOffStatus(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + off = EnumValue(0, "Off") + on = EnumValue(1, "On") + default = off + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/tcasacasbasic_advanced_indicator.py b/dis/siso_ref_010/enums/tcasacasbasic_advanced_indicator.py new file mode 100644 index 0000000..6e54f4b --- /dev/null +++ b/dis/siso_ref_010/enums/tcasacasbasic_advanced_indicator.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 341, + * marshal size 1; + * TCASACASBasicAdvancedIndicator has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TCASACASBasicAdvancedIndicator(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + basic = EnumValue(0, "Basic") + advanced = EnumValue(1, "Advanced") + default = basic + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/tcasacasindicator.py b/dis/siso_ref_010/enums/tcasacasindicator.py new file mode 100644 index 0000000..06c1fb3 --- /dev/null +++ b/dis/siso_ref_010/enums/tcasacasindicator.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 342, + * marshal size 1; + * TCASACASIndicator has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TCASACASIndicator(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + tcas = EnumValue(0, "TCAS") + acas = EnumValue(1, "ACAS") + default = tcas + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/tcasacassoftware_version.py b/dis/siso_ref_010/enums/tcasacassoftware_version.py new file mode 100644 index 0000000..11785b5 --- /dev/null +++ b/dis/siso_ref_010/enums/tcasacassoftware_version.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 343, + * marshal size 3; + * TCASACASSoftwareVersion has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TCASACASSoftwareVersion(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + _602 = EnumValue(1, "6.0.2") + _70 = EnumValue(2, "7.0") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/tcasacastype.py b/dis/siso_ref_010/enums/tcasacastype.py new file mode 100644 index 0000000..fa68d90 --- /dev/null +++ b/dis/siso_ref_010/enums/tcasacastype.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 344, + * marshal size 3; + * TCASACASType has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TCASACASType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + acas_i = EnumValue(1, "ACAS I") + acas_ii = EnumValue(2, "ACAS II") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/tcasiiitype.py b/dis/siso_ref_010/enums/tcasiiitype.py new file mode 100644 index 0000000..51aa9c2 --- /dev/null +++ b/dis/siso_ref_010/enums/tcasiiitype.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 345, + * marshal size 1; + * TCASIIIType has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TCASIIIType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + tcas_i_or_no_statement = EnumValue(0, "TCAS I (or No Statement)") + tcas_ii = EnumValue(1, "TCAS II") + default = tcas_i_or_no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/tilink_type.py b/dis/siso_ref_010/enums/tilink_type.py new file mode 100644 index 0000000..fe3e209 --- /dev/null +++ b/dis/siso_ref_010/enums/tilink_type.py @@ -0,0 +1,148 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 370, + * marshal size 16; + * TILinkType has 13 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TILinkType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + not_used = EnumValue(0, "Not Used") + ground_initiated_communications_b_gicb = EnumValue(1, "Ground Initiated Communications B (GICB)") + automatic_dependent_surveillance_ads = EnumValue(2, "Automatic Dependent Surveillance (ADS)") + global_navigation_satellite_system_gnss = EnumValue(3, "Global Navigation Satellite System (GNSS)") + data_link_initiation_capability_dlic = EnumValue(4, "Data Link Initiation Capability (DLIC)") + aircraft_communications_addressing_and_reporting_system_acars = EnumValue(5, "Aircraft Communications Addressing and Reporting System (ACARS)") + atc_communications_management_acm = EnumValue(6, "ATC Communications Management (ACM)") + vhf_digital_link_vdl = EnumValue(7, "VHF Digital Link (VDL)") + aeronautical_telecommunication_network_atn = EnumValue(8, "Aeronautical Telecommunication Network (ATN)") + mode_select_s = EnumValue(9, "Mode Select (S)") + airborne_collision_avoidance_systems_acas = EnumValue(10, "Airborne Collision Avoidance Systems (ACAS)") + traffic_collision_avoidance_systems_tcas = EnumValue(11, "Traffic Collision Avoidance Systems (TCAS)") + automatic_dependent_surveillance_b_ads_b = EnumValue(12, "Automatic Dependent Surveillance-B (ADS-B)") + default = not_used + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/time_slot_allocation_level.py b/dis/siso_ref_010/enums/time_slot_allocation_level.py new file mode 100644 index 0000000..8086a10 --- /dev/null +++ b/dis/siso_ref_010/enums/time_slot_allocation_level.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 172, + * marshal size 8; + * TimeSlotAllocationLevel has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TimeSlotAllocationLevel(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + low_fidelity_level_0 = EnumValue(0, "Low Fidelity Level 0") + low_fidelity_level_1 = EnumValue(1, "Low Fidelity Level 1") + medium_fidelity_level_2 = EnumValue(2, "Medium Fidelity Level 2") + medium_fidelity_level_3 = EnumValue(3, "Medium Fidelity Level 3") + high_fidelity_level_4 = EnumValue(4, "High Fidelity Level 4") + default = low_fidelity_level_0 + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/time_type_source.py b/dis/siso_ref_010/enums/time_type_source.py new file mode 100644 index 0000000..725e6b7 --- /dev/null +++ b/dis/siso_ref_010/enums/time_type_source.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 367, + * marshal size 2; + * TimeTypeSource has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TimeTypeSource(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + compute_locally = EnumValue(0, "Compute Locally") + even_second = EnumValue(1, "Even Second") + odd_second = EnumValue(2, "Odd Second") + default = compute_locally + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/transfer_control_transfer_type.py b/dis/siso_ref_010/enums/transfer_control_transfer_type.py new file mode 100644 index 0000000..05f774d --- /dev/null +++ b/dis/siso_ref_010/enums/transfer_control_transfer_type.py @@ -0,0 +1,146 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 224, + * marshal size 8; + * TransferControlTransferType has 11 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TransferControlTransferType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + push_transfer_entity = EnumValue(1, "Push Transfer - Entity") + automatic_pull_transfer_entity = EnumValue(2, "Automatic Pull Transfer - Entity") + not_used = EnumValue(3, "Not Used") + push_transfer_environmental_process = EnumValue(4, "Push Transfer - Environmental Process") + automatic_pull_transfer_environmental_process = EnumValue(5, "Automatic Pull Transfer - Environmental Process") + not_used_2 = EnumValue(6, "Not Used") + cancel_transfer = EnumValue(7, "Cancel Transfer") + manual_pull_transfer_entity = EnumValue(8, "Manual Pull Transfer - Entity") + manual_pull_transfer_environmental_process = EnumValue(9, "Manual Pull Transfer - Environmental Process") + remove_entity = EnumValue(10, "Remove Entity") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/transmission_indicator.py b/dis/siso_ref_010/enums/transmission_indicator.py new file mode 100644 index 0000000..344e2dc --- /dev/null +++ b/dis/siso_ref_010/enums/transmission_indicator.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 372, + * marshal size 8; + * TransmissionIndicator has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TransmissionIndicator(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + original_interrogation = EnumValue(1, "Original Interrogation") + interrogation_reply = EnumValue(2, "Interrogation Reply") + squitter_transmission = EnumValue(3, "Squitter Transmission") + default = no_statement + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/transmitter_antenna_pattern_reference_system.py b/dis/siso_ref_010/enums/transmitter_antenna_pattern_reference_system.py new file mode 100644 index 0000000..24377ec --- /dev/null +++ b/dis/siso_ref_010/enums/transmitter_antenna_pattern_reference_system.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 168, + * marshal size 8; + * TransmitterAntennaPatternReferenceSystem has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TransmitterAntennaPatternReferenceSystem(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + world_coordinates = EnumValue(1, "World Coordinates") + entity_coordinates = EnumValue(2, "Entity Coordinates") + default = world_coordinates + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/transmitter_antenna_pattern_type.py b/dis/siso_ref_010/enums/transmitter_antenna_pattern_type.py new file mode 100644 index 0000000..4983e52 --- /dev/null +++ b/dis/siso_ref_010/enums/transmitter_antenna_pattern_type.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 167, + * marshal size 16; + * TransmitterAntennaPatternType has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TransmitterAntennaPatternType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + isotropic_spherical_radiation_pattern = EnumValue(0, "Isotropic (Spherical Radiation Pattern)") + beam = EnumValue(1, "Beam") + spherical_harmonic = EnumValue(2, "Spherical harmonic") + transmitter_radiation_volume = EnumValue(4, "Transmitter Radiation Volume") + beam_and_transmitter_radiation_volume = EnumValue(5, "Beam and Transmitter Radiation Volume") + omnidirectional_toroidal_radiation_pattern = EnumValue(6, "Omnidirectional (Toroidal Radiation Pattern)") + default = isotropic_spherical_radiation_pattern + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/transmitter_crypto_system.py b/dis/siso_ref_010/enums/transmitter_crypto_system.py new file mode 100644 index 0000000..6129105 --- /dev/null +++ b/dis/siso_ref_010/enums/transmitter_crypto_system.py @@ -0,0 +1,150 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 166, + * marshal size 16; + * TransmitterCryptoSystem has 15 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TransmitterCryptoSystem(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_encryption_device = EnumValue(0, "No Encryption Device") + ky_28 = EnumValue(1, "KY-28") + ky_58 = EnumValue(2, "KY-58") + narrow_spectrum_secure_voice_nsve = EnumValue(3, "Narrow Spectrum Secure Voice (NSVE)") + wide_spectrum_secure_voice_wsve = EnumValue(4, "Wide Spectrum Secure Voice (WSVE)") + sincgars_icom = EnumValue(5, "SINCGARS ICOM") + ky_75 = EnumValue(6, "KY-75") + ky_100 = EnumValue(7, "KY-100") + ky_57 = EnumValue(8, "KY-57") + kyv_5 = EnumValue(9, "KYV-5") + link_11_kg_40a_p_ntds = EnumValue(10, "Link 11 KG-40A-P (NTDS)") + link_11b_kg_40a_s = EnumValue(11, "Link 11B KG-40A-S") + link_11_kg_40ar = EnumValue(12, "Link 11 KG-40AR") + kgv_135a = EnumValue(13, "KGV-135A") + tactical_secure_voice_tsv = EnumValue(14, "Tactical Secure Voice (TSV)") + default = no_encryption_device + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/transmitter_detail_amplitude_modulation.py b/dis/siso_ref_010/enums/transmitter_detail_amplitude_modulation.py new file mode 100644 index 0000000..9b31c4c --- /dev/null +++ b/dis/siso_ref_010/enums/transmitter_detail_amplitude_modulation.py @@ -0,0 +1,146 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 156, + * marshal size 16; + * TransmitterDetailAmplitudeModulation has 11 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TransmitterDetailAmplitudeModulation(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + afsk_audio_frequency_shift_keying = EnumValue(1, "AFSK (Audio Frequency Shift Keying)") + am_amplitude_modulation = EnumValue(2, "AM (Amplitude Modulation)") + cw_continuous_wave_modulation = EnumValue(3, "CW (Continuous Wave Modulation)") + dsb_double_sideband = EnumValue(4, "DSB (Double Sideband)") + isb_independent_sideband = EnumValue(5, "ISB (Independent Sideband)") + lsb_single_band_suppressed_carrier_lower_sideband_mode = EnumValue(6, "LSB (Single Band Suppressed Carrier, Lower Sideband Mode)") + ssb_full_single_sideband_full_carrier = EnumValue(7, "SSB-Full (Single Sideband Full Carrier)") + ssb_reduc_single_band_reduced_carrier = EnumValue(8, "SSB-Reduc (Single Band Reduced Carrier)") + usb_single_band_suppressed_carrier_upper_sideband_mode = EnumValue(9, "USB (Single Band Suppressed Carrier, Upper Sideband Mode)") + vsb_vestigial_sideband = EnumValue(10, "VSB (Vestigial Sideband)") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/transmitter_detail_amplitudeand_angle_modulation.py b/dis/siso_ref_010/enums/transmitter_detail_amplitudeand_angle_modulation.py new file mode 100644 index 0000000..0b41909 --- /dev/null +++ b/dis/siso_ref_010/enums/transmitter_detail_amplitudeand_angle_modulation.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 157, + * marshal size 16; + * TransmitterDetailAmplitudeandAngleModulation has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TransmitterDetailAmplitudeandAngleModulation(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + amplitude_and_angle = EnumValue(1, "Amplitude and Angle") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/transmitter_detail_anglemodulation.py b/dis/siso_ref_010/enums/transmitter_detail_anglemodulation.py new file mode 100644 index 0000000..c6dc80c --- /dev/null +++ b/dis/siso_ref_010/enums/transmitter_detail_anglemodulation.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 158, + * marshal size 16; + * TransmitterDetailAnglemodulation has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TransmitterDetailAnglemodulation(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + fm_frequency_modulation = EnumValue(1, "FM (Frequency Modulation)") + fsk_frequency_shift_keying = EnumValue(2, "FSK (Frequency Shift Keying)") + pm_phase_modulation = EnumValue(3, "PM (Phase Modulation)") + msk_minimum_shift_keying = EnumValue(4, "MSK (Minimum Shift Keying)") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/transmitter_detail_carrier_phase_shift_modulation.py b/dis/siso_ref_010/enums/transmitter_detail_carrier_phase_shift_modulation.py new file mode 100644 index 0000000..097db91 --- /dev/null +++ b/dis/siso_ref_010/enums/transmitter_detail_carrier_phase_shift_modulation.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 162, + * marshal size 16; + * TransmitterDetailCarrierPhaseShiftModulation has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TransmitterDetailCarrierPhaseShiftModulation(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/transmitter_detail_combination_modulation.py b/dis/siso_ref_010/enums/transmitter_detail_combination_modulation.py new file mode 100644 index 0000000..0222647 --- /dev/null +++ b/dis/siso_ref_010/enums/transmitter_detail_combination_modulation.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 159, + * marshal size 16; + * TransmitterDetailCombinationModulation has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TransmitterDetailCombinationModulation(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + amplitude_angle_pulse = EnumValue(1, "Amplitude-Angle-Pulse") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/transmitter_detail_pulse_modulation.py b/dis/siso_ref_010/enums/transmitter_detail_pulse_modulation.py new file mode 100644 index 0000000..6b09836 --- /dev/null +++ b/dis/siso_ref_010/enums/transmitter_detail_pulse_modulation.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 160, + * marshal size 16; + * TransmitterDetailPulseModulation has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TransmitterDetailPulseModulation(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + pulse = EnumValue(1, "Pulse") + x_band_tacan_pulse = EnumValue(2, "X Band TACAN Pulse") + y_band_tacan_pulse = EnumValue(3, "Y Band TACAN Pulse") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/transmitter_detail_satcommodulation.py b/dis/siso_ref_010/enums/transmitter_detail_satcommodulation.py new file mode 100644 index 0000000..b58119e --- /dev/null +++ b/dis/siso_ref_010/enums/transmitter_detail_satcommodulation.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 589, + * marshal size 16; + * TransmitterDetailSATCOMModulation has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TransmitterDetailSATCOMModulation(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + no_delay = EnumValue(1, "No Delay") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/transmitter_detail_unmodulated_modulation.py b/dis/siso_ref_010/enums/transmitter_detail_unmodulated_modulation.py new file mode 100644 index 0000000..fb602d1 --- /dev/null +++ b/dis/siso_ref_010/enums/transmitter_detail_unmodulated_modulation.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 161, + * marshal size 16; + * TransmitterDetailUnmodulatedModulation has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TransmitterDetailUnmodulatedModulation(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + continuous_wave_emission_of_an_unmodulated_carrier = EnumValue(1, "Continuous Wave emission of an unmodulated carrier") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/transmitter_input_source.py b/dis/siso_ref_010/enums/transmitter_input_source.py new file mode 100644 index 0000000..66773e5 --- /dev/null +++ b/dis/siso_ref_010/enums/transmitter_input_source.py @@ -0,0 +1,154 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 165, + * marshal size 8; + * TransmitterInputSource has 19 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TransmitterInputSource(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + pilot = EnumValue(1, "Pilot") + copilot = EnumValue(2, "Copilot") + first_officer = EnumValue(3, "First Officer") + driver = EnumValue(4, "Driver") + loader = EnumValue(5, "Loader") + gunner = EnumValue(6, "Gunner") + commander = EnumValue(7, "Commander") + digital_data_device = EnumValue(8, "Digital Data Device") + intercom = EnumValue(9, "Intercom") + audio_jammer = EnumValue(10, "Audio Jammer") + data_jammer = EnumValue(11, "Data Jammer") + gps_jammer = EnumValue(12, "GPS Jammer") + gps_meaconer = EnumValue(13, "GPS Meaconer") + satcom_uplink_jammer = EnumValue(14, "SATCOM Uplink Jammer") + crew_observer_1 = EnumValue(15, "Crew Observer 1") + crew_observer_2 = EnumValue(16, "Crew Observer 2") + aerial_refueling_officer_aro = EnumValue(17, "Aerial Refueling Officer (ARO)") + aerial_refueling_officer_instructor_aroi = EnumValue(18, "Aerial Refueling Officer Instructor (AROI)") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/transmitter_major_modulation.py b/dis/siso_ref_010/enums/transmitter_major_modulation.py new file mode 100644 index 0000000..0a00698 --- /dev/null +++ b/dis/siso_ref_010/enums/transmitter_major_modulation.py @@ -0,0 +1,152 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 155, + * marshal size 16; + * TransmitterMajorModulation has 9 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TransmitterMajorModulation(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + no_statement = EnumValue(0, "No Statement") + # XREF UID 156 - CLASS TransmitterDetailAmplitudeModulation + amplitude = EnumValue(1, "Amplitude") + # XREF UID 157 - CLASS TransmitterDetailAmplitudeandAngleModulation + amplitude_and_angle = EnumValue(2, "Amplitude and Angle") + # XREF UID 158 - CLASS TransmitterDetailAnglemodulation + angle = EnumValue(3, "Angle") + # XREF UID 159 - CLASS TransmitterDetailCombinationModulation + combination = EnumValue(4, "Combination") + # XREF UID 160 - CLASS TransmitterDetailPulseModulation + pulse = EnumValue(5, "Pulse") + # XREF UID 161 - CLASS TransmitterDetailUnmodulatedModulation + unmodulated = EnumValue(6, "Unmodulated") + # XREF UID 162 - CLASS TransmitterDetailCarrierPhaseShiftModulation + carrier_phase_shift_modulation_cpsm = EnumValue(7, "Carrier Phase Shift Modulation (CPSM)") + # XREF UID 589 - CLASS TransmitterDetailSATCOMModulation + satcom = EnumValue(8, "SATCOM") + default = no_statement + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/transmitter_modulation_type_system.py b/dis/siso_ref_010/enums/transmitter_modulation_type_system.py new file mode 100644 index 0000000..021e743 --- /dev/null +++ b/dis/siso_ref_010/enums/transmitter_modulation_type_system.py @@ -0,0 +1,150 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 163, + * marshal size 16; + * TransmitterModulationTypeSystem has 15 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TransmitterModulationTypeSystem(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + generic_radio_or_simple_intercom = EnumValue(1, "Generic Radio or Simple Intercom") + have_quick_i = EnumValue(2, "HAVE QUICK I") + have_quick_ii = EnumValue(3, "HAVE QUICK II") + saturn = EnumValue(4, "SATURN") + sincgars = EnumValue(5, "SINCGARS") + cctt_sincgars = EnumValue(6, "CCTT SINCGARS") + eplrs_enhanced_position_location_reporting_system = EnumValue(7, "EPLRS (Enhanced Position Location Reporting System)") + jtids_mids = EnumValue(8, "JTIDS/MIDS") + link_11 = EnumValue(9, "Link 11") + link_11b = EnumValue(10, "Link 11B") + l_band_satcom = EnumValue(11, "L-Band SATCOM") + enhanced_sincgars_73 = EnumValue(12, "Enhanced SINCGARS 7.3") + navigation_aid = EnumValue(13, "Navigation Aid") + muos = EnumValue(14, "MUOS") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/transmitter_transmit_state.py b/dis/siso_ref_010/enums/transmitter_transmit_state.py new file mode 100644 index 0000000..7680d3f --- /dev/null +++ b/dis/siso_ref_010/enums/transmitter_transmit_state.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 164, + * marshal size 8; + * TransmitterTransmitState has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TransmitterTransmitState(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + off = EnumValue(0, "Off") + on_but_not_transmitting = EnumValue(1, "On but not transmitting") + on_and_transmitting = EnumValue(2, "On and transmitting") + default = off + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/transponder_interrogator_indicator.py b/dis/siso_ref_010/enums/transponder_interrogator_indicator.py new file mode 100644 index 0000000..c9defd1 --- /dev/null +++ b/dis/siso_ref_010/enums/transponder_interrogator_indicator.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 337, + * marshal size 1; + * TransponderInterrogatorIndicator has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TransponderInterrogatorIndicator(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + transponder = EnumValue(0, "Transponder") + interrogator = EnumValue(1, "Interrogator") + default = transponder + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/turn_rate_source.py b/dis/siso_ref_010/enums/turn_rate_source.py new file mode 100644 index 0000000..cd0e61e --- /dev/null +++ b/dis/siso_ref_010/enums/turn_rate_source.py @@ -0,0 +1,138 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 366, + * marshal size 2; + * TurnRateSource has 3 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class TurnRateSource(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + compute_locally = EnumValue(0, "Compute Locally") + less_than_1_degree_turn_or_not_turning = EnumValue(1, "Less Than 1-Degree Turn or Not Turning") + _1_degree_or_greater_turn_rate = EnumValue(2, "1-Degree or Greater Turn Rate") + default = compute_locally + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/uaacoustic_emitter_system_function.py b/dis/siso_ref_010/enums/uaacoustic_emitter_system_function.py new file mode 100644 index 0000000..5209672 --- /dev/null +++ b/dis/siso_ref_010/enums/uaacoustic_emitter_system_function.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 145, + * marshal size 8; + * UAAcousticEmitterSystemFunction has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class UAAcousticEmitterSystemFunction(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + platform_search_detect_track = EnumValue(1, "Platform search/detect/track") + navigation = EnumValue(2, "Navigation") + mine_hunting = EnumValue(3, "Mine hunting") + weapon_search_detect_track_detect = EnumValue(4, "Weapon search/detect/track/detect") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/uaacoustic_system_name.py b/dis/siso_ref_010/enums/uaacoustic_system_name.py new file mode 100644 index 0000000..58d8269 --- /dev/null +++ b/dis/siso_ref_010/enums/uaacoustic_system_name.py @@ -0,0 +1,145 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 144, + * marshal size 16; + * UAAcousticSystemName has 10 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class UAAcousticSystemName(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + an_bqq_5 = EnumValue(1, "AN/BQQ-5") + an_ssq_62 = EnumValue(2, "AN/SSQ-62") + an_sqs_23 = EnumValue(3, "AN/SQS-23") + an_sqs_26 = EnumValue(4, "AN/SQS-26") + an_sqs_53 = EnumValue(5, "AN/SQS-53") + alfs = EnumValue(6, "ALFS") + lfa = EnumValue(7, "LFA") + an_aqs_901 = EnumValue(8, "AN/AQS-901") + an_aqs_902 = EnumValue(9, "AN/AQS-902") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/uaactive_emission_parameter_index.py b/dis/siso_ref_010/enums/uaactive_emission_parameter_index.py new file mode 100644 index 0000000..c7fa69c --- /dev/null +++ b/dis/siso_ref_010/enums/uaactive_emission_parameter_index.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 146, + * marshal size 16; + * UAActiveEmissionParameterIndex has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class UAActiveEmissionParameterIndex(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/uaadditional_passive_activity_parameter_index.py b/dis/siso_ref_010/enums/uaadditional_passive_activity_parameter_index.py new file mode 100644 index 0000000..8ae7bdf --- /dev/null +++ b/dis/siso_ref_010/enums/uaadditional_passive_activity_parameter_index.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 150, + * marshal size 16; + * UAAdditionalPassiveActivityParameterIndex has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class UAAdditionalPassiveActivityParameterIndex(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/uapassive_parameter_index.py b/dis/siso_ref_010/enums/uapassive_parameter_index.py new file mode 100644 index 0000000..fe5c78f --- /dev/null +++ b/dis/siso_ref_010/enums/uapassive_parameter_index.py @@ -0,0 +1,136 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 148, + * marshal size 16; + * UAPassiveParameterIndex has 1 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class UAPassiveParameterIndex(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + default = other + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/uapropulsion_plant_configuration.py b/dis/siso_ref_010/enums/uapropulsion_plant_configuration.py new file mode 100644 index 0000000..b137060 --- /dev/null +++ b/dis/siso_ref_010/enums/uapropulsion_plant_configuration.py @@ -0,0 +1,99 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + +from .uapropulsion_plant_configuration_configuration import UAPropulsionPlantConfigurationConfiguration + +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +UByte = ctypes.c_ubyte +UInt = ctypes.c_uint + +# autogenerated using string template disbitset1.txt +# package edu.nps.moves.dis7.enumerations; + +""" +/** + * Generated from XML, + * UID 149, marshal size 16, + * UAPropulsionPlantConfiguration + */ + +""" + +class UAPropulsionPlantConfigurationBitField(ctypes.Structure): + _fields_ = [ + # (bit position 0, length=7) Describes the configuration of the power plant, use {@link UAPropulsionPlantConfigurationConfiguration} values for this field + ("_configuration", UByte, 7), + + # (bit position 7, boolean) Describes whether the hull-mounted masker is on or off, use {@link UInt8} values for this field + ("_hullMountedMaskerOn", UByte, 1) + ] + +class UAPropulsionPlantConfiguration(ctypes.Union): + _fields_ = [ + ("capabilities", UAPropulsionPlantConfigurationBitField), + ("asbyte", UInt8) + ] + + def set_configuration(self, value : UAPropulsionPlantConfigurationConfiguration): + self.capabilities._configuration = int(value) + def get_configuration(self) -> UAPropulsionPlantConfigurationConfiguration: + return UAPropulsionPlantConfigurationConfiguration.get_enum(self._configuration) + Configuration = property(get_configuration, set_configuration) + + def set_hullMountedMaskerOn(self, value : UInt8): + self.capabilities._hullMountedMaskerOn = int(value) + def get_hullMountedMaskerOn(self) -> UInt8: + return self.capabilities._hullMountedMaskerOn + HullMountedMaskerOn = property(get_hullMountedMaskerOn, set_hullMountedMaskerOn) + + + def to_string(self): + outputStream = "" + outputStream += format(self.asbyte, '#032b') + "\n" + outputStream += "Configuration : " + self.Configuration.get_description + "\n" + outputStream += "HullMountedMaskerOn : " + str(self.HullMountedMaskerOn) + "\n" + return outputStream + + def __str__(self): + return self.to_string() + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/uapropulsion_plant_configuration_configuration.py b/dis/siso_ref_010/enums/uapropulsion_plant_configuration_configuration.py new file mode 100644 index 0000000..dc0309e --- /dev/null +++ b/dis/siso_ref_010/enums/uapropulsion_plant_configuration_configuration.py @@ -0,0 +1,142 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 335, + * marshal size 7; + * UAPropulsionPlantConfigurationConfiguration has 7 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class UAPropulsionPlantConfigurationConfiguration(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + other = EnumValue(0, "Other") + diesel_electric = EnumValue(1, "Diesel/Electric") + diesel = EnumValue(2, "Diesel") + battery = EnumValue(3, "Battery") + turbine_reduction = EnumValue(4, "Turbine Reduction") + steam = EnumValue(6, "Steam") + gas_turbine = EnumValue(7, "Gas Turbine") + default = other + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/uascan_pattern.py b/dis/siso_ref_010/enums/uascan_pattern.py new file mode 100644 index 0000000..cf44f84 --- /dev/null +++ b/dis/siso_ref_010/enums/uascan_pattern.py @@ -0,0 +1,141 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 147, + * marshal size 16; + * UAScanPattern has 6 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class UAScanPattern(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + scan_pattern_not_used = EnumValue(0, "Scan pattern not used") + conical = EnumValue(1, "Conical") + helical = EnumValue(2, "Helical") + raster = EnumValue(3, "Raster") + sector_search = EnumValue(4, "Sector search") + continuous_search = EnumValue(5, "Continuous search") + default = scan_pattern_not_used + + def get_marshaled_size(self): + return 16 diff --git a/dis/siso_ref_010/enums/uastate_change_update_indicator.py b/dis/siso_ref_010/enums/uastate_change_update_indicator.py new file mode 100644 index 0000000..8ca99c3 --- /dev/null +++ b/dis/siso_ref_010/enums/uastate_change_update_indicator.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 143, + * marshal size 8; + * UAStateChangeUpdateIndicator has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class UAStateChangeUpdateIndicator(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + state_update = EnumValue(0, "State Update") + changed_data_update = EnumValue(1, "Changed Data Update") + default = state_update + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/variable_parameter_record_type.py b/dis/siso_ref_010/enums/variable_parameter_record_type.py new file mode 100644 index 0000000..63768e4 --- /dev/null +++ b/dis/siso_ref_010/enums/variable_parameter_record_type.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 56, + * marshal size 8; + * VariableParameterRecordType has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class VariableParameterRecordType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + articulated_part = EnumValue(0, "Articulated Part") + attached_part = EnumValue(1, "Attached Part") + separation = EnumValue(2, "Separation") + entity_type = EnumValue(3, "Entity Type") + entity_association = EnumValue(4, "Entity Association") + default = articulated_part + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/variable_record_type.py b/dis/siso_ref_010/enums/variable_record_type.py new file mode 100644 index 0000000..671c825 --- /dev/null +++ b/dis/siso_ref_010/enums/variable_record_type.py @@ -0,0 +1,1400 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 66, + * marshal size 32; + * VariableRecordTypes has 1264 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class VariableRecordType(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + entity_id_list = EnumValue(1, "Entity ID List") + ddcp_join_transaction_join_request_message = EnumValue(1001, "DDCP Join Transaction Join Request Message") + ddcp_set_playback_window_transaction_set_playback_window_request_message = EnumValue(1002, "DDCP Set Playback Window Transaction Set Playback Window Request Message") + ddcp_load_mission_recording_transaction_load_mission_recording_request_message = EnumValue(1003, "DDCP Load Mission Recording Transaction Load Mission Recording Request Message") + ddcp_cue_transaction_cue_request_message = EnumValue(1004, "DDCP Cue Transaction Cue Request Message") + ddcp_play_transaction_play_request_message = EnumValue(1005, "DDCP Play Transaction Play Request Message") + ddcp_stop_transaction_stop_request_message = EnumValue(1006, "DDCP Stop Transaction Stop Request Message") + ddcp_pause_transaction_pause_request_message = EnumValue(1007, "DDCP Pause Transaction Pause Request Message") + ddcp_end_transaction_end_request_message = EnumValue(1009, "DDCP End Transaction End Request Message") + ddcp_join_response_message = EnumValue(1051, "DDCP Join Response Message") + ddcp_request_receipt_message = EnumValue(1052, "DDCP Request Receipt Message") + ddcp_playback_window_confirmed_message = EnumValue(1053, "DDCP Playback Window Confirmed Message") + ddcp_mission_recording_loaded_message = EnumValue(1054, "DDCP Mission Recording Loaded Message") + ddcp_cue_confirmed_message = EnumValue(1055, "DDCP Cue Confirmed Message") + ddcp_time_to_complete_message = EnumValue(1056, "DDCP Time to Complete Message") + ddcp_play_commenced_message = EnumValue(1057, "DDCP Play Commenced Message") + ddcp_stop_confirmed_message = EnumValue(1058, "DDCP Stop Confirmed Message") + ddcp_pause_confirmed_message = EnumValue(1059, "DDCP Pause Confirmed Message") + ddcp_end_response_message = EnumValue(1061, "DDCP End Response Message") + ddcp_master_announce_message = EnumValue(1111, "DDCP Master Announce Message") + ddcp_device_announce_message = EnumValue(1112, "DDCP Device Announce Message") + ddcp_device_exit_message = EnumValue(1114, "DDCP Device Exit Message") + ddcp_device_heartbeat_message = EnumValue(1115, "DDCP Device Heartbeat Message") + ddcp_master_time_sync_message = EnumValue(1116, "DDCP Master Time Sync Message") + ddcp_error_message = EnumValue(1118, "DDCP Error Message") + ddcp_master_stop_sync_message = EnumValue(1119, "DDCP Master Stop Sync Message") + ddcp_master_transition_message = EnumValue(1120, "DDCP Master Transition Message") + mission_time = EnumValue(1200, "Mission Time") + high_fidelity_have_quick_saturn_radio = EnumValue(3000, "High Fidelity HAVE QUICK/SATURN Radio") + blanking_sector_attribute_record = EnumValue(3500, "Blanking Sector attribute record") + angle_deception_attribute_record = EnumValue(3501, "Angle Deception attribute record") + false_targets_attribute_record = EnumValue(3502, "False Targets attribute record") + de_precision_aimpoint_record = EnumValue(4000, "DE Precision Aimpoint record") + de_area_aimpoint_record = EnumValue(4001, "DE Area Aimpoint record") + directed_energy_damage_description_record = EnumValue(4500, "Directed Energy Damage Description record") + crypto_control = EnumValue(5000, "Crypto Control") + mode_5_s_transponder_location = EnumValue(5001, "Mode 5/S Transponder Location") + mode_5_s_transponder_location_error = EnumValue(5002, "Mode 5/S Transponder Location Error") + squitter_airborne_position_report = EnumValue(5003, "Squitter Airborne Position Report") + squitter_airborne_velocity_report = EnumValue(5004, "Squitter Airborne Velocity Report") + squitter_surface_position_report = EnumValue(5005, "Squitter Surface Position Report") + squitter_identification_report = EnumValue(5006, "Squitter Identification Report") + gicb = EnumValue(5007, "GICB") + squitter_event_driven_report = EnumValue(5008, "Squitter Event-Driven Report") + antenna_location = EnumValue(5009, "Antenna Location") + basic_interactive = EnumValue(5010, "Basic Interactive") + interactive_mode_4_reply = EnumValue(5011, "Interactive Mode 4 Reply") + interactive_mode_5_reply = EnumValue(5012, "Interactive Mode 5 Reply") + interactive_basic_mode_5 = EnumValue(5013, "Interactive Basic Mode 5") + interactive_basic_mode_s = EnumValue(5014, "Interactive Basic Mode S") + io_effect = EnumValue(5500, "IO Effect") + io_communications_node = EnumValue(5501, "IO Communications Node") + identification = EnumValue(10000, "Identification") + trainer_initial_conditions_filename = EnumValue(10010, "Trainer Initial Conditions Filename") + increment_31_mission_data_load_name = EnumValue(10020, "Increment 3.1 Mission Data Load Name") + increment_2_mission_data_load_name = EnumValue(10030, "Increment 2 Mission Data Load Name") + set_markpoint_command = EnumValue(10110, "Set Markpoint Command") + markpoint_id = EnumValue(10115, "Markpoint ID") + reaction_level = EnumValue(10140, "Reaction Level") + weapon_reload = EnumValue(10150, "Weapon Reload") + ces_entity_set_clear_status = EnumValue(10157, "CES Entity Set / Clear Status") + activate_entity = EnumValue(10160, "Activate Entity") + disengage_reengage = EnumValue(10170, "Disengage / Reengage") + fuel_freeze = EnumValue(10190, "Fuel Freeze") + fire_launch_dispense = EnumValue(10250, "Fire Launch Dispense") + target_assignment = EnumValue(10254, "Target Assignment") + cic_enable = EnumValue(10256, "CIC Enable") + shoot_inhibit = EnumValue(10258, "Shoot Inhibit") + posture = EnumValue(10259, "Posture") + jammer_state = EnumValue(10262, "Jammer State") + jammer_type = EnumValue(10263, "Jammer Type") + dynamic_targeting = EnumValue(10264, "Dynamic Targeting") + manual_jamming_on_override = EnumValue(10267, "Manual Jamming On Override") + soj_axis = EnumValue(10268, "SOJ Axis") + emitter_override = EnumValue(10280, "Emitter Override") + shields = EnumValue(10290, "Shields") + crash_override = EnumValue(10300, "Crash Override") + stop_buzzer = EnumValue(10306, "Stop Buzzer") + target_lasing_on_off = EnumValue(10307, "Target Lasing - On / Off") + target_lasing_laser_code = EnumValue(10308, "Target Lasing - Laser Code") + power_plant = EnumValue(10310, "Power Plant") + tactical_lighting_on_off_control_light_control = EnumValue(10311, "Tactical Lighting On / Off Control - Light Control") + tactical_lighting_blinker_control_blinker_value = EnumValue(10312, "Tactical Lighting Blinker Control - Blinker Value") + tactical_lighting_on_off_control_light_control_type = EnumValue(10313, "Tactical Lighting On / Off Control - Light Control Type") + park_vehicle = EnumValue(10314, "Park Vehicle") + signaling_on_off = EnumValue(10315, "Signaling On / Off") + signaling_device = EnumValue(10316, "Signaling Device") + ownship_id = EnumValue(10400, "Ownship ID") + state_change = EnumValue(10600, "State Change") + entity_type = EnumValue(11000, "Entity Type") + concatenated = EnumValue(11100, "Concatenated") + kind = EnumValue(11110, "Kind") + domain = EnumValue(11120, "Domain") + country = EnumValue(11130, "Country") + category = EnumValue(11140, "Category") + subcategory = EnumValue(11150, "Subcategory") + specific = EnumValue(11160, "Specific") + extra = EnumValue(11170, "Extra") + force_id = EnumValue(11180, "Force ID") + force_id_2 = EnumValue(11200, "Force ID") + description = EnumValue(11300, "Description") + tanker_boom_control = EnumValue(11500, "Tanker Boom Control") + airport_lights = EnumValue(11501, "Airport Lights") + weather_post = EnumValue(11502, "Weather Post") + localizer_and_glideslope = EnumValue(11503, "Localizer and GlideSlope") + tacan_navaids = EnumValue(11504, "TACAN NavAids") + alternative_entity_type = EnumValue(12000, "Alternative Entity Type") + kind_2 = EnumValue(12110, "Kind") + domain_2 = EnumValue(12120, "Domain") + country_2 = EnumValue(12130, "Country") + category_2 = EnumValue(12140, "Category") + subcategory_2 = EnumValue(12150, "Subcategory") + specific_2 = EnumValue(12160, "Specific") + extra_2 = EnumValue(12170, "Extra") + description_2 = EnumValue(12300, "Description") + entity_marking = EnumValue(13000, "Entity Marking") + entity_marking_characters = EnumValue(13100, "Entity Marking Characters") + crew_id = EnumValue(13200, "Crew ID") + task_organization = EnumValue(14000, "Task Organization") + regiment_name = EnumValue(14200, "Regiment Name") + battalion_name = EnumValue(14300, "Battalion Name") + company_name = EnumValue(14400, "Company Name") + platoon_name = EnumValue(14500, "Platoon Name") + squad_name = EnumValue(14520, "Squad Name") + team_name = EnumValue(14540, "Team Name") + bumper_number = EnumValue(14600, "Bumper Number") + vehicle_number = EnumValue(14700, "Vehicle Number") + unit_number = EnumValue(14800, "Unit Number") + dis_identity = EnumValue(15000, "DIS Identity") + dis_site_id = EnumValue(15100, "DIS Site ID") + dis_host_id = EnumValue(15200, "DIS Host ID") + dis_entity_id = EnumValue(15300, "DIS Entity ID") + mount_intent = EnumValue(15400, "Mount Intent") + tether_unthether_command_id = EnumValue(15500, "Tether-Unthether Command ID") + teleport_entity_data_record = EnumValue(15510, "Teleport Entity Data Record") + dis_aggregate_id_set_if_communication_to_aggregate = EnumValue(15600, "DIS Aggregate ID (Set if communication to aggregate)") + ownership_status = EnumValue(15800, "Ownership Status") + reconstitute = EnumValue(19177, "Reconstitute") + loads = EnumValue(20000, "Loads") + crew_members = EnumValue(21000, "Crew Members") + crew_member_id = EnumValue(21100, "Crew Member ID") + health = EnumValue(21200, "Health") + job_assignment = EnumValue(21300, "Job Assignment") + fuel = EnumValue(23000, "Fuel") + quantity = EnumValue(23100, "Quantity") + quantity_2 = EnumValue(23105, "Quantity") + ammunition = EnumValue(24000, "Ammunition") + _120_mm_heat_quantity = EnumValue(24001, "120-mm HEAT, quantity") + _120_mm_sabot_quantity = EnumValue(24002, "120-mm SABOT, quantity") + _127_mm_m8_quantity = EnumValue(24003, "12.7-mm M8, quantity") + _127_mm_m20_quantity = EnumValue(24004, "12.7-mm M20, quantity") + _762_mm_m62_quantity = EnumValue(24005, "7.62-mm M62, quantity") + m250_ukl8a1_quantity = EnumValue(24006, "M250 UKL8A1, quantity") + m250_ukl8a3_quantity = EnumValue(24007, "M250 UKL8A3, quantity") + _762_mm_m80_quantity = EnumValue(24008, "7.62-mm M80, quantity") + _127_mm_quantity = EnumValue(24009, "12.7-mm, quantity") + _762_mm_quantity = EnumValue(24010, "7.62-mm, quantity") + mines_quantity = EnumValue(24060, "Mines, quantity") + type = EnumValue(24100, "Type") + kind_3 = EnumValue(24110, "Kind") + domain_3 = EnumValue(24120, "Domain") + country_3 = EnumValue(24130, "Country") + category_3 = EnumValue(24140, "Category") + subcategory_3 = EnumValue(24150, "Subcategory") + extra_3 = EnumValue(24160, "Extra") + description_3 = EnumValue(24300, "Description") + cargo = EnumValue(25000, "Cargo") + vehicle_mass = EnumValue(26000, "Vehicle Mass") + supply_quantity = EnumValue(27000, "Supply Quantity") + armament = EnumValue(28000, "Armament") + status = EnumValue(30000, "Status") + activate_entity_2 = EnumValue(30010, "Activate entity") + subscription_state = EnumValue(30100, "Subscription State") + round_trip_time_delay = EnumValue(30300, "Round trip time delay") + tadil_j_message_count_label_0 = EnumValue(30400, "TADIL J message count (label 0)") + tadil_j_message_count_label_1 = EnumValue(30401, "TADIL J message count (label 1)") + tadil_j_message_count_label_2 = EnumValue(30402, "TADIL J message count (label 2)") + tadil_j_message_count_label_3 = EnumValue(30403, "TADIL J message count (label 3)") + tadil_j_message_count_label_4 = EnumValue(30404, "TADIL J message count (label 4)") + tadil_j_message_count_label_5 = EnumValue(30405, "TADIL J message count (label 5)") + tadil_j_message_count_label_6 = EnumValue(30406, "TADIL J message count (label 6)") + tadil_j_message_count_label_7 = EnumValue(30407, "TADIL J message count (label 7)") + tadil_j_message_count_label_8 = EnumValue(30408, "TADIL J message count (label 8)") + tadil_j_message_count_label_9 = EnumValue(30409, "TADIL J message count (label 9)") + tadil_j_message_count_label_10 = EnumValue(30410, "TADIL J message count (label 10)") + tadil_j_message_count_label_11 = EnumValue(30411, "TADIL J message count (label 11)") + tadil_j_message_count_label_12 = EnumValue(30412, "TADIL J message count (label 12)") + tadil_j_message_count_label_13 = EnumValue(30413, "TADIL J message count (label 13)") + tadil_j_message_count_label_14 = EnumValue(30414, "TADIL J message count (label 14)") + tadil_j_message_count_label_15 = EnumValue(30415, "TADIL J message count (label 15)") + tadil_j_message_count_label_16 = EnumValue(30416, "TADIL J message count (label 16)") + tadil_j_message_count_label_17 = EnumValue(30417, "TADIL J message count (label 17)") + tadil_j_message_count_label_18 = EnumValue(30418, "TADIL J message count (label 18)") + tadil_j_message_count_label_19 = EnumValue(30419, "TADIL J message count (label 19)") + tadil_j_message_count_label_20 = EnumValue(30420, "TADIL J message count (label 20)") + tadil_j_message_count_label_21 = EnumValue(30421, "TADIL J message count (label 21)") + tadil_j_message_count_label_22 = EnumValue(30422, "TADIL J message count (label 22)") + tadil_j_message_count_label_23 = EnumValue(30423, "TADIL J message count (label 23)") + tadil_j_message_count_label_24 = EnumValue(30424, "TADIL J message count (label 24)") + tadil_j_message_count_label_25 = EnumValue(30425, "TADIL J message count (label 25)") + tadil_j_message_count_label_26 = EnumValue(30426, "TADIL J message count (label 26)") + tadil_j_message_count_label_27 = EnumValue(30427, "TADIL J message count (label 27)") + tadil_j_message_count_label_28 = EnumValue(30428, "TADIL J message count (label 28)") + tadil_j_message_count_label_29 = EnumValue(30429, "TADIL J message count (label 29)") + tadil_j_message_count_label_30 = EnumValue(30430, "TADIL J message count (label 30)") + tadil_j_message_count_label_31 = EnumValue(30431, "TADIL J message count (label 31)") + position = EnumValue(31000, "Position") + route_waypoint_type = EnumValue(31010, "Route (Waypoint) type") + milgrid10 = EnumValue(31100, "MilGrid10") + geocentric_coordinates = EnumValue(31200, "Geocentric Coordinates") + x = EnumValue(31210, "X") + y = EnumValue(31220, "Y") + z = EnumValue(31230, "Z") + latitude = EnumValue(31300, "Latitude") + longitude = EnumValue(31400, "Longitude") + line_of_sight = EnumValue(31500, "Line of Sight") + x_2 = EnumValue(31510, "X") + y_2 = EnumValue(31520, "Y") + z_2 = EnumValue(31530, "Z") + altitude = EnumValue(31600, "Altitude") + destination_latitude = EnumValue(31700, "Destination Latitude") + destination_longitude = EnumValue(31800, "Destination Longitude") + destination_altitude = EnumValue(31900, "Destination Altitude") + orientation = EnumValue(32000, "Orientation") + hull_heading_angle = EnumValue(32100, "Hull Heading Angle") + hull_pitch_angle = EnumValue(32200, "Hull Pitch Angle") + roll_angle = EnumValue(32300, "Roll Angle") + x_3 = EnumValue(32500, "X") + y_3 = EnumValue(32600, "Y") + z_3 = EnumValue(32700, "Z") + appearance = EnumValue(33000, "Appearance") + ambient_lighting = EnumValue(33100, "Ambient Lighting") + lights = EnumValue(33101, "Lights") + paint_scheme = EnumValue(33200, "Paint Scheme") + smoke = EnumValue(33300, "Smoke") + trailing_effects = EnumValue(33400, "Trailing Effects") + flaming = EnumValue(33500, "Flaming") + marking = EnumValue(33600, "Marking") + mine_plows_attached = EnumValue(33710, "Mine Plows Attached") + mine_rollers_attached = EnumValue(33720, "Mine Rollers Attached") + tank_turret_azimuth = EnumValue(33730, "Tank Turret Azimuth") + failures_and_malfunctions = EnumValue(34000, "Failures and Malfunctions") + age = EnumValue(34100, "Age") + kilometers = EnumValue(34110, "Kilometers") + damage = EnumValue(35000, "Damage") + cause = EnumValue(35050, "Cause") + mobility_kill = EnumValue(35100, "Mobility Kill") + fire_power_kill = EnumValue(35200, "Fire-Power Kill") + personnel_casualties = EnumValue(35300, "Personnel Casualties") + velocity = EnumValue(36000, "Velocity") + x_velocity = EnumValue(36100, "X-velocity") + y_velocity = EnumValue(36200, "Y-velocity") + z_velocity = EnumValue(36300, "Z-velocity") + speed = EnumValue(36400, "Speed") + acceleration = EnumValue(37000, "Acceleration") + x_acceleration = EnumValue(37100, "X-acceleration") + y_acceleration = EnumValue(37200, "Y-acceleration") + z_acceleration = EnumValue(37300, "Z-acceleration") + engine_status = EnumValue(38100, "Engine Status") + primary_target_line_ptl = EnumValue(39000, "Primary Target Line (PTL)") + exercise = EnumValue(40000, "Exercise") + exercise_state = EnumValue(40010, "Exercise State") + restart_refresh = EnumValue(40015, "Restart/Refresh") + afatds_file_name = EnumValue(40020, "AFATDS File Name") + terrain_database = EnumValue(41000, "Terrain Database") + missions = EnumValue(42000, "Missions") + mission_id = EnumValue(42100, "Mission ID") + mission_type = EnumValue(42200, "Mission Type") + mission_request_time_stamp = EnumValue(42300, "Mission Request Time Stamp") + exercise_description = EnumValue(43000, "Exercise Description") + name = EnumValue(43100, "Name") + entities = EnumValue(43200, "Entities") + version = EnumValue(43300, "Version") + guise_mode = EnumValue(43410, "Guise Mode") + simulation_application_active_status = EnumValue(43420, "Simulation Application Active Status") + simulation_application_role_record = EnumValue(43430, "Simulation Application Role Record") + simulation_application_state = EnumValue(43440, "Simulation Application State") + visual_output_mode = EnumValue(44000, "Visual Output Mode") + simulation_manager_role = EnumValue(44100, "Simulation Manager Role") + simulation_manager_site_id = EnumValue(44110, "Simulation Manager Site ID") + simulation_manager_applic_id = EnumValue(44120, "Simulation Manager Applic. ID") + simulation_manager_entity_id = EnumValue(44130, "Simulation Manager Entity ID") + simulation_manager_active_status = EnumValue(44140, "Simulation Manager Active Status") + after_active_review_role = EnumValue(44200, "After Active Review Role") + after_active_review_site_id = EnumValue(44210, "After Active Review Site ID") + after_active_applic_id = EnumValue(44220, "After Active Applic. ID") + after_active_review_entity_id = EnumValue(44230, "After Active Review Entity ID") + after_active_review_active_status = EnumValue(44240, "After Active Review Active Status") + exercise_logger_role = EnumValue(44300, "Exercise Logger Role") + exercise_logger_site_id = EnumValue(44310, "Exercise Logger Site ID") + exercise_logger_applic_id = EnumValue(44320, "Exercise Logger Applic. ID") + exercise_entity_id = EnumValue(44330, "Exercise Entity ID") + exercise_logger_active_status = EnumValue(44340, "Exercise Logger Active Status") + synthetic_environment_manager_role = EnumValue(44400, "Synthetic Environment Manager Role") + synthetic_environment_manager_site_id = EnumValue(44410, "Synthetic Environment Manager Site ID") + synthetic_environment_manager_applic_id = EnumValue(44420, "Synthetic Environment Manager Applic. ID") + synthetic_environment_manager_entity_id = EnumValue(44430, "Synthetic Environment Manager Entity ID") + synthetic_environment_manager_active_status = EnumValue(44440, "Synthetic Environment Manager Active Status") + simnet_dis_translator_role = EnumValue(44500, "SIMNET-DIS Translator Role") + simnet_dis_translator_site_id = EnumValue(44510, "SIMNET-DIS Translator Site ID") + simnet_dis_translator_applic_id = EnumValue(44520, "SIMNET-DIS Translator Applic. ID") + simnet_dis_translator_entity_id = EnumValue(44530, "SIMNET-DIS Translator Entity ID") + simnet_dis_translator_active_status = EnumValue(44540, "SIMNET-DIS Translator Active Status") + application_rate = EnumValue(45000, "Application Rate") + application_time = EnumValue(45005, "Application Time") + application_timestep = EnumValue(45010, "Application Timestep") + feedback_time = EnumValue(45020, "Feedback Time") + simulation_rate = EnumValue(45030, "Simulation Rate") + simulation_time = EnumValue(45040, "Simulation Time") + simulation_timestep = EnumValue(45050, "Simulation Timestep") + time_interval = EnumValue(45060, "Time Interval") + time_latency = EnumValue(45070, "Time Latency") + time_scheme = EnumValue(45080, "Time Scheme") + exercise_elapsed_time = EnumValue(46000, "Exercise Elapsed Time") + elapsed_time = EnumValue(46010, "Elapsed Time") + environment = EnumValue(50000, "Environment") + scenario_date = EnumValue(50103, "Scenario Date") + time_amp_date_valid = EnumValue(50106, "Time & Date Valid") + scenario_time = EnumValue(50118, "Scenario Time") + snow_enable_disable = EnumValue(50120, "Snow Enable/Disable") + weather_attributes_request = EnumValue(50124, "Weather Attributes Request") + met_heartbeat_message = EnumValue(50126, "MET Heartbeat Message") + contrails_enable = EnumValue(50600, "Contrails Enable") + contrail_altitudes = EnumValue(50700, "Contrail Altitudes") + weather = EnumValue(51000, "Weather") + weather_condition = EnumValue(51010, "Weather Condition") + thermal_condition = EnumValue(51100, "Thermal Condition") + thermal_visibility = EnumValue(51110, "Thermal Visibility") + thermal_visibility_2 = EnumValue(51111, "Thermal Visibility") + time = EnumValue(52000, "Time") + time_2 = EnumValue(52001, "Time") + time_of_day_discrete = EnumValue(52100, "Time of Day, Discrete") + time_of_day_continuous = EnumValue(52200, "Time of Day, Continuous") + time_mode = EnumValue(52300, "Time Mode") + time_scene = EnumValue(52305, "Time Scene") + current_hour = EnumValue(52310, "Current Hour") + current_minute = EnumValue(52320, "Current Minute") + current_second = EnumValue(52330, "Current Second") + azimuth = EnumValue(52340, "Azimuth") + maximum_elevation = EnumValue(52350, "Maximum Elevation") + time_zone = EnumValue(52360, "Time Zone") + time_rate = EnumValue(52370, "Time Rate") + the_number_of_simulation_seconds_since_the_start_of_the_exercise_simulation_time = EnumValue(52380, "The number of simulation seconds since the start of the exercise (simulation time)") + time_sunrise_enabled = EnumValue(52400, "Time Sunrise Enabled") + sunrise_hour = EnumValue(52410, "Sunrise Hour") + sunrise_minute = EnumValue(52420, "Sunrise Minute") + sunrise_second = EnumValue(52430, "Sunrise Second") + sunrise_azimuth = EnumValue(52440, "Sunrise Azimuth") + time_sunset_enabled = EnumValue(52500, "Time Sunset Enabled") + sunset_hour = EnumValue(52510, "Sunset Hour") + sunset_hour_2 = EnumValue(52511, "Sunset Hour") + sunset_minute = EnumValue(52520, "Sunset Minute") + sunset_second = EnumValue(52530, "Sunset Second") + date = EnumValue(52600, "Date") + date_european = EnumValue(52601, "Date (European)") + date_us = EnumValue(52602, "Date (US)") + month = EnumValue(52610, "Month") + day = EnumValue(52620, "Day") + year = EnumValue(52630, "Year") + clouds = EnumValue(53000, "Clouds") + cloud_layer_enable = EnumValue(53050, "Cloud Layer Enable") + cloud_layer_selection = EnumValue(53060, "Cloud Layer Selection") + visibility = EnumValue(53100, "Visibility") + base_altitude = EnumValue(53200, "Base Altitude") + base_altitude_2 = EnumValue(53250, "Base Altitude") + ceiling = EnumValue(53300, "Ceiling") + ceiling_2 = EnumValue(53350, "Ceiling") + characteristics = EnumValue(53400, "Characteristics") + concentration_length = EnumValue(53410, "Concentration Length") + transmittance = EnumValue(53420, "Transmittance") + radiance = EnumValue(53430, "Radiance") + precipitation = EnumValue(54000, "Precipitation") + rain = EnumValue(54100, "Rain") + fog = EnumValue(55000, "Fog") + visibility_2 = EnumValue(55100, "Visibility") + visibility_3 = EnumValue(55101, "Visibility") + visibility_4 = EnumValue(55105, "Visibility") + density = EnumValue(55200, "Density") + base = EnumValue(55300, "Base") + view_layer_from_above = EnumValue(55401, "View Layer from above.") + transition_range = EnumValue(55410, "Transition Range") + bottom = EnumValue(55420, "Bottom") + bottom_2 = EnumValue(55425, "Bottom") + ceiling_3 = EnumValue(55430, "Ceiling") + ceiling_4 = EnumValue(55435, "Ceiling") + heavenly_bodies = EnumValue(56000, "Heavenly Bodies") + sun = EnumValue(56100, "Sun") + sun_visible = EnumValue(56105, "Sun Visible") + position_2 = EnumValue(56110, "Position") + sun_position_elevation_degrees = EnumValue(56111, "Sun Position Elevation, Degrees") + position_azimuth = EnumValue(56120, "Position Azimuth") + sun_position_azimuth_degrees = EnumValue(56121, "Sun Position Azimuth, Degrees") + position_elevation = EnumValue(56130, "Position Elevation") + position_intensity = EnumValue(56140, "Position Intensity") + moon = EnumValue(56200, "Moon") + moon_visible = EnumValue(56205, "Moon Visible") + position_3 = EnumValue(56210, "Position") + position_azimuth_2 = EnumValue(56220, "Position Azimuth") + moon_position_azimuth_degrees = EnumValue(56221, "Moon Position Azimuth, Degrees") + position_elevation_2 = EnumValue(56230, "Position Elevation") + moon_position_elevation_degrees = EnumValue(56231, "Moon Position Elevation, Degrees") + position_intensity_2 = EnumValue(56240, "Position Intensity") + horizon = EnumValue(56310, "Horizon") + horizon_azimuth = EnumValue(56320, "Horizon Azimuth") + horizon_elevation = EnumValue(56330, "Horizon Elevation") + horizon_heading = EnumValue(56340, "Horizon Heading") + horizon_intensity = EnumValue(56350, "Horizon Intensity") + humidity = EnumValue(57200, "Humidity") + visibility_5 = EnumValue(57300, "Visibility") + winds = EnumValue(57400, "Winds") + speed_2 = EnumValue(57410, "Speed") + wind_speed_knots = EnumValue(57411, "Wind Speed, Knots") + wind_direction = EnumValue(57420, "Wind Direction") + wind_direction_degrees = EnumValue(57421, "Wind Direction, Degrees") + rainsoak = EnumValue(57500, "Rainsoak") + tide_speed = EnumValue(57610, "Tide Speed") + tide_speed_knots = EnumValue(57611, "Tide Speed, Knots") + tide_direction = EnumValue(57620, "Tide Direction") + tide_direction_degrees = EnumValue(57621, "Tide Direction, Degrees") + haze = EnumValue(58000, "Haze") + visibility_6 = EnumValue(58100, "Visibility") + visibility_7 = EnumValue(58105, "Visibility") + density_2 = EnumValue(58200, "Density") + ceiling_5 = EnumValue(58430, "Ceiling") + ceiling_6 = EnumValue(58435, "Ceiling") + contaminants_and_obscurants = EnumValue(59000, "Contaminants and Obscurants") + contaminant_obscurant_type = EnumValue(59100, "Contaminant/Obscurant Type") + persistence = EnumValue(59110, "Persistence") + chemical_dosage = EnumValue(59115, "Chemical Dosage") + chemical_air_concentration = EnumValue(59120, "Chemical Air Concentration") + chemical_ground_deposition = EnumValue(59125, "Chemical Ground Deposition") + chemical_maximum_ground_deposition = EnumValue(59130, "Chemical Maximum Ground Deposition") + chemical_dosage_threshold = EnumValue(59135, "Chemical Dosage Threshold") + biological_dosage = EnumValue(59140, "Biological Dosage") + biological_air_concentration = EnumValue(59145, "Biological Air Concentration") + biological_dosage_threshold = EnumValue(59150, "Biological Dosage Threshold") + biological_binned_particle_count = EnumValue(59155, "Biological Binned Particle Count") + radiological_dosage = EnumValue(59160, "Radiological Dosage") + communications = EnumValue(60000, "Communications") + fire_bottle_reload = EnumValue(61005, "Fire Bottle Reload") + channel_type = EnumValue(61100, "Channel Type") + channel_type_2 = EnumValue(61101, "Channel Type") + channel_identification = EnumValue(61200, "Channel Identification") + alpha_identification = EnumValue(61300, "Alpha Identification") + radio_identification = EnumValue(61400, "Radio Identification") + land_line_identification = EnumValue(61500, "Land Line Identification") + intercom_identification = EnumValue(61600, "Intercom Identification") + group_network_channel_number = EnumValue(61700, "Group Network Channel Number") + radio_communications_status = EnumValue(62100, "Radio Communications Status") + boom_interphone = EnumValue(62101, "Boom Interphone") + stationary_radio_transmitters_default_time = EnumValue(62200, "Stationary Radio Transmitters Default Time") + moving_radio_transmitters_default_time = EnumValue(62300, "Moving Radio Transmitters Default Time") + stationary_radio_signals_default_time = EnumValue(62400, "Stationary Radio Signals Default Time") + moving_radio_signal_default_time = EnumValue(62500, "Moving Radio Signal Default Time") + radio_initialization_transec_security_key = EnumValue(63101, "Radio Initialization Transec Security Key") + radio_initialization_internal_noise_level = EnumValue(63102, "Radio Initialization Internal Noise Level") + radio_initialization_squelch_threshold = EnumValue(63103, "Radio Initialization Squelch Threshold") + radio_initialization_antenna_location = EnumValue(63104, "Radio Initialization Antenna Location") + radio_initialization_antenna_pattern_type = EnumValue(63105, "Radio Initialization Antenna Pattern Type") + radio_initialization_antenna_pattern_length = EnumValue(63106, "Radio Initialization Antenna Pattern Length") + radio_initialization_beam_definition = EnumValue(63107, "Radio Initialization Beam Definition") + radio_initialization_transmit_heartbeat_time = EnumValue(63108, "Radio Initialization Transmit Heartbeat Time") + radio_initialization_transmit_distance_threshold_variable_record = EnumValue(63109, "Radio Initialization Transmit Distance Threshold Variable Record") + radio_channel_initialization_lockout_id = EnumValue(63110, "Radio Channel Initialization Lockout ID") + radio_channel_initialization_hopset_id = EnumValue(63111, "Radio Channel Initialization Hopset ID") + radio_channel_initialization_preset_frequency = EnumValue(63112, "Radio Channel Initialization Preset Frequency") + radio_channel_initialization_frequency_sync_time = EnumValue(63113, "Radio Channel Initialization Frequency Sync Time") + radio_channel_initialization_comsec_key = EnumValue(63114, "Radio Channel Initialization Comsec Key") + radio_channel_initialization_alpha = EnumValue(63115, "Radio Channel Initialization Alpha") + algorithm_parameters = EnumValue(70000, "Algorithm Parameters") + dead_reckoning_algorithm_dra = EnumValue(71000, "Dead Reckoning Algorithm (DRA)") + dra_location_threshold = EnumValue(71100, "DRA Location Threshold") + dra_orientation_threshold = EnumValue(71200, "DRA Orientation Threshold") + dra_time_threshold = EnumValue(71300, "DRA Time Threshold") + simulation_management_parameters = EnumValue(72000, "Simulation Management Parameters") + checkpoint_interval = EnumValue(72100, "Checkpoint Interval") + transmitter_time_threshold = EnumValue(72600, "Transmitter Time Threshold") + receiver_time_threshold = EnumValue(72700, "Receiver Time Threshold") + interoperability_mode = EnumValue(73000, "Interoperability Mode") + simnet_data_collection = EnumValue(74000, "SIMNET Data Collection") + event_id = EnumValue(75000, "Event ID") + source_site_id = EnumValue(75100, "Source Site ID") + source_host_id = EnumValue(75200, "Source Host ID") + articulated_parts = EnumValue(90000, "Articulated Parts") + part_id = EnumValue(90050, "Part ID") + # XREF UID 55 - CLASS EntityCapabilityTypes + index = EnumValue(90070, "Index") + position_4 = EnumValue(90100, "Position") + position_rate = EnumValue(90200, "Position Rate") + extension = EnumValue(90300, "Extension") + extension_rate = EnumValue(90400, "Extension Rate") + x_4 = EnumValue(90500, "X") + x_rate = EnumValue(90600, "X-rate") + y_4 = EnumValue(90700, "Y") + y_rate = EnumValue(90800, "Y-rate") + z_4 = EnumValue(90900, "Z") + z_rate = EnumValue(91000, "Z-rate") + azimuth_2 = EnumValue(91100, "Azimuth") + azimuth_rate = EnumValue(91200, "Azimuth Rate") + elevation = EnumValue(91300, "Elevation") + elevation_rate = EnumValue(91400, "Elevation Rate") + rotation = EnumValue(91500, "Rotation") + rotation_rate = EnumValue(91600, "Rotation Rate") + dra_angular_x_velocity = EnumValue(100001, "DRA Angular X-Velocity") + dra_angular_y_velocity = EnumValue(100002, "DRA Angular Y-Velocity") + dra_angular_z_velocity = EnumValue(100003, "DRA Angular Z-Velocity") + appearance_trailing_effects = EnumValue(100004, "Appearance, Trailing Effects") + appearance_hatch = EnumValue(100005, "Appearance, Hatch") + appearance_character_set = EnumValue(100008, "Appearance, Character Set") + capability_ammunition_supplier = EnumValue(100010, "Capability, Ammunition Supplier") + capability_miscellaneous_supplier = EnumValue(100011, "Capability, Miscellaneous Supplier") + capability_repair_provider = EnumValue(100012, "Capability, Repair Provider") + articulation_parameter = EnumValue(100014, "Articulation Parameter") + articulation_parameter_type = EnumValue(100047, "Articulation Parameter Type") + articulation_parameter_value = EnumValue(100048, "Articulation Parameter Value") + time_of_day_scene = EnumValue(100058, "Time of Day-Scene") + latitude_north_location_of_weather_cell = EnumValue(100061, "Latitude-North (Location of weather cell)") + longitude_east_location_of_weather_cell = EnumValue(100063, "Longitude-East (Location of weather cell)") + tactical_driver_status = EnumValue(100068, "Tactical Driver Status") + sonar_system_status = EnumValue(100100, "Sonar System Status") + accomplished_accept = EnumValue(100160, "Accomplished accept") + upper_latitude = EnumValue(100161, "Upper latitude") + latitude_south_location_of_weather_cell = EnumValue(100162, "Latitude-South (Location of weather cell)") + western_longitude = EnumValue(100163, "Western longitude") + longitude_west_location_of_weather_cell = EnumValue(100164, "Longitude-West (location of weather cell)") + cd_rom_number_disk_id_for_terrain = EnumValue(100165, "CD ROM Number (Disk ID for terrain)") + dted_disk_id = EnumValue(100166, "DTED disk ID") + altitude_2 = EnumValue(100167, "Altitude") + tactical_system_status = EnumValue(100169, "Tactical System Status") + jtids_status = EnumValue(100170, "JTIDS Status") + tadil_j_status = EnumValue(100171, "TADIL-J Status") + dsdd_status = EnumValue(100172, "DSDD Status") + weapon_system_status = EnumValue(100200, "Weapon System Status") + subsystem_status = EnumValue(100205, "Subsystem status") + number_of_interceptors_fired = EnumValue(100206, "Number of interceptors fired") + number_of_interceptor_detonations = EnumValue(100207, "Number of interceptor detonations") + number_of_message_buffers_dropped = EnumValue(100208, "Number of message buffers dropped") + satellite_sensor_background_year_day = EnumValue(100213, "Satellite sensor background (year, day)") + satellite_sensor_background_hour_minute = EnumValue(100214, "Satellite sensor background (hour, minute)") + script_number = EnumValue(100218, "Script Number") + entity_track_update_data = EnumValue(100300, "Entity/Track/Update Data") + local_force_training = EnumValue(100400, "Local/Force Training") + entity_track_identity_data = EnumValue(100500, "Entity/Track Identity Data") + entity_for_track_event = EnumValue(100510, "Entity for Track Event") + iff_friend_foe_status = EnumValue(100520, "IFF (Friend-Foe) status") + engagement_data = EnumValue(100600, "Engagement Data") + target_latitude = EnumValue(100610, "Target Latitude") + target_longitude = EnumValue(100620, "Target Longitude") + area_of_interest_ground_impact_circle_center_latitude = EnumValue(100631, "Area of Interest (Ground Impact Circle) Center Latitude") + area_of_interest_ground_impact_circle_center_longitude = EnumValue(100632, "Area of Interest (Ground Impact Circle) Center Longitude") + area_of_interest_ground_impact_circle_radius = EnumValue(100633, "Area of Interest (Ground Impact Circle) Radius") + area_of_interest_type = EnumValue(100634, "Area of Interest Type") + target_aggregate_id = EnumValue(100640, "Target Aggregate ID") + gic_identification_number = EnumValue(100650, "GIC Identification Number") + estimated_time_of_flight_to_tbm_impact = EnumValue(100660, "Estimated Time of Flight to TBM Impact") + estimated_intercept_time = EnumValue(100661, "Estimated Intercept Time") + estimated_time_of_flight_to_next_waypoint = EnumValue(100662, "Estimated Time of Flight to Next Waypoint") + entity_track_equipment_data = EnumValue(100700, "Entity/Track Equipment Data") + emission_ew_data = EnumValue(100800, "Emission/EW Data") + appearance_data = EnumValue(100900, "Appearance Data") + command_order_data = EnumValue(101000, "Command/Order Data") + environmental_data = EnumValue(101100, "Environmental Data") + significant_event_data = EnumValue(101200, "Significant Event Data") + operator_action_data = EnumValue(101300, "Operator Action Data") + ada_engagement_mode = EnumValue(101310, "ADA Engagement Mode") + ada_shooting_status = EnumValue(101320, "ADA Shooting Status") + ada_mode = EnumValue(101321, "ADA Mode") + ada_radar_status = EnumValue(101330, "ADA Radar Status") + shoot_command = EnumValue(101340, "Shoot Command") + ada_weapon_status = EnumValue(101350, "ADA Weapon Status") + ada_firing_disciple = EnumValue(101360, "ADA Firing Disciple") + order_status = EnumValue(101370, "Order Status") + time_synchronization = EnumValue(101400, "Time Synchronization") + tomahawk_data = EnumValue(101500, "Tomahawk Data") + number_of_detonations = EnumValue(102100, "Number of Detonations") + number_of_intercepts = EnumValue(102200, "Number of Intercepts") + obt_control_mt_201 = EnumValue(200201, "OBT Control MT-201") + sensor_data_mt_202 = EnumValue(200202, "Sensor Data MT-202") + environmental_data_mt_203 = EnumValue(200203, "Environmental Data MT-203") + ownship_data_mt_204 = EnumValue(200204, "Ownship Data MT-204") + acoustic_contact_data_mt_205 = EnumValue(200205, "Acoustic Contact Data MT-205") + sonobuoy_data_mt_207 = EnumValue(200207, "Sonobuoy Data MT-207") + sonobuoy_contact_data_mt_210 = EnumValue(200210, "Sonobuoy Contact Data MT-210") + helo_control_mt_211 = EnumValue(200211, "Helo Control MT-211") + esm_control_data = EnumValue(200213, "ESM Control Data") + esm_contact_data_mt_214 = EnumValue(200214, "ESM Contact Data MT-214") + esm_emitter_data_mt_215 = EnumValue(200215, "ESM Emitter Data MT-215") + weapon_definition_data_mt_217 = EnumValue(200216, "Weapon Definition Data MT-217") + weapon_preset_data_mt_217 = EnumValue(200217, "Weapon Preset Data MT-217") + obt_control_mt_301 = EnumValue(200301, "OBT Control MT-301") + sensor_data_mt_302 = EnumValue(200302, "Sensor Data MT-302") + environmental_data_mt_303m = EnumValue(200303, "Environmental Data MT-303m") + ownship_data_mt_304 = EnumValue(200304, "Ownship Data MT-304") + acoustic_contact_data_mt_305 = EnumValue(200305, "Acoustic Contact Data MT-305") + sonobuoy_data_mt_307 = EnumValue(200307, "Sonobuoy Data MT-307") + sonobuoy_contact_data_mt_310 = EnumValue(200310, "Sonobuoy Contact Data MT-310") + helo_scenario_equipment_status = EnumValue(200311, "Helo Scenario / Equipment Status") + esm_control_data_mt_313 = EnumValue(200313, "ESM Control Data MT-313") + esm_contact_data_mt_314 = EnumValue(200314, "ESM Contact Data MT-314") + esm_emitter_data_mt_315 = EnumValue(200315, "ESM Emitter Data MT-315") + weapon_definition_data_mt_316 = EnumValue(200316, "Weapon Definition Data MT-316") + weapon_preset_data_mt_317 = EnumValue(200317, "Weapon Preset Data MT-317") + pairing_association_emt_56 = EnumValue(200400, "Pairing/Association (eMT-56)") + pointer_emt_57 = EnumValue(200401, "Pointer (eMT-57)") + reporting_responsibility_emt_58 = EnumValue(200402, "Reporting Responsibility (eMT-58)") + track_number_emt_59 = EnumValue(200403, "Track Number (eMT-59)") + id_for_link_11_reporting_emt_60 = EnumValue(200404, "ID for Link-11 Reporting (eMT-60)") + remote_track_emt_62 = EnumValue(200405, "Remote Track (eMT-62)") + link_11_error_rate_emt_63 = EnumValue(200406, "Link-11 Error Rate (eMT-63)") + track_quality_emt_64 = EnumValue(200407, "Track Quality (eMT-64)") + gridlock_emt_65 = EnumValue(200408, "Gridlock (eMT-65)") + kill_emt_66 = EnumValue(200409, "Kill (eMT-66)") + track_id_change_resolution_emt_68 = EnumValue(200410, "Track ID Change / Resolution (eMT-68)") + weapons_status_emt_69 = EnumValue(200411, "Weapons Status (eMT-69)") + link_11_operator_emt_70 = EnumValue(200412, "Link-11 Operator (eMT-70)") + force_training_transmit_emt_71 = EnumValue(200413, "Force Training Transmit (eMT-71)") + force_training_receive_emt_72 = EnumValue(200414, "Force Training Receive (eMT-72)") + interceptor_amplification_emt_75 = EnumValue(200415, "Interceptor Amplification (eMT-75)") + consumables_emt_78 = EnumValue(200416, "Consumables (eMT-78)") + link_11_local_track_quality_emt_95 = EnumValue(200417, "Link-11 Local Track Quality (eMT-95)") + dlrp_emt_19 = EnumValue(200418, "DLRP (eMT-19)") + force_order_emt_52 = EnumValue(200419, "Force Order (eMT-52)") + wilco_cantco_emt_53 = EnumValue(200420, "Wilco / Cantco (eMT-53)") + emc_bearing_emt_54 = EnumValue(200421, "EMC Bearing (eMT-54)") + change_track_eligibility_emt_55 = EnumValue(200422, "Change Track Eligibility (eMT-55)") + land_mass_reference_point = EnumValue(200423, "Land Mass Reference Point") + system_reference_point = EnumValue(200424, "System Reference Point") + pu_amplification = EnumValue(200425, "PU Amplification") + set_drift = EnumValue(200426, "Set/Drift") + begin_initialization_mt_1 = EnumValue(200427, "Begin Initialization (MT-1)") + status_and_control_mt_3 = EnumValue(200428, "Status and Control (MT-3)") + scintillation_change_mt_39 = EnumValue(200429, "Scintillation Change (MT-39)") + link_11_id_control_mt_61 = EnumValue(200430, "Link 11 ID Control (MT-61)") + pu_guard_list = EnumValue(200431, "PU Guard List") + winds_aloft_mt_14 = EnumValue(200432, "Winds Aloft (MT-14)") + surface_winds_mt_15 = EnumValue(200433, "Surface Winds (MT-15)") + sea_state_mt_17 = EnumValue(200434, "Sea State (MT-17)") + magnetic_variation_mt_37 = EnumValue(200435, "Magnetic Variation (MT-37)") + track_eligibility_mt_29 = EnumValue(200436, "Track Eligibility (MT-29)") + training_track_notification = EnumValue(200437, "Training Track Notification") + tacan_data_mt_32 = EnumValue(200501, "Tacan Data (MT-32)") + interceptor_amplification_mt_75 = EnumValue(200502, "Interceptor Amplification (MT-75)") + tacan_assignment_mt_76 = EnumValue(200503, "Tacan Assignment (MT-76)") + autopilot_status_mt_77 = EnumValue(200504, "Autopilot Status (MT-77)") + consumables_mt_78 = EnumValue(200505, "Consumables (MT-78)") + downlink_mt_79 = EnumValue(200506, "Downlink (MT-79)") + tin_report_mt_80 = EnumValue(200507, "TIN Report (MT-80)") + special_point_control_mt_81 = EnumValue(200508, "Special Point Control (MT-81)") + control_discretes_mt_82 = EnumValue(200509, "Control Discretes (MT-82)") + request_target_discretesmt_83 = EnumValue(200510, "Request Target Discretes(MT-83)") + target_discretes_mt_84 = EnumValue(200511, "Target Discretes (MT-84)") + reply_discretes_mt_85 = EnumValue(200512, "Reply Discretes (MT-85)") + command_maneuvers_mt_86 = EnumValue(200513, "Command Maneuvers (MT-86)") + target_data_mt_87 = EnumValue(200514, "Target Data (MT-87)") + target_pointer_mt_88 = EnumValue(200515, "Target Pointer (MT-88)") + intercept_data_mt_89 = EnumValue(200516, "Intercept Data (MT-89)") + decrement_missile_inventory_mt_90 = EnumValue(200517, "Decrement Missile Inventory (MT-90)") + link_4a_alert_mt_91 = EnumValue(200518, "Link-4A Alert (MT-91)") + strike_control_mt_92 = EnumValue(200519, "Strike Control (MT-92)") + speed_change_mt_25 = EnumValue(200521, "Speed Change (MT-25)") + course_change_mt_26 = EnumValue(200522, "Course Change (MT-26)") + altitude_change_mt_27 = EnumValue(200523, "Altitude Change (MT-27)") + acls_an_spn_46_status = EnumValue(200524, "ACLS AN/SPN-46 Status") + acls_aircraft_report = EnumValue(200525, "ACLS Aircraft Report") + sps_67_radar_operator_functions = EnumValue(200600, "SPS-67 Radar Operator Functions") + sps_55_radar_operator_functions = EnumValue(200601, "SPS-55 Radar Operator Functions") + spq_9a_radar_operator_functions = EnumValue(200602, "SPQ-9A Radar Operator Functions") + sps_49_radar_operator_functions = EnumValue(200603, "SPS-49 Radar Operator Functions") + mk_23_radar_operator_functions = EnumValue(200604, "MK-23 Radar Operator Functions") + sps_48_radar_operator_functions = EnumValue(200605, "SPS-48 Radar Operator Functions") + sps_40_radar_operator_functions = EnumValue(200606, "SPS-40 Radar Operator Functions") + mk_95_radar_operator_functions = EnumValue(200607, "MK-95 Radar Operator Functions") + kill_no_kill = EnumValue(200608, "Kill/No Kill") + cmt_pc = EnumValue(200609, "CMT pc") + cmc4airglobaldata = EnumValue(200610, "CMC4AirGlobalData") + cmc4globaldata = EnumValue(200611, "CMC4GlobalData") + linksim_comment_pdu = EnumValue(200612, "LINKSIM_COMMENT_PDU") + nsst_ownship_control = EnumValue(200613, "NSST Ownship Control") + other = EnumValue(240000, "Other") + mass_of_the_vehicle = EnumValue(240001, "Mass Of The Vehicle") + force_id_3 = EnumValue(240002, "Force ID") + entity_type_kind = EnumValue(240003, "Entity Type Kind") + entity_type_domain = EnumValue(240004, "Entity Type Domain") + entity_type_country = EnumValue(240005, "Entity Type Country") + entity_type_category = EnumValue(240006, "Entity Type Category") + entity_type_sub_category = EnumValue(240007, "Entity Type Sub Category") + entity_type_specific = EnumValue(240008, "Entity Type Specific") + entity_type_extra = EnumValue(240009, "Entity Type Extra") + alternative_entity_type_kind = EnumValue(240010, "Alternative Entity Type Kind") + alternative_entity_type_domain = EnumValue(240011, "Alternative Entity Type Domain") + alternative_entity_type_country = EnumValue(240012, "Alternative Entity Type Country") + alternative_entity_type_category = EnumValue(240013, "Alternative Entity Type Category") + alternative_entity_type_sub_category = EnumValue(240014, "Alternative Entity Type Sub Category") + alternative_entity_type_specific = EnumValue(240015, "Alternative Entity Type Specific") + alternative_entity_type_extra = EnumValue(240016, "Alternative Entity Type Extra") + entity_location_x = EnumValue(240017, "Entity Location X") + entity_location_y = EnumValue(240018, "Entity Location Y") + entity_location_z = EnumValue(240019, "Entity Location Z") + entity_linear_velocity_x = EnumValue(240020, "Entity Linear Velocity X") + entity_linear_velocity_y = EnumValue(240021, "Entity Linear Velocity Y") + entity_linear_velocity_z = EnumValue(240022, "Entity Linear Velocity Z") + entity_orientation_psi = EnumValue(240023, "Entity Orientation Psi") + entity_orientation_theta = EnumValue(240024, "Entity Orientation Theta") + entity_orientation_phi = EnumValue(240025, "Entity Orientation Phi") + dead_reckoning_algorithm = EnumValue(240026, "Dead Reckoning Algorithm") + dead_reckoning_linear_acceleration_x = EnumValue(240027, "Dead Reckoning Linear Acceleration X") + dead_reckoning_linear_acceleration_y = EnumValue(240028, "Dead Reckoning Linear Acceleration Y") + dead_reckoning_linear_acceleration_z = EnumValue(240029, "Dead Reckoning Linear Acceleration Z") + dead_reckoning_angular_velocity_x = EnumValue(240030, "Dead Reckoning Angular Velocity X") + dead_reckoning_angular_velocity_y = EnumValue(240031, "Dead Reckoning Angular Velocity Y") + dead_reckoning_angular_velocity_z = EnumValue(240032, "Dead Reckoning Angular Velocity Z") + entity_appearance = EnumValue(240033, "Entity Appearance") + entity_marking_character_set = EnumValue(240034, "Entity Marking Character Set") + entity_marking_11_bytes = EnumValue(240035, "Entity Marking 11 Bytes") + capability = EnumValue(240036, "Capability") + number_articulation_parameters = EnumValue(240037, "Number Articulation Parameters") + articulation_parameter_id = EnumValue(240038, "Articulation Parameter ID") + articulation_parameter_type_2 = EnumValue(240039, "Articulation Parameter Type") + articulation_parameter_value_2 = EnumValue(240040, "Articulation Parameter Value") + type_of_stores = EnumValue(240041, "Type Of Stores") + quantity_of_stores = EnumValue(240042, "Quantity Of Stores") + fuel_quantity = EnumValue(240043, "Fuel Quantity") + radar_system_status = EnumValue(240044, "Radar System Status") + radio_communication_system_status = EnumValue(240045, "Radio Communication System Status") + default_time_for_radio_transmission_for_stationary_transmitters = EnumValue(240046, "Default Time For Radio Transmission For Stationary Transmitters") + default_time_for_radio_transmission_for_moving_transmitters = EnumValue(240047, "Default Time For Radio Transmission For Moving Transmitters") + body_part_damaged_ratio = EnumValue(240048, "Body Part Damaged Ratio") + name_of_the_terrain_database_file = EnumValue(240049, "Name Of The Terrain Database File") + name_of_local_file = EnumValue(240050, "Name Of Local File") + aimpoint_bearing = EnumValue(240051, "Aimpoint Bearing") + aimpoint_elevation = EnumValue(240052, "Aimpoint Elevation") + aimpoint_range = EnumValue(240053, "Aimpoint Range") + air_speed = EnumValue(240054, "Air Speed") + altitude_3 = EnumValue(240055, "Altitude") + application_status = EnumValue(240056, "Application Status") + auto_iff = EnumValue(240057, "Auto Iff") + beacon_delay = EnumValue(240058, "Beacon Delay") + bingo_fuel_setting = EnumValue(240059, "Bingo Fuel Setting") + cloud_bottom = EnumValue(240060, "Cloud Bottom") + cloud_top = EnumValue(240061, "Cloud Top") + direction = EnumValue(240062, "Direction") + end_action = EnumValue(240063, "End Action") + frequency = EnumValue(240064, "Frequency") + freeze = EnumValue(240065, "Freeze") + heading = EnumValue(240066, "Heading") + identification_2 = EnumValue(240067, "Identification") + initial_point_data = EnumValue(240068, "Initial Point Data") + latitude_2 = EnumValue(240069, "Latitude") + lights_2 = EnumValue(240070, "Lights") + linear = EnumValue(240071, "Linear") + longitude_2 = EnumValue(240072, "Longitude") + low_altitude = EnumValue(240073, "Low Altitude") + mfd_formats = EnumValue(240074, "Mfd Formats") + nctr = EnumValue(240075, "Nctr") + number_projectiles = EnumValue(240076, "Number Projectiles") + operation_code = EnumValue(240077, "Operation Code") + pitch = EnumValue(240078, "Pitch") + profiles = EnumValue(240079, "Profiles") + quantity_3 = EnumValue(240080, "Quantity") + radar_modes = EnumValue(240081, "Radar Modes") + radar_search_volume = EnumValue(240082, "Radar Search Volume") + roll = EnumValue(240083, "Roll") + rotation_2 = EnumValue(240084, "Rotation") + scale_factor_x = EnumValue(240085, "Scale Factor X") + scale_factor_y = EnumValue(240086, "Scale Factor Y") + shields_2 = EnumValue(240087, "Shields") + steerpoint = EnumValue(240088, "Steerpoint") + spare1 = EnumValue(240089, "Spare1") + spare2 = EnumValue(240090, "Spare2") + team = EnumValue(240091, "Team") + text = EnumValue(240092, "Text") + time_of_day = EnumValue(240093, "Time Of Day") + trail_flag = EnumValue(240094, "Trail Flag") + trail_size = EnumValue(240095, "Trail Size") + type_of_projectile = EnumValue(240096, "Type Of Projectile") + type_of_target = EnumValue(240097, "Type Of Target") + type_of_threat = EnumValue(240098, "Type Of Threat") + uhf_frequency = EnumValue(240099, "Uhf Frequency") + utm_altitude = EnumValue(240100, "Utm Altitude") + utm_latitude = EnumValue(240101, "Utm Latitude") + utm_longitude = EnumValue(240102, "Utm Longitude") + vhf_frequency = EnumValue(240103, "Vhf Frequency") + visibility_range = EnumValue(240104, "Visibility Range") + void_aaa_hit = EnumValue(240105, "Void Aaa Hit") + void_collision = EnumValue(240106, "Void Collision") + void_earth_hit = EnumValue(240107, "Void Earth Hit") + void_friendly = EnumValue(240108, "Void Friendly") + void_gun_hit = EnumValue(240109, "Void Gun Hit") + void_rocket_hit = EnumValue(240110, "Void Rocket Hit") + void_sam_hit = EnumValue(240111, "Void Sam Hit") + weapon_data = EnumValue(240112, "Weapon Data") + weapon_type = EnumValue(240113, "Weapon Type") + weather_2 = EnumValue(240114, "Weather") + wind_direction_2 = EnumValue(240115, "Wind Direction") + wind_speed = EnumValue(240116, "Wind Speed") + wing_station = EnumValue(240117, "Wing Station") + yaw = EnumValue(240118, "Yaw") + memory_offset = EnumValue(240119, "Memory Offset") + memory_data = EnumValue(240120, "Memory Data") + vasi = EnumValue(240121, "VASI") + beacon = EnumValue(240122, "Beacon") + strobe = EnumValue(240123, "Strobe") + culture = EnumValue(240124, "Culture") + approach = EnumValue(240125, "Approach") + runway_end = EnumValue(240126, "Runway End") + obstruction = EnumValue(240127, "Obstruction") + runway_edge = EnumValue(240128, "Runway Edge") + ramp_taxiway = EnumValue(240129, "Ramp Taxiway") + laser_bomb_code = EnumValue(240130, "Laser Bomb Code") + rack_type = EnumValue(240131, "Rack Type") + hud = EnumValue(240132, "HUD") + rolefilename = EnumValue(240133, "RoleFileName") + pilotname = EnumValue(240134, "PilotName") + pilotdesignation = EnumValue(240135, "PilotDesignation") + model_type = EnumValue(240136, "Model Type") + dis_type = EnumValue(240137, "DIS Type") + Class = EnumValue(240138, "Class") + channel = EnumValue(240139, "Channel") + entity_type_2 = EnumValue(240140, "Entity Type") + alternative_entity_type_2 = EnumValue(240141, "Alternative Entity Type") + entity_location = EnumValue(240142, "Entity Location") + entity_linear_velocity = EnumValue(240143, "Entity Linear Velocity") + entity_orientation = EnumValue(240144, "Entity Orientation") + dead_reckoning = EnumValue(240145, "Dead Reckoning") + failure_symptom = EnumValue(240146, "Failure Symptom") + max_fuel = EnumValue(240147, "Max Fuel") + refueling_boom_connect = EnumValue(240148, "Refueling Boom Connect") + altitude_agl = EnumValue(240149, "Altitude AGL") + calibrated_airspeed = EnumValue(240150, "Calibrated Airspeed") + tacan_channel = EnumValue(240151, "TACAN Channel") + tacan_band = EnumValue(240152, "TACAN Band") + tacan_mode = EnumValue(240153, "TACAN Mode") + fuel_flow_rate_kg_min = EnumValue(270115, "Fuel Flow Rate (kg/min)") + fuel_temperature_degc = EnumValue(270116, "Fuel Temperature (degC)") + fuel_pressure_pa = EnumValue(270117, "Fuel Pressure (Pa)") + ske_slot = EnumValue(270150, "SKE Slot") + ske_lead = EnumValue(270151, "SKE Lead") + ske_frequency = EnumValue(270152, "SKE Frequency") + fci_cmd = EnumValue(270153, "FCI Cmd") + fci_num = EnumValue(270154, "FCI Num") + ske_bit_field = EnumValue(270155, "SKE Bit Field") + formation_position = EnumValue(270156, "Formation Position") + formation_number = EnumValue(270157, "Formation Number") + ffs_mode_active = EnumValue(270158, "FFS Mode Active") + ffs_role = EnumValue(270159, "FFS Role") + ffs_vcas = EnumValue(270160, "FFS VCAS") + ffs_bit_field = EnumValue(270161, "FFS Bit Field") + ffs_call_sign = EnumValue(270162, "FFS Call Sign") + ffs_guidance_data = EnumValue(270163, "FFS Guidance Data") + ffs_text_data = EnumValue(270164, "FFS Text Data") + ffs_airdrop_request_data = EnumValue(270165, "FFS Airdrop Request Data") + ffs_airdrop_data = EnumValue(270166, "FFS Airdrop Data") + horizontal_circular_error_probable_m = EnumValue(300000, "Horizontal Circular Error Probable (m)") + horizontal_position_error_m = EnumValue(300001, "Horizontal Position Error (m)") + vertical_position_error_m = EnumValue(300002, "Vertical Position Error (m)") + horizontal_velocity_error_m_s = EnumValue(300003, "Horizontal Velocity Error (m/s)") + vertical_velocity_error_m_s = EnumValue(300004, "Vertical Velocity Error (m/s)") + _4th_lowest_jammer_to_signal_ratio_for_py_l1_db = EnumValue(300005, "4th Lowest Jammer to Signal Ratio for P(Y)-L1 (dB)") + _4th_lowest_jammer_to_signal_ratio_for_py_l2_db = EnumValue(300006, "4th Lowest Jammer to Signal Ratio for P(Y)-L2 (dB)") + gps_figure_of_merit = EnumValue(300007, "GPS Figure of Merit") + weapon_transfer_gps_state = EnumValue(300008, "Weapon Transfer GPS State") + weapon_transfer_horizontal_position_error_m = EnumValue(300009, "Weapon Transfer Horizontal Position Error (m)") + weapon_transfer_vertical_position_error_m = EnumValue(300010, "Weapon Transfer Vertical Position Error (m)") + weapon_transfer_vertical_position_error_m_2 = EnumValue(300011, "Weapon Transfer Vertical Position Error (m)") + weapon_transfer_horizontal_velocity_error_m_s = EnumValue(300012, "Weapon Transfer Horizontal Velocity Error (m/s)") + time_transfer_error_sec = EnumValue(300013, "Time Transfer Error (sec)") + age_of_ephemeris_sec = EnumValue(300014, "Age of Ephemeris (sec)") + non_flyout_munition_entity_request_dis_type_enumeration = EnumValue(300016, "Non-Flyout Munition Entity Request DIS Type Enumeration") + non_flyout_munition_entity_request_launch_point_x_m = EnumValue(300017, "Non-Flyout Munition Entity Request Launch Point X (m)") + non_flyout_munition_entity_request_launch_point_y_m = EnumValue(300018, "Non-Flyout Munition Entity Request Launch Point Y (m)") + non_flyout_munition_entity_request_launch_point_z_m = EnumValue(300019, "Non-Flyout Munition Entity Request Launch Point Z (m)") + non_flyout_munition_entity_request_maximum_altitude_m_msl = EnumValue(300020, "Non-Flyout Munition Entity Request Maximum Altitude (m MSL)") + non_flyout_munition_entity_request_flight_path = EnumValue(300021, "Non-Flyout Munition Entity Request Flight Path") + non_flyout_munition_entity_request_impact_point_x_m = EnumValue(300022, "Non-Flyout Munition Entity Request Impact Point X (m)") + non_flyout_munition_entity_request_impact_point_y_m = EnumValue(300023, "Non-Flyout Munition Entity Request Impact Point Y (m)") + non_flyout_munition_entity_request_impact_point_z_m = EnumValue(300024, "Non-Flyout Munition Entity Request Impact Point Z (m)") + non_flyout_munition_entity_request_elapsed_flight_time_sec = EnumValue(300025, "Non-Flyout Munition Entity Request Elapsed Flight Time (sec)") + non_flyout_munition_entity_request_launch_time_sec = EnumValue(300026, "Non-Flyout Munition Entity Request Launch Time (sec)") + time_error_sec = EnumValue(300027, "Time Error (sec)") + link_16_command_variety_1 = EnumValue(301100, "Link 16 Command Variety 1") + push = EnumValue(301130, "Push") + rolex = EnumValue(301140, "Rolex") + terminate_intercept = EnumValue(301150, "Terminate Intercept") + heal_damage = EnumValue(301151, "Heal Damage") + destroy = EnumValue(301152, "Destroy") + transfer_control_management = EnumValue(301160, "Transfer Control Management") + link_16_controls_ppli_enable = EnumValue(301170, "Link 16 Controls - PPLI Enable") + link_16_controls_command_amp_control_enable = EnumValue(301171, "Link 16 Controls - Command & Control Enable") + link_16_reference_point_message_initiation = EnumValue(301174, "Link 16 Reference Point Message Initiation") + assign_external_entity_link_16_track_number = EnumValue(301175, "Assign External Entity Link 16 Track Number") + link_16_intelligence_info = EnumValue(301176, "Link 16 Intelligence Info") + link_16_track_management = EnumValue(301177, "Link 16 Track Management") + link_16_controls_ces_global_ppli_publish = EnumValue(301178, "Link 16 Controls - CES Global PPLI Publish") + link_16_controls_ces_global_surveillance_publish = EnumValue(301179, "Link 16 Controls - CES Global Surveillance Publish") + request_global_link_16_configuration = EnumValue(301180, "Request Global Link 16 Configuration") + link_16_controls_surveillance_enable = EnumValue(301181, "Link 16 Controls - Surveillance Enable") + link_16_pointer = EnumValue(301182, "Link 16 Pointer") + link_16_vector = EnumValue(301183, "Link 16 Vector") + link_16_control_unit_change = EnumValue(301184, "Link 16 Control Unit Change") + link_16_text = EnumValue(301185, "Link 16 Text") + request_link_16_objects = EnumValue(301186, "Request Link 16 Objects") + link_16_ref_object_name_list = EnumValue(301187, "Link 16 Ref Object Name List") + total_number_of_pdus_in_link_16_ref_objects_response = EnumValue(301189, "Total Number of PDUs in Link 16 Ref Objects Response") + pdu_number_in_link_16_ref_objects_response = EnumValue(301190, "PDU Number in Link 16 Ref Objects Response") + total_number_of_link_16_ref_objects = EnumValue(301191, "Total Number of Link 16 Ref Objects") + link_16_controls_f2f_a_enable = EnumValue(301197, "Link 16 Controls - F2F A Enable") + link_16_controls_f2f_b_enable = EnumValue(301198, "Link 16 Controls - F2F B Enable") + stn_of_formation_leader = EnumValue(301199, "STN of Formation Leader") + formation_name = EnumValue(301200, "Formation Name") + formation_role = EnumValue(301201, "Formation Role") + surveillance_contributor_sensor_based_detection = EnumValue(301202, "Surveillance Contributor Sensor Based Detection") + f2f_a_npg = EnumValue(301220, "F2F A NPG") + link_16_controls_f2f_a_net = EnumValue(301221, "Link 16 Controls - F2F A Net") + f2f_b_npg = EnumValue(301222, "F2F B NPG") + link_16_controls_f2f_b_net = EnumValue(301223, "Link 16 Controls - F2F B Net") + surveillance_enabled_npb = EnumValue(301224, "Surveillance Enabled NPB") + surveillance_enabled_net = EnumValue(301225, "Surveillance Enabled Net") + control_unit_enabled = EnumValue(301226, "Control Unit Enabled") + control_unit_enabled_npg = EnumValue(301227, "Control Unit Enabled NPG") + control_unit_enabled_net = EnumValue(301228, "Control Unit Enabled Net") + voice_frequency = EnumValue(301229, "Voice Frequency") + link_16_jtids_voice_callsign = EnumValue(301234, "Link 16 JTIDS Voice Callsign") + entity_id_of_control_unit = EnumValue(301237, "Entity ID of Control Unit") + stn_of_control_unit = EnumValue(301238, "STN of Control Unit") + ntr_participation_level = EnumValue(301239, "NTR Participation Level") + link_16_controls_ces_global_ppli_subscribe = EnumValue(301240, "Link 16 Controls - CES Global PPLI Subscribe") + link_16_controls_ces_global_surveillance_subscribe = EnumValue(301241, "Link 16 Controls - CES Global Surveillance Subscribe") + ntr_in_mission = EnumValue(301242, "NTR in Mission") + ntr_marking = EnumValue(301243, "NTR Marking") + ntr_receipt_compliance = EnumValue(301244, "NTR Receipt/Compliance") + formation_f2f_npg = EnumValue(301255, "Formation F2F NPG") + formation_f2f_channel = EnumValue(301256, "Formation F2F Channel") + jlvc_jspa_logreport = EnumValue(400008, "JLVC (JSPA) LogReport") + jlvc_jspa_supplyadjust = EnumValue(400009, "JLVC (JSPA) SupplyAdjust") + jlvc_jspa_entitycontrol = EnumValue(400010, "JLVC (JSPA) EntityControl") + jlvc_jspa_healthupdate = EnumValue(400011, "JLVC (JSPA) HealthUpdate") + jlvc_jspa_repaircomplete = EnumValue(400012, "JLVC (JSPA) RepairComplete") + jlvc_jspa_unitactivation = EnumValue(400013, "JLVC (JSPA) UnitActivation") + jlvc_jspa_battledamagerepair = EnumValue(400014, "JLVC (JSPA) BattleDamageRepair") + jlvc_jspa_minefield = EnumValue(400015, "JLVC (JSPA) Minefield") + jlvc_jspa_wire = EnumValue(400016, "JLVC (JSPA) Wire") + jlvc_jspa_abatis = EnumValue(400017, "JLVC (JSPA) Abatis") + jlvc_jspa_crater = EnumValue(400018, "JLVC (JSPA) Crater") + jlvc_jspa_ditch = EnumValue(400019, "JLVC (JSPA) Ditch") + jlvc_jspa_lanes = EnumValue(400020, "JLVC (JSPA) Lanes") + jlvc_jspa_ied = EnumValue(400021, "JLVC (JSPA) IED") + jlvc_jspa_rubble = EnumValue(400022, "JLVC (JSPA) Rubble") + jlvc_jspa_submergedbarrier = EnumValue(400023, "JLVC (JSPA) SubmergedBarrier") + jlvc_jspa_floatingbarrier = EnumValue(400024, "JLVC (JSPA) FloatingBarrier") + jlvc_jspa_foxhole = EnumValue(400025, "JLVC (JSPA) Foxhole") + jlvc_jspa_vehiclehole = EnumValue(400026, "JLVC (JSPA) VehicleHole") + jlvc_jspa_vehiclefortification = EnumValue(400027, "JLVC (JSPA) VehicleFortification") + jlvc_jspa_sandbag = EnumValue(400028, "JLVC (JSPA) Sandbag") + jlvc_jspa_checkpoint = EnumValue(400029, "JLVC (JSPA) Checkpoint") + jlvc_jspa_contamcloud2d = EnumValue(400030, "JLVC (JSPA) ContamCloud2D") + jlvc_jspa_populationeffect = EnumValue(400031, "JLVC (JSPA) PopulationEffect") + jlvc_jspa_mine = EnumValue(400032, "JLVC (JSPA) Mine") + jlvc_jspa_seaminefield = EnumValue(400033, "JLVC (JSPA) SeaMinefield") + jlvc_reasonforeffect = EnumValue(400034, "JLVC ReasonForEffect") + jlvc_physicaleffect = EnumValue(400035, "JLVC PhysicalEffect") + jlvc_functionaleffect = EnumValue(400036, "JLVC FunctionalEffect") + jlvc_jspa_sourcelvcid = EnumValue(400037, "JLVC (JSPA) SourceLVCID") + jlvc_jspa_targetlvcid = EnumValue(400038, "JLVC (JSPA) TargetLVCID") + jlvc_eventuuid = EnumValue(400039, "JLVC EventUUID") + jlvc_effectgeometry = EnumValue(400040, "JLVC EffectGeometry") + jlvc_effectrequestacknowledgement = EnumValue(400041, "JLVC EffectRequestAcknowledgement") + jlvc_effectacknowledgeresponse = EnumValue(400042, "JLVC EffectAcknowledgeResponse") + jlvc_effectlifecycle = EnumValue(400043, "JLVC EffectLifecycle") + jlvc_relatedeventid = EnumValue(400044, "JLVC RelatedEventID") + jlvc_systemfunctionaltype = EnumValue(400045, "JLVC SystemFunctionalType") + jlvc_capabilitytype = EnumValue(400046, "JLVC CapabilityType") + jlvc_networkfunctionaltype = EnumValue(400047, "JLVC NetworkFunctionalType") + munition = EnumValue(500001, "Munition") + engine_fuel = EnumValue(500002, "Engine Fuel") + storage_fuel = EnumValue(500003, "Storage Fuel") + not_used = EnumValue(500004, "Not Used") + expendable = EnumValue(500005, "Expendable") + total_record_sets = EnumValue(500006, "Total Record Sets") + launched_munition = EnumValue(500007, "Launched Munition") + association = EnumValue(500008, "Association") + sensor = EnumValue(500009, "Sensor") + munition_reload = EnumValue(500010, "Munition Reload") + engine_fuel_reload = EnumValue(500011, "Engine Fuel Reload") + storage_fuel_reload = EnumValue(500012, "Storage Fuel Reload") + expendable_reload = EnumValue(500013, "Expendable Reload") + iff_change_control_mode_1_code = EnumValue(500014, "IFF Change Control - Mode 1 Code") + iff_change_control_mode_2_code = EnumValue(500015, "IFF Change Control - Mode 2 Code") + iff_change_control_mode_3_code = EnumValue(500016, "IFF Change Control - Mode 3 Code") + iff_change_control_mode_4_code = EnumValue(500017, "IFF Change Control - Mode 4 Code") + iff_change_control_mode_5_code = EnumValue(500018, "IFF Change Control - Mode 5 Code") + iff_change_control_mode_6_code = EnumValue(500019, "IFF Change Control - Mode 6 Code") + link_16_data = EnumValue(500021, "Link 16 Data") + arm_alert = EnumValue(500022, "ARM Alert") + iff_change_control_mode_on_off = EnumValue(500023, "IFF Change Control - Mode On/Off") + weapon_status_data = EnumValue(500024, "Weapon Status Data") + expendable_status_data = EnumValue(500025, "Expendable Status Data") + tactic_status_data = EnumValue(500026, "Tactic Status Data") + emitter_sensor_data = EnumValue(500027, "Emitter/Sensor Data") + ios_control_data = EnumValue(500028, "IOS Control Data") + static_status_data = EnumValue(500029, "Static Status Data") + request_inactive_entities = EnumValue(500200, "Request Inactive Entities") + inactive_entity_quantity = EnumValue(500201, "Inactive Entity Quantity") + inactive_entity_id = EnumValue(500202, "Inactive Entity ID") + inactive_entity_type = EnumValue(500203, "Inactive Entity Type") + activation_trigger_type = EnumValue(500204, "Activation Trigger Type") + activation_trigger_value = EnumValue(500205, "Activation Trigger Value") + air_to_air_missile_qty = EnumValue(551001, "Air-to-Air Missile Qty") + aim_7_missile_qty = EnumValue(551002, "AIM-7 Missile Qty") + aim_9_missile_qty = EnumValue(551003, "AIM-9 Missile Qty") + aim_120_missile_qty = EnumValue(551004, "AIM-120 Missile Qty") + air_to_ground_missile_qty = EnumValue(551005, "Air-to-Ground Missile Qty") + surface_to_air_missile_qty = EnumValue(551006, "Surface-to-Air Missile Qty") + bullet_qty = EnumValue(551007, "Bullet Qty") + chaff_qty = EnumValue(552001, "Chaff Qty") + flare_qty = EnumValue(552002, "Flare Qty") + fuel_level = EnumValue(553001, "Fuel Level") + route_type = EnumValue(553002, "Route Type") + threat_mode = EnumValue(553003, "Threat Mode") + target_occluded = EnumValue(553004, "Target Occluded") + terrain_height = EnumValue(553005, "Terrain Height") + entity_status = EnumValue(553006, "Entity Status") + marshal_status = EnumValue(553007, "Marshal Status") + power_plant_status = EnumValue(553008, "Power Plant Status") + nav_light_status = EnumValue(553009, "Nav Light Status") + interior_light_status = EnumValue(553010, "Interior Light Status") + landing_light_status = EnumValue(553011, "Landing Light Status") + formation_light_status = EnumValue(553012, "Formation Light Status") + anti_collision_light_status = EnumValue(553013, "Anti-Collision Light Status") + nav_formation_flash_rate = EnumValue(553014, "Nav/Formation Flash Rate") + anti_col_on_duration = EnumValue(553015, "Anti-Col. 'On' Duration") + anti_col_off_duration = EnumValue(553016, "Anti-Col. 'Off' Duration") + intercept_status = EnumValue(553017, "Intercept Status") + lifeform_signaling_device_type = EnumValue(553018, "LifeForm Signaling Device Type") + lifeform_movement_type = EnumValue(553019, "LifeForm Movement Type") + lifeform_in_vehicle = EnumValue(553020, "LifeForm In Vehicle") + mobility_kill_2 = EnumValue(553021, "Mobility Kill") + firepower_kill = EnumValue(553022, "Firepower Kill") + tanker_enabled_disabled = EnumValue(553028, "Tanker Enabled/Disabled") + threat_status_tactic_ok_to_shoot_down_weapons = EnumValue(553029, "Threat Status Tactic OK to Shoot Down Weapons") + tacan_channel_2 = EnumValue(554001, "TACAN Channel") + tacan_band_2 = EnumValue(554002, "TACAN Band") + tacan_mode_2 = EnumValue(554003, "TACAN Mode") + rwr_status = EnumValue(554004, "RWR Status") + uhf_radio_frequency = EnumValue(554005, "UHF Radio Frequency") + emit_jamming_status = EnumValue(554006, "Emit Jamming Status") + emit_jamming_type = EnumValue(554007, "Emit Jamming Type") + receive_jamming_status = EnumValue(554008, "Receive Jamming Status") + radar_mode = EnumValue(554009, "RADAR Mode") + available_radar_modes = EnumValue(554010, "Available RADAR Modes") + jammer_pod_enumeration = EnumValue(554100, "Jammer Pod Enumeration") + jammer_pod_behavior = EnumValue(554101, "Jammer Pod Behavior") + jammer_pod_programs = EnumValue(554102, "Jammer Pod Programs") + jammer_pod_receiver_sensitivity = EnumValue(554103, "Jammer Pod Receiver Sensitivity") + jammer_pod_receiver_frequency_minimum = EnumValue(554104, "Jammer Pod Receiver Frequency Minimum") + jammer_pod_receiver_frequency_maximum = EnumValue(554105, "Jammer Pod Receiver Frequency Maximum") + jammer_pod_power = EnumValue(554106, "Jammer Pod Power") + jammer_pod_variability = EnumValue(554107, "Jammer Pod Variability") + jammer_pod_number_of_false_targets = EnumValue(554108, "Jammer Pod Number of False Targets") + jammer_pod_jammer_knob = EnumValue(554109, "Jammer Pod Jammer Knob") + jammer_pod_missile_jamming = EnumValue(554110, "Jammer Pod Missile Jamming") + emitter_override_2 = EnumValue(555001, "Emitter Override") + jammer_override = EnumValue(555002, "Jammer Override") + disengage_reengage_2 = EnumValue(555003, "Disengage / Reengage") + heading_override = EnumValue(555004, "Heading Override") + altitude_override = EnumValue(555005, "Altitude Override") + speed_override = EnumValue(555006, "Speed Override") + verbose_override = EnumValue(555007, "Verbose Override") + occlusion_override = EnumValue(555008, "Occlusion Override") + commit_range = EnumValue(556001, "Commit Range") + current_scenario_iff_mode_4a_code_for_this_threats_affiliation = EnumValue(556007, "Current Scenario IFF Mode 4A Code for This Threat's Affiliation") + current_scenario_iff_mode_4b_code_for_this_threats_affiliation = EnumValue(556008, "Current Scenario IFF Mode 4B Code for This Threat's Affiliation") + ok_to_engage_waypoint_number = EnumValue(556016, "Ok to Engage Waypoint Number") + max_speed_at_sea_level = EnumValue(556017, "Max Speed at Sea Level") + max_speed = EnumValue(556018, "Max Speed") + current_waypoint_number = EnumValue(556019, "Current Waypoint Number") + route_information = EnumValue(556020, "Route Information") + threat_status_static_multi_target_track = EnumValue(556029, "Threat Status Static Multi Target Track") + air_air_ir_missile_qty = EnumValue(557001, "Air-Air IR Missile Qty") + air_air_radar_missile_qty = EnumValue(557002, "Air-Air Radar Missile Qty") + air_ground_ir_missile_qty = EnumValue(557003, "Air-Ground IR Missile Qty") + air_ground_radar_missile_qty = EnumValue(557004, "Air-Ground Radar Missile Qty") + air_ground_anti_radiation_missile_qty = EnumValue(557005, "Air-Ground Anti-Radiation Missile Qty") + air_ground_bomb_qty = EnumValue(557006, "Air-Ground Bomb Qty") + air_ground_rocket_qty = EnumValue(557007, "Air-Ground Rocket Qty") + surface_air_ir_missile_qty = EnumValue(557008, "Surface-Air IR Missile Qty") + surface_air_radar_missile_qty = EnumValue(557009, "Surface-Air Radar Missile Qty") + bullet_qty_2 = EnumValue(557010, "Bullet Qty") + ppli_publish_enabled = EnumValue(559001, "PPLI Publish Enabled") + surveillance_publishenabled = EnumValue(559002, "Surveillance PublishEnabled") + npg = EnumValue(559003, "NPG") + npg_channel = EnumValue(559004, "NPG Channel") + jtids_track_number = EnumValue(559005, "JTIDS Track Number") + link_16_controls_surveillance_reportable = EnumValue(559006, "Link 16 Controls - Surveillance Reportable") + link_16_controls_surveillance_track_quality = EnumValue(559007, "Link 16 Controls - Surveillance Track Quality") + link_16_controls_target_position_quality = EnumValue(559008, "Link 16 Controls - Target Position Quality") + link_16_controls_quality_error_type = EnumValue(559009, "Link 16 Controls - Quality Error Type") + link_16_controls_affiliation_determination_rule = EnumValue(559010, "Link 16 Controls - Affiliation Determination Rule") + link_16_controls_reset_entity_affiliation = EnumValue(559011, "Link 16 Controls - Reset Entity Affiliation") + link_16_controls_reset_all_affiliation = EnumValue(559012, "Link 16 Controls - Reset All Affiliation") + end_of_messages = EnumValue(559999, "End of Messages") + malfunction_activate_deactivate_set = EnumValue(600001, "Malfunction Activate/Deactivate Set") + malfunction_status = EnumValue(600002, "Malfunction Status") + request_jtids_track_numbers = EnumValue(600210, "Request JTIDS Track Numbers") + track_numbers_vs_eid = EnumValue(600212, "Track Numbers vs EID") + total_number_of_jtids_track_numbers = EnumValue(600214, "Total Number of JTIDS Track Numbers") + pdu_number_in_jtids_track_number_response = EnumValue(600215, "PDU Number in JTIDS Track Number Response") + total_number_of_pdus_in_jtids_track_number_response = EnumValue(600216, "Total Number of PDUs in JTIDS Track Number Response") + air_to_air_refueler_entities_request = EnumValue(600218, "Air to Air Refueler Entities Request") + air_to_air_refueling_count = EnumValue(600219, "Air to Air Refueling Count") + air_to_air_refueler_entity = EnumValue(600220, "Air To Air Refueler Entity") + formation_library_request = EnumValue(600300, "Formation Library Request") + total_number_formation_library_pdus = EnumValue(600301, "Total Number Formation Library PDUs") + pdu_number_in_formation_library_response = EnumValue(600302, "PDU Number in Formation Library Response") + total_number_formation_library_items_in_pdu = EnumValue(600303, "Total Number Formation Library Items in PDU") + formation_library_variable = EnumValue(600304, "Formation Library Variable") + create_runtime_formation = EnumValue(600305, "Create Runtime Formation") + formation_request_header = EnumValue(600306, "Formation Request Header") + formation_position_absolute = EnumValue(600307, "Formation Position Absolute") + formation_position_relative = EnumValue(600308, "Formation Position Relative") + expendables_reload = EnumValue(610006, "Expendables Reload") + position_freeze = EnumValue(610007, "Position Freeze") + activate_ownship = EnumValue(610008, "Activate Ownship") + chocks = EnumValue(610009, "Chocks") + warm_up_cool_down_override = EnumValue(610010, "Warm-up Cool-down Override") + ground_power = EnumValue(610011, "Ground Power") + scramble_start = EnumValue(610012, "Scramble Start") + ownship_as_a_threat = EnumValue(610013, "Ownship as a Threat") + fuel_external = EnumValue(610015, "Fuel External") + fuel_internal = EnumValue(610016, "Fuel Internal") + fuel_tank_temp = EnumValue(610017, "Fuel Tank Temp") + gross_weight = EnumValue(610025, "Gross Weight") + angle_of_attack = EnumValue(610026, "Angle Of Attack") + g_load = EnumValue(610027, "G Load") + weight_on_wheels = EnumValue(610029, "Weight On Wheels") + stored_energy_system_reload = EnumValue(610032, "Stored Energy System Reload") + kill_override = EnumValue(610035, "Kill Override") + expendables_freeze = EnumValue(610036, "Expendables Freeze") + gps_satellites_enable_disable = EnumValue(610037, "GPS Satellites Enable/Disable") + ownship_message_display = EnumValue(610040, "Ownship Message Display") + weapon_quantity_freeze = EnumValue(610042, "Weapon Quantity Freeze") + global_control_freeze_weapons_quantity_on_all_ownships = EnumValue(610043, "Global Control - Freeze Weapons Quantity On All Ownships") + global_control_freeze_fuel_quantity_on_all_ownships = EnumValue(610044, "Global Control - Freeze Fuel Quantity On All Ownships") + global_control_freeze_kill_override_on_all_ownships = EnumValue(610045, "Global Control - Freeze Kill Override On All Ownships") + global_control_freeze_crash_override_on_all_ownships = EnumValue(610046, "Global Control - Freeze Crash Override On All Ownships") + ownship_ofp_block_number = EnumValue(610047, "Ownship OFP Block Number") + waypoint_information_query = EnumValue(610048, "Waypoint Information Query") + waypoint_information = EnumValue(610049, "Waypoint Information") + ownship_subsystem_status_data = EnumValue(610050, "Ownship Subsystem Status Data") + cockpit_switch_status = EnumValue(613002, "Cockpit Switch Status") + integrated_control_panel_messages = EnumValue(613003, "Integrated Control Panel Messages") + throttle_positions = EnumValue(613004, "Throttle Positions") + current_critical_switch_position = EnumValue(613005, "Current Critical Switch Position") + correct_critical_switch_position = EnumValue(613006, "Correct Critical Switch Position") + current_critical_switch_data = EnumValue(613007, "Current Critical Switch Data") + correct_critical_switch_data = EnumValue(613008, "Correct Critical Switch Data") + mission_initial_conditions_set = EnumValue(613013, "Mission Initial Conditions Set") + global_control_malfunction_active_on_all_ownships = EnumValue(613016, "Global Control - Malfunction Active on All Ownships") + global_control_malfunction_clear_on_all_ownships = EnumValue(613017, "Global Control - Malfunction Clear On All Ownships") + validated_critical_switch_report = EnumValue(613020, "Validated Critical Switch Report") + sar_map_pathname = EnumValue(613021, "SAR Map Pathname") + validated_critical_switch_ownship_id = EnumValue(613022, "Validated Critical Switch Ownship ID") + lower_boom_event_report = EnumValue(613027, "Lower Boom Event Report") + raise_boom_event_report = EnumValue(613028, "Raise Boom Event Report") + breakaway_event_report = EnumValue(613029, "Breakaway Event Report") + complete_event_report = EnumValue(613030, "Complete Event Report") + aux_comm_panel_frequency_display = EnumValue(613031, "Aux Comm Panel Frequency Display") + network_station_information = EnumValue(615000, "Network Station Information") + global_control_select_network_station = EnumValue(615001, "Global Control Select Network Station") + network_station_under_global_control = EnumValue(615002, "Network Station Under Global Control") + global_control_still_controlling = EnumValue(615003, "Global Control Still Controlling") + global_control_release_control_of_network_station = EnumValue(615004, "Global Control Release Control of Network Station") + global_control_freeze_weapon_quantity = EnumValue(615005, "Global Control Freeze Weapon Quantity") + global_control_freeze_fuel_quantity = EnumValue(615006, "Global Control Freeze Fuel Quantity") + global_control_freeze_kill_override = EnumValue(615007, "Global Control Freeze Kill Override") + global_control_freeze_crash_override = EnumValue(615008, "Global Control Freeze Crash Override") + global_control_malfunction_active = EnumValue(615009, "Global Control Malfunction Active") + global_control_malfunction_clear = EnumValue(615010, "Global Control Malfunction Clear") + global_control_start_devices = EnumValue(615011, "Global Control Start Devices") + global_control_freeze_devices = EnumValue(615012, "Global Control Freeze Devices") + global_control_jtids_command = EnumValue(615013, "Global Control JTIDS Command") + network_station_ic_set_information = EnumValue(615015, "Network Station IC Set Information") + global_control_reset_ic_set = EnumValue(615017, "Global Control Reset IC Set") + number_of_controlling_units = EnumValue(615018, "Number of Controlling Units") + network_station_jtids_controlling_units = EnumValue(615019, "Network Station JTIDS Controlling Units") + network_station_jtids_objective_tracks = EnumValue(615020, "Network Station JTIDS Objective Tracks") + number_of_reference_objects = EnumValue(615021, "Number of Reference Objects") + network_station_jtids_reference_objects = EnumValue(615022, "Network Station JTIDS Reference Objects") + networked_station_still_under_control = EnumValue(615023, "Networked Station Still Under Control") + global_control_delete_threat_entities = EnumValue(615024, "Global Control Delete Threat Entities") + network_station_ownship_callsigns = EnumValue(615025, "Network Station Ownship Callsigns") + global_control_request_formation_library_data = EnumValue(615026, "Global Control Request Formation Library Data") + total_number_formation_library_pdus_2 = EnumValue(615027, "Total Number Formation Library PDUs") + pdu_number_in_formation_library_response_2 = EnumValue(615028, "PDU Number in Formation Library Response") + total_number_formation_library_items_in_pdus = EnumValue(615029, "Total Number Formation Library Items in PDUs") + network_station_formation_library_item = EnumValue(615030, "Network Station Formation Library Item") + global_control_add_relative_formation = EnumValue(615031, "Global Control Add Relative Formation") + network_station_tic_filename = EnumValue(615032, "Network Station TIC Filename") + global_control_freeze_warm_up_override = EnumValue(615033, "Global Control Freeze Warm-up Override") + global_control_reload_ses = EnumValue(615034, "Global Control Reload SES") + global_control_reload_weapons = EnumValue(615035, "Global Control Reload Weapons") + global_control_reload_expendables = EnumValue(615036, "Global Control Reload Expendables") + global_control_reload_fuel = EnumValue(615037, "Global Control Reload Fuel") + global_control_reload_firebottle = EnumValue(615038, "Global Control Reload Firebottle") + test_pattern_dort = EnumValue(700000, "Test Pattern (DORT)") + audio_test_dort = EnumValue(700001, "Audio Test (DORT)") + audio_tone_dort = EnumValue(700002, "Audio Tone (DORT)") + calibrate_throttles_dort = EnumValue(700003, "Calibrate Throttles (DORT)") + operational_limits_event_report = EnumValue(700004, "Operational Limits Event Report") + operational_limits = EnumValue(700005, "Operational Limits") + event_marker_message = EnumValue(1000620, "Event Marker Message") + receiver_aircraft_aero_model_data = EnumValue(2000000, "Receiver Aircraft Aero Model Data") + tanker_aircraft_aero_model_data = EnumValue(2000010, "Tanker Aircraft Aero Model Data") + boom_aircraft_aero_model_data = EnumValue(2000020, "Boom Aircraft Aero Model Data") + access_to_image_generator_data = EnumValue(2000030, "Access to Image Generator Data") + access_to_image_generator_data_2 = EnumValue(2000031, "Access to Image Generator Data") + access_to_image_generator_data_3 = EnumValue(2000032, "Access to Image Generator Data") + access_to_image_generator_data_4 = EnumValue(2000033, "Access to Image Generator Data") + access_to_image_generator_data_5 = EnumValue(2000034, "Access to Image Generator Data") + access_to_image_generator_data_6 = EnumValue(2000035, "Access to Image Generator Data") + access_to_image_generator_data_7 = EnumValue(2000036, "Access to Image Generator Data") + access_to_image_generator_data_8 = EnumValue(2000037, "Access to Image Generator Data") + access_to_image_generator_data_9 = EnumValue(2000038, "Access to Image Generator Data") + access_to_image_generator_data_10 = EnumValue(2000039, "Access to Image Generator Data") + access_to_image_generator_data_11 = EnumValue(2000040, "Access to Image Generator Data") + access_to_image_generator_data_12 = EnumValue(2000041, "Access to Image Generator Data") + access_to_image_generator_data_13 = EnumValue(2000042, "Access to Image Generator Data") + access_to_image_generator_data_14 = EnumValue(2000043, "Access to Image Generator Data") + access_to_image_generator_data_15 = EnumValue(2000044, "Access to Image Generator Data") + access_to_image_generator_data_16 = EnumValue(2000045, "Access to Image Generator Data") + host_load_number = EnumValue(2000050, "Host Load Number") + extended_fire_event_reports = EnumValue(5005001, "Extended Fire Event Reports") + battle_damage_assessment_bda_event_report = EnumValue(5005002, "Battle Damage Assessment (BDA) Event Report") + extended_fire_event_launcher = EnumValue(5005003, "Extended Fire Event Launcher") + extended_fire_event_missile = EnumValue(5005006, "Extended Fire Event Missile") + extended_fire_event_mrm_weapon = EnumValue(5005008, "Extended Fire Event MRM Weapon") + extended_fire_event_gun_fire_control = EnumValue(5005009, "Extended Fire Event Gun Fire Control") + extended_fire_event_bomb = EnumValue(5005010, "Extended Fire Event Bomb") + extended_fire_event_expendable = EnumValue(5005011, "Extended Fire Event Expendable") + battle_damage_assessment = EnumValue(5005012, "Battle Damage Assessment") + extended_fire_pickle_event = EnumValue(5005014, "Extended Fire Pickle Event") + radar_track_report = EnumValue(5005055, "Radar Track Report") + jammer_report = EnumValue(5005060, "Jammer Report") + jammer_false_targets_report = EnumValue(5005061, "Jammer False Targets Report") + detect_event_report = EnumValue(5005063, "Detect Event Report") + mald_beam_report = EnumValue(5005070, "MALD Beam Report") + transmitter_radiation_volume = EnumValue(5005080, "Transmitter Radiation Volume") + transmitter_radiation_volume_v2 = EnumValue(5005081, "Transmitter Radiation Volume v2") + call_state = EnumValue(5005100, "Call State") + call_endpoint_data = EnumValue(5005101, "Call Endpoint Data") + physical_network_definition = EnumValue(5007010, "Physical Network Definition") + network_channel_definition = EnumValue(5007020, "Network Channel Definition") + logical_network_definition = EnumValue(5007030, "Logical Network Definition") + logical_network_entity_definition = EnumValue(5007040, "Logical Network - Entity Definition") + physical_network_entity_definition = EnumValue(5007050, "Physical Network - Entity Definition") + c2_message = EnumValue(5008010, "C2 Message") + candidate_object = EnumValue(5008020, "Candidate Object") + set_of_candidate_objects = EnumValue(5008030, "Set of Candidate Objects") + bounded_region = EnumValue(5008040, "Bounded Region") + angular_region = EnumValue(5008050, "Angular Region") + roe_object = EnumValue(5008060, "RoE Object") + track_object = EnumValue(5008070, "Track Object") + set_of_track_objects = EnumValue(5008080, "Set of Track Objects") + logical_entity_definition = EnumValue(5009010, "Logical Entity Definition") + logical_entity_relationship_definition = EnumValue(5009020, "Logical Entity Relationship Definition") + intent_based_ew_message = EnumValue(5507010, "Intent-Based EW Message") + default = entity_id_list + + def get_marshaled_size(self): + return 32 diff --git a/dis/siso_ref_010/enums/variantsfor_air_category200bird.py b/dis/siso_ref_010/enums/variantsfor_air_category200bird.py new file mode 100644 index 0000000..2437790 --- /dev/null +++ b/dis/siso_ref_010/enums/variantsfor_air_category200bird.py @@ -0,0 +1,139 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 136, + * marshal size 8; + * VariantsforAirCategory200Bird has 4 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class VariantsforAirCategory200Bird(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + bird_with_fish = EnumValue(1, "Bird with Fish") + v_pattern_flock_shape = EnumValue(2, "V-Pattern Flock Shape") + circular_flock_shape = EnumValue(3, "Circular Flock Shape") + irregular_flock_shape = EnumValue(4, "Irregular Flock Shape") + default = bird_with_fish + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/variantsfor_land_categories_reptiles_amphibians_insectsand_arachnids.py b/dis/siso_ref_010/enums/variantsfor_land_categories_reptiles_amphibians_insectsand_arachnids.py new file mode 100644 index 0000000..edcb1df --- /dev/null +++ b/dis/siso_ref_010/enums/variantsfor_land_categories_reptiles_amphibians_insectsand_arachnids.py @@ -0,0 +1,140 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 135, + * marshal size 8; + * VariantsforLandCategoriesReptilesAmphibiansInsectsandArachnids has 5 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class VariantsforLandCategoriesReptilesAmphibiansInsectsandArachnids(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + black = EnumValue(1, "Black") + green = EnumValue(2, "Green") + spotted = EnumValue(3, "Spotted") + red = EnumValue(4, "Red") + brown = EnumValue(5, "Brown") + default = black + + def get_marshaled_size(self): + return 8 diff --git a/dis/siso_ref_010/enums/variantsfor_subsurface_category201mammal.py b/dis/siso_ref_010/enums/variantsfor_subsurface_category201mammal.py new file mode 100644 index 0000000..676be78 --- /dev/null +++ b/dis/siso_ref_010/enums/variantsfor_subsurface_category201mammal.py @@ -0,0 +1,137 @@ +''' +/* + * Copyright (c) 2008-2022, MOVES Institute, Naval Postgraduate School (NPS). All rights reserved. + * This work is provided under a BSD-style open-source license, see project + * license.html and license.txt + */ + // header autogenerated using string template dis7javalicense.txt +''' + + +from enum import Enum, EnumMeta +from pprint import pprint, pformat +from collections import OrderedDict, namedtuple +import ctypes + +UInt8 = ctypes.c_uint8 +UInt16 = ctypes.c_uint16 +UInt32 = ctypes.c_uint32 + +EnumValue = namedtuple('EnumValue', ['value', 'description']) + +# autogenerated using string template disenumpart1.txt +# package edu.nps.moves.dis7.enumerations; + +''' +/** + * This enum type is generated from XML, + * SisoDate : + * UID 139, + * marshal size 8; + * VariantsforSubsurfaceCategory201Mammal has 2 enumerations total. + */ +''' + +class EnumMeta(EnumMeta): + def __getitem__(cls, name): + try: + return super().__getitem__(name) + except KeyError as error: + return cls.UNKNOWN + + def __getattr__(cls, name): + try: + return super().__getattr__(name) + except AttributeError as error: + return cls.UNKNOWN + +class ExtensibleEnum(Enum): + @classmethod + def add_custom_value(cls, value: int, name: str, desc:str): + existingItem = [item for item in cls._value2member_map_ if item.value == value] + + enumValue = EnumValue(value, desc) + obj = object.__new__(cls) + + obj._value_ = enumValue + obj._name_ = name + obj._desc = desc + obj.__objclass__ = cls + + if not existingItem: + cls._member_map_[name] = obj + cls._value2member_map_[enumValue] = enumValue + cls._member_names_.append(name) + else: + enumIndex = list(OrderedDict(cls.__members__).keys())[value] + cls._member_map_[enumIndex] = obj + + @property + def get_description(self): + return self.value.description + + @classmethod + def to_string(cls) -> str: + return pformat(OrderedDict(cls.__members__)) + + @classmethod + def is_valid(cls, kind: Enum) -> bool: + if kind is cls.UNKNOWN: + return False + return kind in iter(cls) + + @staticmethod + def describe(self): + return self.name, self.value + + @classmethod + def value_list(cls): + return list(map(lambda c: c.value, cls)) + + @classmethod + def _missing_(cls, value): + return cls.default + + @classmethod + def get_enum_key(cls, value:int) -> str: + for unique_key, unique_value in OrderedDict(cls.__members__).items(): + if value == unique_value.value.value: + return unique_key + return 'UNKNOWN' + + @classmethod + def get_enum(cls, value:int) -> Enum: + key = cls.get_enum_key(value) + return getattr(cls, key) + + def __int__(self): + return self.value.value + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + +class VariantsforSubsurfaceCategory201Mammal(ExtensibleEnum, metaclass=EnumMeta): + UNKNOWN = EnumValue(-1, "UNKNOWN Enum") + singing = EnumValue(1, "Singing") + spouting = EnumValue(2, "Spouting") + default = singing + + def get_marshaled_size(self): + return 8 diff --git a/dis/standard_variable_record.py b/dis/standard_variable_record.py new file mode 100644 index 0000000..1568c79 --- /dev/null +++ b/dis/standard_variable_record.py @@ -0,0 +1,104 @@ +from enum import Enum + +from .siso_ref_010.enums.variable_record_type import VariableRecordType + +class StandardVariableRecord( object ): + """Section 6.2.83""" + + def __init__(self): + """ Initializer for StandardVariableRecord""" + # /** uid 66 Variable Record Type values are defined by VariableRecordType enumerations */ + self.recordType = VariableRecordType.default + + self.recordLength = 0 + self.recordSpecificFields = [] + self.padding = [0] * 64 + + def to_string(self) ->str: + outputString = "" + outputString += "VariableRecordType : " + self.recordType.get_description + "(" + (str(int(self.recordType))) + ")" + "\n" + outputString += "RecordLength : " + str(self.recordLength) + "\n" + outputString += "RecordSpecificFields : " + "\n" + for idx in range(0, len(self.recordSpecificFields)): + outputString += str(self.recordSpecificFields[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.recordType,outputStream) + outputStream.write_short(int(self.recordLength)) + for idx in range(0, 0): + outputStream.write_unsigned_byte( self.recordSpecificFields[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordType = VariableRecordType.get_enum(self.parse_enum(self.recordType,inputStream)) + self.recordLength = inputStream.read_short() + self.recordSpecificFields = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_byte() + self.recordSpecificFields[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/standard_variable_specification.py b/dis/standard_variable_specification.py new file mode 100644 index 0000000..d5b6ac0 --- /dev/null +++ b/dis/standard_variable_specification.py @@ -0,0 +1,135 @@ +from enum import Enum + +from .standard_variable_record import StandardVariableRecord + +class StandardVariableSpecification( object ): + """Does not work, and causes failure in anything it is embedded in. Section 6.2.83""" + + def __init__(self): + """ Initializer for StandardVariableSpecification""" + """ Number of static variable records""" + self.numberOfStandardVariableRecords = 0 + """ variable length list of standard variables, The class type and length here are WRONG and will cause the incorrect serialization of any class in whihc it is embedded.""" + self._standardVariables = [] + + + def get_numberOfStandardVariableRecords(self): + return len(self._standardVariables) + def set_numberOfStandardVariableRecords(self, value): + numberOfStandardVariableRecords = value + + + def get_standardVariables(self): + return self._standardVariables + def set_standardVariables(self, value): + self._standardVariables = value + standardVariables = property(get_standardVariables, set_standardVariables) + + + def add_standardVariables(self, value : StandardVariableRecord): + self._standardVariables.append(value) + + + """ + /// Name : standardVariables + /// UID : + /// Type : StandardVariableRecord + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of standard variables, The class type and length here are WRONG and will cause the incorrect serialization of any class in whihc it is embedded. + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += "NumberOfStandardVariableRecords : " + str(len(self._standardVariables)) + "\n" + outputString += "StandardVariables : " + "\n" + for idx in range(0, len(self._standardVariables)): + outputString += self._standardVariables[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short( len(self._standardVariables)) + for anObj in self._standardVariables: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.numberOfStandardVariableRecords = inputStream.read_short() + for idx in range(0, self.numberOfStandardVariableRecords): + element = StandardVariableRecord() + element.parse(inputStream) + self._standardVariables.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/start_resume_pdu.py b/dis/start_resume_pdu.py new file mode 100644 index 0000000..50306a4 --- /dev/null +++ b/dis/start_resume_pdu.py @@ -0,0 +1,102 @@ +from enum import Enum + +from .simulation_management_family_pdu import SimulationManagementFamilyPdu +from .clock_time import ClockTime +from .siso_ref_010.enums.dis_pdu_type import DisPduType + +class StartResumePdu( SimulationManagementFamilyPdu ): + """Section 7.5.4. The Start/Resume of an entity/exercise shall be communicated using a Start/Resume PDU. See 5.6.5.4.""" + + def __init__(self): + """ Initializer for StartResumePdu""" + super().__init__() + """ This field shall specify the real-world time (UTC) at which the entity is to start/resume in the exercise. This information shall be used by the participating simulation applications to start/resume an exercise synchronously. This field shall be represented by a Clock Time record (see 6.2.16).""" + self.realWorldTime = ClockTime() + """ The reference time within a simulation exercise. This time is established in advance by simulation management and is common to all participants in a particular exercise. Simulation time may be either Absolute Time or Relative Time. This field shall be represented by a Clock Time record (see 6.2.16)""" + self.simulationTime = ClockTime() + """ Identifier for the specific and unique start/resume request""" + self.requestID = 0 + self.pduType = DisPduType.start_resume + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RealWorldTime :" + "\n" + self.realWorldTime.to_string() + "\n" + outputString += "SimulationTime :" + "\n" + self.simulationTime.to_string() + "\n" + outputString += "RequestID : " + str(self.requestID) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( StartResumePdu, self ).serialize(outputStream) + self.realWorldTime.serialize(outputStream) + self.simulationTime.serialize(outputStream) + outputStream.write_int(int(self.requestID)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( StartResumePdu, self).parse(inputStream) + self.realWorldTime.parse(inputStream) + self.simulationTime.parse(inputStream) + self.requestID = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/start_resume_reliable_pdu.py b/dis/start_resume_reliable_pdu.py new file mode 100644 index 0000000..44d3740 --- /dev/null +++ b/dis/start_resume_reliable_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class StartResumeReliablePdu( object ): + """Alias, more descriptive name for StartResumeRPdu.""" + + def __init__(self): + """ Initializer for StartResumeReliablePdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/start_resume_rpdu.py b/dis/start_resume_rpdu.py new file mode 100644 index 0000000..01e1586 --- /dev/null +++ b/dis/start_resume_rpdu.py @@ -0,0 +1,117 @@ +from enum import Enum + +from .clock_time import ClockTime +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .siso_ref_010.enums.required_reliability_service import RequiredReliabilityService +from .simulation_management_with_reliability_family_pdu import SimulationManagementWithReliabilityFamilyPdu + +class StartResumeRPdu( SimulationManagementWithReliabilityFamilyPdu ): + """5.12.4.4 Serves the same function as the Start/Resume PDU but with the addition of reliability service levels""" + + def __init__(self): + """ Initializer for StartResumeRPdu""" + super().__init__() + """ time in real world for this operation to happen""" + self.realWorldTime = ClockTime() + """ time in simulation for the simulation to resume""" + self.simulationTime = ClockTime() + # /** level of reliability service used for this transaction uid 74 */ + self.requiredReliabilityService = RequiredReliabilityService.default + + self.pad1 = 0 + self.pad2 = 0 + """ Request ID provides a unique identifier""" + self.requestID = 0 + self.pduType = DisPduType.start_resume_reliable + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RealWorldTime :" + "\n" + self.realWorldTime.to_string() + "\n" + outputString += "SimulationTime :" + "\n" + self.simulationTime.to_string() + "\n" + outputString += "RequiredReliabilityService : " + self.requiredReliabilityService.get_description + "(" + (str(int(self.requiredReliabilityService))) + ")" + "\n" + outputString += "Pad1 : " + str(self.pad1) + "\n" + outputString += "Pad2 : " + str(self.pad2) + "\n" + outputString += "RequestID : " + str(self.requestID) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( StartResumeRPdu, self ).serialize(outputStream) + self.realWorldTime.serialize(outputStream) + self.simulationTime.serialize(outputStream) + self.serialize_enum(self.requiredReliabilityService,outputStream) + outputStream.write_byte(int(self.pad1)) + outputStream.write_short(int(self.pad2)) + outputStream.write_int(int(self.requestID)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( StartResumeRPdu, self).parse(inputStream) + self.realWorldTime.parse(inputStream) + self.simulationTime.parse(inputStream) + self.requiredReliabilityService = RequiredReliabilityService.get_enum(self.parse_enum(self.requiredReliabilityService,inputStream)) + self.pad1 = inputStream.read_byte() + self.pad2 = inputStream.read_short() + self.requestID = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/stop_freeze_pdu.py b/dis/stop_freeze_pdu.py new file mode 100644 index 0000000..a521993 --- /dev/null +++ b/dis/stop_freeze_pdu.py @@ -0,0 +1,116 @@ +from enum import Enum + +from .simulation_management_family_pdu import SimulationManagementFamilyPdu +from .siso_ref_010.enums.stop_freeze_frozen_behavior import StopFreezeFrozenBehavior +from .clock_time import ClockTime +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .siso_ref_010.enums.stop_freeze_reason import StopFreezeReason + +class StopFreezePdu( SimulationManagementFamilyPdu ): + """Section 7.5.5. The stopping or freezing of an entity/exercise shall be communicated using a Stop/Freeze PDU. See 5.6.5.5""" + + def __init__(self): + """ Initializer for StopFreezePdu""" + super().__init__() + """ real-world(UTC) time at which the entity shall stop or freeze in the exercise""" + self.realWorldTime = ClockTime() + # /** Reason the simulation was stopped or frozen (see section 7 of SISO-REF-010) represented by an 8-bit enumeration uid 67 */ + self.reason = StopFreezeReason.default + + # Internal behavior of the entity (or simulation) and its appearance while frozen to the other participants uid 68 + self.frozenBehavior = StopFreezeFrozenBehavior() + + """ padding""" + self.padding1 = 0 + """ Request ID that is unique""" + self.requestID = 0 + self.pduType = DisPduType.stop_freeze + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RealWorldTime :" + "\n" + self.realWorldTime.to_string() + "\n" + outputString += "StopFreezeReason : " + self.reason.get_description + "(" + (str(int(self.reason))) + ")" + "\n" + outputString += "StopFreezeFrozenBehavior : " + str(self.frozenBehavior) + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "RequestID : " + str(self.requestID) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( StopFreezePdu, self ).serialize(outputStream) + self.realWorldTime.serialize(outputStream) + self.serialize_enum(self.reason,outputStream) + outputStream.write_unsigned_int(int(self.frozenBehavior.asbyte)) + outputStream.write_short(int(self.padding1)) + outputStream.write_int(int(self.requestID)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( StopFreezePdu, self).parse(inputStream) + self.realWorldTime.parse(inputStream) + self.reason = StopFreezeReason.get_enum(self.parse_enum(self.reason,inputStream)) + self.frozenBehavior.asbyte = inputStream.read_unsigned_int() + self.padding1 = inputStream.read_short() + self.requestID = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 5 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/stop_freeze_reliable_pdu.py b/dis/stop_freeze_reliable_pdu.py new file mode 100644 index 0000000..996cb12 --- /dev/null +++ b/dis/stop_freeze_reliable_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class StopFreezeReliablePdu( object ): + """Alias, more descriptive name for StopFreezeRPdu.""" + + def __init__(self): + """ Initializer for StopFreezeReliablePdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/stop_freeze_rpdu.py b/dis/stop_freeze_rpdu.py new file mode 100644 index 0000000..4a415ad --- /dev/null +++ b/dis/stop_freeze_rpdu.py @@ -0,0 +1,123 @@ +from enum import Enum + +from .siso_ref_010.enums.stop_freeze_frozen_behavior import StopFreezeFrozenBehavior +from .clock_time import ClockTime +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .siso_ref_010.enums.stop_freeze_reason import StopFreezeReason +from .siso_ref_010.enums.required_reliability_service import RequiredReliabilityService +from .simulation_management_with_reliability_family_pdu import SimulationManagementWithReliabilityFamilyPdu + +class StopFreezeRPdu( SimulationManagementWithReliabilityFamilyPdu ): + """5.12.4.5 Serves the same function as the Stop/Freeze PDU (see 5.6.5.5.1) but with the addition of reliability service levels.""" + + def __init__(self): + """ Initializer for StopFreezeRPdu""" + super().__init__() + """ time in real world for this operation to happen""" + self.realWorldTime = ClockTime() + # /** Reason for stopping/freezing simulation uid 67 */ + self.reason = StopFreezeReason.default + + # internal behvior of the simulation while frozen uid 68 + self.frozenBehavior = StopFreezeFrozenBehavior() + + # /** reliability level uid 74 */ + self.requiredReliabilityService = RequiredReliabilityService.default + + """ padding""" + self.pad1 = 0 + """ Request ID provides a unique identifier""" + self.requestID = 0 + self.pduType = DisPduType.stop_freeze_reliable + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "RealWorldTime :" + "\n" + self.realWorldTime.to_string() + "\n" + outputString += "StopFreezeReason : " + self.reason.get_description + "(" + (str(int(self.reason))) + ")" + "\n" + outputString += "StopFreezeFrozenBehavior : " + str(self.frozenBehavior) + "\n" + outputString += "RequiredReliabilityService : " + self.requiredReliabilityService.get_description + "(" + (str(int(self.requiredReliabilityService))) + ")" + "\n" + outputString += "Pad1 : " + str(self.pad1) + "\n" + outputString += "RequestID : " + str(self.requestID) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( StopFreezeRPdu, self ).serialize(outputStream) + self.realWorldTime.serialize(outputStream) + self.serialize_enum(self.reason,outputStream) + outputStream.write_unsigned_int(int(self.frozenBehavior.asbyte)) + self.serialize_enum(self.requiredReliabilityService,outputStream) + outputStream.write_byte(int(self.pad1)) + outputStream.write_int(int(self.requestID)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( StopFreezeRPdu, self).parse(inputStream) + self.realWorldTime.parse(inputStream) + self.reason = StopFreezeReason.get_enum(self.parse_enum(self.reason,inputStream)) + self.frozenBehavior.asbyte = inputStream.read_unsigned_int() + self.requiredReliabilityService = RequiredReliabilityService.get_enum(self.parse_enum(self.requiredReliabilityService,inputStream)) + self.pad1 = inputStream.read_byte() + self.requestID = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/storage_fuel.py b/dis/storage_fuel.py new file mode 100644 index 0000000..c266937 --- /dev/null +++ b/dis/storage_fuel.py @@ -0,0 +1,110 @@ +from enum import Enum + +from .siso_ref_010.enums.fuel_measurement_units import FuelMeasurementUnits +from .siso_ref_010.enums.fuel_location import FuelLocation +from .siso_ref_010.enums.supply_fuel_type import SupplyFuelType + +class StorageFuel( object ): + """Information about an entity's engine fuel. Section 6.2.84.""" + + def __init__(self): + """ Initializer for StorageFuel""" + """ Fuel quantity, units specified by next field""" + self.fuelQuantity = 0 + # /** Units in which the fuel is measured uid 328 */ + self.fuelMeasurementUnits = FuelMeasurementUnits.default + + # /** Type of fuel uid 413 */ + self.fuelType = SupplyFuelType.default + + # /** Location of fuel as related to entity. See section 14 of EBV document uid 329 */ + self.fuelLocation = FuelLocation.default + + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "FuelQuantity : " + str(self.fuelQuantity) + "\n" + outputString += "FuelMeasurementUnits : " + self.fuelMeasurementUnits.get_description + "(" + (str(int(self.fuelMeasurementUnits))) + ")" + "\n" + outputString += "SupplyFuelType : " + self.fuelType.get_description + "(" + (str(int(self.fuelType))) + ")" + "\n" + outputString += "FuelLocation : " + self.fuelLocation.get_description + "(" + (str(int(self.fuelLocation))) + ")" + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int(int(self.fuelQuantity)) + self.serialize_enum(self.fuelMeasurementUnits,outputStream) + self.serialize_enum(self.fuelType,outputStream) + self.serialize_enum(self.fuelLocation,outputStream) + outputStream.write_byte(int(self.padding)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.fuelQuantity = inputStream.read_int() + self.fuelMeasurementUnits = FuelMeasurementUnits.get_enum(self.parse_enum(self.fuelMeasurementUnits,inputStream)) + self.fuelType = SupplyFuelType.get_enum(self.parse_enum(self.fuelType,inputStream)) + self.fuelLocation = FuelLocation.get_enum(self.parse_enum(self.fuelLocation,inputStream)) + self.padding = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 5 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/storage_fuel_reload.py b/dis/storage_fuel_reload.py new file mode 100644 index 0000000..0aa5dc5 --- /dev/null +++ b/dis/storage_fuel_reload.py @@ -0,0 +1,125 @@ +from enum import Enum + +from .siso_ref_010.enums.fuel_measurement_units import FuelMeasurementUnits +from .siso_ref_010.enums.fuel_location import FuelLocation +from .siso_ref_010.enums.supply_fuel_type import SupplyFuelType + +class StorageFuelReload( object ): + """For each type or location of Storage Fuel, this record shall specify the type, location, fuel measure- ment units, reload quantity and maximum quantity for storage fuel either for the whole entity or a specific storage fuel location (tank). Section 6.2.85.""" + + def __init__(self): + """ Initializer for StorageFuelReload""" + """ the standard quantity of this fuel type normally loaded at this station/launcher if a station/launcher is specified. If the Station/Launcher field is set to zero, then this is the total quantity of this fuel type that would be present in a standard reload of all appli- cable stations/launchers associated with this entity.""" + self.standardQuantity = 0 + """ The maximum quantity of this fuel type that this sta- tion/launcher is capable of holding when a station/launcher is specified. This would be the value used when a maximum reload was desired to be set for this station/launcher. If the Station/launcher field is set to zero, then this is the maximum quantity of this fuel type that would be present on this entity at all stations/launchers that can accept this fuel type.""" + self.maximumQuantity = 0 + """ The seconds normally required to reload the standard quantity of this fuel type at this specific station/launcher. When the Station/Launcher field is set to zero, this shall be the time it takes to perform a standard quantity reload of this fuel type at all applicable stations/launchers for this entity.""" + self.standardQuantityReloadTime = 0 + """ The seconds normally required to reload the maximum possible quantity of this fuel type at this station/launcher. When the Station/Launcher field is set to zero, this shall be the time it takes to perform a maximum quantity load/reload of this fuel type at all applicable stations/launchers for this entity.""" + self.maximumQuantityReloadTime = 0 + # /** The fuel measurement units. Enumeration uid 328 */ + self.fuelMeasurementUnits = FuelMeasurementUnits.default + + # /** Fuel type uid 413 */ + self.fuelType = SupplyFuelType.default + + # /** Location of fuel as related to entity. See section 14 of EBV document uid 329 */ + self.fuelLocation = FuelLocation.default + + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "StandardQuantity : " + str(self.standardQuantity) + "\n" + outputString += "MaximumQuantity : " + str(self.maximumQuantity) + "\n" + outputString += "StandardQuantityReloadTime : " + str(self.standardQuantityReloadTime) + "\n" + outputString += "MaximumQuantityReloadTime : " + str(self.maximumQuantityReloadTime) + "\n" + outputString += "FuelMeasurementUnits : " + self.fuelMeasurementUnits.get_description + "(" + (str(int(self.fuelMeasurementUnits))) + ")" + "\n" + outputString += "SupplyFuelType : " + self.fuelType.get_description + "(" + (str(int(self.fuelType))) + ")" + "\n" + outputString += "FuelLocation : " + self.fuelLocation.get_description + "(" + (str(int(self.fuelLocation))) + ")" + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int(int(self.standardQuantity)) + outputStream.write_int(int(self.maximumQuantity)) + outputStream.write_int(int(self.standardQuantityReloadTime)) + outputStream.write_int(int(self.maximumQuantityReloadTime)) + self.serialize_enum(self.fuelMeasurementUnits,outputStream) + self.serialize_enum(self.fuelType,outputStream) + self.serialize_enum(self.fuelLocation,outputStream) + outputStream.write_byte(int(self.padding)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.standardQuantity = inputStream.read_int() + self.maximumQuantity = inputStream.read_int() + self.standardQuantityReloadTime = inputStream.read_int() + self.maximumQuantityReloadTime = inputStream.read_int() + self.fuelMeasurementUnits = FuelMeasurementUnits.get_enum(self.parse_enum(self.fuelMeasurementUnits,inputStream)) + self.fuelType = SupplyFuelType.get_enum(self.parse_enum(self.fuelType,inputStream)) + self.fuelLocation = FuelLocation.get_enum(self.parse_enum(self.fuelLocation,inputStream)) + self.padding = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 8 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/supplemental_emission_entity_state_pdu.py b/dis/supplemental_emission_entity_state_pdu.py new file mode 100644 index 0000000..f4a2905 --- /dev/null +++ b/dis/supplemental_emission_entity_state_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class SupplementalEmissionEntityStatePdu( object ): + """Alias, more descriptive name for SEESPdu.""" + + def __init__(self): + """ Initializer for SupplementalEmissionEntityStatePdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/supply_quantity.py b/dis/supply_quantity.py new file mode 100644 index 0000000..5e1f2ef --- /dev/null +++ b/dis/supply_quantity.py @@ -0,0 +1,90 @@ +from enum import Enum + +from .entity_type import EntityType + +class SupplyQuantity( object ): + """ A supply, and the amount of that supply. Section 6.2.86""" + + def __init__(self): + """ Initializer for SupplyQuantity""" + """ Type of supply""" + self.supplyType = EntityType() + """ The number of units of a supply type. """ + self.quantity = 0.0 + + def to_string(self) ->str: + outputString = "" + outputString += "SupplyType :" + "\n" + self.supplyType.to_string() + "\n" + outputString += "Quantity : " + str(self.quantity) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.supplyType.serialize(outputStream) + outputStream.write_float(int(self.quantity)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.supplyType.parse(inputStream) + self.quantity = inputStream.read_float() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/synthetic_environment_family_pdu.py b/dis/synthetic_environment_family_pdu.py new file mode 100644 index 0000000..fd8abb6 --- /dev/null +++ b/dis/synthetic_environment_family_pdu.py @@ -0,0 +1,88 @@ +from enum import Enum + +from .pdu_base import PduBase +from .siso_ref_010.enums.disprotocol_family import DISProtocolFamily + +class SyntheticEnvironmentFamilyPdu( PduBase ): + """Section 5.3.11: Abstract superclass for synthetic environment PDUs""" + + def __init__(self): + """ Initializer for SyntheticEnvironmentFamilyPdu""" + super().__init__() + self.protocolFamily = DISProtocolFamily.synthetic_environment + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( SyntheticEnvironmentFamilyPdu, self ).serialize(outputStream) + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( SyntheticEnvironmentFamilyPdu, self).parse(inputStream) + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/system_identifier.py b/dis/system_identifier.py new file mode 100644 index 0000000..2771259 --- /dev/null +++ b/dis/system_identifier.py @@ -0,0 +1,106 @@ +from enum import Enum + +from .siso_ref_010.enums.iffsystem_mode import IFFSystemMode +from .siso_ref_010.enums.iffsystem_type import IFFSystemType +from .change_options import ChangeOptions +from .siso_ref_010.enums.iffsystem_name import IFFSystemName + +class SystemIdentifier( object ): + """The ID of the IFF emitting system. Section 6.2.87""" + + def __init__(self): + """ Initializer for SystemIdentifier""" + # /** general type of emitting system, an enumeration uid 82 */ + self.systemType = IFFSystemType.default + + # /** named type of system, an enumeration uid 83 */ + self.systemName = IFFSystemName.default + + # /** mode of operation for the system, an enumeration uid 84 */ + self.systemMode = IFFSystemMode.default + + """ status of this PDU, see section 6.2.15""" + self.changeOptions = ChangeOptions() + + def to_string(self) ->str: + outputString = "" + outputString += "IFFSystemType : " + self.systemType.get_description + "(" + (str(int(self.systemType))) + ")" + "\n" + outputString += "IFFSystemName : " + self.systemName.get_description + "(" + (str(int(self.systemName))) + ")" + "\n" + outputString += "IFFSystemMode : " + self.systemMode.get_description + "(" + (str(int(self.systemMode))) + ")" + "\n" + outputString += "ChangeOptions :" + "\n" + self.changeOptions.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.systemType,outputStream) + self.serialize_enum(self.systemName,outputStream) + self.serialize_enum(self.systemMode,outputStream) + self.changeOptions.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.systemType = IFFSystemType.get_enum(self.parse_enum(self.systemType,inputStream)) + self.systemName = IFFSystemName.get_enum(self.parse_enum(self.systemName,inputStream)) + self.systemMode = IFFSystemMode.get_enum(self.parse_enum(self.systemMode,inputStream)) + self.changeOptions.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/time_space_position_information_pdu.py b/dis/time_space_position_information_pdu.py new file mode 100644 index 0000000..315bf47 --- /dev/null +++ b/dis/time_space_position_information_pdu.py @@ -0,0 +1,82 @@ +from enum import Enum + + +class TimeSpacePositionInformationPdu( object ): + """Alias, more descriptive name for TSPIPdu.""" + + def __init__(self): + """ Initializer for TimeSpacePositionInformationPdu""" + pass + + def to_string(self) ->str: + outputString = "" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/total_record_sets.py b/dis/total_record_sets.py new file mode 100644 index 0000000..b791067 --- /dev/null +++ b/dis/total_record_sets.py @@ -0,0 +1,89 @@ +from enum import Enum + + +class TotalRecordSets( object ): + """Total number of record sets contained in a logical set of one or more PDUs. Used to transfer ownership, etc Section 6.2.88""" + + def __init__(self): + """ Initializer for TotalRecordSets""" + """ Total number of record sets""" + self.totalRecordSets = 0 + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "TotalRecordSets : " + str(self.totalRecordSets) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_short(int(self.totalRecordSets)) + outputStream.write_short(int(self.padding)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.totalRecordSets = inputStream.read_short() + self.padding = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/track_jam_data.py b/dis/track_jam_data.py new file mode 100644 index 0000000..aa6051a --- /dev/null +++ b/dis/track_jam_data.py @@ -0,0 +1,95 @@ +from enum import Enum + +from .entity_id import EntityID + +class TrackJamData( object ): + """ Track-Jam data Section 6.2.89""" + + def __init__(self): + """ Initializer for TrackJamData""" + """ The entity tracked or illumated, or an emitter beam targeted with jamming""" + self.entityID = EntityID() + """ Emitter system associated with the entity""" + self.emitterNumber = 0 + """ Beam associated with the entity""" + self.beamNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "EntityID :" + "\n" + self.entityID.to_string() + "\n" + outputString += "EmitterNumber : " + str(self.emitterNumber) + "\n" + outputString += "BeamNumber : " + str(self.beamNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.entityID.serialize(outputStream) + outputStream.write_byte(int(self.emitterNumber)) + outputStream.write_byte(int(self.beamNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.entityID.parse(inputStream) + self.emitterNumber = inputStream.read_byte() + self.beamNumber = inputStream.read_byte() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/transfer_ownership_pdu.py b/dis/transfer_ownership_pdu.py new file mode 100644 index 0000000..ffea6d5 --- /dev/null +++ b/dis/transfer_ownership_pdu.py @@ -0,0 +1,127 @@ +from enum import Enum + +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .siso_ref_010.enums.required_reliability_service import RequiredReliabilityService +from .siso_ref_010.enums.transfer_control_transfer_type import TransferControlTransferType +from .record_specification import RecordSpecification +from .entity_id import EntityID +from .entity_management_family_pdu import EntityManagementFamilyPdu + +class TransferOwnershipPdu( EntityManagementFamilyPdu ): + """ Information initiating the dyanic allocation and control of simulation entities between two simulation applications.""" + + def __init__(self): + """ Initializer for TransferOwnershipPdu""" + super().__init__() + """ ID of entity originating request""" + self.originatingEntityID = EntityID() + """ ID of entity receiving request""" + self.receivingEntityID = EntityID() + """ ID of request""" + self.requestID = 0 + # /** required level of reliability service. uid 74 */ + self.requiredReliabilityService = RequiredReliabilityService.default + + # /** type of transfer desired uid 224 */ + self.transferType = TransferControlTransferType.default + + """ The entity for which control is being requested to transfer""" + self.transferEntityID = EntityID() + # recordSets is an undescribed parameter... + self.recordSets = RecordSpecification() + self.pduType = DisPduType.transfer_ownership + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "OriginatingEntityID :" + "\n" + self.originatingEntityID.to_string() + "\n" + outputString += "ReceivingEntityID :" + "\n" + self.receivingEntityID.to_string() + "\n" + outputString += "RequestID : " + str(self.requestID) + "\n" + outputString += "RequiredReliabilityService : " + self.requiredReliabilityService.get_description + "(" + (str(int(self.requiredReliabilityService))) + ")" + "\n" + outputString += "TransferControlTransferType : " + self.transferType.get_description + "(" + (str(int(self.transferType))) + ")" + "\n" + outputString += "TransferEntityID :" + "\n" + self.transferEntityID.to_string() + "\n" + outputString += "RecordSets :" + "\n" + self.recordSets.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( TransferOwnershipPdu, self ).serialize(outputStream) + self.originatingEntityID.serialize(outputStream) + self.receivingEntityID.serialize(outputStream) + outputStream.write_int(int(self.requestID)) + self.serialize_enum(self.requiredReliabilityService,outputStream) + self.serialize_enum(self.transferType,outputStream) + self.transferEntityID.serialize(outputStream) + self.recordSets.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( TransferOwnershipPdu, self).parse(inputStream) + self.originatingEntityID.parse(inputStream) + self.receivingEntityID.parse(inputStream) + self.requestID = inputStream.read_int() + self.requiredReliabilityService = RequiredReliabilityService.get_enum(self.parse_enum(self.requiredReliabilityService,inputStream)) + self.transferType = TransferControlTransferType.get_enum(self.parse_enum(self.transferType,inputStream)) + self.transferEntityID.parse(inputStream) + self.recordSets.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 7 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/transmitter_pdu.py b/dis/transmitter_pdu.py new file mode 100644 index 0000000..c3d59c0 --- /dev/null +++ b/dis/transmitter_pdu.py @@ -0,0 +1,289 @@ +from enum import Enum + +from .modulation_type import ModulationType +from .siso_ref_010.enums.transmitter_transmit_state import TransmitterTransmitState +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .vector3float import Vector3Float +from .radio_comms_header import RadioCommsHeader +from .siso_ref_010.enums.transmitter_input_source import TransmitterInputSource +from .variable_transmitter_parameters import VariableTransmitterParameters +from .siso_ref_010.enums.transmitter_antenna_pattern_type import TransmitterAntennaPatternType +from .radio_communications_family_pdu import RadioCommunicationsFamilyPdu +from .modulation_parameters import ModulationParameters +from .vector3double import Vector3Double +from .siso_ref_010.enums.transmitter_crypto_system import TransmitterCryptoSystem +from .radio_type import RadioType + +class TransmitterPdu( RadioCommunicationsFamilyPdu ): + """5.8.3 Communicates the state of a particular radio transmitter or simple intercom.""" + + def __init__(self): + """ Initializer for TransmitterPdu""" + super().__init__() + # header is an undescribed parameter... + self.header = RadioCommsHeader() + """ Type of radio""" + self.radioEntityType = RadioType() + # /** transmit state uid 164 */ + self.transmitState = TransmitterTransmitState.default + + # /** input source uid 165 */ + self.inputSource = TransmitterInputSource.default + + """ count field""" + self.variableTransmitterParameterCount = 0 + """ Location of antenna""" + self.antennaLocation = Vector3Double() + """ relative location of antenna""" + self.relativeAntennaLocation = Vector3Float() + # /** antenna pattern type uid 167 */ + self.antennaPatternType = TransmitterAntennaPatternType.default + + """ atenna pattern length""" + self.antennaPatternCount = 0 + """ frequency""" + self.frequency = 0 + """ transmit frequency Bandwidth""" + self.transmitFrequencyBandwidth = 0.0 + """ transmission power""" + self.power = 0.0 + """ modulation""" + self.modulationType = ModulationType() + # /** crypto system enumeration uid 166 */ + self.cryptoSystem = TransmitterCryptoSystem.default + + """ crypto system key identifer""" + self.cryptoKeyId = 0 + """ how many modulation parameters we have""" + self.modulationParameterCount = 0 + self.padding1 = 0 + self.padding2 = 0 + """ variable length list of modulation parameters""" + self._modulationParametersList = [] + """ variable length list of antenna pattern records""" + self._antennaPatternList = [] + self.pduType = DisPduType.transmitter + + + def get_antennaPatternCount(self): + return len(self._antennaPatternList) + def set_antennaPatternCount(self, value): + antennaPatternCount = value + + + def get_modulationParameterCount(self): + return len(self._modulationParametersList) + def set_modulationParameterCount(self, value): + modulationParameterCount = value + + + def get_modulationParametersList(self): + return self._modulationParametersList + def set_modulationParametersList(self, value): + self._modulationParametersList = value + modulationParametersList = property(get_modulationParametersList, set_modulationParametersList) + + + def add_modulationParametersList(self, value : ModulationParameters): + self._modulationParametersList.append(value) + + + """ + /// Name : modulationParametersList + /// UID : + /// Type : ModulationParameters + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of modulation parameters + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_antennaPatternList(self): + return self._antennaPatternList + def set_antennaPatternList(self, value): + self._antennaPatternList = value + antennaPatternList = property(get_antennaPatternList, set_antennaPatternList) + + + def add_antennaPatternList(self, value : VariableTransmitterParameters): + self._antennaPatternList.append(value) + + + """ + /// Name : antennaPatternList + /// UID : + /// Type : VariableTransmitterParameters + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : variable length list of antenna pattern records + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "Header :" + "\n" + self.header.to_string() + "\n" + outputString += "RadioEntityType :" + "\n" + self.radioEntityType.to_string() + "\n" + outputString += "TransmitterTransmitState : " + self.transmitState.get_description + "(" + (str(int(self.transmitState))) + ")" + "\n" + outputString += "TransmitterInputSource : " + self.inputSource.get_description + "(" + (str(int(self.inputSource))) + ")" + "\n" + outputString += "VariableTransmitterParameterCount : " + str(self.variableTransmitterParameterCount) + "\n" + outputString += "AntennaLocation :" + "\n" + self.antennaLocation.to_string() + "\n" + outputString += "RelativeAntennaLocation :" + "\n" + self.relativeAntennaLocation.to_string() + "\n" + outputString += "TransmitterAntennaPatternType : " + self.antennaPatternType.get_description + "(" + (str(int(self.antennaPatternType))) + ")" + "\n" + outputString += "AntennaPatternCount : " + str(len(self._antennaPatternList)) + "\n" + outputString += "Frequency : " + str(self.frequency) + "\n" + outputString += "TransmitFrequencyBandwidth : " + str(self.transmitFrequencyBandwidth) + "\n" + outputString += "Power : " + str(self.power) + "\n" + outputString += "ModulationType :" + "\n" + self.modulationType.to_string() + "\n" + outputString += "TransmitterCryptoSystem : " + self.cryptoSystem.get_description + "(" + (str(int(self.cryptoSystem))) + ")" + "\n" + outputString += "CryptoKeyId : " + str(self.cryptoKeyId) + "\n" + outputString += "ModulationParameterCount : " + str(len(self._modulationParametersList)) + "\n" + outputString += "Padding1 : " + str(self.padding1) + "\n" + outputString += "Padding2 : " + str(self.padding2) + "\n" + outputString += "ModulationParametersList : " + "\n" + for idx in range(0, len(self._modulationParametersList)): + outputString += self._modulationParametersList[idx].to_string() + + outputString += "AntennaPatternList : " + "\n" + for idx in range(0, len(self._antennaPatternList)): + outputString += self._antennaPatternList[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( TransmitterPdu, self ).serialize(outputStream) + self.header.serialize(outputStream) + self.radioEntityType.serialize(outputStream) + self.serialize_enum(self.transmitState,outputStream) + self.serialize_enum(self.inputSource,outputStream) + outputStream.write_short(int(self.variableTransmitterParameterCount)) + self.antennaLocation.serialize(outputStream) + self.relativeAntennaLocation.serialize(outputStream) + self.serialize_enum(self.antennaPatternType,outputStream) + outputStream.write_short( len(self._antennaPatternList)) + outputStream.write_long(int(self.frequency)) + outputStream.write_float(int(self.transmitFrequencyBandwidth)) + outputStream.write_float(int(self.power)) + self.modulationType.serialize(outputStream) + self.serialize_enum(self.cryptoSystem,outputStream) + outputStream.write_short(int(self.cryptoKeyId)) + outputStream.write_byte( len(self._modulationParametersList)) + outputStream.write_byte(int(self.padding1)) + outputStream.write_short(int(self.padding2)) + for anObj in self._modulationParametersList: + anObj.serialize(outputStream) + + for anObj in self._antennaPatternList: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( TransmitterPdu, self).parse(inputStream) + self.header.parse(inputStream) + self.radioEntityType.parse(inputStream) + self.transmitState = TransmitterTransmitState.get_enum(self.parse_enum(self.transmitState,inputStream)) + self.inputSource = TransmitterInputSource.get_enum(self.parse_enum(self.inputSource,inputStream)) + self.variableTransmitterParameterCount = inputStream.read_short() + self.antennaLocation.parse(inputStream) + self.relativeAntennaLocation.parse(inputStream) + self.antennaPatternType = TransmitterAntennaPatternType.get_enum(self.parse_enum(self.antennaPatternType,inputStream)) + self.antennaPatternCount = inputStream.read_short() + self.frequency = inputStream.read_long() + self.transmitFrequencyBandwidth = inputStream.read_float() + self.power = inputStream.read_float() + self.modulationType.parse(inputStream) + self.cryptoSystem = TransmitterCryptoSystem.get_enum(self.parse_enum(self.cryptoSystem,inputStream)) + self.cryptoKeyId = inputStream.read_short() + self.modulationParameterCount = inputStream.read_byte() + self.padding1 = inputStream.read_byte() + self.padding2 = inputStream.read_short() + for idx in range(0, self.modulationParameterCount): + element = ModulationParameters() + element.parse(inputStream) + self._modulationParametersList.append(element) + + for idx in range(0, self.antennaPatternCount): + element = VariableTransmitterParameters() + element.parse(inputStream) + self._antennaPatternList.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 20 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/tspipdu.py b/dis/tspipdu.py new file mode 100644 index 0000000..9a10509 --- /dev/null +++ b/dis/tspipdu.py @@ -0,0 +1,154 @@ +from enum import Enum + +from .live_entity_position_error import LiveEntityPositionError +from .live_entity_orientation_error import LiveEntityOrientationError +from .live_dead_reckoning_parameters import LiveDeadReckoningParameters +from .live_entity_linear_velocity import LiveEntityLinearVelocity +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .live_entity_family_pdu import LiveEntityFamilyPdu +from .entity_id import EntityID +from .live_entity_relative_world_coordinates import LiveEntityRelativeWorldCoordinates +from .live_entity_orientation import LiveEntityOrientation + +class TSPIPdu( LiveEntityFamilyPdu ): + """9.4.2 The Time Space Position Information (TSPI) PDU shall communicate information about the LE’s state vector.""" + + def __init__(self): + """ Initializer for TSPIPdu""" + super().__init__() + # liveEntityId is an undescribed parameter... + self.liveEntityId = EntityID() + """ bit field""" + self.TSPIFlag = 0 + # entityLocation is an undescribed parameter... + self.entityLocation = LiveEntityRelativeWorldCoordinates() + # entityLinearVelocity is an undescribed parameter... + self.entityLinearVelocity = LiveEntityLinearVelocity() + # entityOrientation is an undescribed parameter... + self.entityOrientation = LiveEntityOrientation() + # positionError is an undescribed parameter... + self.positionError = LiveEntityPositionError() + # orientationError is an undescribed parameter... + self.orientationError = LiveEntityOrientationError() + # deadReckoningParameters is an undescribed parameter... + self.deadReckoningParameters = LiveDeadReckoningParameters() + self.measuredSpeed = 0 + self.systemSpecificDataLength = 0 + self.systemSpecificData = [] + self.pduType = DisPduType.time_space_position_information + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "LiveEntityId :" + "\n" + self.liveEntityId.to_string() + "\n" + outputString += "TSPIFlag : " + str(self.TSPIFlag) + "\n" + outputString += "EntityLocation :" + "\n" + self.entityLocation.to_string() + "\n" + outputString += "EntityLinearVelocity :" + "\n" + self.entityLinearVelocity.to_string() + "\n" + outputString += "EntityOrientation :" + "\n" + self.entityOrientation.to_string() + "\n" + outputString += "PositionError :" + "\n" + self.positionError.to_string() + "\n" + outputString += "OrientationError :" + "\n" + self.orientationError.to_string() + "\n" + outputString += "DeadReckoningParameters :" + "\n" + self.deadReckoningParameters.to_string() + "\n" + outputString += "MeasuredSpeed : " + str(self.measuredSpeed) + "\n" + outputString += "SystemSpecificDataLength : " + str(self.systemSpecificDataLength) + "\n" + outputString += "SystemSpecificData : " + "\n" + for idx in range(0, len(self.systemSpecificData)): + outputString += str(self.systemSpecificData[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( TSPIPdu, self ).serialize(outputStream) + self.liveEntityId.serialize(outputStream) + outputStream.write_byte(int(self.TSPIFlag)) + self.entityLocation.serialize(outputStream) + self.entityLinearVelocity.serialize(outputStream) + self.entityOrientation.serialize(outputStream) + self.positionError.serialize(outputStream) + self.orientationError.serialize(outputStream) + self.deadReckoningParameters.serialize(outputStream) + outputStream.write_short(int(self.measuredSpeed)) + outputStream.write_byte(int(self.systemSpecificDataLength)) + for idx in range(0, 0): + outputStream.write_unsigned_byte( self.systemSpecificData[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( TSPIPdu, self).parse(inputStream) + self.liveEntityId.parse(inputStream) + self.TSPIFlag = inputStream.read_byte() + self.entityLocation.parse(inputStream) + self.entityLinearVelocity.parse(inputStream) + self.entityOrientation.parse(inputStream) + self.positionError.parse(inputStream) + self.orientationError.parse(inputStream) + self.deadReckoningParameters.parse(inputStream) + self.measuredSpeed = inputStream.read_short() + self.systemSpecificDataLength = inputStream.read_byte() + self.systemSpecificData = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_byte() + self.systemSpecificData[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 11 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/uabeam.py b/dis/uabeam.py new file mode 100644 index 0000000..8033f8a --- /dev/null +++ b/dis/uabeam.py @@ -0,0 +1,98 @@ +from enum import Enum + +from .uafundamental_parameter import UAFundamentalParameter + +class UABeam( object ): + """Information for one or more acoustic beams that the system has, including: length of the beam data, beam identification number for each beam, and fundamental parametric data used to define the entity’s active emissions. This field defines the active emission parameter index, beam scan pattern, orientation, and beamwidth, which can vary dynamically during system operation.""" + + def __init__(self): + """ Initializer for UABeam""" + self.beamDataLength = 0 + self.beamNumber = 0 + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + # fundamentalParameterData is an undescribed parameter... + self.fundamentalParameterData = UAFundamentalParameter() + + def to_string(self) ->str: + outputString = "" + outputString += "BeamDataLength : " + str(self.beamDataLength) + "\n" + outputString += "BeamNumber : " + str(self.beamNumber) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "FundamentalParameterData :" + "\n" + self.fundamentalParameterData.to_string() + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_byte(int(self.beamDataLength)) + outputStream.write_byte(int(self.beamNumber)) + outputStream.write_short(int(self.padding)) + self.fundamentalParameterData.serialize(outputStream) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.beamDataLength = inputStream.read_byte() + self.beamNumber = inputStream.read_byte() + self.padding = inputStream.read_short() + self.fundamentalParameterData.parse(inputStream) + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/uaemitter.py b/dis/uaemitter.py new file mode 100644 index 0000000..444899e --- /dev/null +++ b/dis/uaemitter.py @@ -0,0 +1,157 @@ +from enum import Enum + +from .uabeam import UABeam +from .acoustic_emitter import AcousticEmitter +from .vector3float import Vector3Float + +class UAEmitter( object ): + """Underwater Acoustic (UA) active emissions (intentional emissions) and passive signature (unintentional emissions) information.""" + + def __init__(self): + """ Initializer for UAEmitter""" + """ this field shall specify the length of this emitter system's data in 32-bit words.""" + self.systemDataLength = 0 + """ the number of beams being described in the current PDU for the emitter system being described.""" + self.numberOfBeams = 0 + """ zero-filled array of padding bits for byte alignment and consistent sizing of PDU data""" + self.padding = 0 + """ TODO""" + self.acousticEmitter = AcousticEmitter() + """ the location of the antenna beam source with respect to the emitting entity's coordinate system. This location shall be the origin of the emitter coordinate system that shall have the same orientation as the entity coordinate system. This field shall be represented by an Entity Coordinate Vector record see 6.2.95 """ + self.location = Vector3Float() + """ Electronic emission beams""" + self._beams = [] + + + def get_numberOfBeams(self): + return len(self._beams) + def set_numberOfBeams(self, value): + numberOfBeams = value + + + def get_beams(self): + return self._beams + def set_beams(self, value): + self._beams = value + beams = property(get_beams, set_beams) + + + def add_beams(self, value : UABeam): + self._beams.append(value) + + + """ + /// Name : beams + /// UID : + /// Type : UABeam + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : Electronic emission beams + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += "SystemDataLength : " + str(self.systemDataLength) + "\n" + outputString += "NumberOfBeams : " + str(len(self._beams)) + "\n" + outputString += "Padding : " + str(self.padding) + "\n" + outputString += "AcousticEmitter :" + "\n" + self.acousticEmitter.to_string() + "\n" + outputString += "Location :" + "\n" + self.location.to_string() + "\n" + outputString += "Beams : " + "\n" + for idx in range(0, len(self._beams)): + outputString += self._beams[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_byte(int(self.systemDataLength)) + outputStream.write_byte( len(self._beams)) + outputStream.write_short(int(self.padding)) + self.acousticEmitter.serialize(outputStream) + self.location.serialize(outputStream) + for anObj in self._beams: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.systemDataLength = inputStream.read_byte() + self.numberOfBeams = inputStream.read_byte() + self.padding = inputStream.read_short() + self.acousticEmitter.parse(inputStream) + self.location.parse(inputStream) + for idx in range(0, self.numberOfBeams): + element = UABeam() + element.parse(inputStream) + self._beams.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/uafundamental_parameter.py b/dis/uafundamental_parameter.py new file mode 100644 index 0000000..4fc0e55 --- /dev/null +++ b/dis/uafundamental_parameter.py @@ -0,0 +1,113 @@ +from enum import Enum + +from .siso_ref_010.enums.uascan_pattern import UAScanPattern +from .siso_ref_010.enums.uaactive_emission_parameter_index import UAActiveEmissionParameterIndex + +class UAFundamentalParameter( object ): + """Regeneration parameters for active emission systems that are variable throughout a scenario. Section 6.2.91""" + + def __init__(self): + """ Initializer for UAFundamentalParameter""" + # /** Which database record shall be used uid 146 */ + self.activeEmissionParameterIndex = UAActiveEmissionParameterIndex.default + + # /** The type of scan pattern, If not used, zero uid 147 */ + self.scanPattern = UAScanPattern.default + + """ center azimuth bearing of th emain beam. In radians.""" + self.beamCenterAzimuthHorizontal = 0.0 + """ Horizontal beamwidth of th emain beam Meastued at the 3dB down point of peak radiated power. In radians.""" + self.azimuthalBeamwidthHorizontal = 0.0 + """ center of the d/e angle of th emain beam relative to the stablised de angle of the target. In radians.""" + self.beamCenterDepressionElevation = 0.0 + """ vertical beamwidth of the main beam. Meastured at the 3dB down point of peak radiated power. In radians.""" + self.depressionElevationBeamWidth = 0.0 + + def to_string(self) ->str: + outputString = "" + outputString += "UAActiveEmissionParameterIndex : " + self.activeEmissionParameterIndex.get_description + "(" + (str(int(self.activeEmissionParameterIndex))) + ")" + "\n" + outputString += "UAScanPattern : " + self.scanPattern.get_description + "(" + (str(int(self.scanPattern))) + ")" + "\n" + outputString += "BeamCenterAzimuthHorizontal : " + str(self.beamCenterAzimuthHorizontal) + "\n" + outputString += "AzimuthalBeamwidthHorizontal : " + str(self.azimuthalBeamwidthHorizontal) + "\n" + outputString += "BeamCenterDepressionElevation : " + str(self.beamCenterDepressionElevation) + "\n" + outputString += "DepressionElevationBeamWidth : " + str(self.depressionElevationBeamWidth) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.activeEmissionParameterIndex,outputStream) + self.serialize_enum(self.scanPattern,outputStream) + outputStream.write_float(int(self.beamCenterAzimuthHorizontal)) + outputStream.write_float(int(self.azimuthalBeamwidthHorizontal)) + outputStream.write_float(int(self.beamCenterDepressionElevation)) + outputStream.write_float(int(self.depressionElevationBeamWidth)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.activeEmissionParameterIndex = UAActiveEmissionParameterIndex.get_enum(self.parse_enum(self.activeEmissionParameterIndex,inputStream)) + self.scanPattern = UAScanPattern.get_enum(self.parse_enum(self.scanPattern,inputStream)) + self.beamCenterAzimuthHorizontal = inputStream.read_float() + self.azimuthalBeamwidthHorizontal = inputStream.read_float() + self.beamCenterDepressionElevation = inputStream.read_float() + self.depressionElevationBeamWidth = inputStream.read_float() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 6 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/unattached_identifier.py b/dis/unattached_identifier.py new file mode 100644 index 0000000..d40821f --- /dev/null +++ b/dis/unattached_identifier.py @@ -0,0 +1,90 @@ +from enum import Enum + +from .simulation_address import SimulationAddress + +class UnattachedIdentifier( object ): + """The unique designation of one or more unattached radios in an event or exercise Section 6.2.91""" + + def __init__(self): + """ Initializer for UnattachedIdentifier""" + """ See 6.2.79""" + self.simulationAddress = SimulationAddress() + """ Reference number""" + self.referenceNumber = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "SimulationAddress :" + "\n" + self.simulationAddress.to_string() + "\n" + outputString += "ReferenceNumber : " + str(self.referenceNumber) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.simulationAddress.serialize(outputStream) + outputStream.write_short(int(self.referenceNumber)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.simulationAddress.parse(inputStream) + self.referenceNumber = inputStream.read_short() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/underwater_acoustic_pdu.py b/dis/underwater_acoustic_pdu.py new file mode 100644 index 0000000..abe9f89 --- /dev/null +++ b/dis/underwater_acoustic_pdu.py @@ -0,0 +1,289 @@ +from enum import Enum + +from .apa import APA +from .siso_ref_010.enums.dis_pdu_type import DisPduType +from .shaft_rpm import ShaftRPM +from .siso_ref_010.enums.uastate_change_update_indicator import UAStateChangeUpdateIndicator +from .siso_ref_010.enums.uapassive_parameter_index import UAPassiveParameterIndex +from .entity_id import EntityID +from .event_identifier import EventIdentifier +from .distributed_emissions_regeneration_family_pdu import DistributedEmissionsRegenerationFamilyPdu +from .uaemitter import UAEmitter + +class UnderwaterAcousticPdu( DistributedEmissionsRegenerationFamilyPdu ): + """7.6.4 Information about underwater acoustic emmissions. See 5.7.5.""" + + def __init__(self): + """ Initializer for UnderwaterAcousticPdu""" + super().__init__() + """ ID of the entity that is the source of the emission""" + self.emittingEntityID = EntityID() + """ ID of event""" + self.eventID = EventIdentifier() + # /** This field shall be used to indicate whether the data in the UA PDU represent a state update or data that have changed since issuance of the last UA PDU uid 143 */ + self.stateChangeIndicator = UAStateChangeUpdateIndicator.default + + """ padding""" + self.pad = 0 + # /** This field indicates which database record (or file) shall be used in the definition of passive signature (unintentional) emissions of the entity. The indicated database record (or file) shall define all noise generated as a function of propulsion plant configurations and associated auxiliaries. uid 148 */ + self.passiveParameterIndex = UAPassiveParameterIndex.default + + """ This field shall specify the entity propulsion plant configuration. This field is used to determine the passive signature characteristics of an entity.""" + self.propulsionPlantConfiguration = 0 + """ This field shall represent the number of shafts on a platform""" + self.numberOfShafts = 0 + """ This field shall indicate the number of APAs described in the current UA PDU""" + self.numberOfAPAs = 0 + """ This field shall specify the number of UA emitter systems being described in the current UA PDU""" + self.numberOfUAEmitterSystems = 0 + """ shaft RPM values.""" + self._shaftRPMs = [] + """ additional passive activities""" + self._apaData = [] + self._emitterSystems = [] + self.pduType = DisPduType.underwater_acoustic + + + def get_numberOfShafts(self): + return len(self._shaftRPMs) + def set_numberOfShafts(self, value): + numberOfShafts = value + + + def get_numberOfAPAs(self): + return len(self._apaData) + def set_numberOfAPAs(self, value): + numberOfAPAs = value + + + def get_numberOfUAEmitterSystems(self): + return len(self._emitterSystems) + def set_numberOfUAEmitterSystems(self, value): + numberOfUAEmitterSystems = value + + + def get_shaftRPMs(self): + return self._shaftRPMs + def set_shaftRPMs(self, value): + self._shaftRPMs = value + shaftRPMs = property(get_shaftRPMs, set_shaftRPMs) + + + def add_shaftRPMs(self, value : ShaftRPM): + self._shaftRPMs.append(value) + + + """ + /// Name : shaftRPMs + /// UID : + /// Type : ShaftRPM + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : shaft RPM values. + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_apaData(self): + return self._apaData + def set_apaData(self, value): + self._apaData = value + apaData = property(get_apaData, set_apaData) + + + def add_apaData(self, value : APA): + self._apaData.append(value) + + + """ + /// Name : apaData + /// UID : + /// Type : APA + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : additional passive activities + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + + def get_emitterSystems(self): + return self._emitterSystems + def set_emitterSystems(self, value): + self._emitterSystems = value + emitterSystems = property(get_emitterSystems, set_emitterSystems) + + + def add_emitterSystems(self, value : UAEmitter): + self._emitterSystems.append(value) + + + """ + /// Name : emitterSystems + /// UID : + /// Type : UAEmitter + /// Kind : OBJECT_LIST + /// Marshal Size : 8 + /// Comment : null + /// default value : null + /// is Bitfield : false + /// List Length : 0 + /// Prim Length : false + /// Dyn Length : false + /// Underlying Kind : CLASSREF + /// underlying Type : N/A + """ + + + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + outputString += "EmittingEntityID :" + "\n" + self.emittingEntityID.to_string() + "\n" + outputString += "EventID :" + "\n" + self.eventID.to_string() + "\n" + outputString += "UAStateChangeUpdateIndicator : " + self.stateChangeIndicator.get_description + "(" + (str(int(self.stateChangeIndicator))) + ")" + "\n" + outputString += "Pad : " + str(self.pad) + "\n" + outputString += "UAPassiveParameterIndex : " + self.passiveParameterIndex.get_description + "(" + (str(int(self.passiveParameterIndex))) + ")" + "\n" + outputString += "PropulsionPlantConfiguration : " + str(self.propulsionPlantConfiguration) + "\n" + outputString += "NumberOfShafts : " + str(len(self._shaftRPMs)) + "\n" + outputString += "NumberOfAPAs : " + str(len(self._apaData)) + "\n" + outputString += "NumberOfUAEmitterSystems : " + str(len(self._emitterSystems)) + "\n" + outputString += "ShaftRPMs : " + "\n" + for idx in range(0, len(self._shaftRPMs)): + outputString += self._shaftRPMs[idx].to_string() + + outputString += "ApaData : " + "\n" + for idx in range(0, len(self._apaData)): + outputString += self._apaData[idx].to_string() + + outputString += "EmitterSystems : " + "\n" + for idx in range(0, len(self._emitterSystems)): + outputString += self._emitterSystems[idx].to_string() + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( UnderwaterAcousticPdu, self ).serialize(outputStream) + self.emittingEntityID.serialize(outputStream) + self.eventID.serialize(outputStream) + self.serialize_enum(self.stateChangeIndicator,outputStream) + outputStream.write_byte(int(self.pad)) + self.serialize_enum(self.passiveParameterIndex,outputStream) + outputStream.write_byte(int(self.propulsionPlantConfiguration)) + outputStream.write_byte( len(self._shaftRPMs)) + outputStream.write_byte( len(self._apaData)) + outputStream.write_byte( len(self._emitterSystems)) + for anObj in self._shaftRPMs: + anObj.serialize(outputStream) + + for anObj in self._apaData: + anObj.serialize(outputStream) + + for anObj in self._emitterSystems: + anObj.serialize(outputStream) + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( UnderwaterAcousticPdu, self).parse(inputStream) + self.emittingEntityID.parse(inputStream) + self.eventID.parse(inputStream) + self.stateChangeIndicator = UAStateChangeUpdateIndicator.get_enum(self.parse_enum(self.stateChangeIndicator,inputStream)) + self.pad = inputStream.read_byte() + self.passiveParameterIndex = UAPassiveParameterIndex.get_enum(self.parse_enum(self.passiveParameterIndex,inputStream)) + self.propulsionPlantConfiguration = inputStream.read_byte() + self.numberOfShafts = inputStream.read_byte() + self.numberOfAPAs = inputStream.read_byte() + self.numberOfUAEmitterSystems = inputStream.read_byte() + for idx in range(0, self.numberOfShafts): + element = ShaftRPM() + element.parse(inputStream) + self._shaftRPMs.append(element) + + for idx in range(0, self.numberOfAPAs): + element = APA() + element.parse(inputStream) + self._apaData.append(element) + + for idx in range(0, self.numberOfUAEmitterSystems): + element = UAEmitter() + element.parse(inputStream) + self._emitterSystems.append(element) + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 12 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/unsigned_disinteger.py b/dis/unsigned_disinteger.py new file mode 100644 index 0000000..25be1ef --- /dev/null +++ b/dis/unsigned_disinteger.py @@ -0,0 +1,84 @@ +from enum import Enum + + +class UnsignedDISInteger( object ): + """container class not in specification""" + + def __init__(self): + """ Initializer for UnsignedDISInteger""" + """ unsigned integer""" + self.val = 0 + + def to_string(self) ->str: + outputString = "" + outputString += "Val : " + str(self.val) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_int(int(self.val)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.val = inputStream.read_int() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 1 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/utils/DataInputStream.py b/dis/utils/DataInputStream.py new file mode 100644 index 0000000..b03f17e --- /dev/null +++ b/dis/utils/DataInputStream.py @@ -0,0 +1,48 @@ +""" +Reading from Java DataInputStream format. +From https://github.com/arngarden/python_java_datastream +This uses big endian (network) format. +""" + +import struct + +class DataInputStream: + def __init__(self, stream): + self.stream = stream + + def read_boolean(self): + return struct.unpack('?', self.stream.read(1))[0] + + def read_byte(self): + return struct.unpack('b', self.stream.read(1))[0] + + def read_unsigned_byte(self): + return struct.unpack('B', self.stream.read(1))[0] + + def read_char(self): + return chr(struct.unpack('>H', self.stream.read(2))[0]) + + def read_double(self): + return struct.unpack('>d', self.stream.read(8))[0] + + def read_float(self): + return struct.unpack('>f', self.stream.read(4))[0] + + def read_short(self): + return struct.unpack('>h', self.stream.read(2))[0] + + def read_unsigned_short(self): + return struct.unpack('>H', self.stream.read(2))[0] + + def read_long(self): + return struct.unpack('>q', self.stream.read(8))[0] + + def read_utf(self): + utf_length = struct.unpack('>H', self.stream.read(2))[0] + return self.stream.read(utf_length) + + def read_int(self): + return struct.unpack('>i', self.stream.read(4))[0] + + def read_unsigned_int(self): + return struct.unpack('>I', self.stream.read(4))[0] diff --git a/dis/utils/DataOutputStream.py b/dis/utils/DataOutputStream.py new file mode 100644 index 0000000..d219c10 --- /dev/null +++ b/dis/utils/DataOutputStream.py @@ -0,0 +1,49 @@ +""" +Writing to Java DataInputStream format. +From https://github.com/arngarden/python_java_datastream/blob/master/data_output_stream.py +This uses big endian (network) format +""" + +import struct + +class DataOutputStream: + def __init__(self, stream): + self.stream = stream + + def write_boolean(self, bool): + self.stream.write(struct.pack('?', bool)) + + def write_byte(self, val): + self.stream.write(struct.pack('b', val)) + + def write_unsigned_byte(self, val): + self.stream.write(struct.pack('B', val)) + + def write_char(self, val): + self.stream.write(struct.pack('>H', ord(val))) + + def write_double(self, val): + self.stream.write(struct.pack('>d', val)) + + def write_float(self, val): + self.stream.write(struct.pack('>f', val)) + + def write_short(self, val): + self.stream.write(struct.pack('>h', val)) + + def write_unsigned_short(self, val): + self.stream.write(struct.pack('>H', val)) + + def write_long(self, val): + self.stream.write(struct.pack('>q', val)) + + def write_utf(self, string): + self.stream.write(struct.pack('>H', len(string))) + self.stream.write(string) + + def write_int(self, val): + self.stream.write(struct.pack('>i', val)) + + def write_unsigned_int(self, val): + self.stream.write(struct.pack('>I', val)) + diff --git a/dis/utils/PduFactory.py b/dis/utils/PduFactory.py new file mode 100644 index 0000000..ca72f06 --- /dev/null +++ b/dis/utils/PduFactory.py @@ -0,0 +1,106 @@ +__author__ = "mcgredo" +__date__ = "$Jun 25, 2015 11:31:42 AM$" + +from io import BytesIO +import binascii +import io +import sys + +sys.path.insert(0, '..') +sys.path.insert(0, '../..') + +from dis.utils.DataInputStream import DataInputStream +from dis.utils.DataOutputStream import DataOutputStream + +from dis import * + +PduTypeDecoders = { + 1 : EntityStatePdu + , 2 : FirePdu + , 3 : DetonationPdu + , 4 : CollisionPdu + , 5 : ServiceRequestPdu + , 6 : CollisionElasticPdu + , 7 : ResupplyReceivedPdu + , 9 : RepairCompletePdu + , 10 : RepairResponsePdu + , 11 : CreateEntityPdu + , 12 : RemoveEntityPdu + , 13 : StartResumePdu + , 14 : StopFreezePdu + , 15 : AcknowledgePdu + , 16 : ActionRequestPdu + , 17 : ActionResponsePdu + , 18 : DataQueryPdu + , 19 : SetDataPdu + , 20 : DataPdu + , 21 : EventReportPdu + , 22 : CommentPdu + , 23 : ElectromagneticEmissionPdu + , 24 : DesignatorPdu + , 25 : TransmitterPdu + , 26 : SignalPdu + , 27 : ReceiverPdu + , 29 : UnderwaterAcousticPdu + , 31 : IntercomSignalPdu + , 32 : IntercomControlPdu + , 36 : IsPartOfPdu + , 37 : MinefieldStatePdu + , 40 : MinefieldResponseNACKPdu + , 41 : PointObjectStatePdu + , 43 : PointObjectStatePdu + , 44 : LinearObjectStatePdu + , 45 : ArealObjectStatePdu + , 51 : CreateEntityReliablePdu + , 52 : RemoveEntityReliablePdu + , 54 : StopFreezeReliablePdu + , 55 : AcknowledgeReliablePdu + , 56 : ActionRequestReliablePdu + , 57 : ActionResponseReliablePdu + , 58 : DataQueryReliablePdu + , 59 : SetDataReliablePdu + , 60 : DataReliablePdu + , 61 : EventReportReliablePdu + , 62 : CommentReliablePdu + , 63 : RecordQueryReliablePdu + , 66 : CollisionElasticPdu + , 67 : EntityStateUpdatePdu + , 69 : EntityDamageStatusPdu + } + + +def getPdu(inputStream): + inputStream.stream.seek(2, 0) # Skip ahead to PDU type enum field + pduType = inputStream.read_byte() + inputStream.stream.seek(0, 0) # Rewind to start + + if pduType in PduTypeDecoders.keys(): + Decoder = PduTypeDecoders[pduType] + pdu = Decoder() + pdu.parse(inputStream) + return pdu + + # Punt and return none if we don't have a match on anything + # print("Unable to find a PDU corresponding to PduType {}".format(pduType)) + + return None + + +def createPdu(data): + """ Create a PDU of the correct type when passed an array of binary data + input: a bytebuffer of DIS data + output: a python DIS pdu instance of the correct class""" + + memoryStream = BytesIO(data) + inputStream = DataInputStream(memoryStream) + + return getPdu(inputStream) + + +def createPduFromFilePath(filePath): + """ Utility written for unit tests, but could have other uses too.""" + f = io.open(filePath, "rb") + inputStream = DataInputStream(f) + pdu = getPdu(inputStream) + f.close() + return pdu diff --git a/dis/utils/RangeCoordinates.py b/dis/utils/RangeCoordinates.py new file mode 100644 index 0000000..b270457 --- /dev/null +++ b/dis/utils/RangeCoordinates.py @@ -0,0 +1,402 @@ +#! /usr/bin/python + +# Various coordinate system transform utilities. DIS uses +# an Earth-Centered, Earth-Fixed coordinate system, with the +# origin at the center of the (WGS84) earth, positive x out +# at the equator and prime meridian, z out through the north +# pole, and y out at the equator and 90 deg east. We often want +# to convert those coordinates to latitude, longitude, and altitude +# on the WGS84 globe. This utility does that. (It's swiped from +# the net, specifically the stoqs project at MBARI) + +__author__ = "" +__credits = "https://github.com/GAVLab/fhwa2_viz/blob/master/fhwa2_gui/src/util.py" + +""" +Container for general GPS functions and classes +Functions: + deg2rad + rad2deg + euclideanDistance + gpsWeekCheck + keplerE +Classes: + GPS - includes functions: + lla2ecef + ecef2lla + WGS84 - constant parameters for GPS class +""" +#Import required packages +from math import sqrt, pi, sin, cos, tan, atan, atan2, asin +from numpy import array, dot +#from numarray import array, dot, zeros, Float64 + +#def diag(l): +# length = len(l) +# a = zeros((length, length), Float64) +# for index in range(length): +# a[index, index] = l[index] +# return a + + +def deg2rad(deg): + """Converts degrees to radians""" + return deg * pi / 180 + + +def rad2deg(rad): + """Converts radians to degrees""" + return rad * 180 / pi + + +def isEven(num): + """Boolean function returning true if num is even, false if not""" + return num%2 == 0 + + +def euclideanDistance(data, dataRef=None): + """Calculates the Euclidian distance between the given data and zero. + This works out to be equivalent to the distance between two points if their + difference is given as the input""" + total = 0 + for index in range(len(data)): + if dataRef is None: + total += data[index]**2 + else: + total += (data[index] - dataRef[index])**2 + return sqrt(total) + + +def gpsWeekCheck(t): + """Makes sure the time is in the interval [-302400 302400] seconds, which + corresponds to number of seconds in the GPS week""" + if t > 302400.: + t = t - 604800. + elif t < -302400.: + t = t + 604800. + return t + + +def keplerE(M_k, ecc, tolerance=1e-12): + """Iteratively calculates E_k using Kepler's equation: + E_k = M_k + ecc * sin(E_k)""" + E_k = M_k + E_0 = E_k + tolerance * 10. + while abs(E_k - E_0) > tolerance: + E_0 = E_k + E_k = M_k + ecc * sin(E_k) + return E_k + + +class WGS84: + """General parameters defined by the WGS84 system""" + #Semimajor axis length (m) + a = 6378137.0 + #Semiminor axis length (m) + b = 6356752.3142 + #Ellipsoid flatness (unitless) + f = (a - b) / a + #Eccentricity (unitless) + e = sqrt(f * (2 - f)) + #Speed of light (m/s) + c = 299792458. + #Relativistic constant + F = -4.442807633e-10 + #Earth's universal gravitational constant + mu = 3.986005e14 + #Earth rotation rate (rad/s) + omega_ie = 7.2921151467e-5 + + def g0(self, L): + """acceleration due to gravity at the elipsoid surface at latitude L""" + return 9.7803267715 * (1 + 0.001931851353 * sin(L)**2) / \ + sqrt(1 - 0.0066943800229 * sin(L)**2) + + +class GPS: + """Working class for GPS module""" + wgs84 = WGS84() + fGPS = 1023 + fL1 = fGPS * 1.54e6 + fL2 = fGPS * 1.2e6 + + def lla2ecef(self, lla): + """Convert lat, lon, alt to Earth-centered, Earth-fixed coordinates. + Input: lla - (lat, lon, alt) in (decimal degrees, decimal degees, m) + Output: ecef - (x, y, z) in (m, m, m) + """ + #Decompose the input + lat = deg2rad(lla[0]) + lon = deg2rad(lla[1]) + alt = lla[2] + #Calculate length of the normal to the ellipsoid + N = self.wgs84.a / sqrt(1 - (self.wgs84.e * sin(lat))**2) + #Calculate ecef coordinates + x = (N + alt) * cos(lat) * cos(lon) + y = (N + alt) * cos(lat) * sin(lon) + z = (N * (1 - self.wgs84.e**2) + alt) * sin(lat) + #Return the ecef coordinates + return (x, y, z) + + def lla2gcc(self, lla, geoOrigin=''): + """ + Same as lls2ecef, but accepts an X3D-style geoOrigin string for subtraction of it in ecef (gcc) cooridinates + """ + if geoOrigin: + lon0, lat0, a0 = [float(c) for c in geoOrigin.split()] + x0, y0, z0 = self.lla2ecef((lat0, lon0, a0)) + else: + x0, y0, z0 = 0, 0, 0 + + x, y, z = self.lla2ecef(lla) + + return (x - x0, y - y0, z -z0) + + def ecef2lla(self, ecef, tolerance=1e-9): + """Convert Earth-centered, Earth-fixed coordinates to lat, lon, alt. + Input: ecef - (x, y, z) in (m, m, m) + Output: lla - (lat, lon, alt) in (decimal degrees, decimal degrees, m) + """ + #Decompose the input + x = ecef[0] + y = ecef[1] + z = ecef[2] + #Calculate lon + lon = atan2(y, x) + #Initialize the variables to calculate lat and alt + alt = 0 + N = self.wgs84.a + p = sqrt(x**2 + y**2) + lat = 0 + previousLat = 90 + #Iterate until tolerance is reached + while abs(lat - previousLat) >= tolerance: + previousLat = lat + sinLat = z / (N * (1 - self.wgs84.e**2) + alt) + lat = atan((z + self.wgs84.e**2 * N * sinLat) / p) + N = self.wgs84.a / sqrt(1 - (self.wgs84.e * sinLat)**2) + alt = p / cos(lat) - N + #Return the lla coordinates + return (rad2deg(lat), rad2deg(lon), alt) + + def ecef2ned(self, ecef, origin): + """Converts ecef coordinates into local tangent plane where the + origin is the origin in ecef coordinates. + Input: ecef - (x, y, z) in (m, m, m) + origin - (x0, y0, z0) in (m, m, m) + Output: ned - (north, east, down) in (m, m, m) + """ + llaOrigin = self.ecef2lla(origin) + lat = deg2rad(llaOrigin[0]) + lon = deg2rad(llaOrigin[1]) + Re2t = array([[-sin(lat)*cos(lon), -sin(lat)*sin(lon), cos(lat)], + [-sin(lon), cos(lon), 0], + [-cos(lat)*cos(lon), -cos(lat)*sin(lon), -sin(lat)]]) + return list(dot(Re2t, array(ecef) - array(origin))) + + def ned2ecef(self, ned, origin): + """Converts ned local tangent plane coordinates into ecef coordinates + using origin as the ecef point of tangency. + Input: ned - (north, east, down) in (m, m, m) + origin - (x0, y0, z0) in (m, m, m) + Output: ecef - (x, y, z) in (m, m, m) + """ + llaOrigin = self.ecef2lla(origin) + lat = deg2rad(llaOrigin[0]) + lon = deg2rad(llaOrigin[1]) + Rt2e = array([[-sin(lat)*cos(lon), -sin(lon), -cos(lat)*cos(lon)], + [-sin(lat)*sin(lon), cos(lon), -cos(lat)*sin(lon)], + [cos(lat), 0., -sin(lat)]]) + return list(dot(Rt2e, array(ned)) + array(origin)) + + def ned2pae(self, ned): + """Converts the local north, east, down coordinates into range, azimuth, + and elevation angles + Input: ned - (north, east, down) in (m, m, m) + Output: pae - (p, alpha, epsilon) in (m, degrees, degrees) + """ + p = euclideanDistance(ned) + alpha = atan2(ned[1], ned[0]) + epsilon = atan2(-ned[2], sqrt(ned[0]**2 + ned[1]**2)) + return [p, rad2deg(alpha), rad2deg(epsilon)] + + def ecef2pae(self, ecef, origin): + """Converts the ecef coordinates into a tangent plane with the origin + privided, returning the range, azimuth, and elevation angles. + This is a convenience function combining ecef2ned and ned2pae. + Input: ecef - (x, y, z) in (m, m, m) + origin - (x0, y0, z0) in (m, m, m) + Output: pae - (p, alpha, epsilon) in (m, degrees, degrees) + """ + ned = self.ecef2ned(ecef, origin) + return self.ned2pae(ned) + + def ecef2utm(self, ecef): + lla = self.ecef2lla(ecef) + utm, info = self.lla2utm(lla) + return utm, info + + def lla2utm(self, lla): + """Converts lat, lon, alt to Universal Transverse Mercator coordinates + Input: lla - (lat, lon, alt) in (decimal degrees, decimal degrees, m) + Output: utm - (easting, northing, upping) in (m, m, m) + info - (zone, scale factor) + Algorithm from: + Snyder, J. P., Map Projections-A Working Manual, U.S. Geol. Surv. + Prof. Pap., 1395, 1987 + Code segments from pygps project, Russ Nelson""" + #Decompose lla + lat = lla[0] + lon = lla[1] + alt = lla[2] + #Determine the zone number + zoneNumber = int((lon+180.)/6) + 1 + #Special zone for Norway + if (56. <= lat < 64.) and (3. <= lon < 12.): + zoneNumber = 32 + #Special zones for Svalbard + if 72. <= lat < 84.: + if 0. <= lon < 9.: zoneNumber = 31 + elif 9. <= lon < 21.: zoneNumber = 33 + elif 21. <= lon < 33.: zoneNumber = 35 + elif 33. <= lon < 42.: zoneNumber = 37 + #Format the zone + zone = "%d%c" % (zoneNumber, self.utmLetterDesignator(lat)) + #Determine longitude origin + lonOrigin = (zoneNumber - 1) * 6 - 180 + 3 + #Convert to radians + latRad = deg2rad(lat) + lonRad = deg2rad(lon) + lonOriginRad = deg2rad(lonOrigin) + #Conversion constants + k0 = 0.9996 + eSquared = self.wgs84.e**2 + ePrimeSquared = eSquared/(1.-eSquared) + N = self.wgs84.a/sqrt(1.-eSquared*sin(latRad)**2) + T = tan(latRad)**2 + C = ePrimeSquared*cos(latRad)**2 + A = (lonRad - lonOriginRad)*cos(latRad) + M = self.wgs84.a*( \ + (1. - \ + eSquared/4. - \ + 3.*eSquared**2/64. - \ + 5.*eSquared**3/256)*latRad - \ + (3.*eSquared/8. + \ + 3.*eSquared**2/32. + \ + 45.*eSquared**3/1024.)*sin(2.*latRad) + \ + (15.*eSquared**2/256. + \ + 45.*eSquared**3/1024.)*sin(4.*latRad) - \ + (35.*eSquared**3/3072.)*sin(6.*latRad)) + M0 = 0. + #Calculate coordinates + x = k0*N*( \ + A+(1-T+C)*A**3/6. + \ + (5.-18.*T+T**2+72.*C-58.*ePrimeSquared)*A**5/120.) + 500000. + y = k0*( \ + M-M0+N*tan(latRad)*( \ + A**2/2. + \ + (5.-T+9.*C+4.*C**2)*A**4/24. + \ + (61.-58.*T+T**2+600.*C-330.*ePrimeSquared)*A**6/720.)) + #Calculate scale factor + k = k0*(1 + \ + (1+C)*A**2/2. + \ + (5.-4.*T+42.*C+13.*C**2-28.*ePrimeSquared)*A**4/24. + \ + (61.-148.*T+16.*T**2)*A**6/720.) + utm = [x, y, alt] + info = [zone, k] + return utm, info + + def utmLetterDesignator(self, lat): + """Returns the latitude zone of the UTM coordinates""" + if -80 <= lat < -72: return 'C' + elif -72 <= lat < -64: return 'D' + elif -64 <= lat < -56: return 'E' + elif -56 <= lat < -48: return 'F' + elif -48 <= lat < -40: return 'G' + elif -40 <= lat < -32: return 'H' + elif -32 <= lat < -24: return 'J' + elif -24 <= lat < -16: return 'K' + elif -16 <= lat < -8: return 'L' + elif -8 <= lat < 0: return 'M' + elif 0 <= lat < 8: return 'N' + elif 8 <= lat < 16: return 'P' + elif 16 <= lat < 24: return 'Q' + elif 24 <= lat < 32: return 'R' + elif 32 <= lat < 40: return 'S' + elif 40 <= lat < 48: return 'T' + elif 48 <= lat < 56: return 'U' + elif 56 <= lat < 64: return 'V' + elif 64 <= lat < 72: return 'W' + elif 72 <= lat < 80: return 'X' + else: return 'Z' + + """ Convert Euler psi, theta, phi to yaw pitch roll for given LLA geoCoord""" + """ yar, pitch, roll in degress will be returned """ + def eulers2local( self, eulers, geoCoords ) : + + """ Calculate the trig functions of the lat/long """ + sin_lat = sin( deg2rad(geoCoords[0]) ) + cos_lat = cos( deg2rad(geoCoords[0]) ) + sin_lon = sin( deg2rad(geoCoords[1]) ) + cos_lon = cos( deg2rad(geoCoords[1]) ) + + """ Calculate combined trig functions for lat/long """ + sin_sin = sin_lat * sin_lon + sin_cos = sin_lat * cos_lon + cos_sin = cos_lat * sin_lon + cos_cos = cos_lat * cos_lon + + """ Calculate the trig functions of the Euler angles """ + sinPsi = sin( eulers.psi ) + cosPsi = cos( eulers.psi ) + sinTheta = sin( eulers.theta ) + cosTheta = cos( eulers.theta ) + sinPhi = sin( eulers.phi ) + cosPhi = cos( eulers.phi ) + + """ Calculate local pitch """ + pitch = asin( cos_cos*cosTheta*cosPsi + cos_sin*cosTheta*sinPsi - sin_lat*sinTheta ) + + """Calculate local yaw""" + cosThetaCosPsi = cosTheta * cosPsi + cosThetaSinPsi = cosTheta * sinPsi + + B_sub_11 = - sin_lon*cosThetaCosPsi + cos_lon*cosThetaSinPsi + B_sub_12 = - sin_cos*cosThetaCosPsi - sin_sin*cosThetaSinPsi - cos_lat*sinTheta + + yaw = atan2( B_sub_11, B_sub_12 ) + + """Normalize yaw to 0 to 2pi""" + if( yaw < 0.0 ): + yaw = yaw + (2 * pi) + + """Calculate local roll""" + cosPhiSinPsi = cosPhi * sinPsi + cosPhiCosPsi = cosPhi * cosPsi + sinPhiSinPsi = sinPhi * sinPsi + sinPhiCosPsi = sinPhi * cosPsi + + B_sub_23 = -( cos_cos*(-cosPhiSinPsi + (sinTheta*sinPhiCosPsi) ) \ + + cos_sin*( cosPhiCosPsi + (sinTheta*sinPhiSinPsi) ) \ + + sin_lat*( sinPhi*cosTheta) ) + + B_sub_33 = -( cos_cos*( sinPhiSinPsi + (sinTheta*cosPhiCosPsi) ) \ + + cos_sin*(-sinPhiCosPsi + (sinTheta*cosPhiSinPsi) ) \ + + sin_lat*( cosPhi*cosTheta) ) + + roll = atan2( B_sub_23, B_sub_33 ) + + return rad2deg(yaw), rad2deg(pitch), rad2deg(roll) + + + +if __name__ == "__main__": + wgs84 = WGS84() + gps = GPS() + lla = (34. + 0/60. + 0.00174/3600., + -117. - 20./60. - 0.84965/3600., + 251.702) + print("lla: {}".format(lla)) + ecef = gps.lla2ecef(lla) + print("ecef: {}".format(ecef)) + print("lla: {}".format(gps.ecef2lla(ecef))) diff --git a/dis/utils/__init__.py b/dis/utils/__init__.py new file mode 100644 index 0000000..860745b --- /dev/null +++ b/dis/utils/__init__.py @@ -0,0 +1,2 @@ +# Marker for a python package directory +name = "utils" diff --git a/dis/variable_datum.py b/dis/variable_datum.py new file mode 100644 index 0000000..5715671 --- /dev/null +++ b/dis/variable_datum.py @@ -0,0 +1,106 @@ +from enum import Enum + +from .siso_ref_010.enums.variable_record_type import VariableRecordType + +class VariableDatum( object ): + """The variable datum type, the datum length, and the value for that variable datum type. Section 6.2.93""" + + def __init__(self): + """ Initializer for VariableDatum""" + # /** Type of variable datum to be transmitted. 32-bit enumeration defined in EBV uid 66 Variable Record Type values are defined by VariableRecordType enumerations */ + self.variableDatumID = VariableRecordType.default + + """ Length, IN BITS, of the variable datum.""" + self.variableDatumLength = 0 + """ This can be any number of bits long, depending on the datum.""" + self.variableDatumValue = [] + self.padding = [0] * 64 + + def to_string(self) ->str: + outputString = "" + outputString += "VariableRecordType : " + self.variableDatumID.get_description + "(" + (str(int(self.variableDatumID))) + ")" + "\n" + outputString += "VariableDatumLength : " + str(self.variableDatumLength) + "\n" + outputString += "VariableDatumValue : " + "\n" + for idx in range(0, len(self.variableDatumValue)): + outputString += str(self.variableDatumValue[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.variableDatumID,outputStream) + outputStream.write_int(int(self.variableDatumLength)) + for idx in range(0, 0): + outputStream.write_unsigned_byte( self.variableDatumValue[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.variableDatumID = VariableRecordType.get_enum(self.parse_enum(self.variableDatumID,inputStream)) + self.variableDatumLength = inputStream.read_int() + self.variableDatumValue = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_byte() + self.variableDatumValue[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/variable_parameter.py b/dis/variable_parameter.py new file mode 100644 index 0000000..58e6db8 --- /dev/null +++ b/dis/variable_parameter.py @@ -0,0 +1,100 @@ +from enum import Enum + +from .siso_ref_010.enums.variable_parameter_record_type import VariableParameterRecordType + +class VariableParameter( object ): + """used in DetonationPdu, ArticulatedPartsPdu among others""" + + def __init__(self): + """ Initializer for VariableParameter""" + # /** The identification of the Variable Parameter record. Enumeration from EBV uid 56 */ + self.recordType = VariableParameterRecordType.default + + """ 120 bits""" + self.recordSpecificFields = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + + def to_string(self) ->str: + outputString = "" + outputString += "VariableParameterRecordType : " + self.recordType.get_description + "(" + (str(int(self.recordType))) + ")" + "\n" + outputString += "RecordSpecificFields : " + "\n" + for idx in range(0, len(self.recordSpecificFields)): + outputString += str(self.recordSpecificFields[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.recordType,outputStream) + for idx in range(0, 15): + outputStream.write_unsigned_byte( self.recordSpecificFields[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordType = VariableParameterRecordType.get_enum(self.parse_enum(self.recordType,inputStream)) + self.recordSpecificFields = [0]*15 + for idx in range(0, 15): + val = inputStream.read_unsigned_byte() + self.recordSpecificFields[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/variable_transmitter_parameters.py b/dis/variable_transmitter_parameters.py new file mode 100644 index 0000000..38d6f26 --- /dev/null +++ b/dis/variable_transmitter_parameters.py @@ -0,0 +1,105 @@ +from enum import Enum + +from .siso_ref_010.enums.variable_record_type import VariableRecordType + +class VariableTransmitterParameters( object ): + """Relates to radios. Section 6.2.95""" + + def __init__(self): + """ Initializer for VariableTransmitterParameters""" + # /** Type of VTP uid 66 Variable Record Type values are defined by VariableRecordType enumerations */ + self.recordType = VariableRecordType.default + + """ Length, in bytes""" + self.recordLength = 0 + self.recordSpecificFields = [] + self.padding = [0] * 64 + + def to_string(self) ->str: + outputString = "" + outputString += "VariableRecordType : " + self.recordType.get_description + "(" + (str(int(self.recordType))) + ")" + "\n" + outputString += "RecordLength : " + str(self.recordLength) + "\n" + outputString += "RecordSpecificFields : " + "\n" + for idx in range(0, len(self.recordSpecificFields)): + outputString += str(self.recordSpecificFields[idx]) + + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + self.serialize_enum(self.recordType,outputStream) + outputStream.write_short(int(self.recordLength)) + for idx in range(0, 0): + outputStream.write_unsigned_byte( self.recordSpecificFields[ idx ] ); + + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.recordType = VariableRecordType.get_enum(self.parse_enum(self.recordType,inputStream)) + self.recordLength = inputStream.read_short() + self.recordSpecificFields = [0]*0 + for idx in range(0, 0): + val = inputStream.read_unsigned_byte() + self.recordSpecificFields[ idx ] = val + + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 4 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/vector2float.py b/dis/vector2float.py new file mode 100644 index 0000000..9554bfb --- /dev/null +++ b/dis/vector2float.py @@ -0,0 +1,89 @@ +from enum import Enum + + +class Vector2Float( object ): + """Two floating point values, x, y""" + + def __init__(self): + """ Initializer for Vector2Float""" + """ X value""" + self.x = 0.0 + """ y Value""" + self.y = 0.0 + + def to_string(self) ->str: + outputString = "" + outputString += "X : " + str(self.x) + "\n" + outputString += "Y : " + str(self.y) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_float(int(self.x)) + outputStream.write_float(int(self.y)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.x = inputStream.read_float() + self.y = inputStream.read_float() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/vector3double.py b/dis/vector3double.py new file mode 100644 index 0000000..3e2424c --- /dev/null +++ b/dis/vector3double.py @@ -0,0 +1,99 @@ +from enum import Enum + + +class Vector3Double( object ): + """Three double precision floating point values, x, y, and z. Used for world coordinates Section 6.2.97.""" + + def __init__(self): + """ Initializer for Vector3Double""" + """ X value""" + self.x = 0.0 + """ y Value""" + self.y = 0.0 + """ Z value""" + self.z = 0.0 + + def __init(self, x, y, z): + self.x = x + self.y = y + self.z = z + + def to_string(self) ->str: + outputString = "" + outputString += "X : " + str(self.x) + "\n" + outputString += "Y : " + str(self.y) + "\n" + outputString += "Z : " + str(self.z) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_double(int(self.x)) + outputStream.write_double(int(self.y)) + outputStream.write_double(int(self.z)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.x = inputStream.read_double() + self.y = inputStream.read_double() + self.z = inputStream.read_double() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/vector3float.py b/dis/vector3float.py new file mode 100644 index 0000000..ab5c041 --- /dev/null +++ b/dis/vector3float.py @@ -0,0 +1,94 @@ +from enum import Enum + + +class Vector3Float( object ): + """Three floating point values, x, y, and z. Section 6.2.95""" + + def __init__(self): + """ Initializer for Vector3Float""" + """ X value""" + self.x = 0.0 + """ y Value""" + self.y = 0.0 + """ Z value""" + self.z = 0.0 + + def to_string(self) ->str: + outputString = "" + outputString += "X : " + str(self.x) + "\n" + outputString += "Y : " + str(self.y) + "\n" + outputString += "Z : " + str(self.z) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_float(int(self.x)) + outputStream.write_float(int(self.y)) + outputStream.write_float(int(self.z)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.x = inputStream.read_float() + self.y = inputStream.read_float() + self.z = inputStream.read_float() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 3 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/vectoring_nozzle_system.py b/dis/vectoring_nozzle_system.py new file mode 100644 index 0000000..250322b --- /dev/null +++ b/dis/vectoring_nozzle_system.py @@ -0,0 +1,89 @@ +from enum import Enum + + +class VectoringNozzleSystem( object ): + """Operational data for describing the vectoring nozzle systems Section 6.2.96""" + + def __init__(self): + """ Initializer for VectoringNozzleSystem""" + """ In degrees""" + self.horizontalDeflectionAngle = 0.0 + """ In degrees""" + self.verticalDeflectionAngle = 0.0 + + def to_string(self) ->str: + outputString = "" + outputString += "HorizontalDeflectionAngle : " + str(self.horizontalDeflectionAngle) + "\n" + outputString += "VerticalDeflectionAngle : " + str(self.verticalDeflectionAngle) + "\n" + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + outputStream.write_float(int(self.horizontalDeflectionAngle)) + outputStream.write_float(int(self.verticalDeflectionAngle)) + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + self.horizontalDeflectionAngle = inputStream.read_float() + self.verticalDeflectionAngle = inputStream.read_float() + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 2 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + + diff --git a/dis/warfare_family_pdu.py b/dis/warfare_family_pdu.py new file mode 100644 index 0000000..e1e8f9e --- /dev/null +++ b/dis/warfare_family_pdu.py @@ -0,0 +1,88 @@ +from enum import Enum + +from .pdu_base import PduBase +from .siso_ref_010.enums.disprotocol_family import DISProtocolFamily + +class WarfareFamilyPdu( PduBase ): + """Abstract superclass for fire and detonation pdus that have shared information. Section 7.3""" + + def __init__(self): + """ Initializer for WarfareFamilyPdu""" + super().__init__() + self.protocolFamily = DISProtocolFamily.warfare + + def to_string(self) ->str: + outputString = "" + outputString += super().to_string() + return outputString + + def __str__(self): + return self.to_string() + + def serialize_enum(self, enumValue, outputStream): + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(outputStream, 'write_unsigned_' + marshallers[enumSize]) + result = marshalFunction(int(enumValue)) + + def parse_enum(self, enumValue, intputStream) -> int: + enumSize = enumValue.get_marshaled_size() + marshallers = {8 : 'byte', 16 : 'short', 32 : 'int'} + marshalFunction = getattr(intputStream, 'read_unsigned_' + marshallers[enumSize]) + return marshalFunction() + + def serialize(self, outputStream): + """serialize the class """ + super( WarfareFamilyPdu, self ).serialize(outputStream) + pass + + def parse(self, inputStream): + """"Parse a message. This may recursively call embedded objects.""" + super( WarfareFamilyPdu, self).parse(inputStream) + pass + + # Get the number of attributes defined by SISO + def get_design_attribute_count(self) -> int: + return 0 + + def get_attribute_count(self) -> int: + attrList = list() + for attr in dir(self): + if not callable(getattr(self, attr)): + if not attr.startswith("__"): + if not hasattr(self.__class__.__base__(), attr): + attrList.append(attr) + return len(attrList) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + else: + return False + + def __ne__(self, other): + return not self.__eq__(other) + + def diff(self,other) -> set: + diffs = set() + for key, value in self.__dict__.items(): + value2 = other.__dict__[key] + if (value != value2): + if type(value) is list: + diffs.add((key, str(value))) + diffs.add((key, str(value2))) + elif (type(value).__module__ == "builtins"): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, Enum)): + diffs.add((key, value)) + diffs.add((key, value2)) + elif (isinstance(value, object)): + diffs.update(value.diff(value2)) + else: + diffs.add((key, value)) + diffs.add((key, value2)) + return(diffs) + + +