Beispiel #1
0
 public void SendTelegram(string tlgType, string body, ushort blocks, bool LogMessage)
 {
     if (SendConnection != null && plcConnected)
     {
         string telegramHeader = "/,," + tlgType + "," + SystemIdentifier + ",01," + blocks + ",";
         string telegram       = telegramHeader + body + telegramTail;
         this.SendConnection.Send(telegram);
         if (LogMessage)
         {
             this.LogTelegrams(DateTime.Now.ToString() + " MFH<PLC: " + SenderID.ToString() + " " + telegram, Color.Black);
         }
     }
 }
Beispiel #2
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>An hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
 public override int GetHashCode()
 {
     return(string.Concat("DocListFilteredCriteria", DocID.ToString(), DocClassID.ToString(), DocTypeID.ToString(), SenderID.ToString(), RecipientID.ToString(), DocRef.ToString(), DocDate.ToString(), Subject.ToString(), DocStatusID.ToString(), CreateDate.ToString(), CreateUserID.ToString(), ChangeDate.ToString(), ChangeUserID.ToString()).GetHashCode());
 }
Beispiel #3
0
 public override string ToString()
 {
     return("Company UID: " + SenderID.ToString() + "\nEmployee UID: " + UID.ToString());
 }