![Cyndar Electronic Technology XD-TOF-25 Operating Instructions Manual Download Page 31](http://html1.mh-extra.com/html/cyndar-electronic-technology/xd-tof-25/xd-tof-25_operating-instructions-manual_2704637031.webp)
Sensing the world
·
Leading the change
30
if (clientStream.CanRead)
{
byte[] writeanwser = new byte[1024]; //Open up cache
StringBuilder myCompleteMessage = new StringBuilder(); //
Receive result variable
int numberOfBytesRead = 0;
do
{
numberofBytesRead = clientStream.Read(writeanwser, 0, writeanwser.Length);
//
Read TCPIP communication receive buffer
myCompleteMessage.AppendFormat("{0}",Encoding.ASCII.GetString(writeanwser, 0,
numberOfBytesRead));
//
Write all the information stack read by the network port to the receiving result variable
}
while (clientStream.Data
Av
ailable); //
If the data does not arrive, the loop is received
//You can continue to operate the acceptance information in myCompleteMessage to determine
further operations. The following continues to extract key instruction information, which
may contain ETX, STX, you need to further elaborate processing
string result = myCompleteMessage.ToString();
string[] split = result.Split(new char[] { ' ' });//
Split the received string into N string .
writereply= split[3] // The first byte is the storage success status is
STEP14
:Reset
The radar can be restored to factory settings by sending this command.
Instruction
<STX>sMN{SPC}
mSCloadfacdef<ETX>
02
73 4D 4E
20
6D 53 43 6C 6F 61 64 66 61 63 64 65 66
03
<STX>
02
sMN
73 4D 4E
20
mSCloadfacdef
6D 53 43 6C 6F 61 64 66 61 63
64 65 66
<ETX>
03
After successful storage, your application will receive:
<STX>sAN{SPC}mSCloadfacdef<ETX>
02
73 41 4E
20
6D 53 43 6C 6F 61 64 66 61 63 64 65 66
03
arrays with spaces
Actual
sending
instruction
(Hex)
Header
Space
(
SPC
)
Data
content
Footer