In my sdr client Application in C# I am unable to properly convert frequency(10087000) in hexa decimal and pass it to socket.
I am using cloudIQ device and need help to set the frequency and other parameters using socket.
In my sdr client Application in C# I am unable to properly convert frequency(10087000) in hexa decimal and pass it to socket.
I am using cloudIQ device and need help to set the frequency and other parameters using socket.
Assuming that the frequency is in Int32
public String FrequencyToHexadecimal(Int32 frequency)
{
Int32 networkOrder = IPAddress.HostToNetworkOrder(frequency);
Byte[] bytes = BitConverter.GetBytes(networkOrder);
return BitConverter.ToString(bytes).Replace("-","");
}
The result will be a hexadecimal string in network byte order.