1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using Edge.Core.Parser.BinaryParser.Attributes;
- using Edge.Core.Parser.BinaryParser.MessageEntity;
- using System.Collections.Generic;
- namespace GasConcentrations_Yt95h.MessageEntity
- {
- public enum FunctionCode
- {
- /// <summary>
- /// Read Holding Registers
- /// </summary>
- READ_HOLDING_REGISTERS = 0x03,
- /// <summary>
- /// Read Input Registers
- /// </summary>
- READ_INPUT_REGISTERS = 0x04,
- /// <summary>
- /// Preset Single Register
- /// </summary>
- PRESET_SINGLE_REGISTER = 0x06,
- /// <summary>
- /// Preset Multiple Registers
- /// </summary>
- PRESET_MULTIPLE_REGISTER = 0x10,
- }
- public abstract class MessageBase : MessageTemplateBase
- {
- [Format(1, EncodingType.BIN, -9990)]
- public byte Address { get; set; }
- [Format(1, EncodingType.BIN, -9980)]
- public FunctionCode FunctionCode { get; set; }
- [EnumerableFormat("%cascade", -9970)]
- public List<byte> RawDataField { get; set; }
- }
- }
|