Пример #1
0
        public override void Reflection(StringBuilder sb)
        {
            sb.AppendLine("<EventReportPdu>");
            base.Reflection(sb);
            try
            {
                sb.AppendLine("<eventType type=\"uint\">" + this._eventType.ToString(CultureInfo.InvariantCulture) + "</eventType>");
                sb.AppendLine("<padding1 type=\"uint\">" + this._padding1.ToString(CultureInfo.InvariantCulture) + "</padding1>");
                sb.AppendLine("<fixedDatums type=\"uint\">" + this._fixedDatums.Count.ToString(CultureInfo.InvariantCulture) + "</fixedDatums>");
                sb.AppendLine("<variableDatums type=\"uint\">" + this._variableDatums.Count.ToString(CultureInfo.InvariantCulture) + "</variableDatums>");
                for (int idx = 0; idx < this._fixedDatums.Count; idx++)
                {
                    sb.AppendLine("<fixedDatums" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"FixedDatum\">");
                    FixedDatum aFixedDatum = (FixedDatum)this._fixedDatums[idx];
                    aFixedDatum.Reflection(sb);
                    sb.AppendLine("</fixedDatums" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

                for (int idx = 0; idx < this._variableDatums.Count; idx++)
                {
                    sb.AppendLine("<variableDatums" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"VariableDatum\">");
                    VariableDatum aVariableDatum = (VariableDatum)this._variableDatums[idx];
                    aVariableDatum.Reflection(sb);
                    sb.AppendLine("</variableDatums" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

                sb.AppendLine("</EventReportPdu>");
            }
            catch (Exception e)
            {
                if (PduBase.TraceExceptions)
                {
                    Trace.WriteLine(e);
                    Trace.Flush();
                }

                this.RaiseExceptionOccured(e);

                if (PduBase.ThrowExceptions)
                {
                    throw e;
                }
            }
        }
        public override void Reflection(StringBuilder sb)
        {
            sb.AppendLine("<ActionResponseReliablePdu>");
            base.Reflection(sb);
            try
            {
                sb.AppendLine("<requestID type=\"uint\">" + this._requestID.ToString(CultureInfo.InvariantCulture) + "</requestID>");
                sb.AppendLine("<responseStatus type=\"uint\">" + this._responseStatus.ToString(CultureInfo.InvariantCulture) + "</responseStatus>");
                sb.AppendLine("<fixedDatumRecords type=\"uint\">" + this._fixedDatumRecords.Count.ToString(CultureInfo.InvariantCulture) + "</fixedDatumRecords>");
                sb.AppendLine("<variableDatumRecords type=\"uint\">" + this._variableDatumRecords.Count.ToString(CultureInfo.InvariantCulture) + "</variableDatumRecords>");
                for (int idx = 0; idx < this._fixedDatumRecords.Count; idx++)
                {
                    sb.AppendLine("<fixedDatumRecords" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"FixedDatum\">");
                    FixedDatum aFixedDatum = (FixedDatum)this._fixedDatumRecords[idx];
                    aFixedDatum.Reflection(sb);
                    sb.AppendLine("</fixedDatumRecords" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

                for (int idx = 0; idx < this._variableDatumRecords.Count; idx++)
                {
                    sb.AppendLine("<variableDatumRecords" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"VariableDatum\">");
                    VariableDatum aVariableDatum = (VariableDatum)this._variableDatumRecords[idx];
                    aVariableDatum.Reflection(sb);
                    sb.AppendLine("</variableDatumRecords" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

                sb.AppendLine("</ActionResponseReliablePdu>");
            }
            catch (Exception e)
            {
                if (PduBase.TraceExceptions)
                {
                    Trace.WriteLine(e);
                    Trace.Flush();
                }

                this.RaiseExceptionOccured(e);

                if (PduBase.ThrowExceptions)
                {
                    throw e;
                }
            }
        }
Пример #3
0
        public override void Reflection(StringBuilder sb)
        {
            sb.AppendLine("<IsGroupOfPdu>");
            base.Reflection(sb);
            try
            {
                sb.AppendLine("<groupEntityID>");
                this._groupEntityID.Reflection(sb);
                sb.AppendLine("</groupEntityID>");
                sb.AppendLine("<groupedEntityCategory type=\"byte\">" + this._groupedEntityCategory.ToString(CultureInfo.InvariantCulture) + "</groupedEntityCategory>");
                sb.AppendLine("<groupedEntityDescriptions type=\"byte\">" + this._groupedEntityDescriptions.Count.ToString(CultureInfo.InvariantCulture) + "</groupedEntityDescriptions>");
                sb.AppendLine("<pad2 type=\"uint\">" + this._pad2.ToString(CultureInfo.InvariantCulture) + "</pad2>");
                sb.AppendLine("<latitude type=\"double\">" + this._latitude.ToString(CultureInfo.InvariantCulture) + "</latitude>");
                sb.AppendLine("<longitude type=\"double\">" + this._longitude.ToString(CultureInfo.InvariantCulture) + "</longitude>");
                for (int idx = 0; idx < this._groupedEntityDescriptions.Count; idx++)
                {
                    sb.AppendLine("<groupedEntityDescriptions" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"VariableDatum\">");
                    VariableDatum aVariableDatum = (VariableDatum)this._groupedEntityDescriptions[idx];
                    aVariableDatum.Reflection(sb);
                    sb.AppendLine("</groupedEntityDescriptions" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

                sb.AppendLine("</IsGroupOfPdu>");
            }
            catch (Exception e)
            {
                if (PduBase.TraceExceptions)
                {
                    Trace.WriteLine(e);
                    Trace.Flush();
                }

                this.RaiseExceptionOccured(e);

                if (PduBase.ThrowExceptions)
                {
                    throw e;
                }
            }
        }
        public override void Reflection(StringBuilder sb)
        {
            sb.AppendLine("<AggregateStatePdu>");
            base.Reflection(sb);
            try
            {
                sb.AppendLine("<aggregateID>");
                this._aggregateID.Reflection(sb);
                sb.AppendLine("</aggregateID>");
                sb.AppendLine("<forceID type=\"byte\">" + this._forceID.ToString(CultureInfo.InvariantCulture) + "</forceID>");
                sb.AppendLine("<aggregateState type=\"byte\">" + this._aggregateState.ToString(CultureInfo.InvariantCulture) + "</aggregateState>");
                sb.AppendLine("<aggregateType>");
                this._aggregateType.Reflection(sb);
                sb.AppendLine("</aggregateType>");
                sb.AppendLine("<formation type=\"uint\">" + this._formation.ToString(CultureInfo.InvariantCulture) + "</formation>");
                sb.AppendLine("<aggregateMarking>");
                this._aggregateMarking.Reflection(sb);
                sb.AppendLine("</aggregateMarking>");
                sb.AppendLine("<dimensions>");
                this._dimensions.Reflection(sb);
                sb.AppendLine("</dimensions>");
                sb.AppendLine("<orientation>");
                this._orientation.Reflection(sb);
                sb.AppendLine("</orientation>");
                sb.AppendLine("<centerOfMass>");
                this._centerOfMass.Reflection(sb);
                sb.AppendLine("</centerOfMass>");
                sb.AppendLine("<velocity>");
                this._velocity.Reflection(sb);
                sb.AppendLine("</velocity>");
                sb.AppendLine("<aggregateIDList type=\"ushort\">" + this._aggregateIDList.Count.ToString(CultureInfo.InvariantCulture) + "</aggregateIDList>");
                sb.AppendLine("<entityIDList type=\"ushort\">" + this._entityIDList.Count.ToString(CultureInfo.InvariantCulture) + "</entityIDList>");
                sb.AppendLine("<silentAggregateSystemList type=\"ushort\">" + this._silentAggregateSystemList.Count.ToString(CultureInfo.InvariantCulture) + "</silentAggregateSystemList>");
                sb.AppendLine("<silentEntitySystemList type=\"ushort\">" + this._silentEntitySystemList.Count.ToString(CultureInfo.InvariantCulture) + "</silentEntitySystemList>");
                for (int idx = 0; idx < this._aggregateIDList.Count; idx++)
                {
                    sb.AppendLine("<aggregateIDList" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"AggregateID\">");
                    AggregateID aAggregateID = (AggregateID)this._aggregateIDList[idx];
                    aAggregateID.Reflection(sb);
                    sb.AppendLine("</aggregateIDList" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

                for (int idx = 0; idx < this._entityIDList.Count; idx++)
                {
                    sb.AppendLine("<entityIDList" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"EntityID\">");
                    EntityID aEntityID = (EntityID)this._entityIDList[idx];
                    aEntityID.Reflection(sb);
                    sb.AppendLine("</entityIDList" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

                sb.AppendLine("<pad2 type=\"byte\">" + this._pad2.ToString(CultureInfo.InvariantCulture) + "</pad2>");
                for (int idx = 0; idx < this._silentAggregateSystemList.Count; idx++)
                {
                    sb.AppendLine("<silentAggregateSystemList" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"EntityType\">");
                    EntityType aEntityType = (EntityType)this._silentAggregateSystemList[idx];
                    aEntityType.Reflection(sb);
                    sb.AppendLine("</silentAggregateSystemList" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

                for (int idx = 0; idx < this._silentEntitySystemList.Count; idx++)
                {
                    sb.AppendLine("<silentEntitySystemList" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"EntityType\">");
                    EntityType aEntityType = (EntityType)this._silentEntitySystemList[idx];
                    aEntityType.Reflection(sb);
                    sb.AppendLine("</silentEntitySystemList" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

                sb.AppendLine("<variableDatumList type=\"uint\">" + this._variableDatumList.Count.ToString(CultureInfo.InvariantCulture) + "</variableDatumList>");
                for (int idx = 0; idx < this._variableDatumList.Count; idx++)
                {
                    sb.AppendLine("<variableDatumList" + idx.ToString(CultureInfo.InvariantCulture) + " type=\"VariableDatum\">");
                    VariableDatum aVariableDatum = (VariableDatum)this._variableDatumList[idx];
                    aVariableDatum.Reflection(sb);
                    sb.AppendLine("</variableDatumList" + idx.ToString(CultureInfo.InvariantCulture) + ">");
                }

                sb.AppendLine("</AggregateStatePdu>");
            }
            catch (Exception e)
            {
                if (PduBase.TraceExceptions)
                {
                    Trace.WriteLine(e);
                    Trace.Flush();
                }

                this.RaiseExceptionOccured(e);

                if (PduBase.ThrowExceptions)
                {
                    throw e;
                }
            }
        }