Пример #1
0
        public isoMessage(byte[] buffer, int bufLen, isoDialect isoDialect)
        {
            /*
             * dialect for same type of message should be initialized once somewhere and passed as reference here
             * in order not to load xml file every time
             */

            fieldList       = new List<isoField>();

            requestBuffer   = buffer;

            bufLength       = bufLen;

            msgDialect      = isoDialect;

            responseBuffer  = new byte[] { 0 };

            f63v            = String.Empty;

            for (int i = 0; i < msgDialect.getTotalFields(); i++)
            {
                //isoFieldDefinition fDef =  msgDialect.getFieldDefinition(i);

                this.fieldList[i].number = i;

                //this.fieldList[i].name          = fDef.getName();
                //this.fieldList[i].fieldEncoding = fDef.getEncoding();
                //this.fieldList[i].fieldType     = fDef.getType();
                //this.fieldList[i].length        = fDef.getLength();
                //this.fieldList[i].lengthType    = fDef.getLengthType();
                //this.fieldList[i].description   = fDef.getDescription();

                this.fieldList[i].name = msgDialect.fieldList[i].name;
                this.fieldList[i].fieldEncoding = msgDialect.fieldList[i].fieldEncoding;
                this.fieldList[i].fieldType = msgDialect.fieldList[i].fieldType;
                this.fieldList[i].length = msgDialect.fieldList[i].fixedLength;
                this.fieldList[i].lengthType = msgDialect.fieldList[i].lengthType;
                this.fieldList[i].description = msgDialect.fieldList[i].description;
            }
        }
Пример #2
0
        private List<isoField> fieldList; // iso fields with their values

        #endregion Fields

        #region Constructors

        public isoMessage(byte[] buffer, int bufLen)
        {
            fieldList       = new List<isoField>();

            requestBuffer   = buffer;

            bufLength       = bufLen;

            msgDialect      = new isoDialect(68);

            responseBuffer  = new byte[] { 0 };

            f63v            = String.Empty;

            msgBitmap       = new isoBitmap();

            msgHeader       = new isoHeader();

            // dialect initialized so initialize fields

            for (int i = 0; i < msgDialect.getTotalFields(); i++)
            {
                isoField nIsoField = new isoField();
                fieldList.Add(nIsoField);
                this.fieldList[i].number = i;
                this.fieldList[i].name           = msgDialect.fieldList[i].name;
                this.fieldList[i].fieldEncoding  = msgDialect.fieldList[i].fieldEncoding;
                this.fieldList[i].fieldType      = msgDialect.fieldList[i].fieldType;
                this.fieldList[i].length         = msgDialect.fieldList[i].fixedLength;
                this.fieldList[i].lengthType     = msgDialect.fieldList[i].lengthType;
                this.fieldList[i].description    = msgDialect.fieldList[i].description;
                this.fieldList[i].lengthEncoding = msgDialect.fieldList[i].lengthEncoding;
            }
        }