1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Edge.Core.Processor.Dispatcher
- {
- public enum ProcessorTypeEnum { DeviceProcessor, AppProcessor }
- public enum ProcessorMetaPartsTypeEnum
- {
- /// <summary>
- /// the most outer processor, like GenericDeviceProcessor<TRaw, TMessage>,
- /// HalfDuplexActivePollingDeviceProcessor<TRaw, TMessage>
- /// </summary>
- DeviceProcessor,
- DeviceHandler,
- App,
- Parser,
- MessageCutter,
- Communicator,
- // most likey the byte[]
- RawMessageTypeStr,
- MessageTypeStr
- }
- public class ProcessorMetaConfig
- {
- public int Id { get; set; }
- public string SourceEndpointFullTypeStr { get; set; }
- public string Name { get; set; }
- public string Description { get; set; }
- public ProcessorTypeEnum Type { get; set; }
- public IEnumerable<ProcessorMetaPartsConfig> Parts { get; set; }
- public bool Activated { get; set; }
- //public DateTime TimeStamp { get; set; }
- }
- public class ProcessorMetaPartsConfig
- {
- public int Id { get; set; }
- //public int ProcessorMetaConfigId { get; set; }
- //public ProcessorMetaConfig ProcessorMetaConfig { get; set; }
- public ProcessorMetaPartsTypeEnum Type { get; set; }
- public string FullTypeString { get; set; }
- public string ParametersJsonArrayStr { get; set; }
- }
- /// <summary>
- /// Data structure for how construct a Processor instance.
- /// </summary>
- public class ProcessorMetaDescriptor
- {
- public string SourceEndpointFullTypeStr { get; set; }
- public string DisplayName { get; set; }
- public string Description { get; set; }
- public ProcessorTypeEnum Type { get; set; }
- public string[] Tags { get; set; }
- /// <summary>
- /// Gets or sets the MetaPartsGroupDescriptor, a processor is consist of several meta part.
- /// </summary>
- public IEnumerable<ProcessorMetaPartsGroupDescriptor> MetaPartsGroupDescriptors { get; set; }
- //public bool Activated { get; set; }
- //public DateTime TimeStamp { get; set; }
- }
- public class ProcessorMetaPartsGroupDescriptor
- {
- public ProcessorMetaPartsTypeEnum GroupType { get; set; }
- /// <summary>
- /// the available MetaParts list, when in real constructing, will only pick one.
- /// think about the case of a device support multiple communicator.
- /// </summary>
- public IEnumerable<ProcessorMetaPartsDescriptor> MetaPartsDescriptors { get; set; }
- }
- /// <summary>
- /// Data structure for how construct a MetaParts.
- /// </summary>
- public class ProcessorMetaPartsDescriptor
- {
- public string FullTypeString { get; set; }
- public string TypeString { get; set; }
- public string DisplayName { get; set; }
- public string Description { get; set; }
- public IEnumerable<List<string>> ParametersJsonSchemaStrings { get; set; }
- }
- }
|