1 # Copyright (c) 1999 Joseph E. Smith <jes@presto.med.upenn.edu>
3 # See the 'COPYRIGHT' section below for complete copyright information.
9 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD);
15 @ISA = qw(Exporter DynaLoader);
44 SubdeviceTypes => [ qw(
58 SubdeviceFlags => [ qw(
86 TriggerFlags => [ qw (
109 # Items to export into callers namespace by default. Note: do not export
110 # names by default without a very good reason. Use EXPORT_OK instead.
111 # Do not simply export all your public functions/methods/constants.
115 @{$EXPORT_TAGS{'Functions'}},
116 @{$EXPORT_TAGS{'Constants'}},
117 @{$EXPORT_TAGS{'Ioctls'}},
118 @{$EXPORT_TAGS{'SubdeviceTypes'}},
119 @{$EXPORT_TAGS{'SubdeviceFlags'}},
120 @{$EXPORT_TAGS{'TriggerFlags'}},
121 @{$EXPORT_TAGS{'Units'}},
127 # This AUTOLOAD is used to 'autoload' constants from the constant()
128 # XS function. If a constant is not found then control is passed
129 # to the AUTOLOAD in AutoLoader.
132 ($constname = $AUTOLOAD) =~ s/.*:://;
133 my $val = constant($constname, @_ ? $_[0] : 0);
135 if ($! =~ /Invalid/) {
136 $AutoLoader::AUTOLOAD = $AUTOLOAD;
137 goto &AutoLoader::AUTOLOAD;
140 croak "Your vendor has not defined Comedi macro $constname";
143 eval "sub $AUTOLOAD { $val }";
147 bootstrap Comedi $VERSION;
149 # Preloaded methods go here.
152 my ($chan, $rng, $aref) = @_;
154 return ( ((($aref)&0x3)<<24) | ((($rng)&0xff)<<16) | (($chan)&0xffff) );
158 # Autoload methods go after =cut, and are processed by the autosplit program.
165 Comedi - Perl extension for data acquisition using comedi
169 use Comedi qw( :Functions :Constants :Ioctls :SubdeviceTypes :SubdeviceFlags :TriggerFlags :Units );
173 The B<Comedi> module provides constants and data types for using the comedi data acquisition module.
175 By itself, this module will allow you to access the B<comedi> module using standard I/O functions and ioctls.
176 For more robust access to B<comedi>, see the B<Comedi::Lib> module.
178 =head1 Exported constants
180 The large number of constants defined in C<comedi.h> are divided into
181 several functional categories for export. No constants are exported
273 Version 0.01 09-Nov-1999
277 Joe Smith <F<jes@presto.med.upenn.edu>>.
281 Copyright (c) 1999 Joseph E. Smith. All rights reserved. This
282 program is free software. You may redistribute it and/or modify it
283 under the same terms as Perl itself.
287 Comedi::Trigger(1), Comedi::Lib(1).