0% found this document useful (0 votes)
59 views45 pages

AGW Systems, DLL Interface Definicion

The AGW DLL Interface Definition document outlines the AGW Systems SDK, which facilitates the integration of AGW devices into retail control applications through a Function Level Application Programming Interface (FLAPI). It provides comprehensive details on the available services, programming languages, and file structures necessary for application development. Additionally, it describes methods for data retrieval and storage, including real-time operations and backup options for data files.

Uploaded by

fbertomeus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views45 pages

AGW Systems, DLL Interface Definicion

The AGW DLL Interface Definition document outlines the AGW Systems SDK, which facilitates the integration of AGW devices into retail control applications through a Function Level Application Programming Interface (FLAPI). It provides comprehensive details on the available services, programming languages, and file structures necessary for application development. Additionally, it describes methods for data retrieval and storage, including real-time operations and backup options for data files.

Uploaded by

fbertomeus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

I-

AüW
Systems
by l&B Engineering Group
.0 i

AGW DLL INTERFACE DEFINITION

VER 3.10A

Pas6 - 1 VB Definitions J
Doc.Revision 3.104
f-¡
l\
AAW
Systems by J&B Engineering Group

Pase-2 VB Definitions
Doc.Revision 3.10A
AAW
Systems by l&B Engineering Group

1.

2.

3.

3.1, ovEBvrEw
6
3.2. PRoGRAMMTNG
7

rHrs M.DE wrLL p.ocEss ,.conó! oiiiri" oáiililiá;ñ;éiü i;ilñilffi;;;;il]i il ;;;,;;;;i;il;ilil;i;14


j!. HOW TO TNTEGBATE THE FLApr tNTO AN AppLtCAT|ON...................................,.....................................................................f5

4.1. lNtraLrzaroN
4.2. 15
ENDING uP
l5

5.1. SETCo,IPARAMEfERs
5.2. lNüCoM ,uMcanoNs 16
5.3, lNtrcowuNtcAnoNsEx 17
5.4. l8
5.5. AGWOPENVB ( AGWOPEN FoR N1NVB
5.6. ACWOPENEXVB ( AGWOPENEX FoR NoNvB UsERs)
5.7.
5.8, TE38 WORNNG
5.9. AGWENRoLL USER BY
5.10. ACWENRoLL USER BY FINGERDAIA
5.11. AGWREAD FINGERDA
5.12. AG WD E LETE E N R o LLED U s E R
5.13. ACWDELE.ÍE ALL ENRoLLED IlsERs
5.14. AGWGEfVERSIoN
5.15. AGWSEÍDATETIME
5.16. ACWWBITEINcIDENcE
5.17.
5.18. AGWSENDDT9PLA
5.19. AGWREADMESSAGEEXVB
5.20. AGWREADMESSAGEEr
5.21.
5.22. A G WR EAD B AwD ATAP o INfE R
5.23. ACWSETRAWDATAPoINTER
5.24. AG WR Es EÍRAw D ATAP oI NTER
5.25. AGWfESfHoRN
5.26. AGWSENDHoRN

6.

6.1. EXTERNAL FuNcnoN


6.1.1.
6.1.2.
6.r.3.
6.1.4.
.. ' '. '..'.'. '..,
' ' '. ' '...,44

Page - 3 VB Definitions
Doc.Revision 3. ,l0A
Aow
Systems bl I&B Engineering Group

1. INTRODUCTION

AGW Systems SDK is a software component that fac¡litates the integration


of the
AGW systems devices ¡nto retail control appiications environm"nt" *¡tnóri
éqriring ttre
user to address issues concerning row-rever seriar communications
or ,"nágin¡;tne AGW
Systems proprietary protocol.

. . Thj:.¡q qgnieve!
.lnterface(FlAP|) which
by providing a Function Levet Apilication programming
delive¡s.the full func.tionatity of rire AGW st"ñoárJ iniÉgration
Set in
a manner that is easy and efficient for application development p"r.onnát to ,"."

This FLAPI allows users-to create powerful applications that exploit


all features of the
AGW devices in an easy and efficient manner.

. sam.ples and specific documentation are suppried on demand


and other development platforms.
for vc++, VB, Derphi

Page - 4 VB Definitions
Doc.Revision 3. ,l0A
A{iw
Systems by l&B Enüneering Group

2. ABOUT THE FLAPI DEFINITION

The FLAPI definition provides a comprehens¡ve description of all the


services
available as application funct¡on calls via the FLAPI. lt therefóre ¡s tne
áerin¡tive-i"t"r"n."
for specific information relating to the development of applications
writtán ln áccoioance
wilh the FLAPI.

Each function call is described in terms of the following:

function name
input parameters
output parameters
return values
additional i nformatio n
cross-references

Also included are a list of important FLApI data types and structures
that are often
utilized as calling parameters to the FLApI functions.

Pase-s VB Definitions
Doc.Revision 3.10A
/,(iw
Systems by l&B Engineering Group

3. FLAPI's ENVTRONMENT

3.1. Overview

FLApr is impremented as a Dynamic Link Librarytype software


.The raye(DLL). This
DLL attow catting apprications to use Apr services uy carrinj aiirropr¿i;i;;;i;;;"ontained
withln the AGW Dlt.

This process is described in the followinq diaoram:

client aplication

FUNCTIONS

AGW Devices

Figure 3.1.a - How the FLAPI serv¡ces are used by a calling


application

Pase-6 VB Def¡nitions
Doc.Revision 3.10A
AAW
Systems by J&B Engineering Group

3.2. ProgrammingLanguages

Agw dll has been tested in multiple environments, typically VC++ , VB and
Delphi samples are available. Some functions are ,,Language Oriented', (i.e.
AGWOpenVB) while the main body of the DLL remains language independant.

3.3. Files involved

ln the FLAPI application, the following files are involved

agwdll.dll Main AGW Library (about 200K8)


exe Communicat¡ons Controt Exe (about 4000 KB)
comun ¡cations.
comunications.ini Communications Conf¡gurat¡on Fite (about 1 KB)
raw_data.dat Data received from AGW Net (no defined size)
records.trt An human readable version of raw_data.dat(no defined size)

Backups of raw-data.dat file are made by comunications module to protect all the
information. Date is annexed to copied raw_data files to easily check Backüp periods.

Raw_data Files are stored ¡n a directory called Alfie_Fites.


Records.txt File ¡s store in comunications.exe local directory

A sample files structure would be the following:

"..\\Exes" D¡rectory:
Comunications.exe
Comunications.ini (configuration file, generated automatically with default values)
records.txt (records file, generated automatically)
agwdll.dll

"..\\Alf ie_Files" Directory:


Raw_data.dat (main data file , generated automatically)
.dat
Raw_data120201 (automatically generated backup file) '

Page - 7 VB Definitions
Doc.Revision 3. 10A
AOW
Systems b! J&B Engineering Group

3.4. MainConfiguration

AGWDII uses entries in comunications.ini fire to set certain communications


parameter values. All this options can be directly set through
comunications mooule, ano
marked options with '*'can be set via AGW DLI too.

Defines the COM port to ne useO tor nOW


Communication.

Bus Com=COM2
lf this option is enabteffi
module comunications.exe will appear as an icon on
the taskbar. lf disable (=NO) comunications.exe will
not have a graphical presentation.

lcon=YES
This option must be set torESJorEr\/dll to;ork
properly with the PATH oaramerer
This option sets the maximumiapñity ot ttréTCW
Net connected to the pC, minimum ¡s iS and tne
,
maximum is 50. lt should be set to the lowest
number available, to ensure fast communication.

NTERMS = 15
Absolute or relative path where AGWDLL-DLL is
stored, lf set in the same directory as
comunications.exe then ,,.\\,, musi be set

PATH =.II
Thisoptionmustbesffi
are used. Comunications.exe will then send
and
receive data from the configured lp List . By
is setto N ' Deiault

TCP=N
1P1...tP15 lPListwhereTCp/m
TCP/|P are avaitabte. This is fiiled
communications when configured through
"rtomáti.áfry-6y
the
program , in "TCp/lp Configuration,,

|P1...1Pl5 = 0.0.0.0

Page " 8 VB Definitions


Doc.Revision 3.10A
F
I

by J&B Engineering Group


Definesthecommu@
milliseconds. The greater the timin-g the slower the
Bus goes and less traffic is geneáed on the net

options marked with (-) can be modified direcily with FLApr functions, see
SetComParameters for more info.

Pags . I VB Definitions
Doc.Revision 3.i0A
A(iw
Systems bl l&B Engineering Group

3,5. lnformation Storaqe

lnformation from AGW devices can be retrieved in three


ways, each option depends
on application requirements. ln each way, informat¡on is analyzed
áno siáreá ártomaticarry
once the communications module is started.
All three ways can be used at the same time it is onry
, a choice of the deveroper to
use one or another.

.have absolute
Rearrime option is by far the most comprex of ail, but ailows the
contror on rear time
Host apprication to
events manágemánt. severar rr_npr tunct¡oñJare
provided in order to make this implementation eásier.
AGW DLL sends a d-efined wM to Host apprication to achieve
this rear t¡me
operation. Note that AGWopenExtunction shoúlá be used
in this mode instead of the
normal AGWOpen.

Raw Data and Records.txt^gftlT based upon text fites which


i, n psáüoo can be read at any
time, even when comunications.exe is started.
rear time opáiát¡o.
achieved in this mode, aflowing an easier imprem'entation
an equar results as"un'0"
in Rear time
operation. Raw-Data informat¡on is in nontránsrated
mode, anci necoroJ.t*t is t¡re
Time&Attendance/Access Control analysis form.

oDBC storage, t¡me&attendance and access contror punches can be easiry stored
in this way to any Database which has a osru properrv
configured. rnformation can be
stored in rear time or at time intervars, us somé dátabáse
are very time consuming for
constant.storage. Exampres oDBc enabred sources , lr¡s nüá..,'H¡é'üiJ"l,'v"¡.r"r
_of
FoxPro databases, dBase , SeL Server, ORACLE

Page - '10
VB Definitions
Doc.Revision S.10A
AAW
Systems by l&B Engineering Group
3.5.1. RealTime

Messages from AGW devices are sent directly to host


application.
This method is ¡deal for.real time operations which do
not show crit¡cal information.
For large processes and carcurations the iaw_data fires
method is recommeñoeá.
FLAPI functions related with this method:
AGWReadMessage, AGWReadMessageEx,Translate?ecord

Note:
openEx Function must be cailed instead of open to achieve this
Rearrime method
An exampre of this working mode can be found in comunications
mode in Anatyze
Option, a window like this wilt appear, showing ail evánb
¡n reat t¡me .

Page - 11 VB Definitions
Doc.Revision 3.10A
. ,4(;W
Systems by l&B Engineering Group

3.5.2. Raw_datá and records.txt tiles

Ail information received from AGW devices is stored


in Raw_data fires and
records.txt which can be read at any time Oy frost
ipptications.
Prease refer to RawData Fire format document
for detaired information on rawdata
file records structure.

Raw-Data.dat is the main fire which is backed up


for security reasons on a
periodical time base.
Records.txt ¡s a transration made in rear time of
raw_data punch rines. This file can
be read at any time using any desired progrr;ring
lánguage.
Raw_data file info can be managed with these
FLApI functions :
AGWReadRawData, AGW4eadRawDatapointer,
AGWResetRawDatapoi nter, AGWSetRaw Datipái
nter,
AG W Upd ate R aw Data p o i nter

When AGWReadRawData is called, ¡t reads


a new record, ¡f it exists, and
increments the RawData pointer, which is nrroár
"
last record retrieved by the host application.
trt
informs the system ,which was the

The functions AGWResetRawDatapo¡nter,AGWReadRawDatapointer


AGWSetRawDatapointer, are used to maniputaie and
AGWReadBawData w¡ll start reading.
r-"--- "'-
iñe- position at wh¡ch the function
t

AGWBeadRawData _Reads a record from


RawData File and increments
Rawdata pointer

AGWResetRawDatapointer - Sets RawData pointer


to 0 ,thus allowing to read
all RawData records again
AGWUpdateRawDatapo¡ntef - sets RawData po¡nter
to the end of the fire,
acknowledging all the records, anO waiting
oity tor
data inserted since then.

AGWSetRawDatapointer _Sets RawData pointer


to an arbitrary position
AGWReadBawData pointer _ Reads current RawDatapointer position

Pase - 12 VB Definitions
Doc.Revision 3.10A
A(|W
Systems by l&B Engineeing Group
3.5.2.1.Backup Options of Raw_Data files

Raw-Data fires can be automaticaily copied to a Remotepc


for security reasons or for
example , to process the information tw¡ce in remote control
centers. eác'¡up Éatn is set
through communications Modure . rn option configure
and.hen contigiiá ián.
Besides this, each time communication module is
generated in .\Alfie_Files directory relative to the
started, a local backup copy is
, modute.

17 T i,ne Out Activated

F6frr3
Femole lemiráls Modem

Ma¡arietp liE-
T Send Datá toTF4o
17 TEP¡Ptnrelace
T Tm.ta.end.ñc¿Bypas3 f-;;-_--l
T Lbck syncnroniz¿hon 6v",y p-l ruri^
| |

l: DlC240 connection

l: St¿nd Alone Modde {ñ0AGW DLL)

T ohÍné Mode-f F40 Prorocot Emuldion nr Fili-


rasrear T,lb l---.-

Page - 13 VB Definitions
Doc.Revision 3.10A
AAW
Systems by J&B Engineering Group
3.5,3. ODBC Storage

. ..This.mode will process.records as they are received from AGW terminals and
store them in an external database through its ODBCOrivers.
A DSN source must be selected, tñen a table tf the
selected database , and
after this, thererationship between AGW Termináls
oata ano each fierd on the tabre.
1lr" ODBC configurarion window can be found at Comunicátions " ü;;d,
^
Conlqur.e,
lxtended Options , Externat OB Ctirage.
Due to the comprexity of fine tuning this option, dDBC
.
stored in errors.rogfire with a detaired expranation
rerated errors are
records.
of the ODBC án t"ir"o f..á.,
The following window will appear

Cl¡ck ¡n ODBC LinkTo


see all ava¡lable DSNS

0r een d6 dóros d¿ dct"drc onqeñ dE d¡rós de eqlEo


| I

mTerminül Records trfo


Eus6 en toé,¡sorres É I
----l
Date rorma, Sr,rng ODBC Liñk IOL
dBáse Fi¿s . Word fhol sh¡r¿btel dsn
(tr MS Acces oat¿h¡É lnor 3há:
rime Form,r shio dv¡sud Fúsp¡o D¿l¿b¿sé trot
S ratt
sh¿

'nde, Forn¿r
L [. e- E cocMusic t¡or shar¡bl¿I
úr
ForPb Fier Word Jnol shnrabtel ds.
@visua rolPn rab es fnoi srrar:r

- * l--- .

r€.miná,tD (Arr¡e) r, [--


Evenl/lnctde¡ce rl
. . Car¡t, User tD
t to" u" a" o5r l,Eüiñirr oÍEi-=_- 1,",o.. I

seleft @16 .l dqñ d€ dóro! de dchi,o qrÉ dqcibe


Dele or*¡ con(tér puÉd! uttp¡r cudtquier origen d. dérúel déco1,,ohd; d qué se
¡rch r'o,rLe léo.
@G¡á( r. . ú cor,l,ot.dd E D BC hn¿lado e. iL
equpo

re
f Prccess Ontine Records

[e*¡" I c."".r".]

A configuration exampre based on.f¡res found in path:C:aGWDLL


Which has a test Excel file and its associated óSfrñf".
sDK.oDBc Export
A correct configuration for that exampf" *orlOG if.,e-following :

Card / Usár lD

llmE
Processes
information al Oale
time intervals,
for Sharlng T Prcces9 online.Records
purposes or ¡n §¡ oK

BealT¡me

Page - 14 VB Definit¡ons
Doc.Revision 3.10A
AüW
Systems by l&B Engineering Group

4. HOW TO ¡NTEGRATE THE FLAPI INTO AN APPLICAT¡ON

4.1 . lnitialization

ln order to be able to initiarize the FLApr, the fo[owing


Function cails must be used.
Once the DLL is loaded

openAGW or OpenAGWEx To- rink the apprication to


the D, with or without
defined callback functions
Setoomparameters(optionat) To configure comunications parameters

lnitCommunications Tostartupcomunicationsmodulewh¡ch
manages all the protocols involved in the AGW
Devices control

4.2. Ending up FLApI

TerminateCommunications Closes communications


module

Pase - 15 VB Definitions
Doc.Revision 3.i0A
AAW
Systems by l&B Engineering Group

5. FLAP¡FUNCTIONS

5.1. SetOomparameters

Function prototype:

setcomparameters ( Byvar coMport As string, Byvar


Minimized As Bootean) As tnteger

The setcomparameters tunction edits the comunicaitons.ini


COM and ICON options with the Oet¡neO váiues. --"' fire and sets the BUS

Note:This function must be catted priorto the


execut¡on of rnitcommunications| as
of the comunications.ini fite are read at comun¡cainii.exe , varues
startup.

lnput Parameters

COMPoT

A pointer to a nur-terminated string containing


the communications port.
Mini mized

A boorean varue which determines the rcoN


option. see configuration 3.2
lf true, communications lcon will ,ot
on lnitCommun¡cations
"1p"",
Return Value

Possible return values are: AGW_SUCCESS,AGW FAILED


Cross-References

lnitCommunications0
lnitCommunicationsEx (Byval path As
Str¡ng )

Pase - 16 VB Definitions
Doc.Revision 3.10A
AAW
Systems by l&B Bngineering Group

5.2. lnitCommunications

Funct¡on prctotype:

lnitCommunications 0 As tnteger

The rnitcommunications function , executes the comunicat¡ons.exe


process modure
stored in the current path.

Return Value

Possiblereturnvaluesare: AGW_SUCCESS,AGW_FAILED
Cross-References

lnitCommunicationsEx (ByVal path As Strino)


2"^r-C_?yll:"*eters.(chariCoMport,oootuíiimizea¡
I e rm ¡nateoom
m u n icat io n s ()

Pase. 17 VB Definitions
Doc.Revision S.10A
AúW
Systems by l&B Engineering Group
5.5. lnitCommunicationsEx

Function prototype:

lnitcommun¡cationsEx (ByVat path As String)


As lnteger
The rnitcommunicat¡onsEx funct¡on executes
, the comunicat¡ons.exe process
module stored in the indicated paf,.

Return Value

Possiblereturnvaluesare: AGW_SUCCESS,AGW_FAILED
Cross-Beferences

lnitCommunications0
2:!9::l::ye_!.ers.bh?r.coMport,bootMinimized)
t e rm n ateco m m u n
icat io n s 0

Pase - rB VB Definitions
Doc.Revision 3.10A
AAW
Systems by f&B Engineering Group

5.4. TerminateCommunications

Function prototype:

TerminateCommunications 0 As lnteger

The Term¡natecommunications function croses comunications.exe process


and
the COM port by this process

Return Values

Possiblereturnvaluesare: AGW_SUCCESS,AGW_FAILED,
AGW_COMUNICATIONS-NOT-STARTED

Cross-References

lnitCommunications 0
lnitCommunicat¡onsEx (ByVat path As String)

Pase - 1e VB Definitions
Doc.Rev¡sion g.1OA
A(iw
Systems by l&B Engineering Group
5.5. AGWOpenVB ( AGWOpen for nonVB users)

Function prototype:

AGWOpenVBQ As tnteger

. The AGWopenvB function must be cailed prior to any other FLApr


enables commun¡cat¡on between AGW
function . rt
Dll, the Host Applicaiion and
"orrn¡"át¡on"."*".
Return Values

Possiblereturnvaluesare: AGW_SUCCESS,AGW_FAILED,
AGW-COMUNICATIONS-NOT_STARTED

Cross-Beterences

AGWOpenExVB(ByVal m_pHnd As hWnd , td_p As tnteger);

5.6. AGWOpenExVB ( AGWOpenEx for nonVB users)

Pase - 20 VB Definitions
Doc.Revision S.10A
AúW
Systems by l&B Engineering Group

Function prototype:

AGWOpenExVb(ByVal m_pHnd As hWnd , ByVal ld_p As lnteger)


As lnreger

. The AGWopenExfunction must be cafled prior to any other FLApr function . rt


enables communication between AGW Dll, the Host Applicaiion uno
"omrnicai¡on..ere.
By calling this tunction the applicat¡on and the dll are linked in two
ways, the
application is able to send messages ro the Dll (using the standard rmet
iuíóiions¡ ano
the dll can notify the application about Devices eventé such as a
correctReéisi;ior a Date
Change.

lnput Parameters:

m_pHnd

Handle of the window that is going to process the messages

ld-p

Notification Message that is sent by AgwDll to a window when


a
message is received from AGW Devices. Tipicairy áwn¡_useR+eoo
v;ru; i; used.

Retum Values

Possiblereturnvaluesare: AGW_SUCCESS,AGW_FAILED.
AGW-COM UN ICATIONS-NOT_STARTED

Bemarks:
A message wifl be posted with windows Message identifier
rd_p in the host
message queue whenever an event occurs in AGW N;t terminals.=
No ¡nformat¡on is sent
or LpARAM . Data is retreived and anatyzed by cafling AOWneaoüessage
ffiH:ff^r,
Cross-References

AGWopenvB$ ;AGWopen0 ;AGWReadMessageEx$


;AGWReadMessageExVB0;

5.7. SendAlfieMessage

Pase - 2i VB Definitions
Doc.Revision 3.10A
AAW
Systems by J&B Engineering Group

Function prototype:

sendAtfie[essage(ByVar Arfie As rnteger,Byvar Buffer As


string) As rnteger
The sendArf ieMessage function is used to send D¡rect
strings to an AGW Device (an
Alfie/Terminat) .
strings tipicaily conta¡n AGW commands described in section
7 in th¡s document,
this should be used onry in very specific situations ás
most of the commands that are
needed are already impremented in the form of a function
in the DLL.

lnput Parameters:

Alfie As lnteger

Device or Station number to which the String will


be sent.
Buffer As String

A pointer to null_terminated string containing the


data to Send.
Return Values

Possiblereturnvatuesare: AGW_SUCCESS,AGW_FAILED,
AGW_COMUNICATIONS_NOr-'STERTEP

Example:
To Reset terminal Number B o-n AGW Net , the command should be sent
as follows : SendAlfieMessage (3,,,102,,)

Pase - 22 VB Def init¡ons


Doc.Revision 3.i0A
AA|l
Systems bl J&B Engineering Group

5.8. TR38 Working lilode

Function prototype:

AGWRSSSetup (ByVal Alfie As lnteger,


Byval Withp¡n As tnteger,
By Vat pinDigíts) As tnleger

This function applies only to TR3g f¡ngerprint Terminals.

Defines the working mode on fingerprint terminar,


rdentify or Verify Mode.
ln verify mode the user.needs toiyp'e a t,
z , á or qdigit code (dependino on the
defined nu.mbgi of users) to ¡dentify n¡méért
oeüre nii fingsr. '--"-"-"
''
tn identify mode the user oniy needs to put ir-utting
ni-s tingÉr on inüieaoer to be identified.

lnput Parameters:

Alfie As lnteger

Device or station number where working mode


¡s defined .(0 equars bfoadcast).

WithPin As lnteger

1 sets plN lnput ON


0 sets ptN tnput OFF

PinDigits As lnteger

,. ptN mode stands


, for number of digits that are needed to
H::., identify an
For less than 10 employess 1 dig¡t is recommended
digits, and for 1000 users 4 dioiti. , for 100 employees, 2
Not used in NO ptN mode.

Return Values

Possiblereturnvaluesare: AGW_SUCCESS,AGW_FAILED,
AGW_COM UN I CATTO NLNor_srnnreo

Cross-references

None

Pase - 23 VB Definitions
Doc.Revision 3.10A
AAW
Systems by J&B Engineering Group
5.9. AGWEnroll User by Scan

Function prototype:

AGWEnroltScan (ByVal AIfie As lnteger,


ByVal UserCode As lnteger,
ByVal Name As String) As lnteger

This function applies only to TRgg fingerprint Terminals.


Enrolls a user's fingerprint on the desired terminal by scanning its finger
.
assigning the desired code to it while showing user's name on the screen.
and

lnput Parameters:

Alfie As lnteger

Device or Station number where enrolling is done.

UserCode As lnteger

User number that ¡dent¡fies the scanned fingerprint.

Name As String (optional)

User's name to be shown on screen when scanning.

Return Values

Possiblereturnvaluesare: AGW_SUCCESS,AGW_FAILED,
AGW-COMUN ICATIONS_NOT-STARTED

Cross-references

AGWEnrollFingerData

Pase - 24 VB Definitions
Doc.Revision S.10A
AúW
Systems by J&B Engineering Group
5.10. AGWEnroll llser by FingerData

Function prototype:

AGWEnroilFingerData (ByVal Alfie As lnteger,


ByVal UserCode As lnteger) As lnteger

lhis.lunction applies onty to TRSB fingerprint Terminals.


_En¡o§ 3 user's fingerprint on the desirelteiminal by sending the users
FingerData.This function is specially useful when sevérat
-'- rnsa t"r,iir"r. áolnsta,ed, user
is enrolled on each terminal withoui being present.

Note that a first command AGW Enroil by scan


must be issued ¡n order to retrieve
an user's FingerData. rn TR38 option s , Backup fingerprinf
' - on pc must oáirin"o on (it is
by default). See AGWTRSgSetup Command

lnput Parameters:

Alfie As lnteger

Device or station number where enroiling is done. (Arfie


0 equars broacrcast)
UserCode As lnteger

User number that identifies the scanned fingerprint.

Return Values

Possiblereturnvaluesare: AGW_SUCCESS,AGW_FAILED,
AGW_COMU N tcATt ONS_NOr_',sra nre o

Cross-references

AGWEnrollScan,AGWReadFingerData,AGWTR3BSetup

Pase - 25 VB Definitions
Doc.Revision 3.10A
AúW
Systems by J&B Engtneering Group
5.11. AGWRead FingerData

Function prototype:

AGWReadFingerData (ByVal Alfie As lnteger,


ByVal UserCode As lnteger,
) As lnteger

This function applies only to TRgg fingerprint Terminals.


Reads a users f¡ngerpr¡nt FingerData and stores it in an encrypted file.
The read FingerData is used by the system to enroll a user in 'several terminals at
once.

lnput Parameters:

Alfie As lnteger

Device or Station number where enrolling has been made.

UserCode As lnteger

. User number that identifies the FingerData to retrieve.

Return Values

Possiblereturnvaluesare: AGW_SUCCESS,AGW_FAILED,
AGW-COMUN ICATIONS-NOT_STARTED

Cross-references

AGWEnrollFingerData

Pase - 26 VB Def initions


Doc.Revision 3..10A
AAW
Systems by J&B Engineering Group

5.12. AGWDelete Enrolled User

Funct¡on prototype:

AGWDeleteUser @yVal Alfie As lnteger,


ByVal UserCode As lnteger) As lnteger

This function applies only to TRSS fingerprint Terminals.


Deletes an user FingerData from the áesired fingerprint terminal.

lnput Parameters:

Alfie As lnteger

Device or station number where user has been enroiled. (0


equars broadcast)
UserCode As lnteger

User number that identif¡es the fingerprint to be deleted .

Return Values

Possiblereturnvaluesare: AGW_SUCCESS,AGW_FAILED,
AGW-COMUNICATIONS-NOT.STARTED

Cross-references

AGWDeleteAllUsers

Pase - 27 VB Definitions
Doc.Revision 3.10A
A0w
Systems by J&B Engineering Group

5.13. AGWDelete All Enrolled lJsers

Function prototype:

AGWDeleteUsers (ByVat Alfie As lnteger) As lnteger

Th¡s funct¡on applies only to TR3g fingerprint Terminals.


Deletes all enrolled fingerpr¡nts on the désired terminal.

lnput Parameters:

Alfie As lnteger

Device or station number where erasing is performed. (0


equars broadcast).

Return Values

Possiblereturnvaluesare: AGW_SUCCESS,AGW_FAILED,
AGW-COMUNICATIONS-NOT-STARTED

Cross-references

AGWDeleteUser

Pase - 28 VB Definitions
Doc.Revision 3.10A
A(;W
Systems by J&B Engineering Group

5.14. Acwcetversion

Function prototype:

AGWGetVersion ( ByVal productText As String ,


ByYal Version As String,
ByVal Revision As String) As lnteger

The version of AGWDII is retreived.

lnput Parameters:

None

Output Parameters;

ProductTert As String (about gO chars)

A pointer to a nuil terminated string contain¡ng the product descr¡ption.

Version As String (about 10 chars)

A po¡nter to a nufl terminated str¡ng containing the AGWDil Version.

Revision As String (about 10 chars)

A pointer to a nuil term¡nated string containing the AGWDil Revision.

Return Value

Possible return values are:

AGW-SUCCESS

Cross-references

None

Pase - 2s VB Definitions
Doc.Revision 3.10A
AAW
Systems by J&B Engineering Group
' 5.15. AGWSetDateTime

Function prototype:

AGWSetDateTime 0 As lnteger

The computer,s date&time is sent to all AGW devices.

lnput Parameters:

None

Output Parameters:

None

Return Value

Possiblereturnvaluesare: AGW_SUCCESS,AGW_FAILED,
AGW_COMUNICATIONS-NOT-STARTED

Cross-references

None

Pase - 30 VB Definitions
Doc.Revision 3..f 0A
A0w
Systems by J&B Engineering Group

5.16. AGWWritelncidénce

Function prototype:

AGWWritelncidence (ByVat position As Long,


Byval Code As Long,
ByVal Buffer As String) As tnteger

This function call applies to TR30 terminals serles


Its used to define which event messages will appear in
the terminal.

lnput Parameters:

Posit¡on As Long, order in which this message w,t appear (for TR31 0nty)
Code As Long, Event code tinked with tniAescr¡ítíái
Buffer As String Message to appear on the Disptáy

Output Parameters:

None

Remarks for TR35:

00 appries for the defaurt message, for exampre if


_c_ode the a user presses code 5g
in the TR35 and it has no descr¡ption det¡neolmesságe
----w dáfin;da;;;J"'oii*iiíápp"u,
(although event 59 will be acknowledged) .
Message 00 is intended to be "SeÉct event,, message

Return Value

Possibtereturnvaluesare: AGW_SUCCESS,AGWSINTAX_ERROR
AGW-FAILED,AGW-NO-DATÁ
Cross-references

Pase . sl VB Definitions
Doc.Revision 3.10A
Aü}I
Systems bl l&B Engineering Group
' 5.17. AGWEraselncidence

Function prototype:

AGWEraselncidence ' ( Byval Code As Long) As Integer

This function call applies only to TR3S and TR3g terminals


Deletes the message that appears on the terminal and sets the default message

lnput Parameters:

Code As Long, Event code to be erased

Output Parameters:

None

Remarks

This command sets the default message to the desired event code

Return Value

Possiblereturnvaluesare: AGW_SUCCESS,AGWSINTAX_ERROR
AGW-FA¡LED,IéW-Ñó_OÁiÁ-
Cross-references

Pase - 32 VB Definitions
Doc.Revision 3.10A
- AüW
Systems by l&B Engtneering Group

5.18. Acw9endDisplayMessage

Function prototype:

AGWSenddisplayMessage (ByVal AlfíeAs lnteger,


ByYal Butfer As Str¡ng) As lnteger

This function call applies to TRgs and TR3g terminal series


It displays the des¡red string on the 2x16 LCD screen

lnput Parameters:

Alfie As lnteger, Terminal number where the message must be shown


Buffer As String Message to appear on the Display

Output Parameters:

None

Return Value

Possible return values are: AGW_SUCCESS,AGWSINTAX ERROR


-
AGW_FA|LED,new_Ñó_oÁiA-
Cross-references

Pase - 3s VB Definitions
Doc.Revision 3.10A
AúW
' Systems by l&B Engineeing Group

5.19. AGWReadMessageExVB

Function prototype:

AGWReadMessageExVB (ByVal DataType As String,


Byqef Action As lnteger,
By4ef User As Long, ByVal AGWTime As String,
Byval AGWDate As String,
ByVal WeekDay As String,
By4ef Alfie As lntege) As lnteger

This function call is made whenever an application needs to read data sent from Alfie
devices. A Message stack is provided and AGWReadMessdgeExvB will success until
stack reaches its end.
since this function call returns data from any success in the AGW Net, the returned
data must be filtered according to DataType value ( please refer to 6.1.3 DataTypes).

lnput Parameters:

None

Output Parameters:

DataType As String Krndof information received AGWTime, AGWAccess,


AGWSystem) (Chapter 6)
Action As lnteger, EvenUlncidence ocurred or typed in
UserAs Long, Card Number
AGWTime As String, Time of the Event
AGWDate As String, Date in DD/MMNY format
WeekDay As String, Weekday (1 for monday)
Alfie As lnteger Terminal Number

Return Value

Possiblereturnvaluesare: AGW_SUCCESS,AGW_FAILED,AGW_NO_DATA
AGW-COMUNICATIONS NOT STARTED

Pase - 34 VB Def initions


Doc.Revision 3.10A
AAW
by l&B Engineeing Group
' 5.20. AGWReadMessageEx

Function prototype:

AGWReadMessageEx (AGW_R ECORD. I nfo) As t ntege r

This function call is made whenever an applicat¡on needs to read data sent from Alfie
devices. A Message stack ¡s provided and AGWReadMessageEx will success until stack
reaches its end.

lnput Parameters:

None

Output Parameters:

ACW_RECORD struct please Refer to Section 6.1 .4

Return Value

Possiblereturnvaruesare: AGW_SuccESS,AGW_FATLED,AGW_NO_DATA
AGW-COMUN ICATIONS_NOT_STARTED

Pase . 3s VB Def initions


Doc.Revision 3.10A
AúW
- Systems by l&B Engineering Group

5.21. AGWReadRawData

Function prototype:

AGWReadRawData (Byval DataType As Sting,


ByRef Action As lnteger,
ByRef User As Long, ByVal AGWTime As String,
ByVal AGWDate As String,
ByVal WeekDay As String,
ByRef Alfie As lntege\ As tnteger

This function call is made whenever an application needs to read data sent from Alfie
devices stored in the RawData File , information is retreived in LIFO order and according to
RawData Pointer status. (Please refer to 3.5.2)
BawData Pointer is automatically increased each time this function is called.
This funct¡on succeds until the end of raw data file is reached.

lnput Parameters:

None

Output Parameters:
DataType As String Klndof information received AGWTime, AGWAccess,
AGWSystem) (Chapter 6)
Action As lnteger, Event/lncidence ocurred or typed ¡n
User As Long, Card Number
AGWTime As Sting, T¡me of the Event
AGWDate As Sting, Date in DD/MMNY format
WeekDay As Sting, Weekday (1 for monday)
Alfie As lnteger Terminal Number

Return Value

Possible returnvaluesare: AGW_SUCCESS,AGW_FAILED,AGW_NO_DATA

Cross-references

AGWSetRawDataPointeO,AGW ReadRawDataPointeO,AGW ResetRawDatapointeO ;

Pass - 36 VB Def initions


Doc.Revision 3.10A
AüW by J&B Engineering Group
Systems

5.22. AGWReadRawDataPointer

Function prototype:

AGWReadBawDataPointer(ByRef Address As Long) As lnteger

Reads the current RawData pointer pos¡tion. (Please refer to 3.5.2)

lnput Parameters:

None

Output Parameters:

Address As Long, Absolute rawdata po¡nter position

Retum Value

Possible return values are: AGW SUCCESS

Cross-references

AGWSetRawDataPointeO,AGWResetRawDataPointeO;

Pase - 37 VB Definitions
Doc.Revision 3.10A
AAW
Systems b l&B Engineering Group

5.23. AGWSetRawData Poi nter

Function prototype:

AGWSetRawDataPointer(ByRef Address As Long) As lnteger

Sets the desired RawData pointer position. (Please refer to 3.5.2)

lnput Parameters:

Address As Long, Absolute rawdata pointer pos¡tion to move to

Output Parameters:

None

Return Value

Possible return values are: AGW_SUCCESS

Cross-references

AGWReadRawDataPointeO,AGW ResetRawDataPointeO ;

Pase - s8 VB Definitions
Doc.Revision 3.10A
AAW
Systems
by l&B Engineering Group

5.24. AGWResetRawDataPointer
Function prototype:

AGWResetRawDataPointer) As lnteger

Sets RawData posit¡on to 0 , the beginning of RawData file


(Please refer to 3.5.2)

lnput Parameters:

None

Output Parameters:

None

Return Value

Possible return values are: AGW SUCCESS

Cross-references

AGWReadRawDataPointer0,AGWSetRawDataPointeO;

Pase - 3s VB Definitions
Doc.Revision 3.10A
- AAW
by l&B Engineering Group
Systems

5.25. AGWTestHorn

Function prototype:

AGWTestHorn(ByVal Alfie As Long,


By Val T¡meon As Long,
By Val TimeOff As Long,
Byval Config As $nn@) As lnteger

Sends a test horn to sound in real time according to the configured settings.
This can be done dlrectly through Communications Module in Terminals
Co nf ig u rati o n/S e n d H o m s

lnput Parameters:

Alfie - Terminal Number to be configured


Time On - Time in secs the Relay will be act¡vated according to Config
Time Off - Time in secs the Relay will be deactivated according to Config
Config - Eight Chars sett¡ng the times Relay will be On/Off

'0'- Relay Off


'1'- Relay On
i.e.: 1000 0000 - Horn is act¡vated one time
1010 1010 - Horn switchesfourt¡mesfrom On to Off

Output Parameters:

None

Return Value

Possiblereturnvaluesare: AGW_SUCCESS,AGW_SINTAX_ERROR

Cross-references

AGWSendHorn0;

Pase - 40 VB Def initions


Doc.Revision 3.104
AúW
Systems
b! I&B Engineering Group
5.26. AGWSendHorn

Function prototype:
AGWSendHorn( ByVat position As Long,
ByVal Atfie As Long,
By Val Timeon As-Long,
By Val TimeOff As Lon-g,
lrlgtQonfis ts Strin{'
Byvat Time As Str¡ng
ByVal WeekDays né Str¡ng) As tnteger
sends a test horn to so.und. in rear time
according to the configured settings.
This configuration can be aone a¡recttv q
- " vu tiün
Terminals Conf ig u ration/Se nd Horn s - - - "' " v communications Modure in

lnput Parameters:

Position _ position in
Alfie - Terminal Number.Terminal Tabte , ranges from
' I to 20
to be configúrea','-
Time On _ Time in secs the AeAy
í,it iá adivated accord¡ng to Confio
rime off _ rime in secs the Retiy iiitlááiáá
conris - e¡gnléÁá',s sett¡ns the t¡mes Retay;,;t:L1r3?{r,* to co-nris
,0,_
Retay
,t' _ Relay Oft
On
i.e.: l00O OOOO _ Horn is act¡vated one time
1010 l0l0 _ Horn switches four times from On
to Off
Time - Time at which the Horn witt sound
, its format is HH:MM
WeekDays: Seven Chars Sett¡ng the
days the siren will sound
i.e:
I I I 1 100_
sound from Monday tiil Friday
.Witt
000001 I - Will sound only on weekend

Output Parameters:

None

Return Value

Possible return values are:


AGW_SUCCESS,AGW_S I NTAX_ERROR
Cross-references

AGWSendHorn0;

Page - 41
VB Definitions
Doc.Revision 3.10A
' !' Aaw
Systems by l&B Engineering Group

6. StructureDefinitions

6. 1. External Function Calls

AGWGetVersion (ByVal productTe)rt As String,


Byval Version As String,
ByVat Revision As String) A! lnieger

AGWGetVersionEx (Byval productText As String)


As lnteger
AGWOpenVB L¡b 0 As tnteger

AcwReadMessage (ByBef Command As lnteger, ByRef


Data As String) As lnteger
AGWReadMessageExVB (BlVal,DataType As
String, ByRef Act¡on As-sii¡n
lnteger,
Lons,-Byúat Áowrir" Á" gi,-'
?vl"l !f :1. 4.
weer<oav Ásttrins'
BíX:l i?,yisl;ái"il l3ifily3
AGWSetDateTime 0 As lnteger

AGWGetNetStat (ByRef Status As String) As lnteger

ln¡toommunicat¡ons 0 As lnteger

lnitCommunicationsEx (ByVal path As String) As


Integer
AGWSetAtfieAddress (ByVal OtdAlfie As Long, ByVal
NewAlfie As Long) As lnteger
SendAlfieMessage (ByVal Atf¡e As lnteger, ByVal Buffer
As String) As lnteger
setcomParameters (ByVar coMport As string, Byvar
Minim¡zed As Boorean) As rnteger
TerminateCommunications 0 As lnteger

AGWReadRawData (ByVal DataType As String, ByRef


Action As lnteger,
ByRef User.As Long, ByVal ÁGWT¡me as String]
ByVat AG\rVDate As String, ByVat WeekDay Áittrirg,
ByRef Atfie As tnteger) Rs tntéger

AGWResetRawDatapointer 0 As lnteger

AGWUpdateRawDatapointer 0 As lnteger

AGWReadRawDatapo¡nter (ByBef address As Long)


As lnreger
AGWSetRawDatapointer (ByVal Alfie As Long) As lnreger

AGWActivateCard (ByVal Alfie As Long, ByVal User


As Long) As lnteger

Pase - 42 VB Definitions
Doc. Rev¡sion 3. 1 OA
AúW
Systems by I&B Engineering Group
AGWDeactivateCard (ByVal Alfie As Long,
B@
Acwwritetncidence (ByV.al position As Long,
ByVat Code As Long,
ByVat Buffer As StringlAs tnteger

AGWEraselncidence ( ByVal Code As Long)


As lnteger
AGWSenddisplayMessage (Byval Alf¡e As lnteger,
ByVat Buffer As String) As lnteger
AGWReadMessageExVB (Byval DataType As
Str¡ng,
ByRef Action As lnteger,
ByBef User As Long,-ByVal AGWTime ñe
As vurrrY'
Strino.
ByVat AGWDate ns Siríng,
PVlat WeekDay As String-,
ByRef Alfie As lnteger) Aé lnteger

AGWReadRawData (ByVal DataType As String,


ByRef Action As tñteger,
ByRef User As Long,-ByVal AGWTime
As String,
ByVal AGWDate As String,
ByVal WeekDay As String-,
ByBef Atfie As integer) Ai'tnteger

AGWReadRawDatapointer(ByRef Address As
Long) As lnteger
AGWSetRawDatapointe(ByRef Address As Long) As Integer
AGWBesetRawDatapointer$ As lnteger

AGWTestHorn (ByVat Alfie As Lono.


By Val TimeOn A5'Lono.
By Val TimeOff As Lonó.
ByVal Config As String» As lnteger

AGWSendHorn (ByVal Position As Long,


ByVal Alfie As Lono.
By Vat TimeOn As-long,
By Val TimeOff As Long,
ByVal Config As String
ByVal Time As String
ByVat WeekDays As'string) As lnteger

Page - ,t3 VB Definitions


Doc.Revision 3.10A
,
AúW
Systems bl l&B Engineering Group
6.1.1. Data Structures & Constants

6.1.2. Return Values

Const AGW-FAILED
0
Const AGW_SUCCESS 1
Const AGW_StNTAX_ERROR
2
Const AGW_NO_DATA
3
Const AGW-COMUN IcATIoNs-NoT_STARTED
4

6.1.3. DataTypes

const AGWTime 1 ' Time&Attendance terminals


const AGWAccess 2 ' Access Control terminals
const AGWSystem 3 'System Messages
const AGWSensor 4 ' Sensor status messaoes
const AGWSensor2 5 ' Sensor status messa[es

6.1.4. AGW_RECORD Struct

struct AGW_RECORD
{
¡nt DataType;
int Action;
long User;
char Time[6];
char Date[1 1];
char WeekDay[2];
int Alfie;
);

Page - 44 VB Definitions
Doc.Revision 3.10A
A(;W
Systems bl I&B Engineering Group

7. AGW Main Direct Commands

ALFIE IDR TR-30 COMMANDS LIST ( Version 01.24


)
Command Description parameters

Time & Date Control


113 Reads Date
114 Reads Time
llSYYMMDDSS Sets Date YY -> Year
MM-> Month
DD -> Day
SS -> WeekDay (01-07)
lIoHHMMSS Sets Time HH -> Hour
MM -> Minute
Basic Terminal SS -> Seconds
Commands
117 Activates Relay 1
120 Deactivates Relayl
121 Activates Relay 2
122 Deact¡vates Relay 2
136 Gets Terminal Version First 4 Bytes XX.YY
103 Test Message

Reset Commands
102 Resets Terminal
125 Resets Records
126 Resets Horns Table

Page - 45 VB Definitions
Doc.Revision 3.10A

You might also like