NAME

C3000 - A perl wrap for C3000 API This is a simple wrap of C3000 API. For more details, please refer to: meter2cash CONVERGE Business Objects Component Interfaces User Guide

VERSION

Version 0.01

SYNOPSIS

use C3000;
my $hl = C3000->new();
my $value = $hl->accu_LP('ADAS_VAL_RAW', '%', '+A', 'yesterday', 'today');
my $value = $hl->get_single_LP('ADAS_VAL_RAW', '%', '+A', 'yesterday');

Methods

new

init sub

get_LP

my $rs = get_LP(....);
while(!$rs->EOF){ 
	...
$rs->MoveNext();
}

return a recordset of LoadProfile low function, just ignore it.

save_LP

below is a vbs code, please check! Set mdi = CreateObject("DeviceAndMeterdata.ADASDeviceAndMeterdata.1")

return_fields = Array( "ADAS_DEVICE", "ADAS_VARIABLE" ) criteria = Array( Array("ADAS_DEVICE_NAME", "+SimMeter001" ), _ Array("ADAS_VARIABLE_NAME", "Simulated profile" ) ) Set recordset = mdi.FindVariable( return_fields, criteria, Empty, 0 ) If Not recordset.EOF Then device_id = recordset.Fields( "ADAS_DEVICE" ) variable_id = recordset.Fields( "ADAS_VARIABLE" ) ' Initialize record set structure Set lp_values = CreateObject( "ADODB.RecordSet" ) lp_values.Fields.Append "ADAS_TIME_GMT", 7, -1, False ' type adDate lp_values.Fields.Append "ADAS_VAL_RAW", 203, 20, True ' type adLongVarWChar, size 20 ' Fill record set with data lp_values.Open lp_values.AddNew lp_values.Fields( "ADAS_TIME_GMT" ).Value = DateSerial( 2003,1,31 ) + TimeSerial( 9,0,0 ) lp_values.Fields( "ADAS_VAL_RAW" ).Value = 123 ' Save the load profile mdi.Save_LP device_id, variable_id, lp_values, 1

accu_LP

	return a accumulation value of LoadProfile

	$hl->accu_LP('ADAS_VAL_RAW', 'º£µç%', '+A', $dt_yesterday, $dt_today);

	$hl->accu_LP('ADAS_VAL_NORM', '%', '+A', $dt_yesterday, $dt_today);
	 

get_single_LP

return a single value or a hash 


get_single_LP('ADAS_VAL_RAW', 'º£µç_Ö÷±í110', '+A', 'today');

get_single_LP('ADAS_VAL_NORM', 'Ö÷±í%', 'yesterday');          

as above, get_single_LP function return a value or a hash when value is more than one.

search_device

return a recordset of device info fitting criteria 
low function, please refer test file for more details.

convert_VT_DATE

C3000 utils, pass to a DateTime obj and return a VT_DATE variable.

search_meter_by_proxyattr

return a ref of ADAS_ID

AUTHOR

Andy Xiao, <xyf.gmail.com>

BUGS

Please report any bugs or feature requests to bug-c3000 at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=C3000. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

TODO extends qw( C3000::MeterDataIntergface C3000::ADASInstanceManager C3000::ContainerManager C3000::ContainerTemplateManager C3000::ActiveElementManager C3000::ActiveElementTemplateManager C3000::SecurityUserSession C3000::DataSegment

); consider use Moose

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2011 Andy Xiao.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 167:

Non-ASCII character seen before =encoding in ''º£µç%','. Assuming CP1252