Examples/applications
10.2 RF182C user application
RF182C communication module
94
Operating Instructions, 10/2010
{
switch (state)
{
case TagDetectionState.YES:
labelTagDetected.Text = "TAG(s) DETECTED";
labelTagDetected.BackColor = Color.Green;
break;
case TagDetectionState.NO:
labelTagDetected.Text = "NO TAG DETECTED";
labelTagDetected.BackColor = Color.Red;
break;
case TagDetectionState.UNDEFINED:
labelTagDetected.Text = "";
labelTagDetected.BackColor = BackColor; //Color of the dialog
break;
}
}
}
/* As long as no tag presence notification was send, we have no
* information whether there is a tag in the field or not.
* --> three states
* */
enum TagDetectionState
{
YES, NO, UNDEFINED
}
// This class is for handling asynchronous communication processes
internal class ReceiveString
{
public read-only static int BufferSize = 512;
public byte[] buffer = new byte[BufferSize];
}
// This class describes a XML block in ReceiveBuffer
internal class XMLTag
{
//Index of first character
public int startIndex;
//Block length
public int length;
// Type ( reply, notification or alarm, since only telegrams
// from the ASM are handled within this structure)
public String type;
}
}