public int write(DataOutputStream dos) { int size = 5; dos.WriteUTF(Streamable.MESSAGE_IONO); // 5 dos.WriteInt(STREAM_V); size += 4; dos.WriteLong(health); size += 8; dos.WriteDouble(utcA1); size += 8; dos.WriteDouble(utcA0); size += 8; dos.WriteLong(utcTOW); size += 8; dos.WriteInt(utcWNT); size += 4; dos.WriteInt(utcLS); size += 4; dos.WriteInt(utcWNF); size += 4; dos.WriteInt(utcDN); size += 4; dos.WriteInt(utcLSF); size += 4; for (int i = 0; i < alpha.Count(); i++) { dos.WriteFloat(alpha[i]); size += 4; } for (int i = 0; i < beta.Count(); i++) { dos.WriteFloat(beta[i]); size += 4; } dos.WriteBoolean(validHealth); size += 1; dos.WriteBoolean(validUTC); size += 1; dos.WriteBoolean(validKlobuchar); size += 1; dos.WriteLong(refTime == null ? -1 : refTime.getMsec()); size += 8; return(size); }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteUnsignedInt((uint)this._recordType); dos.WriteUnsignedShort((ushort)this._recordLength); dos.WriteUnsignedShort((ushort)this._padding); this._targetSpotLocation.Marshal(dos); this._targetSpotEntityLocation.Marshal(dos); this._targetSpotVelocity.Marshal(dos); this._targetSpotAcceleration.Marshal(dos); this._targetEntityID.Marshal(dos); dos.WriteUnsignedByte((byte)this._targetComponentID); dos.WriteUnsignedByte((byte)this._SpotShape); dos.WriteFloat((float)this._BeamSpotXSecSemiMajorAxis); dos.WriteFloat((float)this._BeamSpotCrossSectionSemiMinorAxis); dos.WriteFloat((float)this._BeamSpotCrossSectionOrientAngle); } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteFloat((float)this._psi); dos.WriteFloat((float)this._theta); dos.WriteFloat((float)this._phi); } catch (Exception e) { if (PduBase.TraceExceptions) { Trace.WriteLine(e); Trace.Flush(); } this.RaiseExceptionOccured(e); if (PduBase.ThrowExceptions) { throw e; } } } }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteFloat((float)this._frequency); dos.WriteFloat((float)this._frequencyRange); dos.WriteFloat((float)this._effectiveRadiatedPower); dos.WriteFloat((float)this._pulseRepetitionFrequency); dos.WriteFloat((float)this._pulseWidth); dos.WriteFloat((float)this._beamAzimuthCenter); dos.WriteFloat((float)this._beamAzimuthSweep); dos.WriteFloat((float)this._beamElevationCenter); dos.WriteFloat((float)this._beamElevationSweep); dos.WriteFloat((float)this._beamSweepSync); } catch (Exception e) { if (PduBase.TraceExceptions) { Trace.WriteLine(e); Trace.Flush(); } this.RaiseExceptionOccured(e); if (PduBase.ThrowExceptions) { throw e; } } } }
public override void Marshal(DataOutputStream dos) { base.Marshal(dos); if (dos != null) { try { dos.WriteFloat((float)this._fieldScale); dos.WriteFloat((float)this._fieldOffset); dos.WriteUnsignedShort((ushort)this._dataValues.Count); for (int idx = 0; idx < this._dataValues.Count; idx++) { TwoByteChunk aTwoByteChunk = (TwoByteChunk)this._dataValues[idx]; aTwoByteChunk.Marshal(dos); } } catch (Exception e) { if (PduBase.TraceExceptions) { Trace.WriteLine(e); Trace.Flush(); } this.RaiseExceptionOccured(e); if (PduBase.ThrowExceptions) { throw e; } } } }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteFloat((float)this._horizontalDeflectionAngle); dos.WriteFloat((float)this._verticalDeflectionAngle); } catch (Exception e) { if (PduBase.TraceExceptions) { Trace.WriteLine(e); Trace.Flush(); } this.RaiseExceptionOccured(e); if (PduBase.ThrowExceptions) { throw e; } } } }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { this._beamDirection.Marshal(dos); dos.WriteFloat((float)this._azimuthBeamwidth); dos.WriteFloat((float)this._referenceSystem); dos.WriteShort((short)this._padding1); dos.WriteByte((byte)this._padding2); dos.WriteFloat((float)this._ez); dos.WriteFloat((float)this._ex); dos.WriteFloat((float)this._phase); } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
public override void Marshal(DataOutputStream dos) { base.Marshal(dos); if (dos != null) { try { this._designatingEntityID.Marshal(dos); dos.WriteUnsignedShort((ushort)this._codeName); this._designatedEntityID.Marshal(dos); dos.WriteUnsignedShort((ushort)this._designatorCode); dos.WriteFloat((float)this._designatorPower); dos.WriteFloat((float)this._designatorWavelength); this._designatorSpotWrtDesignated.Marshal(dos); this._designatorSpotLocation.Marshal(dos); dos.WriteByte((byte)this._deadReckoningAlgorithm); dos.WriteUnsignedShort((ushort)this._padding1); dos.WriteByte((byte)this._padding2); this._entityLinearAcceleration.Marshal(dos); } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteUnsignedInt((uint)this._recordType); dos.WriteUnsignedShort((ushort)this._recordLength); dos.WriteUnsignedShort((ushort)this._padding); this._damageLocation.Marshal(dos); dos.WriteFloat((float)this._damageDiameter); dos.WriteFloat((float)this._temperature); dos.WriteUnsignedByte((byte)this._componentIdentification); dos.WriteUnsignedByte((byte)this._componentDamageStatus); dos.WriteUnsignedByte((byte)this._componentVisualDamageStatus); dos.WriteUnsignedByte((byte)this._componentVisualSmokeColor); this._fireEventID.Marshal(dos); dos.WriteUnsignedShort((ushort)this._padding2); } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteFloat((float)this._erp); dos.WriteFloat((float)this._frequency); dos.WriteFloat((float)this._pgrf); dos.WriteFloat((float)this._pulseWidth); dos.WriteUnsignedInt((uint)this._burstLength); dos.WriteUnsignedByte((byte)this._applicableModes); for (int idx = 0; idx < this._systemSpecificData.Length; idx++) { dos.WriteUnsignedByte(this._systemSpecificData[idx]); } } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteFloat((float)this._beamAzimuthCenter); dos.WriteFloat((float)this._beamAzimuthSweep); dos.WriteFloat((float)this._beamElevationCenter); dos.WriteFloat((float)this._beamElevationSweep); dos.WriteFloat((float)this._beamSweepSync); } catch (Exception e) { if (PduBase.TraceExceptions) { Trace.WriteLine(e); Trace.Flush(); } this.RaiseExceptionOccured(e); if (PduBase.ThrowExceptions) { throw e; } } } }
public override void Marshal(DataOutputStream dos) { base.Marshal(dos); if (dos != null) { try { dos.WriteFloat((float)this._fieldScale); dos.WriteFloat((float)this._fieldOffset); dos.WriteUnsignedShort((ushort)this._dataValues.Count); for (int idx = 0; idx < this._dataValues.Count; idx++) { TwoByteChunk aTwoByteChunk = (TwoByteChunk)this._dataValues[idx]; aTwoByteChunk.Marshal(dos); } } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteUnsignedInt((uint)this._recordType); dos.WriteUnsignedShort((ushort)this._recordLength); dos.WriteUnsignedByte((byte)this._emitterNumber); dos.WriteUnsignedByte((byte)this._beamNumber); dos.WriteUnsignedByte((byte)this._stateIndicator); dos.WriteFloat((float)this._leftAzimuth); dos.WriteFloat((float)this._rightAzimuth); dos.WriteFloat((float)this._lowerElevation); dos.WriteFloat((float)this._upperElevation); dos.WriteFloat((float)this._residualPower); } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteFloat((float)this._erp); dos.WriteFloat((float)this._frequency); dos.WriteFloat((float)this._pgrf); dos.WriteFloat((float)this._pulseWidth); dos.WriteUnsignedInt((uint)this._burstLength); dos.WriteUnsignedByte((byte)this._applicableModes); dos.WriteUnsignedShort((ushort)this._pad2); dos.WriteUnsignedByte((byte)this._pad3); } catch (Exception e) { if (PduBase.TraceExceptions) { Trace.WriteLine(e); Trace.Flush(); } this.RaiseExceptionOccured(e); if (PduBase.ThrowExceptions) { throw e; } } } }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteFloat((float)this._erp); dos.WriteFloat((float)this._frequency); dos.WriteFloat((float)this._pgrf); dos.WriteFloat((float)this._pulseWidth); dos.WriteUnsignedInt((uint)this._burstLength); dos.WriteUnsignedByte((byte)this._applicableModes); dos.WriteUnsignedShort((ushort)this._pad2); dos.WriteUnsignedByte((byte)this._pad3); } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteFloat((float)this._frequency); dos.WriteFloat((float)this._frequencyRange); dos.WriteFloat((float)this._effectiveRadiatedPower); dos.WriteFloat((float)this._pulseRepetitionFrequency); dos.WriteFloat((float)this._pulseWidth); dos.WriteFloat((float)this._beamAzimuthCenter); dos.WriteFloat((float)this._beamAzimuthSweep); dos.WriteFloat((float)this._beamElevationCenter); dos.WriteFloat((float)this._beamElevationSweep); dos.WriteFloat((float)this._beamSweepSync); } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { this._beamDirection.Marshal(dos); dos.WriteFloat((float)this._azimuthBeamwidth); dos.WriteFloat((float)this._referenceSystem); dos.WriteShort((short)this._padding1); dos.WriteByte((byte)this._padding2); dos.WriteFloat((float)this._ez); dos.WriteFloat((float)this._ex); dos.WriteFloat((float)this._phase); } catch (Exception e) { if (PduBase.TraceExceptions) { Trace.WriteLine(e); Trace.Flush(); } this.RaiseExceptionOccured(e); if (PduBase.ThrowExceptions) { throw e; } } } }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteUnsignedShort((ushort)this._activeEmissionParameterIndex); dos.WriteUnsignedShort((ushort)this._scanPattern); dos.WriteFloat((float)this._beamCenterAzimuth); dos.WriteFloat((float)this._azimuthalBeamwidth); dos.WriteFloat((float)this._beamCenterDE); dos.WriteFloat((float)this._deBeamwidth); } catch (Exception e) { if (PduBase.TraceExceptions) { Trace.WriteLine(e); Trace.Flush(); } this.RaiseExceptionOccured(e); if (PduBase.ThrowExceptions) { throw e; } } } }
public override void Marshal(DataOutputStream dos) { base.Marshal(dos); if (dos != null) { try { this._radioEntityType.Marshal(dos); dos.WriteUnsignedByte((byte)this._transmitState); dos.WriteUnsignedByte((byte)this._inputSource); dos.WriteUnsignedShort((ushort)this._padding1); this._antennaLocation.Marshal(dos); this._relativeAntennaLocation.Marshal(dos); dos.WriteUnsignedShort((ushort)this._antennaPatternType); dos.WriteUnsignedShort((ushort)this._antennaPatternList.Count); dos.WriteDouble((double)this._frequency); dos.WriteFloat((float)this._transmitFrequencyBandwidth); dos.WriteFloat((float)this._power); this._modulationType.Marshal(dos); dos.WriteUnsignedShort((ushort)this._cryptoSystem); dos.WriteUnsignedShort((ushort)this._cryptoKeyId); dos.WriteUnsignedByte((byte)this._modulationParametersList.Count); dos.WriteUnsignedShort((ushort)this._padding2); dos.WriteUnsignedByte((byte)this._padding3); for (int idx = 0; idx < this._modulationParametersList.Count; idx++) { Vector3Float aVector3Float = (Vector3Float)this._modulationParametersList[idx]; aVector3Float.Marshal(dos); } for (int idx = 0; idx < this._antennaPatternList.Count; idx++) { Vector3Float aVector3Float = (Vector3Float)this._antennaPatternList[idx]; aVector3Float.Marshal(dos); } } catch (Exception e) { if (PduBase.TraceExceptions) { Trace.WriteLine(e); Trace.Flush(); } this.RaiseExceptionOccured(e); if (PduBase.ThrowExceptions) { throw e; } } } }
public override void Marshal(DataOutputStream dos) { base.Marshal(dos); if (dos != null) { try { this._issuingEntityID.Marshal(dos); this._collidingEntityID.Marshal(dos); this._collisionEventID.Marshal(dos); dos.WriteShort((short)this._pad); this._contactVelocity.Marshal(dos); dos.WriteFloat((float)this._mass); this._locationOfImpact.Marshal(dos); dos.WriteFloat((float)this._collisionIntermediateResultXX); dos.WriteFloat((float)this._collisionIntermediateResultXY); dos.WriteFloat((float)this._collisionIntermediateResultXZ); dos.WriteFloat((float)this._collisionIntermediateResultYY); dos.WriteFloat((float)this._collisionIntermediateResultYZ); dos.WriteFloat((float)this._collisionIntermediateResultZZ); this._unitSurfaceNormal.Marshal(dos); dos.WriteFloat((float)this._coefficientOfRestitution); } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteUnsignedInt((uint)this._recordType); dos.WriteUnsignedShort((ushort)this._recordLength); dos.WriteUnsignedShort((ushort)this._padding); dos.WriteUnsignedByte((byte)this._emitterNumber); dos.WriteUnsignedByte((byte)this._beamNumber); dos.WriteUnsignedByte((byte)this._stateIndicator); dos.WriteUnsignedInt((uint)this._padding2); dos.WriteFloat((float)this._azimuthOffset); dos.WriteFloat((float)this._azimuthWidth); dos.WriteFloat((float)this._azimuthPullRate); dos.WriteFloat((float)this._azimuthPullAcceleration); dos.WriteFloat((float)this._elevationOffset); dos.WriteFloat((float)this._elevationWidth); dos.WriteFloat((float)this._elevationPullRate); dos.WriteFloat((float)this._elevationPullAcceleration); dos.WriteUnsignedInt((uint)this._padding3); } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
public override void Marshal(DataOutputStream dos) { base.Marshal(dos); if (dos != null) { try { this._munitionID.Marshal(dos); this._eventID.Marshal(dos); dos.WriteInt((int)this._fireMissionIndex); this._locationInWorldCoordinates.Marshal(dos); this._burstDescriptor.Marshal(dos); this._velocity.Marshal(dos); dos.WriteFloat((float)this._range); } catch (Exception e) { if (PduBase.TraceExceptions) { Trace.WriteLine(e); Trace.Flush(); } this.RaiseExceptionOccured(e); if (PduBase.ThrowExceptions) { throw e; } } } }
public override void Marshal(DataOutputStream dos) { base.Marshal(dos); if (dos != null) { try { this._munitionExpendibleID.Marshal(dos); this._eventID.Marshal(dos); dos.WriteUnsignedInt((uint)this._fireMissionIndex); this._locationInWorldCoordinates.Marshal(dos); this._descriptor.Marshal(dos); this._velocity.Marshal(dos); dos.WriteFloat((float)this._range); } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteShort((short)this._currentShaftRPMs); dos.WriteShort((short)this._orderedShaftRPMs); dos.WriteFloat((float)this._shaftRPMRateOfChange); } catch (Exception e) { if (PduBase.TraceExceptions) { Trace.WriteLine(e); Trace.Flush(); } this.RaiseExceptionOccured(e); if (PduBase.ThrowExceptions) { throw e; } } } }
public override void Marshal(DataOutputStream dos) { base.Marshal(dos); if (dos != null) { try { this._issuingEntityID.Marshal(dos); this._collidingEntityID.Marshal(dos); this._eventID.Marshal(dos); dos.WriteUnsignedByte((byte)this._collisionType); dos.WriteByte((byte)this._pad); this._velocity.Marshal(dos); dos.WriteFloat((float)this._mass); this._location.Marshal(dos); } catch (Exception e) { if (PduBase.TraceExceptions) { Trace.WriteLine(e); Trace.Flush(); } this.RaiseExceptionOccured(e); if (PduBase.ThrowExceptions) { throw e; } } } }
public override void Marshal(DataOutputStream dos) { base.Marshal(dos); if (dos != null) { try { this._issuingEntityID.Marshal(dos); this._collidingEntityID.Marshal(dos); this._eventID.Marshal(dos); dos.WriteUnsignedByte((byte)this._collisionType); dos.WriteByte((byte)this._pad); this._velocity.Marshal(dos); dos.WriteFloat((float)this._mass); this._location.Marshal(dos); } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
public override void Marshal(DataOutputStream dos) { base.Marshal(dos); if (dos != null) { try { dos.WriteUnsignedShort((ushort)this._receiverState); dos.WriteUnsignedShort((ushort)this._padding1); dos.WriteFloat((float)this._receivedPoser); this._transmitterEntityId.Marshal(dos); dos.WriteUnsignedShort((ushort)this._transmitterRadioId); } catch (Exception e) { if (PduBase.TraceExceptions) { Trace.WriteLine(e); Trace.Flush(); } this.RaiseExceptionOccured(e); if (PduBase.ThrowExceptions) { throw e; } } } }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteFloat((float)this._horizontalDeflectionAngle); dos.WriteFloat((float)this._verticalDeflectionAngle); } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteFloat((float)this._powerSetting); dos.WriteFloat((float)this._engineRpm); } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteUnsignedInt((uint)this._recordType); dos.WriteUnsignedShort((ushort)this._recordLength); dos.WriteUnsignedShort((ushort)this._padding); dos.WriteUnsignedByte((byte)this._emitterNumber); dos.WriteUnsignedByte((byte)this._beamNumber); dos.WriteUnsignedByte((byte)this._stateIndicator); dos.WriteUnsignedByte((byte)this._padding2); dos.WriteFloat((float)this._falseTargetCount); dos.WriteFloat((float)this._walkSpeed); dos.WriteFloat((float)this._walkAcceleration); dos.WriteFloat((float)this._maximumWalkDistance); dos.WriteFloat((float)this._keepTime); dos.WriteFloat((float)this._echoSpacing); dos.WriteUnsignedInt((uint)this._padding3); } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
public virtual void Write(float value) { if (disposed) throw new ObjectDisposedException ("BinaryWriter", "Cannot write to a closed BinaryWriter"); var byteArrayOutputStream = new ByteArrayOutputStream(); var dataOutputStream = new DataOutputStream(byteArrayOutputStream); dataOutputStream.WriteFloat(value); byteArrayOutputStream.Flush(); WriteSwapped(byteArrayOutputStream.ToByteArray(), 4); byteArrayOutputStream.Close(); dataOutputStream.Close(); }