///<summary>
///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
///</summary>
        public void marshal(DataOutputStream dos)
        {
            try
            {
                dos.writeByte((byte)_parameterTypeDesignator);
                dos.writeByte((byte)_changeIndicator);
                dos.writeUshort((ushort)_partAttachedTo);
                dos.writeUint((uint)_parameterType);
                dos.writeDouble((double)_parameterValue);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
Example #2
0
///<summary>
///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
///</summary>
        new public void marshal(DataOutputStream dos)
        {
            base.marshal(dos);
            try
            {
                dos.writeByte((byte)_requiredReliabilityService);
                dos.writeUshort((ushort)_pad1);
                dos.writeByte((byte)_pad2);
                dos.writeUint((uint)_requestID);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
Example #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void write(java.io.OutputStream out) throws java.io.IOException
        public virtual void write(System.IO.Stream @out)
        {
            DataOutputStream data = new DataOutputStream(@out);

            data.writeInt(packetSize);
            data.writeInt(address);
            data.writeInt(Length);

            if (buffer is ByteBuffer)
            {
                WritableByteChannel channel = Channels.newChannel(@out);
                channel.write((ByteBuffer)buffer);
            }
            else
            {
                IMemoryReader reader = MemoryReader.getMemoryReader(address, Length, 1);
                for (int i = 0; i < Length; i++)
                {
                    data.writeByte(reader.readNext());
                }
            }

            VideoEngine.log_Renamed.info(string.Format("Saved memory {0:x8} - {1:x8} (len {2:x8})", address, address + Length, Length));
            //VideoEngine.Console.WriteLine("CaptureRAM write " + ((3 * 4) + Length));

            //data.flush();
            //out.flush();
        }
Example #4
0
 ///<summary>
 ///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
 ///</summary>
 new public void marshal(DataOutputStream dos)
 {
     base.marshal(dos);
     try
     {
         _realWorldTime.marshal(dos);
         dos.writeByte((byte)_reason);
         dos.writeByte((byte)_frozenBehavior);
         dos.writeShort((short)_padding1);
         dos.writeUint((uint)_requestID);
     } // end try
     catch (Exception e)
     {
         Trace.WriteLine(e);
         Trace.Flush();
     }
 } // end of marshal method
Example #5
0
///<summary>
///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
///</summary>
        new public void marshal(DataOutputStream dos)
        {
            base.marshal(dos);
            try
            {
                _receivingEntityID.marshal(dos);
                _repairingEntityID.marshal(dos);
                dos.writeByte((byte)_repairResult);
                dos.writeShort((short)_padding1);
                dos.writeByte((byte)_padding2);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
Example #6
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeInt(entityId);
     dataoutputstream.writeByte(type);
     dataoutputstream.writeInt(xPosition);
     dataoutputstream.writeInt(yPosition);
     dataoutputstream.writeInt(zPosition);
 }
Example #7
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public PackOutput writeBytes(ByteBuffer buffer) throws java.io.IOException
        public override PackOutput WriteBytes(ByteBuffer buffer)
        {
            while (buffer.remaining() > 0)
            {
                Data.writeByte(buffer.get());
            }
            return(this);
        }
///<summary>
///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
///</summary>
        public void marshal(DataOutputStream dos)
        {
            try
            {
                dos.writeByte((byte)_characterSet);

                for (int idx = 0; idx < _characters.Length; idx++)
                {
                    dos.writeByte(_characters[idx]);
                } // end of array marshaling
            }     // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
Example #9
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeByte(window_Id);
     dataoutputstream.writeShort(inventorySlot);
     dataoutputstream.writeByte(mouseClick);
     dataoutputstream.writeShort(action);
     if (itemStack == null)
     {
         dataoutputstream.writeShort(-1);
     }
     else
     {
         dataoutputstream.writeShort(itemStack.itemID);
         dataoutputstream.writeByte(itemStack.stackSize);
         dataoutputstream.writeShort(itemStack.getItemDamage());
     }
 }
Example #10
0
///<summary>
///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
///</summary>
        public void marshal(DataOutputStream dos)
        {
            try
            {
                dos.writeUint((uint)_environmentType);
                dos.writeByte((byte)_length);
                dos.writeByte((byte)_index);
                dos.writeByte((byte)_padding1);
                dos.writeByte((byte)_geometry);
                dos.writeByte((byte)_padding2);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
Example #11
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeInt(protocolVersion);
     dataoutputstream.writeUTF(username);
     dataoutputstream.writeUTF(password);
     dataoutputstream.writeLong(mapSeed);
     dataoutputstream.writeByte(dimension);
 }
Example #12
0
///<summary>
///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
///</summary>
        public void marshal(DataOutputStream dos)
        {
            try
            {
                dos.writeByte((byte)_entityKind);
                dos.writeByte((byte)_domain);
                dos.writeUshort((ushort)_country);
                dos.writeByte((byte)_category);
                dos.writeByte((byte)_nomenclatureVersion);
                dos.writeUshort((ushort)_nomenclature);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
Example #13
0
        ///<summary>
        ///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
        ///</summary>
        new public void marshal(DataOutputStream dos)
        {
            base.marshal(dos);
            try
            {
                dos.writeByte((byte)_controlType);
                dos.writeByte((byte)_communicationsChannelType);
                _sourceEntityID.marshal(dos);
                dos.writeByte((byte)_sourceCommunicationsDeviceID);
                dos.writeByte((byte)_sourceLineID);
                dos.writeByte((byte)_transmitPriority);
                dos.writeByte((byte)_transmitLineState);
                dos.writeByte((byte)_command);
                _masterEntityID.marshal(dos);
                dos.writeUshort((ushort)_masterCommunicationsDeviceID);
                dos.writeUint((uint)_intercomParameters.Count);

                for (int idx = 0; idx < _intercomParameters.Count; idx++)
                {
                    IntercomCommunicationsParameters aIntercomCommunicationsParameters = (IntercomCommunicationsParameters)_intercomParameters[idx];
                    aIntercomCommunicationsParameters.marshal(dos);
                } // end of list marshalling
            }     // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
Example #14
0
///<summary>
///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
///</summary>
        public void marshal(DataOutputStream dos)
        {
            try
            {
                dos.writeByte((byte)_protocolVersion);
                dos.writeByte((byte)_exerciseID);
                dos.writeByte((byte)_pduType);
                dos.writeByte((byte)_protocolFamily);
                dos.writeUint((uint)_timestamp);
                dos.writeUshort((ushort)_length);
                dos.writeShort((short)_padding);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
Example #15
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeByte(windowId);
     dataoutputstream.writeShort(itemStack.Length);
     for (int i = 0; i < itemStack.Length; i++)
     {
         if (itemStack[i] == null)
         {
             dataoutputstream.writeShort(-1);
         }
         else
         {
             dataoutputstream.writeShort((short)itemStack[i].itemID);
             dataoutputstream.writeByte((byte)itemStack[i].stackSize);
             dataoutputstream.writeShort((short)itemStack[i].getItemDamage());
         }
     }
 }
Example #16
0
 ///<summary>
 ///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
 ///</summary>
 public void marshal(DataOutputStream dos)
 {
     try
     {
         dos.writeFloat((float)_erp);
         dos.writeFloat((float)_frequency);
         dos.writeFloat((float)_pgrf);
         dos.writeFloat((float)_pulseWidth);
         dos.writeUint((uint)_burstLength);
         dos.writeByte((byte)_applicableModes);
         dos.writeUshort((ushort)_pad2);
         dos.writeByte((byte)_pad3);
     } // end try
     catch (Exception e)
     {
         Trace.WriteLine(e);
         Trace.Flush();
     }
 } // end of marshal method
Example #17
0
///<summary>
///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
///</summary>
        new public void marshal(DataOutputStream dos)
        {
            base.marshal(dos);
            try
            {
                _radioEntityType.marshal(dos);
                dos.writeByte((byte)_transmitState);
                dos.writeByte((byte)_inputSource);
                dos.writeUshort((ushort)_padding1);
                _antennaLocation.marshal(dos);
                _relativeAntennaLocation.marshal(dos);
                dos.writeUshort((ushort)_antennaPatternType);
                dos.writeUshort((ushort)_antennaPatternList.Count);
                dos.writeUlong((ulong)_frequency);
                dos.writeFloat((float)_transmitFrequencyBandwidth);
                dos.writeFloat((float)_power);
                _modulationType.marshal(dos);
                dos.writeUshort((ushort)_cryptoSystem);
                dos.writeUshort((ushort)_cryptoKeyId);
                dos.writeByte((byte)_modulationParametersList.Count);
                dos.writeUshort((ushort)_padding2);
                dos.writeByte((byte)_padding3);

                for (int idx = 0; idx < _modulationParametersList.Count; idx++)
                {
                    Vector3Float aVector3Float = (Vector3Float)_modulationParametersList[idx];
                    aVector3Float.marshal(dos);
                } // end of list marshalling


                for (int idx = 0; idx < _antennaPatternList.Count; idx++)
                {
                    Vector3Float aVector3Float = (Vector3Float)_antennaPatternList[idx];
                    aVector3Float.marshal(dos);
                } // end of list marshalling
            }     // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
Example #18
0
        ///<summary>
        ///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
        ///</summary>
        public void marshal(DataOutputStream dos)
        {
            try
            {
                dos.writeByte((byte)_deadReckoningAlgorithm);

                for (int idx = 0; idx < _otherParameters.Length; idx++)
                {
                    dos.writeByte(_otherParameters[idx]);
                } // end of array marshaling

                _entityLinearAcceleration.marshal(dos);
                _entityAngularVelocity.marshal(dos);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
Example #19
0
///<summary>
///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
///</summary>
        new public void marshal(DataOutputStream dos)
        {
            base.marshal(dos);
            try
            {
                _issuingEntityID.marshal(dos);
                _collidingEntityID.marshal(dos);
                _eventID.marshal(dos);
                dos.writeByte((byte)_collisionType);
                dos.writeByte((byte)_pad);
                _velocity.marshal(dos);
                dos.writeFloat((float)_mass);
                _location.marshal(dos);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
///<summary>
///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
///</summary>
        public void marshal(DataOutputStream dos)
        {
            try
            {
                dos.writeByte((byte)_systemStatus);
                dos.writeByte((byte)_alternateParameter4);
                dos.writeByte((byte)_informationLayers);
                dos.writeByte((byte)_modifier);
                dos.writeUshort((ushort)_parameter1);
                dos.writeUshort((ushort)_parameter2);
                dos.writeUshort((ushort)_parameter3);
                dos.writeUshort((ushort)_parameter4);
                dos.writeUshort((ushort)_parameter5);
                dos.writeUshort((ushort)_parameter6);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
Example #21
0
///<summary>
///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
///</summary>
        public void marshal(DataOutputStream dos)
        {
            try
            {
                dos.writeByte((byte)_order);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
Example #22
0
        /// <summary>
        /// Might be used for debugging <seealso cref="ProcessDiagramRetrievalTest.testGetProcessDiagram()"/>.
        /// </summary>
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unused") private static void writeToFile(java.io.InputStream is, java.io.File file) throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        private static void writeToFile(Stream @is, File file)
        {
            DataOutputStream @out = new DataOutputStream(new BufferedOutputStream(new FileStream(file, FileMode.Create, FileAccess.Write)));
            int c;

            while ((c = @is.Read()) != -1)
            {
                @out.writeByte(c);
            }
            @is.Close();
            @out.close();
        }
Example #23
0
        ///<summary>
        ///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
        ///</summary>
        public void marshal(DataOutputStream dos)
        {
            try
            {
                dos.writeByte((byte)_beamDataLength);
                dos.writeByte((byte)_beamIDNumber);
                dos.writeUshort((ushort)_beamParameterIndex);
                _fundamentalParameterData.marshal(dos);
                dos.writeByte((byte)_beamFunction);
                dos.writeByte((byte)_trackJamTargets.Count);
                dos.writeByte((byte)_highDensityTrackJam);
                dos.writeByte((byte)_pad4);
                dos.writeUint((uint)_jammingModeSequence);

                for (int idx = 0; idx < _trackJamTargets.Count; idx++)
                {
                    TrackJamTarget aTrackJamTarget = (TrackJamTarget)_trackJamTargets[idx];
                    aTrackJamTarget.marshal(dos);
                } // end of list marshalling
            }     // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
///<summary>
///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
///</summary>
        new public void marshal(DataOutputStream dos)
        {
            base.marshal(dos);
            try
            {
                _minefieldID.marshal(dos);
                _requestingEntityID.marshal(dos);
                dos.writeByte((byte)_requestID);
                dos.writeByte((byte)_missingPduSequenceNumbers.Count);

                for (int idx = 0; idx < _missingPduSequenceNumbers.Count; idx++)
                {
                    EightByteChunk aEightByteChunk = (EightByteChunk)_missingPduSequenceNumbers[idx];
                    aEightByteChunk.marshal(dos);
                } // end of list marshalling
            }     // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
Example #25
0
 ///<summary>
 ///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
 ///</summary>
 public void marshal(DataOutputStream dos)
 {
     try
     {
         _supplyType.marshal(dos);
         dos.writeByte((byte)_quantity);
     } // end try
     catch (Exception e)
     {
         Trace.WriteLine(e);
         Trace.Flush();
     }
 } // end of marshal method
Example #26
0
        public void writeWatchableObjects(DataOutputStream dataoutputstream)
        {
            WatchableObject watchableobject;

            for (Iterator iterator = watchedObjects.values().iterator();
                 iterator.hasNext();
                 writeWatchableObject(dataoutputstream, watchableobject))
            {
                watchableobject = (WatchableObject)iterator.next();
            }

            dataoutputstream.writeByte(127);
        }
///<summary>
///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
///</summary>
        public void marshal(DataOutputStream dos)
        {
            try
            {
                dos.writeByte((byte)_emitterSystemDataLength);
                dos.writeByte((byte)_beamRecords.Count);
                dos.writeUshort((ushort)_pad2);
                _acousticEmitterSystem.marshal(dos);
                _emitterLocation.marshal(dos);

                for (int idx = 0; idx < _beamRecords.Count; idx++)
                {
                    AcousticBeamData aAcousticBeamData = (AcousticBeamData)_beamRecords[idx];
                    aAcousticBeamData.marshal(dos);
                } // end of list marshalling
            }     // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
        ///<summary>
        ///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
        ///</summary>
        public void marshal(DataOutputStream dos)
        {
            try
            {
                dos.writeByte((byte)_systemDataLength);
                dos.writeByte((byte)_beamDataRecords.Count);
                dos.writeUshort((ushort)_emissionsPadding2);
                _emitterSystem.marshal(dos);
                _location.marshal(dos);

                for (int idx = 0; idx < _beamDataRecords.Count; idx++)
                {
                    ElectronicEmissionBeamData aElectronicEmissionBeamData = (ElectronicEmissionBeamData)_beamDataRecords[idx];
                    aElectronicEmissionBeamData.marshal(dos);
                } // end of list marshalling
            }     // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
///<summary>
///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
///</summary>
        new public void marshal(DataOutputStream dos)
        {
            base.marshal(dos);
            try
            {
                _receivingEntityID.marshal(dos);
                _supplyingEntityID.marshal(dos);
                dos.writeByte((byte)_supplies.Count);
                dos.writeShort((short)_padding1);
                dos.writeByte((byte)_padding2);

                for (int idx = 0; idx < _supplies.Count; idx++)
                {
                    SupplyQuantity aSupplyQuantity = (SupplyQuantity)_supplies[idx];
                    aSupplyQuantity.marshal(dos);
                } // end of list marshalling
            }     // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
Example #30
0
 ///<summary>
 ///Marshal the data to the DataOutputStream.  Note: Length needs to be set before calling this method
 ///</summary>
 new public void marshal(DataOutputStream dos)
 {
     base.marshal(dos);
     try
     {
         dos.writeUshort((ushort)_dataValues.Length);
         dos.writeByte(_dataValues);
     } // end try
     catch (Exception e)
     {
         Trace.WriteLine(e);
         Trace.Flush();
     }
 } // end of marshal method