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.WriteDouble((double)this._x); dos.WriteDouble((double)this._y); dos.WriteDouble((double)this._z); } 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._groupEntityID.Marshal(dos); dos.WriteUnsignedByte((byte)this._groupedEntityCategory); dos.WriteUnsignedByte((byte)this._groupedEntityDescriptions.Count); dos.WriteUnsignedInt((uint)this._pad2); dos.WriteDouble((double)this._latitude); dos.WriteDouble((double)this._longitude); for (int idx = 0; idx < this._groupedEntityDescriptions.Count; idx++) { VariableDatum aVariableDatum = (VariableDatum)this._groupedEntityDescriptions[idx]; aVariableDatum.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 { this._objectID.Marshal(dos); this._referencedObjectID.Marshal(dos); dos.WriteUnsignedShort((ushort)this._updateNumber); dos.WriteUnsignedByte((byte)this._forceID); dos.WriteUnsignedByte((byte)this._modifications); this._objectType.Marshal(dos); this._objectLocation.Marshal(dos); this._objectOrientation.Marshal(dos); dos.WriteDouble((double)this._objectAppearance); this._requesterID.Marshal(dos); this._receivingID.Marshal(dos); dos.WriteUnsignedInt((uint)this._pad2); } 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.WriteUnsignedByte((byte)this._parameterTypeDesignator); dos.WriteUnsignedByte((byte)this._changeIndicator); dos.WriteUnsignedShort((ushort)this._partAttachedTo); dos.WriteInt((int)this._parameterType); dos.WriteDouble((double)this._parameterValue); } 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.WriteDouble((double)this._x); dos.WriteDouble((double)this._y); dos.WriteDouble((double)this._z); } 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._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 virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteDouble((double)this._domainInitialXi); dos.WriteDouble((double)this._domainFinalXi); dos.WriteUnsignedShort((ushort)this._domainPointsXi); dos.WriteUnsignedByte((byte)this._interleafFactor); dos.WriteUnsignedByte((byte)this._axisType); dos.WriteUnsignedShort((ushort)this._numberOfPointsOnXiAxis); dos.WriteUnsignedShort((ushort)this._initialIndex); } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
public virtual void Write(double value) { if (disposed) { throw new ObjectDisposedException("BinaryWriter", "Cannot write to a closed BinaryWriter"); } var byteArrayOutputStream = new ByteArrayOutputStream(); var dataOutputStream = new DataOutputStream(byteArrayOutputStream); dataOutputStream.WriteDouble(value); byteArrayOutputStream.Flush(); WriteSwapped(byteArrayOutputStream.ToByteArray(), 8); byteArrayOutputStream.Close(); dataOutputStream.Close(); }
public virtual void Marshal(DataOutputStream dos) { if (dos != null) { try { dos.WriteUnsignedByte((byte)this._recordType); dos.WriteDouble((double)this._variableParameterFields1); dos.WriteUnsignedInt((uint)this._variableParameterFields2); dos.WriteUnsignedShort((ushort)this._variableParameterFields3); dos.WriteUnsignedByte((byte)this._variableParameterFields4); } 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.WriteUnsignedByte((byte)this._parameterTypeDesignator); dos.WriteUnsignedByte((byte)this._changeIndicator); dos.WriteUnsignedShort((ushort)this._partAttachedTo); dos.WriteInt((int)this._parameterType); dos.WriteDouble((double)this._parameterValue); } catch (Exception e) { #if DEBUG Trace.WriteLine(e); Trace.Flush(); #endif this.OnException(e); } } }
public virtual void Write(double value) { if (disposed) throw new ObjectDisposedException ("BinaryWriter", "Cannot write to a closed BinaryWriter"); var byteArrayOutputStream = new ByteArrayOutputStream(); var dataOutputStream = new DataOutputStream(byteArrayOutputStream); dataOutputStream.WriteDouble(value); byteArrayOutputStream.Flush(); WriteSwapped(byteArrayOutputStream.ToByteArray(), 8); byteArrayOutputStream.Close(); dataOutputStream.Close(); }
/* (non-Javadoc) * @see org.gogpsproject.Streamable#write(java.io.DataOutputStream) */ public int write(DataOutputStream dos) { int size = 5; dos.WriteUTF(Streamable.MESSAGE_EPHEMERIS); // 5 dos.WriteInt(STREAM_V); size += 4; // 4 dos.WriteLong(refTime == null?-1:refTime.getMsec()); size += 8; dos.Write(satID); size += 1; dos.WriteInt(week); size += 4; dos.WriteInt(L2Code); size += 4; dos.WriteInt(L2Flag); size += 4; dos.WriteInt(svAccur); size += 4; dos.WriteInt(svHealth); size += 4; dos.WriteInt(iode); size += 4; dos.WriteInt(iodc); size += 4; dos.WriteDouble(toc); size += 8; dos.WriteDouble(toe); size += 8; dos.WriteDouble(af0); size += 8; dos.WriteDouble(af1); size += 8; dos.WriteDouble(af2); size += 8; dos.WriteDouble(tgd); size += 8; dos.WriteDouble(rootA); size += 8; dos.WriteDouble(e); size += 8; dos.WriteDouble(i0); size += 8; dos.WriteDouble(iDot); size += 8; dos.WriteDouble(omega); size += 8; dos.WriteDouble(omega0); size += 8; dos.WriteDouble(omegaDot); size += 8; dos.WriteDouble(M0); size += 8; dos.WriteDouble(deltaN); size += 8; dos.WriteDouble(crc); size += 8; dos.WriteDouble(crs); size += 8; dos.WriteDouble(cuc); size += 8; dos.WriteDouble(cus); size += 8; dos.WriteDouble(cic); size += 8; dos.WriteDouble(cis); size += 8; dos.WriteDouble(fitInt); size += 8; return(size); }