Пример #1
0
 public PLFRecord()
 {
     YesString          = "Y";
     NoString           = "N";
     SYSTEM_TIME        = new PLFSystemTime();
     FUEL_VOLUME1       = null;
     FUEL_VOLUME2       = null;
     SPEED              = null;
     FUEL_COUNTER       = null;
     DISTANCE_COUNTER   = null;
     FUEL_CONSUMPTION   = null;
     ENGINE_RPM         = null;
     VOLTAGE            = null;
     LATITUDE           = null;
     LONGITUDE          = null;
     ALTITUDE           = null;
     TEMPERATURE1       = null;
     TEMPERATURE2       = null;
     WEIGHT1            = null;
     WEIGHT2            = null;
     WEIGHT3            = null;
     WEIGHT4            = null;
     WEIGHT5            = null;
     MAIN_STATES        = null;
     ADDITIONAL_SENSORS = null;
     RESERVED_3         = null;
     RESERVED_4         = null;
     RESERVED_5         = null;
 }
Пример #2
0
 /// <summary>
 /// Устанавливает значение всех параметров в N(когда параметр в N, значит нет датчика и информация отсутствует.
 /// </summary>
 public void SetNForAllParams()
 {
     SYSTEM_TIME            = new PLFSystemTime();
     SYSTEM_TIME.systemTime = NoString;
     FUEL_VOLUME1           = NoString;
     FUEL_VOLUME2           = NoString;
     SPEED              = NoString;
     FUEL_COUNTER       = NoString;
     DISTANCE_COUNTER   = NoString;
     FUEL_CONSUMPTION   = NoString;
     ENGINE_RPM         = NoString;
     VOLTAGE            = NoString;
     LATITUDE           = NoString;
     LONGITUDE          = NoString;
     ALTITUDE           = NoString;
     TEMPERATURE1       = NoString;
     TEMPERATURE2       = NoString;
     WEIGHT1            = NoString;
     WEIGHT2            = NoString;
     WEIGHT3            = NoString;
     WEIGHT4            = NoString;
     WEIGHT5            = NoString;
     MAIN_STATES        = NoString;
     ADDITIONAL_SENSORS = NoString;
     RESERVED_3         = NoString;
     RESERVED_4         = NoString;
     RESERVED_5         = NoString;
 }
Пример #3
0
 public PLFRecord()
 {
     YesString = "Y";
     NoString = "N";
     SYSTEM_TIME = new PLFSystemTime();
     FUEL_VOLUME1 = null;
     FUEL_VOLUME2 = null;
     SPEED = null;
     FUEL_COUNTER = null;
     DISTANCE_COUNTER = null;
     FUEL_CONSUMPTION = null;
     ENGINE_RPM = null;
     VOLTAGE = null;
     LATITUDE = null;
     LONGITUDE = null;
     ALTITUDE = null;
     TEMPERATURE1 = null;
     TEMPERATURE2 = null;
     WEIGHT1 = null;
     WEIGHT2 = null;
     WEIGHT3 = null;
     WEIGHT4 = null;
     WEIGHT5 = null;
     MAIN_STATES = null;
     ADDITIONAL_SENSORS = null;
     RESERVED_3 = null;
     RESERVED_4 = null;
     RESERVED_5 = null;
 }
Пример #4
0
 /// <summary>
 /// Конструктор по умолчанию
 /// </summary>
 public PLFUnitClass()
 {
     Records = new List<PLFRecord>();
     installedSensors = new PLFRecord();
     ID_DEVICE = "";
     VEHICLE = "";
     TIME_STEP = "";
     START_PERIOD = new PLFSystemTime();
     END_PERIOD = new PLFSystemTime();
 }
Пример #5
0
 /// <summary>
 /// Конструктор по умолчанию
 /// </summary>
 public PLFUnitClass()
 {
     Records          = new List <PLFRecord>();
     installedSensors = new PLFRecord();
     ID_DEVICE        = "";
     VEHICLE          = "";
     TIME_STEP        = "";
     START_PERIOD     = new PLFSystemTime();
     END_PERIOD       = new PLFSystemTime();
 }
Пример #6
0
 /// <summary>
 /// Устанавливает значение всех параметров в N(когда параметр в N, значит нет датчика и информация отсутствует.
 /// </summary>
 public void SetNForAllParams()
 {
     SYSTEM_TIME = new PLFSystemTime();
     SYSTEM_TIME.systemTime = NoString;
     FUEL_VOLUME1 = NoString;
     FUEL_VOLUME2 = NoString;
     SPEED = NoString;
     FUEL_COUNTER = NoString;
     DISTANCE_COUNTER = NoString;
     FUEL_CONSUMPTION = NoString;
     ENGINE_RPM = NoString;
     VOLTAGE = NoString;
     LATITUDE = NoString;
     LONGITUDE = NoString;
     ALTITUDE = NoString;
     TEMPERATURE1 = NoString;
     TEMPERATURE2 = NoString;
     WEIGHT1 = NoString;
     WEIGHT2 = NoString;
     WEIGHT3 = NoString;
     WEIGHT4 = NoString;
     WEIGHT5 = NoString;
     MAIN_STATES = NoString;
     ADDITIONAL_SENSORS = NoString;
     RESERVED_3 = NoString;
     RESERVED_4 = NoString;
     RESERVED_5 = NoString;
 }
Пример #7
0
        //true <=, false >=
        private List<int> CheckDate(List<string> dateArray, DateTime periodDate, bool reverseDirection)
        {
            List<int> returnArray = new List<int>();
            DateTime dateTime = new DateTime();
            PLFSystemTime timeReal;
            int index = 0;

            foreach (string record in dateArray)
            {
                timeReal = new PLFSystemTime(record);
                dateTime = timeReal.GetSystemTime();

                if (reverseDirection == false)
                {
                    if (dateTime.Date >= periodDate.Date)
                        returnArray.Add(index);
                }
                else
                {
                    if (dateTime.Date <= periodDate.Date)
                        returnArray.Add(index);
                }
                index++;
            }
            return returnArray;
        }