package SM::Constants;
use strict;
use warnings;
use base 'Exporter';
# This begin block loads a hash with constants and their values. The format is
# the same as an argument to us constant.
# ie: use constant DATA_Location => 0x80;
our %h;
BEGIN {
%h = (
# Constant declarations
# Packet data type constants
DATA_OUT_Location => 0x80,
DATA_IN_Location => 0x00,
# Packet sub type constants
DATA_SUB_Initial => 0x00,
# General terms
IN => 0,
OUT => 1,
);
}
# Load all our constants into the local namespace
use constant \%h;
# Export all the constants
our @EXPORT = keys %h;
1;