Create your own Client
Home Using hnFAPMon(pdf) Online Help Change History Create your own Client Download Support Options

 

Home

Support This Project
SourceForge.net Logo

The server broadcasts it's information to the 192.168.0 subnet.  To read the broadcast messages, create a UDP socket to listen for messages on 192.168.0.255 port 6000.

Every "sampleinterval" the server broadcasts a message in this format:

RxT%d:TxT%d:RxC%d:TxC%d:KbR%.2f:KbT%.2f:BkR%d:BkP%.2f:10R%.2f:30R%.2f:10T%.2f:30T%.2f:SaM%.2f:

Here is the breakdown (the % notation of standard C/Perl notation):

  • RxT: the total received bytes since the monitor was first started
  • TxT: the total transmitted bytes since the monitor was first started
  • RxC: number of bytes received this sample
  • TxC: number of bytes transmitted this sample
  • KbR: Kbytes/sec received this sample
  • KbT: Kbytes/sec transmitted this sample
  • BkR: Bucket remaining, in bytes
  • BpK: Percentage of the bucket remaining
  • 10R: Kbytes/sec received over the last 10 samples
  • 10T: Kbytes/sec transmitted over the last 10 samples
  • 30R: Kbytes/sec received over the last 30 samples
  • 30T: Kbytes/sec transmitted over the last 30 samples
  • SaM: Fractional number of seconds of the last sample

Here is an actual message:

  • RxT54722931:TxT6834345:RxC1294:TxC82:KbR1.08:KbT0.07:BkR169000000:BkP100.00:10R0.55:30R0.39:10T0.09:30T0.05:SaM1.20:

Every 10 "sampleinterval", the server buadcasts a message with additional information.  The message is, as above, colon (:) separated, with a 3 character identifier.

  • Sig: Signal strength
  • UpT: Uptime (the ':' in the original data from the DW6000 were replaced with '|') in Days|Hours|Minutes|Second.
  • Car: Carrier information Long|E or W|frequency

This should allow users of other operating systems to create their own client programs, and users of Windows to create their own custom clients (like you wouldn't like mine!)

Do not write your code to assume that there will never be changes to this format!  While I will not delete any of the existing data, I may add new datapoints, so keep that in mind.  Prepare for the future!

Here is a sample of Perl code to read the message (it's up to you to create you own connection to the SOCKET.:

my @srow;
my %savedData;
 
$_ = <SOCKET>; # Reads the message from the socket
chomp; # Just in case, get rid of any newlines/returns
my (@srow) = split(/:/); # Get each element of the broadcast
foreach my $element (@srow) {
    $element =~ m/^(.{3})(.*$)/; # Split the element into its componants
    $savedData{$1} = $2; # Add it to the associative array
}
print "Current Received = $savedData{'RxC'}\n";

That's it, you should now be able to create your own client.

For more information, visit the project home page at http://www.sourceforge.net/projects/hnfapmon

Support This Project SourceForge.net Logo
(C) 2005-2008 Brian Millham