Esempio n. 1
0
        new public int getMarshalledSize()
        {
            int marshalSize = 0;

            marshalSize = base.getMarshalledSize();
            marshalSize = marshalSize + 1;  // _requiredReliabilityService
            marshalSize = marshalSize + 2;  // _pad1
            marshalSize = marshalSize + 1;  // _pad2
            marshalSize = marshalSize + 4;  // _requestID
            marshalSize = marshalSize + 4;  // _timeInterval
            marshalSize = marshalSize + 4;  // _numberOfFixedDatumRecords
            marshalSize = marshalSize + 4;  // _numberOfVariableDatumRecords
            for (int idx = 0; idx < _fixedDatumRecords.Count; idx++)
            {
                FixedDatum listElement = (FixedDatum)_fixedDatumRecords[idx];
                marshalSize = marshalSize + listElement.getMarshalledSize();
            }
            for (int idx = 0; idx < _variableDatumRecords.Count; idx++)
            {
                VariableDatum listElement = (VariableDatum)_variableDatumRecords[idx];
                marshalSize = marshalSize + listElement.getMarshalledSize();
            }

            return(marshalSize);
        }
Esempio n. 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.writeUint((uint)_requestID);
                dos.writeUint((uint)_padding1);
                dos.writeUint((uint)_fixedDatums.Count);
                dos.writeUint((uint)_variableDatums.Count);

                for (int idx = 0; idx < _fixedDatums.Count; idx++)
                {
                    FixedDatum aFixedDatum = (FixedDatum)_fixedDatums[idx];
                    aFixedDatum.marshal(dos);
                } // end of list marshalling


                for (int idx = 0; idx < _variableDatums.Count; idx++)
                {
                    VariableDatum aVariableDatum = (VariableDatum)_variableDatums[idx];
                    aVariableDatum.marshal(dos);
                } // end of list marshalling
            }     // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
Esempio n. 3
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.writeUint((uint)_requestID);
                dos.writeByte((byte)_requiredReliabilityService);
                dos.writeUshort((ushort)_pad1);
                dos.writeByte((byte)_pad2);
                dos.writeUint((uint)_fixedDatumRecords.Count);
                dos.writeUint((uint)_variableDatumRecords.Count);

                for (int idx = 0; idx < _fixedDatumRecords.Count; idx++)
                {
                    FixedDatum aFixedDatum = (FixedDatum)_fixedDatumRecords[idx];
                    aFixedDatum.marshal(dos);
                } // end of list marshalling


                for (int idx = 0; idx < _variableDatumRecords.Count; idx++)
                {
                    VariableDatum aVariableDatum = (VariableDatum)_variableDatumRecords[idx];
                    aVariableDatum.marshal(dos);
                } // end of list marshalling
            }     // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
Esempio n. 4
0
        /**
         * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful.
         */
        public bool equals(DataQueryReliablePdu rhs)
        {
            bool ivarsEqual = true;

            if (rhs.GetType() != this.GetType())
            {
                return(false);
            }

            if (!(_requiredReliabilityService == rhs._requiredReliabilityService))
            {
                ivarsEqual = false;
            }
            if (!(_pad1 == rhs._pad1))
            {
                ivarsEqual = false;
            }
            if (!(_pad2 == rhs._pad2))
            {
                ivarsEqual = false;
            }
            if (!(_requestID == rhs._requestID))
            {
                ivarsEqual = false;
            }
            if (!(_timeInterval == rhs._timeInterval))
            {
                ivarsEqual = false;
            }
            if (!(_numberOfFixedDatumRecords == rhs._numberOfFixedDatumRecords))
            {
                ivarsEqual = false;
            }
            if (!(_numberOfVariableDatumRecords == rhs._numberOfVariableDatumRecords))
            {
                ivarsEqual = false;
            }

            for (int idx = 0; idx < _fixedDatumRecords.Count; idx++)
            {
                FixedDatum x = (FixedDatum)_fixedDatumRecords[idx];
                if (!(_fixedDatumRecords[idx].Equals(rhs._fixedDatumRecords[idx])))
                {
                    ivarsEqual = false;
                }
            }


            for (int idx = 0; idx < _variableDatumRecords.Count; idx++)
            {
                VariableDatum x = (VariableDatum)_variableDatumRecords[idx];
                if (!(_variableDatumRecords[idx].Equals(rhs._variableDatumRecords[idx])))
                {
                    ivarsEqual = false;
                }
            }


            return(ivarsEqual);
        }
Esempio n. 5
0
        } // end of marshal method

        new public void unmarshal(DataInputStream dis)
        {
            base.unmarshal(dis);

            try
            {
                _requestID = dis.readUint();
                _padding1  = dis.readUint();
                _numberOfFixedDatumRecords    = dis.readUint();
                _numberOfVariableDatumRecords = dis.readUint();
                for (int idx = 0; idx < _numberOfFixedDatumRecords; idx++)
                {
                    FixedDatum anX = new FixedDatum();
                    anX.unmarshal(dis);
                    _fixedDatums.Add(anX);
                }
                ;

                for (int idx = 0; idx < _numberOfVariableDatumRecords; idx++)
                {
                    VariableDatum anX = new VariableDatum();
                    anX.unmarshal(dis);
                    _variableDatums.Add(anX);
                }
                ;
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of unmarshal method
Esempio n. 6
0
        } // end of marshal method

        new public void unmarshal(DataInputStream dis)
        {
            base.unmarshal(dis);

            try
            {
                _requiredReliabilityService = dis.readByte();
                _pad1         = dis.readUshort();
                _pad2         = dis.readByte();
                _requestID    = dis.readUint();
                _timeInterval = dis.readUint();
                _numberOfFixedDatumRecords    = dis.readUint();
                _numberOfVariableDatumRecords = dis.readUint();
                for (int idx = 0; idx < _numberOfFixedDatumRecords; idx++)
                {
                    FixedDatum anX = new FixedDatum();
                    anX.unmarshal(dis);
                    _fixedDatumRecords.Add(anX);
                }
                ;

                for (int idx = 0; idx < _numberOfVariableDatumRecords; idx++)
                {
                    VariableDatum anX = new VariableDatum();
                    anX.unmarshal(dis);
                    _variableDatumRecords.Add(anX);
                }
                ;
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of unmarshal method
Esempio n. 7
0
        } // end of unmarshal method

        ///<summary>
        ///This allows for a quick display of PDU data.  The current format is unacceptable and only used for debugging.
        ///This will be modified in the future to provide a better display.  Usage:
        ///pdu.GetType().InvokeMember("reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
        ///where pdu is an object representing a single pdu and sb is a StringBuilder.
        ///Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
        ///</summary>
        new public void reflection(StringBuilder sb)
        {
            sb.Append("<CommentReliablePdu>" + System.Environment.NewLine);
            base.reflection(sb);
            try
            {
                sb.Append("<fixedDatumRecords type=\"uint\">" + _fixedDatumRecords.Count.ToString() + "</fixedDatumRecords> " + System.Environment.NewLine);
                sb.Append("<variableDatumRecords type=\"uint\">" + _variableDatumRecords.Count.ToString() + "</variableDatumRecords> " + System.Environment.NewLine);

                for (int idx = 0; idx < _fixedDatumRecords.Count; idx++)
                {
                    sb.Append("<fixedDatumRecords" + idx.ToString() + " type=\"FixedDatum\">" + System.Environment.NewLine);
                    FixedDatum aFixedDatum = (FixedDatum)_fixedDatumRecords[idx];
                    aFixedDatum.reflection(sb);
                    sb.Append("</fixedDatumRecords" + idx.ToString() + ">" + System.Environment.NewLine);
                } // end of list marshalling


                for (int idx = 0; idx < _variableDatumRecords.Count; idx++)
                {
                    sb.Append("<variableDatumRecords" + idx.ToString() + " type=\"VariableDatum\">" + System.Environment.NewLine);
                    VariableDatum aVariableDatum = (VariableDatum)_variableDatumRecords[idx];
                    aVariableDatum.reflection(sb);
                    sb.Append("</variableDatumRecords" + idx.ToString() + ">" + System.Environment.NewLine);
                } // end of list marshalling

                sb.Append("</CommentReliablePdu>" + System.Environment.NewLine);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of reflection method
Esempio n. 8
0
        /**
         * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful.
         */
        public bool equals(ActionRequestPdu rhs)
        {
            bool ivarsEqual = true;

            if (rhs.GetType() != this.GetType())
            {
                return(false);
            }

            if (!(_requestID == rhs._requestID))
            {
                ivarsEqual = false;
            }
            if (!(_actionID == rhs._actionID))
            {
                ivarsEqual = false;
            }
            if (!(_numberOfFixedDatumRecords == rhs._numberOfFixedDatumRecords))
            {
                ivarsEqual = false;
            }
            if (!(_numberOfVariableDatumRecords == rhs._numberOfVariableDatumRecords))
            {
                ivarsEqual = false;
            }

            for (int idx = 0; idx < _fixedDatums.Count; idx++)
            {
                FixedDatum x = (FixedDatum)_fixedDatums[idx];
                if (!(_fixedDatums[idx].Equals(rhs._fixedDatums[idx])))
                {
                    ivarsEqual = false;
                }
            }


            for (int idx = 0; idx < _variableDatums.Count; idx++)
            {
                VariableDatum x = (VariableDatum)_variableDatums[idx];
                if (!(_variableDatums[idx].Equals(rhs._variableDatums[idx])))
                {
                    ivarsEqual = false;
                }
            }


            return(ivarsEqual);
        }
Esempio n. 9
0
        /**
         * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful.
         */
        public bool equals(EventReportPdu rhs)
        {
            bool ivarsEqual = true;

            if (rhs.GetType() != this.GetType())
            {
                return(false);
            }

            if (!(_eventType == rhs._eventType))
            {
                ivarsEqual = false;
            }
            if (!(_padding1 == rhs._padding1))
            {
                ivarsEqual = false;
            }
            if (!(_numberOfFixedDatumRecords == rhs._numberOfFixedDatumRecords))
            {
                ivarsEqual = false;
            }
            if (!(_numberOfVariableDatumRecords == rhs._numberOfVariableDatumRecords))
            {
                ivarsEqual = false;
            }

            for (int idx = 0; idx < _fixedDatums.Count; idx++)
            {
                FixedDatum x = (FixedDatum)_fixedDatums[idx];
                if (!(_fixedDatums[idx].Equals(rhs._fixedDatums[idx])))
                {
                    ivarsEqual = false;
                }
            }


            for (int idx = 0; idx < _variableDatums.Count; idx++)
            {
                VariableDatum x = (VariableDatum)_variableDatums[idx];
                if (!(_variableDatums[idx].Equals(rhs._variableDatums[idx])))
                {
                    ivarsEqual = false;
                }
            }


            return(ivarsEqual);
        }
Esempio n. 10
0
        /**
         * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful.
         */
        public bool equals(FixedDatum rhs)
        {
            bool ivarsEqual = true;

            if (rhs.GetType() != this.GetType())
            {
                return(false);
            }

            if (!(_fixedDatumID == rhs._fixedDatumID))
            {
                ivarsEqual = false;
            }
            if (!(_fixedDatumValue == rhs._fixedDatumValue))
            {
                ivarsEqual = false;
            }

            return(ivarsEqual);
        }
Esempio n. 11
0
        new public int getMarshalledSize()
        {
            int marshalSize = 0;

            marshalSize = base.getMarshalledSize();
            marshalSize = marshalSize + 4;  // _numberOfFixedDatumRecords
            marshalSize = marshalSize + 4;  // _numberOfVariableDatumRecords
            for (int idx = 0; idx < _fixedDatumRecords.Count; idx++)
            {
                FixedDatum listElement = (FixedDatum)_fixedDatumRecords[idx];
                marshalSize = marshalSize + listElement.getMarshalledSize();
            }
            for (int idx = 0; idx < _variableDatumRecords.Count; idx++)
            {
                VariableDatum listElement = (VariableDatum)_variableDatumRecords[idx];
                marshalSize = marshalSize + listElement.getMarshalledSize();
            }

            return(marshalSize);
        }
Esempio n. 12
0
        } // end of unmarshal method

        ///<summary>
        ///This allows for a quick display of PDU data.  The current format is unacceptable and only used for debugging.
        ///This will be modified in the future to provide a better display.  Usage:
        ///pdu.GetType().InvokeMember("reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
        ///where pdu is an object representing a single pdu and sb is a StringBuilder.
        ///Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
        ///</summary>
        new public void reflection(StringBuilder sb)
        {
            sb.Append("<DataQueryReliablePdu>" + System.Environment.NewLine);
            base.reflection(sb);
            try
            {
                sb.Append("<requiredReliabilityService type=\"byte\">" + _requiredReliabilityService.ToString() + "</requiredReliabilityService> " + System.Environment.NewLine);
                sb.Append("<pad1 type=\"ushort\">" + _pad1.ToString() + "</pad1> " + System.Environment.NewLine);
                sb.Append("<pad2 type=\"byte\">" + _pad2.ToString() + "</pad2> " + System.Environment.NewLine);
                sb.Append("<requestID type=\"uint\">" + _requestID.ToString() + "</requestID> " + System.Environment.NewLine);
                sb.Append("<timeInterval type=\"uint\">" + _timeInterval.ToString() + "</timeInterval> " + System.Environment.NewLine);
                sb.Append("<fixedDatumRecords type=\"uint\">" + _fixedDatumRecords.Count.ToString() + "</fixedDatumRecords> " + System.Environment.NewLine);
                sb.Append("<variableDatumRecords type=\"uint\">" + _variableDatumRecords.Count.ToString() + "</variableDatumRecords> " + System.Environment.NewLine);

                for (int idx = 0; idx < _fixedDatumRecords.Count; idx++)
                {
                    sb.Append("<fixedDatumRecords" + idx.ToString() + " type=\"FixedDatum\">" + System.Environment.NewLine);
                    FixedDatum aFixedDatum = (FixedDatum)_fixedDatumRecords[idx];
                    aFixedDatum.reflection(sb);
                    sb.Append("</fixedDatumRecords" + idx.ToString() + ">" + System.Environment.NewLine);
                } // end of list marshalling


                for (int idx = 0; idx < _variableDatumRecords.Count; idx++)
                {
                    sb.Append("<variableDatumRecords" + idx.ToString() + " type=\"VariableDatum\">" + System.Environment.NewLine);
                    VariableDatum aVariableDatum = (VariableDatum)_variableDatumRecords[idx];
                    aVariableDatum.reflection(sb);
                    sb.Append("</variableDatumRecords" + idx.ToString() + ">" + System.Environment.NewLine);
                } // end of list marshalling

                sb.Append("</DataQueryReliablePdu>" + System.Environment.NewLine);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of reflection method
Esempio n. 13
0
        } // end of unmarshal method

        ///<summary>
        ///This allows for a quick display of PDU data.  The current format is unacceptable and only used for debugging.
        ///This will be modified in the future to provide a better display.  Usage:
        ///pdu.GetType().InvokeMember("reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
        ///where pdu is an object representing a single pdu and sb is a StringBuilder.
        ///Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
        ///</summary>
        new public void reflection(StringBuilder sb)
        {
            sb.Append("<ActionRequestPdu>" + System.Environment.NewLine);
            base.reflection(sb);
            try
            {
                sb.Append("<requestID type=\"uint\">" + _requestID.ToString() + "</requestID> " + System.Environment.NewLine);
                sb.Append("<actionID type=\"uint\">" + _actionID.ToString() + "</actionID> " + System.Environment.NewLine);
                sb.Append("<fixedDatums type=\"uint\">" + _fixedDatums.Count.ToString() + "</fixedDatums> " + System.Environment.NewLine);
                sb.Append("<variableDatums type=\"uint\">" + _variableDatums.Count.ToString() + "</variableDatums> " + System.Environment.NewLine);

                for (int idx = 0; idx < _fixedDatums.Count; idx++)
                {
                    sb.Append("<fixedDatums" + idx.ToString() + " type=\"FixedDatum\">" + System.Environment.NewLine);
                    FixedDatum aFixedDatum = (FixedDatum)_fixedDatums[idx];
                    aFixedDatum.reflection(sb);
                    sb.Append("</fixedDatums" + idx.ToString() + ">" + System.Environment.NewLine);
                } // end of list marshalling


                for (int idx = 0; idx < _variableDatums.Count; idx++)
                {
                    sb.Append("<variableDatums" + idx.ToString() + " type=\"VariableDatum\">" + System.Environment.NewLine);
                    VariableDatum aVariableDatum = (VariableDatum)_variableDatums[idx];
                    aVariableDatum.reflection(sb);
                    sb.Append("</variableDatums" + idx.ToString() + ">" + System.Environment.NewLine);
                } // end of list marshalling

                sb.Append("</ActionRequestPdu>" + System.Environment.NewLine);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
Esempio n. 14
0
        } // end of unmarshal method

        ///<summary>
        ///This allows for a quick display of PDU data.  The current format is unacceptable and only used for debugging.
        ///This will be modified in the future to provide a better display.  Usage:
        ///pdu.GetType().InvokeMember("reflection", System.Reflection.BindingFlags.InvokeMethod, null, pdu, new object[] { sb });
        ///where pdu is an object representing a single pdu and sb is a StringBuilder.
        ///Note: The supplied Utilities folder contains a method called 'DecodePDU' in the PDUProcessor Class that provides this functionality
        ///</summary>
        new public void reflection(StringBuilder sb)
        {
            sb.Append("<EventReportPdu>" + System.Environment.NewLine);
            base.reflection(sb);
            try
            {
                sb.Append("<eventType type=\"uint\">" + _eventType.ToString() + "</eventType> " + System.Environment.NewLine);
                sb.Append("<padding1 type=\"uint\">" + _padding1.ToString() + "</padding1> " + System.Environment.NewLine);
                sb.Append("<fixedDatums type=\"uint\">" + _fixedDatums.Count.ToString() + "</fixedDatums> " + System.Environment.NewLine);
                sb.Append("<variableDatums type=\"uint\">" + _variableDatums.Count.ToString() + "</variableDatums> " + System.Environment.NewLine);

                for (int idx = 0; idx < _fixedDatums.Count; idx++)
                {
                    sb.Append("<fixedDatums" + idx.ToString() + " type=\"FixedDatum\">" + System.Environment.NewLine);
                    FixedDatum aFixedDatum = (FixedDatum)_fixedDatums[idx];
                    aFixedDatum.reflection(sb);
                    sb.Append("</fixedDatums" + idx.ToString() + ">" + System.Environment.NewLine);
                } // end of list marshalling


                for (int idx = 0; idx < _variableDatums.Count; idx++)
                {
                    sb.Append("<variableDatums" + idx.ToString() + " type=\"VariableDatum\">" + System.Environment.NewLine);
                    VariableDatum aVariableDatum = (VariableDatum)_variableDatums[idx];
                    aVariableDatum.reflection(sb);
                    sb.Append("</variableDatums" + idx.ToString() + ">" + System.Environment.NewLine);
                } // end of list marshalling

                sb.Append("</EventReportPdu>" + System.Environment.NewLine);
            } // end try
            catch (Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        } // end of marshal method
        public new void unmarshal(DataInputStream dis)
        {
            base.unmarshal(dis);

            try
            {
               _requiredReliabilityService = dis.readByte();
               _pad1 = dis.readUshort();
               _pad2 = dis.readByte();
               _requestID = dis.readUint();
               _timeInterval = dis.readUint();
               _numberOfFixedDatumRecords = dis.readUint();
               _numberOfVariableDatumRecords = dis.readUint();
            for(int idx = 0; idx < _numberOfFixedDatumRecords; idx++)
            {
               FixedDatum anX = new FixedDatum();
            anX.unmarshal(dis);
            _fixedDatumRecords.Add(anX);
            };

            for(int idx = 0; idx < _numberOfVariableDatumRecords; idx++)
            {
               VariableDatum anX = new VariableDatum();
            anX.unmarshal(dis);
            _variableDatumRecords.Add(anX);
            };

            } // end try
               catch(Exception e)
            {
              Trace.WriteLine(e);
              Trace.Flush();
            }
        }
Esempio n. 16
0
        public new void unmarshal(DataInputStream dis)
        {
            base.unmarshal(dis);

            try
            {
                _requestID = dis.readUint();
                _padding1 = dis.readUint();
                _numberOfFixedDatumRecords = dis.readUint();
                _numberOfVariableDatumRecords = dis.readUint();
                for(int idx = 0; idx < _numberOfFixedDatumRecords; idx++)
                {
                    FixedDatum anX = new FixedDatum();
                    anX.unmarshal(dis);
                    _fixedDatums.Add(anX);
                };

                for(int idx = 0; idx < _numberOfVariableDatumRecords; idx++)
                {
                    VariableDatum anX = new VariableDatum();
                    anX.unmarshal(dis);
                    _variableDatums.Add(anX);
                };

            } // end try
            catch(Exception e)
            {
                Trace.WriteLine(e);
                Trace.Flush();
            }
        }
Esempio n. 17
0
        /**
          * The equals method doesn't always work--mostly on on classes that consist only of primitives. Be careful.
          */
        public bool equals(FixedDatum rhs)
        {
            bool ivarsEqual = true;

            if(rhs.GetType() != this.GetType())
            return false;

             if( ! (_fixedDatumID == rhs._fixedDatumID)) ivarsEqual = false;
             if( ! (_fixedDatumValue == rhs._fixedDatumValue)) ivarsEqual = false;

            return ivarsEqual;
        }