using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Edge.Core.Parser.BinaryParser.Attributes
{
public class AttributeBase : Attribute
{
///
/// The index value which mapping to the field appearence in raw bytes, based on 0
///
public int Index { get; protected set; }
///
/// encoding type.
///
public EncodingType EncodingType { get; set; }
///
/// If a var length field, then set the linked property name
///
public string LengthOrCountLink { get; protected set; }
///
/// If a fixed length field, then set the length value. otherwise, leave it.
///
public int FixedLengthOrCount { get; protected set; }
///
/// a message typically have a field to input the total length.
///
//public bool IsMessageLengthField { get; set; }
///
/// a field was turned on or off by another field with specific value
/// Tuple, int> means field 'string' control the appearance, if field 'string' equals 'byte[]', then
/// the current field length is 'int'
///
//public Tuple, int> SwitcherLink { get; set; }
///
/// all hex based: 00:04; means value 00 in LengthLink field mapping to length current field length 4.
/// 0102:05; means values of 2 bytes 01 and 02 in LengthLink field mapping to current field length 5.
/// can setup a group of expression, like: 00:04;0102:05;03:0801;
/// MUST END WITH-> ;
///
public string LengthOrCountLinkExpression { get; protected set; }
}
}