Example #1
0
        public long Accumulate(int mesgNum, int destFieldNum, long value, int bits)
        {
            AccumulatedField accumField = null;
            int i;

            for (i = 0; i < accumulatedFields.Count; i++)
            {
                accumField = accumulatedFields[i];

                if ((accumField.mesgNum == mesgNum) && (accumField.destFieldNum == destFieldNum))
                {
                    break;
                }
            }

            if (i == accumulatedFields.Count)
            {
                accumField = new AccumulatedField(mesgNum, destFieldNum);
                accumulatedFields.Add(accumField);
            }

            return(accumField.Accumulate(value, bits));
        }
Example #2
0
        public void Set(int mesgNum, int destFieldNum, long value)
        {
            AccumulatedField accumField = null;
            int i;

            for (i = 0; i < accumulatedFields.Count; i++)
            {
                accumField = accumulatedFields[i];

                if ((accumField.mesgNum == mesgNum) && (accumField.destFieldNum == destFieldNum))
                {
                    break;
                }
            }

            if (i == accumulatedFields.Count)
            {
                accumField = new AccumulatedField(mesgNum, destFieldNum);
                accumulatedFields.Add(accumField);
            }

            accumField.Set(value);
        }