<commit_before>using System;
using System.Text;

namespace MAXDebug
{
	// The H response contains information about the Cube.
	public class H_Message : IMaxData
	{
		#region Message specific data
		public String MAXserialNumber;
		public Int32 RFAdress;
		public Int32 FirmwareVersion;
		public String HTTPConnId;
		public DateTime CubeDateTime;
		#endregion

		#region ToString override
		public override string ToString ()
		{
			StringBuilder sb = new StringBuilder();
			sb.AppendLine("H-Message:");
			sb.AppendLine("Serial Number: "+MAXserialNumber);
			sb.AppendLine("RF Address: "+RFAdress);
			sb.AppendLine("Firmware Version: "+FirmwareVersion);
			sb.AppendLine("HTTPConnId: "+HTTPConnId);
			sb.AppendLine("DateTime: "+CubeDateTime.ToLongDateString());
			return sb.ToString();
		}
		#endregion

		#region IMaxData implementation
		public MAXMessageType MessageType 
		{
			get 
			{
				return MAXMessageType.M;
			}
		}
		#endregion

		public DateTime DecodeDateTime(String CubeDate, String CubeTime)
		{
			DateTime time = new DateTime();



			return time;
		}

		// initializes this class and processes the given Input Message and fills the Message Fields
		public H_Message (String RAW_Message)<commit_msg>datetime parsing in H Message<commit_after>using System;
using System.Text;

namespace MAXDebug
{
	// The H response contains information about the Cube.
	public class H_Message : IMaxData
	{
		#region Message specific data
		public String MAXserialNumber;
		public Int32 RFAdress;
		public Int32 FirmwareVersion;
		public String HTTPConnId;
		public DateTime CubeDateTime;
		#endregion

		#region ToString override
		public override string ToString ()
		{
			StringBuilder sb = new StringBuilder();
			sb.AppendLine("H-Message:");
			sb.AppendLine("Serial Number: "+MAXserialNumber);
			sb.AppendLine("RF Address: "+RFAdress);
			sb.AppendLine("Firmware Version: "+FirmwareVersion);
			sb.AppendLine("HTTPConnId: "+HTTPConnId);
			sb.AppendLine("DateTime: "+CubeDateTime.ToLongDateString()+" "+CubeDateTime.ToLongTimeString());
			return sb.ToString();
		}
		#endregion

		#region IMaxData implementation
		public MAXMessageType MessageType 
		{
			get 
			{
				return MAXMessageType.M;
			}
		}
		#endregion

		public DateTime DecodeDateTime(String CubeDate, String CubeTime)
		{
			/// Example:
			/// CubeDate: 0c0812
			/// CubeTime: 1505

			Int32 Day = Int32.Parse(CubeDate.Substring (4,2),System.Globalization.NumberStyles.HexNumber);
			Int32 Month = Int32.Parse(CubeDate.Substring(2,2),System.Globalization.NumberStyles.HexNumber);
			Int32 Year = Int32.Parse(CubeDate.Substring(0,2),System.Globalization.NumberStyles.HexNumber)+2000;

			Int32 Hour = Int32.Parse(CubeTime.Substring(0,2),System.Globalization.NumberStyles.HexNumber);
			Int32 Minute = Int32.Parse(CubeTime.Substring(2,2),System.Globalization.NumberStyles.HexNumber);

			DateTime time = new DateTime(Year,Month,Day,Hour,Minute,0);

			return time;
		}

		// initializes this class and processes the given Input Message and fills the Message Fields
		public H_Message (String RAW_Message)
{'fraction_non_alphanumeric': 0.09776626740045322, 'fraction_numerical': 0.016833926837164132, 'mean_word_length': 4.430579964850615, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3135861', 'n_tokens_mistral': 1099, 'n_tokens_neox': 937, 'n_words': 237}