virtual public InstrumentDataReport  CreateInstrumentDataReport(InstrumentDataManager manager,
                                                                        byte deviceId
                                                                        )
        {
            InstrumentDataReport dr = null;

            switch (deviceId)
            {
            case  6: dr = new InstrumentDataReportText(manager, deviceId);
                break;

            case  7: dr = new InstrumentDataReportIllumination(manager, deviceId);
                break;

            case  8: dr = new InstrumentDataReportCTD(manager, deviceId, InstrumentDataReportCTD.OutPutFormat.EngineeringUnitsInDec);
                break;

            case  9: dr = new InstrumentDataReportGPS(manager, deviceId);
                break;

            case 10: dr = new InstrumentDataReportFlowMeter(manager, deviceId);
                break;


            default: dr = new InstrumentDataReport(manager, deviceId);
                break;
            }

            return(dr);
        } /* CreateInstrumentDataReport */
Esempio n. 2
0
        } /* InitializeLatitude */

        /// <summary>
        /// Assigns the reporter.
        /// </summary>
        /// <param name="deviceID">The device ID coming from the SIPPER file.  See Sipper3 File Format.
        ///                        see Sipper3File.cs
        /// </param>
        /// <param name="reporter">The reporter.</param>
        public void  AssignReporter(byte deviceID,
                                    InstrumentDataReport reporter
                                    )
        {
            if ((deviceID < 0) || (deviceID >= MaxNumOfDevices))
            {
                throw new Exception("DeviceID[" + deviceID.ToString() + "] out of range.");
            }

            reporters[deviceID] = reporter;
        } /* AssignReporter */
Esempio n. 3
0
        } /* ReportSerialPortData */

        public void  ReportData(byte deviceId,
                                string txt
                                )
        {
            if ((deviceId < 0) || (deviceId >= reporters.Length))
            {
                return;
            }

            if (reporters[deviceId] == null)
            {
                reporters[deviceId] = new InstrumentDataReport(this, deviceId);
            }

            reporters[deviceId].ReportData(txt);
        } /* ReportData */