Download Device Davis - Device Davis Description, Device Davis Reviews
Contact
 


 

Download

 
Download Now
Perl Artistic License
Downloads till now: 9
 
 

Quick search

 



 

Rate this software

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

No. Votes

0

 

Linux

Assembler Tools , Bug Tracking , Code Generators , Compilers , Debuggers , Disassemblers , Internationalization , Interpreters , Libraries , Localization, Perl Modules , Preprocessors , Quality Assurance and Testing , UI (User Interfaces) , Version Control , Widgets ,

Windows

Mac

Mobile

Drivers

Scripts - DHTML

Scripts - DHTML (new)

Web Developer Blog

Web Developer Blog (new)

Scripts and Applications

Ajax
ASP
ASP.NET
C and C++
CFML
CGI and Perl
Flash
Java
JavaScript
PHP
Python
XML

Device Davis

 

Details

Last Update: 2008-01-31 05:01:19
Version: Device::Davis 1.
License/Program Type: Perl Artistic License
Publisher: Stan Sander
Price:$0.00
Description:

Device::Davis is a Perl extension for communicating with Davis weather stations.
SYNOPSIS
use Device::Davis;
$fd = station_open($tty);
put_string($fd, "$string");
$char = get_char($fd);
$crc = crc_accum($crc, $data_byte);
put_unsigned($fd, $num);
Davis is a Perl 5 module that facilitates communication with Davis weather stations. This module should work on most unix systems, however it was developed on Linux.
station_open() takes the tty where the station is connected as an argument and opens the tty with the correct parameters for communication. The baud rate that is used matches the factory default of the Vantage Pro, which is 19200. If you need to use a different baud rate, you will need to modify the Davis.xs file before compiling the module.
put_string() takes a file descriptor (NOT a perl filehandle) and the string to send as arguments and sends the string to the weather station. This function will return the number of bytes written.
get_char() takes a file descriptor as an argument and retuns 1 byte from the weather station.
crc_accum() is an accumulator for the crc calculation. It takes the previous value of the crc that has been accumulated ($crc) and the new data byte that needs to be added to the accumulated total. Be sure to initialize $crc to 0 before sending a new set of data bytes. The function will return the new accumulated crc value. Once you pass in the crc value received from the weather station, the function should return a 0 if the crc check passed. If you are sending commands to the station, the last value returned by the function should be what you send to the station as the crc value. Note that the station expects the most significant byte of the crc to be sent first, which is opposite of how regular data values are sent.
put_unsigned() is for sending numeric values to the station. It takes the file descriptor and the character to send as arguments. It will send it's argument as a one byte unsigned character. It will return the number of bytes written.
EXAMPLES
$bytes = put_string($fd, "n");
$bytes = put_string($fd, "TESTn");
Reading the results from a LOOP 1 request:
$crc = 0;
while($index < 100){
$data[$index] = get_char($fd);
The first byte returned by the station in a LOOP 1 packet is an ACK (0x06) and should not be included in the crc.
if($index){$crc = crc_accum($crc, $data[$index]);};
$data[$index] = sprintf("%02x", "$data[$index]"); Convert to hex
$index++;
};
At this point the value of $crc should be 0 if there were no transmission errors, and you can continue to process the packet.
Sending a command or other value to the station:
We will want to calculate the value for the crc by running each byte we will send through crc_accum().
$crc = crc_accum($crc, 0xc6);
$crc = crc_accum($crc, 0xce);
$crc = crc_accum($crc, 0xa2);
$crc = crc_accum($crc, 0x03)
;
Let's say at this point that the value of $crc is e2b4. If we are sending a command to the weather station, we should send e2b4 (most significant byte first) to the station.
$msbyte = $crc >> 8; For our example equals e2
put_unsigned($fd, $msbyte);
$lsbyte = $crc << 24;
$lsbyte = $lsbyte >> 24; For our example equals b4
put_unsigned($fd, $lsbyte);
Requirements:
· Perl



Leave a comment




(optional)

What is 7-3?




0 comments


Add to

 Del.icio.us   Digg It   Furl   YahooMyWeb   Blinklist
 

Device Davis Version History

Product Date Added
Device Davis Device::Davis 1. 2008-01-31 05:01:19


Related Software

Device Davis
From category: Perl-Modules
Device::Davis is a Perl extension for communicating with Davis weather stations....
BBDB::Export
From category: Libraries
BBDB::Export 0.012 is libraries software developed by wu. BBDB::Export is a Perl module to export data from The Insidious Big Brother Database. SYNOPSIS use BBDB::Export;...
Free Pascal Compiler
From category: Compilers
Free Pascal Compiler 2.0.2 is compilers software developed by Dani?l Mantione. Free Pascal (aka FPK Pascal) is a 32 or 64 bit (from 1.9.6) pascal compiler. Free Pascal Compiler is available for dif...
eTraxis
From category: Bug-Tracking
eTraxis is a free web-based bug tracking system with unlimited number of custom workflow templates....
JPerf
From category: Libraries
JPerf is a Java library, a perfect hash function generator....
CGI::WeT::Modules::Calendar
From category: Libraries
CGI::WeT::Modules::Calendar 0.71 is libraries software developed by CGI::WeT::Modules::Calendar Team. CGI::WeT::Modules::Calendar are Perl extensions to engine to allow calendar management....
WWW Authen Simple
From category: Perl-Modules
WWW::Authen::Simple is a cookie based session and authentication module using database backend....
Acme::MetaSyntactic 0.90
From category: Libraries
Acme::MetaSyntactic 0.90 is libraries software developed by Philippe Bruhat. Acme::MetaSyntactic is Perl module themed metasyntactic variables. When writing code examples, it\'s always easy...
CodeSugar Eclipse Plugin
From category: Code-Generators
CodeSugar Eclipse Plugin 1.3.0 is code generators software developed by Mike G. CodeSugar Eclipse Plugin is an Eclipse plugin that can generate methods such as equals(), clone(), toString(), and ha...
Declare::Constraints::Simple
From category: Libraries
Declare::Constraints::Simple 0.03 is libraries software developed by Robert Sedlacek. Declare::Constraints::Simple is a Perl module for Declarative Validation of Data Structures. SYNOPSIS \...
Want
From category: Libraries
Want is a Perl module created to implement the `want\' command....
Date::Hijri
From category: Libraries
Date::Hijri 0.02 is libraries software developed by Alex Pleiner. Date::Hijri is a Perl extension to convert islamic (hijri) and gregorian dates. SYNOPSIS use Date::Hijri;...
Asterisk Desktop Manager 0.9
From category: UI-User-Interfaces
Asterisk Desktop Manager 0.9 is ui (user interfaces) software developed by Richard Hamnett. Asterisk Desktop Manager application interfaces your VOIP telephony with the desktop and Asterisk PBX. \...
DBIx::Migration::Directories
From category: Libraries
DBIx::Migration::Directories 0.05 is libraries software developed by Tyler MacDonald. DBIx::Migration::Directories is a Perl module to install/remove/upgrade/downgrade SQL schemas. SYNOPSIS\...
Deskzilla
From category: Bug-Tracking
Deskzilla 1.2.1 is bug tracking software developed by ALM Works Ltd. Deskzilla allows you to do more with issues in your Bugzilla bug tracking system. Deskzilla is an alternative Bugzilla cl...
 

Top Downloads

 
1. Canon PIXMA iP1000 Printer Driver
2. Canon PIXMA iP1200 Printer Driver
3. Realtek ALC/ 262/ 265/ 268/ 660/ 861/ 880/ 882/ 883/ 885/ 888 Audio
4. Realtek RTL8139C(L)+/RTL8139D(L)/RTL8100(L)/RTL8130/RTL8139B(L) Driver
5. Canon PIXMA iP1300 Printer Driver c
6. Canon PIXMA iP1600 Printer Driver
7. SendSong
8. Canon i-SENSYS LBP2900 Printer Driver R
9. Canon PIXMA iP1300 Printer Driver a
10. Canon PIXMA MP160 MP Drivers 9xME
11. Canon PIXMA MP210 MP Drivers
12. Realtek RTL8100B(L)/RTL8100C(L)/RTL8101L/RTL8139C(L) Driver XP
13. Canon i560 Printer Driver
14. Canon LaserShot LBP-1210 Printer Driver
15. Canon PIXMA iP1200 Printer Driver x64 d
16. Canon PIXMA MP160 MP Drivers xp64
17. Genius VideoCAM Trek
18. BSD Subsystem
19. Mercury P4VM800M7
20. dmg2iso

DownloadTube Editor Reviews

 
1. Data
Data-to-PDF is a simple to use and reliable software that en...
2. CSVed
CSVed is an easy to use and powerful CSV file editor that wi...
3. PPT To Flash Studio Professional
PPT To Flash Studio is a fast and easy to use piece of softw...
4. jv16 PowerTools 2008
jv16 PowerTools is a truly great solution for optimizing you...
5. Desktop Takeover
Desktop Takeover is a smart tool that allows you to add phot...
6. TinyPic
TinyPic is an automatic file resizer that uses an optimized ...
7. RouterSyslog
RouterSyslog is a small, simple, free tool that allows you t...
8. Sothink FLV Player
Sothink FLV Player is a powerful, reliable and yet free Flas...
9. ABC Amber Absolute Converter
ABC Amber Absolute Converter is an advanced utility which wi...
10. Skuld PPT2VIDEO DVD
Skuld PPT2Video/DVD/Flash is a powerful PowerPoint to Video/...

Software Reviews Full List



Recent Blog Posts

 
1. Some Little, Nice, Freeware Tools You May Never Know When You'll Need
This time I won’t speak about a single freeware program that...
2. How To Increase The Quality of Your News Articles For Search Engine Spiders
The process of articles publishing is a common practice to...
3. Digg in Press: Tips and Opinions
Regarding Digg social bookmarking service there are many a...
4. Ubuntu Linux and Windows Can Share The Desktop In Absence Of Virtual Machines
Many people asked themselves how to run Ubuntu Linux and W...
5. 2.5 Millions Downloads for FireTune: It Makes Mozilla Firefox To Run With The Speed of Light
It is well known the fact that even the latest version of M...
6. Image Galleries on Autopilot: Instant Gallery Maker
The creation of image galleries ready for web publishing...
7. Hamad Darwish's Windows Vista Desktop Wallpaper Pack
We came across a great desktop wallpaper pack and an interes...
8. Trick Your Friends Into Shutting Down Their Windows
There are quite many ways to shut down a Windows based syste...
9. Get The Best Freeware Tools For Windows To Optimize RAM Consumption
Depending on the Windows operating system version you may ...
10. Squish Provides Support For Web Applications Running in Firefox 3.0
froglogic GmbH recently announced (2008-08-12) the availab...

Last 20 Scripts

 
1. WordPress CMS
WordPress is a state-of-the-art publishing platform with a f
2. BIGACE
BIGACE is a dynamic PHP and MySQL based Web CMS. It is a mul
3. CMSMS ( CMS Made Simple)
CMS Made Simple is an open source (GPL) package, built using
4. ThimbleDoc
ThimbleDoc is a PHP documentor project. It is simple, straig
5. WESPA PHP Newsletter
WESPA PHP Newsletter script allows you to manage a mailing l
6. Flatchat
Flatchat is a PHP based chat room application that does not
7. Ninja Designs Mailist
Mailist is a PHP based subscription mailing list. A stylish
8. Ninja Blog
Ninja Blog is a PHP based blogging solution. Based upon word
9. SupaBundles Display Your Stats PHP Script
upaBundles Display Your Stats PHP Script allows you to displ
10. Ajax Portal v 2.0
AjaxPortal is a portal script based on Sajax technology for
11. VisualEffectFlag
aipflag is an animation button applet that takes one input f
12. Javascript chronometer/stopwatch
I needed a javascript chronometer/stopwatch to be inserted i
13. HYIPBeings HYIP and Autosurf Lister
his script allows you to create easily and quickly your own
14. Highlighter Component
Highlighter is .NET component that changes format of wanted
15. Gallery-Maker
The gallery maker script is a tool for adult webmasters to a
16. Simple Template System
This is a basic template system that allows you to create a
17. Dodos Image Sort Script
This script makes sorting images based on their width or hei
18. Check Form
Check Form is a form validation script that checks if all fi
19. phpDB
phpDB is a php database abstraction class which is extendabl
20. EMC Base Logger
EMC Base Logger in a Powerful IP Logging / Banning tool. Thi