package RFC::Header;
#$Id: Header.pm,v 1.161 2026/05/29 11:59:02 sqko Exp $
$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin';
use strict;
use warnings;
use Fcntl qw(:DEFAULT :flock);
use POSIX;

################################################################
#
#  Package RFC::Header
#
# This module contains site wide file locations and similar 
# global variables used by the other modules supplied as part
# of RFCcontrol.
#
################################################################

BEGIN {
    use Exporter ();
    our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
    $VERSION = '8.0.1';
    %EXPORT_TAGS = (
        'standard'=>[qw/$homedir $publicdir $libdir $htmldir $devicelock $user_exec_dir $programlock $userdir $configfile $configlock $spline $COPYRIGHT/]
                    );
    Exporter::export_ok_tags('standard');
    Exporter::export_tags('standard');
    @ISA = qw(Exporter);
}

my @lt = localtime();
my $year = $lt[5]+1900;
my $WEB = '/home/http/html/';

#### Global file locations ####
our $homedir = '/home/celltest/';
our $publicdir = $WEB;
our $userdir = '/home/';
our $libdir = '/usr/local/bin/celltest/';
our $htmldir = $WEB.'celltest/';
our $furnacedir = $WEB.'RFCfurnace/';
our $configfile = $homedir.'/conf/celltest_global.conf';
# Note uicfg is deprecated and nolonger supported!
our $uicfg = $homedir.'/conf/UI.cfg';
our $configlock = $homedir.'/conf/conf.lock';
our $user_exec_dir = $libdir.'user_exec/';

### Program semafore files ###
our $programlock = '/home/celltest/userprogram.lock';
our $spline = '/usr/local/bin/splineinterpol';

### Header strings ###
our $COPYYEAR = '2011 - '.$year;
our $IMPLEMENTERS = 'S&oslash;ren Koch, Carsten B. Prag, Karin V. Hansen';
our $COPYRIGHT = 'DTU Energy';
our $DESIGNERS = 'S&oslash;ren Koch';
our $TESTERS = 'Johan Hjelm, Anne Hauc, Christopher Graves and Xiufu Sun';


# Define default values for most global configuration parameters   #
# Will be used if not informatio for the given key is found in the #              
# configuration file                                               #

our %default_conf = (
    'global' => {
        'allow_access_current_test_to_auth_users' => 'No',
        'allow_exec' => 'No',
        'report_authorisationid' => -1,
        'only_allow_explicit_data_access' => 'No',
        'restrict_access_auth_only' => 'No',
        'GUI_reload_time' => 30,
        'set_warning_email_on_start' => 'No',
        'account_number_regexp' => '^\d{6}',
        'CGI_baseaddress' => 2000,
        'serial_client' => '/usr/local/bin/celltest/serial-socket-client-1.2.pl',
        'splineinterpoldata' => '/home/celltest/convert-tables',
        'splineinterpol' => '/usr/local/bin/splinterpol',
        'logoutdelay' => '+10min',
        'logfile' => '/usr/local/bin/celltest/logfile.pl',
        'errormails' => 'foo@foo.bar',
    },
    'admin' => {
        'save_raw_kanalda' => 'No',
        'system_mail_users' => 'foo@foo.bar',
    },
    'celltest' => {
        'start_test_mail_users' => 'foo@foo.bar',
    },
    'passwds' => {
        'passwd_server_port' => 2020,
        'passwdfile' => '/home/celltest/passwd',
        'passwdlock' => '/home/celltest/pwd.lock',
        'passwd_server' => 'foo.bar',
        'passwd_server_url' => 'https://foo.bar/cgi-bin/front/main.cgi',
    },
    'impedance' => {
        'comp_program' => '/usr/local/bin/hio_korr',
        'remote_client' => '/usr/local/bin/remote-client',
        'current_plot_frequencies' => '10000:100:1',
    },
    'iVcurves' => {
        'minimum_cell_voltage_for_iv' => -100,
        'maximum_cell_voltage_for_iv' => 2500,
        'current_limit' => 40,
    },
    );


return 1;
