1234567891011121314151617181920212223242526272829303132333435 |
- using Edge.Core.Parser.BinaryParser.Attributes;
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace VeederRoot_ATG_Console.MessageEntity.Outgoing
- {
- /// <summary>
- /// SOH + SecurityCode(optional) + FunctionCode + DataField(optional)
- /// </summary>
- public abstract class OutgoingMessageBase : MessageBase
- {
- /// <summary>
- /// Init an outgoing message, 3 parameters construct a complete FunctionCode, like i20101, S50500
- /// </summary>
- /// <param name="messageFormat">Display or Command</param>
- /// <param name="functionCode">Function code, 3 digts</param>
- /// <param name="functionCodeAppendix">2 digits with ASCII encoding chars, like 00 in S50500, if input null, then PadRight with two '0'</param>
- public OutgoingMessageBase(MessageFormat messageFormat,
- FuncCode functionCode, string functionCodeAppendix)
- {
- base.FunctionCode =
- new Tuple<MessageFormat, FuncCode, string>(
- messageFormat,
- functionCode,
- functionCodeAppendix);
- }
- [EnumerableFormat(6, -9998)]
- public List<byte> SecurityCode { get; set; }
- [EnumerableFormat("%cascade", -8000)]
- public List<byte> DataField { get; set; }
- }
- }
|