コード例 #1
0
 public MessageRecord(CommMessage msg)
 {
     SourceIP         = msg.GetSourceIP();
     ComponentName    = msg.GetComponentName();
     MessageCommand   = msg.GetMessageCommand();
     MessageTimestamp = msg.GetMessageTimestamp();
     IsBinary         = msg.GetIsBinary();
     if (IsBinary)
     {
         DataBinary = new byte[msg.GetDataSize()];
         msg.Data.CopyTo(DataBinary, 0);
     }
     else
     {
         DataString = msg.GetDataString();
     }
 }