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); } } }
/// <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()); }
public override string ToString() { return("Company UID: " + SenderID.ToString() + "\nEmployee UID: " + UID.ToString()); }