Пример #1
0
 public FileCallOrSelect(int objectAddress, NameOfFile nof, byte nameOfSection, SelectAndCallQualifier scq)
     : base(objectAddress)
 {
     this.nof           = nof;
     this.nameOfSection = nameOfSection;
     this.scq           = scq;
 }
Пример #2
0
        internal FileCallOrSelect(ApplicationLayerParameters parameters, byte[] msg, int startIndex, bool isSequence)
            : base(parameters, msg, startIndex, isSequence)
        {
            if (!isSequence)
            {
                startIndex += parameters.SizeOfIOA; /* skip IOA */
            }
            if ((msg.Length - startIndex) < GetEncodedSize())
            {
                throw new ASDUParsingException("Message too small");
            }

            int nofValue;

            nofValue  = msg[startIndex++];
            nofValue += (msg[startIndex++] * 0x100);

            nof = (NameOfFile)nofValue;

            nameOfSection = msg[startIndex++];

            /* parse SCQ (select and call qualifier) */
            scq = (SelectAndCallQualifier)msg[startIndex++];
        }