示例#1
0
        /***
         * Constructor for load dll
         ***/
        public LoadDll(string dllPath, string fileName, Flight_Info flight_Info)
        {
            ptrDll = NativeMethods.LoadLibrary(@dllPath);
            //oh dear, error handling here
            //if (ptrDll == IntPtr.Zero)

            IntPtr pAddressOfFunctionToCallCreate = NativeMethods.GetProcAddress(ptrDll, "Create");
            IntPtr pAddressOfFunctionToCallGetAllAnomalyReport = NativeMethods.GetProcAddress(ptrDll, "GetAllAnomalyReport");

            Create create = (Create)Marshal.GetDelegateForFunctionPointer(
                pAddressOfFunctionToCallCreate, typeof(Create));

            getAllAnomalyReport = (GetAllAnomalyReport)Marshal.GetDelegateForFunctionPointer(
                pAddressOfFunctionToCallGetAllAnomalyReport, typeof(GetAllAnomalyReport));

            dataDll = create(fileName);

            this.flight_Info = flight_Info;
            setAnomalyReport();
        }
示例#2
0
        /*
         * Constructor - initialize model with given client.
         */
        public MyFlightModel(IClient client)
        {
            RowCount        = 0;
            FrameId         = 0;
            DllPluged       = false;
            Frequency       = 1;
            info            = new Flight_Info();
            this.client     = client;
            AttributesNames = new List <string>();
            MainGraph       = new List <DataPoint>();
            LinePoints      = new List <DataPoint>();
            LatestPoints    = new List <DataPoint>();
            CorrelatedGraph = new List <DataPoint>();
            AnomaliesPoints = new List <DataPoint>();
            AnomaliesLine   = new List <DataPoint>();

            AnomaliesList         = new List <string>();
            FinishedStart         = true;
            ShouldStop            = false;
            showCorrelationGraphs = false;
            x = 0;
            y = 0;
        }