24 lines
642 B
C#
24 lines
642 B
C#
namespace Common.Hardware.WaterMeter.OmniPlus.Features.Requests
|
|
{
|
|
using Common.Hardware.WaterMeter.OmniPlus.Features.Base;
|
|
|
|
using System;
|
|
|
|
public class FactoryIdRequest : ASCIIRequest
|
|
{
|
|
public FactoryIdRequest(String value = null) : base(FeaturesConstants.FactoryIdLength)
|
|
=> this.Value = value;
|
|
|
|
protected override Byte[] ToByteArray()
|
|
{
|
|
var length = this.bytes.Length;
|
|
var bytes = new Byte[length + 1];
|
|
bytes[0] = FeaturesConstants.SetFactoryId;
|
|
|
|
Array.Copy(this.bytes, 0, bytes, 1, length);
|
|
|
|
return bytes;
|
|
}
|
|
}
|
|
}
|