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
{
///
/// the most outer processor, like GenericDeviceProcessor,
/// HalfDuplexActivePollingDeviceProcessor
///
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 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; }
}
///
/// Data structure for how construct a Processor instance.
///
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; }
///
/// Gets or sets the MetaPartsGroupDescriptor, a processor is consist of several meta part.
///
public IEnumerable MetaPartsGroupDescriptors { get; set; }
//public bool Activated { get; set; }
//public DateTime TimeStamp { get; set; }
}
public class ProcessorMetaPartsGroupDescriptor
{
public ProcessorMetaPartsTypeEnum GroupType { get; set; }
///
/// the available MetaParts list, when in real constructing, will only pick one.
/// think about the case of a device support multiple communicator.
///
public IEnumerable MetaPartsDescriptors { get; set; }
}
///
/// Data structure for how construct a MetaParts.
///
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> ParametersJsonSchemaStrings { get; set; }
}
}