http://www.web3d.org/x3d/content/examples/Basic/DistributedInteractiveSimulation/ - sample scenes https://savage.nps.edu/Savage/#Scenarios - some scenarios have Espdu etc http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/dis.html http://www.web3d.org/x3d/content/examples/Basic/#DistributedInteractiveSimulation http://www.web3d.org/x3d/content/examples/Basic/DistributedInteractiveSimulation/index.html - has a brief explantion for each test scene https://x3dgraphics.com/slidesets/X3dForAdvancedModeling/DistributedInteractiveSimulation.pdf - X3D + DIS https://github.com/open-dis https://www.sisostds.org/DigitalLibrary.aspx?EntryId=29288 - the 2009 word doc Q. is the DIS communication stream supposed to be small-endian or big-endian? A. big endian. the open-dis cpp examples have a datastream (with .endian field) that over-rides << and >> per data-type, and does a Flip (endian swap) if needed http://movesinstitute.org/~mcgredo/MV3500/hla/1278.1-200X%20Draft%2016%20rev%2018.pdf - draft of 1278-1 http://movesinstitute.org/~mcgredo/MV3500/hla/ - the enum99_2.pdf shows bitfields and enums for DIS fields http://open-dis.sourceforge.net/DIS.html - plain&simple link broken, but found it sifting through SISO site DIS VERSIONS (the first byte in pdu header / struct pdu / struct pdusuperclass is protocolVersion) DIS 6 (1998) - what x3d-edit > X3D > DIS > test emits, basics we should be able to do DIS 7 (2009-2012) - supposedly somewhat backward compatible, but with more details - and uses different struct names for the same things - and more enums x didn't find a complete/perfect DIS2012.xml (or DIS2009.xml) for xmlpg C++ namespsaces - you could build with both 6 & 7 and switch on protocolVersion to process C (no namespaces) - would need to preface struct, FIELD, CLASS with dis number: dis6_type_, struct dis6_, FIELD_dis6_ , dis6_unmarshal() etc to avoid name clashes for freewrl 2017/v4.1, we will ignore protocolVersion and process all incoming as 6, and send only 6 Note: some of the open-dis library code appears to be wrong about long ints for C++. - long int java is 64 bits - long int c/c++ is 32 bits - to get 64 you need long long. RTP header if first byte of incoming is > 127 then it has an RTP header. Strip it to get to the PDU. https://en.wikipedia.org/wiki/Real-time_Transport_Protocol https://calhoun.nps.edu/bitstream/handle/10945/9147/virtualrealitytr00afon.pdf appendix F, G show DIS header settings and source code rtp_version = 2 (default) marker = 0 csrc_count = 0 padding = 0 extension_bit = 0 (no extension header used) payloadType = 111 IP addresses and multi-casting routers and NICs are aware of reserved ranges for multicasting http://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml https://www.cisco.com/c/en/us/td/docs/ios/solutions_docs/ip_multicast/White_papers/mcst_ovr.html Senarios: A. if multicasting globally (across internet) you would use: 224.252.0.0 - 224.255.255.255 DIS transient groups [224.252 - 224.255] === [224.252 - 224.255] (global DIS transient groups) B. if multicasting inside your organization / autonomous system / local domain: 239.0.0.0/8 (239.0.0.0 - 239.255.255.255) Limited Scope addresses 239s === 239s (limited scope multicasting, router won't IGMP to outside world) C. An optional tunneling utility coud in theory work like this: / RP \ (optional pre-arranged rendezvous point for tunnel discovery) 239s == tunnel ---- tunnel == 239s (limited scope addresses, tunneling over unicast) D. if breaking the above ranges and wanting to stay local anyway, then ensure your software sets a TTL (Time to live) on the socket of 1 or 2 so it doesn't get pushed up out of your local netwrok E. A gateway may interface to other simulation systems DIS 239 == gateway -- HL7 Radio: TransmitterPdu, ReceiverPdu, SignalPdu T,R,S https://calhoun.nps.edu/handle/10945/42175 - Radio vrml dis, by Laflam (downloaded) Confusing - what's the purpose and how do these nodes work together? Hypotheses: H: pdu's are about syncing representations. Not sending or receiving radio or text messages between participants. so each scene would have both ends of a radio system, and hear/see both sender and receiver signal messages depending where their avatar is in the scene relative to radios and messages H: T and R send meta-data, to see if R can receive, and if so the on and receiving state is high on R intended to represent a brand/style of radio H: S doesn't need T or R, and can send/recv real message, but un-encoded/unmodulated, it ignors T and R. intended to represent a message type/encoding that can be sent over various radio types Management nodes https://calhoun.nps.edu/bitstream/handle/10945/46000/Brutzman_X3D_Distributed_2015.pdf?sequence=1 - Brutzman X3D+DIS https://www.sisostds.org/DigitalLibrary.aspx?Command=Core_Download&EntryId=45387 https://github.com/mcgredonps/x3dom - x3dom managment nodes (via websocket), by McGregor Re-ordering of espdu by abstract-inheritance-parent, for easier 'digestion' EspduTransform : X3DGroupingNode, X3DSensorNode { # basic SFVec3f [] bboxCenter 0 0 0 (-∞,∞) SFVec3f [] bboxSize -1 -1 -1 [0,∞) or −1 −1 −1 SFNode [in,out] metadata NULL [X3DMetadataObject] # Group MFNode [in] addChildren MFNode [in] removeChildren MFNode [in,out] children [] # Transform SFVec3f [in,out] center 0 0 0 (-∞,∞) SFRotation [in,out] rotation 0 0 1 0 (-∞,∞)|[-1,1] SFVec3f [in,out] scale 1 1 1 (-∞,∞) SFRotation [in,out] scaleOrientation 0 0 1 0 (-∞,∞)|[-1,1] SFVec3f [in,out] translation 0 0 0 (-∞,∞) # network sensor SFBool [in,out] enabled TRUE SFBool [out] isActive FALSE SFTime [out] timestamp 0 [0,∞) SFString [in,out] address "localhost" SFInt32 [in,out] port 0 [0,65535] SFString [in,out] multicastRelayHost "" SFInt32 [in,out] multicastRelayPort 0 SFString [in,out] networkMode "standAlone" ["standAlone"| "networkReader"| "networkWriter"] SFBool [out] isNetworkReader FALSE SFBool [out] isNetworkWriter FALSE SFBool [out] isStandAlone FALSE SFTime [in,out] readInterval 0.1 [0,∞) SFTime [in,out] writeInterval 1.0 [0,∞) SFBool [] rtpHeaderExpected FALSE SFBool [out] isRtpHeaderHeard FALSE # DIS Entity SFInt32 [in,out] entityID 0 [0,65535] SFInt32 [in,out] applicationID 1 [0,65535] SFInt32 [in,out] siteID 0 [0,65535] # Geo MFString [] geoSystem ["GD","WE"] [see 25.2.3] SFVec3d [in,out] geoCoords 0 0 0 (-∞,∞) # Info SFInt32 [in,out] entityCategory 0 [0,255] SFInt32 [in,out] entityCountry 0 [0,65535] SFInt32 [in,out] entityDomain 0 [0,255] SFInt32 [in,out] entityExtra 0 [0,255] SFInt32 [in,out] entityKind 0 [0,255] SFInt32 [in,out] entitySpecific 0 [0,255] SFInt32 [in,out] entitySubCategory 0 [0,255] # team SFInt32 [in,out] forceID 0 [0,255] SFString [in,out] marking "" # DIS EntityState > deadReckoning SFInt32 [in,out] deadReckoning 0 [0,255] SFVec3f [in,out] linearVelocity 0 0 0 (-∞,∞) SFVec3f [in,out] linearAcceleration 0 0 0 (-∞,∞) # DIS EntityState > articulationParameters SFFloat [in] set_articulationParameterValue0 (-∞,∞) SFFloat [in] set_articulationParameterValue1 (-∞,∞) SFFloat [in] set_articulationParameterValue2 (-∞,∞) SFFloat [in] set_articulationParameterValue3 (-∞,∞) SFFloat [in] set_articulationParameterValue4 (-∞,∞) SFFloat [in] set_articulationParameterValue5 (-∞,∞) SFFloat [in] set_articulationParameterValue6 (-∞,∞) SFFloat [in] set_articulationParameterValue7 (-∞,∞) SFInt32 [in,out] articulationParameterCount 0 [0,78] MFInt32 [in,out] articulationParameterDesignatorArray [] [0,255] MFInt32 [in,out] articulationParameterChangeIndicatorArray [] [0,255] MFInt32 [in,out] articulationParameterIdPartAttachedToArray [] [0,65535] MFInt32 [in,out] articulationParameterTypeArray [] MFFloat [in,out] articulationParameterArray [] (-∞,∞) SFFloat [out] articulationParameterValue0_changed 0.0 (-∞,∞) SFFloat [out] articulationParameterValue1_changed 0.0 (-∞,∞) SFFloat [out] articulationParameterValue2_changed 0.0 (-∞,∞) SFFloat [out] articulationParameterValue3_changed 0.0 (-∞,∞) SFFloat [out] articulationParameterValue4_changed 0.0 (-∞,∞) SFFloat [out] articulationParameterValue5_changed 0.0 (-∞,∞) SFFloat [out] articulationParameterValue6_changed 0.0 (-∞,∞) SFFloat [out] articulationParameterValue7_changed 0.0 (-∞,∞) # DIS collision SFInt32 [in,out] collisionType 0 [0,255] SFTime [out] collideTime 0 [0,∞) SFBool [out] isCollided FALSE # DIS shared fire/collision SFInt32 [in,out] eventEntityID 0 [0,65535] SFInt32 [in,out] eventApplicationID 1 [0,65535] SFInt32 [in,out] eventSiteID 0 [0,65535] SFInt32 [in,out] eventNumber 0 [0,65355] # DIS fire (as in 'fire weapon') SFBool [in,out] fired1 FALSE SFBool [in,out] fired2 FALSE SFInt32 [in,out] fireMissionIndex 0 [0,65535] SFFloat [in,out] firingRange 0.0 (0,∞) SFTime [out] firedTime 0 [0,∞) # DIS detonation SFVec3f [in,out] detonationLocation 0 0 0 (-∞,∞) SFVec3f [in,out] detonationRelativeLocation 0 0 0 (-∞,∞) SFInt32 [in,out] detonationResult 0 [0,255] SFTime [out] detonateTime 0 [0,∞) SFBool [out] isDetonated FALSE # DIS shared fire/detonation SFInt32 [in,out] munitionEntityID 0 [0,65535] SFInt32 [in,out] munitionApplicationID 1 [0,65535] SFInt32 [in,out] munitionSiteID 0 [0,65535] SFVec3f [in,out] munitionStartPoint 0 0 0 (-∞,∞) SFVec3f [in,out] munitionEndPoint 0 0 0 (-∞,∞) # > 'burst descriptor information' SFInt32 [in,out] munitionQuantity 0 [0,65535] SFInt32 [in,out] firingRate 0 [0,65535] SFInt32 [in,out] fuse 0 [0,65535] SFInt32 [in,out] warhead 0 [0,65535] } ReceiverPdu : X3DNetworkSensorNode, X3DBoundedObject { # basic SFVec3f [] bboxCenter 0 0 0 (-∞,∞) SFVec3f [] bboxSize -1 -1 -1 [0,∞) [0,∞) [0,∞) or −1 −1 −1 SFNode [in,out] metadata NULL [X3DMetadataObject] # network sensor SFBool [in,out] enabled TRUE SFBool [out] isActive FALSE SFTime [out] timestamp 0 [0,∞) SFString [in,out] address "localhost" SFInt32 [in,out] port 0 [0,65535] SFString [in,out] multicastRelayHost "" SFInt32 [in,out] multicastRelayPort 0 SFString [in,out] networkMode "standAlone" ["standAlone"| "networkReader"| "networkWriter"] SFBool [out] isNetworkReader FALSE SFBool [out] isNetworkWriter FALSE SFBool [out] isStandAlone FALSE SFTime [in,out] readInterval 0.1 [0,∞) SFTime [in,out] writeInterval 1.0 [0,∞) SFBool [] rtpHeaderExpected FALSE SFBool [out] isRtpHeaderHeard FALSE # DIS Entity SFInt32 [in,out] entityID 0 [0,65535] SFInt32 [in,out] applicationID 1 [0,65535] SFInt32 [in,out] siteID 0 [0,65535] # Geo MFString [] geoSystem ["GD","WE"] [see 25.2.3] SFVec3d [in,out] geoCoords 0 0 0 (-∞,∞) # DIS Receiver SFInt32 [in,out] radioID 0 [0,65535] SFInt32 [in,out] whichGeometry 1 [-1,∞) SFInt32 [in,out] receiverState 0 [0,65535] SFFloat [in,out] receivedPower 0.0 [0,∞) SFInt32 [in,out] transmitterEntityID 0 [0,65535] SFInt32 [in,out] transmitterApplicationID 1 [0,65535] SFInt32 [in,out] transmitterSiteID 0 [0,65535] SFInt32 [in,out] transmitterRadioID 0 [0,65535] } SignalPdu : X3DNetworkSensorNode, X3DBoundedObject { # basic SFVec3f [] bboxCenter 0 0 0 (-∞,∞) SFVec3f [] bboxSize -1 -1 -1 [0,∞) or −1 −1 −1 SFNode [in,out] metadata NULL [X3DMetadataObject] # network sensor SFBool [in,out] enabled TRUE SFBool [out] isActive FALSE SFTime [out] timestamp 0 [0,∞) SFString [in,out] address "localhost" SFInt32 [in,out] port 0 [0,65535] SFString [in,out] multicastRelayHost "" SFInt32 [in,out] multicastRelayPort 0 SFString [in,out] networkMode "standAlone" ["standAlone"| "networkReader"| "networkWriter"] SFBool [out] isNetworkReader FALSE SFBool [out] isNetworkWriter FALSE SFBool [out] isStandAlone FALSE SFTime [in,out] readInterval 0.1 [0,∞) SFTime [in,out] writeInterval 1.0 [0,∞) SFBool [] rtpHeaderExpected FALSE SFBool [out] isRtpHeaderHeard FALSE # DIS Entity SFInt32 [in,out] entityID 0 [0,65535] SFInt32 [in,out] applicationID 1 [0,65535] SFInt32 [in,out] siteID 0 [0,65535] # Geo MFString [] geoSystem ["GD","WE"] [see 25.2.3] SFVec3d [in,out] geoCoords 0 0 0 (-∞,∞) # DIS SignalPdu SFInt32 [in,out] radioID 0 [0,65535] SFInt32 [in,out] whichGeometry 1 [-1,∞) MFInt32 [in,out] data [] [0,255] SFInt32 [in,out] dataLength 0 [0,65535] SFInt32 [in,out] encodingScheme 0 [0,65535] SFInt32 [in,out] sampleRate 0 [0,65535] SFInt32 [in,out] samples 0 [0,65535] SFInt32 [in,out] tdlType 0 [0,65535] } TransmitterPdu : X3DNetworkSensorNode, X3DBoundedObject { # basic SFVec3f [] bboxCenter 0 0 0 (-∞,∞) SFVec3f [] bboxSize -1 -1 -1 [0,∞) [0,∞) [0,∞) or −1 −1 −1 SFNode [in,out] metadata NULL [X3DMetadataObject] # network sensor SFBool [in,out] enabled TRUE SFBool [out] isActive FALSE SFTime [out] timestamp 0 [0,∞) SFString [in,out] address "localhost" SFInt32 [in,out] port 0 [0,65535] SFString [in,out] multicastRelayHost "" SFInt32 [in,out] multicastRelayPort 0 SFString [in,out] networkMode "standAlone" ["standAlone"| "networkReader"| "networkWriter"] SFBool [out] isNetworkReader FALSE SFBool [out] isNetworkWriter FALSE SFBool [out] isStandAlone FALSE SFTime [in,out] readInterval 0.1 [0,∞) SFTime [in,out] writeInterval 1.0 [0,∞) SFBool [] rtpHeaderExpected FALSE SFBool [out] isRtpHeaderHeard FALSE # DIS Entity SFInt32 [in,out] entityID 0 [0,65535] SFInt32 [in,out] applicationID 1 [0,65535] SFInt32 [in,out] siteID 0 [0,65535] # Geo MFString [] geoSystem ["GD","WE"] [see 25.2.3] SFVec3d [in,out] geoCoords 0 0 0 (-∞,∞) # DIS Transmitter SFInt32 [in,out] radioID 0 [0,255] SFInt32 [in,out] whichGeometry 1 [-1,∞) SFInt32 [in,out] radioEntityTypeCategory 0 [0,255] SFInt32 [in,out] radioEntityTypeCountry 0 [0,65535] SFInt32 [in,out] radioEntityTypeDomain 0 [0,255] SFInt32 [in,out] radioEntityTypeKind 0 [0,255] SFInt32 [in,out] radioEntityTypeNomenclature 0 [0,255] SFInt32 [in,out] radioEntityTypeNomenclatureVersion 0 [0,65535] SFVec3f [in,out] antennaLocation 0 0 0 (-∞,∞) SFInt32 [in,out] antennaPatternLength 0 [0,65535] SFInt32 [in,out] antennaPatternType 0 [0,65535] SFVec3f [in,out] relativeAntennaLocation 0 0 0 (-∞,∞) SFInt32 [in,out] inputSource 0 [0,255] SFInt32 [in,out] transmitState 0 [0,255] SFFloat [in,out] power 0.0 [0,∞) SFInt32 [in,out] frequency 0 SFFloat [in,out] transmitFrequencyBandwidth 0.0 (-∞,∞) SFInt32 [in,out] lengthOfModulationParameters 0 [0,255] SFInt32 [in,out] modulationTypeDetail 0 [0,65535] SFInt32 [in,out] modulationTypeMajor 0 [0,65535] SFInt32 [in,out] modulationTypeSpreadSpectrum 0 [0,65535] SFInt32 [in,out] modulationTypeSystem 0 [0,65535] SFInt32 [in,out] cryptoSystem 0 [0,65535] SFInt32 [in,out] cryptoKeyID 0 [0,65535] }