public static RecvMessage 設定状態確認NG電文(int channel, NG理由 reason) { RecvMessage message = new RecvMessage(); message.SetChannel(channel); message.body = new char[] { 'N' }.Concat(reason.ToCharArray()).ToArray(); message.CalcChecksum(); return(message); }
public static RecvMessage 調光データ設定電文(int channel, bool isOK, NG理由 reason) { RecvMessage message = new RecvMessage(); message.SetChannel(channel); message.body = isOK ? new char[] { 'O' } : new char[] { 'N' }.Concat(reason.ToCharArray()).ToArray(); message.CalcChecksum(); return(message); }