Hi Mike,
I have set the Some of Variables as you have given some COD in your Source Code.
UInt32 COD_MAJOR_BIT_OFFSET = 8 * 1;
UInt32 COD_MAJOR_MASK = 0x001F00;
UInt32 COD_MAJOR_PHONE = 0x02;
UInt32 COD_MINOR_MASK = 0x0000FC;
UInt32 COD_MINOR_BIT_OFFSET = 2;
UInt32 COD_PHONE_MINOR_SMART = 0x03;
UInt32 COD_PHONE_MINOR_CELLULAR = 0x01;
But when I am compiling my Application, I am getting the compilation error like,
(COD & COD_MAJOR_MASK) >> COD_MAJOR_BIT_OFFSET ----- Operator '>>' cannot be applied to operands of type 'uint' and 'uint'
(COD & COD_MINOR_MASK) >> COD_MINOR_BIT_OFFSET ----- Operator '>>' cannot be applied to operands of type 'uint' and 'uint'
(COD & COD_MINOR_MASK) >> COD_MINOR_BIT_OFFSET ----- Operator '>>' cannot be applied to operands of type 'uint' and 'uint'
Below is my whole Code.
for (int i = 0; i < e.Devices.Count; i++)
{
UInt32 COD_MAJOR_BIT_OFFSET = 8 * 1;
UInt32 COD_MAJOR_MASK = 0x001F00;
UInt32 COD_MAJOR_PHONE = 0x02;
UInt32 COD_MINOR_MASK = 0x0000FC;
UInt32 COD_MINOR_BIT_OFFSET = 2;
UInt32 COD_PHONE_MINOR_SMART = 0x03;
UInt32 COD_PHONE_MINOR_CELLULAR = 0x01;
UInt32 COD = e.Devices.ClassOfDevice(Radio);
if (((COD & COD_MAJOR_MASK) >> COD_MAJOR_BIT_OFFSET == COD_MAJOR_PHONE) && (((COD & COD_MINOR_MASK) >> COD_MINOR_BIT_OFFSET == COD_PHONE_MINOR_SMART) || ((COD & COD_MINOR_MASK) >> COD_MINOR_BIT_OFFSET == COD_PHONE_MINOR_CELLULAR)))
{
// It is mobile phone
}
else
{
// It is not mobile phone
}
}
Please help me out from this problem
thanks
Raj