Esempio n. 1
0
        public EF_Specific_Conditions(byte[] value, short cardType)
        {
            int noOfSpecificConditionRecords;
            int noOfValidSpecificConditionRecords = 0;

            if (cardType == EquipmentType.DRIVER_CARD)
            {
                // driver card
                noOfSpecificConditionRecords = 56;
            }
            else
            {
                // workshop card
                noOfSpecificConditionRecords = 2;
            }

            specificConditionRecords = new List<SpecificConditionRecord>(noOfSpecificConditionRecords);

            for (int i = 0; i < noOfSpecificConditionRecords; i++)
            {
                SpecificConditionRecord scr = new SpecificConditionRecord(ConvertionClass.arrayCopy(value, i * SpecificConditionRecord.structureSize, SpecificConditionRecord.structureSize));

                if (scr.entryTime.timereal != 0)
                {
                    specificConditionRecords.Add(scr);
                    noOfValidSpecificConditionRecords += 1;
                }
            }
            structureSize = noOfValidSpecificConditionRecords * SpecificConditionRecord.structureSize;
        }
        public VuSpecificConditionData(byte[] value)
        {
            specificConditionRecords = new List<SpecificConditionRecord>();

            noOfSpecificConditionRecords = ConvertionClass.convertIntoUnsigned2ByteInt(ConvertionClass.arrayCopy(value, 0, 2));
            structureSize = 2 + noOfSpecificConditionRecords * SpecificConditionRecord.structureSize;

            if (noOfSpecificConditionRecords != 0)
            {
                for (int i = 0; i < noOfSpecificConditionRecords; i++)
                {
                    byte[] record = ConvertionClass.arrayCopy(value, 2 + (i * SpecificConditionRecord.structureSize), SpecificConditionRecord.structureSize);
                    SpecificConditionRecord scr = new SpecificConditionRecord(record);
                    specificConditionRecords.Add(scr);
                }
            }
        }
Esempio n. 3
0
        public VuSpecificConditionData(byte[] value)
        {
            specificConditionRecords = new List <SpecificConditionRecord>();

            noOfSpecificConditionRecords = ConvertionClass.convertIntoUnsigned2ByteInt(ConvertionClass.arrayCopy(value, 0, 2));
            structureSize = 2 + noOfSpecificConditionRecords * SpecificConditionRecord.structureSize;

            if (noOfSpecificConditionRecords != 0)
            {
                for (int i = 0; i < noOfSpecificConditionRecords; i++)
                {
                    byte[] record = ConvertionClass.arrayCopy(value, 2 + (i * SpecificConditionRecord.structureSize), SpecificConditionRecord.structureSize);
                    SpecificConditionRecord scr = new SpecificConditionRecord(record);
                    specificConditionRecords.Add(scr);
                }
            }
        }