Networking library
-
Hi
What are you planning to send ? -
Hi ,
Mostly numeric data over mobile connection with limited data usage. 2G mobile network with 30-50mb montly data limit.Perhaps every 1-30 seconds ~10 floating values with 2-3 decimals.
Current solution is floating values converted to text , from there to half byte custom char and use 4 bits per numeric character.
But sometimes software update.
Good compression could be useful.Looking for easy to config lib to use in other projects as well.
Current idea is to make parsing lib with templates for packets. That are in sync for server and client. All size info for packet contents would not have to be sent within networking packets if client and server already have the info.
And run packets trough lz4 or other compression algo before sending.But i think something like this is already made.
-
Hi ,
Mostly numeric data over mobile connection with limited data usage. 2G mobile network with 30-50mb montly data limit.Perhaps every 1-30 seconds ~10 floating values with 2-3 decimals.
Current solution is floating values converted to text , from there to half byte custom char and use 4 bits per numeric character.
But sometimes software update.
Good compression could be useful.Looking for easy to config lib to use in other projects as well.
Current idea is to make parsing lib with templates for packets. That are in sync for server and client. All size info for packet contents would not have to be sent within networking packets if client and server already have the info.
And run packets trough lz4 or other compression algo before sending.But i think something like this is already made.
@Q139 said in Networking library:
Hi ,
Mostly numeric data over mobile connection with limited data usage. 2G mobile network with 30-50mb montly data limit.Is this using the base band protocol, or IPv4/6 over 2G?
Perhaps every 1-30 seconds ~10 floating values with 2-3 decimals.
Is the range of the values known?
-
@Q139 said in Networking library:
Hi ,
Mostly numeric data over mobile connection with limited data usage. 2G mobile network with 30-50mb montly data limit.Is this using the base band protocol, or IPv4/6 over 2G?
Perhaps every 1-30 seconds ~10 floating values with 2-3 decimals.
Is the range of the values known?
@jeremy_k said in Networking library:
Is this using the base band protocol, or IPv4/6 over 2G?
Yes, GSM modem over serial connection.
@jeremy_k said in Networking library:
Is the range of the values known?
Yes , for mostly used packets the values are not using full range of floating value types.
~0-99 before decimal and 0-3 digits after decimal -
@jeremy_k said in Networking library:
Is this using the base band protocol, or IPv4/6 over 2G?
Yes, GSM modem over serial connection.
@jeremy_k said in Networking library:
Is the range of the values known?
Yes , for mostly used packets the values are not using full range of floating value types.
~0-99 before decimal and 0-3 digits after decimal@Q139 said in Networking library:
~0-99 before decimal and 0-3 digits after decimal
Without sign this is representable in 2 bytes fixed-point, isn't it?
-
@Q139 said in Networking library:
~0-99 before decimal and 0-3 digits after decimal
Without sign this is representable in 2 bytes fixed-point, isn't it?
@kshegunov
Using 64K combos from 2bytes, with 2 decimal points zero to 640.00+ appears possible.For 3 decimals would probably need 99999 combos if using fixed step 0.001.
1 extra bit to 2 bytes could be enough.
I think its doable with bit field (bit packing).
With long array of data probably get good savings.So far i have tested byte to nibble as it aligns to byte easy.
With 17bits or 2.125 bytes it appears to take more coding effort for alignment if using variable number of data.Is there algo that takes in something like (variable size array of int values , parameter to use 17bits or X bits per item) and outputs binaries containing reduced size for later to align back to integers?
I have problem finding it on google due to bad keywords.
-
@kshegunov
Using 64K combos from 2bytes, with 2 decimal points zero to 640.00+ appears possible.For 3 decimals would probably need 99999 combos if using fixed step 0.001.
1 extra bit to 2 bytes could be enough.
I think its doable with bit field (bit packing).
With long array of data probably get good savings.So far i have tested byte to nibble as it aligns to byte easy.
With 17bits or 2.125 bytes it appears to take more coding effort for alignment if using variable number of data.Is there algo that takes in something like (variable size array of int values , parameter to use 17bits or X bits per item) and outputs binaries containing reduced size for later to align back to integers?
I have problem finding it on google due to bad keywords.
Using 64K combos from 2bytes, with 2 decimal points zero to 640.00+ appears possible.
The point is not decimal. 10 bits of fractional gives you 3 decimal digits, meaning that you get 6 more bits for the leading part, which is 64 (in decimal), so 64.xxx is exactly representable. You could "lie" if you can settle to give up a bit from the fractional part:
7 bits leading + 9 bits fractional -> up to 128.xxx with 2.7 decimal digits after the dot (your LSB in decimal would be 0.002 then)