public void SetProcessorSampleRate(ProcessorType processorType, double sampleRate) { switch (processorType) { case ProcessorType.RawIQ: this.SetSampleRate(this._rawIQProcessors, sampleRate); break; case ProcessorType.DecimatedAndFilteredIQ: this.SetSampleRate(this._decimatedAndFilteredIQProcessors, sampleRate); break; case ProcessorType.DemodulatorOutput: this.SetSampleRate(this._demodulatorOutputProcessors, sampleRate); break; case ProcessorType.FilteredAudioOutput: this.SetSampleRate(this._filteredAudioProcessors, sampleRate); break; case ProcessorType.FMMPX: this.SetSampleRate(this._fmMPXProcessors, sampleRate); break; } }
public void SetProcessorSampleRate(ProcessorType processorType, double sampleRate) { switch (processorType) { case ProcessorType.RawIQ: SetSampleRate(_rawIQProcessors, sampleRate); break; case ProcessorType.FrequencyTranslatedIQ: SetSampleRate(_frequencyTranslatedIQProcessors, sampleRate); break; case ProcessorType.DecimatedAndFilteredIQ: SetSampleRate(_decimatedAndFilteredIQProcessors, sampleRate); break; case ProcessorType.DemodulatorOutput: SetSampleRate(_demodulatorOutputProcessors, sampleRate); break; case ProcessorType.FilteredAudioOutput: SetSampleRate(_filteredAudioProcessors, sampleRate); break; } }
public override int GetHashCode() { unchecked { var hashCode = Id.GetHashCode(); hashCode = (hashCode * 397) ^ (Hash != null ? Hash.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ShopifyCustomerId != null ? ShopifyCustomerId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Email != null ? Email.GetHashCode() : 0); hashCode = (hashCode * 397) ^ CreatedAt.GetHashCode(); hashCode = (hashCode * 397) ^ UpdatedAt.GetHashCode(); hashCode = (hashCode * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (LastName != null ? LastName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BillingAddress1 != null ? BillingAddress1.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BillingAddress2 != null ? BillingAddress2.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BillingZip != null ? BillingZip.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BillingCity != null ? BillingCity.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BillingCompany != null ? BillingCompany.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BillingProvince != null ? BillingProvince.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BillingCountry != null ? BillingCountry.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BillingPhone != null ? BillingPhone.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ProcessorType != null ? ProcessorType.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Status != null ? Status.GetHashCode() : 0); hashCode = (hashCode * 397) ^ HasValidPaymentMethod.GetHashCode(); hashCode = (hashCode * 397) ^ (ReasonPaymentMethodNotValid != null ? ReasonPaymentMethodNotValid.GetHashCode() : 0); hashCode = (hashCode * 397) ^ HasCardErrorInDunning.GetHashCode(); hashCode = (hashCode * 397) ^ NumberActiveSubscriptions.GetHashCode(); hashCode = (hashCode * 397) ^ NumberSubscriptions.GetHashCode(); hashCode = (hashCode * 397) ^ (FirstChargeProcessedAt != null ? FirstChargeProcessedAt.GetHashCode() : 0); return(hashCode); } }
public void SetCraftingUIState(bool IsActive, ProcessorType _type, ProcessingTableTileState tile) { CraftingScreenUI(); craftingManager.buttonState = ButtonState.Openining; craftingManager.GetSetProcessor = _type; craftingManager.CurrentProcessTile = tile; ShowTimeAndCollectable(tile.ItemsCrafted, tile.amount, tile.CraftingTimeRemaining); if (craftingManager.CurrentProcessTile.IsCrafting) { } else { ResetMultiple(); } if (tile.craftingRecipe != null) { craftingManager.SelectSection(tile.craftingRecipe.getSection.ToString()); craftingManager.selectedRecipe = tile.craftingRecipe; craftingManager.ShowRecipe(craftingManager.selectedRecipe); } }
private ProcessorType GetProcessorType(int mdaVersion) { ProcessorType processorType = ProcessorType.Inductive; switch (mdaVersion) { case 0: case 1: case 2: { processorType = ProcessorType.Photonic; break; } case 0x21: { processorType = ProcessorType.Inductive; break; } case 0x22: { processorType = ProcessorType.Inductive; break; } } return(processorType); }
public static Processor Create(ProcessorType processorType) { switch (processorType) { case ProcessorType.KEG: return(new Keg()); case ProcessorType.PRESERVE_JAR: return(new PreserveJar()); case ProcessorType.CHEESE_PRESS: return(new CheesePress()); case ProcessorType.LOOM: return(new Loom()); case ProcessorType.OIL_MAKER: return(new OilMaker()); case ProcessorType.MAYONNAISE_MACHINE: return(new MayonnaiseMachine()); default: throw new UnimplementedCaseException($"Enum value {Enum.GetName(typeof(ProcessorType), processorType)} of Processor.ValidType has no corresponding case"); } }
/// <summary> /// Обновляет значения компонентов, задающих параметры связи с контроллером /// </summary> public void UpdateControlerParameters() { /////////// LoadValues(this.engine.Parameters); /////////// ProcessorType p = ProcessorType.STM32F107; this.DebuggerEngine.Parameters.ProcessorType = p; ControllerProgramSolution sln = ControllerProgramSolution.Create(p); //this.rbInverse.Checked = sln.ProcessorParams.InverseByteOrder; Program.Settings.DeBugger_SettingsProcessesorType = p.ToString(); this.RaiseProcessorChangedEvent(p); //this.ddlProcessorType.SelectedItem = this.engine.Parameters.ProcessorType; this.ddlPortName.SelectedItem = this.engine.Parameters.PortName; this.nudControllerAddress.Value = this.engine.Parameters.ControllerNumber; this.ddlBaudRate.SelectedItem = this.engine.Parameters.BaudRate.ToString(); this.ddlProtocol.SelectedItem = this.engine.Parameters.ProtocolType; //this.tbReadPassword.Text = this.engine.Parameters.ReadPassword; //this.tbWritePassword.Text = this.engine.Parameters.WritePassword; //this.nudPort.Value = this.engine.Parameters.PortNumber; this.tBIP.Text = this.engine.Parameters.PortIP; rbCom.Checked = this.engine.Parameters.ComConection; }
/// <summary> /// Генерирует событие ProcessorChanged /// </summary> private void RaiseProcessorChangedEvent(ProcessorType ProcessorType) { if (this.ProcessorChanged != null) { this.ProcessorChanged(this, new EventArgs <ProcessorType>(ProcessorType)); } }
/// <summary> /// Modifies the output messages. /// </summary> /// <param name="identification">The identification.</param> /// <param name="type">The type.</param> /// <param name="messageTypes">The message types.</param> public void ModifyOutputMessages(Identification identification, ProcessorType type, IEnumerable <MessageType> messageTypes) { var repository = GetReopsitory(identification, type); var serviceInfo = GetServiceInfo(identification, repository); Save(serviceInfo, repository, (bd => bd.SetValue(be => be.OutputTypes, messageTypes))); }
public void Add(ProcessorType processorType) { var processor = _processorFactory[processorType]; _context.Processor = processor; _processorList.Add(processor); }
public NexStarEmulator(string portName, ProcessorType processorType) { _portName = portName; _currentProcessorType = processorType; _cancellationTokenSource = new CancellationTokenSource(); _emulatorTask = new Task(RunSimulation, _cancellationTokenSource.Token); }
protected CloudRouteProcessor( IImportConfig config, ProcessorType processorType, IJ4JLogger?logger) : base(config, processorType, logger) { APIKey = config.APIKey; }
/// <summary> /// Override the default behaviour to base the hash code of the attribute off of the stored values /// </summary> /// <returns>Returns a combined hash to reflect the assigned values</returns> public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 31 + ProcessorType.GetHashCode(); hash = hash * 31 + HandleChildren.GetHashCode(); return(hash); } }
public void GetProcessorType() { StreamReader sr = new StreamReader(cffFilename); while (!sr.EndOfStream) { String line = sr.ReadLine(); line = line.Trim(); if (line.StartsWith(Keywords.processor_types)) { processorTypes = new List <ProcessorType>(); while (!line.StartsWith(Keywords.processortypes_end)) { line = sr.ReadLine(); line = line.Trim(); if (line.StartsWith(Keywords.processor_type)) { ProcessorType processorType = new ProcessorType(); while (!line.StartsWith(Keywords.processortype_end)) { line = sr.ReadLine(); line = line.Trim(); if (line.StartsWith(Keywords.name)) { String[] data = line.Split('='); String name = data[1].Trim().Trim('"'); processorType.Name = name; } if (line.StartsWith(Keywords.c2)) { String[] data = line.Split('='); processorType.C2 = double.Parse(data[1]); } if (line.StartsWith(Keywords.c1)) { String[] data = line.Split('='); processorType.C1 = double.Parse(data[1]); } if (line.StartsWith(Keywords.c0)) { String[] data = line.Split('='); processorType.C0 = double.Parse(data[1]); } } processorTypes.Add(processorType); } } } } }
public EventProcessOptions(string processorName, string processorFullName, ProcessorType processorType, string eventSourceName, int onceProcessCount, TimeSpan onceProcessTimeout, StatusOptions statusOptions, IList <EventSubscribeOptions> subscribeOptions) { this.ProcessorName = processorName; this.ProcessorFullName = processorFullName; this.EventSourceName = eventSourceName; this.OnceProcessCount = onceProcessCount; this.OnceProcessTimeout = onceProcessTimeout; this.StatusOptions = statusOptions; this.SubscribeOptions = subscribeOptions; }
public Computer(ProcessorType processor, ComputerManufacturer manufacturer, OSType operationSystem, int coreClock, int RAM, List <string> programs, List <string> users) { ProcessorType = processor; ComputerManufacturer = manufacturer; OperationSystemType = operationSystem; ProcessorCoreClock = coreClock; RAMVolume = RAM; InstalledPrograms = programs; UserList = users; }
/// <summary> /// Initialize for a processing pass. /// </summary> public void StartPass(JBufMode pass_mode) { switch (pass_mode) { case JBufMode.PassThrough: if (m_cinfo.quantizeColors) { /* Single-pass processing with color quantization. */ m_processor = ProcessorType.OnePass; /* We could be doing buffered-image output before starting a 2-pass * color quantization; in that case, jinit_d_post_controller did not * allocate a strip buffer. Use the virtual-array buffer as workspace. */ if (m_buffer is null) { m_buffer = m_whole_image.Access(0, m_strip_height); } } else { /* For single-pass processing without color quantization, * I have no work to do; just call the upsampler directly. */ m_processor = ProcessorType.Upsample; } break; case JBufMode.SaveAndPass: /* First pass of 2-pass quantization */ if (m_whole_image is null) { m_cinfo.ErrExit(JMessageCode.JERR_BAD_BUFFER_MODE); } m_processor = ProcessorType.PrePass; break; case JBufMode.CrankDest: /* Second pass of 2-pass quantization */ if (m_whole_image is null) { m_cinfo.ErrExit(JMessageCode.JERR_BAD_BUFFER_MODE); } m_processor = ProcessorType.SecondPass; break; default: m_cinfo.ErrExit(JMessageCode.JERR_BAD_BUFFER_MODE); break; } m_starting_row = m_next_row = 0; }
public static bool RequiresAPIKey(this ProcessorType procType) { var memInfo = typeof(ProcessorType).GetField(procType.ToString()); if (memInfo == null) { return(false); } return(memInfo.GetCustomAttribute <ProcessorTypeInfoAttribute>()?.RequiresAPIKey ?? false); }
/// <summary> /// Initialize for a processing pass. /// </summary> public void start_pass(J_BUF_MODE pass_mode) { switch (pass_mode) { case J_BUF_MODE.JBUF_PASS_THRU: if (m_cinfo.m_quantize_colors) { /* Single-pass processing with color quantization. */ m_processor = ProcessorType.OnePass; /* We could be doing buffered-image output before starting a 2-pass * color quantization; in that case, jinit_d_post_controller did not * allocate a strip buffer. Use the virtual-array buffer as workspace. */ if (m_buffer == null) { m_buffer = m_whole_image.Access(0, m_strip_height); } } else { /* For single-pass processing without color quantization, * I have no work to do; just call the upsampler directly. */ m_processor = ProcessorType.Upsample; } break; case J_BUF_MODE.JBUF_SAVE_AND_PASS: /* First pass of 2-pass quantization */ if (m_whole_image == null) { m_cinfo.ERREXIT(J_MESSAGE_CODE.JERR_BAD_BUFFER_MODE); } m_processor = ProcessorType.PrePass; break; case J_BUF_MODE.JBUF_CRANK_DEST: /* Second pass of 2-pass quantization */ if (m_whole_image == null) { m_cinfo.ERREXIT(J_MESSAGE_CODE.JERR_BAD_BUFFER_MODE); } m_processor = ProcessorType.SecondPass; break; default: m_cinfo.ERREXIT(J_MESSAGE_CODE.JERR_BAD_BUFFER_MODE); break; } m_starting_row = m_next_row = 0; }
public void RegisterStreamHook(object streamHook, ProcessorType processorType) { if (_owner.InvokeRequired) { _owner.Invoke(new MethodInvoker(() => _owner.RegisterStreamHook(streamHook, processorType))); } else { _owner.RegisterStreamHook(streamHook, processorType); } }
public static int MaxPointsPerRequest(this ProcessorType procType) { var memInfo = typeof(ProcessorType).GetField(procType.ToString()); if (memInfo == null) { return(100); } return(memInfo.GetCustomAttribute <ProcessorTypeInfoAttribute>()?.MaxPointsPerRequest ?? 100); }
public static bool SnapsToRoute(this ProcessorType procType) { var memInfo = typeof(ProcessorType).GetField(procType.ToString()); if (memInfo == null) { return(false); } return(memInfo.GetCustomAttribute <ProcessorTypeInfoAttribute>()?.IsSnapToRoute ?? false); }
public void RegisterStreamHook(object streamHook, ProcessorType processorType) { if (this._owner.InvokeRequired) { this._owner.Invoke(new MethodInvoker(delegate { this._owner.RegisterStreamHook(streamHook, processorType); })); return; } this._owner.RegisterStreamHook(streamHook, processorType); }
public Laptop (int batteryLife, int ram, int hardDriveSpace, HardDriveType hardDrive, ProcessorType processor, uint core, double price) { this.BatteryLife = batteryLife; this.Ram = ram; this.HardDriveSpace = hardDriveSpace; this.HardDrive = hardDrive; this.Processor = processor; this.Core = core; this.Price = price; }
Computer(ProcessorType _processorType, NameManufacturer _nameManufacturer, TypeOfOperatingSystem _typeOfOperatingSystem, int _processClockSpeed, int _amountOfRAM, List <string> _InstalledSoftware, List <string> _UsersOfSystem) { InstalledSoftware = new List <string>(); UsersOfSystem = new List <string>(); processorType = _processorType; nameManufacturer = _nameManufacturer; typeOfOperatingSystem = _typeOfOperatingSystem; processClockSpeed = _processClockSpeed; amountOfRAM = _amountOfRAM; InstalledSoftware = _InstalledSoftware; UsersOfSystem = _UsersOfSystem; }
public EventProcessOptionsBuilder WithProcessor(string name, Type type) { this._processorName = name; this._processorFullName = type.FullName; if (type.BaseType == typeof(Grain)) { _processorType = ProcessorType.GrainProcessor; } else { _processorType = ProcessorType.SimpleProcessor; } return(this); }
private static IApplicationProcessorBuilder GetBuilder(ProcessorType processorType) { switch (processorType) { case ProcessorType.ProducerConsumer: return(new ProducerConsumerProcessorBuilder()); case ProcessorType.ScheduledJob: case ProcessorType.Task: throw new NotSupportedException($"The processor type '{processorType}' is not supported."); } return(null); }
public void RegisterStreamHook(object streamHook, ProcessorType processorType) { if (this._owner.InvokeRequired) { this._owner.Invoke((MethodInvoker) delegate { this._owner.RegisterStreamHook(streamHook, processorType); }); } else { this._owner.RegisterStreamHook(streamHook, processorType); } }
public static void Execute(CommandExecutionContext *context) { // ARCHDEPENDS: X86 IProcessor[] cpus = Architecture.GetProcessors(); TextMode.SaveAttributes(); for (int i = 0; i < cpus.Length; i++) { ProcessorType type = cpus[i].ArchType; if (type == ProcessorType.IA32) { RenderItem("Architecture: ", "IA32"); } if (type == ProcessorType.IA64) { RenderItem("Architecture: ", "IA64"); } if (type == ProcessorType.Unknown) { RenderItem("Architecture: ", "Unknown"); } RenderItem("CPU Vendor: ", cpus[i].VendorName); RenderItem("CPU Brand: ", cpus[i].BrandName); RenderItem("CPU Family: ", cpus[i].FamilyName); RenderItem("CPU Model: ", cpus[i].ModelName); //RenderItem("CPU ClockSpeed: ", cpus[i].ClockSpeed); //RenderItem("CPU CacheSize: ", cpus[i].CacheSize); RenderItemTitle("CPU Flags: "); ProcessorFeature[] features = cpus[i].Features; for (int f = 0; f < features.Length; f++) { if (features[f] == null) { TextMode.Write("? "); continue; } TextMode.Write(features[f].FeatureName); TextMode.Write(" "); } TextMode.WriteLine(); TextMode.RestoreAttributes(); } }
public IProcessor Create(ProcessorType type, object mandatoryArgument, object value) { switch (type) { case ProcessorType.GreaterThan: return new GreaterProcessor(mandatoryArgument, value); case ProcessorType.StringEqual: return new StringEqualsProcessor(mandatoryArgument, value); /* * we still have to go implement all the other classes! */ default: throw new NotImplementedException("The processor type '" + type + "' has not been implemented in this factory."); } }
public EventProcessOptionsBuilder WithProcessor(string name, Type type) { this._processorHandle = type; this._processorName = name; this._processorFullName = type.FullName; if (typeof(Grain).IsAssignableFrom(type)) { _processorType = ProcessorType.GrainProcessor; } else { _processorType = ProcessorType.SimpleProcessor; } return(this); }
public void RegisterStreamHook(object hook, ProcessorType processorType) { switch (processorType) { case ProcessorType.RawIQ: lock (this._rawIQProcessors) { this._rawIQProcessors.Add((IIQProcessor) hook); break; } case ProcessorType.FrequencyTranslatedIQ: lock (this._frequencyTranslatedIQProcessors) { this._frequencyTranslatedIQProcessors.Add((IIQProcessor) hook); break; } case ProcessorType.DecimatedAndFilteredIQ: lock (this._decimatedAndFilteredIQProcessors) { this._decimatedAndFilteredIQProcessors.Add((IIQProcessor) hook); break; } case ProcessorType.DemodulatorOutput: lock (this._demodulatorOutputProcessors) { this._demodulatorOutputProcessors.Add((IRealProcessor) hook); break; } case ProcessorType.FilteredAudioOutput: lock (this._filteredAudioProcessors) { this._filteredAudioProcessors.Add((IRealProcessor) hook); break; } case ProcessorType.FMMPX: lock (this._fmMPXProcessors) { this._fmMPXProcessors.Add((IRealProcessor) hook); break; } case ProcessorType.RDSBitStream: lock (this._rdsBitStreamProcessors) { this._rdsBitStreamProcessors.Add((IRdsBitStreamProcessor) hook); break; } } }
public IProcessor Create(ProcessorType type, object mandatoryArgument, object value) { switch (type) { case ProcessorType.GreaterThan: return new NumericProcessor(mandatoryArgument, value, (_, x, y) => x < y); case ProcessorType.StringEqual: return new StringProcessor(mandatoryArgument, value, (_, x, y) => x == y); /* * Look how easy it is to add new processors! Exercise for you: * implement the remaining processors in the enum! */ default: throw new NotImplementedException("The processor type '" + type + "' has not been implemented in this factory."); } }
protected RouteProcessor( IGeoConfig config, ProcessorType processorType, IJ4JLogger?logger) { Configuration = config.ProcessorInfo !; Processor = config.ProcessorType; ProcessorType = processorType; ReportingInterval = ProcessorType.MaxPointsPerRequest() == int.MaxValue ? 500 : ProcessorType.MaxPointsPerRequest() * 5; Logger = logger; Logger?.SetLoggedType(GetType()); }
public void RegisterStreamHook(object hook, ProcessorType processorType) { switch (processorType) { case ProcessorType.RawIQ: lock (_rawIQProcessors) { _rawIQProcessors.Add((IIQProcessor) hook); } break; case ProcessorType.FrequencyTranslatedIQ: lock (_frequencyTranslatedIQProcessors) { _frequencyTranslatedIQProcessors.Add((IIQProcessor) hook); } break; case ProcessorType.DecimatedAndFilteredIQ: lock (_decimatedAndFilteredIQProcessors) { _decimatedAndFilteredIQProcessors.Add((IIQProcessor) hook); } break; case ProcessorType.DemodulatorOutput: lock (_demodulatorOutputProcessors) { _demodulatorOutputProcessors.Add((IRealProcessor) hook); } break; case ProcessorType.FilteredAudioOutput: lock (_filteredAudioProcessors) { _filteredAudioProcessors.Add((IRealProcessor) hook); } break; } }
public void RegisterStreamHook(object streamHook, ProcessorType processorType) { if (this._owner.InvokeRequired) this._owner.Invoke((Delegate) (() => this._owner.RegisterStreamHook(streamHook, processorType))); else this._owner.RegisterStreamHook(streamHook, processorType); }
public void SetProcessorSampleRate(ProcessorType processorType, double sampleRate) { switch (processorType) { case ProcessorType.RawIQ: this.SetSampleRate(this._rawIQProcessors, sampleRate); break; case ProcessorType.FrequencyTranslatedIQ: this.SetSampleRate(this._frequencyTranslatedIQProcessors, sampleRate); break; case ProcessorType.DecimatedAndFilteredIQ: this.SetSampleRate(this._decimatedAndFilteredIQProcessors, sampleRate); break; case ProcessorType.DemodulatorOutput: this.SetSampleRate(this._demodulatorOutputProcessors, sampleRate); break; case ProcessorType.FilteredAudioOutput: this.SetSampleRate(this._filteredAudioProcessors, sampleRate); break; case ProcessorType.FMMPX: this.SetSampleRate(this._fmMPXProcessors, sampleRate); break; } }
public AsusLaptop(string mouse, int batteryLife, int ram, int hardDriveSpace, HardDriveType hardDrive, ProcessorType processor, uint core, double price) : base (batteryLife, ram, hardDriveSpace, hardDrive, processor, core, price) { this.Mouse = mouse; }
/// <summary> /// Initialize for a processing pass. /// </summary> public void start_pass(J_BUF_MODE pass_mode) { switch (pass_mode) { case J_BUF_MODE.JBUF_PASS_THRU: if (m_cinfo.m_quantize_colors) { /* Single-pass processing with color quantization. */ m_processor = ProcessorType.OnePass; /* We could be doing buffered-image output before starting a 2-pass * color quantization; in that case, jinit_d_post_controller did not * allocate a strip buffer. Use the virtual-array buffer as workspace. */ if (m_buffer == null) m_buffer = m_whole_image.Access(0, m_strip_height); } else { /* For single-pass processing without color quantization, * I have no work to do; just call the upsampler directly. */ m_processor = ProcessorType.Upsample; } break; case J_BUF_MODE.JBUF_SAVE_AND_PASS: /* First pass of 2-pass quantization */ if (m_whole_image == null) m_cinfo.ERREXIT(J_MESSAGE_CODE.JERR_BAD_BUFFER_MODE); m_processor = ProcessorType.PrePass; break; case J_BUF_MODE.JBUF_CRANK_DEST: /* Second pass of 2-pass quantization */ if (m_whole_image == null) m_cinfo.ERREXIT(J_MESSAGE_CODE.JERR_BAD_BUFFER_MODE); m_processor = ProcessorType.SecondPass; break; default: m_cinfo.ERREXIT(J_MESSAGE_CODE.JERR_BAD_BUFFER_MODE); break; } m_starting_row = m_next_row = 0; }
internal void SetParamaters(ushort frequency, byte processorType, byte processorState) { if (base.CompletionCode == 0) { // set the response frequency this.Frequency = frequency; // set the processor type. if (Enum.IsDefined(typeof(ProcessorType), processorType)) { this.ProcessorType = (ProcessorType)processorType; } else { this.ProcessorType = ProcessorType.Unknown; } // set the processor state. if (Enum.IsDefined(typeof(ProcessorState), processorState)) { this.ProcessorState = (ProcessorState)processorState; } else { this.ProcessorState = ProcessorState.Unknown; } } }
public void RegisterStreamHook(object streamHook, ProcessorType processorType) { if (!IsPlaying) { _vfoHookManager.RegisterStreamHook(streamHook, processorType); } }
static void Main(string[] args) { // Determine which processor to run; user passes in the string name of the processor if(args.Length > 0) { ProcessorType processorFromArgs; if (Enum.TryParse(args[0], out processorFromArgs)) { ProcessingType = processorFromArgs; } } if (ProcessingType == ProcessorType.UriChecker) { Console.WriteLine("Running UriChecker..."); UriChecker.FixInvalidHighResUri(); } else { executeRowImportProcessor(); } Console.ReadLine(); }
public void RegisterStreamHook(object streamHook, ProcessorType processorType) { if (this.IsPlaying) return; this._hookManager.RegisterStreamHook(streamHook, processorType); }
/// <summary> /// Gets the reopsitory. /// </summary> /// <param name="identification">The identification.</param> /// <param name="type">The type.</param> /// <returns></returns> private IServiceInfoRepository GetReopsitory(Identification identification, ProcessorType type) { return IsBus(identification, type) ? _busRepository : _serviceRepository; }
/// <summary> /// Determines whether the specified identification is bus. /// </summary> /// <param name="identification">The identification.</param> /// <param name="type">The type.</param> /// <returns> /// <c>true</c> if the specified identification is bus; otherwise, <c>false</c>. /// </returns> private static bool IsBus(Identification identification, ProcessorType type) { return IdentitySpec.Instance.IsSatisfiedBy(identification) && BusTypeSpec.Instance.IsSatisfiedBy(type); }
private static void executeRowImportProcessor() { string csvFile = Directory.GetCurrentDirectory() + @"\images.csv"; Console.WriteLine("CSV File: {0}", csvFile); List<ImageData> images = new List<ImageData>(); DatasetImporter dataSetImporter = new DatasetImporter(); ImageDataImporter imageDataImporter = new ImageDataImporter(); LocationImporter locationImporter = new LocationImporter(); FeatureImporter featureImporter = new FeatureImporter(); ImageXFeatureImporter imagexFeatureImporter = new ImageXFeatureImporter(); STARTPROCESSING: StreamReader reader = new StreamReader(csvFile); MarbleDataBase database = new MarbleDataBase(); try { //don't need this line string header = reader.ReadLine(); //this speeds it up database.Configuration.AutoDetectChangesEnabled = false; //init processor switch (ProcessingType) { case ProcessorType.DataSet: Console.WriteLine("Data Set Init"); dataSetImporter.Init(database); break; case ProcessorType.ImageData: Console.WriteLine("Image Data Init"); imageDataImporter.Init(database); break; case ProcessorType.Location: Console.WriteLine("Location Init"); locationImporter.Init(database); break; case ProcessorType.Feature: Console.WriteLine("Feature Init"); featureImporter.Init(database); break; case ProcessorType.ImageXFeature: Console.WriteLine("Imagexfeature Init"); imagexFeatureImporter.Init(database); break; } do { try { string nextLine = reader.ReadLine(); string[] tokens = nextLine.Split(','); if (tokens.Length != 12) { Console.WriteLine("Not enough tokens, skipping line: " + tokens.ToString()); continue; } string missionDesc = tokens[0]; //process data record switch (ProcessingType) { case ProcessorType.DataSet: dataSetImporter.ProcessRecord(tokens); break; case ProcessorType.ImageData: imageDataImporter.ProcessRecord(tokens); break; case ProcessorType.Location: locationImporter.ProcessRecord(tokens); break; case ProcessorType.Feature: featureImporter.ProcessRecord(tokens); break; case ProcessorType.ImageXFeature: imagexFeatureImporter.ProcessRecord(tokens); break; } } catch (Exception ex) { Console.WriteLine(string.Format("Import of row failed with error '{0}'", ex.ToString())); } } while (reader.Peek() >= 0); } catch (Exception ex) { Console.WriteLine("ERROR, terminating importer"); Console.WriteLine(ex); } finally { reader.Close(); //finalize data record switch (ProcessingType) { case ProcessorType.DataSet: Console.WriteLine("Close up dataset"); dataSetImporter.CloseUp(); break; case ProcessorType.ImageData: Console.WriteLine("Close up image"); imageDataImporter.CloseUp(); break; case ProcessorType.Location: Console.WriteLine("Close up locations"); locationImporter.CloseUp(); break; case ProcessorType.Feature: Console.WriteLine("Close up features"); featureImporter.CloseUp(); break; case ProcessorType.ImageXFeature: Console.WriteLine("Close up imagexfeature"); imagexFeatureImporter.CloseUp(); break; } database.Dispose(); } if (ProcessingType == ProcessorType.DataSet) { ProcessingType = ProcessorType.ImageData; goto STARTPROCESSING; } if (ProcessingType == ProcessorType.ImageData) { ProcessingType = ProcessorType.Location; goto STARTPROCESSING; } if (ProcessingType == ProcessorType.Location) { ProcessingType = ProcessorType.Feature; goto STARTPROCESSING; } if (ProcessingType == ProcessorType.Feature) { ProcessingType = ProcessorType.ImageXFeature; goto STARTPROCESSING; } }
/// <summary> /// Modifies the output messages. /// </summary> /// <param name="identification">The identification.</param> /// <param name="type">The type.</param> /// <param name="messageTypes">The message types.</param> public void ModifyOutputMessages(Identification identification, ProcessorType type, IEnumerable<MessageType> messageTypes) { var repository = GetReopsitory(identification, type); var serviceInfo = GetServiceInfo(identification, repository); Save(serviceInfo, repository, (bd => bd.SetValue(be => be.OutputTypes, messageTypes))); }
public HewlettPackardLaptop(string joystick, int batteryLife, int ram, int hardDriveSpace, HardDriveType hardDrive, ProcessorType processor, uint core, double price) : base (batteryLife, ram, hardDriveSpace, hardDrive, processor, core, price) { this.Joystick = joystick; }