/// <summary> /// Returns all bytes of the record data in a single value in binary format /// </summary> /// <returns>binary of record data</returns> public string GetRecordBinaryData() { string BinValue = ""; for (int iByte = 0; iByte < MessageData.Length; iByte++) { string ByteBinValue = NumberBaseConverter.Dec2Bin(MessageData[iByte]); while (ByteBinValue.Length < 8) { ByteBinValue = "0" + ByteBinValue; } BinValue = BinValue + ByteBinValue; } return(BinValue); }
public static string[] GetBinaryRowData(int ParamLength, long lRowValue) { string sBinValue = NumberBaseConverter.Dec2Bin(lRowValue); while (sBinValue.Length < ParamLength) { sBinValue = "0" + sBinValue; } string[] BinRowValue = new string[ParamLength]; int i = ParamLength - 1; while (i >= 0) { BinRowValue[i] = sBinValue.Substring(i, 1); i--; } return(BinRowValue); }