-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEthernet.cs
854 lines (746 loc) · 27.6 KB
/
Ethernet.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using Unitronics.ComDriver.Messages;
using System.Configuration;
using System.Security;
using System.Diagnostics;
namespace Unitronics.ComDriver
{
public class Ethernet : Channel
{
#region Locals
private int m_remotePort;
private string m_remoteIPorHostName = "";
private EthProtocol m_protocol;
private int connectTimeOut = 5000;
private Socket m_PLCSocket;
private int m_bytesNo;
private byte[] m_header;
private int transactionIdentifier = 0;
private byte[] ethernetHeader;
private byte[] incomingData = new byte[0];
private bool messageReceived = false;
private SocketAsyncEventArgs socketAsyncEventArgs = new SocketAsyncEventArgs();
private const String STX_STRING = "/_OPLC";
private byte _messageEnumerator = 0;
private bool _suppressEthernetHeader = false;
#endregion
#region Properties
private class SocketState
{
public enum ConnectionState
{
Connecting,
Connected,
Failed,
}
public Socket Socket { get; set; }
public ConnectionState State { get; set; }
}
public override bool Connected
{
get
{
if (m_PLCSocket == null)
return false;
return m_PLCSocket.Connected;
}
}
public int RemotePort
{
get { return m_remotePort; }
set
{
if (m_remotePort != value)
{
if (PLCFactory.ValidateChannelPropertyChange(this, m_remoteIPorHostName, value))
{
if ((m_PLCSocket == null) || (!m_PLCSocket.Connected))
{
m_remotePort = value;
}
else
{
throw new ComDriveExceptions("Remote Port cannot be modified on an opened connection",
ComDriveExceptions.ComDriveException.CommunicationParamsException);
}
}
else
{
throw new ComDriveExceptions(
"Cannot change Remote Port since it will result a duplicated channel with the same Remote Port and IP Address",
ComDriveExceptions.ComDriveException.CommunicationParamsException);
}
}
}
}
// Remote IP property is also used for Host Name.
public string RemoteIP
{
get { return m_remoteIPorHostName; }
set
{
if (m_remoteIPorHostName != value)
{
if (PLCFactory.ValidateChannelPropertyChange(this, value, m_remotePort))
{
if ((m_PLCSocket == null) || (!m_PLCSocket.Connected))
{
m_remoteIPorHostName = value;
}
else
{
throw new ComDriveExceptions("Remote IP cannot be modified on an opened connection",
ComDriveExceptions.ComDriveException.CommunicationParamsException);
}
}
else
{
throw new ComDriveExceptions(
"Cannot change Remote IP since it will result a duplicated channel with the same Remote Port and IP Address",
ComDriveExceptions.ComDriveException.CommunicationParamsException);
}
}
}
}
public EthProtocol Protocol
{
get { return m_protocol; }
set { m_protocol = value; }
}
public int ConnectTimeOut
{
get { return connectTimeOut; }
set { connectTimeOut = value; }
}
#endregion
#region Constructor
public Ethernet()
: base()
{
}
public Ethernet(int retry, int TimeOut)
: base(retry, TimeOut)
{
//Connect();
}
public Ethernet(string remoteIpOrHostName, Int32 remotePort, EthProtocol protocolType)
{
m_protocol = protocolType;
m_remoteIPorHostName = remoteIpOrHostName;
m_remotePort = remotePort;
//Connect();
}
public Ethernet(string remoteIpOrHostName, Int32 remotePort, EthProtocol protocolType, int retry, int TimeOut)
: base(retry, TimeOut)
{
m_protocol = protocolType;
m_remoteIPorHostName = remoteIpOrHostName;
m_remotePort = remotePort;
//Connect();
}
public Ethernet(string remoteIpOrHostName, Int32 remotePort, EthProtocol protocolType, int retry, int TimeOut,
int ConnectTimeOut)
: base(retry, TimeOut)
{
m_protocol = protocolType;
m_remoteIPorHostName = remoteIpOrHostName;
m_remotePort = remotePort;
//Connect();
}
#endregion
#region Public
internal override string GetLoggerChannelText()
{
return Utils.HelperComDriverLogger.GetLoggerChannel(this);
}
internal override void SendString(string text, byte messageEnumerator, bool isIdMessage = false,
bool suppressEthernetHeader = false)
{
_messageEnumerator = messageEnumerator;
_suppressEthernetHeader = suppressEthernetHeader;
if (m_PLCSocket == null)
throw new ComDriveExceptions("Socket is not initialized!",
ComDriveExceptions.ComDriveException.GeneralCommunicationError);
if (!m_PLCSocket.Connected)
Connect();
byte[] messageBuffer = strToByteArray(text.Replace(" ", ""));
byte[] ethernetCommand;
if (_suppressEthernetHeader)
{
ethernetCommand = messageBuffer;
}
else
{
ethernetCommand = getTcpCommand(messageBuffer, isIdMessage);
}
ethernetHeader = ethernetCommand.Take(4).ToArray();
try
{
m_bytesNo = m_PLCSocket.Send(ethernetCommand);
}
catch (ArgumentNullException)
{
throw;
}
catch (SocketException)
{
throw;
}
catch (ObjectDisposedException)
{
throw;
}
finally
{
transactionIdentifier++;
if (transactionIdentifier == 0x2f2f)
transactionIdentifier++;
transactionIdentifier = transactionIdentifier % 0xFFFF;
}
}
internal override void SendBytes(byte[] bytes, byte messageEnumerator)
{
_messageEnumerator = messageEnumerator;
if (m_PLCSocket == null)
return;
if (!m_PLCSocket.Connected)
Connect();
byte[] ethernetCommand = getTcpCommand(bytes, false);
ethernetHeader = ethernetCommand.Take(4).ToArray();
try
{
m_bytesNo = m_PLCSocket.Send(ethernetCommand);
}
catch (ArgumentNullException)
{
throw;
}
catch (SocketException)
{
throw;
}
catch (ObjectDisposedException)
{
throw;
}
finally
{
transactionIdentifier++;
if (transactionIdentifier == 0x2f2f)
transactionIdentifier++;
transactionIdentifier = transactionIdentifier % 0xFFFF;
}
}
internal override string ReceiveString()
{
messageReceived = false;
incomingData = new byte[0];
if (m_PLCSocket == null || m_PLCSocket.Connected == false)
throw new TimeoutException();
byte[] receivedData = new byte[1024];
m_PLCSocket.ReceiveTimeout = TimeOut;
while (!messageReceived)
{
int received = m_PLCSocket.Receive(receivedData);
socketReceivedString(receivedData, received);
}
if (!messageReceived)
{
//m_PLCSocket.Shutdown(SocketShutdown.Receive);
throw new TimeoutException();
}
return ASCIIEncoding.ASCII.GetString(incomingData);
}
internal override byte[] ReceiveBytes()
{
messageReceived = false;
incomingData = new byte[0];
if (m_PLCSocket == null || m_PLCSocket.Connected == false)
throw new TimeoutException();
byte[] receivedData = new byte[1024];
m_PLCSocket.ReceiveTimeout = TimeOut;
try
{
while (!messageReceived)
{
int received = m_PLCSocket.Receive(receivedData);
socketReceivedBytes(receivedData, received);
}
}
catch
{
}
if (!messageReceived)
{
throw new TimeoutException();
}
return incomingData;
}
private void socketReceivedString(byte[] incomingBytes, int count)
{
bool bStxFound = false;
bool bEtxFound = false;
string incomingString = "";
byte[] tempBuffer;
byte[] tcpHeader;
int index = 0;
int checksum = 0;
try
{
int cbRead = 0;
cbRead = count;
if (cbRead > 0)
{
byte[] temp = new byte[cbRead];
Array.Copy(incomingBytes, 0, temp, 0, cbRead);
ComDriverLogger.LogReceivedMessageChunk(DateTime.Now,
Utils.HelperComDriverLogger.GetLoggerChannel(this), temp);
byte[] tmpBuffer = new byte[incomingData.Length + cbRead];
Array.Copy(incomingData, 0, tmpBuffer, 0, incomingData.Length);
Array.Copy(temp, 0, tmpBuffer, incomingData.Length, cbRead);
incomingData = tmpBuffer;
}
else
{
// Socket was closed?
m_PLCSocket.Close();
}
}
catch
{
// Socket Error?
m_PLCSocket.Close();
}
tcpHeader = ethernetHeader;
incomingString = ASCIIEncoding.ASCII.GetString(incomingData);
if (!_suppressEthernetHeader && incomingString.Length >= Utils.Lengths.LENGTH_TCP_HEADER)
{
if (incomingData.Take(4).SequenceEqual(tcpHeader) == true)
{
tempBuffer = new byte[incomingString.Length - 6];
Array.Copy(incomingData, 6, tempBuffer, 0, incomingData.Length - 6);
incomingData = tempBuffer;
incomingString = ASCIIEncoding.ASCII.GetString(incomingData);
}
else
{
//throw new ComDriveExceptions("Ethernet Transaction ID mismatch", ComDriveExceptions.ComDriveException.TransactionIdMismatch);
}
}
if (incomingString.Length > 0)
{
index = incomingString.IndexOf("/"); // find the STX
if (index >= 0)
{
incomingString = incomingString.Substring(index, incomingString.Length - index);
bStxFound = true;
}
else
{
if (incomingString.Length > 100)
{
throw new ComDriveExceptions("STX is missing",
ComDriveExceptions.ComDriveException.CommunicationTimeout);
}
}
index = incomingString.IndexOf("\r"); // find the ETX
if (index >= 0)
{
incomingString = incomingString.Substring(0, index + 1);
bEtxFound = true;
}
}
if (!bStxFound || !bEtxFound)
{
return;
}
for (int i = 2; i < incomingString.Length - 3; i++)
{
checksum += incomingData[i];
}
string CRC = Utils.DecimalToHex(checksum % 256);
if (CRC != incomingString.Substring(incomingString.Length - 3, 2))
{
throw new ComDriveExceptions("Wrong Data Checksum", ComDriveExceptions.ComDriveException.ChecksumError);
}
messageReceived = true;
}
private void socketReceivedBytes(byte[] incomingBytes, int count)
{
bool bStxFound = false;
byte[] tempBuffer;
string bufferAsString;
int index = 0;
int totalLength = 0;
byte[] tcpHeader;
const int HEADER_LENGTH = 24;
tcpHeader = ethernetHeader;
try
{
int cbRead = 0;
cbRead = count;
if (cbRead > 0)
{
byte[] temp = new byte[cbRead];
Array.Copy(incomingBytes, 0, temp, 0, cbRead);
ComDriverLogger.LogReceivedMessageChunk(DateTime.Now,
Utils.HelperComDriverLogger.GetLoggerChannel(this), temp);
byte[] tmpBuffer = new byte[incomingData.Length + cbRead];
Array.Copy(incomingData, 0, tmpBuffer, 0, incomingData.Length);
Array.Copy(temp, 0, tmpBuffer, incomingData.Length, cbRead);
incomingData = tmpBuffer;
}
else
{
// Socket was closed?
m_PLCSocket.Close();
}
}
catch
{
// Socket Error?
m_PLCSocket.Close();
}
if (incomingData.Length >= Utils.Lengths.LENGTH_TCP_HEADER)
{
if (incomingData.Take(4).SequenceEqual(tcpHeader) == true)
{
tempBuffer = new byte[incomingData.Length - 6];
Array.Copy(incomingData, 6, tempBuffer, 0, incomingData.Length - 6);
incomingData = tempBuffer;
}
else
{
//throw new ComDriveExceptions("Ethernet Transaction ID mismatch", ComDriveExceptions.ComDriveException.TransactionIdMismatch);
}
}
if (incomingData.Length > 0)
{
bufferAsString = ASCIIEncoding.ASCII.GetString(incomingData);
index = bufferAsString.IndexOf(STX_STRING);
if (index >= 0)
{
tempBuffer = new byte[incomingData.Length - index];
Array.Copy(incomingData, index, tempBuffer, 0, incomingData.Length - index);
incomingData = tempBuffer;
bStxFound = true;
}
else
{
if (incomingData.Length > 100)
{
throw new ComDriveExceptions("STX is missing",
ComDriveExceptions.ComDriveException.CommunicationTimeout);
}
}
}
if (!bStxFound)
{
return;
}
if (incomingData.Length < HEADER_LENGTH)
{
return;
}
totalLength = BitConverter.ToUInt16(incomingData, 20) +
HEADER_LENGTH + 3; // 3 for data checksum + ETX
if (incomingData.Length < totalLength)
{
return;
}
tempBuffer = new byte[totalLength];
Array.Copy(incomingData, 0, tempBuffer, 0, totalLength);
incomingData = tempBuffer;
tempBuffer = null;
if (incomingData[totalLength - 1] != 92) // 92 is '\' which is the ETX
{
throw new ComDriveExceptions("ETX is missing", ComDriveExceptions.ComDriveException.ETXMissing);
}
messageReceived = true;
}
internal override void Connect()
{
if (m_PLCSocket != null)
{
if (m_PLCSocket.Connected)
return;
try
{
m_PLCSocket.Close();
}
catch
{
}
}
if (Protocol == EthProtocol.TCP)
{
m_PLCSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
}
else
{
m_PLCSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
}
SocketState socketState = new SocketState();
socketState.Socket = m_PLCSocket;
socketState.State = SocketState.ConnectionState.Connecting;
bool isHostNameMode = false;
IPAddress ipAddress = null;
try
{
ipAddress = IPAddress.Parse(m_remoteIPorHostName);
}
catch
{
isHostNameMode = true;
}
IPEndPoint PLCIPEndPoint = null;
if (!isHostNameMode)
{
PLCIPEndPoint = new IPEndPoint(ipAddress, Convert.ToInt32(m_remotePort));
}
try
{
if (!isHostNameMode)
{
IAsyncResult result = m_PLCSocket.BeginConnect(PLCIPEndPoint, socketConnect, socketState);
bool success = result.AsyncWaitHandle.WaitOne(connectTimeOut, true);
lock (socketState)
{
if (success)
{
try
{
m_PLCSocket.EndConnect(result);
}
catch
{
socketState.State = SocketState.ConnectionState.Failed;
throw;
}
}
else
{
socketState.State = SocketState.ConnectionState.Failed;
throw new SocketException(10060);
}
}
// Enfora modems Suck. It require a sleep after the connection before data is being sent to it
// Otherwise the communication fails.
Thread.Sleep(500);
}
else
{
IAsyncResult result = m_PLCSocket.BeginConnect(m_remoteIPorHostName, m_remotePort, socketConnect,
socketState);
bool success = result.AsyncWaitHandle.WaitOne(connectTimeOut, true);
lock (socketState)
{
if (success)
{
try
{
m_PLCSocket.EndConnect(result);
}
catch
{
socketState.State = SocketState.ConnectionState.Failed;
throw;
}
}
else
{
socketState.State = SocketState.ConnectionState.Failed;
throw new SocketException(10060);
}
}
// Enfora modems Suck. It require a sleep after the connection before data is being sent to it
// Otherwise the communication fails.
Thread.Sleep(500);
}
string text = ConnectionStatus.ConnectionOpened + " on port " + m_remotePort.ToString();
ComDriverLogger.LogConnectionState(DateTime.Now, Utils.HelperComDriverLogger.GetLoggerChannel(this),
text);
}
catch (SocketException se)
{
if (se.Message.Contains(m_remoteIPorHostName))
throw new ComDriveExceptions(se.Message,
ComDriveExceptions.ComDriveException.GeneralCommunicationError);
else
throw new ComDriveExceptions(se.Message + " " + m_remoteIPorHostName + ":" + m_remotePort,
ComDriveExceptions.ComDriveException.GeneralCommunicationError);
}
}
private void socketConnect(IAsyncResult ar)
{
try
{
SocketState socketState = (SocketState) ar.AsyncState;
lock (socketState)
{
if (socketState.State == SocketState.ConnectionState.Failed)
{
socketState.Socket.Close();
}
else
{
socketState.State = SocketState.ConnectionState.Connected;
}
}
}
catch
{
}
}
/// <summary>
/// Closes the Socket connection and releases all associated resources.
/// </summary>
public override void Disconnect()
{
if (base.QueueCount != 0)
return;
if (m_PLCSocket != null)
{
if (m_PLCSocket.Connected)
{
m_PLCSocket.Close();
try
{
ComDriverLogger.LogConnectionState(DateTime.Now,
Utils.HelperComDriverLogger.GetLoggerChannel(this),
ConnectionStatus.ConnectionClosed.ToString());
}
catch
{
}
}
}
}
internal override bool IsEquivalentChannel(Channel anotherChanel)
{
Ethernet ethernet = anotherChanel as Ethernet;
if ((ethernet.RemoteIP == m_remoteIPorHostName) && (ethernet.m_remotePort == m_remotePort))
{
return true;
}
else
{
return false;
}
}
#endregion
#region Private
// Convert a string to a byte array.
private static byte[] strToByteArray(string str)
{
System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
return encoding.GetBytes(str);
}
// Convert a byte array to a string.
private static string byteArrayToStr(byte[] dBytes)
{
string str;
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
str = enc.GetString(dBytes);
return str;
}
private void sendAyncronic_Callback(IAsyncResult ar)
{
Socket s = (Socket) ar.AsyncState;
try
{
s.EndSend(ar);
}
catch (SocketException se)
{
throw new ComDriveExceptions(se.Message,
ComDriveExceptions.ComDriveException.GeneralCommunicationError);
}
}
private void receiveAyncronic_Callback(IAsyncResult ar)
{
Socket s = (Socket) ar.AsyncState;
try
{
s.EndReceive(ar);
}
catch (SocketException se)
{
throw new ComDriveExceptions(se.Message,
ComDriveExceptions.ComDriveException.GeneralCommunicationError);
}
}
private byte[] getTcpCommand(byte[] command, bool isIdMessage)
{
int commandLenght = command.Length;
byte lsb = Convert.ToByte(commandLenght & 0x00FF);
byte msb = Convert.ToByte((commandLenght & 0xFF00) >> 8);
byte[] transactionIdBytes;
if (isIdMessage)
{
transactionIdBytes = BitConverter.GetBytes(1);
}
else
{
transactionIdBytes = BitConverter.GetBytes(transactionIdentifier);
}
byte[] tcpHeader = new byte[]
{
transactionIdBytes[0], transactionIdBytes[1],
command[1] == 95 ? Utils.General.BINARY_PROTOCOL : Utils.General.ASCII_PROTOCOL,
_messageEnumerator, lsb, msb
};
m_header = tcpHeader;
byte[] tcpCommand = new byte[Utils.Lengths.LENGTH_TCP_HEADER + command.Length];
for (int i = 0; i < tcpCommand.Length; i++)
{
tcpCommand[i] = (i < Utils.Lengths.LENGTH_TCP_HEADER)
? tcpHeader[i]
: command[i - Utils.Lengths.LENGTH_TCP_HEADER];
}
return tcpCommand;
}
private void appendReceivedDataToArray(ref byte[] incomingData)
{
byte[] tempBuffer;
byte[] copyOfBuffer;
int bytesToRead;
bytesToRead = m_PLCSocket.Available;
if (bytesToRead > 0)
{
tempBuffer = new byte[bytesToRead];
m_PLCSocket.Receive(tempBuffer);
copyOfBuffer = incomingData;
incomingData = new byte[copyOfBuffer.Length + tempBuffer.Length];
Array.Copy(copyOfBuffer, 0, incomingData, 0, copyOfBuffer.Length);
Array.Copy(tempBuffer, 0, incomingData, copyOfBuffer.Length, tempBuffer.Length);
ComDriverLogger.LogReceivedMessageChunk(DateTime.Now,
Utils.HelperComDriverLogger.GetLoggerChannel(this), tempBuffer);
}
}
private void appendReceivedDataToString(ref string incomingData)
{
byte[] tempBuffer;
string bufferAsString;
int bytesToRead;
bytesToRead = m_PLCSocket.Available;
if (bytesToRead > 0)
{
tempBuffer = new byte[bytesToRead];
m_PLCSocket.Receive(tempBuffer);
bufferAsString = ASCIIEncoding.ASCII.GetString(tempBuffer);
incomingData += bufferAsString;
ComDriverLogger.LogReceivedMessageChunk(DateTime.Now,
Utils.HelperComDriverLogger.GetLoggerChannel(this), tempBuffer);
}
}
#endregion
}
}