FALCOSDK v1.0D PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 39

FALCOIP

FALCOIP API Documentation


Ver 1.0 Rev D

Page 1 of 39
FALCOIP

Table of content
TABLE OF CONTENT........................................................................................................................................2

1 INTRODUCTION...............................................................................................................................................3

2 COMPONENTS..................................................................................................................................................3
2.1 FALCO COMMAND CLIENT...................................................................................................................................4
2.1.1 Controller Registry.................................................................................................................................4
Sample Code...................................................................................................................................................6
2.1.2 Controller Parameters............................................................................................................................7
Sample Code...................................................................................................................................................9
2.1.3 Card Register........................................................................................................................................10
Sample Code.................................................................................................................................................12
2.1.3.b Card Register with Expiry Date........................................................................................................12
2.1.4 Visitor Card Register............................................................................................................................15
Sample Code.................................................................................................................................................17
2.1.5 Time Set.................................................................................................................................................18
Sample Code.................................................................................................................................................19
2.1.6 Time Zone..............................................................................................................................................21
Sample Code.................................................................................................................................................22
2.1.7 Date and Time setting...........................................................................................................................24
Sample Code.................................................................................................................................................25
2.1.8 Holiday Setting......................................................................................................................................26
Sample Code.................................................................................................................................................27
2.1.9 Clear and Reset Memory.......................................................................................................................28
Sample Code.................................................................................................................................................29
2.1.10 Get Firmware Information..................................................................................................................31
Sample Code.................................................................................................................................................31
2.1.11 Pulse Door Open................................................................................................................................32
Sample Code.................................................................................................................................................32
2.1.12 LCD Message......................................................................................................................................33
2.2 FALCO TRANSACTIONS SERVER...........................................................................................................................34
Sample Code.................................................................................................................................................34
2.3 FALCO TRANSACTIONS CLIENT...........................................................................................................................36
Sample Code ................................................................................................................................................37
Transaction Code..........................................................................................................................................38

Page 2 of 39
FALCOIP

1 Introduction

The FalcoNetworkLib SDK is currently available through COM interfaces.

The COM object exposes several interfaces that allow:


a. receiving the events stored in the Controller(s)
b. communicating with the Controller(s)
automatically register any available Falco TCP/IP Controllers connected within the network

2 Components

FalcoNetworkLib consists of the following components

Component Description
a. FalcoCommandClient • to send commands to the controller
• to receive configurations from the controller
• to perform controller discovery functions
b. FalcoTransactionsServer • to receive transactions from the controllers
c. FalcoTransactionsClient • to receive transactions from the Transactions
Server

Page 3 of 39
FALCOIP

2.1 Falco Command Client

The main functionality of this component is used to:


• to communicate with the controller to perform specific tasks such as setting date and time,
setting/retrieving controller settings, adding/retrieving/deleting card information, perform
pulse door open, etc
• to register the connected controllers in the network to the system

2.1.1 Controller Registry


void ResetControllerCount();
Parameters:
None

Return Value:
None

This command is used to reset all the controller information currently stored by FalcoNetworkLib.
This must be run before any other commands during the controller registry process to obtain the latest
controller information from the network.

int FalcoBroadcastGetNetworkParameter(const char *aipaddress, int aport, char *aerrormsg);


Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This command is used to send a command to the controller to reply

int GetControllerCount();
Parameters:
None

Return Value:
Returns the number of controllers that were registered

Once the FalcoBroadcastGetNetworkParameter has been called, use this command to obtain the
number of controllers that registered to the server. This is used in conjunction with the
EnumControllerInfo function.

Page 4 of 39
FALCOIP

bool EnumControllerInfo(long aidx, char *aip, char *amac, char *aname);


Parameters:
aidx – a unique zero-based array index to indicate a specific controller record
aip – the registered controller IP address
amac – the registered controller MAC address
aname – the registered controller Device Name

Return Value:
Returns True if aidx is valid and information is successfully retrieved.

This function allows you to obtain the controller information. aidx is a zero-based index that is used to
retrieve a particular controller information.

All controllers have a unique MAC address. Use this MAC address to reconfigure the network
parameters of a specific controller.

int FalcoSetNetworkParameterWithMAC(const char *aipaddress, const char *arefmac,


NetworkParameterStruct &acmdstruct, char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
arefmac – the MAC address of the controller to be modified
acmdstruct – the new network parameters to be set. Please refer to the table below for further
details.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

Return Value:
TCPPort Number for Firmware Version T2.28.221SEAI is 1008
TCPPort Number for Firmware Version T2.28.021SEAI is 1007

This function allows you to specifically configure a controller based on its known MAC address.

AcmdStruct definition:
Data Member Description
byte[2] Mode Reserved. Please set to 0.

const char *MAC Controller MAC address

const char *IP Controller IP address

const char *NetMask Controller Netmask

const char *GatewayIP Controller Gateway address

const char *DestIP Transaction Server IP address

Page 5 of 39
FALCOIP

int DestTCPPort Transaction Server Port number

const char *SrcIP Command Client IP address

int SrcUDPPort Command Client Port number

const char *InfoDestIP Reserved. Please set to 0.0.0.0

int InfoDestPort Reserved. Please set to 0.

const char *DeviceName Controller device name

const char *Password Controller password

int FalcoBroadcastGetNetworkParameter(const char *aipaddress, int aport, char *aerrormsg);


Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This command is used to send a command to the controller to reply

Sample Code
Option Explicit
Dim cmdobj As New FalcoNetworkLib.FalcoCommandClient

Private Sub StartRegistry()


Dim msg As String

cmdobj.ResetControllerCount
If cmdobj.FalcoBroadcastGetNetworkParameter("255.255.255.255", 2003, msg) <> 0 then
MsgBox msg
End If
End Sub

Private Sub PopulateListBox()


Dim i As Integer
Dim cnt As Integer
Dim ctrlip As String
Dim ctrlmac As String
Dim devicename As String

List1.Clear
cnt = cmdobj.GetControllerCount
For i = 0 To cnt - 1
If Not cmdobj.EnumControllerInfo(i, ctrlip, ctrlmac, devicename) Then
Exit For
End If

List1.AddItem "IP: " & ctrlip & " MAC: " & ctrlmac & " Name: " & devicename
Next
End Sub

Page 6 of 39
FALCOIP

2.1.2 Controller Parameters


DoorParameterStruct Detail
Data Member Description
byte Mode BIT0: Operation setting for Card Mode Only, or Card & Pin Mode
0- Card Mode Only; 1 – Card & Pin Mode
BIT1:Operation setting for the Pin Mode Only [ 0 – Disable; 1 – Enable ]
BIT2: Operation setting for Card Lock Out Mode [ 0 – Disable; 1 – Enable ]
BIT3: Operation setting for Security Off Mode. [ 0 – Disable; 1 – Enable ]
BIT4: Operation setting for Antipassback [ 0 – Disable; 1 – Enable ]
BIT5: Operation setting for Global Antipassback [ 0 – Disable; 1 – Enable ]
BIT6: Operation setting for Dual Card Mode [ 0 – Disable; 1 – Enable ]
BIT7: Operation setting for Report Mode. [ 0 – Disable; 1 – Enable ]
byte Mode2 Reserved. Please set to 0.

byte Antipass_Tz Antipassback time zone

AutoPinTimezoneStruct Auto Pin number and time zone


&AutoPin

byte DoorOpenTime Door Open Time

byte ExitButton_Tz Exit button enable time zone

byte FacilityCode Facility code

byte GlobalAntipass_Tz Global antipassback enable time zone

byte InCnP_Tz Card and pin enable time zone

byte InDualCard_Tz Dual card enable time zone

byte LockRel_Tz Lock releast time zone

byte LockRelTime Lock releast time

byte OutCnP_Tz Out reader card and pin time zone

byte OutDualCard_Tz Out reader dual card time zone

AutoPinStruct Detail
Data Member Description
byte AutoPin_TZ Anto pin number enable time zone

int AutoPinNo Anto pin number in 4 digit

int FalcoSetDoorParameter (const char *aipaddress, int aport, int adoorid, DoorParameterStruct
&adoorparameter , char *aerrormsg);
Parameters:

Page 7 of 39
FALCOIP

aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id that you would like to request for controller parameters
adoorparameter – a new door parameter to be set. Please refer to the table DoorParameterStruct
above for further details.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This command use to set the door parameter into the controller selected. All the controller information
are able to be adjusted.

int FalcoGetDoorParameter (const char *aipaddress, int aport, int adoorid, DoorParameterStruct
& areplystruct, char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id that you would like to request for controller parameters
areplystruct – door parameter to be retrieve from controller. Please refer to the table
DoorParameter above for further details.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allows you to get the retrieve all the information for that controller which you selected.

Page 8 of 39
FALCOIP

Sample Code
Option Explicit
Dim cmdobj As New FalcoNetworkLib.FalcoCommandClient

Private Sub SetDoorParameter()


Dim msg As String
Dim nResult As Integer
Dim param As FalcoNetworkLib.DoorParameterStruct

param.Mode = Format(17, "00")


param.Mode2 = 0
param.DoorOpenTime = 5
param.LockRelTime = 2
param.LockRel_Tz = 0
param.InCnP_Tz = 1
param.OutCnP_Tz = 0
param.Antipass_Tz = 1
param.ExitButton_Tz = 0
param.InDualCard_Tz = 0
param.OutDualCard_Tz = 0
param.GlobalAntipass_Tz = 0
param.AutoPin(0).AutoPin_TZ = 1
param.AutoPin(0).AutoPinNo = 1111
param.AutoPin(1).AutoPin_TZ = 0
param.AutoPin(1).AutoPinNo = 0
param.AutoPin(2).AutoPin_TZ = 0
param.AutoPin(2).AutoPinNo = 0
param.AutoPin(3).AutoPin_TZ = 0
param.AutoPin(3).AutoPinNo = 0
param.AutoPin(4).AutoPin_TZ = 0
param.AutoPin(4).AutoPinNo = 0
param.AutoPin(5).AutoPin_TZ = 0
param.AutoPin(5).AutoPinNo = 0
param.AutoPin(6).AutoPin_TZ = 0
param.AutoPin(6).AutoPinNo = 0
param.AutoPin(7).AutoPin_TZ = 0
param.AutoPin(7).AutoPinNo = 0
param.AutoPin(8).AutoPin_TZ = 0
param.AutoPin(8).AutoPinNo = 0
param.AutoPin(9).AutoPin_TZ = 0
param.AutoPin(9).AutoPinNo = 0

nResult = cmdobj.FalcoSetDoorParameter(“192.168.0.23”, 2003, 0, param, msg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

Page 9 of 39
FALCOIP

2.1.3 Card Register


CardDbStruct Detail
Data Member Description
byte AccessTimeZone Access time zone

char *CardNo Card number

byte CardStatus Card status

int DualCardGID Dual card Group number

byte LiftAccessLvl Lift access level for the card

byte Mode Mode

int PinNo 4 digit for the card accept to use card plus
pin mode.

int FalcoQuickSetCardDb(const char *aipaddress, int aport, CardDbStruct &acarddb, char


*aerrormsg);

Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
acarddb – new card info to be set. Please refer to the table CardDbStruct above for further details.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allows you to add new card information into a controller

int FalcoQuickClearCardDb (const char *aipaddress, int aport, int adoorid, int acardno, char
*aerrormsg);

Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id that you would like to request for card info
acarddb – card info to be delete from controller. Please refer to the table CardDbStruct above for
further details.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Page 10 of 39
FALCOIP

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This command allows you to delete one card from the selected controller.

int FalcoQuickGetCardDb (const char *aipaddress, int aport, int adoorid, int acardno,
CardDbStruct &areplystruct, char *aerrormsg);

Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id that you would like to request for card info
acardno – a card number that you would like to request from controller
acarddb – a card info to be read. Please refer to the table CardDbStruct above for further details.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This command is used to send a command to the controller to reply card information base on the card
number you passed.

int FalcoClearAllCardDb (const char *aipaddress, int aport, int adoorid char *aerrormsg);

Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id that you want to clear card info.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This command allows you to clear all the card information in a controller that you specify.

Page 11 of 39
FALCOIP

Sample Code
Option Explicit
Dim cmdobj As New FalcoNetworkLib.FalcoCommandClient

Private Sub AddCard()


Dim msg As String
Dim nResult As Integer
Dim param As FalcoNetworkLib.CardDbStruct

param.CardNo = 1
param.PinNo = 0
param.AccessTimeZone = 1
param.LiftAccessLvl = 1

nResult = CommandObj.FalcoQuickSetCardDb("192.168.0.23", "2003", 0, param, msg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

Private Sub DeleteCard()


Dim msg As String
Dim nResult As Integer

nResult = CommandObj.FalcoQuickClearCardDb("192.168.0.23", 2003, 0, 1, strErrorMsg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

Private Sub ClearCard()


Dim msg As String
Dim nResult As Integer

nResult = CommandObj. FalcoClearAllCardDb ("192.168.0.23", "2003", 0, msg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

2.1.3.b Card Register with Expiry Date


CardDb64Struct Detail
Data Member Description
byte AccessTimeZone Access time zone

char *CardNoSeg1 Reserv field

char *CardNoSeg2 Card Number

byte CardType Default = 0 (Reserv)

byte CardStatus Card status

int Year Expiry Year

Page 12 of 39
FALCOIP

int Mon Expiry Month

Int Day Expiry Day

byte LiftAccessLvl Lift access level for the card

byte Mode Mode

int PinNo 4 digit for the card accept to use card plus
pin mode.

int FalcoSetCardDb64(const char *aipaddress, int aport, int doorid, CardDb64Struct &acarddb,
char *aerrormsg);

Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
doorid – 0 for first door and 1 for extension door
acarddb – new card info to be set. Please refer to the table CardDb64Struct above for further
details.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allows you to add new card information with expiry date into a controller

int FalcoClearCardDb64 (const char *aipaddress, int aport, int adoorid, int acardnoseg1, int
acardnoseg2, char *aerrormsg);

Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id that you would like to request for card info
acardnoseg1 – Reserv . always put 0.
Acardnoseg2 – Card no you want to delete from controller.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This command allows you to delete one card from the selected controller.

Page 13 of 39
FALCOIP

int FalcoGetCardDb64 (const char *aipaddress, int aport, int adoorid, int acardnoSeg1, int
acardnoSeg2 CardDb64Struct &areplystruct, char *aerrormsg);

Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id that you would like to request for card info
acardnoseg1 – Reserv field. Default 0
acardnoseg2 – the card no to be read.
acarddb – a card info to be read. Please refer to the table CardDb64Struct above for further
details.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This command is used to send a command to the controller to reply card information base on the card
number you passed.

.Sample Code
Option Explicit
Dim cmdobj As New FalcoNetworkLib.FalcoCommandClient

Private Sub AddCard()


Dim msg As String
Dim nResult As Integer
Dim param As FalcoNetworkLib.CardDb64Struct

Param.CardType = 0
param.CardNoSeg1 = 0
param.CardNoSeg2 = 1
param.PinNo = 0
param.AccessTimeZone = 1
param.LiftAccessLvl = 1

nResult = CommandObj.FalcoSetCardDb64("192.168.0.23", "2003", 0, param, msg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

Private Sub DeleteCard()


Dim msg As String
Dim nResult As Integer

nResult = CommandObj.FalcoClearCardDb64("192.168.0.23", 2003, 0,0, 1, strErrorMsg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

Page 14 of 39
FALCOIP

2.1.4 Visitor Card Register

CardDbStruct Detail
Data Member Description
byte AccessTimeZone Access time zone

int *CardNo Card number

byte CardStatus Card status

int DualCardGID Dual card Group number

byte LiftAccessLvl Lift access level for the card

byte Mode Report Mode

int PinNo 4 digit for the card accept to use card plus
pin mode.

byte Year Year of ExpiryDate

byte Day Day of ExpiryDate

byte Mon Month of ExpiryDate


byte Min Minute of ExpiryDate
byte Hour Hour of ExpiryDate

int FalcoQuickSetVisitorCardDb (const char *aipaddress, int aport, VisitorCardDbStruct


&acarddb, char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
acarddb – new visitor card info to be set. Please refer to the table VisitorCardDbStruct above for
further details.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allows you to add new visitor card information into a controller

int FalcoQuickClearVisitorCardDb (const char *aipaddress, int aport, int adoorid, int acardno,
char *aerrormsg);

Parameters:

Page 15 of 39
FALCOIP

aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id that you would like to request for card info
acarddb – visitor card info to be delete from controller. Please refer to the table
VisitorCardDbStruct above for further details.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This command allows you to delete one visitor card from the selected controller.

int FalcoQuickGetVisitorCardDb (const char *aipaddress, int aport, int adoorid, int acardno,
VisitorCardDbStruct &areplystruct, char *aerrormsg);

Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id that you would like to request for card info
acardno – a visitor card number that you would like to request from controller
acarddb – a visitor card info to be read. Please refer to the table VisitorCardDbStruct above for
further details.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This command is used to send a command to the controller to reply card information base on the card
number you passed.

int FalcoClearAllVisitorCardDb (const char *aipaddress, int aport, int adoorid char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id that you want to clear card info.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:

Page 16 of 39
FALCOIP

0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This command allows you to clear all the card information in a controller that you specify.

Sample Code
Option Explicit
Dim cmdobj As New FalcoNetworkLib.FalcoCommandClient

Private Sub AddVisitorCard()


Dim msg As String
Dim nResult As Integer
Dim param As FalcoNetworkLib.VisitorCardDbStruct

param.CardNo = CardNo
param.AccessTimeZone = TimeZone
param.PinNo = PinNo
param.Year = Year(ExpiryDate)
param.Mon = Month(ExpiryDate)
param.Day = Day(ExpiryDate)
param.Hour = Hour(ExpiryDate)
param.Min = Minute(ExpiryDate)

nResult = cmdobj.FalcoQuickSetVisitorCardDb("192.168.0.23", 2003, 0, param, msg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

Private Sub DeleteVisitorCard()


Dim msg As String
Dim nResult As Integer

nResult = cmdobj.FalcoQuickClearVisitorCardDb("192.168.0.23", 2003, 0, ACardNo, msg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

Private Sub ClearVisitorCard()


Dim msg As String
Dim nResult As Integer

nResult = cmdobj.FalcoClearAllVisitorCardDb("192.168.0.23", 2003, 0, msg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

Page 17 of 39
FALCOIP

2.1.5 Time Set


TimesetStruct Detail
Data Member Description
byte TimesetNo A number of the time set

byte StartTimeHour1 Interval 1 start hour

byte StartTimeHour2 Interval 2 start hour

byte StartTimeHour3 Interval 3 start hour

byte EndTimeHour1 Interval 1 end hour

byte EndTimeHour2 Interval 2 end hour

byte EndTimeHour3 Interval 3 end hour

byte StartTimeMin1 Interval 1 start minute

byte StartTimeMin2 Interval 2 start minute

byte StartTimeMin3 Interval 3 start minute

byte EndTimeMin1 Interval 1 end minute

byte EndTimeMin2 Interval 2 end minute

byte EndTimeMin3 Interval 3 end minute

int FalcoQuickSetTimeset (const char *aipaddress, int aport, int adoorid, TimeSetStruct
&atimeset, char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id to be assign..
atimeset – time set information to be set into controller. Please refer to the table TimeSetStruct
above for further details
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This command use to set the time set into the controller selected.

int FalcoQuickGetTimeset (const char *aipaddress, int aport, int adoorid, byte atimeset,
TimeSetStruct &areplystruct, char *aerrormsg);
Parameters:

Page 18 of 39
FALCOIP

aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id to be assign..
atimeset – time set number to retrieve the time set information from controller
areplystruct – a time set info to be read. Please refer to the table TimeSetStruct above for further
details.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allow to retrieve the time set information from the selected controller

int FalcoClearTimeset (const char *aipaddress, int aport, int adoorid char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id to be assign..
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This command allows you to clear all the time set information in a controller that you specify.

Sample Code
Option Explicit
Dim cmdobj As New FalcoNetworkLib.FalcoCommandClient

Private Sub SetTimeSet()


Dim msg As String
Dim nResult As Integer
Dim param As FalcoNetworkLib.TimesetStruct

param.TimesetNo = 1
param.StartTimeHour1 = 8
param.StartTimeMin1 = 30
param.EndTimeHour1 = 17
param.EndTimeMin1 = 30
param.StartTimeHour2 = 0
param.StartTimeMin2 = 0
param.EndTimeHour2 = 0
param.EndTimeMin2 = 0
param.StartTimeHour3 = 0
param.StartTimeMin3 = 0
param.EndTimeHour3 = 0
param.EndTimeMin3 = 0

nResult = CommandObj.FalcoQuickSetTimeset("192.168.0.23", 2003, 0, param, msg)

Page 19 of 39
FALCOIP

If nResult <> 0 Then


MsgBox msg
End If
End Sub

Private Sub GetTimeSet()


Dim msg As String
Dim nResult As Integer
Dim param As FalcoNetworkLib.TimesetStruct
Dim strmsg As String

nResult = CommandObj.FalcoQuickSetTimeset("192.168.0.23", 2003, 0, param, msg)


If nResult <> 0 Then
MsgBox msg
Else
strmsg = param.TimesetNo & vbCrLf
strmsg = strmsg & param.StartTimeHour1 & ":" & param.StartTimeMin1 & " to " &
param.EndTimeHour1 & ":" & param.EndTimeMin1 & vbCrLf
strmsg = strmsg & param.StartTimeHour2 & ":" & param.StartTimeMin2 & " to " &
param.EndTimeHour2 & ":" & param.EndTimeMin2 & vbCrLf
strmsg = strmsg & param.StartTimeHour3 & ":" & param.StartTimeMin3 & " to " &
param.EndTimeHour3 & ":" & param.EndTimeMin3 & vbCrLf
MsgBox strmsg
End If
End Sub

Private Sub ClearTimeZone()


Dim msg As String
Dim nResult As Integer

nResult = CommandObj.FalcoClearTimeset("192.168.0.23", 2003, 0, msg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

Page 20 of 39
FALCOIP

2.1.6 Time Zone


TimezoneStruct Detail
Data Member Description
byte TimeZoneNo A number of the time zone

byte MonTimeSet Monday time set

byte TueTimeSet Tuesday time set

byte WedTimeSet Wednesday time set

byte ThuTimeSet Thursday time set

byte FriTimeSet Friday time set

byte SatTimeSet Saturday time set

byte SunTimeSet Sunday time set

byte Reserved1 Reserved 1

byte Reserved2 Reserved 2

int FalcoQuickSetTimezone (const char *aipaddress, int aport, int adoorid, TimezoneStruct &
atimezone, char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id to be assign..
atimezone – time zone information to be set into controller. Please refer to the table
TimeZoneStruct above for further details
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This command use to set the time zone into the controller selected.

int FalcoQuickGetTimeZone (const char *aipaddress, int aport, int adoorid, byte atimezone,
TimezoneStruct & areplystruct, char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id to be assign.
atimezone – time zone number to retrieve the time zone information from controller

Page 21 of 39
FALCOIP

areplystruct – a time zone info to be read. Please refer to the table TimeZoneStruct above for
further details.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allow to retrieve the time zone information from the selected controller

int FalcoClearTimeZone (const char *aipaddress, int aport, int adoorid char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id to be assign..
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This command allows you to clear all the time zone information in a controller that you specify.

Sample Code
Option Explicit
Dim cmdobj As New FalcoNetworkLib.FalcoCommandClient

Private Sub SetTimeZone()


Dim msg As String
Dim nResult As Integer
Dim param As FalcoNetworkLib.TimezoneStruct

param.TimeZoneNo = 1
param.MonTimeSet = 1
param.TueTimeSet = 1
param.WedTimeSet = 1
param.ThuTimeSet = 1
param.FriTimeSet = 1
param.SatTimeSet = 0
param.SunTimeSet = 0

nResult = CommandObj.FalcoQuickSetTimezone("192.168.0.23", 2003, 0, param, msg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

Private Sub GetTimeZone()


Dim msg As String
Dim nResult As Integer
Dim param As FalcoNetworkLib.TimezoneStruct
Dim strmsg As String

Page 22 of 39
FALCOIP

nResult = CommandObj.FalcoQuickGetTimeZone("192.168.0.23", 2003, 0, 1, param, msg)


If nResult <> 0 Then
MsgBox msg
Else
strmsg = 1
strmsg = strmsg & param.MonTimeSet
strmsg = strmsg & param.TueTimeSet
strmsg = strmsg & param.WedTimeSet
strmsg = strmsg & param.ThuTimeSet
strmsg = strmsg & param.FriTimeSet
strmsg = strmsg & param.SatTimeSet
strmsg = strmsg & param.SunTimeSet
MsgBox strmsg
End If
End Sub

Private Sub ClearTimeZone()


Dim msg As String
Dim nResult As Integer

nResult = CommandObj.FalcoClearTimeZone("192.168.0.23", 2003, 0, msg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

Page 23 of 39
FALCOIP

2.1.7 Date and Time setting


DateTimeStruct Detail
Data Member Description
int Year Year of today

byte Month Month of today

byte Day Day of today

byte Hour Hour of now

byte Minute Minute of now

byte Second Second of now

int FalcoSetDateTime (const char *aipaddress, int aport, int adoorid, int ayear, byte amonth, byte
aday, byte ahour, byte aminute, byte asecond, char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id to be assign.
ayear – a year of date
amonth – a month of date
aday – a day of date
ahour – a hour of the time
aminute – a minute of the time
asecond – a second of the time
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allows you to set the date time for the controller selected, or for all the controllers.

int FalcoGetDateTime (const char *aipaddress, int aport, int adoorid, DateTimeStruct &
areplystruct, char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id to be assign.
areplystruct – a time info to be read. Please refer to the table DateTimeStruct above for further
details.

Page 24 of 39
FALCOIP

aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allows retrieve the date and time for the controller from the selected controller. You
only can get once in a time

Sample Code
Option Explicit
Dim cmdobj As New FalcoNetworkLib.FalcoCommandClient

Private Sub SetDateTime()


Dim msg As String
Dim nResult As Integer

nResult = CommandObj.FalcoSetDateTime ("192.168.0.23", 2003, 0, 2005, 10, 19, 12, 15, 30, msg)
If nResult <> 0 Then
MsgBox msg
End If
End Sub

Private Sub GetDateTime()


Dim msg As String
Dim nResult As Integer
Dim param As FalcoNetworkLib.TimezoneStruct
Dim strmsg As String

nResult = CommandObj.FalcoQuickGetTimeZone("192.168.0.23", 2003, 0, 1, param, msg)


If nResult <> 0 Then
MsgBox msg
Else
strmsg = 1
strmsg = strmsg & param.MonTimeSet
strmsg = strmsg & param.TueTimeSet
strmsg = strmsg & param.WedTimeSet
strmsg = strmsg & param.ThuTimeSet
strmsg = strmsg & param.FriTimeSet
strmsg = strmsg & param.SatTimeSet
strmsg = strmsg & param.SunTimeSet
MsgBox strmsg
End If
End Sub

Private Sub GetDateTime()


Dim msg As String
Dim nResult As Integer
Dim param As FalcoNetworkLib.DateTimeStruct

nResult = CommandObj.FalcoGetDateTime("192.168.0.23", 2003, 0, param, msg)


If nResult <> 0 Then
MsgBox msg
Else
MsgBox DateSerial(param.Year, param.Month, param.Day) + TimeSerial(param.Hour, param.Minute,
param.Sec)
End If
End Sub

Page 25 of 39
FALCOIP

2.1.8 Holiday Setting


HolidayTimesetStruct Detail
Data Member Description
byte HolidayNo The Holiday No

byte HolidayMon Month of the holiday

byte HolidayDay Day of the holiday

byte HolidayTimeSet Time set of the holiday to be assign

int FalcoQuickSetHolidayTimeset (const char *aipaddress, int aport, int adoorid,


HolidayTimesetStruct &aholidaytimeset, char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id to be assign.
aholidaytimeset – a holiday date and time set info to be set. Please refer to the table
HolidayTimeSetStruct above for further details
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allows you set holiday info into the controller selected.

int FalcoQuickGetHolidayTimeSet (const char *aipaddress, int aport, int adoorid, byte
aholidaytimeset, HolidayTimesetStruct &areplystruct, char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id to be assign.
aholidaytimeset – a holiday no to be retrieve from controller
areplystruct – a holiday date and time set info to be read. Please refer to the table
HolidayTimeSetStruct above for further details
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

Page 26 of 39
FALCOIP

This function allows you read the holiday info from the controller selected.

int FalcoClearHolidayTimeSet (const char *aipaddress, int aport, int adoorid, char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id to be assign.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allows you to clear the entire holiday list from the controller selected.

Sample Code
Option Explicit
Dim cmdobj As New FalcoNetworkLib.FalcoCommandClient

Private Sub SetHoliday()


Dim msg As String
Dim nResult As Integer
Dim param As FalcoNetworkLib.HolidayTimesetStruct

param.HolidayNo = 1
param.HolidayMon = 1
param.HolidayDay = 1
param.HolidayTimeSet = 0

nResult = CommandObj.FalcoQuickSetHolidayTimeset("192.168.0.23", 2003, 0, param, msg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

Private Sub GetHoliday()


Dim msg As String
Dim nResult As Integer
Dim param As FalcoNetworkLib.HolidayTimesetStruct
Dim strmsg As String

nResult = CommandObj.FalcoQuickGetHolidayTimeSet("192.168.0.23", 2003, 0, 1, param, msg)


If nResult <> 0 Then
MsgBox msg
Else
MsgBox param.HolidayMon & "/" & param.HolidayDay & ": " & param.HolidayTimeSet
End If
End Sub

Private Sub ClearHoliday()


Dim msg As String
Dim nResult As Integer

nResult = CommandObj.FalcoClearHolidayTimeSet("192.168.0.23", 2003, 0, msg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

Page 27 of 39
FALCOIP

2.1.9 Clear and Reset Memory


int FalcoClearAllMemory (const char *aipaddress, int aport, int adoorid, char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id to be assign.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allows you to clear all the memory in the controller selected.

int FalcoResetAllCardLockOut (const char *aipaddress, int aport, int adoorid, char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id that you would like to request to reset all the cards been lock out
from that controller
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allows you to reset all the cards that already been lock out by the door controller, which
you selected.

int FalcoQuickResetCardLockOut (const char *aipaddress, int aport, int adoorid, int acardno, char
*aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id that you would like to request to reset all the card been lock out
from that controller
acardno – a card number to be reset for the card lock out from the controller
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:

Page 28 of 39
FALCOIP

0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allows you to reset a special card that already been lock out by the door controller,
which you selected.

int FalcoResetAllCardAntipass (const char *aipaddress, int aport, int adoorid, char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id that you would like to request for card info
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allows you to reset all the cards antipassback to a controller which you selected.

Sample Code
Option Explicit
Dim cmdobj As New FalcoNetworkLib.FalcoCommandClient

Private Sub ClearMemory()


Dim msg As String
Dim nResult As Integer

nResult = CommandObj.FalcoClearAllMemory("192.168.0.23", 2003, 0, msg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

Private Sub ClearAllCardLockout()


Dim msg As String
Dim nResult As Integer

nResult = CommandObj.FalcoResetAllCardLockOut("192.168.0.23", 2003, 0, msg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

Private Sub ClearAntipassback()


Dim msg As String
Dim nResult As Integer

nResult = CommandObj.FalcoResetAllCardAntipass("192.168.0.23", 2003, 0, msg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

Private Sub ClearOneCardLockout()


Dim msg As String
Dim nResult As Integer

nResult = CommandObj.FalcoQuickResetCardLockOut("192.168.0.23", 2003, 0, 1, msg)


If nResult <> 0 Then
MsgBox msg

Page 29 of 39
FALCOIP

End If
End Sub

Page 30 of 39
FALCOIP

2.1.10 Get Firmware Information


int FalcoGetFirmwareVersion (const char *aipaddress, int aport, int adoorid, char areplystruct,
char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id to be assign.
areplystruct – a reply message of the firmware version from controller
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allows you retrieve the firmware version from the controller selected.

Sample Code
Option Explicit
Dim cmdobj As New FalcoNetworkLib.FalcoCommandClient

Private Sub GetFirmware()


Dim msg As String
Dim nResult As Integer
Dim version As String

nResult = CommandObj.FalcoGetFirmwareVersion("192.168.0.23", 2003, 0, version, msg)


If nResult <> 0 Then
MsgBox msg
Else
MsgBox version
End If
End Sub

Page 31 of 39
FALCOIP

2.1.11 Pulse Door Open


int FalcoPulseDoorOpen (const char *aipaddress, int aport, int adoorid, char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id to be assign.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allows you to pulse door open from the PC to the controller selected.

int FalcoSetSecurityMode (const char *aipaddress, int aport, int adoorid, byte asecuritymode , char
*aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id to be assign.
asecuritymode – a value of the mode for security on or off (0 = off; 1 = on).
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allows you to pulse door open from the PC to the controller selected.

Sample Code
Option Explicit
Dim cmdobj As New FalcoNetworkLib.FalcoCommandClient

Private Sub PulseDoorOpen()


Dim msg As String
Dim nResult As Integer

nResult = CommandObj.FalcoPulseDoorOpen("192.168.0.23", 2003, 0, msg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

Private Sub SecurityMode(Mode as Integer)


Dim msg As String
Dim nResult As Integer

Page 32 of 39
FALCOIP

nResult = CommandObj.FalcoSetSecurityMode("192.168.0.23", 2003, 0, Mode, msg)


If nResult <> 0 Then
MsgBox msg
End If
End Sub

2.1.12 LCD Message


int FalcoSetLCDMessage (const char *aipaddress, int aport, int adoorid, char afirstline, char
asecondline, char athirdline, char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id to be assign.
afirstline – first line of message.
asecondline – second line of message
athirdline – third line of message
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allows you to send 3 line of message to controller, and the message will show in the
LCD.

int FalcoClearLCDMessage (const char *aipaddress, int aport, int adoorid, char *aerrormsg);
Parameters:
aipaddress – the IP address of the controller to send this command to. If Server is at a different
subnet or you wish to broadcast this message to multiple controllers, you can use the broadcast
addresses (ie global broadcast 255.255.255.255 or subnet broadcast XXX.XXX.XXX.255)
aport – always should be 2003
adoorid – a controller door id to be assign.
aerrormsg – a buffer to store the error message if the library encountered any errors sending the
command

Return Value:
0 if successful
If failed, please refer to the aerrormsg to obtain the error message.

This function allows you to clear all the LCD message for the controller selected.

Page 33 of 39
FALCOIP

2.2 Falco Transactions Server

bool Active;

Starts or stops the Transaction Server.

int IdleTimeout;

Sets the idle timeout in milliseconds before assuming the controller has disconnected.

void SetParameters(int aport);

Sets the port number for the Transaction Server to listen to for connections from the controllers.

bool IsControllerConnected(const char *aip);

Returns whether any controller with the specified IP address is connected. This will take into account
the controller connection idle time.

bool AddController (const char *aip, char *aerrormsg);

Add new controller into buffer, so that the dll will only receive all the transaction from the controller
you assign.
p/s:
Firmware Version: T2.20.221SAEI and above please use mac address to replace aip.
Firmware Version: T1.20.021SAEI and above please use ip address as aip.

bool RemoveController (const char *aip, char *aerrormsg);


Remove old controller from buffer, so that the dll will not receive any transaction from that controller
anymore.
p/s:
Firmware Version: T2.20.221SAEI and above please use mac address to replace aip.
Firmware Version: T1.20.021SAEI and above please use ip address as aip.

Sample Code
O ption Explicit
Dim TransServerObj As FalcoNetworkLib.FalcoTransactionsServer

Private Sub btnStart_Click()


TransServerObj.Active = True
End Sub

Private Sub btnStop_Click()


TransServerObj.Active = False
End Sub

Private Sub Form_Load()


Set TransServerObj = New FalcoNetworkLib.FalcoTransactionsServer
End Sub

Private Sub Form_Unload(Cancel As Integer)


TransServerObj.Active = False
Set TransServerObj = Nothing

Page 34 of 39
FALCOIP

End Sub

Page 35 of 39
FALCOIP

2.3 Falco Transactions Client

bool Active;

Starts or stops the Transaction Server.

int IdleTimeout;

Sets the idle timeout in milliseconds before assuming the controller has disconnected.

bool IsControllerConnected(const char *aip);

Returns whether any controller with the specified IP address is connected. This will take into account
the controller connection idle time.

int GetTransaction(int &auid, char * asrcip, int &aid, int &ayear, int &amonth, int &aday, int
&ahour, int &amin, int &asec, int &aeventid, int & acode);

Retrieves the transaction record that is currently at the top of the transaction queue.
Returns -1 if there are no transactions available.

Data Member Description


int auid Reserved

char *asrcip The origination controller IP address

int aid Controller door id number

int ayear, amonth, aday, The date and time the transaction event
ahour, amin, asec took place

int aeventid If transaction is card-related events, this


contain the transaction card number.

For other events, this is 0.

int acode The transaction event code. Valid value


ranges from 0 to 255.

bool TransactionAvailable();

Returns True if there are transactions available or False otherwise.

void OnTransactionAvailable(bool &Acknowledged);

COM Event that is triggered whenever new transaction is available. Setting Acknowledged to True
will cause the current transaction pointer to be moved. If set to False, the current transaction pointer
will still be maintained.

Page 36 of 39
FALCOIP

Sample Code
Note: In Visual Basic, create a Form, and drop in a Timer object named PollTimer. Set the Enabled to
False, and Interval to 1.
Option Explicit
Dim WithEvents transobj As FalcoNetworkLib.FalcoTransactionsClient

Private Sub Form_Initialize()


Set transobj = New FalcoNetworkLib.FalcoTransactionsClient
End Sub

Private Sub Form_Terminate()


Set transobj = Nothing
End Sub

Private Sub PollTimer_Timer()


Dim idx As Long
Dim auid As Long
Dim asrcip As String
Dim aid As Integer
Dim ayear As Integer
Dim amonth As Integer
Dim aday As Integer
Dim ahour As Integer
Dim aminute As Integer
Dim asecond As Integer
Dim aeventid As Long
Dim acode As Integer
Dim s As String

PollTimer.Enabled = False
Do
idx = transobj.GetTransaction(auid, asrcip, aid, ayear, amonth, aday, ahour, _
aminute, asecond, aeventid, acode)

If idx <> -1 Then


SaveTrans auid, asrcip, aid, ayear, amonth, aday, ahour, aminute, asecond, _
aeventid, acode

If idx Mod 100 Then DoEvents


End If
Loop Until idx = -1
End Sub

Private Sub SaveTrans(auid As Long, asrcip As String, aid As Integer, _


ayear As Integer, amonth As Integer, aday As Integer, _
ahour As Integer, aminute As Integer, asecond As Integer, _
aeventid As Long, acode As Integer)

Dim s As String
s = "->" & asrcip & "," & auid & "," & aid & "," & ayear & "," & amonth & "," & _
aday & "," & ahour & "," & aminute & "," & asecond & "," & aeventid & "," & acode
List1.AddItem s
End Sub

Private Sub transobj_OnTransactionAvailable(aacknowledged As Boolean)


PollTimer.Enabled = True
aacknowledged = True
End Sub

Page 37 of 39
FALCOIP

Transaction Code
Transaction Code Descirption
0x30 Valid Card Entry
0x69 Valid Card Exit
0x31 ANTIPBVIOLATION
0x32 Unknow Card No
0x4A Wrong Time Zone
0x6E Valid Pin Entry
0x75 Valid Pin Exit
0x7A Invalid Pin Entry
0x6D Invalid Pin Exit
0x79 Auto Pin Disable
0x71 Wrong Pin No

0x29 Invalid Dual Card Entry


0x5F Invalid Dual Card Exit
0x2B Valid Dual Card Entry
0x2D Valid Dual Card Exit
0x3D Dual Card Timeout
0x08 Dual Card Timeout Normal
0x0A Dual Card Timeout Pin
0x7E No Report Exit
0x3C No Report Entry
0x5B In Reader Error
0x5D Out Reader Error

0x35 Batery OK
0x36 Low Batery High Priority transaction
0x38 Batery Cut Off Mode Enable High Priority transaction
0x39 Batery Cut Off Mode Disable
0x72 Reader Tampered High Priority transaction
0x73 AC Power Main Fail High Priority transaction
0x74 AC Power Normal

0x6A Cool Start


0x37 Controller Reset High Priority transaction
0x41 Memory Clear

0x64 Pulse Door Open


0x65 Door Open
0x45 Door Left Open High Priority transaction
0x46 Door Closed
0x47 Door Force Open High Priority transaction
0x70 Pulse Open Exit Barrier
0x24 Pulse Open Entry Barrier

0x48 Card Locked Out


0x49 Reset Card Locked Out

Page 38 of 39
FALCOIP

0x6B Door Security On


0x6C Door Security Off

0x5E Output Port Activate/On


0x56 Output Port Disactivate/Off

0x42 System Arm


0x43 System Disarm
0x25 Alarm Zone Activate/Trigger
0x4F Alarm Zone Normal
0x40 Alarm Mode Enable
0x23 Alarm Mode Disable

Page 39 of 39

You might also like