OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. ·...

573
Copyright 2012 Lenel Systems International, Inc. 6 August 2012 1 Table of Contents OpenDevice - Interfaces Guide

Transcript of OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. ·...

Page 1: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 1 Table of Contents

OpenDevice - Interfaces Guide

Page 2: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 2

Table of Contents .......................................................................................................................... 1 ITranslate Functions ..................................................................................................................... 4 ITranslate Structures.................................................................................................................. 46 ITranslate Error Codes .............................................................................................................. 48 ITranslate2 Functions ................................................................................................................. 49 ITranslate2 Error Codes ............................................................................................................ 59 ITranslate4 Functions ................................................................................................................. 60 ITranslate4 Structures................................................................................................................ 63 IComConfig Functions ............................................................................................................... 65 IComConfig Error Codes ........................................................................................................... 84 IComConfig2 ............................................................................................................................... 85 IDistributeEvent Functions ...................................................................................................... 102 IDistributeEvent Structures ..................................................................................................... 134 IDistributeEvent Error Codes ................................................................................................. 148 IDistributeEvent2 Functions .................................................................................................... 149 IDistributeEvent2 Structures ................................................................................................... 160 IDistributeEvent2 Error Codes ............................................................................................... 165 IOutput Functions ..................................................................................................................... 166 IOutput Structures.................................................................................................................... 172 IOutput Error Codes ................................................................................................................ 174 IInput Functions........................................................................................................................ 175 IInput Structures ...................................................................................................................... 184 IInput Error Codes ................................................................................................................... 187 IInput2 Functions...................................................................................................................... 188 IInput2 Structures .................................................................................................................... 194 IInput2 Error Codes ................................................................................................................. 196 IAccessControl Functions ........................................................................................................ 197 IAccessControl Structures ....................................................................................................... 246 IAccessControl Defines ............................................................................................................. 277 IAccessControl Error Codes .................................................................................................... 282 IAccessControl2 Functions ...................................................................................................... 283 IAccessControl2 Structures ..................................................................................................... 311 IAccessControl2 Error Codes .................................................................................................. 334 IAccessControl3 Functions ...................................................................................................... 335 IAccessControl3 Structures ..................................................................................................... 361 IAsset Functions ........................................................................................................................ 381 IAsset Structures ....................................................................................................................... 385 IAsset Defines ............................................................................................................................ 386 IAsset Error Codes ................................................................................................................... 387 IAssetManagement Functions.................................................................................................. 388 IRs232 Functions ....................................................................................................................... 391 IRs232 Structures...................................................................................................................... 412 IRs232 Error Codes .................................................................................................................. 413 ILan Functions .......................................................................................................................... 414 ILan Error Codes ...................................................................................................................... 422 ITransport Functions................................................................................................................ 423

Page 3: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 3

ITransport Error Codes ........................................................................................................... 428 IComManager Functions ......................................................................................................... 429 IComManager Error Codes ..................................................................................................... 439 IBiometricCfg Functions .......................................................................................................... 440 IBiometricCfg Structures ......................................................................................................... 443 IIntercom Functions ................................................................................................................. 447 IIntercom Error Codes ............................................................................................................. 450 IIntercomStation Functions ..................................................................................................... 451 Intercom Station Capabilities File ........................................................................................... 453 IIntercom Error Codes ............................................................................................................. 455 IPersonalSafety Functions ....................................................................................................... 456 IPersonalSafety Structures ...................................................................................................... 460 IPersonalSafety Defines ............................................................................................................ 461 IPersonalSafety Error Codes ................................................................................................... 462 IIntrusion Functions ................................................................................................................. 463 IIntrusion Enums ...................................................................................................................... 479 IIntrusion Defines ..................................................................................................................... 480 Intrusion Area Capabilities File .............................................................................................. 483 IElevatorDispatching Functions .............................................................................................. 485 IElevatorDispatching Structures ............................................................................................. 493 IElevatorDispatching Defines .................................................................................................. 496 IElevatorDispatching2 Functions ............................................................................................ 497 IElevatorDispatching2 Structures ........................................................................................... 503 IElevatorDispatching2 Enums ................................................................................................. 505 IPBX Functions ......................................................................................................................... 506 IVideo Functions ....................................................................................................................... 511 IVideo Structures ...................................................................................................................... 559 IVideo Error Codes................................................................................................................... 563 IVideo Reference ....................................................................................................................... 564 ICustomMenu Functions .......................................................................................................... 565 Index ........................................................................................................................................... 569

Page 4: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 4

ITranslate Functions The ITranslate interface is the main interface used by the Device Translators. All Device Translators must implement this interface.

List of functions

• Lnl_CreateCommunicationObject • Lnl_ConnectCommunicationManager • Lnl_RequireCTManager • Lnl_InitCommunication • Lnl_InitializePanel • Lnl_SetPanelOffline • Lnl_SetPanelID • Lnl_IncrementMonitorReq • Lnl_DecrementMonitorReq • Lnl_PollPanelForEvents • Lnl_UnsolicitedEventRequest • Lnl_GetPanelEventSerialNumber • Lnl_CloseCommunication • Lnl_GetSystemStatus • Lnl_ReadClock • Lnl_SendPanelNextDirectCmd • Lnl_SetClock • Lnl_SetDBEnabledFlag • Lnl_DownloadFirmware • Lnl_IsDownloadFinished • Lnl_SetDownloadInProgressState • Lnl_ConnectToPanel • Lnl_IssueColdStartCmd • Lnl_ResetPowerUpFlag • Lnl_SetCommunicationType • Lnl_GetCommunicationType • Lnl_SetDST • Lnl_GetDST • Lnl_SetPanelState • Lnl_GetPanelState • Lnl_SetDirectCmd • Lnl_SetPanelType • Lnl_GetPanelType • Lnl_SetPanelTZInfo • Lnl_GetPanelTZInfo • Lnl_SetPanelName • Lnl_IsPanelOnline

Page 5: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 5

• Lnl_GetVersionInfo • Lnl_SetPanelPassword

ITranslate Revision History Date Author Notes 03/27/2003 M. Serafin • Added the revision history.

Page 6: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 6

Lnl_CreateCommunicationObject Purpose: The Device Translators that do not require a Communication Transporter Manager use this method to create an instance of a communication object. This is called shortly after the Device Translator is created and before a call is made to initialize communications. Currently a few of the Device Translators communicate to the hardware using a Communication Transporter. This is a COM object, which is used to handle the communications. An example of a Communication Transporter is one that was created to handle communication over serial ports. The Device Translators are not required to use a separate communication object, nor do they have to use one that is a COM object.

Syntax: HRESULT Lnl_CreateCommunicationObject ();

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 7: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 7

Lnl_ConnectCommunicationManager Purpose: Some communication methods can share the same communication port / device between various hardware devices. Examples could include placing multiple devices on the same serial port or sharing a single modem between devices. In these cases, a way to manage who is using the communication port at a given time is required. This is handled by using a Communication Manager object. The purpose of this method is to connect the Device Translator to this object. Currently only two different types of devices can use a Communication Manager and the current Communication Managers may not be generic enough to be used by future devices.

Syntax: HRESULT Lnl_ConnectCommunicationManager ( REFIID iid, IUnknown *pIUnknown );

Input Parameters:

Parameter Description iid The interface ID of the interface to the

Communication Manager. pIUnknown A IUnknown pointer to the Communication

Manager.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 8: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 8

Lnl_InitCommunication Purpose: Performs any needed communication initialization. An example of what may be done inside of this function is opening a serial port and setting the port settings.

Syntax: HRESULT Lnl_InitCommunication ();

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 9: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 9

Lnl_InitializePanel Purpose: Performs any initialization for the panel or device to see if it is online. This method is called inside a loop in the Lenel Communication Server. Each time this function is executed a check should be made to see if the panel is still online (communicating). If the panel is online, then nothing needs to be done and S_OK can be returned. Otherwise, the initialization steps need to be performed. The initialization steps vary from hardware to hardware. Some require a special command to be sent to the hardware and if the proper response is received, the hardware is considered to be online.

Syntax: HRESULT Lnl_InitializePanel ();

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 10: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 10

Lnl_SetPanelID Purpose: Sets the Panel ID variable in the Device Translator. This is the unique number that is assigned to each parent device (panel) in the database. It is assigned to events that are passed back to the Lenel Communication Server as a way of distinguishing which parent device the event was generated from. It may also be used for other purposes.

Syntax: HRESULT Lnl_SetPanelID ( int panel_id );

Input Parameters:

Parameter Description panel_id Value the panel ID will be set to

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 11: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 11

Lnl_GetPanelID Purpose: Returns the panel ID from the Device Translator. This is the value that was set with the SetPanelID method.

Syntax: HRESULT Lnl_GetPanelID ( int *panel_id );

Output Parameters:

Parameter Description panel_id Panel ID

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 12: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 12

Lnl_IncrementMonitorReq Purpose: Increments the count of the number of monitors (clients) which are requesting events from this panel / device. Each client application that is interested in a particular panel registers with it to inform the panel that somebody is listening. They also unregister with the panel using the Lnl_DecrementMonitorReq method. The reason this is done is so that panels that can store events in the panel will do so until there is at least one client listening for these events.

Syntax: HRESULT Lnl_IncrementMonitorReq ();

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 13: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 13

Lnl_DecrementMonitorReq Purpose: Decrements the count of the number of monitors (clients) which are requesting events from this panel / device. This count is incremented with the Lnl_IncrementMonitorReq.

Syntax: HRESULT Lnl_DecrementMonitorReq ();

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 14: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 14

Lnl_PollPanelForEvents Purpose: Sends the command to the Device Translator to poll the panel / device for events. If there is a problem communicating to the panel (the panel / device is probably offline) this method should return a status indicating that a problem occurred (E_FAIL) so that it can perform the necessary steps to set this panel / device as being offline. When this method fails, the Lenel Communication Server will call the SetPanelOffline method to perform the steps necessary to mark the panel as being offline. If the communications to the hardware is working, this method needs to perform the steps to actually retrieve an event (or events) from the panel and pass them to the Lenel Communication Server. Events can be passed to the Lenel Communication Server via the Lnl_DistributeLnlMessage method in the IDistributeEvent interface. If this method succeeds, the Lenel Communication Server will then make a call to the SendPanelNextDirectCmd method so that any pending commands can be sent to the hardware.

Syntax: HRESULT Lnl_PollPanelForEvents ();

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 15: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 15

Lnl_UnsolicitedEventRequest Purpose: Send a request to the Device Translator for events (start polling) or to stop receiving events (stop polling). This method is called via the Lenel Communication Server when it is appropriate to start or stop polling.

Syntax: HRESULT Lnl_UnsolicitedEventRequest ( long ll_EventNumber, BOOL vb_WaitForEvent );

Input Parameters:

Parameter Description ll_EventNumber Event number to start polling from. If this

is set to –1, this is a request to stop monitoring. Currently 0 is being passed in to indicate to start polling from the first event.

vb_WaitForEvent Flag that specifies whether to wait for a response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 16: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 16

Lnl_SetEventCounter Purpose: Sets the event counter variable in the Device Translator. The event counter is a unique ID that is used when saving the events to the database. The event counter is assigned to each event in the LNLMESSAGE structure that is passed back to the Lenel Communication Server. Whenever an instance of a Device Translator is created the Lenel Communication Server determines the next event serial number that will be required, and that value is sent to the Device Translator.

Syntax: HRESULT Lnl_SetEventCounter ( long vl_Counter );

Input Parameters:

Parameter Description vl_Counter Event serial number to set the Device

Translator to use.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 17: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 17

Lnl_GetPanelEventSerialNumber Purpose: Returns the next event serial number to be used and increments the event serial number account. This value is assigned to each event that is passed back to the Lenel Communication Server using the LNLMESSAGE structure. The reason for this number is so that it can be logged to the database with a unique ID. This unique ID is for each different panel ID. Each time this method is called the event serial number must be incremented so that the next time it is called a new value is returned.

Syntax: HRESULT Lnl_GetPanelEventSerialNumber( long *num );

Output Parameters:

Parameter Description num Next event serial number to use.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 18: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 18

Lnl_CloseCommunication Purpose: Performs any needed tasks to close the communication port when the Device Translator is finished with communication. This method is called by the Lenel Communication Server when a Device Translator is removed (the panel has been marked offline or deleted from the system or the Lenel Communication Server is exiting).

Syntax: HRESULT Lnl_CloseCommunication ();

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 19: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 19

Lnl_GetSystemStatus Purpose: Requests the system status from the Device Translator. The status can be returned synchronously by filling in the structure or asynchronously by sending back status events. Please refer to the Lnl_DistributeLnlMessage method in the IDistributeEvent interface for returning status messages asynchronously.

Syntax: HRESULT Lnl_GetSystemStatus ( SYSTEM_STATUS *p_Status );

Output Parameters:

Parameter Description p_Status Structure containing the system status

information.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 20: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 20

Lnl_ReadClock Purpose: Requests the time from devices that keep track of time themselves. This method is only in place as a debugging tool from the Lenel Communication Server for determining the time set in the Device Translator or hardware. This method is not used for anything else and doesn’t need to be implemented.

Syntax: HRESULT Lnl_ReadClock ( struct tm *prl_Time );

Output Parameters:

Parameter Description prl_Time The structure that the time is returned in.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 21: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 21

Lnl_SendPanelNextDirectCmd Purpose: Method that indicates to the Device Translator that it can process the next command that is waiting. This can be implemented in the Device Translator in a number of ways. One way the Device Translator can implement this is that commands to the hardware can be placed in a pipe or queue and when this method is executed, one or all the commands that are waiting can be executed. Another way commands to the hardware can be implemented is that the commands can wait on an event and this method triggers the event which allows the command to execute. The reason that the commands must wait until this method is called is so that there is not a collision in writing and reading to the communication port. The Lenel Communication Server loops through a set of methods in a communication thread (Lnl_PollPanelForEvents, Lnl_SendPanelNextDirectCmd, etc.) and other commands and configuration changes can be issued from a different thread within the Lenel Communication Server. To manage the reading and writing from these different threads to the communication port, we only allow access to the communication port via the communication thread mainly via calls to Lnl_InitializePanel, Lnl_PollPanelForEvents, and Lnl_SendPanelNextDirectCmd.

Syntax: HRESULT Lnl_SendPanelNextDirectCmd ( );

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 22: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 22

Lnl_SetClock Purpose: Sets the clock for devices that maintain their own clock. The time value that is passed in is in coordinated universal time based on the system clock of the Lenel Communication Server. The Device Translator can choose to ignore the time being passed in this method and grab the current UTC time itself to avoid any delays.

Syntax: HRESULT Lnl_SetClock ( long vl_Time, BOOL vb_WaitForRsp );

Input Parameters:

Parameter Description vl_Time Time to set the clock to. This value is the

coordinated universal time of the system clock on the machine running the Lenel Communication Server. The Device Translator can choose to ignore this time and grab the current time to use instead to avoid any delays.

vb_WaitForRsp Flag that indicates whether to wait for a response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 23: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 23

Lnl_SetDBEnabledFlag Purpose: Sets a flag inside of the Device Translator that indicates whether the Lenel Communication Server is logging events or not. When the Lenel Communication Server determines that there is a connection to the database, it calls this method to inform the Device Translator that it has a DB connection. This allows events to be sent and saved to the database. If the connection to the database goes down, the Lenel Communication Server will call this method to indicate to the Device Translator that the database connection no longer exists and that events probably should stop being sent to the Lenel Communication Server.

Syntax: HRESULT Lnl_SetDBEnabledFlag ( BOOL vb_IsDBLoggingEvents );

Input Parameters:

Parameter Description vb_IsDBLoggingEvents Flag indicating if the Lenel

Communication Server is logging events.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 24: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 24

Lnl_RequireCTManager Purpose: Some Device Translators require a Communication Transporter Manager. This method returns whether a Device Translator requires a manager and if it does require one, it returns a number indicating which manager is required. Currently most devices will not require a manager so they can just return 0 to indicate they do not need a manager. If there is a need for a Communication Transporter Manager, one will need to be created in addition to the Device Translator if an existing Manager will not work. Only one Communication Transporter Manager of each type will be loaded at once.

Syntax: HRESULT Lnl_RequireCTManager ( int *ManagerRequired );

Output Parameters:

Parameter Description ManagerRequired Indicates whether a manager is required or

not. If 0 is returned a manager is not required, otherwise the ID is returned which indicates which manager is required. The currently supported managers are: 0 – No Manager 1 – Lenel Manager 2 – Apollo Dialup Manager

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 25: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 25

Lnl_IssueColdStartCmd Purpose: Issues a command to the Device Translator to perform a cold start which causes a database download to the panel / device to occur. This method needs to be overloaded in order to do whatever steps are necessary to kick off a database download if necessary. The StartDatabaseThread() method of the CDeviceTranslator base class can be called to kick off a database download if needed.

Syntax: HRESULT Lnl_IssueColdStartCmd ();

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 26: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 26

Lnl_ResetPowerUpFlag Purpose: A command that is used after performing a database download to have the panel reset. To have this command executed, the Device Translator needs to specify to perform this operation when doing a database download (DATABASE_DOWNLOAD_RESET).

Syntax: HRESULT Lnl_ResetPowerUpFlag ();

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 27: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 27

Lnl_DownloadFirmware Purpose: Method that commands the Device Translator to download firmware to the panel device. If an external file is to be used for downloading firmware, the Device Translator needs to know how to do this.

Syntax: HRESULT Lnl_DownloadFirmware ();

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 28: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 28

Lnl_ConnectToPanel Purpose: Attempt to manually connect to a panel. Used in situations where there is not a constant connection to the panel. An example of when this might be used is with dialup communication where the panel or device is in the offline mode most of the time, but there may be cases where a connection may need to be manually connected.

Syntax: HRESULT Lnl_ConnectToPanel ( long vb_Connect, BOOL vb_GenerateEvent );

Input Parameters:

Parameter Description vb_Connect Value indicating to how to connect:

0 – Disconnect from Primary Port, 1 – Connect via Primary Port, 2 – Connect via Secondary Port, 3 – Disconnect from the Secondary Port, 4 – Connect to both ports, 5 – Disconnect from both ports.

vb_GenerateEvent Flag to specify if an event is to be generated. An example of when this might be used is to generate an event when the connection has been disconnected.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 29: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 29

Lnl_IsDownloadFinished Purpose: Method that checks the Device Translator to see if it is finished downloading the database to the device.

Syntax: HRESULT Lnl_IsDownloadFinished ();

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 30: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 30

Lnl_SetCommunicationType Purpose: Set a flag that indicates the type of communication being used. Possible communication types are listed in the table below:

Value Communication Type 0 Direct Connection 1 LAN Connection 2 Dialup Connection

Syntax: HRESULT Lnl_SetCommunicationType ( int vi_Value );

Input Parameters:

Parameter Description vi_Value Value to set the Communication Type flag.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 31: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 31

Lnl_GetCommunicationType Purpose: Returns the flag that indicates the type of communication that is being used.

Syntax: HRESULT Lnl_GetCommunicationType ( int *Value );

Output Parameters:

Parameter Description Value Value that the communication type flag is

set to (See Lnl_SetCommunicationType for valid communication types).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 32: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 32

Lnl_SetPanelTZInfo Purpose: Set the timezone information that the panel / device is located in. The TZI structure that is passed in contains the timezone rule that is used to determine the Daylight Savings settings. The CLnlDateTime::TimeZoneRuleToDate function located in the Util32 library that is distributed to Device Translator developers can be used to determine the Daylight Savings dates for a give year.

Syntax: HRESULT Lnl_SetPanelTZInfo ( TZI *Value );

Input Parameters:

Parameter Description Value World Timezone structure (contains the

rule for determining the timezone information).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 33: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 33

Lnl_SetDST Purpose: Sets the Daylight Savings Time flag. This indicates that the Device Translator is to use Daylight Savings.

Syntax: HRESULT Lnl_SetDST ( BOOL vi_Value );

Input Parameters:

Parameter Description vi_Value DST flag.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 34: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 34

Lnl_GetDST Purpose: Returns the Daylight Savings Time flag (which was set using Lnl_SetDst).

Syntax: HRESULT Lnl_GetDST ( BOOL *Value );

Output Parameters:

Parameter Description Value DST flag.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 35: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 35

Lnl_SetDownloadInProgressState Purpose: Sets a flag in the Device Translator that indicates the state of a panel download. A value of TRUE indicates that there is a download in progress. This method is called from the Lenel Communication Server when a database download is started to the panel.

Syntax: HRESULT Lnl_SetDownloadInProgressState ( BOOL State );

Input Parameters:

Parameter Description State Flag indicating the state of a panel

download (FALSE – Download not in progress, TRUE – Download in progress).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 36: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 36

Lnl_SetPanelState Purpose: Sets the panel state variable in the Device Translator that indicates the state of the device (PANEL_STATE_OFFLINE = 0, PANEL_STATE_READY = 1).

Syntax: HRESULT Lnl_SetPanelState ( int vi_Value );

Input Parameters:

Parameter Description vi_Value State of the device

(PANEL_STATE_OFFLINE, PANEL_STATE_ONLINE).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 37: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 37

Lnl_GetPanelState Purpose: Returns the value of the panel state variable from the Device Translator (PANEL_STATE_OFFLINE = 0, PANEL_STATE_READY = 1).

Syntax: HRESULT Lnl_GetPanelState ( int *Value );

Output Parameters:

Parameter Description Value State of the panel

(PANEL_STATE_OFFLINE, PANEL_STATE_READY).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 38: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 38

Lnl_SetDirectCmd Purpose: This method was used to send failed commands from the Lenel Communication Server to the Device Translator. Currently this function is only used by Lenel Access Control Panels.

Syntax: HRESULT Lnl_SetDirectCmd ( BYTE *pro_Data );

Input Parameters:

Parameter Description pro_Data Raw Command to send.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 39: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 39

Lnl_SetPanelType Purpose: This method sets the type of panel.

Syntax: HRESULT Lnl_SetPanelType ( int Value );

Input Parameters:

Parameter Description Value The type of panel to set. This function is

very useful when one Device Translator is used for multiple panel types. The panel type is one that Lenel will provide for every new type of panel, this is the panel type that is stored in the database and allows the Lenel Communication Server to start the correct Device Translator.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 40: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 40

Lnl_GetPanelType Purpose: This method returns the type of panel.

Syntax: HRESULT Lnl_GetPanelType ( int *Value );

Output Parameters:

Parameter Description Value Returns the type of panel.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 41: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 41

Lnl_SetPanelName Purpose: This method sets the name of the panel. The name of the panel that was assigned via the user interface can be sent down to the Device Translator. The Device Translator is free to do what it would like with this name.

Syntax: HRESULT Lnl_SetPanelName ( BSTR panelName );

Input Parameters:

Parameter Description panelName The name used to identify the panel.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 42: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 42

Lnl_SetPanelOffline Purpose: Used to set the panel offline if the PollPanelForEvents method fails. Things that are typically done by this method are setting the panel state flag, setting the sending events flag to false, generating an offline event to be sent to the clients indicating a loss of communications, and setting the line error flag to true. All of these steps are done in the base Device Translator template’s version of this method.

Syntax: HRESULT Lnl_SetPanelOffline ( );

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 43: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 43

Lnl_IsPanelOnline Purpose: Method that is used to determine if the panel is currently online. Currently this method is only called from within the CCTV Player object.

Syntax: HRESULT Lnl_IsPanelOnline ( BOOL *Value );

Output Parameters:

Parameter Description Value Whether the panel is online or not

(FALSE-Panel Offline, TRUE-Panel Online).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 44: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 44

Lnl_GetVersionInfo Purpose: This method is used to return the version info of the hardware (firmware version). Currently this method is not implemented. The firmware version can be returned by sending a firmware version status event from the Device Translator, which is usually done inside the Lnl_GetSystemStatus method.

Syntax: HRESULT Lnl_GetVersionInfo ( long* major, long* minor, long* build );

Output Parameters:

Parameter Description major Major part of the version info. minor Minor part of the version info. build Build part of the version info.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 45: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 45

Lnl_SetPanelPassword Purpose: This method is used to set the panel password in the Device Translator.

Syntax: HRESULT Lnl_ SetPanelPassword ( BSTR password, );

Output Parameters:

Parameter Description password The password.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 46: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 46

ITranslate Structures SYSTEM_STATUS

Type Parameter Description long si_PanelID Panel ID of the hardware

whose status is being returned. BYTE sb_AsyncStatus When this value is set to

TRUE the status will be returned asynchronously. If this value is set to FALSE the status will be returned synchronously by filling in the status of the hardware in this structure.

BYTE sb_DownloadingFirmware Indicates if a download to the panel is in progress.

BYTE [81] sb_Devices Online status of the device. (Entry 0 in the array is for the panel, 1-64 are for readers, and 65-81 are for alarm panel status.)

BYTE [81] sb_DeviceCabinetTamper Cabinet Tamper status of the device. (Entry 0 in the array is for the panel, 1-64 are for readers, and 65-81 are for alarm panel status.)

BYTE [81] sb_DevicePowerFail Power Fail status of the device. (Entry 0 in the array is for the panel, 1-64 are for readers, and 65-81 are for alarm panel status.)

TZI Type Parameter Description long Bias The difference in minutes

between UTC (a.k.a. GMT) time and local time. It satisfies the formula UTC time = local time + Bias

long StandardBias A number to add to Bias to form the true bias during standard time.

Page 47: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 47

long DaylightBias A number to add to Bias to form the true bias during daylight savings time.

SYSTEMTIME StandardDate The relative date for when daylight savings time ends.

SYSTEMTIME DaylightDate The relative date for when daylight savings time begins.

long UTCoffset The UTC offset. This is calculated and sent down as part of the rules.

BYTE DST Whether the particular timezone supports Daylight Savings Time.

Page 48: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 48

ITranslate Error Codes Name Value Description

Page 49: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 49

ITranslate2 Functions The ITranslate2 interface is an extension to the ITranslate interface.

List of functions

• Lnl_IsFirmwareDownloadFinished • Lnl_ValidateDeviceSerialNumbers • Lnl_SetFunctionLevel • Lnl_SetEventIndex • Lnl_SetRecordedFlashSize • Lnl_SetRecordedDipSwitchSettings • Lnl_SetRecordedFirmwareRev • Lnl_SetDownloadPlainFirmware • Lnl_SetOEMCodeSettings

Page 50: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 50

Lnl_IsFirmwareDownloadFinished Purpose: The method checks if the firmware download has finished.

Syntax: HRESULT Lnl_IsFirmwareDownloadFinished ( BOOL *Value );

Output Parameters:

Parameter Description Value Indicates whether the firmware download

has finished

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 51: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 51

Lnl_ValidateDeviceSerialNumbers Purpose: Method that sets a flag indicating whether or not serial numbers are to be validated. Certain devices have serial numbers that can be examined and these serial numbers may be examined to see if they fall in the expected range.

Syntax: HRESULT Lnl_ValidateDeviceSerialNumbers ( BOOL Value );

Input Parameters:

Parameter Description Value Flag indicating whether or not the serial

numbers of devices are to be enforced (TRUE indicates that the serial numbers are to be validated).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 52: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 52

Lnl_SetFunctionLevel Purpose: Sets the function level to use, this impacts that amount of available memory to allocate.

Syntax: HRESULT Lnl_SetFunctionLevel ( long vl_FunctionLevel );

Input Parameters:

Parameter Description vl_FunctionLevel The function level to use.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 53: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 53

Lnl_SetEventIndex Purpose: The method is used to help in event synchronization between OnGuard to the panel. The systems can become not synchronized when the communication server is done and the panel keeps generating events. The method is called during the translator initialization. It set the last event index, which was received from the panel. The event index is updated using the Lnl_UpdatePanelEventIndex() method (IDistributeEvent interface) from the translator. The Lnl_UpdatePanelEventIndex method is called every time and event or events are sent to OnGuard. Once receiving the event index, the translator should send all events that were sent after the event with the index value.

Syntax: HRESULT Lnl_SetEventIndex ( long vl_EventIndex );

Input Parameters:

Parameter Description vl_EventIndex The last event index to use, which was

received from the panel.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 54: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 54

Lnl_SetRecordedFlashSize Purpose: The method set the flash chip size as it was reported by the panel.

Syntax: HRESULT Lnl_SetRecordedFlashSize( long vl_FlashSize );

Input Parameters:

Parameter Description vl_FlashSize The flash chip size of the controller Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 55: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 55

Lnl_SetRecordedDipSwitchSettings Purpose: The method set the dip switch settings as it was reported by the panel.

Syntax: HRESULT Lnl_SetRecordedDipSwitchSettings( long vl_DipSwitchSettings );

Input Parameters:

Parameter Description

vl_DipSwitchSettings

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 56: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 56

Lnl_SetRecordedFirmwareRev

Purpose: The method set the firmware revision of the panel as it was reported by the panel.

Syntax: HRESULT Lnl_SetRecordedFirmwareRev( BSTR vl_FirmwareRev );

Input Parameters:

Parameter Description

vl_FirmwareRev

Return Values:

Parameter Description

HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 57: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 57

Lnl_SetDownloadPlainFirmware Purpose:

Syntax: HRESULT Lnl_SetDownloadPlainFirmware( BOOL vb_PlainFirmwareFlag );

Input Parameters:

Parameter Description vb_PlainFirmwareFlag Return Values:

Parameter Description

HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 58: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 58

Lnl_SetOEMCodeSettings Purpose:

Syntax: HRESULT Lnl_SetOEMCodeSettings( short OEMCode, short OEMMask );

Input Parameters:

Parameter Description

OEMCode

OEMMask

Return Values:

Parameter Description

HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 59: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 59

ITranslate2 Error Codes Name Value Description

Page 60: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 60

ITranslate4 Functions The ITranslate4 interface is an extension to the ITranslate interface.

List of functions

• Lnl_GetSystemStatus3 • Lnl_UploadEvents

Page 61: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 61

Lnl_GetsystemStatus3 Purpose: The method gets the status of the panels and devices

Syntax: HRESULT Lnl_GetSystemStatus3( SYSTEM_STATUS3* pStatus );

Parameters:

Parameter Description pStatus [out] Status of the panels and devices

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 62: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 62

Lnl_UploadEvents Purpose: The method requests the device translator to upload events for a specified device or all devices. See 'EDeviceType' enumeration for possible values of 'nDeviceType' parameter.

Syntax:

HRESULT Lnl_UploadEvents( long nDeviceType, long nDeviceId );

Parameters:

Parameter Description nDeviceType Device Type nDeviceId Device Id

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 63: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 63

ITranslate4 Structures

SYSTEM_STATUS3 Type Parameter Description long nPanelId [in] Access Panel ID BYTE bAsyncStatus [out] BOOL - TRUE ==

ASYNC, FALSE == SYNC BYTE bDownloadingFirmware [out] Indicates if the firmware

download is in progress long nEntries [in] Number of entries SYSTEM_STATUS_ENTRY [nEntries]

pEntries [in, out] Entries array. The first entry is always Panel entry if present

SYSTEM_STATUS_ENTRY Type Parameter Description long nDeviceType [in] See EDeviceType for

possible values. long nDeviceId [in] Device ID. It is zero for

Panel entry BYTE nStatus [out] Indicates the device

online and some additional statuses. See SYSTEM_STATUS_ defines for details

__int64 nExtStatus [out] Specific device status bits. See RDRSTATUS_ and STATUS_EXT_ defines for possible values

__int64 nExtMaskedStatus [out] Status bits that are currently masked (disabled) for a device. The values are the same for 'nExtStatus'

long nFirmwareVersion [out] The device firmware version. LOWORD - minor version number, HIWORD - major version number

long nActualSIOType [out] For a Mercury device,

Page 64: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 64

the actual SIO type of the device board in case of mismatch (non-zero)

long nSerialNumber [out] Device serial number. The highest bit (0x80000000) indicates if the S/N is bad (not valid)

BYTE nAlternateReaderStatus [out] Alternate reader status BYTE nDeviceMode [out] Reader mode

Page 65: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 65

IComConfig Functions The IComConfig interface is used for specific communication methods. All Device Translators must implement this interface.

List of functions:

• Lnl_SetComPort • Lnl_GetComPort • Lnl_SetComPort2 • Lnl_GetComPort2 • Lnl_SetBaudRate • Lnl_GetBaudRate • Lnl_SetPanelAddress • Lnl_GetPanelAddress • Lnl_SetPrimaryIP • Lnl_GetPrimaryIP • Lnl_SetSecondaryIP • Lnl_GetSecondaryIP • Lnl_SetByteSize • Lnl_GetByteSize • Lnl_SetParity • Lnl_GetParity • Lnl_SetStopBits • Lnl_GetStopBits

IComConfig Revision History Date Author Notes 03/27/2003 M. Serafin • Added the revision history.

Page 66: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 66

Lnl_SetComPort Purpose: Sets the communication port variable inside the Device Translator. An example of where this variable would be used by the Device Translator is in the case where communication is being performed via RS-232 and the serial port needs to be opened.

Syntax: HRESULT Lnl_SetComPort ( int ComPort );

Input Parameters:

Parameter Description ComPort Communication port number to use.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 67: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 67

Lnl_GetComPort Purpose: Returns the Communication Port variable value the Device Translator is setup to use. This variable was set with the SetComPort() method. This may be a serial port number or another communication port number.

Syntax: HRESULT Lnl_GetComPort ( int *ComPort );

Output Parameters:

Parameter Description ComPort Communication port number that is

returned.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 68: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 68

Lnl_SetComPort2 Purpose: Indicate to the Device Translator what the second communication port to use is.

Syntax: HRESULT Lnl_SetComPort2 ( int vi_Value );

Input Parameters:

Parameter Description vi_Value Value of the second communication port.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 69: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 69

Lnl_GetComPort2 Purpose: Request the second communication port number the Device Translator is configured to use.

Syntax: HRESULT Lnl_GetComPort2 ( int *Value );

Output Parameters:

Parameter Description Value Value of the second communication port.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 70: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 70

Lnl_SetBaudRate Purpose: Sets the Device Translator baud rate variable with the baud rate to use for communication. An example of where this variable may get used by the Device Translator is when communications is being performed via RS-232 and the serial port needs to be opened with a specific baud rate.

Syntax: HRESULT Lnl_SetBaudRate ( int vi_Value );

Input Parameters:

Parameter Description vi_Value Baud rate to use for communication.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 71: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 71

Lnl_GetBaudRate Purpose: Returns the baud rate variable from the Device Translator. This variable was set with the SetBaudRate() method.

Syntax: HRESULT Lnl_GetBaudRate ( int *Value );

Output Parameters:

Parameter Description Value The baud rate the Device Translator is set

to use.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 72: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 72

Lnl_SetPanelAddress Purpose: Set the panel address variable inside the Device Translator. Certain devices or panels will have an address assigned to them. Some panels have dip switches which allow the address to be set. The address is used when communicating to the panel / device to ensure that the communication is actually being directed to that panel or device.

Syntax: HRESULT Lnl_SetPanelAddress ( int vi_Value );

Input Parameters:

Parameter Description vi_Value The panel address.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 73: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 73

Lnl_GetPanelAddress Purpose: Get the panel address variable from the Device Translator. This variable is set with the SetPanelAddress() method.

Syntax: HRESULT Lnl_GetPanelAddress ( int *Value );

Output Parameters:

Parameter Description Value The panel address.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 74: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 74

Lnl_SetPrimaryIP Purpose: Set the Primary IP variable inside of the Device Translator. The IP address is passed in as an integer. Methods in the CIPAddress class (found in the Util32 library) can be used on this value.

Syntax: HRESULT Lnl_SetPrimaryIP ( int vi_Value );

Input Parameters:

Parameter Description vi_Value The Primary IP value.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 75: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 75

Lnl_GetPrimaryIP Purpose: Returns the Primary IP variable from the Device Translator. This variable is set using the SetPrimaryIP() method. The IP address is returned as an integer. Methods in the CIPAddress class (found in the Util32 library) can be used on this value.

Syntax: HRESULT Lnl_GetPrimaryIP ( int *Value );

Output Parameters:

Parameter Description Value The Primary IP value.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 76: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 76

Lnl_SetSecondaryIP Purpose: Set the Secondary IP variable inside of the Device Translator. The IP address is passed in as an integer. Methods in the CIPAddress class (found in the Util32 library) can be used on this value.

Syntax: HRESULT Lnl_SetSecondaryIP ( int vi_Value );

Input Parameters:

Parameter Description vi_Value Secondary IP value.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 77: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 77

Lnl_GetSecondaryIP Purpose: Return the value of the Secondary IP variable from the Device Translator. This variable was set using the SetSecondaryIP() method. The IP address is returned as an integer. Methods in the CIPAddress class (found in the Util32 library) can be used on this value.

Syntax: HRESULT Lnl_GetSecondaryIP ( int *Value );

Output Parameters:

Parameter Description Value Secondary IP value.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 78: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 78

Lnl_SetByteSize Purpose: Sets the Device Translator byte size variable with the byte size to use for communication. An example of where this variable may get used by the Device Translator is when communications is being performed via RS-232 and the serial port needs to be opened with a specific byte size.

Syntax: HRESULT Lnl_SetByteSize ( int vi_Value );

Input Parameters:

Parameter Description vi_Value Byte Size to use for communication.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 79: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 79

Lnl_GetByteSize Purpose: Returns the Byte Size variable from the Device Translator. This variable was set with the Lnl_SetByteSize() method.

Syntax: HRESULT Lnl_GetByteSize ( int *Value );

Output Parameters:

Parameter Description Value The byte size the Device Translator is set to

use.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 80: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 80

Lnl_SetParity Purpose: Sets the Device Translator Parity variable with the parity to use for communication. An example of where this variable may get used by the Device Translator is when communications is being performed via RS-232 and the serial port needs to be opened with a specific parity.

Syntax: HRESULT Lnl_SetParity ( int vi_Value );

Input Parameters:

Parameter Description vi_Value Parity to use for communication.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 81: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 81

Lnl_GetParity Purpose: Returns the Parity variable from the Device Translator. This variable was set with the Lnl_SetParity() method.

Syntax: HRESULT Lnl_GetParity ( int *Value );

Output Parameters:

Parameter Description Value The Parity the Device Translator is set to

use.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 82: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 82

Lnl_SetStopBits Purpose: Sets the Device Translator Stop Bits variable with the stop bits to use for communication. An example of where this variable may get used by the Device Translator is when communications is being performed via RS-232 and the serial port needs to be opened with a specific stop bits.

Syntax: HRESULT Lnl_SetStopBits ( int vi_Value );

Input Parameters:

Parameter Description vi_Value Stop Bits to use for communication.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 83: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 83

Lnl_GetStopBits Purpose: Returns the Stop Bits variable from the Device Translator. This variable was set with the Lnl_SetStopBits() method.

Syntax: HRESULT Lnl_GetStopBits ( int *Value );

Output Parameters:

Parameter Description Value The Stop Bits the Device Translator is set

to use.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 84: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 84

IComConfig Error Codes Name Value Description

Page 85: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 85

IComConfig2 The IComConfig2 interface is used for communication parameters configuration of integrated devices.

List of functions

• Lnl_SetHeartbeatDelay • Lnl_GetHeartbeatDelay • Lnl_SetStartChar • Lnl_GetStartChar • Lnl_SetEndChar • Lnl_GetEndChar • Lnl_SetLanPort • Lnl_GetLanPort • Lnl_SetLanPort2 • Lnl_GetLanPort2 • Lnl_SetHostName • Lnl_GetHostName • Lnl_SetHostName2 • Lnl_GetHostName2 • Lnl_SetBaudRate2 • Lnl_GetBaudRate2

Page 86: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 86

Lnl_SetHeartbeatDelay

Purpose: The method is used for Receiver and Fire panels integration. The method set the delay time between ‘heartbeat’ messages sent from the panel. The ‘heartbeat’ message is used to tell the system (OnGuard) that the panel is still online. If the system does not receive a heartbeat message within the indicated time, then the panel is determined to be offline.

Syntax: HRESULT Lnl_SetHeartbeatDelay( int HeartbeatDelay );

Input Parameters:

Parameter Description HeartbeatDelay

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 87: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 87

Lnl_GetHeartbeatDelay

Purpose: The method is used for Receiver and Fire panels integration. The method returns delay time between ‘heartbeat’ messages sent from the panel. This variable was set with the Lnl_SetHeartbeatDelay method.

Syntax: HRESULT Lnl_GetHeartbeatDelay( int *pHeartbeatDelay );

Output Parameters:

Parameter Description pHeartbeatDelay The delay time between ‘heartbeat’ messages

sent from the receiver panel.

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 88: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 88

Lnl_SetStartChar

Purpose: The method is used for Receiver panel integration. The method set the Start character that marks the beginning of event data.

Syntax: HRESULT Lnl_SetStartChar( int StartChar );

Input Parameters:

Parameter Description StartChar The Start character that marks the beginning of

event data.

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 89: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 89

Lnl_GetStartChar

Purpose: The method is used for Receiver panel integration. The method returns the Start character that marks the beginning of event data. This variable was set with the Lnl_SetStartChar method.

Syntax: HRESULT Lnl_GetStartChar( int *pStartChar );

Output Parameters:

Parameter Description pStartChar The Start character that marks the beginning of

event data.

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 90: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 90

Lnl_SetEndChar

Purpose: The method is used for Receiver panel integration. The method set the End character that marks the end of event data.

Syntax: HRESULT Lnl_SetEndChar( int EndChar );

Input Parameters:

Parameter Description EndChar The End character that marks the end of event

data.

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 91: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 91

Lnl_GetEndChar

Purpose: The method is used for Receiver panel integration. The method returns the End character that marks the end of event data. This variable was set with the Lnl_SetEndChar method.

Syntax: HRESULT Lnl_GetEndChar( int *pEndChar );

Output Parameters:

Parameter Description pEndChar The End character that marks the end of event

data.

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 92: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 92

Lnl_SetLanPort

Purpose: Set the Device Translator LAN port variable with port number to use for the primary connection to the device.

Syntax: HRESULT Lnl_SetLanPort( int LanPort );

Input Parameters:

Parameter Description LanPort Value of the LAN port number that use for

primary connection.

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 93: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 93

Lnl_GetLanPort

Purpose: Return the primary LAN port number from the Device Translator. This variable was set with the Lnl_SetLanPort method.

Syntax: HRESULT Lnl_GetLanPort( int *pLanPort );

Output Parameters:

Parameter Description pLanPort Value of the LAN port number that use for

primary connection.

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 94: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 94

Lnl_SetLanPort2

Purpose: Set the Device Translator LAN port variable with port number to use for the secondary connection to the device.

Syntax: HRESULT Lnl_SetLanPort2( int LanPort2 );

Input Parameters:

Parameter Description LanPort2 Value of the LAN port number that use for

secondary connection.

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 95: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 95

Lnl_GetLanPort2

Purpose: Return the secondary LAN port number from the Device Translator. This variable was set with the Lnl_SetLanPort2 method.

Syntax: HRESULT Lnl_GetLanPort2( int *pLanPort2 );

Output Parameters:

Parameter Description pLanPort2 Value of the LAN port number that use for

secondary connection.

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 96: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 96

Lnl_SetHostName

Purpose: Set the Device Translator host name variable with the host name to use for the primary connection to the device.

Syntax: HRESULT Lnl_SetHostName( BSTR prl_Value );

Input Parameters:

Parameter Description prl_Value Value of the host name that is use for primary

connection

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 97: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 97

Lnl_GetHostName

Purpose: Get the first host name the Device Translator is configured to use.

Syntax: HRESULT Lnl_GetHostName( BSTR *Value );

Output Parameters:

Parameter Description Value Value of the host name that is use for primary

connection

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 98: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 98

Lnl_SetHostName2

Purpose: Set the Device Translator host name variable with the host name to use for the secondary connection to the device.

Syntax: HRESULT Lnl_SetHostName2( BSTR prl_Value );

Input Parameters:

Parameter Description prl_Value Value of the host name that is use for

secondary connection

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 99: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 99

Lnl_GetHostName2

Purpose: Get the second host name the Device Translator is configured to use.

Syntax: HRESULT Lnl_GetHostName2( BSTR *Value );

Output Parameters:

Parameter Description Value Value of the host name that is use for

secondary connection

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 100: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 100

Lnl_SetBaudRate2

Purpose: Set the Device Translator baud rate variable with the baud rate to use for the secondary connection to the device.

Syntax: HRESULT Lnl_SetBaudRate2( int vi_Value );

Input Parameters:

Parameter Description vi_Value Value of the baud rate that is use for secondary

connection

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 101: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 101

Lnl_GetBaudRate2

Purpose: Get the second baud rate the Device Translator is configured to use.

Syntax: HRESULT Lnl_GetBaudRate2( int *Value );

Output Parameters:

Parameter Description Value Value of the baud rate that is use for secondary

connection

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 102: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 102

IDistributeEvent Functions The IDistributeEvent interface is used mainly by the Device Translators to send information to the Lenel Communication Server as well as execute functions in the Lenel Communication Server. IDistributeEvent Revision History Date Author Notes 03/27/2003 M. Serafin • The following methods have been added:

Lnl_DistributeSNMPAgentMessageEx, Lnl_DistributeOPCMessageEx

• Added L_EVENTTYPE_GENERIC • Added examples to

Lnl_DistributeDisplayTextMessage, Lnl_DistributeLnlMessageEx, and Lnl_DistributeLnlMessageWithText

12/10/2002 M. Serafin • Lnl_DistributeLnlMessage, Lnl_DistributeAccountMessage, and Lnl_DistributeLnlMessageWithText marked as old methods.

• Lnl_HostBasedDecisionRequest modified so badgeID is an __int64.

• Added the following methods: Lnl_LookupReaderInfo, Lnl_LookupWorldTZ, Lnl_DistributeLnlMessageEx, Lnl_DistributeAccountMessageEx, Lnl_DistributeLnlMessageWithTextEx

List of functions:

• Lnl_DistributeDisplayTextMessage • Lnl_DistributeLnlMessageEx • Lnl_DistributeLnlMessageWithTextEx • Lnl_DistributeLnlMessage (Old method, left for backwards compatibility) • Lnl_StartDatabaseThread • Lnl_DistributeDisplayTextMessage • Lnl_WriteDownloadError • Lnl_PanelCommunicationType • Lnl_IsTimezoneActive • Lnl_StartReaderDownload • Lnl_AbortDatabaseThread • Lnl_WorkstationLookup

Page 103: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 103

• Lnl_DistributeAccountMessage (Old method, left for backwards compatibility) • Lnl_DistributeLnlMessageWithText (Old method, left for backwards compatibility) • Lnl_HostBasedDecisionRequest • Lnl_UdatePanelEventIndex • Lnl_LookupReaderInfo • Lnl_LookupWorldTZ • Lnl_DistributeLnlMessageEx • Lnl_DistributeAccountMessageEx • Lnl_DistributeLnlMessageWithTextEx • Lnl_DistributeSNMPAgentMessageEx • Lnl_DistributeOPCMessageEx

Page 104: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 104

Lnl_DistributeDisplayTextMessage Purpose: Allows the Device Translator to pass a text message back to the Lenel Communication Server to be displayed on the user interface when the LCS is not run as a service which is useful for development and debugging.

Example: The DeviceTranslator.h template code has a method DistributeDisplayTextMessage which wraps up the calling of this method. So the DistributeDisplayTextMessage method should be used instead of calling this method directory. Below is an example of how to use this method:

CString msgString; msgString.Format(_T("Sample Text")); DistributeDisplayTextMessage(msgString);

Syntax: HRESULT Lnl_DistributeDisplayTextMessage ( BSTR Message );

Input Parameters:

Parameter Description Message Text message to be displayed.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 105: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 105

Lnl_DistributeLnlMessageEx Purpose: This method allows the Device Translators to send events and status messages back to the Lenel Communication Server so that they can be passed to applications like Alarm Monitoring and be stored in the database. This method replaces the old Lnl_DistributeLnlMessage method.

Syntax: HRESULT Lnl_DistributeLnlMessageEx ( LNLMESSAGE *Message );

Example: The DeviceTranslator.h template code has a method that wraps up calling of this method called WriteEventsToClients. So the WriteEventsToClients method should be called instead of calling this method directly. Below is an example of sending a Communication Restored event: LNLMESSAGE ls_Event; memset( &ls_Event, '\0', sizeof(ls_Event)); ls_Event.sl_Size = sizeof(LNLMESSAGE); ls_Event.sl_SerialNumber = GetPanelEventSerialNumber(); ls_Event.sl_Time = g_oTimeConverter.GetCurrentGmtTime(); //time(NULL); ls_Event.ss_AccessPanelID = m_PanelID; ls_Event.sb_EventType = L_EVENTTYPE_SYSTEM; ls_Event.sb_EventID = L_SYSTEM_COMM_RESTORED; WriteEventsToClients (&ls_Event); The first thing that is done is initialize the LNLMESSAGE structure to all zeroes, this is the default. The size of the structure should also be set; validation is done in the Communication Server so that it can determine that it is receiving a valid message. The serial number also needs to be set and this is done by calling GetPanelEventSerialNumber. The serial number along with the panel ID is a unique ID that is associated to the event and is used when saving the event to the database and also by clients that receive the event. The time also needs to be set to UTC. In the example above a method is used to grab the current UTC time from the local machine. If the device has its own internal clock and can store events you will want to use the time from the device and not the local machine. Next the device ID is set, for this event we are generating it for the panel so only the Panel ID is set. If it is for a downstream device the sb_DeviceID and sb_InputDevID variables could also be set to reflect this. The event to use will also need to be set as well, and this consists of the event type (sb_EventType) and the event ID (sb_EventID). This is the basic information that needs to be filled in. Here is another example that sends an intercom event indicating that a call has been placed to an open subscriber.

Page 106: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 106

LNLMESSAGE ls_Event; memset( &ls_Event, '\0', sizeof(ls_Event)); ls_Event.sl_Size = sizeof(LNLMESSAGE); ls_Event.sl_SerialNumber = GetPanelEventSerialNumber(); ls_Event.sl_Time = g_oTimeConverter.GetCurrentGmtTime(); ls_Event.ss_AccessPanelID = m_PanelID; ls_Event.sb_DeviceID = station1; ls_Event.sb_EventType = L_EVENTTYPE_INTERCOM; ls_Event.sb_EventID = L_INTERCOM_CALL_TO_OPEN; ls_Event.sb_EventDataType = EVENT_DATA_TYPE_INTERCOM; ls_Event.su_EventData.us_IntercomData.sl_IntercomData = station2; WriteEventsToClients (&ls_Event); In this example it is pretty similar to the first example with a few differences. The first difference is that this is an event for a downstream device (an intercom station off of an intercom exchange) and it actually is using the event data union to pass back additional data with this event. You will see that it sets sb_EventDataType to EVENT_DATA_TYPE_INTERCOM to indicate that the intercom data structure is being used, and it then sets sl_IntercomData in this structure to station2, which is the intercom station that the first intercom station (station1) called. The next example below shows an example of how to send an LNLMESSAGE for status. Status messages are not saved to the database and do not display as an event in Alarm Monitoring. They are handled behind the scenes to update the status in Alarm Monitoring. The example below is used to indicate the free_memory available in the panel: LNLMESSAGE ls_Event; memset( &ls_Event, '\0', sizeof(ls_Event)); ls_Event.sl_Size = sizeof(LNLMESSAGE); ls_Event.sl_Time = g_oTimeConverter.GetCurrentGmtTime(); ls_Event.sl_SerialNumber = GetPanelEventSerialNumber(); ls_Event.ss_AccessPanelID = m_PanelID; ls_Event.sb_MessageType = LNLMSG_TYPE_STATUS; ls_Event.sb_EventDataType = EVENT_DATA_TYPE_STATUSREQUEST; ls_Event.su_EventData.us_StatusRequest.sl_StatusType =

DATA_SRQ_PANEL_MEM_FREE; ls_Event.su_EventData.us_StatusRequest.sl_Status = free_memory; WriteEventsToClients ( &ls_Event ); You will notice that these messages are created in a similar fashion to a basic event. First the LNLMESSAGE is initialized to all zeroes and the size is set. Next the time and the serial number are set. These are really not required for these messages but it does not hurt to set them. The panel ID is also set. In this example you will see that the sb_MessageType is set to LNLMSG_TYPE_STATUS to indicate a status message. In the earlier examples this was not set because the default is LNLMSG_TYPE_EVENT (0). The DATA_STATUSREQUEST structure

Page 107: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 107

is used to pass back the details of the status so the sb_EventDataType needs to be set to EVENT_DATA_TYPE_STATUSREQUEST. Then the type of status request needs to be set and in this case we are setting sl_StatusType to DATA_SRQ_PANEL_MEM_FREE and then setting the status via sl_Status to the available free memory in the panel. There are other defines listed in lmsgtype.h that contain _SRQ_ in the define which are for the other statuses that can be sent.

Input Parameters:

Parameter Description Message Structure that contains event information.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 108: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 108

Lnl_DistributeLnlMessageWithTextEx Purpose: Method used to send an LNLMESSAGE with additional text. This method replaced the Lnl_DistributeLnlMessageWithText method. The associated text will be stored in the database along with the event and can be viewed in Alarm Monitoring using a menu item that is available on the event. It is useful to pass back additional information regarding the event that really does not map to an existing field.

Syntax: HRESULT Lnl_DistributeLnlMessageWithTextEx ( LNLMESSAGE *Message, BSTR TextInfo );

Example: This example will show how to pass back an LNLMESSAGE with associated text. See Lnl_DistributeLnlMessageEx for examples of how to create an LNLMESSAGE in general.

CString messageText = _T(“Sample Text”); ls_Event.sb_AssociatedText = 1; BSTR bstrMessageText = messageText.AllocSysString(); m_pDistributeEvent-> Lnl_DistributeLnlMessageWithTextEx

(&ls_Event, bstrMessageText ); ::SysFreeString( bstrMessageText );

To send back an LNLMESSAGE with associated text you will need to set sb_AssociatedText to 1 to indicate that this message has associated text. You will also need to call Lnl_DistributeLnlMessageWithTexeEX and pass in the LNLMESSAGE as well as the text. You can see how this is done above. The text is actually pointed to by a BSTR and you will need to allocate and free the string as demonstrated above.

Input Parameters:

Parameter Description Message Message. TextInfo Additional text information. The text

should not exceed 2000 characters.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL – Not Implemented

Page 109: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 109

Lnl_DistributeLnlMessage Purpose: This method allows the Device Translators to send events and status messages back to the Lenel Communication Server so that they can be passed to applications like Alarm Monitoring and are stored in the database. NOTE: This method has been replaced by Lnl_DistributeLnlMessageEx. Please use the new method instead of this method. Syntax:

HRESULT Lnl_DistributeLnlMessage ( OLDLNLMESSAGE *Message );

Input Parameters:

Parameter Description Message Structure that contains event information.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 110: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 110

Lnl_StartDatabaseThread Purpose: Method that allows the Device Translator to have the Lenel Communication Server kickoff a database download to the device or panel. A BYTE array of 255 BYTES is used to direct the Lenel Communication Server to the information that is to be downloaded and the order in which it is to be downloaded. The BYTE array should be initialized to 0’s to indicate that nothing is to be done and should then be filled in starting at index 0 with the IDs of the corresponding download commands. It is a good idea to fill in this structure in the constructor of the Device Translator.

Syntax: HRESULT Lnl_StartDatabaseThread ( int PanelID, BYTE *DownloadArray );

Input Parameters:

Parameter Description PanelID Panel ID to start a database download to. DownloadArray Byte array of 255 bytes of commands (see

list of possible database download commands listed below).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Database Download Commands:

Name Description DATABASE_DOWNLOAD_NONE Indicates that there are no more

commands as part of the download. DATABASE_DOWNLOAD_ACCESS_PANEL

Download access panel information. This includes information like cardholder parameters, number of timezones, number of holidays, amount of memory, etc.

DATABASE_DOWNLOAD_DOWNLOAD_RECORDS

Download the reader download formats.

DATABASE_DOWNLOAD_CARD_FORMATS

Download card format information.

DATABASE_DOWNLOAD_ALARM_P Download alarm panel information,

Page 111: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 111

ANELS this includes information about connected alarm inputs and alarm outputs.

DATABASE_DOWNLOAD_HOLIDAYS Download holiday information. DATABASE_DOWNLOAD_TIMEZONES

Download timezone information.

DATABASE_DOWNLOAD_ELEVATOR_ACCESS_LEVELS

Download elevator access level information.

DATABASE_DOWNLOAD_ACCESS_LEVELS

Download access levels.

DATABASE_DOWNLOAD_AREA_SPEC_TABLE

Download area spec table.

DATABASE_DOWNLOAD_AREAS Download area information. DATABASE_DOWNLOAD_CARDHOLDERS

Download cardholders.

DATABASE_DOWNLOAD_AREA_RESET

Reset area.

DATABASE_DOWNLOAD_ALARM_MASK_GROUPS

Download alarm mask group information.

DATABASE_DOWNLOAD_ASSETS Download asset information. DATABASE_DOWNLOAD_ASSET_GROUPS

Download asset group information.

DATABASE_DOWNLOAD_READERS Download reader information. DATABASE_DOWNLOAD_READER_TIMEZONE_LIST

Download reader timezone list information.

DATABASE_DOWNLOAD_FUNCTION_LISTS

Download function lists.

DATABASE_DOWNLOAD_FUNCTION_LINKS

Download function links.

DATABASE_DOWNLOAD_TIMEZONES_AND_ACTIVATE

Download and activate timezones.

DATABASE_DOWNLOAD_VIDEO_PANEL

Download video panel information.

DATABASE_DOWNLOAD_CAMERAS Download cameras information. DATABASE_DOWNLOAD_MONITORS Download monitor information. DATABASE_DOWNLOAD_TRANSMITTERS

Download transmitter information.

DATABASE_DOWNLOAD_SET_CLOCK

Set panel clock.

DATABASE_DOWNLOAD_RESET Perform a reset on the panel. DATABASE_DOWNLOAD_START_POLLING

Sends the start polling command to the panel.

DATABASE_DOWNLOAD_ALARM_PANEL_CFG

Download just the alarm panel information. This differs from the DATABASE_DOWNLOAD_ALARM_PANEL in that the connected

Page 112: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 112

alarm input and alarm output information is not downloaded.

DATABASE_DOWNLOAD_EXTENDED_HELD_COMMAND

Indicates that the extended held open command information is to be downloaded.

DATABASE_DOWNLOAD_EOL_TABLES

Indicates that the custom EOL tables are to be downloaded.

Page 113: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 113

Lnl_DistributeDisplayTextMessage Purpose: Allows the Device Translator to pass a text message back to the Lenel Communication Server to be displayed on the user interface when the LCS is not run as a service which is useful for development and debugging.

Example: The DeviceTranslator.h template code has a method DistributeDisplayTextMessage which wraps up the calling of this method. So the DistributeDisplayTextMessage method should be used instead of calling this method directory. Below is an example of how to use this method:

CString msgString; msgString.Format(_T("Sample Text")); DistributeDisplayTextMessage(msgString);

Syntax: HRESULT Lnl_DistributeDisplayTextMessage ( BSTR Message );

Input Parameters:

Parameter Description Message Text message to be displayed.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 114: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 114

Lnl_WriteDownloadError Purpose: Passes back a command from the Device Translator to the Lenel Communication Server that failed. This is so that the command can be resent later to make sure that the command eventually is executed on the panel or device. Many Device Translators will not need to use this method to have failed commands saved to the database, they can just return the status of the command and the Lenel Communication Server can save the raw data of the command in the case of a failure. In the cases where the status is returned asynchronously from the panel or the device, this method may be required.

Syntax: HRESULT Lnl_WriteDownloadError ( int vi_PanelID, BYTE *pro_Ptr, int vi_DataSize );

Input Parameters:

Parameter Description vi_PanelID Panel ID of the command that failed. pro_Ptr Raw data of the command that failed. vi_DataSize Number of bytes of raw data.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 115: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 115

Lnl_PanelCommunicationType Purpose: Method that can be used to determine the communication type of a panel. One example of how this can be used is by a Communication Transporter. One of the Communication Transporters can have panels connect up to it, and this method verifies that the panel is one of the ones that is allowed to do this by using this method to verify the communication type.

Value Connection Type 0 Direct Connection 1 LAN Connection 2 Dialup Connection

Syntax: HRESULT Lnl_PanelCommunicationType ( int PanelID, int *CommType );

Input Parameters:

Parameter Description PanelID Panel ID.

Output Parameters:

Parameter Description CommType Type of communication.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 116: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 116

Lnl_IsTimezoneActive Purpose: Function the Device Translator uses to determine if a particular timezone is active. TRUE indicates that the timezone is active and FALSE indicates the timezone is inactive.

Syntax: HRESULT Lnl_IsTimezoneActive ( long timeZone, BOOL *active );

Input Parameters:

Parameter Description timezone ID of the timezone.

Output Parameters:

Parameter Description active Flag indicating if the timezone is currently

active or not (0-Not active, 1-Active).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 117: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 117

Lnl_StartReaderDownload Purpose: Function the Device Translator uses to determine if a particular timezone is active. TRUE indicates that the timezone is active and FALSE indicates the timezone is inactive.

Syntax: HRESULT Lnl_StartReaderDownload ( int PanelID, int numReaders, BYTE *ReaderArray, BYTE *DownloadArray, );

Input Parameters:

Parameter Description PanelID Panel ID of the readers. numReaders The number of readers in the ReaderArray

that are to be downloaded. ReaderArray Byte array of 64 readers indicating the

readers to be downloaded. DownloadArray Byte array of 255 bytes indicating the

reader download commands to be executed during the download. The list of possible commands is to be determined.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Reader Database Download Commands:

Name Description DATABASE_DOWNLOAD_NONE Indicates that there are no more

commands as part of the reader download. DATABASE_DOWNLOAD_ACCESS_PANEL

Download access panel information. This includes information like cardholder parameters, number of timezones, number of holidays, amount of memory, etc.

DATABASE_DOWNLOAD_DOWNLOAD_RECORDS

Downloads the reader download formats.

DATABASE_DOWNLOAD_CARD_FORMATS

Download card format information.

DATABASE_DOWNLOAD_HOLIDAYS Download holiday information.

Page 118: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 118

DATABASE_DOWNLOAD_TIMEZONES

Download timezone information.

DATABASE_DOWNLOAD_ACCESS_LEVELS

Download access levels.

DATABASE_DOWNLOAD_CARDHOLDERS

Download cardholders for the readers that are specified in the reader array.

DATABASE_DOWNLOAD_READERS Download reader information for the readers that are specified in the reader array.

DATABASE_DOWNLOAD_READER_TIMEZONE_LIST

Download reader timezone list information for the readers that are specified in the reader array.

DATABASE_DOWNLOAD_READER_PANEL_PARAMETERS

Downloads the panel parameters associated with the readers that are being downloaded.

Page 119: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 119

Lnl_AbortDatabaseThread Purpose: Method used to abort a database download that is in progress. This method sets a flag that is examined during the download and if true, the download is aborted. This flag is only currently checked in between database download commands. So if an abort command is executed say during a cardholder download the abort will not take place until after all the cardholders have been download. This function will return E_FAIL if the abort flag can not be set because the database thread for the panel is not active.

Syntax: HRESULT Lnl_AbortDatabaseThread ( int PanelID );

Input Parameters:

Parameter Description PanelID Panel ID.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 120: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 120

Lnl_WorkstationLookup Purpose: Method used to pass the name of a workstation to the Communication Server so that the Communication Server can return the database ID of that workstation. If the workstation is not found in the database, a new entry will be added.

Syntax: HRESULT Lnl_WorkstationLookup ( BSTR WorkstationName, int *WorkstationID );

Input Parameters:

Parameter Description WorkstationName Name of the Workstation.

Output Parameters:

Parameter Description WorkstationID ID of the workstation.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 121: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 121

Lnl_DistributeAccountMessage Purpose: Method used to send a message for account. NOTE: This method has been replaced by Lnl_DistributeAccountMessageEx. Please use the new method instead of this method.

Syntax: HRESULT Lnl_DistributeAccountMessage ( BSTR AccountNum, BSTR DefaultAccountName, OLDLNLMESSAGE *Message, BSTR TextInfo, Long DefaultTemplate );

Input Parameters:

Parameter Description AccountNum Account number of the account. DefaultAccountName Default account name to use if account

needs to be added to the database. Message Message. TextInfo Text message. DefaultTemplate Default event code template to use.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL – Not Implemented

Page 122: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 122

Lnl_DistributeLnlMessageWithText Purpose: Method used to send an OLDLNLMESSAGE with additional text. NOTE: This method has been replaced by Lnl_DistributeLnlMessageWithTextEx. Please use the new method instead of this method.

Syntax: HRESULT Lnl_DistributeLnlMessageWithText ( OLDLNLMESSAGE *Message, BSTR TextInfo );

Input Parameters:

Parameter Description Message Message. TextInfo Additional text information.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL – Not Implemented

Page 123: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 123

Lnl_HostBasedDecisionRequest Purpose: Method used to request a host based decision for a card access at a reader.

Syntax: HRESULT Lnl_HostBasedDecisionRequest ( long panelID, long readerID, __int64 badgeID );

Input Parameters:

Parameter Description panelID Panel ID. readerID Reader ID that the host based decision is

being performed for. badgeID Badge ID involved in the host based

decision.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 124: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 124

Lnl_UpdatePanelEventIndex Purpose: Method used to update the event index for the panel in the database.

Syntax: HRESULT Lnl_UpdatePanelEventIndex ( long panelID, long eventIndex );

Input Parameters:

Parameter Description panelID Panel ID. eventIndex Event index that is to be updated in the

database for the panel.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 125: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 125

Lnl_LookupReaderInfo Purpose: Method used to lookup additional information about the reader.

Syntax: HRESULT Lnl_LookupReaderInfo( long panelID, long readerID, long *CtrlType, long *altRdrID, short *altRdrSpec )

Input Parameters:

Parameter Description panelID Panel ID. readerID Reader ID

Output Parameters:

Parameter Description CtrlType Type of reader altRdrID ID of the alternate reader altRdrSpec Type of alternate reader

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 126: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 126

Lnl_LookupWorldTZ Purpose: Method used to lookup the world timezone information for a given panel.

Syntax: HRESULT Lnl_LookupWorldTZ ( long panelID, TZI *tzInfo );

Input Parameters:

Parameter Description panelID Panel ID.

Output Parameters:

Parameter Description tzInfo World timezone information for the given

panel.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 127: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 127

Lnl_DistributeLnlMessageEx Purpose: This method allows the Device Translators to send events and status messages back to the Lenel Communication Server so that they can be passed to applications like Alarm Monitoring and be stored in the database. This method replaces the old Lnl_DistributeLnlMessage method.

Syntax: HRESULT Lnl_DistributeLnlMessageEx ( LNLMESSAGE *Message );

Example: The DeviceTranslator.h template code has a method that wraps up calling of this method called WriteEventsToClients. So the WriteEventsToClients method should be called instead of calling this method directly. Below is an example of sending a Communication Restored event: LNLMESSAGE ls_Event; memset( &ls_Event, '\0', sizeof(ls_Event)); ls_Event.sl_Size = sizeof(LNLMESSAGE); ls_Event.sl_SerialNumber = GetPanelEventSerialNumber(); ls_Event.sl_Time = g_oTimeConverter.GetCurrentGmtTime(); //time(NULL); ls_Event.ss_AccessPanelID = m_PanelID; ls_Event.sb_EventType = L_EVENTTYPE_SYSTEM; ls_Event.sb_EventID = L_SYSTEM_COMM_RESTORED; WriteEventsToClients (&ls_Event); The first thing that is done is initialize the LNLMESSAGE structure to all zeroes, this is the default. The size of the structure should also be set; validation is done in the Communication Server so that it can determine that it is receiving a valid message. The serial number also needs to be set and this is done by calling GetPanelEventSerialNumber. The serial number along with the panel ID is a unique ID that is associated to the event and is used when saving the event to the database and also by clients that receive the event. The time also needs to be set to UTC. In the example above a method is used to grab the current UTC time from the local machine. If the device has its own internal clock and can store events you will want to use the time from the device and not the local machine. Next the device ID is set, for this event we are generating it for the panel so only the Panel ID is set. If it is for a downstream device the sb_DeviceID and sb_InputDevID variables could also be set to reflect this. The event to use will also need to be set as well, and this consists of the event type (sb_EventType) and the event ID (sb_EventID). This is the basic information that needs to be filled in. Here is another example that sends an intercom event indicating that a call has been placed to an open subscriber.

Page 128: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 128

LNLMESSAGE ls_Event; memset( &ls_Event, '\0', sizeof(ls_Event)); ls_Event.sl_Size = sizeof(LNLMESSAGE); ls_Event.sl_SerialNumber = GetPanelEventSerialNumber(); ls_Event.sl_Time = g_oTimeConverter.GetCurrentGmtTime(); ls_Event.ss_AccessPanelID = m_PanelID; ls_Event.sb_DeviceID = station1; ls_Event.sb_EventType = L_EVENTTYPE_INTERCOM; ls_Event.sb_EventID = L_INTERCOM_CALL_TO_OPEN; ls_Event.sb_EventDataType = EVENT_DATA_TYPE_INTERCOM; ls_Event.su_EventData.us_IntercomData.sl_IntercomData = station2; WriteEventsToClients (&ls_Event); In this example it is pretty similar to the first example with a few differences. The first difference is that this is an event for a downstream device (an intercom station off of an intercom exchange) and it actually is using the event data union to pass back additional data with this event. You will see that it sets sb_EventDataType to EVENT_DATA_TYPE_INTERCOM to indicate that the intercom data structure is being used, and it then sets sl_IntercomData in this structure to station2, which is the intercom station that the first intercom station (station1) called. The next example below shows an example of how to send an LNLMESSAGE for status. Status messages are not saved to the database and do not display as an event in Alarm Monitoring. They are handled behind the scenes to update the status in Alarm Monitoring. The example below is used to indicate the free_memory available in the panel: LNLMESSAGE ls_Event; memset( &ls_Event, '\0', sizeof(ls_Event)); ls_Event.sl_Size = sizeof(LNLMESSAGE); ls_Event.sl_Time = g_oTimeConverter.GetCurrentGmtTime(); ls_Event.sl_SerialNumber = GetPanelEventSerialNumber(); ls_Event.ss_AccessPanelID = m_PanelID; ls_Event.sb_MessageType = LNLMSG_TYPE_STATUS; ls_Event.sb_EventDataType = EVENT_DATA_TYPE_STATUSREQUEST; ls_Event.su_EventData.us_StatusRequest.sl_StatusType =

DATA_SRQ_PANEL_MEM_FREE; ls_Event.su_EventData.us_StatusRequest.sl_Status = free_memory; WriteEventsToClients ( &ls_Event ); You will notice that these messages are created in a similar fashion to a basic event. First the LNLMESSAGE is initialized to all zeroes and the size is set. Next the time and the serial number are set. These are really not required for these messages but it does not hurt to set them. The panel ID is also set. In this example you will see that the sb_MessageType is set to LNLMSG_TYPE_STATUS to indicate a status message. In the earlier examples this was not set because the default is LNLMSG_TYPE_EVENT (0). The DATA_STATUSREQUEST structure

Page 129: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 129

is used to pass back the details of the status so the sb_EventDataType needs to be set to EVENT_DATA_TYPE_STATUSREQUEST. Then the type of status request needs to be set and in this case we are setting sl_StatusType to DATA_SRQ_PANEL_MEM_FREE and then setting the status via sl_Status to the available free memory in the panel. There are other defines listed in lmsgtype.h that contain _SRQ_ in the define which are for the other statuses that can be sent.

Input Parameters:

Parameter Description Message Structure that contains event information.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 130: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 130

Lnl_DistributeAccountMessageEx Purpose: Method used to send a message for a receiver account. This method replaced the old Lnl_DistributeAccountMessage method.

Syntax: HRESULT Lnl_DistributeAccountMessageEx ( BSTR AccountNum, BSTR DefaultAccountName, LNLMESSAGE *Message, BSTR TextInfo, Long DefaultTemplate );

Input Parameters:

Parameter Description AccountNum Account number of the account. DefaultAccountName Default account name to use if account

needs to be added to the database. Message Message. TextInfo Text message. DefaultTemplate Default event code template to use.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL – Not Implemented

Page 131: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 131

Lnl_DistributeLnlMessageWithTextEx Purpose: Method used to send an LNLMESSAGE with additional text. This method replaced the Lnl_DistributeLnlMessageWithText method. The associated text will be stored in the database along with the event and can be viewed in Alarm Monitoring using a menu item that is available on the event. It is useful to pass back additional information regarding the event that really does not map to an existing field.

Syntax: HRESULT Lnl_DistributeLnlMessageWithTextEx ( LNLMESSAGE *Message, BSTR TextInfo );

Example: This example will show how to pass back an LNLMESSAGE with associated text. See Lnl_DistributeLnlMessageEx for examples of how to create an LNLMESSAGE in general.

CString messageText = _T(“Sample Text”); ls_Event.sb_AssociatedText = 1; BSTR bstrMessageText = messageText.AllocSysString(); m_pDistributeEvent-> Lnl_DistributeLnlMessageWithTextEx

(&ls_Event, bstrMessageText ); ::SysFreeString( bstrMessageText );

To send back an LNLMESSAGE with associated text you will need to set sb_AssociatedText to 1 to indicate that this message has associated text. You will also need to call Lnl_DistributeLnlMessageWithTexeEX and pass in the LNLMESSAGE as well as the text. You can see how this is done above. The text is actually pointed to by a BSTR and you will need to allocate and free the string as demonstrated above.

Input Parameters:

Parameter Description Message Message. TextInfo Additional text information. The text

should not exceed 2000 characters.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL – Not Implemented

Page 132: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 132

Lnl_DistributeSNMPAgentMessageEx Purpose: Method used to send an LNLMESSAGE for SNMP Agents and can include additional text.

Syntax: HRESULT Lnl_DistributeSNMPAgentMessageEx( BSTR Address, BSTR DefaultAgentName, LNLMESSAGE *Message, BSTR TextInfo, long ManagerID );

Input Parameters:

Parameter Description Address IP Address of the SNMP Agent. DefaultAgentName Default Agent name to use if an entry is

needed in the database. Message The event Message. TextInfo Associated text. ManagerID ID of the manager that received the SNMP

message.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL – Not Implemented

Page 133: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 133

Lnl_DistributeOPCMessageEx Purpose: Method used to send an LNLMESSAGE for an OPC Source and can include additional text.

Syntax: HRESULT Lnl_DistributeOPCMessageEx ( BSTR OPCSource, LNLMESSAGE *Message, BSTR TextInfo );

Input Parameters:

Parameter Description OPCSource String name of OPC Source. Message Message. TextInfo Associated text with the message.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL – Not Implemented

Page 134: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 134

IDistributeEvent Structures LNLMESSAGE Although mainly used to pass information around about events that occurred in hardware, this structure is also used for a few other purposes. Not every field in this structure is used for every event, so it depends on the type of message what information will be available. The fields that are typically used include: sl_Size, sb_MessageType, sl_SerialNumber, sl_Time, ss_AccessPanelID, sb_DeviceID, sb_InputDevID, sb_EventType, sb_EventID, and sb_EventDataType.

Type Parameter Description DWORD sl_Size Size of this structure. BYTE sb_MessageType Type of message data contained within

the structure. This can either be a message for an event (0) or a message for status (1). This member is set to 0 for all messages EXCEPT for EVENT_DATA_TYPE_STATUSREQUEST data types where this value is set to 1.

DWORD sl_SerialNumber Serial number of the Event. This is used to uniquely identify the event for a particular panel for logging to the database.

DWORD sl_Time Time of the event specified in UTC. short ss_AccessPanelID The panel that sent the message. short sb_DeviceID Device ID of the event, This is for a

device that is directly connected to the panel. For access control the id also indicates the type of the device (panel = 0, reader [1, 64], alarm panel [65, 81].)

short sb_InputDevID Input device ID, this is a device that is connected to a secondary device, one that is connected to the panel.

short sb_EventType Type of the event generated. The current types that can be used are listed below: L_EVENTTYPE_GRANTED = 0x00 L_EVENTTYPE_DENIED = 0x01 L_EVENTTYPE_EMERGENCY = 0x02 L_EVENTTYPE_AREACONTROL = 0x03

Page 135: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 135

L_EVENTTYPE_SYSTEM = 0x04 L_EVENTTYPE_ASSET = 0x05 L_EVENTTYPE_HOSTMSG = 0x06 L_EVENTTYPE_FIRE = 0x07 L_EVENTTYPE_FIRE2 = 0x08 L_EVENTTYPE_FIRE3 = 0x09 L_EVENTTYPE_INTERCOM = 0x0A L_EVENTTYPE_VIDEO = 0x0B L_EVENTTYPE_TRANSMITTER = 0x0C L_EVENTTYPE_NETWORK_WORKSTATION = 0x0D L_EVENTTYPE_NETWORK_CARD = 0x0E L_EVENTTYPE_NETWORK_PIN = 0x0F L_EVENTTYPE_NETWORK_USER = 0x10 L_EVENTTYPE_NETWORK_SERVER = 0x11 L_EVENTTYPE_BIOMETRIC = 0x12 L_EVENTTYPE_TROUBLE = 0x13 L_EVENTTYPE_DIGITIZE = 0x14 L_EVENTTYPE_BURGLARY = 0x15 L_EVENTTYPE_TEMPERATURE = 0x16 L_EVENTTYPE_GAS = 0x17 L_EVENTTYPE_RELAY_SOUNDER= 0x18 L_EVENTTYPE_MEDICAL = 0x19 L_EVENTTYPE_WATER = 0x1A L_EVENTTYPE_C900 = 0x1B L_EVENTTYPE_OPEN_CLOSE = 0x1C L_EVENTTYPE_MUSTER = 0x1D L_EVENTTYPE_GENERIC = 0x1E

short sb_EventID Unique ID for representing the event. DWORD sl_InitiatingEventID ID for the initiating event, used for

function list reporting events. BYTE sb_IV Function List ID which was triggered

by this event. BYTE sb_InputArg Input argument for the function list

(TRUE, FALSE, PULSE) BYTE sb_InternalLUN Logical unit number (internal driver

usage only). BYTE sb_InternalZoneID Triggering zone ID (internal driver

Page 136: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 136

usage only). BYTE sb_InternalDeviceID Triggering device ID from Apollo

(internal driver usage only). BYTE sb_EventDataType Type of the data associated with the

event. This data will be located in the su_EventData field of this structure. The values for this field are: EVENT_DATA_TYPE_CNA, EVENT_DATA_TYPE_FC, EVENT_DATA_TYPE_CA, EVENT_DATA_TYPE_STATUS, EVENT_IV_TYPE_CMD_RES, EVENT_IV_TYPE_CMD_REQ, EVENT_DATA_TYPE_STATUSREQUEST, EVENT_DATA_ASSET, EVENT_DATA_TYPE_INTERCOM, EVENT_DATA_TYPE_VIDEO, EVENT_DATA_TYPE_TRANSMITTER, EVENT_DATA_TYPE_WKSTN_CARD, EVENT_DATA_TYPE_RECEIVER, etc. (see definitions of the possible types above). Each value reflects the structure that will be used for the su_EventData union. Refer to the lmsgtype.h header file for the actual definitions of these structures.

BYTE sb_EventParam Flag indicating if the event has an associated parameter value.

DWORD sl_EventParamValue Associated parameter value. DWORD sl_TransmitterID ID associated with the transmitter. DWORD sl_TransmitterInputID ID associated with the transmitter input. BYTE sb_DeviceType Specifies the device sending the

message - can be used to translate hwid's to deviceid's before sending to clients. If sb_DeviceID is a input channel from a camera then this value should be set to L_DEVICETYPE_CCTVCAMERA

BYTE sb_AssociatedText Flag indicating if there is associated text with the event.

DWORD sl_SegmentID Segment ID that the event is in. This is currently only used for system wide

Page 137: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 137

events that are not associated with any hardware.

EVENTDATA su_EventData Union for various data types.

DATA_CNA This data structure is used for Card Data Not Available Events. The card number is typically not available when an invalid card format event is received. The card number is set to 0 for these events. The valid events for this structure are: L_DENIED_INVALIDCARDFORMAT

Type Parameter Description __int64 sl_CardNumber Badge ID for the event. Set to

–1 for Card Number Not Available

DATA_STATUS_CHG This structure is used for reporting status change events that occur within the system. This includes alarm activation and other events that occur that deal with the change in status of the field hardware. When events are reported via this structure, the events are displayed on the alarm monitoring workstation. Events of this type also reflect the field hardware status in the alarm monitoring system hardware tree. The valid events for this data structure are: L_SYSTEM_OFFLINE L_SYSTEM_GROUNDEDLOOP L_SYSTEM_OPENLINE L_SYSTEM_SHORTEDLINE L_SYSTEM_LINEERROR L_SYSTEM_ALARM L_SYSTEM_TAMPER L_SYSTEM_GROUNDEDLOOPCANCEL L_SYSTEM_OPENLINECANCEL L_SYSTEM_SHORTEDLINECANCEL L_SYSTEM_LINEERRORCANCEL L_SYSTEM_TAMPERCANCEL L_SYSTEM_ONLINE L_SYSTEM_READERINPUT L_SYSTEM_READERINPUTCANCEL L_SYSTEM_FORCEDOPEN L_SYSTEM_FORCEDCANCEL L_SYSTEM_HELDOPEN L_SYSTEM_HELDCANCEL L_SYSTEM_DOORCONTACT

Page 138: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 138

L_SYSTEM_DOORCONTACTCANCEL L_SYSTEM_COMM_RESTORED L_SYSTEM_COMM_LOST L_SYSTEM_CABINETTAMPER L_SYSTEM_CABINETCANCEL L_SYSTEM_POWERFAILURE L_SYSTEM_POWERCANCEL L_SYSTEM_POWERUPEVENT

Type Parameter Description BYTE sb_NewStatus Current status of the alarm point

for this event – user defined by hardware

BYTE sb_OldStatus Previous status of the alarm point prior to this event – user defined by hardware

short sw_ComStatus Communication Status

DATA_CA This data structure is used for card access events. This event is received for access grants and denies where the card format and facility code are correct. The valid events for this data structure are: L_GRANTED_ACCESS L_EMERGENCY_GRANTEDDURESS L_DENIED_INVALIDBADGE L_DENIED_INVALIDISSUECODE L_DENIED_INVALIDPIN L_DENIED_INVALIDACCESSLEVEL L_AREA_ANTIPASSBACKVIOLATION L_DENIED_INACTIVEBADGE L_GRANTED_FACILITYCODE L_GRANTED_NOENTRYMADE L_EMERGENCY_GRANTEDNOENTRY L_GRANTED_FCNOENTRYMADE L_AREA_AREALIMITEXCEEDED L_AREA_TIMEOUTEXCEEDED L_AREA_AREACLOSED L_DENIED_READEREXCLUDED L_EMERGENCY_DENIEDDURESS L_DENIED_CMDAUTHORITY L_DENIED_DENIEDMASK L_AREA_GRANTEDAPBUSED L_AREA_GRANTEDAPBNOTUSED L_DENIED_USELIMITEXCEEDED

Page 139: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 139

L_DENIED_LOW_BATTERY

Type Parameter Description __int64 sl_CardNumber Badge ID for this event. DWORD sl_IssueCode Issue Code associated with this

event (-1 indicates not available).

DWORD sl_BioScore Biometric score if one is associated with the event.

DATA_FC This data structure is used for events where the access attempt is denied due to an invalid facility code. When this event is received, the structure is set to the facility code read from the card. The valid events for this structure are: L_DENIED_INVALIDFACILITYCODE

Type Parameter Description DWORD sl_FacilityCode Facility Code of the card. DWORD sl_IssueCode Issue Code associated with this

event (-1 indicates not available).

DATA_CMDREQ This event indicates commands that were executed by a cardholder at a keypad reader. The card number of the person requesting the command is indicated in the union. The event id indicates the command that was executed. The valid events for this data structure are: L_SYSTEM_DOOR_SHUNT_CMD L_SYSTEM_SET_FUNC_TRUE_CMD L_SYSTEM_SET_FUNC_FALSE_CMD L_SYSTEM_SET_FUNC_CMD4 L_SYSTEM_SET_FUNC_CMD5 L_SYSTEM_SET_FUNC_CMD6 L_SYSTEM_SET_FUNC_CMD7 L_SYSTEM_SET_FUNC_CMD8 L_SYSTEM_SET_FUNC_CMD9 L_SYSTEM_SET_FUNC_CMD10 L_SYSTEM_SET_FUNC_CMD11 L_SYSTEM_SET_FUNC_CMD12 L_SYSTEM_SET_FUNC_CMD13 L_SYSTEM_SET_FUNC_CMD14 L_SYSTEM_SET_FUNC_CMD15

Page 140: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 140

Type Parameter Description DWORD sl_CardNumber Cardnumber

DATA_CMDRES This event returns the results of the door shunt command, which can be issued via a keypad reader. The valid events for this data structure are: L_SYSTEM_DOOR_SHUNT_CMD_RESULTS

Type Parameter Description BYTE sb_Results 0 indicates that the door is

shunted; 1 indicates that the shunt was canceled due to the door closing.

DATA_STATUSREQUEST This data structure indicates status changes, as well as field hardware devices and their operation. This data structure is different from the DATA_STATUS_CHG data structure. Events of this type are NOT recorded to the database and they are not displayed as events in alarm monitoring. This message type is only for updating the current status of the system hardware tree in alarm monitoring.

Type Parameter Description DWORD sl_StatusType Type of status being reported. See table

above for valid types. DWORD sl_Status Actual status of type being reported. See

table above for valid types. char sc_String[32] Null terminated ASCII string. Currently

only used for sl_StatusType of DATA_SRQ_FIRMWARE_REV_STRING.

The following table describes the various status messages that can be returned.

sl_StatusType sl_Status

DATA_SRQ_COMM_STATE BOOL – TRUE = ONLINE, FALSE = OFFLINE

DATA_SRQ_POWERINPUT_STATE

BOOL – TRUE = ALARM, FALSE = SECURE

DATA_SRQ_CABINET_STATE BOOL – TRUE = ALARM, FALSE = SECURE

DATA_SRQ_READER_MODE ACC_MODE_LOCKED = 0

Page 141: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 141

ACC_MODE_CARDONLY = 1 ACC_MODE_PIN_OR_CARD = 2 ACC_MODE_PIN_AND_CARD = 3 ACC_MODE_UNLOCKED = 4 ACC_MODE_FACCODE_ONLY = 5 ACC_MODE_CYPHERLOCK = 6 ACC_MODE_AUTOMATIC = 7 ACC_MODE_FIRST_CARD_UNLOCK = 8

DATA_SRQ_RDR_TAMPER_STATE

BOOL – TRUE = ALARM, FALSE = SECURE

DATA_SRQ_RDR_FORCED_STATE

BOOL – TRUE = ALARM, FALSE = SECURE

DATA_SRQ_RDR_HELD_STATE

BOOL – TRUE = ALARM, FALSE = SECURE

DATA_SRQ_RDR_FORCED_MASK

BOOL – TRUE = MASKED, FALSE = NOT MASKED

DATA_SRQ_RDR_HELD_MASK BOOL – TRUE = MASKED, FALSE = NOT MASKED

DATA_SRQ_AUX_INPUT_STATE

enum LineStatus { LineStatusSecure, LineStatusAlarm, LineStatusShortedLine, LineStatusOpenLine, LineStatusGroundedLine, LineStatusLineError };

DATA_SRQ_AUX_INPUT_MASKED

BOOL – TRUE = MASKED, FALSE = NOT MASKED

DATA_SRQ_ALARM_INPUT_STATE

enum LineStatus { LineStatusSecure, LineStatusAlarm, LineStatusShortedLine, LineStatusOpenLine, LineStatusGroundedLine, LineStatusLineError };

DATA_SRQ_ALARM_INPUT_MASKED

BOOL – TRUE = MASKED, FALSE = NOT MASKED

DATA_SRQ_AUX_OUTPUT_STATE

BOOL – TRUE = ON, FALSE = OFF

DATA_SRQ_ALARM_OUTPUT_ BOOL – TRUE = ON, FALSE = OFF

Page 142: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 142

STATE DATA_SRQ_PANEL_TIME long – current local time of panel DATA_SRQ_PANEL_MEM_MAX

long – max memory of panel

DATA_SRQ_PANEL_MAX_CARDS

long – max card capacity of panel

DATA_SRQ_PANEL_CUR_CARDS

long – current # of cards in panel

DATA_SRQ_FIRMWARE_REV long – firmware revision (Major - upper word, minor – lower word)

DATA_SRQ_PANEL_MEM_FREE

long – current free memory in panel or current % of disk space not used by video events if panel is a video server

DATA_SRQ_MASKGROUP_MASKLVL

long – current mask level of group - group indicated in deviceID

DATA_SRQ_MASKGROUP_ACTPTS

long – current number of active points in group

DATA_SRQ_AREA_OCCUPANCY

long – current occupancy count of the area

DATA_SRQ_AREA_OPEN_STATUS

BOOL – TRUE = Area Open, FALSE = area Closed

DATA_SRQ_FIRMWARE_DOWNLOAD

BOOL – TRUE = Firmware Download in progress, FALSE – Firmware download completed

DATA_SRQ_PANEL_DOWNLOAD

BOOL – TRUE = Panel Download in progress, FALSE – Panel download completed

DATA_SRQ_ALARM_OUTPUT_MODE

BOOL – TRUE = DISABLED, FALSE = ENABLED

DATA_SRQ_DEVICE_BMP_STATE

BITMAP (TRUE == BIT ON) bit 0 = Online; bit1 = powerfail active; bit2 = cabinet tamper active

DATA_SRQ_AUX_INPUT_BMP_STATE

BITMAP // First 4 (0-3) bits == line status / bit 4 indicates if input is masked

DATA_SRQ_ALARM_INPUT_BMP_STATE

BITMAP // First 4 (0-3) bits == line status / bit 4 indicates if input is masked

DATA_SRQ_RDR_BMP_STATE BITMAP // First 4 (0-3) bits == rdr mode / bit 4 rdr tamper, bit 5 held open; bit 6 forced open; 7 = forced mask; 8= held mask

DATA_SRQ_INTERCOM_BUSY_STATE

BOOL – TRUE = busy, FALSE = free

DATA_SRQ_INTERCOM_HANDSET_STATE

BOOL – TRUE = handset off, FALSE = handset on

DATA_SRQ_PANEL_MAX_ASSETS

long – max asset capacity of panel

Page 143: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 143

DATA_SRQ_PANEL_CUR_ASSETS

long – current # of assets in panel

DATA_SRQ_TRANSMITTER_SUPERVISION

BOOL – TRUE = Supervision, FALSE = Failed Supervision

DATA_SRQ_PANELTYPE_MISMATCH

long – Upper word (0-no panel type mismatch, 1- panel type mismatch), Lower word (panel type).

DATA_SRQ_RDR_CONTROL_FLAGS

long – control flags of the reader.

DATA_SRQ_ALT_RDR long – status of alternate reader. DATA_SRQ_PANEL_MAX_BIO1

long – max number of bio1 biometric templates.

DATA_SRQ_PANEL_CUR_BIO1 long – current number of bio1 biometric templates.

DATA_SRQ_PANEL_OPTIONS_MISMATCH

BOOL – TRUE = panel options mismatch, FALSE = Panel options match.

DATA_SRQ_PANEL_MAX_BIO2

long – max number of bio 2 biometric templates.

DATA_SRQ_PANEL_CUR_BIO2 long – current number of bio1 biometric templates.

DATA_SRQ_INTRUSION_PANEL_STATUS

long - bitmask for intrusion panel status

DATA_SRQ_INTRUSION_ZONE_ALARM_STATUS

long - intrusion zone alarm status (enumeration)

DATA_SRQ_INTRUSION_ZONE_OTHER_STATUS

long - bitmask for intrusion zone status

DATA_SRQ_INTRUSION_RELAY_STATUS

bool - 0:off, 1:on

DATA_SRQ_INTRUSION_DOOR_MODE

long - intrusion zone door mode (enumeration)

DATA_SRQ_INTRUSION_DOOR_OTHER_STATUS

long - bitmask for intrusion door status

DATA_SRQ_INTRUSION_AREA_ARMING_STATUS

long - intrusion area arming status (enumeration)

DATA_SRQ_INTRUSION_AREA_ALARM_STATUS

long - bitmask for intrusion area alarm status

DATA_SRQ_INTRUSION_AREA_OTHER_STATUS

long - bitmask for intrusion area status

DATA_SRQ_FIRMWARE_REV_STRING

char[] - firmware rev passed as a string

DATA_SRQ_DOOR_OPEN BOOL - TRUE = open, FALSE = closed DATA_SRQ_RDR_DOOR_MASKED

BOOL - TRUE = masked, FALSE = not masked

DATA_SRQ_PANEL_MAX_BIO3

long – the maximum number of Bioscrypt VFlex templates the panel can support.

DATA_SRQ_PANEL_CUR_BIO3 long – the current number of Bioscrypt

Page 144: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 144

VFlex templates in the panel.

DATA_ASSET Type Parameter Description __int64 sl_CardNumber Card number. BYTE [LNL_MAX_ASSET_SIZE]

sl_AssetID Asset ID.

long sl_EventType Event type of event associated with asset event.

long sl_EventID Event ID of event associated with asset event.

DATA_INTERCOM Type Parameter Description DWORD sl_IntercomData Additional intercom data

associated with the event. For intercom events where a call is placed this would contain the station number of the station called.

DWORD sl_LineNumber Line number of incoming call, 0 indicates not used.

DATA_VIDEOEVENT Type Parameter Description long Channel The physical channel the

camera is connected to that is creating the video event

SYSTEMTIME StartTime The start time of the video event SYSTEMTIME EndTime The end time of the video event

DATA_TRANSMITTER Type Parameter Description DWORD TransmitterID ID of the transmitter that

generated the event.

Page 145: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 145

DATA_WKSTN_CARD Type Parameter Description __int64 sl_CardNumber ID of the cardnumber. DWORD sl_WorkstationID ID of the workstation.

DATA_RECEIVER Type Parameter Description short ReceiverID ID of the receiver. short LineNum Line number on the receiver. short Area Area number for the event. short UserID UserID for the event. BYTE [10] EventCode Raw event code that was

returned.

DATA_AREAAPB Type Parameter Description long sl_AreaAPBID ID of the anti-passback area.

DATA_INTRUSION Type Parameter Description short Area Area number for the event (0

indicates no area). short UserID UserID for the event (0

indicates no userID).

EVENTDATA This union is used to store data specific to the status of the event that is being reported. The description of each union member is indicated in the preceding sections of this document. The data member in LNLMESSAGE sb_EventDataType controls which member will be used within the union. The valid values for sb_EventDataType are:

• EVENT_DATA_TYPE_CNA • EVENT_DATA_TYPE_FC • EVENT_DATA_TYPE_CA • EVENT_DATA_TYPE_STATUS • EVENT_IV_TYPE_CMD_RES • EVENT_IV_TYPE_CMD_REQ • EVENT_DATA_TYPE_STATUSREQUEST • EVENT_DATA_ASSET

Page 146: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 146

• EVENT_DATA_TYPE_INTERCOM • EVENT_DATA_TYPE_VIDEO • EVENT_DATA_TYPE_TRANSMITTER • EVENT_DATA_TYPE_WKSTN_CARD • EVENT_DATA_TYPE_RECEIVER • EVENT_DATA_TYPE_AREAAPB • EVENT_DATA_TYPE_INTRUSION

Each value reflects the structure that will be used for the su_EventData union. The data member within the LNLMESSAGE structure sb_MessageType also indicates the type of message data contained within the structure. This can either be a message for an event (0) or a message for status (1). This member is set to 0 for all messages EXCEPT for EVENT_DATA_TYPE_STATUSREQUEST data types where this value is set to 1.

Type Parameter Description DATA_CNA us_DataCNA Used for access attempts

where the card number is not available

DATA_STATUS_CHG us_DataStatusChg Used for device status change events

DATA_CA us_DataCA Used for access attempts where the card number is available

DATA_FC us_DataFC Used for access attempts where the facility code is not correct

DATA_CMDREQ us_DataCmdReq Used for reporting command requests issued via keypad at a reader

DATA_CMDRES us_DataCmdRes Used for reporting command request responses

DATA_STATUSREQUEST us_StatusRequest Used for reporting status changes and requests of field hardware operation

DATA_ASSET us_AssetData Used for reporting asset data DATA_INTERCOM us_IntercomData Used for reporting intercom

data DATA_VIDEOEVENT us_VideoData Used for reporting video data DATA_TRANSMITTER us_TransmitterData Used for reporting transmitter

data DATA_WKSTN_CARD us_WorkstationCardData Used for reporting workstation

card data. DATA_RECEIVER us_ReceiverData Used for reporting receiver

data.

Page 147: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 147

DATA_AREAAPB us_AreaAPBData Used for reporting area data. DATA_INTRUSION us_IntrusionData Used for reporting intrusion

data.

OLDLNLMESSAGE This structure is an old copy of the LNLMESSAGE for backwards compatibility purposes. This structure will not be documented in this documentation because it should really no longer be used. In addition the EVENTDATA union was modified so that a few of the structures were renamed because these structures needed to be updated for the LNLMESSAGE. This was done for backwards compatibility. The structures that were renamed are listed below: DATA_CNA renamed to OLDDATA_CNA DATA_CA renamed to OLDDATA_CA DATA_WKSTN_CARD renamed to OLDDATA_WKSTN_CARD DATA_CMDREQ renamed to OLDDATA_CMDREQ DATA_ASSET renamed to OLDDATA_ASSET The current LNLMESSAGE structure will be using the previous names, just the OLDLNLMESSAGE structure will be using these new names. These structures should no longer be used, the new methods using the LNLMESSAGE structure are what should be used.

Page 148: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 148

IDistributeEvent Error Codes Name Value Description

Page 149: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 149

IDistributeEvent2 Functions The IDistributeEvent2 is an extension to the IDistributeEvent interface.

List of functions:

• Lnl_StartReaderDownload2 • Lnl_GetLatestEventTimes • Lnl_DistributeLnlMessage2 • Lnl_GetNextSerialNumberRange • Lnl_DistributeOnityLockEvents • Lnl_SetRequiredDownloadFlag • Lnl_SetBadgePinCode • Lnl_BadgeUniqueIdToCardNumber • Lnl_ProcessElevatorPinCodeRequest

Page 150: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 150

Lnl_StartReaderDownload2 Purpose: Initiates reader download operation for specified readers.

Syntax: HRESULT Lnl_StartReaderDownload2 ( long nPanelID, long nReaderCount, long* pReaderIDs, BYTE* pDownloadArray );

Parameters:

Parameter Description nPanelID [in] The panel ID nReaderCount [in] Number of entries in pReadesIDs array pReaderIDs [in] IDs of readers pDownloadArray [in] Specifies what information to be

downloaded. The last item in the array must be DATABASE_DOWNLOAD_NONE

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Reader Database Download Commands:

Name Description DATABASE_DOWNLOAD_NONE Indicates that there are no more

commands as part of the reader download. DATABASE_DOWNLOAD_ACCESS_PANEL

Download access panel information. This includes information like cardholder parameters, number of timezones, number of holidays, amount of memory, etc.

DATABASE_DOWNLOAD_DOWNLOAD_RECORDS

Downloads the reader download formats.

DATABASE_DOWNLOAD_CARD_FORMATS

Download card format information.

DATABASE_DOWNLOAD_HOLIDAYS Download holiday information. DATABASE_DOWNLOAD_TIMEZONES

Download timezone information.

DATABASE_DOWNLOAD_ACCESS_L Download access levels.

Page 151: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 151

EVELS DATABASE_DOWNLOAD_CARDHOLDERS

Download cardholders for the readers that are specified in the reader array.

DATABASE_DOWNLOAD_READERS Download reader information for the readers that are specified in the reader array.

DATABASE_DOWNLOAD_READER_TIMEZONE_LIST

Download reader timezone list information for the readers that are specified in the reader array.

DATABASE_DOWNLOAD_READER_PANEL_PARAMETERS

Downloads the panel parameters associated with the readers that are being downloaded.

Page 152: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 152

Lnl_ GetLatestEventTimes Purpose: Send the latest events times

Syntax: HRESULT Lnl_GetLatestEventTimes ( long nPanelID, long* nCount, DEVICE_EVENT_TIME** pDeviceEventTimes );

Input Parameters:

Parameter Description nPanelID Panel ID nCount Number of events pDeviceEventTimes Events times

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 153: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 153

Lnl_DistributeLnlMessage2 Purpose: This method allows the Device Translators to send events and status messages back to the Lenel Communication Server so that they can be passed to applications like Alarm Monitoring and be stored in the database.

Syntax: HRESULT Lnl_DistributeLnlMessage2( LNLMESSAGE2* pMessage, BSTR bstrText );

Parameters:

Parameter Description pMessage [in] Structure that contains event information. bstrText [in] Text associated with the message or NULL

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 154: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 154

Lnl_GetNextSerialNumberRange Purpose: Retrieves the range of event serial numbers for a specified panel.

Syntax: HRESULT Lnl_ GetNextSerialNumberRange ( long nPanelID, long nCount, long* nNextSN );

Parameters:

Parameter Description nPanelID [in] The panel ID nCount [in] Number of serial numbers requested nNextSN [out] The first serial number

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 155: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 155

Lnl_DistributeOnityLockEvents Purpose: Onity lock related call.

Syntax: HRESULT Lnl_DistributeOnityLockEvents ( long nPanelType, BOOL bPriorityOne, LNLMESSAGE2* pMessages, long nCount );

Parameters:

Parameter Description nPanelType [in] The type of panel bPriorityOne [in] Specifies if the events to be sent are

priority one events; these are ILS wireless-specific events only.

pMessages [in] Array of structures containing event information.

nCount [in] Number of items in the 'pMessage' array.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 156: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 156

Lnl_SetRequiredDownloadFlag Purpose: Sets required download flag to a specified value for a given reader.

Syntax: HRESULT Lnl_ SetRequiredDownloadFlag ( long nPanelId, long nReaderId, BOOL bValue, BOOL* bPrevValue );

Parameters:

Parameter Description nPanelId [in] ID of a panel that a reader belongs to nReaderId [in] The reader ID bValue [in] The value of the required download flag bPrevValue [out] The previous value of the required

download flag

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 157: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 157

Lnl_SetBadgePinCode Purpose: Updates PIN code for a specified badge.

Syntax: HRESULT Lnl_ SetBadgePinCode ( __int64 nCardNumber, BSTR pin );

Parameters:

Parameter Description nCardNumber [in] Badge ID Pin [in] PIN code value

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 158: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 158

Lnl_BadgeUniqueIdToCardNumber Purpose: Resolves unique ID to card number (Badge ID) for a badge. Unique ID represents 4-byte values which is unique across a given database.

Syntax: HRESULT Lnl_BadgeUniqueIdToCardNumber ( long nUniqueId, __int64* pnCardNumbe );

Parameters:

Parameter Description nUniqueId [in] The badge unique ID pnCardNumbe [out] The badge card number

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 159: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 159

Lnl_ProcessElevatorPinCodeRequest Purpose: Handles PIN code entered by a user on the elevator terminal using to the following workflow:

• Resolve the entered PIN to credential (badge)

• Query IElevatorDispatching2 interface from the translator object defined by 'controller'

• Send credential data to the hardware using IElevatorDispatching2::Lnl_SendCredentialData()

Syntax: HRESULT Lnl_ProcessElevatorPinCodeRequest ( IUnknown* controller, long TerminalId, BSTR pin );

Parameters:

Parameter Description Controller [in] The device translator IUnknown TerminalId [in] The terminal ID Pin [in] PIN code entered by a user

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 160: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 160

IDistributeEvent2 Structures LNLMESSAGE2 The structure is similar to LNLMESSAGE. The difference is with the EVENTDATA2 union.

Type Parameter Description DWORD sl_Size Size of this structure. BYTE sb_MessageType Type of message data contained within

the structure. This can either be a message for an event (0) or a message for status (1). This member is set to 0 for all messages EXCEPT for EVENT_DATA_TYPE_STATUSREQUEST data types where this value is set to 1.

DWORD sl_SerialNumber Serial number of the Event. This is used to uniquely identify the event for a particular panel for logging to the database.

DWORD sl_Time Time of the event specified in UTC. short ss_AccessPanelID The panel that sent the message. short sb_DeviceID Device ID of the event, This is for a

device that is directly connected to the panel. For access control the id also indicates the type of the device (panel = 0, reader [1, 64], alarm panel [65, 81].)

short sb_InputDevID Input device ID, this is a device that is connected to a secondary device, one that is connected to the panel.

short sb_EventType Type of the event generated. short sb_EventID Unique ID for representing the event. DWORD sl_InitiatingEventID ID for the initiating event, used for

function list reporting events. BYTE sb_IV Function List ID which was triggered

by this event. BYTE sb_InputArg Input argument for the function list

(TRUE, FALSE, PULSE) BYTE sb_InternalLUN Logical unit number (internal driver

usage only). BYTE sb_InternalZoneID Triggering zone ID (internal driver

usage only). BYTE sb_InternalDeviceI

D Triggering device ID from Apollo (internal driver usage only).

Page 161: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 161

BYTE sb_EventDataType Type of the data associated with the event. This data will be located in the su_EventData field of this structure. The values for this field are: EVENT_DATA_TYPE_CNA, EVENT_DATA_TYPE_FC, EVENT_DATA_TYPE_CA, EVENT_DATA_TYPE_STATUS, EVENT_IV_TYPE_CMD_RES, EVENT_IV_TYPE_CMD_REQ, EVENT_DATA_TYPE_STATUSREQUEST, EVENT_DATA_ASSET, EVENT_DATA_TYPE_INTERCOM, EVENT_DATA_TYPE_VIDEO, EVENT_DATA_TYPE_TRANSMITTER, EVENT_DATA_TYPE_WKSTN_CARD, EVENT_DATA_TYPE_RECEIVER, etc. (see definitions of the possible types above). Each value reflects the structure that will be used for the su_EventData union. Refer to the lmsgtype.h header file for the actual definitions of these structures.

BYTE sb_EventParam Flag indicating if the event has an associated parameter value.

DWORD sl_EventParamValue

Associated parameter value.

DWORD sl_TransmitterID ID associated with the transmitter. DWORD sl_TransmitterInputI

D ID associated with the transmitter input.

BYTE sb_DeviceType Specifies the device sending the message - can be used to translate hwid's to deviceid's before sending to clients. If sb_DeviceID is a input channel from a camera then this value should be set to L_DEVICETYPE_CCTVCAMERA

BYTE sb_AssociatedText Flag indicating if there is associated text with the event.

DWORD sl_SegmentID Segment ID that the event is in. This is currently only used for system wide events that are not associated with any

Page 162: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 162

hardware. EVENTDATA2 su_EventData Union for various data types.

EVENTDATA2 This union is used to store data specific to the status of the event that is being reported. The description of each union member is indicated in the preceding sections of this document. The data member in LNLMESSAGE sb_EventDataType controls which member will be used within the union. The valid values for sb_EventDataType are:

• EVENT_DATA_TYPE_CNA • EVENT_DATA_TYPE_FC • EVENT_DATA_TYPE_CA • EVENT_DATA_TYPE_STATUS • EVENT_IV_TYPE_CMD_RES • EVENT_IV_TYPE_CMD_REQ • EVENT_DATA_TYPE_STATUSREQUEST • EVENT_DATA_ASSET • EVENT_DATA_TYPE_INTERCOM • EVENT_DATA_TYPE_VIDEO • EVENT_DATA_TYPE_TRANSMITTER • EVENT_DATA_TYPE_WKSTN_CARD • EVENT_DATA_TYPE_RECEIVER • EVENT_DATA_TYPE_AREAAPB • EVENT_DATA_TYPE_INTRUSION

Each value reflects the structure that will be used for the su_EventData union. The data member within the LNLMESSAGE2 structure sb_MessageType also indicates the type of message data contained within the structure. This can either be a message for an event (0) or a message for status (1). This member is set to 0 for all messages EXCEPT for EVENT_DATA_TYPE_STATUSREQUEST data types where this value is set to 1.

Type Parameter Description DATA_CNA us_DataCNA Used for access attempts

where the card number is not available

DATA_STATUS_CHG us_DataStatusChg Used for device status change events

DATA_CA us_DataCA Used for access attempts where the card number is available

DATA_FC us_DataFC Used for access attempts where the facility code is not correct

DATA_CMDREQ us_DataCmdReq Used for reporting

Page 163: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 163

command requests issued via keypad at a reader

DATA_CMDRES us_DataCmdRes Used for reporting command request responses

DATA_STATUSREQUEST2 us_StatusRequest Used for reporting status changes and requests of field hardware operation

DATA_ASSET us_AssetData Used for reporting asset data

DATA_INTERCOM us_IntercomData Used for reporting intercom data

DATA_VIDEOEVENT us_VideoData Used for reporting video data

DATA_TRANSMITTER us_TransmitterData Used for reporting transmitter data

DATA_WKSTN_CARD us_WorkstationCardData Used for reporting workstation card data.

DATA_RECEIVER us_ReceiverData Used for reporting receiver data.

DATA_AREAAPB us_AreaAPBData Used for reporting area data.

DATA_INTRUSION2 us_IntrusionData Used for reporting intrusion data.

DATA_USERCMD us_UserCmdData Used for reporting user command.

DATA_ALARMMASKGROUP us_AlarmMaskGroupData Use for reporting mask group.

DATA_EVENT_ROUTING us_EventRoutingData This is the structure used for routing events from one monitoring station to another.

DATA_STATUSREQUEST2 This data structure indicates status changes, as well as field hardware devices and their operation. Events of this type are NOT recorded to the database and they are not displayed as events in alarm monitoring. This message type is only for updating the current status of the system hardware tree in alarm monitoring.

Type Parameter Description DWORD sl_StatusType Type of status being reported. __int64 sl_Status Actual status of type being

reported. char sc_String[64] Additional information for

Page 164: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 164

status being reported.

DATA_INTRUSION2 Type Parameter Description short Area Area number for the event (0

indicates no area). short UserID UserID for the event (0

indicates no userID). __int64 sl_UserCardNumber User card number for the event

(0 indicates no user card number)

DATA_USERCMD Type Parameter Description __int64 sl_CardNumber Badge id DWORD sl_AlarmMaskGroup Mask group

DATA_ALARMMASKGROUP Type Parameter Description DWORD sl_AlarmMaskGroup Mask group

DATA_EVENT_ROUTING

Type Parameter Description DWORD sl_SourceWorkstation Indicates the source monitoring

station to which the event was previously sent.

DEVICE_EVENT_TIME Type Parameter Description long nPanelId Panel id long nDeviceId Device id

Page 165: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 165

IDistributeEvent2 Error Codes Name Value Description

Page 166: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 166

IOutput Functions Description of the IOutput interface.

List of functions

• Lnl_SetAlarmOutputTZ • Lnl_SetAlarmOutputCfg • Lnl_SetAlarmOutputMode • Lnl_SetAlarmOutputLinkage • Lnl_GetAlarmOutputStatus

IOutput Revision History Date Author Notes 03/27/2003 M. Serafin • Added the revision history.

Page 167: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 167

Lnl_SetAlarmOutputTZ Purpose: Sets timezone in which the output is to be activated.

Syntax: HRESULT Lnl_SetAlarmOutputTZ ( ALARM_OUTPUT_MSG *prs_API, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_API Structure containing the alarm output

information. vb_Wait Indicates whether function should wait for

a return response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 168: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 168

Lnl_SetAlarmOutputCfg Purpose: Configures alarm outputs.

Syntax: HRESULT Lnl_SetAlarmOutputCfg ( ALARM_OUTPUT_MSG *prs_API, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_API Structure containing the alarm output

information. vb_Wait Indicates whether function should wait for

a return response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 169: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 169

Lnl_SetAlarmOutputMode Purpose: Sets the output mode for alarm outputs.

Syntax: HRESULT Lnl_SetAlarmOutputMode ( ALARM_OUTPUT_MSG *prs_API, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_API Structure containing the alarm output

information. vb_Wait Indicates whether function should wait for

a return response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 170: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 170

Lnl_SetAlarmOutputLinkage Purpose: Set Alarm Output linkage.

Syntax: HRESULT Lnl_SetAlarmOutputLinkage ( ALARM_OUTPUT_MSG *prs_API, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_API Structure containing alarm output

information. vb_Wait Indicates whether function should wait for

a return response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 171: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 171

Lnl_GetAlarmOutputStatus Purpose: Gets the alarm output status.

Syntax: HRESULT Lnl_GetAlarmOutputStatus ( ALARMPANEL_STATUS *prs_API );

Output Parameters:

Parameter Description prs_API Structure containing alarm output status.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 172: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 172

IOutput Structures ALARM_OUTPUT Structure used as part of the ALARM_OUTPUT_MSG.

Type Parameter Description long ss_PulseDuration 100 ms units for duration of pulse. FLAG sb_OfflineLocalLink Set to local linkage during

communication loss. FLAG sb_CommLoss Activate when host communication

loss. FLAG sb_AnyInput Activate when fault on any alarm

input. FLAG sb_Cabinet Activate during any cabinet tamper. FLAG sb_PowerFault Activate during power fault. FLAG [16] sb_Inputs Used when linking outputs to inputs

(local linkage). long sb_Timezone Timezone to activate output. Use

DecodeSegmentValue to convert this value into the proper value based on segment.

BYTE sb_OperationMode Operation Mode (OUTPUT_LINKAGE_OFF = 0x00, OUTPUT_LINKAGE_ON = 0x01, OUTPUT_LINKAGE_LOCAL = 0x02, OUTPUT_LINKAGE_PULSE = 0x03, OUTPUT_LINKAGE_IGNORE = 0xff).

FLAG sb_Input1 N/A (Used by Linx) FLAG sb_Input2 N/A (Used by Linx) BYTE sb_Online Used to determine if the output is

used. long sb_TransOperation Transaction Type

(LNL_TRANS_OPERATION_NOP, LNL_TRANS_OPERATION_ADD, LNL_TRANS_OPERATION_CHG, LNL_TRANS_OPERATION_DEL)

ALARM_OUTPUT_MSG Structure that contains information about alarm outputs for an alarm output panel.

Page 173: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 173

Type Parameter Description long si_PanelID Panel ID. BYTE sb_PanelNumber Alarm Panel number ( 65 - 81 ). ALARM_OUTPUT [16]

ss_Outputs Array containing the output information.

long sl_LINXAddr N/A BYTE sb_Operation N/A BYTE sb_CtrlType Type of controller.

ALARMINPUT_STATUS This structure is also used to return alarm output status.

Type Parameter Description BYTE [17] sb_Devices Entry 1-16 indicate the status of

each alarm input, entry 0 is not used (0-Inactive, 1-Active).

BYTE [17] sb_DeviceMaskStatus Entry 1-16 indicate the mask status of each alarm input, entry 0 is not used (0-Unmasked, 1-Masked).

ALARMPANEL_STATUS Structure used to return status about alarm outputs for an alarm panel.

Type Parameter Description long si_PanelID PanelID. BYTE sb_AsyncStatus Indicates if the status is returned

Asynchronously or Synchronously (0-Synchronously, 1-Asynchronously).

ALARMINPUT_STATUS [16]

ss_AlarmInputs Array of input status for the alarm panels connected to this panel. Entries 0-15 are for the alarm panels where index 0 is for device ID 65 which is the first alarm panel.

Page 174: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 174

IOutput Error Codes Name Value Description

Page 175: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012

IInput Functions The IInput interface is used for alarm panel inputs.

List of functions

• Lnl_SetAlarmInputCfg • Lnl_SetAlarmInputTZ • Lnl_SetAlarmInputMask • Lnl_SetZoneGroupDef • Lnl_GetAlarmMaskGroupStatus • Lnl_GetAlarmInputStatus • Lnl_SetAlarmInputEntryDelay • Lnl_SetAlarmMaskGroupMaskLevel

IInput Revision History Date Author Notes 03/27/2003 M. Serafin • Added the revision history.

Page 176: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2002-2010 Lenel Systems International, Inc. 6 August 2012 176

Lnl_SetAlarmInputCfg Purpose: Configures an alarm input.

Syntax: HRESULT Lnl_SetAlarmInputCfg ( ALARM_INPUT_MSG *prs_API, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_API Structure containing the alarm input

information. vb_Wait Indicates whether function should wait for

a return response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 177: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2002-2010 Lenel Systems International, Inc. 6 August 2012 177

Lnl_SetAlarmInputTZ Purpose: Sets the alarm input mask timezone.

Syntax: HRESULT Lnl_SetAlarmInputTZ ( ALARM_INPUT_MSG *prs_API, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_API Structure containing the alarm input

information. vb_Wait Indicates whether function should wait for

a return response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 178: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2002-2010 Lenel Systems International, Inc. 6 August 2012 178

Lnl_SetAlarmInputMask Purpose: Set the alarm input mask.

Syntax: HRESULT Lnl_SetAlarmInputMask ( ALARM_INPUT_MSG *prs_API, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_API Structure containing the alarm input

information. vb_Wait Indicates whether function should wait for

a return response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 179: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2002-2010 Lenel Systems International, Inc. 6 August 2012 179

Lnl_SetZoneGroupDef Purpose: Set the alarm mask group definition.

Syntax: HRESULT Lnl_SetZoneGroupDef ( ZONE_GROUP_CFGMSG *prs_List, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_List Structure containing the alarm mask group

information. vb_Wait Indicates whether function should wait for

a return response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 180: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2002-2010 Lenel Systems International, Inc. 6 August 2012 180

Lnl_GetAlarmMaskGroupStatus Purpose: Get the status for an alarm mask group.

Syntax: HRESULT Lnl_GetAlarmMaskGroupStatus ( ALARMZONE_MASK_STATUSRPT *prs_List, BOOL vb_Wait );

Input Parameters:

Parameter Description vb_Wait Indicates whether function should wait for

a return response.

Output Parameters:

Parameter Description prs_List Status information for the alarm mask

group.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 181: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2002-2010 Lenel Systems International, Inc. 6 August 2012 181

Lnl_GetAlarmInputStatus Purpose: Obtains the alarm input status.

Syntax: HRESULT Lnl_GetAlarmInputStatus ( ALARMPANEL_STATUS *pro_Status );

Output Parameters:

Parameter Description pro_Status Structure that returns the Alarm Input

status.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 182: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2002-2010 Lenel Systems International, Inc. 6 August 2012 182

Lnl_SetAlarmInputEntryDelay Purpose: Set alarm input entry delay.

Syntax: HRESULT Lnl_SetAlarmInputEntryDelay ( ALARM_INPUT_MSG *prs_API, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_API Structure containing the alarm input

information. vb_Wait Indicates whether function should wait for

a return response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 183: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2002-2010 Lenel Systems International, Inc. 6 August 2012 183

Lnl_SetAlarmMaskGroupMaskLevel Purpose: Set alarm mask group mask level.

Syntax: HRESULT Lnl_SetAlarmMaskGroupMaskLevel ( long vl_MaskGroupID, long vl_MaskLevel );

Input Parameters:

Parameter Description vl_MaskGroupID Mask group ID. vl_MaskLevel Mask level.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 184: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2002-2010 Lenel Systems International, Inc. 6 August 2012 184

IInput Structures ALARM_INPUT

Type Parameter Description BYTE sb_DIADssAddress Contains a DSS Address

from 0 – 31. long sb_MaskTimezone Masks the alarm input

during timezone. Use DecodeSegmentValue to convert this value into the proper value based on segment.

FLAG sb_DIATamperNormallyOpen for DIA's only, is the tamper contact normally open

FLAG sb_Configure configure or unconfigure the zone

FLAG sb_MaskInput Masks the alarm input. long sb_LogTZ Timezone to log events to

database. FLAG sb_LatchMode Indicates latch mode

operation for entry delay. long sl_EntryDelay Entry delay for alarm

reporting. long sl_ExitDelay Exit delay for alarm

reporting. long sb_Supervision EOL Table (covers

supervision and no/nc). long sb_TransOperation Transaction type: add /

change / delete. long sl_HoldTime Hold time (in seconds). long sl_Debounce Debounce value (Lenel

enumeration). ALARM_INPUT_MSG

Type Parameter Description long si_PanelID Panel ID. BYTE sb_PanelNumber Alarm Panel number (65 - 81). ALARM_INPUT [16]

ss_Inputs Array of inputs.

long sl_LINXAddr N/A BYTE sb_Operation N/A BYTE sb_CtrlType what type of controller is this ..

see defines listed above

Page 185: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2002-2010 Lenel Systems International, Inc. 6 August 2012 185

ZONE_DEF Used inside of the ZONE_GROUP_CFGMSG structure used for configuring Alarm Mask Groups.

Type Parameter Description int si_DeviceID Device ID. int si_ZoneID ZONE_CABINET_TAMPER =

0x80, ZONE_POWER_FAILURE= 0x81, ZONE_COMM_LOSS = 0x83, ZONE_RDR_TAMPER = 0x84, ZONE_RDR_FORCED_OPEN = 0x85, ZONE_RDR_HELD_OPEN = 0x86, ZONE_RDR_AUX_INPUT = 0x87, ZONE_RDR_DIDDLE_ALERT = 0x88, ZONE_RDR_DOOR_CONTACT = 0x89, ZONE_RDR_CARD_ACCESS = 0x8a, ZONE_RDR_AUX_INPUT2 = 0x8b, ZONE_HOST_COMM_LOSS = 0x8c, ZONE_RDR_AUX_INPUT3 = 0x8d

ZONE_GROUP_CFGMSG Type Parameter Description long si_PanelID Panel ID. long sl_GroupID Group ID. long sl_NumZones Number of zones in the group. long sl_MaskLevel Mask Level long sl_SetMaskLevel Indicates if the mask level is to

be set. ZONE_DEF [200] ss_ZoneDef Array of the various zone

definitions for this group.

Page 186: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2002-2010 Lenel Systems International, Inc. 6 August 2012 186

ALARMZONE_MASK_STATUSRPT Used for reporting the mask level of all alarm zones in the system.

Type Parameter Description long si_PanelID Panel ID. BYTE sb_AsyncStatus Indicates if the status is returned

Asynchronously or Synchronously (0-Synchronously, 1-Asynchronously).

BYTE [64] sb_MaskLevel Mask level.

ALARMINPUT_STATUS Type Parameter Description BYTE [17] sb_Devices Entry 1-16 indicate the status of

each alarm input, entry 0 is not used (0-Inactive, 1-Active).

BYTE [17] sb_DeviceMaskStatus Entry 1-16 indicate the mask status of each alarm input, entry 0 is not used (0-Unmasked, 1-Masked).

ALARMPANEL_STATUS Type Parameter Description long si_PanelID PanelID. BYTE sb_AsyncStatus Indicates if the status is returned

Asynchronously or Synchronously (0-Synchronously, 1-Asynchronously).

ALARMINPUT_STATUS [16]

ss_AlarmInputs Array of input status for the alarm panels connected to this panel. Entries 0-15 are for the alarm panels where index 0 is for device ID 65 which is the first alarm panel.

Page 187: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2002-2010 Lenel Systems International, Inc. 6 August 2012 187

IInput Error Codes Name Value Description

Page 188: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012

IInput2 Functions The IInput2 interface is used for alarm panel inputs. The interface includes extended versions for some of the IInput interface methods.

List of functions

• Lnl_SetAlarmInputCfg2 • Lnl_SetAlarmInputTZ2 • Lnl_SetAlarmInputMask2 • Lnl_SetAlarmInputEntryDelay2 • Lnl_GetAlarmInputStatus2

Page 189: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012

Lnl_SetAlarmInputCfg2 Purpose: Configures an alarm input.

Syntax: HRESULT Lnl_SetAlarmInputCfg2 ( ALARM_INPUT_MSG2 *prs_API, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_API Structure containing the alarm input

information. vb_Wait Indicates whether the function should wait

for a return response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 190: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012

Lnl_SetAlarmInputTZ2 Purpose: Sets the alarm input mask timezone.

Syntax: HRESULT Lnl_SetAlarmInputTZ2 ( ALARM_INPUT_MSG2 *prs_API, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_API Structure containing the alarm input

information. vb_Wait Indicates whether the function should wait

for a return response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 191: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012

Lnl_SetAlarmInputMask2 Purpose: Set the alarm input mask.

Syntax: HRESULT Lnl_SetAlarmInputMask2 ( ALARM_INPUT_MSG2 *prs_API, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_API Structure containing the alarm input

information. vb_Wait Indicates whether the function should wait

for a return response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 192: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012

Lnl_SetAlarmInputEntryDelay2 Purpose: Set alarm input entry delay.

Syntax: HRESULT Lnl_SetAlarmInputEntryDelay2 ( ALARM_INPUT_MSG2 *prs_API, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_API Structure containing the alarm input

information. vb_Wait Indicates whether the function should wait

for a return response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 193: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012

Lnl_GetAlarmInputStatus2 Purpose: Obtains the alarm input status.

Syntax: HRESULT Lnl_GetAlarmInputStatus2 ( ALARMPANEL_STATUS2 *pro_Status );

Input Parameters:

Parameter Description pro_Status Structure that returns the Alarm Input

status.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 194: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012

IInput2 Structures ALARM_INPUT2

Type Parameter Description BYTE sb_DIADssAddress Contains a DSS Address

from 0 – 31. long sb_MaskTimezone Masks the alarm input

during timezone. Use DecodeSegmentValue to convert this value into the proper value based on segment.

FLAG sb_DIATamperNormallyOpen for DIA's only, is the tamper contact normally open

FLAG sb_Configure configure or unconfigure the zone

FLAG sb_MaskInput Masks the alarm input. long sb_LogTZ Timezone to log events to

database. FLAG sb_LatchMode Indicates latch mode

operation for entry delay. long sl_EntryDelay Entry delay for alarm

reporting. long sl_ExitDelay Exit delay for alarm

reporting. long sb_Supervision EOL Table (covers

supervision and no/nc). long sb_TransOperation Transaction type: add /

change / delete. long sl_HoldTime Hold time (in seconds). long sl_Debounce Debounce value (Lenel

enumeration). wchar_t [ 32 ] inputName The input name in

OnGuard.

ALARM_INPUT_MSG2 Type Parameter Description long si_PanelID Panel ID. BYTE sb_PanelNumber Alarm Panel number (65 - 81). ALARM_INPUT2 [16]

ss_Inputs Array of inputs.

Page 195: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012

long sl_LINXAddr N/A BYTE sb_Operation N/A BYTE sb_CtrlType The type of controller. Refer to

the definitions listed above.

ALARMPANEL_STATUS2 Type Parameter Description long si_PanelID Panel ID. BYTE sb_AsyncStatus Indicates if the status is returned

Asynchronously or Synchronously (0- Synchronously 1- Asynchronously).

ALARMPANEL_STATUS [32]

ss_AlarmInputs Input status array for the alarm panels connected to this panel. Entries 0-31 are for the alarm panels where index 0 is for device ID 65 which is the first alarm panel.

Page 196: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012

IInput2 Error Codes Name Value Description

Page 197: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 197

IAccessControl Functions The IAccessControl Interface is the main interface used by Device Translators that implement Access Control functions.

List of functions:

• Lnl_SetDownloadableReader • Lnl_BulkAddBadge • Lnl_DeleteBadge • Lnl_AddBadge • Lnl_SetCardFormat • Lnl_SetReaderModeControl • Lnl_SetReaderOutputControl • Lnl_SetReaderTimezoneList • Lnl_GetReaderStatus • Lnl_ResetAPBForAllCardholders • Lnl_SetReaderAlarmMask • Lnl_SetReaderDefinition • Lnl_AddAccessLevels • Lnl_AddDownloadAccessLevels • Lnl_DeleteAccessLevel • Lnl_AddElevatorAccessLevel • Lnl_AddElevatorAccessLevelPerTZ • Lnl_SetAreaAPBTable • Lnl_ManualOpenDoor • Lnl_SetAreaAPB • Lnl_AddCommandAccessLevel • Lnl_DeleteCommandAccessLevel • Lnl_DeleteDownloadAccessLevel • Lnl_DeleteReaderDefinition • Lnl_SetControllerReaderDef • Lnl_SetControllerAlarmDef • Lnl_ResetCardholderUseLimits • Lnl_SetCardRecCfg • Lnl_SetCardholderConfiguration • Lnl_SetCardExType • Lnl_GetCardExType • Lnl_ActivateElevatorOutput • Lnl_AddHolidays • Lnl_AddTimezone • Lnl_DeleteTimezone • Lnl_GetAreaStatus • Lnl_ExecuteIV

Page 198: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 198

• Lnl_SetFunctionList • Lnl_SetZoneToIVLinks • Lnl_SetInterPanelLinks • Lnl_ActivateTimezone • Lnl_GrantOneFreePass • Lnl_SetUseTwoWireRS485 • Lnl_GetUseTwoWireRS485 • Lnl_DownloadReaderFirmware • Lnl_ReaderDownload • Lnl_HostAccessResponse

IAccessControl Revision History Date Author Notes 03/27/2003 M. Serafin • Added the revision history.

Page 199: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 199

Lnl_SetDownloadableReader Purpose: Sends a downloadable reader format to the hardware.

Syntax: HRESULT Lnl_SetDownloadableReader ( READER_DWNSPEC *prs_RM, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_RM Structure containing the downloadable

reader information. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 200: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 200

Lnl_BulkAddBadge Purpose: Adds multiple badges to a panel or device.

Syntax: HRESULT Lnl_BulkAddBadge ( BULKBADGE *prs_Badge, BOOL vb_CheckForDup, BOOL vb_WaitForRsp );

Input Parameters:

Parameter Description prs_Badge Structure which contains the badges to add. vb_CheckForDup Flag that indicates whether to check for

duplicates. vb_WaitForRsp Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 201: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 201

Lnl_DeleteBadge Purpose: Deletes a badge from the panel or device.

Syntax: HRESULT Lnl_DeleteBadge ( long vl_CardNumber, BOOL vb_WaitForRsp );

Input Parameters:

Parameter Description vl_CardNumber ID of badge to delete. vb_WaitForRsp Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 202: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 202

Lnl_AddBadge Purpose: Adds a badge to a panel or device.

Syntax: HRESULT Lnl_AddBadge ( BADGE *prs_Badge, BOOL vb_CheckForDup, BOOL vb_WaitForRsp );

Input Parameters:

Parameter Description prs_Badge Structure containing the badge information. vb_CheckForDup Flag that indicates whether to check for a

duplicate. vb_ WaitForRsp Flag that indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 203: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 203

Lnl_SetCardFormat Purpose: Sets a card format in the panel.

Syntax: HRESULT Lnl_SetCardFormat ( CARD_FORMAT_CFG *prs_CardCfg, BOOL vb_WaitForRsp );

Input Parameters:

Parameter Description prs_CardCfg Structure that contains information about

the card format. vb_WaitForRsp Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 204: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 204

Lnl_SetReaderModeControl Purpose: Sets the mode of a particular reader. Typical modes are Locked, Card Only, Pin or Card, Pin and Card, Unlocked, Facility Code Only, and Cypher Lock.

Syntax: HRESULT Lnl_SetReaderModeControl ( READER_MODE *prs_RM, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_RM Structure containing the reader mode

information. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 205: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 205

Lnl_SetReaderOutputControl Purpose: Sets the control mode of the two possible outputs for a reader. Possible modes are Off, On, Pulse, and Ignore.

Syntax: HRESULT Lnl_SetReaderOutputControl ( READER_OUTPUT_CTRL *prs_RM, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_RM Structure containing the reader output

information. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 206: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 206

Lnl_SetReaderTimezoneList Purpose: Sets the reader timezone list for a particular reader. For each timezone in the list the reader access mode at the start and end of the timezone is specified.

Syntax: HRESULT Lnl_SetReaderTimezoneList ( READER_TZLIST *prs_List, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_List <NEED TO FILL IN> vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 207: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 207

Lnl_GetReaderStatus Purpose: Returns status about the readers connected to a panel.

Syntax: HRESULT Lnl_GetReaderStatus ( READER_STATUS *pro_Status );

Output Parameters:

Parameter Description pro_Status Structure containing the reader status.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 208: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 208

Lnl_ResetAPBForAllCardholders Purpose: Resets Anti-Passback for all cardholders.

Syntax: HRESULT Lnl_ResetAPBForAllCardholders ( long vb_TimeZone, BOOL vb_WaitForRsp );

Input Parameters:

Parameter Description vb_TimeZone Indicates the timezone to be used to reset

APB for all the cardholders, the reset takes place at the beginning of the timezone (If the second byte of this long is set, this indicates to reset APB for cardholders immediately).

vb_WaitForRsp Flag which indicates whether to wait for a response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 209: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 209

Lnl_SetReaderAlarmMask Purpose: Sets the alarm masks for a particular reader. This always certain events like forced opens and held opens to always be masked.

Syntax: HRESULT Lnl_SetReaderAlarmMask ( READER_ALARM_MASK *prs_RM, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_RM Structure that contains the reader alarm

mask information. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 210: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 210

Lnl_SetReaderDefinition Purpose: Sets a reader configuration in the panel. The method Lnl_SetControllerReaderDef is called before this method to inform the hardware of a downstream device.

Syntax: HRESULT Lnl_SetReaderDefinition ( READERDEF *prs_RDR, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_RDR Structure containing the reader

configuration settings. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 211: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 211

Lnl_AddAccessLevels Purpose: Adds access levels to panels.

Syntax: HRESULT Lnl_AddAccessLevels ( ACCESS_LEVEL *prs_AC, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_AC Structure containing access level

information. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 212: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 212

Lnl_AddDownloadAccessLevels Purpose: Adds access levels to intelligent readers.

Syntax: HRESULT Lnl_AddDownloadAccessLevels ( DWN_ACCESS_LEVEL *prs_AC, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_AC Structure used for downloading access

levels to intelligent readers. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 213: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 213

Lnl_DeleteAccessLevel Purpose: Delete an access level from a panel or device.

Syntax: HRESULT Lnl_DeleteAccessLevel ( long vb_AccessLevel, BOOL vb_Wait );

Input Parameters:

Parameter Description vb_AccessLevel ID of access level to delete. Use

DecodeSegmentValue to convert this value into the proper value based on segment.

vb_Wait Flag which indicates whether to wait for a response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 214: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 214

Lnl_AddElevatorAccessLevel Purpose: Adds an elevator access level to the hardware (floors can have different timezones).

Syntax: HRESULT Lnl_AddElevatorAccessLevel ( ELEVATOR_ACCLEVEL *prs_Cmd, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_Cmd Structure containing the elevator access

level. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 215: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 215

Lnl_AddElevatorAccessLevelPerTZ Purpose: Adds an elevator access level to the hardware (floors all use the same timezone).

Syntax: HRESULT Lnl_AddElevatorAccessLevelPerTZ ( ELEVATOR_ACCLEVEL_PERTZ *prs_Cmd, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_Cmd vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 216: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 216

Lnl_SetAreaAPBTable Purpose: Used to download all the APB information all at once. This was something that was used in the past and currently is not being used but anymore but the logic is all in place if needed.

Syntax: HRESULT Lnl_SetAreaAPBTable ( AREA_APB_CFGMSG *prs_Area, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_Area Structure containing the Area APB

information. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 217: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 217

Lnl_ManualOpenDoor Purpose: Sends a command to the Device Translator to open a door connected to the specified reader.

Syntax: HRESULT Lnl_ManualOpenDoor ( int vi_ReaderID );

Input Parameters:

Parameter Description vi_ReaderID Reader ID the door is connected to.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 218: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 218

Lnl_SetAreaAPB Purpose: Sets an anti-passback area in the panel.

Syntax: HRESULT Lnl_SetAreaAPB ( AREAAPB *prs_Area, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_Area Structure containing anti-passback area

information. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 219: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 219

Lnl_AddCommandAccessLevel Purpose: Add a command access level to an intelligent reader. This allows users with the proper access levels to issue commands at this reader.

Syntax: HRESULT Lnl_AddCommandAccessLevel ( CMD_ACCESS_LEVEL *prs_Cmd, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_Cmd Structure that contains the command access

level information. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 220: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 220

Lnl_DeleteCommandAccessLevel Purpose: Delete a command access level from intelligent readers.

Syntax: HRESULT Lnl_DeleteCommandAccessLevel ( long vb_AccessLevel, BOOL vb_Wait );

Input Parameters:

Parameter Description vb_AccessLevel Access Level to delete. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 221: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 221

Lnl_DeleteDownloadAccessLevel Purpose: Deletes access levels from intelligent readers.

Syntax: HRESULT Lnl_DeleteDownloadAccessLevel ( long vb_AccessLevel, BOOL vb_Wait );

Input Parameters:

Parameter Description vb_AccessLevel Access level to delete from intelligent

reader. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 222: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 222

Lnl_DeleteReaderDefinition Purpose: Deletes a reader definition from a panel.

Syntax: HRESULT Lnl_DeleteReaderDefinition ( BYTE vb_Reader, BOOL vb_Wait );

Input Parameters:

Parameter Description vb_Reader ID of reader to delete. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 223: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 223

Lnl_SetControllerReaderDef Purpose: Sets a reader definition in the hardware. This is called just before the Lnl_SetReaderDef method is called. This is basically used to tell the panel that there is a downstream device and the Lnl_SetReaderDef method is used to configure the reader.

Syntax: HRESULT Lnl_SetControllerReaderDef ( READERDEF *prs_RDR, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_RDR Structure containing the reader

information. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 224: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 224

Lnl_SetControllerAlarmDef Purpose: Configures an Alarm Panel (Input, Output) to the main panel.

Syntax: HRESULT Lnl_SetControllerAlarmDef ( ALARM_PANEL *prs_AP, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_AP Structure containing the Alarm Panel

information. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 225: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 225

Lnl_ResetCardholderUseLimits Purpose: Reset the use limits for a particular cardholder on a panel.

Syntax: HRESULT Lnl_ResetCardholderUseLimits ( RESET_CARDHOLDER_USELIMITS *prs_Badge, BOOL vb_WaitForRsp );

Input Parameters:

Parameter Description prs_Badge Structure containing information for

resetting the use limits for a cardholder. vb_WaitForRsp Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 226: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 226

Lnl_SetCardholderConfiguration Purpose: This method is used to update certain fields of the member variable (m_CardRecCfg) of the base Device Translator template.

Syntax: HRESULT Lnl_SetCardholderConfiguration ( CARD_REC_CFG *prs_CardRecFmt, BOOL vb_WaitForRsp );

Input Parameters:

Parameter Description prs_CardRecFmt Structure that contains cardholder

information configuration information. vb_WaitForRsp Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 227: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 227

Lnl_SetCardRecCfg Purpose: Set parameters for the cardholder configuration. This method copies the information passed in to a CARD_REC_CFG member variable (m_CardRecCfg) of the base Device Translator Template. The purpose of this method is to define the layout of the cardholder database to be able to calculate the amount of memory.

Syntax: HRESULT Lnl_SetCardRecCfg ( CARD_REC_CFG *prs_Cfg );

Input Parameters:

Parameter Description prs_Cfg Structure that contains cardholder

information configuration information.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 228: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 228

Lnl_SetCardExType Purpose: Sets the record extension type used by the panel (additional options).

Syntax: HRESULT Lnl_SetCardExType ( int vi_Value );

Input Parameters:

Parameter Description vi_Value These are the valid settings that can be

used: None = 0 (None) REC_EXT_SIXACCLEVELS = 1 (six additional access levels) REC_EXT_SIXACC_RDREXCL = 2 (six levels plus 8 byte reader exclusion list) REC_EXT_SIXACC_2ISSUECD = 5 (six levels plus 2 digit issue code) REC_EXT_SIXACC_RDRLIST = 8 (six levels plus custom 64 reader pick list, Reader Inclusion) REC_EXT_SIXACC_TIMEDAPB = 10 (six levels plus timed APB) REC_EXT_SIXACC_TIMEDAPB_2IS = 11 (Six levels plus timed APB plus 2 digit issue code)

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 229: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 229

Lnl_GetCardExType Purpose: Determines the record extension type being used by the panel.

Syntax: HRESULT Lnl_GetCardExType ( int *Value );

Output Parameters:

Parameter Description Value Value that is being used (See

Lnl_SetCardExType for possible values).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 230: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 230

Lnl_AddHolidays Purpose: Adds holidays to the panel or device.

Syntax: HRESULT Lnl_AddHolidays ( HOLIDAYMSG *prs_Holiday, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_Holiday Structure containing the holiday

information. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 231: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 231

Lnl_AddTimezone Purpose: Adds Timezones to the panel or device.

Syntax: HRESULT Lnl_AddTimezone ( TIMEZONE *prs_TZ, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_TZ Structure containing information about the

timezone. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 232: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 232

Lnl_DeleteTimezone Purpose: Delete a timezone from the panel or device.

Syntax: HRESULT Lnl_DeleteTimezone ( long vb_Timezone, BOOL vb_Wait );

Input Parameters:

Parameter Description vb_Timezone Timezone to delete. Use

DecodeSegmentValue to convert this value into the proper value based on segment.

vb_Wait Flag which indicates whether to wait for a response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 233: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 233

Lnl_GetAreaStatus Purpose: Returns the status information for the areas.

Syntax: HRESULT Lnl_GetAreaStatus ( AREA_STATUSRPT *prs_List, BOOL vb_Wait );

Input Parameters:

Parameter Description vb_Wait Flag which indicates whether to wait for a

response.

Output Parameters:

Parameter Description prs_List Structure containing the area status

information.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 234: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 234

Lnl_ExecuteIV Purpose: A command which executes a FunctionList. A Function list is a series of action can be executed in sequential fashion. An example of an action which can be placed in a function list is “activating a relay output”. The function list to execute is indicated inside of the EXECUTE_IV_MSG structure.

Syntax: HRESULT Lnl_ExecuteIV ( EXECUTE_IV_MSG *prs_List, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_List Structure for defining the function list to

execute and the argument to use for the invocation of the function list.

vb_Wait Flag which indicates whether to wait for a response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 235: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 235

Lnl_SetFunctionList Purpose: A command which defines a Function List. A Function list is a series of action can be executed in sequential fashion. An example of an action which can be placed in a function list is “activating a relay output”.

Syntax: HRESULT Lnl_SetFunctionList ( IV_FUNCTION_LIST *prs_List, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_List Structure for configuring the function list. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 236: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 236

Lnl_SetZoneToIVLinks Purpose: A command that links a function list to specific events that can occur inside of an access panel. A Function list is a series of actions that can be executed in sequential fashion. An example of an action which can be placed in a function list is “activating a relay output”. A series of “zones” can be defined which enable the function list to be executed whenever an action occurs on the zone. An example of a zone is a “Door Forced Open”. Using this example, a function list can be assigned to the activation of the Door Forced Open event. Like wise the same function list or another function list can be assigned to the deactivation of the Door Forced Open Event. You can also setup whether the function list is to be invoked using the arguments TRUE, FALSE or PULSE. Each of these arguments will cause the function list to be invoked in a different manner. For example, a function list that contains a relay contact will activate the relay contact with the TRUE argument, deactivate the relay contact with the FALSE argument and PULSE the relay contact with the PULSE argument.

Syntax: HRESULT Lnl_SetZoneToIVLinks ( ZONE_IV_LINKAGE *prs_List, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_List Structure for assigning the alarm zones

which will invoke the function list. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 237: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 237

Lnl_SetInterPanelLinks Purpose: This command is used to configure the linkage of inputs to outputs from within an access panel. This command allows the linkage of ANY alarm panel input to any alarm panel output within a single access panel. Using this command when the alarm panel input is in alarm, the output is activated. When the alarm panel input is in a secure mode, the output is deactivated.

Syntax: HRESULT Lnl_SetInterPanelLinks ( ALARM_OUTPUT_LINKS_MSG *prs_API, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_API Structure which defines the alarm panel

input and out linkages. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 238: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 238

Lnl_ActivateTimezone Purpose: Activates a timezone.

Syntax: HRESULT Lnl_ActivateTimezone ( TIMEZONE *prs_TZ, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_TZ Structure containing the information about

the timezone. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 239: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 239

Lnl_ActivateElevatorOutput Purpose: Command to activate an elevator output.

Syntax: HRESULT Lnl_ActivateElevatorOutput ( long readerID, long outputID );

Input Parameters:

Parameter Description readerID ID of reader to activate output on. outputID Output ID of the output to activate.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 240: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 240

Lnl_GrantOneFreePass Purpose: Issues a command to the hardware to issue one free pass for a particular cardholder. This is used with Anti-Passback.

Syntax: HRESULT Lnl_GrantOneFreePass ( GRANT_ONE_FREE_PASS *prs_US, BOOL vb_WaitForRsp );

Input Parameters:

Parameter Description prs_US Structure containing the Grant One Free

Pass information. vb_WaitForRsp Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 241: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 241

Lnl_SetUseTwoWireRS485 Purpose: Set the panel to use Two Wire RS-485.

Syntax: HRESULT Lnl_SetUseTwoWireRS485 ( int vi_Value );

Input Parameters:

Parameter Description vi_Value Value to set that indicates if two wire RS-

485 is being used (0-False, 1-True).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 242: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 242

Lnl_GetUseTwoWireRS485 Purpose: Method used to determine if panel is setup to use Two Wire RS-485.

Syntax: HRESULT Lnl_GetUseTwoWireRS485 ( int *Value );

Output Parameters:

Parameter Description Value Whether or not two wire RS-485 is being

used (0-not being used, 1-being used).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 243: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 243

Lnl_DownloadReaderFirmware Purpose: NOTE: This method is no longer called from within OnGuard. The Lnl_DownloadFirmware method from the IAccessControl2 interface is called instead. Method used to download firmware to a reader. The reader ID is used to indicate the reader and the type of reader is used to indicate the reader type. The Device Translator will need to have to know how to grab the firmware information that needs to be downloaded to the reader.

Syntax: HRESULT Lnl_DownloadReaderFirmware ( long readerID, long readerType );

Input Parameters:

Parameter Description readerID ID of the reader that firmware is to be

downloaded to. readerType The type of reader (available reader types

are listed in the IAccessControl Define section).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 244: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 244

Lnl_ ReaderDownload Purpose: This method is no longer called from within OnGuard. The Lnl_DownloadFirmware method from the IAccessControl2 interface is called instead. This method is used to inform the Device Translator that a reader download has been requested and that the Device Translator needs to make the Lnl_StartReaderDownload call to the Lenel Communication Server via the IDistributeEvent interface.

Syntax: HRESULT Lnl_ReaderDownload ( READER_DOWNLOAD *pReaderDownload );

Input Parameters:

Parameter Description pReaderDownload Pointer to the structure containing the

reader download information.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 245: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 245

Lnl_HostAccessResponse Purpose: Sends a response to a host based access decision.

Syntax: HRESULT Lnl_ReaderDownload ( long readerID, long badgeID, long command );

Input Parameters:

Parameter Description readerID Reader that the host based decision

response is for. badgeID Badge ID that the host based decision

response is for. command The host based decision response (0 –

Deny, 1 – Grant).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 246: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 246

IAccessControl Structures READER_DWNSPEC Structure containing the downloadable reader format information.

Type Parameter Description long si_PanelID Panel ID long si_SegmentID Segment ID long sb_RecordNum Record number to set (0 – 3). Use

DecodeSegmentValue to convert this value into the proper value based on segment.

BYTE sb_CardType Card type: 0 – 5 digit card, no issue code 1 – 3 digit card, 1 issue code 2 – 3 digit card, no issue code 3 – 8 digit card, 1 issue code 4 – 9 digit card, no issue code 5 – 9 digit card, 2 issue code

BYTE sb_PinType Pin type: 0 – None 1 – 4 digit pin code 2 – 6 digit pin code

BYTE sb_Extension Always set to 2; long sl_NumCards Number of cards that database will

contain

BULKBADGE Used when a panel is being downloaded due to initial powerup or panel being reset in the field. This message allows for up to 41 badges to be downloaded in a single message to the driver. This reduces the number of communication attempts that are needed to download information to the panel.

Type Parameter Description long si_PanelID Panel ID that the badge

are intended for. long si_NumBadges Number of badges in the

structure BADGE [MAX_BADGES_PER_CMD_DEF]

ss_Badges Array of up to 41 badges containing all badge information for the cardholder.

Page 247: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 247

LNLDATE This structure is used inside of the BADGE structure to represent the activation and deactivation date.

Type Parameter Description BYTE sb_Year Indicates the year. 0 == 1900 BYTE sb_Month Indicates the month (1 == January) BYTE sb_Day Indicates the day of the month (1 = 1st

day)

BADGE_EXT This structure represents the access privileges that are assigned to a given badge which is being downloaded. There are 3 types of access privileges which can be assigned to a cardholder via this structure: 1) access levels 2) precision access – reader inclusion groups 3) precision access – reader exclusion groups.

Type Parameter Description long sb_AccLevel1 N/A – Internal usage

only long sb_AccLevel2 N/A – Internal usage

only long sb_AccLevel3 N/A – Internal usage

only long sb_AccLevel4 N/A – Internal usage

only long sb_AccLevel5 N/A – Internal usage

only long sb_AccLevel6 N/A – Internal usage

only long sl_FirstRdrs User for precision access

to represent the readers which are to be excluded from usage by the cardholder. This ling represents the first 32 readers. Bit 0 == reader 1.

long sl_SecndRdrs User for precision access to represent the readers which are to be excluded from usage by the cardholder. This ling represents the second 32

Page 248: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 248

readers. Bit 0 == reader 33.

long [MAX_READERS] sb_InclList An array of 64 longs used for controlling precision access for a cardholder. Each array entry contains a timezone when the cardholder is permitted to access that reader. Array entries 0 – 63 correspond to readers 1 – 64 that the access panel can contain. The actual value of the timezone entry is panel-specific up to the number of timezones supported by the access panel. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long [MAX_ACCLEVELS_CARDHOLDER]

sl_AccessLevels An array of up to 32 access levels per cardholder. An access level references a table of reader / timezone combinations. Access level definitions are constant across all panels within a defined segment. Ex. If there are two panels within segment A, access level 2 when assigned to a cardholder spans both panels. Use DecodeSegmentValue to convert this value into the proper value based on segment.

Page 249: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 249

BADGE The Badge structure defines all of the attributes associated with a given badge for a cardholder. The badge structure defines the panels that this badge information is to be downloaded to as well as all of the access permissions and operating characteristics associated with the badge.

Type Parameter Description long si_PanelID This specifies the specific

panel ID that this badge information is to be downloaded to. If the panel ID is –1, this means that the member sb_PanelArray contains a list of multiple panels that the same information is to be downloaded to.

long si_SegmentID Specifies the specific segment ID that the panel belongs to. If the system is not segmented, the segment ID will be LNL_INVALID_SEGMENT.

DWORD sl_CardNumber Cardnumber for the badge. long sb_AccessLevel N/A BYTE sb_IssueCode Issue code of the badge. BYTE sb_APBLocation Current Area Anti-Passback

Location. Used to reset APB status for the cardholder or place the cardholder in a specific location.

char [MAX_PIN_DIGITS]

sb_PIN PIN Code for the badge. Array of up to 9 characters allows for leading 0s’ to be a valid PIN Code entry.

LNLDATE ss_ActivationDate Activation Date for the badge. Can be set in the future.

LNLDATE ss_DeactivationDate Deactivation Date for the badge. Access will be not be granted after this date.

FLAG sb_CheckBeforeDeny Allows for host based processing of access denials. Indicates that the access panel is to pass this message up to the driver for further processing.

FLAG sb_CheckBeforeGrant Allows for host based

Page 250: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 250

processing of access grants. Indicates that the access panel is to pass this message up to the drvier for further processing.

FLAG sb_APBExempt Flag that indicates that this cardholder is exempt from Anti-passback or area control rules.

FLAG sb_APBOneFreePass Resets the APB status of the cardholder.

FLAG sb_APBNotUsed Resets the APB status of the cardholder.

BYTE sb_TimedAPBDelay Anti-Passback Delay for timed Anti-Passback Control. Indicates that this card cannot be used at the same reader for X number of minutes.

BYTE sb_UseLimit Use limit of the card. After the card has been used this number of times at a specific panel, it is no longer valid. –1 indicates infinite usage.

BYTE sb_CommandAuthority Specifies that this cardholder can issue commands at a keypad reader.

long sl_VDT Handicap flag. When used, the extended strike and held open times are applied to the cardholder.

BYTE sb_PassageMode Offline Lock - can user enable passage mode.

BYTE sb_DeadboltOverride Offline Lock - Can user override deadbolt on a mortise V Series.

long sl_AssetGroup Asset group the cardholder belongs to.

BADGE_EXT ss_BdgExts Structure of cardholder access levels and access permissions.

BYTE sb_FirstCardUnlockAuthority Specifies that this cardholder can use first card unlock at a reader that is configured for first card unlock.

Page 251: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 251

CARDFMT_MAGNETIC This structure defines a magnetic card format found on a cardholder’s badge. Depending on the number of card formats stored within a panel, there can be more than one card format sent to an access panel. When Custom Encoding is used, the custom encoding information will be located in the sb_FacFromStart, sb_CardFromStart, sb_IssueFromStart, sb_FacOffset, sb_CardOffset, and sb_IssueOffset fields of the structure (These fields slightly different meanings when custom encoding is not being used).

Type Parameter Description BYTE sb_RefIndex1 This is now always being set to 0. This

used to be used for the number of digits to start of first reference index, 0 for start sentinel.

BYTE sb_RefIndex2 This is now always being set to 255. This used to be used for the number of digits from reference index 1 to index 2, 255 for end sentinel.

BYTE sb_DistToIndex1 This is now always being set to 0. This used to be used for the number of digits from start to reference index 1, 0 for start sentinel.

BYTE sb_DistToIndex2 This is now being set to the total number of digits (characters). It used to be used for the number of digits from ref index 1 to ref index 2.

BYTE sb_DistToEnd This is now always being set to 0. This used to be used for the number of digits from index 2 to end, 0 for end sentinel.

BYTE sb_FacFromStart The order of the Facility Code when not using Custom Encoding (0=N/A, 1, 2, 3). For Custom Encoding this is the number of digits in the Facility Code.

BYTE sb_CardFromStart The order of the Facility Code when not using Custom Encoding (0=N/A, 1, 2, 3). For Custom Encoding this is the number of digits in the Card Number.

BYTE sb_IssueFromStart The order of the Issue Code when not using Custom Encoding (0=N/A, 1, 2, 3).

Page 252: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 252

For Custom Encoding this is the number of digits in the Issue Code.

BYTE sb_FacOffset Facility Code Offset when Custom Encoding is not being used. This value is calculated based on the Facility Code Order (sb_FacFromStart). If the Facility Code order is set to 0 or 1 then the Facility Code offset is 0. If the Facility Code order is set to 2, then the Facility Code offset is set to the number of Issue Code digits if the Issue Code order is set to 1, otherwise it is set to the number of Card Number digits. If the Facility Code order is 3, then the Facility Code offset is set to the number of Issue Code digits plus the number of card number digits. For Custom Encoding this is the Facility Code offset from the start.

BYTE sb_CardOffset Card Number Offset when Custom Encoding is not being used. This value is calculated based on the Card Number Order (sb_CardFromStart). If the Card Number order is set to 0 or 1 then the Card Number offset is 0. If the Card Number order is set to 2, then the Card Number offset is set to the number of Issue Code digits if the Issue Code order is set to 1, otherwise it is set to the number of Facility Code digits. If the Card Number order is 3, then the Card Number offset is set to the number of Issue Code digits plus the number of Facility Code digits. For Custom Encoding this is the Card Number offset from the start.

BYTE sb_IssueOffset Issue Code Offset when Custom Encoding is not being used. This value is calculated based on the Issue Code Order (sb_IssueFromStart). If the Issue Code order is set to 0 or 1 then the Issue Code offset is 0. If the Issue Code order is set to 2, then the Issue Code offset is

Page 253: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 253

set to the number of Facility Code digits if the Facility Code order is set to 1, otherwise it is set to the number of Card Number digits. If the Issue Code order is 3, then the Issue Code offset is set to the number of Facility Code digits plus the number of card number digits. For Custom Encoding this is the Issue Code offset from the start.

BYTE sb_FacDigits Number of digits in the facility code. BYTE sb_CardDigits Number of digits in the card number. BYTE sb_IssueDigits Number of digits in the issue code. BYTE sb_Spare1 This field is used to indicate if “Total

Digits Is Minimum” is being used. When “Total Digits Is Minimum” is being used this field will be set to 0, otherwise this field will be set to the total digits (characters) that are being used.

BYTE sb_Spare2 N/A

CARDFMT_WEIGAND This structure defines a wiegand card format found on a cardholder’s badge. Depending on the number of card formats stored within a panel, there can be more than one card format sent to an access panel.

Type Parameter Description BYTE sb_NumBitsOnCard Number of data bits on the card. BYTE sb_BitsForEven Number of bits to sum from start for

even parity. BYTE sb_BitsForOdd Number of bits to sum from end for odd

parity. BYTE sb_BitsFacCode Number of bits in the Facility Code. BYTE sb_IndexToFirstFac Number of bits from the first bit to the

first Facility Code bit. BYTE sb_BitsCardNum Number of bits in the Card Number. BYTE sb_IndexToFirstCard Number of bits from first bit to Card

Number. BYTE sb_ParityStep Step parity bit count by 2 (0-No Parity

Step, 1-Parity Step by Two). This is used if a card format is using nonstandard parity checking like the Motorola Systems format. Rather than

Page 254: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 254

calculating parity by checking every bit in the string, these card formats will check every other bit (such as bits #1, #3, #5, #7, etc. for example).

short sb_IndexToFirstIssue Number of bits from the first bit to the first Issue Code bit.

short sb_BitsIssueCode Number of bits in the Issue Code.

CARD_DATA Union which specifies the type of card format data contained within a card format configuration command. The two valid structures are magnetic or wiegand card format data.

Type Parameter Description CARDFMT_MAGNETIC ss_Mag Information for magnetic cards. CARDFMT_WEIGAND ss_Weigand Information for weigand cards.

CARD_FORMAT_CFG Defines a valid card format to be contained in the access panel. It is panel specific as to how many card formats can be stored within an access panel. Card formats are then assigned to readers during reader configuration.

Type Parameter Description long si_PanelID Panel Id that this message is intended

for. FLAG sb_FormatType Specifies wiegand card format

(WEIGAND_CARD_FORMAT ) or magnetic card format (MAG_CARD_FORMAT).

short si_FormatID Specifies the ID of the card format. DWORD sl_FacilityCode Contains the facility code of this card

format. DWORD sl_CardNumberOffset The starting card number offset of this

card format. For example, if the offset is set to 10,000. Each card of this format, when read, will return the cardnumber plus 10,000 in the event. Ex, if the card number on the badge is 123, the cardnumber reported back will be 10,123. This is used when multiple card formats are used and there are overlapping cardnumbers in the system.

FLAG sb_EnforceGuestRules Flag indicating whether this card format needs to enforce guest rules (0-No, 1-

Page 255: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 255

Yes, enforce guest rules). FLAG sb_SmartCard Flag indicating whether this card format

is for a smart card (0-No, 1-Yes). union _CARD_DATA

su_CardData Union of magnetic and wiegand card data.

READER_MODE Structure used to set the access mode of the reader.

Type Parameter Description long si_PanelID Panel ID that the reader is attached to. short sb_ReaderNumber Number of the reader (0 - 63). BYTE sb_AccessMode Access mode of the reader (See list of available

reader access modes in IAccessControl Defines).

READER_OUTPUT_CTRL Type Parameter Description long si_PanelID Panel ID that the reader is attached to. short sb_ReaderNumber Number of the reader (0 - 63) BYTE sb_Output1 Control mode for output 1

(RDR_OUTMODE_OFF = 0x08, RDR_OUTMODE_ON = 0x09, RDR_OUTMODE_PULSE = 0x80, RDR_OUTMODE_IGNORE = 0x00).

BYTE sb_Output2 Control mode for output 2 (RDR_OUTMODE_OFF = 0x08, RDR_OUTMODE_ON = 0x09, RDR_OUTMODE_PULSE = 0x80, RDR_OUTMODE_IGNORE = 0x00).

READER_TZCTRL Type Parameter Description long sb_Timezone Timezone ID (3 - 255, 1 reserved

for “Never” timezone and 2 reserved for “Always” timezone). Use DecodeSegmentValue to convert this value into the proper value based on segment.

BYTE sb_StartMode Reader access mode at start of the timezone (See list of available

Page 256: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 256

reader access modes in IAccessControl Defines).

BYTE sb_EndMode Reader access mode at end of the timezone (See list of available reader access modes in IAccessControl Defines).

BYTE sb_StartFirstCardUnlockMode T/F Flag. First Card Unlock mode at start of timezone.

BYTE sb_EndFirstCardUnlockMode T/F Flag. First Card Unlock mode at end of timezone.

BYTE sb_StartVerifyMode Tri State Flag. Bio Verify mode at start of timezone (no change, turn on, turn off).

BYTE sb_EndVerifyMode Tri State Flag. Bio Verify mode at end of timezone (no change, turn on, turn off).

READER_TZLIST Type Parameter Description long si_PanelID Panel ID reader is attached to. short sb_ReaderNumber Number of reader (0 – 63). BYTE sb_NumberOfEntries Number of timezone control entries. READER_TZCTRL [MAX_RDR_TZ_CTRL]

ss_TZ Array of up to 125 reader controlled timezone actions.

READER_STATUS Structure that contains the status information of the readers connected to an access panel. The status can be returned either asynchronously and this structure is not filled out and the status is returned via messages, or synchronously and this structure is filled out.

Type Parameter Description long si_PanelID Panel ID the reader is attached to. BYTE sb_AsyncStatus Indicates how the reader status is

returned (1-Asynchronously, 0-Synchronously). When the status is returned synchronously the structure will be filled out with the status information. To return status asynchronously individual status messages need to be sent via the IDistributeEvent interface.

long [LAST_READER_ID+1]

sb_Devices Status of the readers. Each index represents a reader (0 is not used)

Page 257: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 257

and the status is a bitmap of various values. (See Defines at the end of this section for the Reader Status Bits).

BYTE [LAST_READER_ID+1]

sb_DeviceMaskStatus Mask status of the readers (Similar to the device status just doesn’t use as many status bits).

BYTE [LAST_READER_ID+1]

sb_DeviceMode Reader access mode of each reader.

BYTE [LAST_READER_ID+1]

sb_AlternateReaderStatus Status of the Alternate Reader that is linked with this reader. 0 indicates good status or not being used.

READER_ALARM_MASK Type Parameter Description long si_PanelID Panel ID. short sb_ReaderNumber Reader number. BYTE sb_ForcedOpen Mask forced open (0-False, 1-True). BYTE sb_HeldOpen Mask held open (0-False, 1-True). BYTE sb_AuxAlarm Mask aux alarm (0-False, 1-True). BYTE sb_AuxAlarm2 Mask aux alarm 2 (0-False, 1-True). BYTE sb_AuxAlarm3 Mask aux alarm 3 (0-False, 1-True).

ELEVATOR_HW_INFO Structure that is used by the READERDEF structure to specify elevator information.

Type Parameter Description long si_AccessPanelID Panel ID. long si_ReaderID Reader ID. long si_alarmPanelID Alarm Panel ID. long si_PanelType Panel Type. long si_FloorNumber Floor Number. long si_NextPanelID Next panel ID.

READERDEF Structure used to define/configure a reader in an Access Control panel.

Type Parameter Description long si_PanelID Panel ID the reader is attached to. short sb_ReaderNumber Reader number (0 - 63)

Page 258: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 258

BYTE sb_Activate T/F activate of delete the reader BYTE sb_AAPPort Port that reader is connected to on the

panel. BYTE sb_CommAddress Communication address of the Reader

(usually set by DIP switches). BYTE sb_CtrlType Type of controller of Reader (See

Defines at the end of this section for list of available reader types).

BYTE sb_StrikeTime Max seconds for activated door strike (1-255, default usually 8).

long sb_OpenTime Max seconds for held open door time (default usually 75).

BYTE sb_OfflineMode Mode reader is placed in when communications is lost with the panel (See Defines at the end of this section for available reader modes).

BYTE sb_AccessMode Access mode of the reader (See Defines at the end of this section for available reader modes).

BYTE sb_DenyIfDuress Deny access if duress code is detected (0-False, 1-True).

BYTE sb_ElevatorReader Is the reader an elevator reader (0-False, 1-True).

BYTE sb_DoNotWait Move into APB area regardless if door was opened (0-False, 1-True).

BYTE sb_Downloadable Is the reader downloadable (0-False, 1-True).

BYTE sb_CardSpecification Indicates the cardholder database layout for downloadable readers.

BYTE sb_PairedMaster Entrance reader for APB area (0-False, 1-True).

BYTE sb_PairedSlave Exit reader for APB area (0-False, 1-True).

BYTE sb_UseAuxAsBolt Use aux output as door bolt monitor (0-False, 1-True - AMS102-105 only).

BYTE sb_FastBoltAlarm Set for fast door bolt alarm detection (0-False, 1-True).

BYTE sb_AcceptCmds Determines if the reader accepts reader commands (0-FALSE, 1-TRUE).

BYTE sb_PreAlarm Determines if the reader is to use pre alarm (0-FALSE, 1-TRUE).

BYTE sb_2CardCtrl Determines if the reader is to use two card control (0-FALSE, 1-TRUE).

long [8] sb_CardFormat Card formats for this reader. This is an array of up to 8 card formats. Each index in the array will contain the card

Page 259: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 259

format ID that the reader is assigned. BYTE sb_DiddleCnt Number of consecutive denials before

report generated (0-255, default 0). short sb_AreaLeaving APB area that you are leaving when

using reader. short sb_AreaEntering APB area that you are entering when

using reader. long sb_ForcedOpenTZ Masks forced open alarm during this

TZ. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sb_HeldOpenTZ Masks held open alarm during this TZ. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sb_AuxInputTZ Masks aux input during TZ. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sb_Output1TZ Activates reader output 1 during this TZ. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sb_Output2TZ Activates reader output 2 during this TZ. Use DecodeSegmentValue to convert this value into the proper value based on segment.

BYTE sb_Output1State Initial state of reader output 1 (0-Off, 1-On)

BYTE sb_Output2State Initial state of reader output 2 (0 Off, 1- On)

BYTE sb_MaskForcedOpen Mask forced open alarms always (0-False, 1-True)

BYTE sb_MaskHeldOpen Mask held open alarms always (0-False, 1-True)

BYTE sb_MaskAuxAlarm Mask aux alarm always (0-False, 1-True)

BYTE sb_MaskAuxAlarm2 Mask aux alarm always (0-False, 1-True)

long sb_DayModeTZ Activate DayFloors List during timezone when reader is an elevator reader. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sl_DayFloors Floor list to activate during dayModeTZ when reader is an elevator reader.

Page 260: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 260

long sl_FacCodeFloors Array of floors for access while in facility mode when reader is an elevator reader..

long sl_CyperCode 6 digit max number containing cyper code for reader.

BYTE sb_TimedAPB Timed anti-passback value (0-255, default 0).

BYTE sb_SoftAPB Use soft anti-passback (0-False, 1-True). long sb_LogGrantTZ Used by Communication Server to only

log Access Grants during a particular timezone. (0 indicates to always log access grants).

long sb_LogDenyTZ Used by Communication Server to only log Access Denies during a particular timezone. (0 indicates to always log access denies).

long sb_LogStatusTZ Used by Communication Server to only log Status during a particular timezone. (0 indicates to always log Status).

BYTE sb_DecUseLimit Determines if Use Limits are enforced (0-False, 1-True). If enforced, each time a use-limited badge is used at this reader, the badge’s use limit is decremented for the associated Access Panel.

BYTE sb_NoRexOnStrike Determines if the door strike will NOT be energized when the REX contact is closed (0-False, 1-True).

long sl_LINXAddr N/A long sl_Out1Pulse Duration of output 1’s pulse in seconds

(0- 30000, default 0). long sl_Out2Pulse Duration of output 2’s pulse in seconds

(0- 30000, default 0). long sb_AuxInput2TZ Masks aux input during a timezone.

Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sb_AuxInput3TZ Masks aux input during a timezone. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sb_ElevatorAccessLevel

Elevator Control Level that will be used to access floors via this reader when reader is an elevator reader. Use DecodeSegmentValue to convert this value into the proper value based on

Page 261: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 261

segment. BYTE sb_SlaveID Reader ID of the slave reader attached

to this reader. BYTE sb_MaskAuxAlarm3 Mask aux alarm always (0-False, 1-

True). BYTE [MAX_FUNCS_READER]

sb_FuncList Global I/O function list associated with keypad command. Index in the array from 0-1 indicates the keypad command. (Pin+10/20, Func 4/5, Func 6/7, Func 8/9, Func 10/11, Func 12/13, Func 14/15).

BYTE [MAX_FUNCS_READER]

sb_TermList Logic term associated with the Global I/O function list associated with keypad command. Index in the array from 0-1 indicates the keypad command. (Pin+10/20, Func 4/5, Func 6/7, Func 8/9, Func 10/11, Func 12/13, Func 14/15).

BYTE sb_KeypadMode Reader keypad mode (see defines section for list of possible keypad mode types).

BYTE sb_StrikeMode Indicates how the door strike will behave when a valid card swipe occurs. (STRIKE_MODE_CLOSE = 0, strike will cut off as soon as door is closed; STRIKE_MODE_OPEN = 1, strike will cut off as soon as door is opened)

BYTE sb_TwoWireLED Configures the LED on the reader. (0 – “1-Wire LED Control (Std)”, 1 – “2-Wire LED Control”, 2 – “Dorado LED Control”).

long sb_StrikeTime2 Extended strike time in seconds (1-255). long sb_OpenTime2 Extended held open time (1-255). long sl_DCSupervision Door contact EOL Table (covers

supervision and no/nc). long sl_REXSupervision REX EOL Table (covers supervision

and no/nc). long sl_Aux1Supervision Aux1 EOL Table (covers supervision

and no/nc). long sl_Aux2Supervision Aux2 EOL Table (covers supervision

and no/nc). long sl_Aux1Latched Used in conjunction with the Entry

Delay field. If Selected (i.e., non-latched mode), when this auxiliary input is active the alarm will NOT be reported until the Entry Delay time expires. The

Page 262: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 262

alarm will be reported if this input is still active at the end of the specified delay. Application: invalid motion detector reads. If not selected (i.e., latched mode), when this auxiliary input is active the alarm WILL be reported unless this input is masked (either automatically through the software or manually via a keypad). Application: access a secured door. (0-Not Selected, 1-Selected)

long sl_Aux1EntryDelay Specifies the delay, in seconds, from the time this auxiliary input switches to an unmasked state until it is actually reportable (0-3600).

long sl_Aux1ExitDelay Specifies the delay, in seconds, for this auxiliary input to switch from a masked state to an unmasked state (0-3600). When an auxiliary input is unmasked, active alarms will NOT be reported until the Exit Delay expires. Application: securing a door when leaving a building.

long sl_Aux2Latched Used in conjunction with the Entry Delay field. If Selected (i.e., non-latched mode), when this auxiliary input is active the alarm will NOT be reported until the Entry Delay time expires. The alarm will be reported if this input is still active at the end of the specified delay. Application: invalid motion detector reads. If not selected (i.e., latched mode), when this auxiliary input is active the alarm WILL be reported unless this input is masked (either automatically through the software or manually via a keypad). Application: access a secured door. (0-Not Selected, 1-Selected)

long sl_Aux2EntryDelay Specifies the delay, in seconds, from the time this auxiliary input switches to an unmasked state until it is actually reportable (0-3600).

long sl_Aux2ExitDelay Specifies the delay, in seconds, for this auxiliary input to switch from a masked state to an unmasked state (0-3600). When an auxiliary input is unmasked,

Page 263: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 263

active alarms will NOT be reported until the Exit Delay expires. Application: securing a door when leaving a building.

ELEVATOR_HW_INFO [8]

sl_ElevatorInputID Elevator input panel.

ELEVATOR_HW_INFO [8]

sl_ElevatorOutputID Elevator output panel.

long sl_TrackElevatorInputRequests

Are we tracking input requests.

long sl_OnlineFacEAL Used for Lenel hardware to track online facility mode / offline access.

BYTE sb_ChassisType Chassis type of the offline lock, this value corresponds to the value located in the database (Currently only used by offline locks).

long sl_DeniedAttemptsCntTO

Denied attempts count timeout; 0-999 seconds. (Currently only being used by offline locks.)

wchar_t [64] sl_ReaderName Name of the reader (currently the first 32 bytes are being used). The name is passed down as UNICODE.

BYTE sb_DisableAsset True if asset reader is to disable asset... BYTE sb_LookAhead Determines if the look ahead feature is

being used (0-Look Ahead not used, 1-Look Ahead is being used); (Currently only being used by offline locks.)

BYTE sb_LookAheadOffset The offset used for look ahead. (Currently only being used by offline locks.)

BYTE sb_LookAheadRange The range used for look ahead. (Currently only being used by offline locks.)

long sl_Chassis_Volume The chassis volume being used. (Currently only being used by offline locks.)

long sl_ReaderMemory The amount of memory for the reader. (Currently only being used by offline locks.)

BYTE sb_UseActivationDate Indicates if the reader is to use the Activation Date; 0-Activation Date not used, 1-Activation Date is used. (Currently only being used by offline locks.)

BYTE sb_UseExpirationDate Indicates if the reader is to use the Expiration Date; 0-Expiration Date not used, 1-Expiration Date is being used.

Page 264: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 264

(Currently only being used by offline locks.)

long sl_NumCardholders Number of cardholders that the reader can hold. (Currently only being used by offline locks.)

long sl_FirstBadgeNumber The first badge number for reader. (Currently only being used for guest offline locks.)

long sl_NumberOfBadges The number of badges for the reader. (Currently only being used for guest offline locks.)

long sl_altrdr_sio Alternate reader link long sl_altrdr_number Reader number on the sio. long sl_altrdr_spec Alternate reader configuration.

(ALTERNATE_READER_NONE = 0, ALTERNATE_READER_NORMAL = 1, ALTERNATE_READER_BIO1 = 2)

BYTE sb_AlternateReader BYTE sb_BioVerify Use Biometric Verification;

0-False, 1-True BYTE sb_BioEnroll Use Biometric Enroll if the biometric

template is not present; 0-False, 1-True BYTE sb_HostDecisionOnGra

nt Indicates if the reader is to request a host based decision on a grant.

BYTE sb_HostDecisionProceedWithGrant

Determines what to do when a host based decision times out; 0 – Deny all access, 1 – proceed with grant based on access level

BYTE sb_GlobalAPB Indicates if the reader is involved with Global APB, used internally by Lenel.

long sl_AuxIn1HoldTime Hold time (in seconds) for Aux Input 1. long sl_AuxIn2HoldTime Hold time (in seconds) for Aux Input 2. long sl_DCDebounce Debounce value (Lenel enumeration) for

the Door Contact. long sl_REXDebounce Debounce value (Lenel enumeration) for

the REX. long sl_AuxIn1Debounce Debounce value (Lenel enumeration) for

Aux Input 1. long sl_AuxIn2Debounce Debounce value (Lenel enumeration) for

Aux Input 2. BYTE sb_CipherMode T/F Flag indicating if this reader should

accept cipher mode access. BYTE sb_FirstCardUnlock T/F Flag indicating if this reader should

be placed in first card unlocked mode. BYTE sb_FirstCardUnlockAu

thorityRequired T/F Flag indicating if this reader requires special authority of the Badge

Page 265: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 265

in order to unlock when an access grant occurs while the ready is in first card unlocked mode.

ACCESS_LEVEL Type Parameter Description long si_PanelID Panel ID. long si_SegmentID Segment ID. long sb_AccessLevel The physical access level

number. Use DecodeSegmentValue to convert this value into the proper value based on segment.

BYTE sb_AccProcess Access level processing function, must be 0 for now.

long [MAX_READERS]

sb_ReaderTZ Timezone array for reader entries, reader 0 is array spot 0, pad w/ 1's for non used readers ... Use DecodeSegmentValue to convert this value into the proper value based on segment.

DWN_ACCESS_LEVEL Structure used for downloading access levels to intelligent readers.

Type Parameter Description long si_PanelID Panel ID the access level

belongs to. long sb_AccessLevel The physical access level

number. BYTE [MAX_READERS]

sb_DwnReaders Array for intelligent reader entries, reader 0 is array spot 0 , pad w/ 0's for non used readers ...

ELEVATOR_ACCLEVEL Type Parameter Description long si_PanelID Panel ID. long si_SegmentID Segment ID. long si_ElevatorAccessLevel Elevator Access

Level ID. Use

Page 266: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 266

DecodeSegmentValue to convert this value into the proper value based on segment.

long [LNL_MAX_ELEVATOR_FLOORS]

sb_FloorList An array of floors that indicate what timezone is assigned to each floor, 0 indicates none assigned or floor not used. Use DecodeSegmentValue to convert this value into the proper value based on segment.

ELEVATOR_ACCLEVEL_PERTZ Type Parameter Description long si_PanelID Panel ID. long si_SegmentID Segment ID. long si_ElevatorAccessLevel Elevator Access

Level ID. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long si_Timezone Timezone ID. long [LNL_MAX_ELEVATOR_FLOORS]

sb_FloorList An array of floors that indicate what timezone is assigned to each floor, 0 indicates none assigned or floor not used. The timezone in this array will be the same for all floors and is the same as what is indicated in si_Timezone.

AREA_APB_TABLE Used by the AREA_APB_CFGMSG for sending all the APB information to the panel at once.

Page 267: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 267

Type Parameter Description int si_FromArea From area. int si_ToArea To area. int si_APBDelay APB delay.

AREA_APB_CFGMSG This structure is used by the SetAreaAPBTable method. This method was used in the past when all the APB information needed to be sent to the panel all at once.

Type Parameter Description long si_PanelID Panel ID the APB information is being

sent to. AREA_APB_TABLE [MAX_READERS]

ss_Table APB table.

AREAAPB This structure is used to set anti-passback area information in the hardware.

Type Parameter Description long si_PanelID Panel ID. int si_AreaID APB area ID. FLAG si_TwoManControl Indicates if two man control is being

used (at least two cardholders must be in area at all times). (0-False, 1-True).

FLAG si_AreaClosed Indicates if the area closed event will be generated. Cardholders will still be granted access unless the area closed rules are in place. (0-False, 1-True).

FLAG si_DenyAllIfClosed Indicates if Deny All If Closed is being used (0-False, 1-True). This denies access to all cardholders if the area is closed. The si_AreaClosed field also needs to be set to 1 for this to work.

int si_ReaderID If the si_AreaClosed field has been set (1) this field can be used to select a reader to cardholders can use to gain access to the area.

int si_MaxOccupancy Maximum occupancy of the area. Once capacity is reached the area is closed.

int si_MaxCount Indicates the number of people that must be in this area before the action at maximum is applied to the specified

Page 268: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 268

logic term of the specified function list. int si_MinCount Indicates the minimum number of

people that must be in this area before the action at minimum is applied to the specified logic term of the specified function list.

int si_RuleID Global I/O function list associated with the area’s occupancy levels.

int si_RuleTerm Global I/O Function list term. int si_MinArg Sets the value of the logic term when

the minimum occupancy is reached (Do Nothing - 0, Set False - 1, Set True - 2 , Pulse - 3).

int si_MaxArg Sets the value of the logic term when the maximum occupancy is reached (Do Nothing - 0, Set False - 1, Set True - 2 , Pulse - 3).

short si_AreaType Area type: 0-Normal, 1-Muster Zone, 2-Safe Location. Used for Mustering.

int si_AreaAPBID Unique ID for area from database. Used for Global APB

long si_SegmentID Segment ID for the area. Used for Global APB.

CMD_ACCESS_LEVEL Type Parameter Description long si_PanelID The panel ID. long sb_AccessLevel The access level number. BYTE [MAX_READERS]

sb_DwnReaders Array for intelligent reader entries (reader 0 is array spot 0, pad w/ 0's for non used readers).

ALARM_PANEL Type Parameter Description long si_PanelID Panel ID. long sb_PanelNumber alarm panel number (65 - 81) BYTE sb_Activate T/F activate of delete the panel BYTE sb_AAPPort Port that panel is connected to on

Access Control panel. BYTE sb_CommAddress Communication address of the Panel

(usually set by DIP switches). BYTE sb_CtrlType Type of Alarm Panel. (see defines at

Page 269: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 269

the end of this section). long sb_NextPanelID Used for elevator control - next panel

id.

RESET_CARDHOLDER_USELIMITS Type Parameter Description long si_PanelID Panel ID this command is for. DWORD sl_CardNumber Cardnumber to reset use limits for. BYTE sb_UseLimit Use limit to set to.

BIOMETRIC_DEF Type Parameter Description long NumBioRecords Number of biometric records to create. long BioType Type of biometric records to create

(LNL_BIO_TYPE_RSI_HANDKEYII). long MinReport Report actual score and template if

score below this value. long MinScoreDflt Default minimum “accept” score. long MinScore Store required minimum score per user. long TemplateSize Size of the bio template.

CARD_REC_CFG Configuration message structure for the cardholder record configuration structure. This message defines the layout of the cardholder database within the access panel. This determines the amount of memory that the Access Panel allocates for cardholder records. The remaining memory is reserved for events. This allows for specific features to be disabled / enabled depending in the requirements of the installation. If certain features are not used, they can be disabled in the panel which saves space required for panel configuration.

Type Parameter Description long si_PanelID Panel ID that this

message is intended for.

DWORD sl_NumberCards The maximum number of cardholder records that Access Panel will contain.

BYTE sb_CardType This determines the maximum number of card digits that will be used.

Page 270: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 270

BYTE sb_PinType What type of PIN code will be used. (None, 4-digit, 6 digit)

BYTE sb_ExtType Indicates if any record extension type is to be used. (Panel specific, ex. Precision access)

BYTE sb_Duress Contains the duress offset counter. This allows you to change the number added to the PIN code which indicates duress.

FLAG sb_ExpDate Allocate storage for each cardholder for the expiration date.

FLAG sb_ActDate Allocate storage for each cardholder for the activation date.

FLAG sb_APB Allocate storage for each cardholder for the Anti-passback information.

FLAG sb_PINSearch Allocate storage for each cardholder so that the cardholders can be searched by PIN number. Only used reader set to PIN mode only.

FLAG sb_TimedAPB Allocate storage for each cardholder for the timeed anti-passback tracking

FLAG sb_PrecisionAccess Allocate storage for each cardholder for the use of reader inclusion lists for precision access.

FLAG sb_AssetManagement FLAG sb_ElevatorControl FLAG sb_FirstCardUnlock BYTE sb_NumReaders Maximum number of

readers that the panel is configured for.

Page 271: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 271

long sl_SegmentID Segment ID of the panel

long sl_TotalMemory Total Memory in panel.

long sl_SegmentConverter Value used for decoding segment values.

long sl_NumAccessLevels Number of access levels supported by hardware.

long sl_AccessLevelsPerCardholder Number of access levels per cardholder record.

long sl_NumTimezones Number of timezones supported by panel.

long sl_NumHolidays Number of holidays supported by hardware.

long sl_NumAssets Number of assets to store in panel.

long sl_AssetSize Size in bytes of asset (fixed at 16 for now).

long sl_NumCardsPerCardholder Used for determining the number of badges per asset.

BIOMETRIC_DEF biometricCfg [LNL_MAX_BIO_TYPES_PER_PANEL]

Panel biometric settings. Panels can potentially support multiple biometric types.

HOLIDAY This structure defines the holiday's that can be defined for the access control system.

Type Parameter Description short ss_Year The year after subtracting 1900 (eg.

1995 is passed as 95). short ss_Month Month w/ January = 1. short ss_DayOfMonth Day of the month. short ss_HolidayType Indicates holiday type. This is a bit

mask of up to 8 holiday types. short ss_NumDays Number of days that the holiday lasts

(e.g. more than one day).

Page 272: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 272

HOLIDAYMSG Type Parameter Description long si_PanelID Panel ID the holiday information is for. long si_SegmentID Segment ID the holiday information is

for. short ss_NumHolidays The number of holiday array entries are

in the array. HOLIDAY [MAX_HOLIDAYS]

ss_Holidays The array of holidays.

TZ_INTERVAL Type Parameter Description BYTE sb_StartHour Start hour of timezone in military time. BYTE sb_StartMin Start minute of timezone. BYTE sb_EndHour End hour of timezone in military time. BYTE sb_EndMin End minute of timezone in military

time. BYTE sb_DaysOfWeek Bit map for days of week:

(Monday = 0x80, Tuesday = 0x40, Wednesday = 0x20, Thursday = 0x10, Friday = 0x08, Saturday = 0x04, Sunday = 0x02)

BYTE sb_Holidays Bit map of holiday types: (Type 1 = 0x01, Type 2 = 0x02, Type 3 = 0x04, Type 4 = 0x08, Type 5 = 0x10, Type 6 = 0x20, Type 7 = 0x40, Type 8 = 0x80)

TIMEZONE Type Parameter Description long si_PanelID Panel ID the timezone belongs to. long si_SegmentID Segment ID the timezone belongs

to. long sb_TzNum Timezone number (falls in the

Page 273: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 273

range 3 – 255 when decoded for segment). Timezone ID 1 is reserved for the “Never” timezone and timezone ID 2 is reserved for the “Always” timezone. Use DecodeSegmentValue to convert this value into the proper value based on segment.

BYTE sb_NumIntervals Number of timezone intervals. TZ_INTERVAL [MAX_TZ_INTERVALS]

ss_Intervals Array of the timezone intervals for this timezone, up to six intervals can exist per timezone.

AREA_STATUSRPT Structure used to return the status of the areas.

Type Parameter Description long si_PanelID Panel ID. BYTE sb_AsyncStatus Indicates if the status is to be

returned asynchronously or synchronously. (0-Synchronously, 1-Asynchronously)

long [MAX_AREAS_PER_AAP]

sl_AreaStatus Indicates the status of the areas (LNL_STATUS_AREA_CLOSED == 0x8000).

long [MAX_AREAS_PER_AAP]

sl_AreaPersonCount Indicates the number of people in each area (based on index into array).

EXECUTE_IV_MSG Structure used in executing function lists.

Type Parameter Description long si_PanelID Panel ID. long sl_IVID Function List ID. long sl_Function Function list function:

PROC_EXECUTE_NOP - 0 PROC_EXECUTE_CHANGED – 1 PROC_EXECUTE_FALSE - 2 PROC_EXECUTE_TRUE - 3 PROC_EXECUTE_PULSE - 4

BYTE sb_AlterTerms Indicates if function list terms are

Page 274: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 274

[MAX_IV_TERMS] associated. BYTE [MAX_IV_TERMS]

sb_ValuesTerms Function list terms values.

IV_FUNCTION_LIST Structure used in defining function lists.

Type Parameter Description long si_PanelID Panel ID. int si_IVID Function List ID. int si_Command (IV_CMD_NOP = 0x00, IV_CMD_CLEAR

= 0x01) int si_ExecuteType (IV_TYPE_LOGIC_OR_EXECUTE =

0x00, IV_TYPE_UNCONDITIONAL_EXECUTE = 0x01)

long [MAX_FUNC_ARGS]

si_FunctionList Array of Function List functions.

IV_LINK Structure used as part of the ZONE_IV_LINKAGE structure for linking function lists to events.

Type Parameter Description int si_LUN Logical Unit Type definition.

(AAP_LUN = 0x00, CONTROLLER_LUN = 0x01, READER_LUN = 0x02, ALARMPANEL_LUN = 0x03, HOST_LUN = 0x06, AREA_LUN = 0xFC, ZONE_LUN = 0xFB, IV_LUN = 0xFD, TIMEZONE_LUN = 0xFE, TRIGGERVAR_LUN = 0xFF)

int si_DeviceID Device ID. int si_ZoneID Zones for AAP_LUN:

ZONE_AAP_CABINET_TAMPER = 0 ZONE_AAP_POWERFAIL = 1 ZONE_AAP_COMMLOSS = 255 (Lenel Generated Alarm Zone by Comm. Server)

Page 275: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 275

Zones for Controllers: ZONE_CTRL_COMMSTATUS = 0 ZONE_CTRL_CABINET_TAMPER = 1 ZONE_CTRL_POWERFAIL = 2 Zones for Readers: ZONE_RDR_INPTAMPER = 0 ZONE_RDR_FORCEDOPEN = 1 ZONE_RDR_HELDOPEN = 2 ZONE_RDR_AUXINPUT = 3 ZONE_RDR_DIDDLE = 4 ZONE_RDR_ACCESSACT = 5 ZONE_RDR_DOORCONTACT = 6 ZONE_RDR_AUXINPUT2 = 7 ZONE_RDR_AUXINPUT3 = 8 Zones for Host Communications: ZONE_HOST_COMMSTATUS= 0

int si_Operation Operation int si_IV Function List ID. int si_Term Function List term.

ZONE_IV_LINKAGE Structure used to link a function list to a specific event.

Type Parameter Description long si_PanelID Panel ID long si_NumLinks Number of function list links. IV_LINK [MAX_IV_LINKS_INMSG]

ss_IVLink Array of function list links.

ALARM_OUTPUT_LINKS Structure that contains the input information for the inputs linked to outputs.

Type Parameter Description int si_NumOfInputs Number of inputs that are

linked to this particular output.

int [MAX_SCP_SYSTEM_INPUTS]

si_PanelID Array of Panel IDs for the linked inputs.

int si_InputID Array of Input IDs for the

Page 276: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 276

[MAX_SCP_SYSTEM_INPUTS] linked inputs.

ALARM_OUTPUT_LINKS_MSG Structure that is used to link inputs to outputs.

Type Parameter Description long si_PanelID Panel ID the alarm panel is

attached to. long sb_PanelNumber Alarm panel number (65 - 81). BYTE sb_CtrlType What type of controller is this

(See IAccessControl Defines for available alarm panel types).

ALARM_OUTPUT_LINKS [MAX_ALARM_OUTPUTS]

ss_Outputs Array of the structures that link the inputs to a particular output based on the index to this array (index 0 is for output 1 on this alarm panel, index 1 is for output 2 on this alarm panel, etc.).

GRANT_ONE_FREE_PASS Type Parameter Description long si_PanelID Panel ID that the Grant One Free Pass

command is being sent to. DWORD sl_CardNumber Cardnumber to grant one free pass to.

READER_DOWNLOAD This structure is used when a reader download is requested. It contains the information required for starting a reader download.

Type Parameter Description long si_PanelID Panel ID. long si_NumReaders Number of readers that the reader

download is for. BYTE [MAX_READERS]

sb_Readers Reader IDs of the readers the reader download is for. The value in si_NumReaders indicates what indexes in the array are being used.

Page 277: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 277

IAccessControl Defines MAX_ALARM_OUTPUTS 16 MAX_SCP_SYSTEM_INPUTS 256 MAX_RDR_TZ_CTRL 125 MAX_READERS 64 LAST_READER_ID 64 MAX_PIN_DIGITS 9 MAX_ACCLEVELS_CARDHOLDER 32 MAX_PANELS_SERVER 256 MAX_BADGES_PER_CMD_DEF 41 LNL_MAX_ELEVATOR_FLOORS 128 MAX_HOLIDAYS 255 MAX_FUNCS_READER 7 MAX_TZ_INTERVALS 6 MAX_AREAS_PER_AAP 64 MAX_FUNC_ARGS 6 MAX_IV_TERMS 24 MAX_IV_LINKS_INMSG 160 WEIGAND_CARD_FORMAT 0x80 (128) MAG_CARD_FORMAT 0x00 (0) LNL_MAX_BIO_TYPES_PER_PANEL 5

Reader Types Name Value Description CTRL_TYPE_HID_GATEWAY_INTERFACE 0x91 Asset Reader Interface CTRL_TYPE_DMPKEYPAD_INTERFACE 0x90 LCD Command

Keypad CTRL_TYPE_2RDR_INTERFACE 0x72 Dual Interface Rdr 1

(All other readers) CTRL_TYPE_2RDR_WEIGAND_RDR 0x73 Dual Interface Rdr 1

(Wiegand / Prox) CTRL_TYPE_2RDR_MAG_W_WEIGAND_OUT 0x74 Dual Interface Rdr 1

(Mag w/Wiegand output)

CTRL_TYPE_SLV_INTERFACE 0x75 Dual Interface Rdr 2 (All other readers)

CTRL_TYPE_SLV_WEIGAND_RDR 0x76 Dual Interface Rdr 2 (Wiegand / Prox)

CTRL_TYPE_SLV_MAG_W_WEIGAND_OUT 0x77 Dual Interface Rdr 2 (Mag w/Wiegand output)

Page 278: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 278

CTRL_TYPE_2SDI6_INTERFACE 0x78 AAD-6 Rdr1 (Magneric w/ Wiegand Output)

CTRL_TYPE_2SDI6_WEIGAND_RDR 0x79 AAD-6 Rdr1 (Wiegand / Prox)

CTRL_TYPE_2SDI6_MAG_W_WEIGAND_OUT 0x7A AAD-6 Rdr1 (Magneric w/ Wiegand Output)

CTRL_TYPE_SLVSDI6_INTERFACE 0x7B AAD-6 Rdr2 (All Other Readers)

CTRL_TYPE_SLVSDI6_WEIGAND_RDR 0x7C AAD-6 Rdr2 (Wiegand / Prox)

CTRL_TYPE_SLVSDI6_MAG_W_WEIGAND_OUT 0x7D AAD-6 Rdr2 (Magnetic w/ Wiegand Output)

CTRL_TYPE_2SDI4_INTERFACE 0x84 AAD-4 Rdr1 (All Other Readers)

CTRL_TYPE_2SDI4_WEIGAND_RDR 0x85 AAD-4 Rdr1 (Wiegand / Prox)

CTRL_TYPE_2SDI4_MAG_W_WEIGAND_OUT 0x86 AAD-4 Rdr1 (Magnetic w/ Wiegand Output)

CTRL_TYPE_SLVSDI4_INTERFACE 0x87 AAD-4 Rdr2 (All Other Readers)

CTRL_TYPE_SLVSDI4_WEIGAND_RDR 0x88 AAD-4 Rdr2 (Wiegand / Prox)

CTRL_TYPE_SLVSDI4_MAG_W_WEIGAND_OUT 0x89 AAD-4 Rdr2 (Magnetic w/ Wiegand Output)

CTRL_TYPE_WEIGAND_RDR 0x70 Single Interface (Wiegand / Prox)

CTRL_TYPE_MAG_W_WEIGAND_OUT 0x71 Single Interface (Mag w/Wiegand output)

CTRL_TYPE_UNDEFINED 0x00 Slave Reader Attached to Downloadable Reader

CTRL_TYPE_AMS103_102 0x01 Single Interface (All other readers)

CTRL_TYPE_AMS100 0x03 RC - 70X/72X/80X/90X Downloadable Reader

CTRL_TYPE_AP510_520 0x08 AP - 510/520 CTRL_TYPE_AP500 0x09 AP-500 Downloadable

Reader CTRL_TYPE_BEST_OFFLINE 0x92 Offline Lock CTRL_TYPE_BEST_OFFLINE_GUEST 0x93 Offline Guest Lock

Page 279: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 279

CTRL_TYPE_BEST_GUEST 0x95 Guest Lock CTRL_TYPE_BIO_RSI_GATEWAY_INTERFACE 0x94 RSI HandKey II CTRL_TYPE_BIO_IDENTIX_FINGERSCAN_V20 0x96 Identix FingerScan

V20

Reader Modes Name Value Description ACC_MODE_LOCKED 0 Door is locked. ACC_MODE_CARDONLY 1 Card only required

to open door. ACC_MODE_PIN_OR_CARD 2 Pin or Card

required to open door.

ACC_MODE_PIN_AND_CARD 3 Pin and Card required to open door.

ACC_MODE_UNLOCKED 4 Door unlocked. ACC_MODE_FACCODE_ONLY 5 Facility code only

is required to open door.

ACC_MODE_CYPHERLOCK 6 Cypher code required.

ACC_MODE_AUTOMATIC 7 Reader timezone modes will be used.

ACC_MODE_FIRST_CARD_UNLOCK 8 First card unlocks door.

ACC_MODE_DISABLE_2CARD 16 Disables 2 card control.

ACC_MODE_ENABLE_2CARD 17 Enables 2 card control.

ACC_MODE_DISABLE_BIO_VERIFY 18 Disables Bio Verify.

ACC_MODE_ENABLE_BIO_VERIFY 19 Enables Bio Verify.

ACC_MODE_DISABLE_BIO_ENROLL 20 Disable Bio Enroll. ACC_MODE_ENABLE_BIO_ENROLL 21 Enable Bio Enroll. ACC_MODE_DISABLE_FIRST_CARD_UNLOCK 24 Disable First Card

Unlock ACC_MODE_ENABLE_FIRST_CARD_UNLOCK 25 Enable First Card

Unlock

Page 280: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 280

Reader Keypad Modes Name Value Description KEYPAD_MODE_NONE 0 No Keypad KEYPAD_MODE_STANDARD 1 2020 w/ tamper KEYPAD_MODE_HUGHES 2 Four Bit Output Keypads KEYPAD_MODE_INDALA 3 Eight Bit Output Keypads KEYPAD_MODE_NOTAMPER 4 2020 w/ tamper disabled KEYPAD_MODE_APOLLO 5 1-7 Keypad Format

Reader Status Bits Name Value Description RDRSTATUS_TAMPER 0x01 Tamper RDRSTATUS_FORCED 0x02 Door Forced RDRSTATUS_HELD 0x04 Door Held RDRSTATUS_AUX 0x08 Aux1 RDRSTATUS_AUX2 0x10 Aux2 RDRSTATUS_CNTTAMPER 0x20 Cabinet Tamper RDRSTATUS_AUX3 0x40 Aux3 RDRSTATUS_BIO_VERIFY 0x80 Bio Verify Mode RDRSTATUS_DC_GND_FLT 0x100 DC Ground Fault RDRSTATUS_DC_SHRT_FLT 0x200 DC Short Fault RDRSTATUS_DC_OPEN_FLT 0x400 DC Open Fault RDRSTATUS_DC_GEN_FLT 0x800 DC General Fault RDRSTATUS_RX_GND_FLT 0x1000 REX Ground Fault RDRSTATUS_RX_SHRT_FLT 0x2000 REX Short Fault RDRSTATUS_RX_OPEN_FLT 0x4000 REX Open Fault RDRSTATUS_RX_GEN_FLT 0x8000 REX General Fault RDRSTATUS_AX1_GND_FLT 0x10000 Aux1 Ground Fault RDRSTATUS_AX1_SHRT_FLT 0x20000 Aux1 Short Fault RDRSTATUS_AX1_OPEN_FLT 0x40000 Aux1 Open Fault RDRSTATUS_AX1_GEN_FLT 0x80000 Aux1 General Fault RDRSTATUS_AX2_GND_FLT 0x100000 Aux2 Ground Fault RDRSTATUS_AX2_SHRT_FLT 0x200000 Aux2 Short Fault RDRSTATUS_AX2_OPEN_FLT 0x400000 Aux2 Open Fault RDRSTATUS_AX2_GEN_FLT 0x800000 Aux2 General Fault RESERVED 0x1000000 RESERVED RESERVED 0x2000000 RESERVED RESERVED 0x4000000 RESERVED RESERVED 0x8000000 RESERVED RDRSTATUS_FIRST_CARD_UNLOCK 0x10000000 First Card Unlock RDRSTATUS_EXTENDED_HELD_MODE 0x20000000 Extended Held Mode RDRSTATUS_CIPHER_MODE 0x40000000 Cipher Mode

Page 281: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 281

Alarm Panel Types Name Value Description CTRL_TYPE_AIA100 4 APA-15 / APA-16 / IAS-10 CTRL_TYPE_DIA100 3 APD-16 / IDS-10 ALARM_TYPE_ELEVINPUT 14 1100 (Input) CTRL_TYPE_MR16IN 0x81 1100 (Input) ALARM_TYPE_ELEVOUTPUT 15 1200 (Output) CTRL_TYPE_MR16OUT 0x82 1200 (Output) CTRL_TYPE_SDI12IN 0x83 AMD-12 (Input Panel)

Page 282: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 282

IAccessControl Error Codes

Name Value Description

Page 283: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 283

IAccessControl2 Functions The IAccessControl2 interface is an extension to the IAccessControl interface. If a Device Translator supports both interfaces and there are similar methods in both interfaces, the one in this interface is the one that will be used. For example, the IAccessControl interface supports the Lnl_SetControllerReaderDef method and the IAccessControl2 interface supports the Lnl_SetControllerReaderDef2 method, so if a Device Translator supports both interfaces, only the Lnl_SetControllerReaderDef2 method will be called.

List of functions

• Lnl_SetExtendedHeldCommand • Lnl_SetEOLTable • Lnl_OpenCloseAPBArea • Lnl_GrantOneFreePass2 • Lnl_ResetCardholderUseLimits2 • Lnl_HostAccessResponse2 • Lnl_BulkAddBadge2 • Lnl_DeleteBadge2 • Lnl_AddBadge2 • Lnl_SetReaderDefinition2 • Lnl_SetControllerReaderDef2 • Lnl_DownloadFirmware • Lnl_SetControllerAlarmDef2 • Lnl_SetSIODeviceID • Lnl_GetReaderStatus2 • Lnl_SetMaxElevatorFloors • Lnl_SetAccessLevelExtendedOptions • Lnl_EnableAccessLevelExtendedOptions • Lnl_SetIssueCodeMode • Lnl_SetAreaAPB2 • Lnl_EnableSpecialTwoManRuleOptions • Lnl_SetAreaTimezoneList • Lnl_SetArmDisarmCommand • Lnl_SetPointTextMode • Lnl_EnableArmDisarmCommand • Lnl_SetKeypadMacros • Lnl_SetKeypadDisplay

Page 284: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 284

Lnl_SetExtendedHeldCommand Purpose: Method used to set the extended held command.

Syntax: HRESULT Lnl_SetExtendedHeldCommand ( ADD_EXTENDED_HELD_DEF *prs_Def, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_Def The structure containing the extended held

command information. vb_Wait

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 285: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 285

Lnl_SetEOLTable Purpose: Method that configures a custom EOL table.

Syntax: HRESULT Lnl_SetEOLTable ( LENEL_EOL_TABLE *prs_Def, BOOL vb_Wait );

Input Parameters:

Parameter Description Value Flag indicating whether or not the serial

numbers of devices are to be enforced (TRUE indicates that the serial numbers are to be validated).

vb_Wait Flag which indicates whether to wait for a response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 286: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 286

Lnl_OpenCloseAPBArea Purpose: Method that can be used to open or close an APB area.

Syntax: HRESULT Lnl_OpenCloseAPBArea ( int areaID, int operation );

Input Parameters:

Parameter Description areaID Area ID to open or close. operation Operation to open/close an area (1 close, 2

open).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 287: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 287

Lnl_GrantOneFreePass2 Purpose: Grant one free pass.

Syntax: HRESULT Lnl_GrantOneFreePass2 ( GRANT_ONE_FREE_PASS2 *prs_US );

Input Parameters:

Parameter Description prs_US Structure containing the grant one free pass

information.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 288: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 288

Lnl_ResetCardholderUseLimits2 Purpose: Rese the use limit for cardholders.

Syntax: HRESULT Lnl_ResetCardholderUseLimits2 ( RESET_CARDHOLDER_USELIMITS2 *prs_Badge );

Input Parameters:

Parameter Description prs_Badge Reset cardholder use limit information.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 289: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 289

Lnl_HostAccessResponse2 Purpose: Method that indicates the response to a host based access request.

Syntax: HRESULT Lnl_HostAccessResponse2 ( long readerID, __int64 badgeID, long command );

Input Parameters:

Parameter Description readerID Reader ID the response is for. badgeID Badge ID the response is for. command

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 290: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 290

Lnl_BulkAddBadge2 Purpose: Bulk add badge.

Syntax: HRESULT Lnl_BulkAddBadge2 ( BULKBADGE2 *prs_Badge, BOOL vb_CheckForDup );

Input Parameters:

Parameter Description prs_Badge Badge information vb_CheckForDup

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 291: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 291

Lnl_DeleteBadge2 Purpose: Delete a badge.

Syntax: HRESULT Lnl_DeleteBadge2 ( __int64 vl_CardNumber );

Input Parameters:

Parameter Description vl_CardNumber Card number to be deleted

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 292: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 292

Lnl_AddBadge2 Purpose: Adds a badge.

Syntax: HRESULT Lnl_AddBadge2 ( BADGE2 *prs_Badge, BOOL vb_CheckForDup );

Input Parameters:

Parameter Description prs_Badge Badge information vb_CheckForDup

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL – Not Implemented

Page 293: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 293

Lnl_SetReaderDefinition2 Purpose: Sets the reader definition.

Syntax: HRESULT Lnl_SetReaderDefinition2 ( READERDEF2 *prs_RDR );

Input Parameters:

Parameter Description prs_RDR Reader definition.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 294: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 294

Lnl_SetControllerReaderDef2 Purpose: Method for defining information about the controller for a reader.

Syntax: HRESULT Lnl_SetControllerReaderDef2 ( READERDEF2 *prs_RDR );

Input Parameters:

Parameter Description prs_RDR Reader definition

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 295: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 295

Lnl_DownloadFirmware Purpose: Method used for initiating a firmware download to a panel’s downstream device.

Syntax: HRESULT Lnl_DownloadFirmware ( long DeviceID, long deviceType );

Input Parameters:

Parameter Description DeviceID Downstream device ID. deviceType Type of downstream device.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 296: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 296

Lnl_SetControllerAlarmDef2 Purpose: Configures an Alarm Panel (Input, Output) to the main panel. Syntax: HRESULT Lnl_SetControllerAlarmDef2 ( ALARM_PANEL2 *prs_AP );

Input Parameters:

Parameter Description prs_AP Structure containing the Alarm Panel

information.

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 297: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 297

Lnl_SetSIODeviceID Purpose: Used to map a numeric value (internal to the hardware) for an input / output to a specific hardware device. Syntax: HRESULT Lnl_SetSIODeviceID( long sioNumber, long deviceID ); Input Parameters:

Parameter Description sioNumber The internal numeric value that needs to be

mapped. deviceID ID of the device (reader or alarm panel)

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 298: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 298

Lnl_GetReaderStatus2 Purpose: Returns status about the readers connected to a panel.

Syntax: HRESULT Lnl_GetReaderStatus2 ( READER_STATUS2 *pro_Status );

Output Parameters:

Parameter Description pro_Status Structure containing the reader status. Return Values: Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 299: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 299

Lnl_ SetMaxElevatorFloors Purpose: Set the maximum elevator floors supported by the panel.

Syntax: HRESULT Lnl_SetMaxElevatorFloors( long maxElevatorFloors );

Input Parameters:

Parameter Description maxElevatorFloors Contains the maximum floors number.

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 300: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 300

Lnl_EnableAccessLevelExtendedOptions

Purpose: Enable extended options for access level.

Syntax: HRESULT Lnl_EnableAccessLevelExtendedOptions( BOOL enabled );

Input Parameters:

Parameter Description enabled Enable/disable the extended options for access

level

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 301: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 301

Lnl_ SetAccessLevelExtendedOptions Purpose: Set the extended options for access level.

Syntax: HRESULT Lnl_SetAccessLevelExtendedOptions( EXTENDED_ACCESS_LEVEL *prs_EAC );

Input Parameters:

Parameter Description prs_EAC Structure containing the Access level extended

options.

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 302: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 302

Lnl_SetAreaAPB2

Purpose: Sets an anti-passback area in the panel.

Syntax: HRESULT Lnl_SetAreaAPB2( AREAAPB2 *prs_Area, BOOL vb_Wait );

Input Parameters:

Parameter Description prs_Area Structure containing anti-passback area

information. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 303: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 303

Lnl_EnableSpecialTwoManRuleOptions Purpose: Enable special options for two man rule configuration. Syntax: HRESULT Lnl_EnableSpecialTwoManRuleOptions( BOOL enabled );

Input Parameters:

Parameter Description enabled Enable/disable the special options for two man

rule configuration.

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 304: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 304

Lnl_SetAreaTimezoneList

Purpose: Set the time zone and actions of an area.

Syntax: HRESULT Lnl_SetAreaTimezoneList( AREA_TZLIST *prs_List );

Input Parameters:

Parameter Description prs_List Structure containing the list of time zones and

actions of an area

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 305: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 305

Lnl_SetArmDisarmCommand

Purpose: Configure arm/disarm command

Syntax: HRESULT Lnl_SetArmDisarmCommand( ADD_EXTENDED_HELD_DEF *prs_Def , BOOL vb_Wait );

Input Parameters:

Parameter Description prs_Def Structure containing the configuration of

arm/disarm command. vb_Wait Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 306: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 306

Lnl_EnableArmDisarmCommand

Purpose: Sets a flag within the device translator that enables / disables the arm/disarm command.

Syntax: HRESULT Lnl_EnableArmDisarmCommand( BYTE mode );

Input Parameters:

Parameter Description mode The mode of arm/disarm command

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Modes: 0 – Disables the arm/disarm command 1 – Enables standard arm/disarm command support 2 – Enables advanced arm/disarm command support

Page 307: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 307

Lnl_SetPointTextMode

Purpose: Set which device names are sent to the controller.

Syntax: HRESULT Lnl_SetPointTextMode( BYTE mode );

Input Parameters:

Parameter Description mode The mode of point text mode

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Modes: bit-0 == allocate text storage for alarm inputs bit-1 == allocate text storage for relay outputs bit-2 == allocate text storage for access readers

Page 308: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 308

Lnl_SetIssueCodeMode

Purpose: Set the issue code mode used by the panel.

Syntax: HRESULT Lnl_SetIssueCodeMode( BYTE IssueCodeMode );

Input Parameters:

Parameter Description IssueCodeMode Set the issue code mode (0, 1, or 2)

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 309: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 309

Lnl_SetKeypadMacros

Purpose: Used to configure key sequences in order to execute commands at a command keypad using HotKeys (e.g. F1, F2, F3, etc.).

Syntax: HRESULT Lnl_SetKeypadMacros( USER_COMMAND_MACROS *prs_Def );

Input Parameters:

Parameter Description prs_Def Structure containing the keypad command

macro

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 310: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 310

Lnl_SetKeypadDisplay

Purpose: Used to configure how text is displayed on a comand keypad device.

Syntax: HRESULT Lnl_SetKeypadDisplay( KEYPAD_DISPLAY *prs_Def );

Input Parameters:

Parameter Description prs_Def Structure containing the keypad display

configuration.

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 311: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 311

IAccessControl2 Structures ALARM_PANEL2 Type Parameter Description long si_PanelID Panel ID. long sb_PanelNumber Alarm panel number (65 - 81). BYTE sb_Activate T/F activate of delete the

panel BYTE sb_AAPPort Port that panel is connected to

on Access Control panel. BYTE sb_CommAddress Communication address of the

Panel (usually set by DIP switches).

BYTE sb_CtrlType Type of Alarm Panel. (see defines at the end of this section).

long sb_NextPanelID Used for elevator control - next panel id.

long alarmPanelSIO

RESET_CARDHOLDER_USELIMITS2 Type Parameter Description long si_PanelID Panel ID this command is for. __int64 sl_CardNumber Cardnumber to reset use limit

for. BYTE sb_UseLimit Use limit is set to.

GRANT_ONE_FREE_PASS2 Type Parameter Description long si_PanelID Panel ID that the Grant One

Free Pass command is being sent to.

__int64 sl_CardNumber Cardnumber to grant one free pass to.

Page 312: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 312

EXTENDED_HELD_DEF Structure used to define the extended held command.

Type Parameter Description char CommandCode[6] Command code for the command. long MinExtendedHeldTime Minimum amount of time for the

extended held command. long MaxExtendedHeldTime Maximum amount of time for the

extended held command. long PreAlarmTime Pre-alarm time.

ADD_EXTENDED_HELD_DEF Structure used to define the extended held command.

Type Parameter Description long si_PanelID Panel ID long si_SegmentID Segment ID EXTENDED_HELD_DEF extededHeldDef Extended held definition.

LENEL_EOL_TABLE_ENTRY Structure used to configure the custom EOL tables in the panel.

Type Parameter Description long ReportingPriority Reporting priority (0, 1, and 2

are used, 0 is highest). long StatusCode Status code:

0 – inactive 1 – active 2 – Supervisory Fault: "ground fault" - one (or both) lines is grounded 3 – Supervisory Fault: "shorted circuit" 4 – Supervisory Fault: "open circuit" 5 – Supervisory Fault: "foreign voltage" 6 – Supervisory Fault: "non-settling error"

long ResistanceCode1 Resistance code 1. long ResistanceCode2 Resistance code 2.

Page 313: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 313

LENEL_EOL_TABLE Structure used to configure the custom EOL tables in the panel.

Type Parameter Description long si_PanelID Panel ID. long si_SegmentID Segment ID. long TableID ID of the custom EOL table. LENEL_EOL_TABLE_ENTRY entries[8] The individual resistance

entries of the table.

GRANT_ONE_FREE_PASS2 Type Parameter Description long si_PanelID Panel ID that the Grant One Free Pass

command is being sent to. __int64 sl_CardNumber Cardnumber to grant one free pass to.

RESET_CARDHOLDER_USELIMITS2 Type Parameter Description long si_PanelID Panel ID this command is for. __int64 sl_CardNumber Cardnumber to reset use limits for. BYTE sb_UseLimit Use limit to set to.

BULKBADGE2 Used when a panel is being downloaded due to initial power up or panel being reset in the field. This message allows for up to 41 badges to be downloaded in a single message to the driver. This reduces the number of communication attempts that are needed to download information to the panel.

Type Parameter Description long si_PanelID Panel ID that the badge

are intended for. long si_NumBadges Number of badges in the

structure BADGE2 [MAX_BADGES_PER_CMD_DEF]

ss_Badges Array of up to 41 badges containing all badge information for the cardholder.

Page 314: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 314

BADGE_EXT2 This structure represents the access privileges that are assigned to a given badge which is being downloaded. There are 3 types of access privileges which can be assigned to a cardholder via this structure. 1) access levels 2) precision access – reader inclusion groups 3) precision access – reader exclusion groups.

Type Parameter Description long sl_FirstRdrs User for precision access

to represent the readers which are to be excluded from usage by the cardholder. This ling represents the first 32 readers. Bit 0 == reader 1.

long sl_SecndRdrs User for precision access to represent the readers which are to be excluded from usage by the cardholder. This ling represents the second 32 readers. Bit 0 == reader 33.

long [MAX_READERS] sb_InclList An array of 64 longs used for controlling precision access for a cardholder. Each array entry contains a timezone when the cardholder is permitted to access that reader. Array entries 0 – 63 correspond to readers 1 – 64 that the access panel can contain. The actual value of the timezone entry are panel specific up to the number of timezones supported by the access panel. Use DecodeSegmentValue to convert this value into the proper value based on segment.

Page 315: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 315

long [MAX_ACCLEVELS_CARDHOLDER]

sl_AccessLevels An array of up to 32 access levels per cardholder. An access level references a table of reader / timezone combinations. Access level definitions are constant across all panels within a defined segment. Ex. If there are two panels within segment A, access level 2 when assigned to a cardholder spans both panels. Use DecodeSegmentValue to convert this value into the proper value based on segment.

BADGE2 The Badge structure defines all of the attributes associated with a given badge for a cardholder. The badge structure defines the panels that this badge information is to be downloaded to as well as all of the access permissions and operating characteristics associated with the badge.

Type Parameter Description long si_PanelID This specifies the specific

panel ID that this badge information is to be downloaded to. If the panel ID is –1, this means that the member sb_PanelArray contains a list of multiple panels that the same information is to be downloaded to.

long si_SegmentID Specifies the specific segment ID that the panel belongs to. If the system is not segmented, the segment ID will be LNL_INVALID_SEGMENT.

__int64 sl_CardNumber Cardnumber for the badge. long sb_AccessLevel N/A BYTE sb_IssueCode Issue code of the badge.

Page 316: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 316

BYTE sb_APBLocation Current Area Anti-Passback Location. Used to reset APB status for the cardholder or place the cardholder in a specific location.

char [MAX_PIN_DIGITS]

sb_PIN PIN Code for the badge. Array of up to 9 characters allows for leading 0s’ to be a valid PIN Code entry.

SYSTEMTIME ss_ActivationDate Activation Date for the badge. Can be set in the future.

SYSTEMTIME ss_DeactivationDate Deactivation Date for the badge. Access will be not be granted after this date.

FLAG sb_CheckBeforeDeny Allows for host based processing of access denials. Indicates that the access panel is to pass this message up to the driver for further processing.

FLAG sb_CheckBeforeGrant Allows for host based processing of access grants. Indicates that the access panel is to pass this message up to the drvier for further processing.

FLAG sb_APBExempt Flag that indicates that this cardholder is exempt from Anti-passback or area control rules.

FLAG sb_APBOneFreePass Resets the APB status of the cardholder.

FLAG sb_APBNotUsed Resets the APB status of the cardholder.

BYTE sb_TimedAPBDelay Anti-Passback Delay for timed Anti-Passback Control. Indicates that this card cannot be used at the same reader for X number of minutes.

BYTE sb_UseLimit Use limit of the card. After the card has been used this number of times at a specific panel, it is no longer valid. –1 indicates infinite usage.

BYTE sb_CommandAuthority Specifies that this cardholder can issue commands at a

Page 317: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 317

keypad reader. long sl_VDT Handicap flag. When used, the

extended strike and held open times are applied to the cardholder.

BYTE sb_PassageMode Offline Lock - can user enable passage mode.

BYTE sb_DeadboltOverride Offline Lock - Can user override deadbolt on a mortise V Series.

long sl_AssetGroup Asset group the cardholder belongs to.

BADGE_EXT2 ss_BdgExts Structure of cardholder access levels and access permissions.

BYTE sb_FirstCardUnlockAuthority Specifies that this cardholder can use first card unlock at a reader that is configured for first card unlock.

READERDEF2 Structure used to define/configure a reader in an Access Control panel.

Type Parameter Description long si_PanelID Panel ID the reader is attached to. short sb_ReaderNumber Reader number (0 - 63) BYTE sb_Activate T/F activate of delete the reader BYTE sb_AAPPort Port that reader is connected to on the

panel. BYTE sb_CommAddress Communication address of the Reader

(usually set by DIP switches). BYTE sb_CtrlType Type of controller of Reader (See

Defines at the end of this section for list of available reader types).

BYTE sb_StrikeTime Max seconds for activated door strike (1-255, default usually 8).

long sb_OpenTime Max seconds for held open door time (default usually 75).

BYTE sb_OfflineMode Mode reader is placed in when communications is lost with the panel (See Defines at the end of this section for available reader modes).

BYTE sb_AccessMode Access mode of the reader (See Defines at the end of this section for available reader modes).

Page 318: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 318

BYTE sb_DenyIfDuress Deny access if duress code is detected (0-False, 1-True).

BYTE sb_ElevatorReader Is the reader an elevator reader (0-False, 1-True).

BYTE sb_DoNotWait Move into APB area regardless if door was opened (0-False, 1-True).

BYTE sb_Downloadable Is the reader downloadable (0-False, 1-True).

BYTE sb_CardSpecification Indicates the cardholder database layout for downloadable readers.

BYTE sb_PairedMaster Entrance reader for APB area (0-False, 1-True).

BYTE sb_PairedSlave Exit reader for APB area (0-False, 1-True).

BYTE sb_UseAuxAsBolt Use aux output as door bolt monitor (0-False, 1-True - AMS102-105 only).

BYTE sb_FastBoltAlarm Set for fast door bolt alarm detection (0-False, 1-True).

BYTE sb_AcceptCmds Determines if the reader accepts reader commands (0-FALSE, 1-TRUE).

BYTE sb_PreAlarm Determines if the reader is to use pre alarm (0-FALSE, 1-TRUE).

BYTE sb_2CardCtrl Determines if the reader is to use two card control (0-FALSE, 1-TRUE).

long [8] sb_CardFormat Card formats for this reader. This is an array of up to 8 card formats. Each index in the array will contain the card format ID that the reader is assigned.

BYTE sb_DiddleCnt Number of consecutive denials before report generated (0-255, default 0).

short sb_AreaLeaving APB area that you are leaving when using reader.

short sb_AreaEntering APB area that you are entering when using reader.

long sb_ForcedOpenTZ Masks forced open alarm during this TZ. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sb_HeldOpenTZ Masks held open alarm during this TZ. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sb_AuxInputTZ Masks aux input during TZ. Use DecodeSegmentValue to convert this value into the proper value based on segment.

Page 319: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 319

long sb_Output1TZ Activates reader output 1 during this TZ. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sb_Output2TZ Activates reader output 2 during this TZ. Use DecodeSegmentValue to convert this value into the proper value based on segment.

BYTE sb_Output1State Initial state of reader output 1 (0-Off, 1-On)

BYTE sb_Output2State Initial state of reader output 2 (0 Off, 1- On)

BYTE sb_MaskForcedOpen Mask forced open alarms always (0-False, 1-True)

BYTE sb_MaskHeldOpen Mask held open alarms always (0-False, 1-True)

BYTE sb_MaskAuxAlarm Mask aux alarm always (0-False, 1-True)

BYTE sb_MaskAuxAlarm2 Mask aux alarm always (0-False, 1-True)

long sb_DayModeTZ Activate DayFloors List during timezone when reader is an elevator reader. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sl_DayFloors Floor list to activate during dayModeTZ when reader is an elevator reader.

long sl_FacCodeFloors Array of floors for access while in facility mode when reader is an elevator reader..

long sl_CyperCode 6 digit max number containing cyper code for reader.

BYTE sb_TimedAPB Timed anti-passback value (0-255, default 0).

BYTE sb_SoftAPB Use soft anti-passback (0-False, 1-True). long sb_LogGrantTZ Used by Communication Server to only

log Access Grants during a particular timezone. (0 indicates to always log access grants).

long sb_LogDenyTZ Used by Communication Server to only log Access Denies during a particular timezone. (0 indicates to always log access denies).

long sb_LogStatusTZ Used by Communication Server to only log Status during a particular timezone. (0 indicates to always log Status).

Page 320: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 320

BYTE sb_DecUseLimit Determines if Use Limits are enforced (0-False, 1-True). If enforced, each time a use-limited badge is used at this reader, the badge’s use limit is decremented for the associated Access Panel.

BYTE sb_NoRexOnStrike Determines if the door strike will NOT be energized when the REX contact is closed (0-False, 1-True).

long sl_Out1Pulse Duration of output 1’s pulse in seconds (0- 30000, default 0).

long sl_Out2Pulse Duration of output 2’s pulse in seconds (0- 30000, default 0).

long sb_AuxInput2TZ Masks aux input during a timezone. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sb_AuxInput3TZ Masks aux input during a timezone. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sb_ElevatorAccessLevel

Elevator Control Level that will be used to access floors via this reader when reader is an elevator reader. Use DecodeSegmentValue to convert this value into the proper value based on segment.

BYTE sb_SlaveID Reader ID of the slave reader attached to this reader.

BYTE sb_MaskAuxAlarm3 Mask aux alarm always (0-False, 1-True).

BYTE [14] sl_FuncList Global I/O function list associated with keypad command. Index in the array from 0-1 indicates the keypad command. (Pin+10/20, Func 4/5, Func 6/7, Func 8/9, Func 10/11, Func 12/13, Func 14/15).

BYTE [MAX_FUNCS_READER]

sb_TermList Logic term associated with the Global I/O function list associated with keypad command. Index in the array from 0-1 indicates the keypad command. (Pin+10/20, Func 4/5, Func 6/7, Func 8/9, Func 10/11, Func 12/13, Func 14/15).

BYTE sb_KeypadMode Reader keypad mode (see defines section for list of possible keypad mode

Page 321: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 321

types). BYTE sb_StrikeMode Indicates how the door strike will

behave when a valid card swipe occurs. (STRIKE_MODE_CLOSE = 0, strike will cut off as soon as door is closed; STRIKE_MODE_OPEN = 1, strike will cut off as soon as door is opened)

BYTE sb_TwoWireLED Configures the LED on the reader. (0 – “1-Wire LED Control (Std)”, 1 – “2-Wire LED Control”, 2 – “Dorado LED Control”).

long sb_StrikeTime2 Extended strike time in seconds (1-255). long sb_OpenTime2 Extended held open time (1-255). long sl_DCSupervision Door contact EOL Table (covers

supervision and no/nc). long sl_REXSupervision REX EOL Table (covers supervision

and no/nc). long sl_Aux1Supervision Aux1 EOL Table (covers supervision

and no/nc). long sl_Aux2Supervision Aux2 EOL Table (covers supervision

and no/nc). long sl_Aux1Latched Used in conjunction with the Entry

Delay field. If Selected (i.e., non-latched mode), when this auxiliary input is active the alarm will NOT be reported until the Entry Delay time expires. The alarm will be reported if this input is still active at the end of the specified delay. Application: invalid motion detector reads. If not selected (i.e., latched mode), when this auxiliary input is active the alarm WILL be reported unless this input is masked (either automatically through the software or manually via a keypad). Application: access a secured door. (0-Not Selected, 1-Selected)

long sl_Aux1EntryDelay Specifies the delay, in seconds, from the time this auxiliary input switches to an unmasked state until it is actually reportable (0-3600).

long sl_Aux1ExitDelay Specifies the delay, in seconds, for this auxiliary input to switch from a masked state to an unmasked state (0-3600). When an auxiliary input is unmasked, active alarms will NOT be reported until

Page 322: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 322

the Exit Delay expires. Application: securing a door when leaving a building.

long sl_Aux2Latched Used in conjunction with the Entry Delay field. If Selected (i.e., non-latched mode), when this auxiliary input is active the alarm will NOT be reported until the Entry Delay time expires. The alarm will be reported if this input is still active at the end of the specified delay. Application: invalid motion detector reads. If not selected (i.e., latched mode), when this auxiliary input is active the alarm WILL be reported unless this input is masked (either automatically through the software or manually via a keypad). Application: access a secured door. (0-Not Selected, 1-Selected)

long sl_Aux2EntryDelay Specifies the delay, in seconds, from the time this auxiliary input switches to an unmasked state until it is actually reportable (0-3600).

long sl_Aux2ExitDelay Specifies the delay, in seconds, for this auxiliary input to switch from a masked state to an unmasked state (0-3600). When an auxiliary input is unmasked, active alarms will NOT be reported until the Exit Delay expires. Application: securing a door when leaving a building.

ELEVATOR_HW_INFO [8]

sl_ElevatorInputID Elevator input panel.

ELEVATOR_HW_INFO [8]

sl_ElevatorOutputID Elevator output panel.

long sl_TrackElevatorInputRequests

Are we tracking input requests?

long sl_OnlineFacEAL Used for Lenel hardware to track online facility mode / offline access.

BYTE sb_ChassisType Chassis type of the offline lock, this value corresponds to the value located in the database. (Currently only used by offline locks.).

long sl_DeniedAttemptsCntTO

Denied attempts count timeout; 0-999 seconds. (Currently only being used by offline locks.)

wchar_t [64] sl_ReaderName Name of the reader (currently the first 32 bytes are being used). The name is

Page 323: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 323

passed down as UNICODE. BYTE sb_DisableAsset True if asset reader is to disable asset... BYTE sb_LookAhead Determines if the look ahead feature is

being used; 0-Look Ahead not used, 1-Look Ahead is being used. (Currently only being used by offline locks.)

BYTE sb_LookAheadOffset The offset used for look ahead. (Currently only being used by offline locks.)

BYTE sb_LookAheadRange The range used for look ahead. (Currently only being used by offline locks.)

long sl_Chassis_Volume The chassis volume being used. (Currently only being used by offline locks.)

long sl_ReaderMemory The amount of memory for the reader. (Currently only being used by offline locks.)

BYTE sb_UseActivationDate Indicates if the reader is to use the Activation Date; 0-Activation Date not used, 1-Activation Date is used. (Currently only being used by offline locks.)

BYTE sb_UseExpirationDate Indicates if the reader is to use the Expiration Date; 0-Expiration Date not used, 1-Expiration Date is being used. (Currently only being used by offline locks.)

long sl_NumCardholders Number of cardholders that the reader can hold. (Currently only being used by offline locks.)

long sl_FirstBadgeNumber The first badge number for reader. (Currently only being used by offline locks.)

long sl_NumberOfBadges The number of badges for the reader. (Currently only being used by offline locks.)

long sl_altrdr_sio Alternate reader link long sl_altrdr_number Reader number on the sio. long sl_altrdr_spec Alternate reader configuration.

(ALTERNATE_READER_NONE = 0, ALTERNATE_READER_NORMAL = 1, ALTERNATE_READER_BIO1 = 2)

BYTE sb_AlternateReader Indicates if this reader is an alternate reader.

BYTE sb_BioVerify Use Biometric Verification (0-False, 1-

Page 324: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 324

True). BYTE sb_BioEnroll Use Biometric Enroll if the biometric

template is not present. (0-False, 1-True).

BYTE sb_HostDecisionOnGrant

Indicates if the reader is to request a host based decision on a grant.

BYTE sb_HostDecisionProceedWithGrant

Determines what to do when a host based decision times out (0 – Deny all access, 1 – proceed with grant based on access level).

BYTE sb_GlobalAPB Indicates if the reader is involved with Global APB, used internally by Lenel.

long sl_AuxIn1HoldTime Hold time (in seconds) for Aux Input 1. long sl_AuxIn2HoldTime Hold time (in seconds) for Aux Input 2. long sl_DCDebounce Debounce value (Lenel enumeration) for

the Door Contact. long sl_REXDebounce Debounce value (Lenel enumeration) for

the REX. long sl_AuxIn1Debounce Debounce value (Lenel enumeration) for

Aux Input 1. long sl_AuxIn2Debounce Debounce value (Lenel enumeration) for

Aux Input 2. BYTE sb_CipherMode T/F Flag indicating if this reader should

accept cipher mode access. BYTE sb_FirstCardUnlock T/F Flag indicating if this reader should

be placed in first card unlocked mode. BYTE sb_FirstCardUnlockAu

thorityRequired T/F Flag indicating if this reader requires special authority of the Badge in order to unlock when an access grant occurs while the ready is in first card unlocked mode.

long alternateReaderID The ID to be used for the alternate reader.

BYTE turnstileSupport Indicates if a reader will be used for turnstile support.

long readerSIO Specifies the internal SIO number to be used for access readers.

long readerNumber The ID of the reader attached to the access control panel. Used along with the readerSIO value to create a mapping from SIO to deviceID.

long prealarmTimeout Specifies when the pre-alarm notification will be issued (# seconds before the actual alarm will occur)

BYTE tailgateOption Used to specify an access control reader will use special tail gate functionality.

Page 325: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 325

wchar_t [32] aux1Name Used to send the name of the reader auxiliary input down to the reader.

wchar_t [32] aux2Name Used to send the name of the reader auxiliary input down to the reader

BYTE allowArmDisarmCommand

Specified whether or not an access reader will allow instrusion style arm/disarm commands at the reader via the keypad.

BYTE rexEvents Sets a flag indicating if REX related events should be reported to the host application.

long defaultIntrusionArea Used to specify an intrusion area (i.e. mask group) to be controlled by a specific command keypad reader.

INTRUSION_CMD_CONFIG

intrusionCmdA Structure containing configuration values for intrusion style commands executed at a command keypad.

INTRUSION_CMD_CONFIG

intrusionCmdB Structure containing configuration values for intrusion style commands executed at a command keypad.

BYTE instantCommandModes

Specifies the execution mode to be applied to instant commands that are executed at a reader.

BYTE assetRequired Indicates if an asset is required to be presented at a reader before access will be allowed.

Page 326: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 326

INTRUSION_CMD_CONFIG Type Parameter Description Long accessTimeOut How long (in seconds) a user

has to execute commands at a command keypad after they have received an access grant from the reader.

long authorityLevel0 Specifies the set of commands that can be executed with level 0 authority (i.e. No authority required)

long authorityLevel1 Specifies the set of commands that can be executed with level 0 authority (i.e. Level 1 authority required)

long authorityLevel2 Specifies the set of commands that can be executed with level 0 authority (i.e. Level 2 authority required)

Page 327: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 327

READER_STATUS2

Type Parameter Description long si_PanelID Panel ID the reader is attached

to. BYTE sb_AsyncStatus Indicates how the reader status is

returned (1-Asynchronously, 0- Synchronously). When the status is returned synchronously the structure will be filled out with the status information. To return status asynchronously individual status messages need to be sent via the IDistributeEvent interface.

__int64 [LAST_READER_ID+1]

sb_Devices Status of the readers. Each index represents a reader (0 is not used) and the status is a bitmap of various values. (See Defines at the end of this section for the Reader Status Bits).

BYTE [LAST_READER_ID+1]

sb_DeviceMaskStatus Mask status of the readers (Similar to the device status just doesn’t use as many status bits).

BYTE [LAST_READER_ID+1]

sb_DeviceMode Reader access mode of each reader.

BYTE [LAST_READER_ID+1]

sb_AlternateReaderStatus Status of the Alternate Reader that is linked with this reader. 0 indicates good status or not being used.

EXTENDED_ACCESS_LEVEL Type Parameter Description long si_PanelID Panel ID. long si_SegmentID Segment ID. Long si_AccessLevelID The ID of the access level to

be configured with extended options.

Short sb_EscortCode Specified the escort mode to

Page 328: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 328

be used along with the access level (0 - Not an escort, 1 - Escort, 2 - Requires an escort)

SYSTEMTIME sb_ActivationDateTime Activation time of the access level.

SYSTEMTIME sb_DeactivationDateTime Deactivation time of the access level.

AREAAPB2 Type Parameter Description Long si_PanelID Panel ID. Int si_AreaID APB area ID FLAG si_TwoManControl Indicates if two man control is

being used (at least two cardholders must be in area at all times). (0-False, 1-True).

FLAG si_AreaClosed Indicates if the area closed event will be generated. Cardholders will still be granted access unless the area closed rules are in place. (0-False, 1-True).

int si_DenyAllIfClosed Indicates if Deny All If Closed is being used (0-False, 1-True). This denies access to all cardholders if the area is closed. The si_AreaClosed field also needs to be set to 1 for this to work.

int si_ReaderID If the si_AreaClosed field has been set (1) this field can be used to select a reader to cardholders can use to gain access to the area.

int si_MaxOccupancy Maximum occupancy of the area. Once capacity is reached the area is closed.

int si_MaxCount Indicates the number of people that must be in this area before the action at maximum is applied to the specified logic term of the specified function

Page 329: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 329

list. int si_MinCount Indicates the minimum

number of people that must be in this area before the action at minimum is applied to the specified logic term of the specified function list.

int si_RuleID Global I/O function list associated with the area’s occupancy levels.

int si_RuleTerm Global I/O Function list term. int si_MinArg Sets the value of the logic

term when the minimum occupancy is reached (Do Nothing - 0, Set False - 1, Set True - 2, Pulse - 3).

int si_MaxArg Sets the value of the logic term when the maximum occupancy is reached (Do Nothing - 0, Set False - 1, Set True - 2 , Pulse - 3).

int si_AreaType Area type: 0-Normal, 1-Muster Zone, 2-Safe Location. Used for Mustering.

int si_AreaAPBID Unique ID for area from database. Used for Global APB

long si_SegmentID Segment ID for the area. Used for Global APB.

__int64 Owner Badge ID of the area owner (used with special 1 man rule)

short requestRelayDelay Delay realy output from beig activated (Time in seconds 1 – 255)

long requestRelaySIO The SIO number of the request relay (used with special 2 and 1 man rules)

long requestRelayNum The Relay number of the request relay (used with special 2 and 1 man rules)

Page 330: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 330

USER_COMMAND_MACROS Type Parameter Description Long panelID The ID of the panel to be

configured with macro key sequences.

Short readerNumber The ID of the reader attached to the access control panel that will be configured with macro key sequences.

Short numMacros The number of macros configured for the reader.

COMMAND_MACRO [20] macroList A fixed size array of key sequences associated with the macro.

Page 331: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 331

COMMAND_MACRO Type Parameter Description Short type Not used / Future use short keySpec Specifies the HotKey to be used on a command keypad to execute the

assigned macro key sequence. 1="F1",2="F2",3="F3",4="F4",5="F1&F2",6="F2&F3",7="F3&F4",8="F1&F4"

Unsigned char [16]

Macro A fixed size array of 16 characters that make up the key sequence for the macro.

KEYPAD_DISPLAY Type Parameter Description Long panelID The Panel ID to be

configured with keypad display options.

Short readerNumber The ID of the reader attached to the access control panel that will be configured with keypad display options.

Short keypadDisplaySpec A bitmap of values that specify the command keypad display options.

KEYPAD_DISPLAY_STRING [8]

stringArray An array of display strings to be assigned to the command keypad for display.

NOTE : The following values are Mercury specific keypadDisplaySpec bitmap options: // bit-0 = change settings. (This bit must be set for this field to be processed) // bit-1 = clear all background text line buffers // bit-2 = display the time of day // bit-3 = selects the time display mode: 0 == 12 hour AM/PM, 1 == 24-hour mode // bit-4 = display the User Specified Background text (cycle through all valid entries) // bit-5 = display the status of the MPG associated with this Acr // bit-6 = display the Name of Active Zones in the default MPG (bit-5 must be active) // bit-7 = select "slow" update cycle time (3 sec vs. 2 seconds)

Page 332: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 332

KEYPAD_DISPLAY_STRING Type Parameter Description Unsigned char [16] displayString A fixed size array of

characters to be displayed on the command keypad.

LENEL_EOL_TABLE Type Parameter Description Long PanelID The Panel ID to be

configured with EOL resistor values.

Long SegmentID The segmet to which the access control panel belongs

Long TableID The ID of the EOL table within the access control panel.

LENEL_EOL_TABLE_ENTRY [8]

Entries A fixed size array of resistance values associated with the EOL table.

LENEL_EOL_TABLE_ENTRY Type Parameter Description Long ReportingPriority Specifies the priority to be

applied for resistance values that fall with this range.

Long StatusCode Specifies the state of the input when it falls within the specified resistance range.

long ResistanceCode1 Specifies the lower limit for the resistance range.

long ResistanceCode2 Specifies the upper limit for the resistance range.

Page 333: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 333

ADD_EXTENDED_HELD_DEF Type Parameter Description Long si_PanelID The Panel ID to be configured

with extended held / intrusion commands.

Long si_SegmentID The segmet to which the access control panel belongs

EXTENDED_HELD_DEF extendedHeldDef A structure containing values that configure extended held / intrusion parameters

EXTENDED_HELD_DEF Type Parameter Description unsigned char [6] CommandCode The command code used to

trigger the execution of an extended held / intrusion command.

Long MinExtendedHeldTime Only used with the extended held command. Specifies the minimum number of minutes to extended the held open time.

long MaxExtendedHeldTime Only used with the extended held command. Specifies the maximum number of minutes to extended the held open time.

long PreAlarmTime Only used with the extended held command. Specifies when the pre-alarm notification will be issued (# seconds before the actual alarm will occur)

Page 334: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 334

IAccessControl2 Error Codes Name Value Description

Page 335: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 335

IAccessControl3 Functions The IAccessControl3 interface is a standalone interface for access control integration. The interface extends functionalities for some of the methods in IAccessControl and IAcessControl2 interfaces. If a Device Translator supports this interface and other IAccessControl interface/s and there are similar methods in the interfaces, the one in this interface is the one that will be used. For example, the IAccessControl interface supports the Lnl_SetControllerReaderDef method, the IAccessControl2 interface supports the Lnl_SetControllerReaderDef2 method, and the IAccessControl3 interface supports the Lnl_SetControllerReaderDef3 method. If a Device Translator supports this interface and other IAccessControl interface/s, only the Lnl_SetControllerReaderDef3 method will be called.

List of functions

• Lnl_BulkAddBadge3 • Lnl_AddBadge3 • Lnl_MoveBadge • Lnl_DeleteBadge3 • Lnl_SetReaderDefinition3 • Lnl_SetControllerReaderDef3 • Lnl_DownloadFirmware2 • Lnl_SetControllerAlarmDef3 • Lnl_AddAccessLevel2 • Lnl_AddDownloadAccessLevel2 • Lnl_AddCommandAccessLevel2 • Lnl_ReaderDownload2 • Lnl_DisableIntrusionLevelsForAccessControl • Lnl_SetCardFormatAssignments • Lnl_SetCardFormat2 • Lnl_AddTimezone2 • Lnl_SetDoor • Lnl_ActivateTimezone2 • Lnl_AddHolidays2 • Lnl_GetAreaStatus2 • Lnl_AreaSetSuspendSchedules • Lnl_SetInterPanelLinks2 • Lnl_SetInputPointBypassMode • Lnl_SetFunctionList2 • Lnl_SetAreaAPB3

Page 336: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 336

Lnl_BulkAddBadge3 Purpose: Bulk add badge.

Syntax: HRESULT Lnl_BulkAddBadge3( BULKBADGE3* pBadge );

Parameters:

Parameter Description pBadge [in] Badge information

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 337: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 337

Lnl_AddBadge3 Purpose: Add a badge.

Syntax: HRESULT Lnl_AddBadge3 ( BADGE3* pBadge );

Parameters:

Parameter Description pBadge [in] Badge information

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL – Not Implemented

Page 338: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 338

Lnl_MoveBadge Purpose: Move a badge to an area.

Syntax: HRESULT Lnl_MoveBadge ( __int64 nCardNumber long areaID BYTE checkPermissionsOnly );

Parameters:

Parameter Description nCardNumber [in] Badge number to be moved to an area areaID [in] Area ID of the area to which the badge will

be moved checkPermissionsOnly [in]

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL – Not Implemented

Page 339: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 339

Lnl_DeleteBadge3 Purpose: Delete a badge.

Syntax: HRESULT Lnl_DeleteBadge3 ( __int64 nCardNumber long nIssueCode );

Parameters:

Parameter Description nCardNumber [in] Badge number to be deleted nIssueCode [in] Issue code of the badge

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 340: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 340

Lnl_SetReaderDefinition3 Purpose: Set the reader configuration.

Syntax: HRESULT Lnl_SetReaderDefinition3 ( READERDEF3 *pReaderDef );

Parameters:

Parameter Description pReaderDef [in] Reader definition.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 341: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 341

Lnl_SetControllerReaderDef3 Purpose: Method for defining information about the controller for a reader.

Syntax: HRESULT Lnl_SetControllerReaderDef3 ( READERDEF3 * pReaderDef );

Parameters:

Parameter Description pReaderDef [in] Reader definition

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 342: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 342

Lnl_DownloadFirmware2 Purpose: Method used for initiating a firmware download to a panel’s downstream device.

Syntax: HRESULT Lnl_DownloadFirmware2 ( long nDeviceID, long nCtrlType, long nFirmwareType );

Parameters:

Parameter Description nDeviceID [in] Downstream device ID (reader or alarm

panel). nCtrlType [in] The controller device type nFirmwareType [in] The type of firmware to be downloaded

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 343: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 343

Lnl_SetControllerAlarmDef3 Purpose: Configure an Alarm Panel (Input, Output) to the main panel. Syntax: HRESULT Lnl_SetControllerAlarmDef3 ( ALARM_PANEL3* pInfo );

Parameters:

Parameter Description pInfo [in] Structure containing the Alarm Panel

information.

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 344: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 344

Lnl_AddAccessLevel2 Purpose: Adds access level to panels.

Syntax: HRESULT Lnl_AddAccessLevel2 ( ACCESS_LEVEL2 *pAccessLevel );

Input Parameters:

Parameter Description pAccessLevel Structure containing access level

information.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 345: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 345

Lnl_AddDownloadAccessLevel2 Purpose: Adds access levels to intelligent readers.

Syntax: HRESULT Lnl_AddDownloadAccessLevel2 ( READER_ID_ARRAY *pInfo );

Parameters:

Parameter Description pInfo [in] Structure used for downloading access

levels to intelligent readers.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 346: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 346

Lnl_AddCommandAccessLevel2 Purpose: Add a command access level to an intelligent reader. This allows users with the proper access levels to issue commands at this reader.

Syntax: HRESULT Lnl_AddCommandAccessLevel2 ( READER_ID_ARRAY *pInfo );

Parameters:

Parameter Description pInfo [in] Structure that contains the command access

level information.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 347: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 347

Lnl_ReaderDownload2 Purpose: This method is used to inform the Device Translator that a reader download has been requested and that the Device Translator needs to make the Lnl_StartReaderDownload call to the Lenel Communication Server via the IDistributeEvent interface.

Syntax: HRESULT Lnl_ReaderDownload2 ( READER_ID_ARRAY *pInfo );

Parameters:

Parameter Description pInfo [in] Pointer to the structure containing the

reader download information.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 348: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 348

Lnl_DisableIntrusionLevelsForAccessControl Purpose: Disable intrusion levels for access control.

Syntax: HRESULT Lnl_DisableIntrusionLevelsForAccessControl(

BOOL disable );

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 349: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 349

Lnl_SetCardFormatAssignments Purpose: Sets card format assignments if card formats are supported per panel basis.

Syntax: HRESULT Lnl_SetCardFormatAssignments( long* pFormatIDs, ULONG nCount );

Parameters:

Parameter Description pFormatIDs [in] Card formats assignments nCount [in] Number of assignment

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 350: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 350

Lnl_SetCardFormat2 Purpose: Sets a card format in the panel.

Syntax: HRESULT Lnl_SetCardFormat2 ( CARD_FORMAT_CFG2 *prs_CardCfg, BOOL vb_WaitForRsp );

Parameters:

Parameter Description prs_CardCfg [in] Structure that contains information about

the card format. vb_WaitForRsp [in] Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 351: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 351

Lnl_AddTimezone2 Purpose: Adds Timezones to the panel or device.

Syntax: HRESULT Lnl_AddTimezone2 ( TIMEZONE2 *prs_TZ );

Parameters:

Parameter Description prs_TZ [in] Structure containing information about the

timezone.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 352: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 352

Lnl_SetDoor Purpose: Adds Timezones to the panel or device.

Syntax: HRESULT Lnl_SetDoor( TRecDoor *aPtrRecDoor, BOOL vb_WaitForRsp );

Parameters:

Parameter Description aPtrRecDoor [in] Structure containing information about the

door. vb_WaitForRsp [in] Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 353: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 353

Lnl_ActivateTimezone2 Purpose: Activates a timezone.

Syntax: HRESULT Lnl_ActivateTimezone2 ( TIMEZONE2 *prs_TZ, );

Input Parameters:

Parameter Description prs_TZ [in] Structure containing the information about

the timezone.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 354: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 354

Lnl_AddHolidays2 Purpose: Adds holidays to the panel or device.

Syntax: HRESULT Lnl_AddHolidays ( HOLIDAYMSG2* prs_Holiday, );

Parameters:

Parameter Description prs_Holiday [in] Structure containing the holiday

information.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 355: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 355

Lnl_SetAreaAPB3

Purpose: Sets an anti-passback area in the panel.

Syntax: HRESULT Lnl_SetAreaAPB3( AREAAPB3 *prs_Area, BOOL vb_Wait );

Parameters:

Parameter Description prs_Area [in] Structure containing anti-passback area

information. vb_Wait [in] Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 356: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 356

Lnl_GetAreaStatus2 Purpose: Returns the status information for the areas.

Syntax: HRESULT Lnl_GetAreaStatus2 ( AREA_STATUSRPT_2 *prs_List, BOOL vb_Wait );

Parameters:

Parameter Description prs_List [out] Structure containing the area status

information. vb_Wait [in] Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 357: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 357

Lnl_AreaSetSuspendSchedules Purpose: Syntax:

HRESULT Lnl_AreaSetSuspendSchedules( long areaId, BOOL suspend );

Parameters:

Parameter Description areaId [in] Area id suspend [in] Flag which indicates whether to suspend

schedules.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 358: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 358

Lnl_SetInterPanelLinks2 Purpose: This command is used to configure the linkage of inputs to outputs from within an access panel. This command allows the linkage of ANY alarm panel input to any alarm panel output within a single access panel. Using this command when the alarm panel input is in alarm, the output is activated. When the alarm panel input is in a secure mode, the output is deactivated.

Syntax: HRESULT Lnl_SetInterPanelLinks2 ( ALARM_OUTPUT_LINKS_MSG2 *prs_API, BOOL vb_Wait );

Parameters:

Parameter Description prs_API [in] Structure which defines the alarm panel

input and out linkages. vb_Wait [in] Flag which indicates whether to wait for a

response.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 359: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 359

Lnl_SetInputPointBypassMode Purpose: Set input point with a bypass mode.

Syntax: HRESULT Lnl_SetInputPointBypassMode( int alarm_panel_id, int input_point_id, short bypass_mode );

Parameters:

Parameter Description alarm_panel_id [in] Alarm panel id input_point_id [in] Input id bypass_mode [in] Bypass mode

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 360: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 360

Lnl_SetFunctionList2 Purpose: A command which defines a Function List. A Function list is a series of action can be executed in sequential fashion. An example of an action which can be placed in a function list is “activating a relay output”.

Syntax: HRESULT Lnl_SetFunctionList2 ( IO_FUNCTION_LIST2 *pList, );

Input Parameters:

Parameter Description pList [in] Structure for configuring the function list.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 361: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 361

IAccessControl3 Structures ALARM_PANEL3 Type Parameter Description long si_PanelID Panel ID. long sb_PanelNumber Alarm panel number (65 - 81). BYTE sb_Activate T/F activate of delete the panel BYTE sb_AAPPort Port that panel is connected to on

Access Control panel. BYTE sb_CommAddress Communication address of the Panel

(usually set by DIP switches). BYTE sb_CtrlType Type of Alarm Panel. (see defines at the

end of this section). long sb_NextPanelID Used for elevator control - next panel id. long alarmPanelSIO SIO number of alarm panel long nEcryptedCommunicationMode See

ENCRYPTED_COMMUNICATION_... for possible values

long nAreaID NGP specific BYTE nExitDelayArmingLevel NGP specific BYTE sb_IsToneWarnings NGP specific BYTE sb_IsTamperMonitor NGP specific BYTE nNumInputs NGP specific BYTE nNumOutputs NGP specific NGP_MODULE_CONFIG moduleNGP NGP specific

ACCESS_LEVEL2 Type Parameter Description long nPanelID Panel ID. long nSegmentID Segment ID. long nAccessLevelID The physical access level

number. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long nEntries

Number of access levels

ACCESS_LEVEL_ENTRY

pEntries

Pointer to the array of access level entries sorted by Reader

Page 362: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 362

ID

ACCESS_LEVEL_ENTRY Type Parameter Description long nReaderID Reader id long nTimezoneOrFloorID Timezone id

READER_ID_ARRAY Type Parameter Description long nPanelID Panel ID long nAccessLevelID Access level ID long nReaders Number of readers long* pReaderIDs Array of Reader IDs

CARD_FORMAT_CFG2 Defines a valid card format to be contained in the access panel. It is panel specific as to how many card formats can be stored within an access panel. Card formats are then assigned to readers during reader configuration. Type Parameter Description long nPanelID Panel Id that this message is intended

for. long nSegmentID Segment id long nFormatID Specifies the ID of the card format. WORD nType The type of Card Format (Magnetic,

Wiegand, Smart Card). See CARD_FORMAT_TYPE_... defines above for possible values

DWORD nFlags Bitmask representing additional card format settings. See CARD_FORMAT_FLAGS_... defines above for possible values

WORD nScardAppType Smart Card application. Only applicable for Smart Card formats. See SCARD_APP_... defines in SmartCardDefs.h for possible values

DWORD nFacilityCode Facility code information DWORD sl_CardNumberOffset The starting card number offset of this

Page 363: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 363

card format. For example, if the offset is set to 10,000. Each card of this format, when read, will return the cardnumber plus 10,000 in the event. Ex, if the card number on the badge is 123, the cardnumber reported back will be 10,123. This is used when multiple card formats are used and there are overlapping cardnumbers in the system.

Union CARD_DATA2 CardData Union of magnetic and wiegand card data.

TIMEZONE2 Type Parameter Description long si_PanelID Panel ID the timezone belongs

to. long si_SegmentID Segment ID the timezone

belongs to. long sb_TzNum Timezone number (falls in the

range 3 – 255 when decoded for segment). Timezone ID 1 is reserved for the “Never” timezone and timezone ID 2 is reserved for the “Always” timezone. Use DecodeSegmentValue to convert this value into the proper value based on segment.

WORD si_TypeFlags See TIMEZONE_TYPE_FLAG_... for possible values

BYTE sb_NumIntervals Number of timezone intervals. TZ_INTERVAL [MAX_TZ_INTERVALS]

ss_Intervals Array of the timezone intervals for this timezone, up to six intervals can exist per timezone.

BYTE sb_Defined NGP related BYTE sb_ScheduleNum NGP related T_WINDOW ss_Windows NGP related BYTE sb_HolidaySchedule NGP related BYTE sb_MidnightHolidayMode NGP related

Page 364: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 364

TZ_INTERVAL Type Parameter Description BYTE sb_StartHour Start hour of timezone in military time. BYTE sb_StartMin Start minute of timezone. BYTE sb_EndHour End hour of timezone in military time. BYTE sb_EndMin End minute of timezone in military

time. BYTE sb_DaysOfWeek Bit map for days of week:

(Monday = 0x80, Tuesday = 0x40, Wednesday = 0x20, Thursday = 0x10, Friday = 0x08, Saturday = 0x04, Sunday = 0x02)

BYTE sb_Holidays Bit map of holiday types: (Type 1 = 0x01, Type 2 = 0x02, Type 3 = 0x04, Type 4 = 0x08, Type 5 = 0x10, Type 6 = 0x20, Type 7 = 0x40, Type 8 = 0x80)

HOLIDAYMSG2 Type Parameter Description long si_PanelID Panel ID the holiday information is for. long si_SegmentID Segment ID the holiday information is

for. short ss_NumHolidays The number of holiday array entries are

in the array. HOLIDAY [MAX_HOLIDAYS]

ss_Holidays The array of holidays.

TRecxLHoliday xLHoliday NGP related

HOLIDAY This structure defines the holiday's that can be defined for the access control system.

Type Parameter Description short ss_Year The year after subtracting 1900 (eg.

Page 365: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 365

1995 is passed as 95). short ss_Month Month w/ January = 1. short ss_DayOfMonth Day of the month. short ss_HolidayType Indicates holiday type. This is a bit

mask of up to 8 holiday types. short ss_NumDays Number of days that the holiday lasts

(e.g. more than one day).

BULKBADGE3 Used when a panel is being downloaded due to initial power up or panel being reset in the field. This message allows for up to 41 badges to be downloaded in a single message to the driver. This reduces the number of communication attempts that are needed to download information to the panel.

Type Parameter Description long si_PanelID Panel ID that the badge

are intended for. long si_NumBadges Number of badges in the

structure BADGE3 [MAX_BADGES_PER_CMD_DEF]

ss_Badges Array of up to 41 badges containing all badge information for the cardholder.

BADGE3 The Badge structure defines all of the attributes associated with a given badge for a cardholder. The badge structure defines the panels that this badge information is to be downloaded to as well as all of the access permissions and operating characteristics associated with the badge. Type Parameter Description long si_PanelID This specifies the specific

panel ID that this badge information is to be downloaded to. If the panel ID is –1, this means that the member sb_PanelArray contains a list of multiple panels that the same information is to be downloaded to.

Long si_SegmentID Specifies the specific segment ID that the panel belongs to. If the system is not

Page 366: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 366

segmented, the segment ID will be LNL_INVALID_SEGMENT.

long nUniqueId Badge internal ID __int64 sl_CardNumber Cardnumber for the badge. BYTE sb_IssueCode Issue code of the badge. WORD nCardType The card type that depends on

Badge Type configuration BYTE sb_APBLocation Current Area Anti-Passback

Location. Used to reset APB status for the cardholder or place the cardholder in a specific location.

char [MAX_PIN_DIGITS] sb_PIN PIN Code for the badge. Array of up to 9 characters allows for leading 0s’ to be a valid PIN Code entry.

SYSTEMTIME ss_ActivationDate Activation Date for the badge. Can be set in the future.

SYSTEMTIME ss_DeactivationDate Deactivation Date for the badge. Access will be not be granted after this date.

FLAG sb_CheckBeforeDeny Allows for host based processing of access denials. Indicates that the access panel is to pass this message up to the driver for further processing.

FLAG sb_CheckBeforeGrant Allows for host based processing of access grants. Indicates that the access panel is to pass this message up to the drvier for further processing.

FLAG sb_APBExempt Flag that indicates that this cardholder is exempt from Anti-passback or area control rules.

FLAG sb_APBOneFreePass Resets the APB status of the cardholder.

FLAG sb_APBNotUsed Resets the APB status of the cardholder.

BYTE sb_TimedAPBDelay Anti-Passback Delay for timed Anti-Passback Control. Indicates that this card cannot

Page 367: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 367

be used at the same reader for X number of minutes.

BYTE sb_UseLimit Use limit of the card. After the card has been used this number of times at a specific panel, it is no longer valid. –1 indicates infinite usage.

BYTE sb_CommandAuthority Specifies that this cardholder can issue commands at a keypad reader.

long sl_VDT Handicap flag. When used, the extended strike and held open times are applied to the cardholder.

BYTE sb_PassageMode Offline Lock - can user enable passage mode.

BYTE sb_DeadboltOverride Offline Lock - Can user override deadbolt on a mortise V Series.

long sl_AssetGroup Asset group the cardholder belongs to.

BYTE sb_FirstCardUnlockAuthority Specifies that this cardholder can use first card unlock at a reader that is configured for first card unlock.

BYTE twoManPersonType Used for special two man rule BYTE armDisarmCommandAuthority long sl_AccessLevels

[MAX_ACCLEVELS_CARDHOLDER] Access levels assign to the badge

BYTE nPrecAccessType BYTE sb_PendingEnrollment NGP BYTE sb_ValidationForSecondary NGP long nUserId NGP Wchar_t userName[SHORT_NGP_LCD_NAME] NGP short nLanguage NGP long nPrecAccessLevels Precision access levels ACCESS_LEVEL_ENTRY pPrecAccessLevels long nOwnedReaders long* pOwnedReaderIds

READERDEF3 Structure used to define/configure a reader in an Access Control panel.

Page 368: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 368

Type Parameter Description long si_PanelID Panel ID the reader is attached to. short sb_ReaderNumber Reader number (0 - 63) BYTE sb_Activate T/F activate of delete the reader BYTE sb_AAPPort Port that reader is connected to on the

panel. BYTE sb_CommAddress Communication address of the Reader

(usually set by DIP switches). BYTE sb_CtrlType Type of controller of Reader (See

Defines at the end of this section for list of available reader types).

BYTE sb_StrikeTime Max seconds for activated door strike (1-255, default usually 8).

long sb_OpenTime Max seconds for held open door time (default usually 75).

BYTE sb_OfflineMode Mode reader is placed in when communications is lost with the panel (See Defines at the end of this section for available reader modes).

BYTE sb_AccessMode Access mode of the reader (See Defines at the end of this section for available reader modes).

BYTE sb_DenyIfDuress Deny access if duress code is detected (0-False, 1-True).

BYTE sb_ElevatorReader Is the reader an elevator reader (0-False, 1-True).

BYTE sb_DoNotWait Move into APB area regardless if door was opened (0-False, 1-True).

BYTE sb_Downloadable Is the reader downloadable (0-False, 1-True).

BYTE sb_CardSpecification Indicates the cardholder database layout for downloadable readers.

BYTE sb_PairedMaster Entrance reader for APB area (0-False, 1-True).

BYTE sb_PairedSlave Exit reader for APB area (0-False, 1-True).

BYTE sb_UseAuxAsBolt Use aux output as door bolt monitor (0-False, 1-True - AMS102-105 only).

BYTE sb_FastBoltAlarm Set for fast door bolt alarm detection (0-False, 1-True).

BYTE sb_AcceptCmds Determines if the reader accepts reader commands (0-FALSE, 1-TRUE).

BYTE sb_PreAlarm Determines if the reader is to use pre alarm (0-FALSE, 1-TRUE).

BYTE sb_2CardCtrl Determines if the reader is to use two card control (0-FALSE, 1-TRUE).

Page 369: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 369

long [READERDEF_MAX_CARD_FORMATS ]

sb_CardFormat Card formats for this reader. Each index in the array will contain the card format ID that the reader is assigned.

BYTE sb_DiddleCnt Number of consecutive denials before report generated (0-255, default 0).

short sb_AreaLeaving APB area that you are leaving when using reader.

short sb_AreaEntering APB area that you are entering when using reader.

long sb_ForcedOpenTZ Masks forced open alarm during this TZ. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sb_HeldOpenTZ Masks held open alarm during this TZ. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sb_AuxInputTZ Masks aux input during TZ. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sb_Output1TZ Activates reader output 1 during this TZ. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sb_Output2TZ Activates reader output 2 during this TZ. Use DecodeSegmentValue to convert this value into the proper value based on segment.

BYTE sb_Output1State Initial state of reader output 1 (0-Off, 1-On)

BYTE sb_Output2State Initial state of reader output 2 (0 Off, 1- On)

BYTE sb_MaskForcedOpen Mask forced open alarms always (0-False, 1-True)

BYTE sb_MaskHeldOpen Mask held open alarms always (0-False, 1-True)

BYTE sb_MaskAuxAlarm Mask aux alarm always (0-False, 1-True)

BYTE sb_MaskAuxAlarm2 Mask aux alarm always (0-False, 1-True)

long sl_CyperCode 6 digit max number containing cyper code for reader.

BYTE sb_TimedAPB Timed anti-passback value (0-255,

Page 370: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 370

default 0). BYTE sb_SoftAPB Use soft anti-passback (0-False, 1-True). long sb_LogGrantTZ Used by Communication Server to only

log Access Grants during a particular timezone. (0 indicates to always log access grants).

long sb_LogDenyTZ Used by Communication Server to only log Access Denies during a particular timezone. (0 indicates to always log access denies).

long sb_LogStatusTZ Used by Communication Server to only log Status during a particular timezone. (0 indicates to always log Status).

BYTE sb_DecUseLimit Determines if Use Limits are enforced (0-False, 1-True). If enforced, each time a use-limited badge is used at this reader, the badge’s use limit is decremented for the associated Access Panel.

BYTE sb_NoRexOnStrike Determines if the door strike will NOT be energized when the REX contact is closed (0-False, 1-True).

long sl_Out1Pulse Duration of output 1’s pulse in seconds (0- 30000, default 0).

long sl_Out2Pulse Duration of output 2’s pulse in seconds (0- 30000, default 0).

long sb_AuxInput2TZ Masks aux input during a timezone. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sb_AuxInput3TZ Masks aux input during a timezone. Use DecodeSegmentValue to convert this value into the proper value based on segment.

long sb_ElevatorAccessLevel

Elevator Control Level that will be used to access floors via this reader when reader is an elevator reader. Use DecodeSegmentValue to convert this value into the proper value based on segment.

BYTE sb_SlaveID Reader ID of the slave reader attached to this reader.

BYTE sb_MaskAuxAlarm3 Mask aux alarm always (0-False, 1-True).

BYTE [MAX_FUNCS_R

sl_FuncList Global I/O function list associated with keypad command. Index in the array

Page 371: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 371

EADER + MAX_INSTANT_CMDS_READER ]

from 0-1 indicates the keypad command. (Pin+10/20, Func 4/5, Func 6/7, Func 8/9, Func 10/11, Func 12/13, Func 14/15).

BYTE [MAX_FUNCS_READER]

sb_TermList Logic term associated with the Global I/O function list associated with keypad command. Index in the array from 0-1 indicates the keypad command. (Pin+10/20, Func 4/5, Func 6/7, Func 8/9, Func 10/11, Func 12/13, Func 14/15).

BYTE sb_KeypadMode Reader keypad mode (see defines section for list of possible keypad mode types).

BYTE sb_StrikeMode Indicates how the door strike will behave when a valid card swipe occurs. (STRIKE_MODE_CLOSE = 0, strike will cut off as soon as door is closed; STRIKE_MODE_OPEN = 1, strike will cut off as soon as door is opened)

BYTE sb_TwoWireLED Configures the LED on the reader. (0 – “1-Wire LED Control (Std)”, 1 – “2-Wire LED Control”, 2 – “Dorado LED Control”).

long sb_StrikeTime2 Extended strike time in seconds (1-255). long sb_OpenTime2 Extended held open time (1-255). long sl_DCSupervision Door contact EOL Table (covers

supervision and no/nc). long sl_REXSupervision REX EOL Table (covers supervision

and no/nc). long sl_Aux1Supervision Aux1 EOL Table (covers supervision

and no/nc). long sl_Aux2Supervision Aux2 EOL Table (covers supervision

and no/nc). long sl_Aux1Latched Used in conjunction with the Entry

Delay field. If Selected (i.e., non-latched mode), when this auxiliary input is active the alarm will NOT be reported until the Entry Delay time expires. The alarm will be reported if this input is still active at the end of the specified delay. Application: invalid motion detector reads. If not selected (i.e., latched mode), when this auxiliary input is active the alarm WILL be reported unless this input is masked (either

Page 372: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 372

automatically through the software or manually via a keypad). Application: access a secured door. (0-Not Selected, 1-Selected)

long sl_Aux1EntryDelay Specifies the delay, in seconds, from the time this auxiliary input switches to an unmasked state until it is actually reportable (0-3600).

long sl_Aux1ExitDelay Specifies the delay, in seconds, for this auxiliary input to switch from a masked state to an unmasked state (0-3600). When an auxiliary input is unmasked, active alarms will NOT be reported until the Exit Delay expires. Application: securing a door when leaving a building.

long sl_Aux2Latched Used in conjunction with the Entry Delay field. If Selected (i.e., non-latched mode), when this auxiliary input is active the alarm will NOT be reported until the Entry Delay time expires. The alarm will be reported if this input is still active at the end of the specified delay. Application: invalid motion detector reads. If not selected (i.e., latched mode), when this auxiliary input is active the alarm WILL be reported unless this input is masked (either automatically through the software or manually via a keypad). Application: access a secured door. (0-Not Selected, 1-Selected)

long sl_Aux2EntryDelay Specifies the delay, in seconds, from the time this auxiliary input switches to an unmasked state until it is actually reportable (0-3600).

long sl_Aux2ExitDelay Specifies the delay, in seconds, for this auxiliary input to switch from a masked state to an unmasked state (0-3600). When an auxiliary input is unmasked, active alarms will NOT be reported until the Exit Delay expires. Application: securing a door when leaving a building.

ELEVATOR_HW_INFO [8]

sl_ElevatorInputID Elevator input panel.

ELEVATOR_HW_INFO [8]

sl_ElevatorOutputID Elevator output panel.

Page 373: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 373

long sl_TrackElevatorInputRequests

Are we tracking input requests?

long sl_OnlineFacEAL Used for Lenel hardware to track online facility mode / offline access.

BYTE sb_ChassisType Chassis type of the offline lock, this value corresponds to the value located in the database. (Currently only used by offline locks.).

long sl_DeniedAttemptsCntTO

Denied attempts count timeout; 0-999 seconds. (Currently only being used by offline locks.)

wchar_t [READERDEF_READERNAME_LEN ]

sl_ReaderName Name of the reader. The name is passed down as UNICODE.

BYTE sb_LookAhead Determines if the look ahead feature is being used; 0-Look Ahead not used, 1-Look Ahead is being used. (Currently only being used by offline locks.)

BYTE sb_LookAheadOffset The offset used for look ahead. (Currently only being used by offline locks.)

BYTE sb_LookAheadRange The range used for look ahead. (Currently only being used by offline locks.)

long sl_Chassis_Volume The chassis volume being used. (Currently only being used by offline locks.)

long sl_ReaderMemory The amount of memory for the reader. (Currently only being used by offline locks.)

BYTE sb_UseActivationDate Indicates if the reader is to use the Activation Date; 0-Activation Date not used, 1-Activation Date is used. (Currently only being used by offline locks.)

BYTE sb_UseExpirationDate Indicates if the reader is to use the Expiration Date; 0-Expiration Date not used, 1-Expiration Date is being used. (Currently only being used by offline locks.)

long sl_NumCardholders Number of cardholders that the reader can hold. (Currently only being used by offline locks.)

long sl_FirstBadgeNumber The first badge number for reader.

Page 374: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 374

(Currently only being used by offline locks.)

long sl_NumberOfBadges The number of badges for the reader. (Currently only being used by offline locks.)

long sl_altrdr_sio Alternate reader link long sl_altrdr_number Reader number on the sio. long sl_altrdr_spec Alternate reader configuration.

(ALTERNATE_READER_NONE = 0, ALTERNATE_READER_NORMAL = 1, ALTERNATE_READER_BIO1 = 2)

BYTE sb_AlternateReader Indicates if this reader is an alternate reader.

BYTE sb_BioVerify Use Biometric Verification (0-False, 1-True).

BYTE sb_BioEnroll Use Biometric Enroll if the biometric template is not present. (0-False, 1-True).

BYTE sb_HostDecisionOnGrant

Indicates if the reader is to request a host based decision on a grant.

BYTE sb_HostDecisionProceedWithGrant

Determines what to do when a host based decision times out (0 – Deny all access, 1 – proceed with grant based on access level).

BYTE sb_GlobalAPB Indicates if the reader is involved with Global APB, used internally by Lenel.

long sl_AuxIn1HoldTime Hold time (in seconds) for Aux Input 1. long sl_AuxIn2HoldTime Hold time (in seconds) for Aux Input 2. long sl_DCDebounce Debounce value (Lenel enumeration) for

the Door Contact. long sl_REXDebounce Debounce value (Lenel enumeration) for

the REX. long sl_AuxIn1Debounce Debounce value (Lenel enumeration) for

Aux Input 1. long sl_AuxIn2Debounce Debounce value (Lenel enumeration) for

Aux Input 2. BYTE sb_CipherMode T/F Flag indicating if this reader should

accept cipher mode access. BYTE sb_FirstCardUnlock T/F Flag indicating if this reader should

be placed in first card unlocked mode. BYTE sb_FirstCardUnlockAu

thorityRequired T/F Flag indicating if this reader requires special authority of the Badge in order to unlock when an access grant occurs while the ready is in first card unlocked mode.

long alternateReaderID The ID to be used for the alternate

Page 375: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 375

reader. BYTE turnstileSupport Indicates if a reader will be used for

turnstile support. long readerSIO Specifies the internal SIO number to be

used for access readers. long readerNumber The ID of the reader attached to the

access control panel. Used along with the readerSIO value to create a mapping from SIO to deviceID.

long prealarmTimeout Specifies when the pre-alarm notification will be issued (# seconds before the actual alarm will occur)

BYTE tailgateOption Used to specify an access control reader will use special tail gate functionality.

wchar_t [32] aux1Name Used to send the name of the reader auxiliary input down to the reader.

wchar_t [32] aux2Name Used to send the name of the reader auxiliary input down to the reader

BYTE allowArmDisarmCommand

Specified whether or not an access reader will allow instrusion style arm/disarm commands at the reader via the keypad.

BYTE rexEvents Sets a flag indicating if REX related events should be reported to the host application.

long defaultIntrusionArea Used to specify an intrusion area (i.e. mask group) to be controlled by a specific command keypad reader.

INTRUSION_CMD_CONFIG

intrusionCmdA Structure containing configuration values for intrusion style commands executed at a command keypad.

INTRUSION_CMD_CONFIG

intrusionCmdB Structure containing configuration values for intrusion style commands executed at a command keypad.

BYTE instantCommandModes [MAX_INSTANT_CMDS_READER]

Specifies the execution mode to be applied to instant commands that are executed at a reader.

BYTE assetRequired Indicates if an asset is required to be presented at a reader before access will be allowed.

long sl_DiddleRestore sed along with sb_DiddleCnt, once diddle count is reached we lock the reader for sl_DiddleRestore seconds

BYTE relaxedForcedOpen T/F Flag indicating that this reader uses relaxed door forced open detection

Page 376: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 376

BYTE readerAlarmShunt A T/F Flag that determines whether or not the reader uses the aux output 1 alarm shunt functionality

long nEcryptedCommunicationMode

See ENCRYPTED_COMMUNICATION_... for possible values

ONITY_READERDEF

Onity For Onity readers

NGP_READERDEF

NGP For NGP readers

BYTE useStrikeFollower T/F flag indicating whether or not to use the strike follower.

int strikeFollowPulse Strike Follower pulse duration. Set in tenths of a second (1 = .1 second, 2 = .2 seconds, etc...) up to 2 seconds max (20). Specify -1 to use the same duration as strike. 0 is not a valid option.

int strikeFollowPulse // Strike Follower delay from strike activation. Set in tenths of a second (1 = .1 second, 2 = .2 seconds, etc...). 0 = No delay.

Page 377: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 377

AREAAPB3 Type Parameter Description Long si_PanelID Panel ID. Int si_AreaID APB area ID FLAG si_TwoManControl Indicates if two man control is

being used (at least two cardholders must be in area at all times). (0-False, 1-True).

FLAG si_AreaClosed Indicates if the area closed event will be generated. Cardholders will still be granted access unless the area closed rules are in place. (0-False, 1-True).

FLAG si_DenyAllIfClosed Indicates if Deny All If Closed is being used (0-False, 1-True). This denies access to all cardholders if the area is closed. The si_AreaClosed field also needs to be set to 1 for this to work.

int si_ReaderID If the si_AreaClosed field has been set (1) this field can be used to select a reader to cardholders can use to gain access to the area.

int si_MaxOccupancy Maximum occupancy of the area. Once capacity is reached the area is closed.

int si_MaxCount Indicates the number of people that must be in this area before the action at maximum is applied to the specified logic term of the specified function list.

int si_MinCount Indicates the minimum number of people that must be in this area before the action

Page 378: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 378

at minimum is applied to the specified logic term of the specified function list.

int si_RuleID Global I/O function list associated with the area’s occupancy levels.

int si_RuleTerm Global I/O Function list term. int si_MinArg Sets the value of the logic

term when the minimum occupancy is reached (Do Nothing - 0, Set False - 1, Set True - 2, Pulse - 3).

Int si_MaxArg Sets the value of the logic term when the maximum occupancy is reached (Do Nothing - 0, Set False - 1, Set True - 2 , Pulse - 3).

short si_AreaType Area type: 0-Normal, 1-Muster Zone, 2-Safe Location. Used for Mustering.

Int si_AreaAPBID Unique ID for area from database. Used for Global APB

long si_SegmentID Segment ID for the area. Used for Global APB.

__int64 Owner Badge ID of the area owner (used with special 1 man rule)

short requestRelayDelay Delay realy output from beig activated (Time in seconds 1 – 255)

long requestRelaySIO The SIO number of the request relay (used with special 2 and 1 man rules)

long requestRelayNum The Relay number of the request relay (used with special 2 and 1 man rules)

short InterlockMode 0 - Not an interlock area. 1 - Interlocking Mode Passageway: only readers with same from/to areas can be opened at same time. 2 - Interlocking Mode Controlled Area: only one door to the area can be opened at a time, even if the reader has the same from/to areas.

Page 379: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 379

AREA_STATUSRPT_2 Structure used to return the status of the areas.

Type Parameter Description long si_PanelID Panel ID. BYTE sb_AsyncStatus Indicates if the status is to be

returned asynchronously or synchronously. (0-Synchronously, 1-Asynchronously)

long [MAX_AREAS_NGP]

sl_AreaStatus Indicates the status of the areas (LNL_STATUS_AREA_CLOSED == 0x8000).

long [MAX_AREAS_NGP]

sl_AreaPersonCount Indicates the number of people in each area (based on index into array).

long [MAX_AREAS_NGP]

sl_AreaArmStatus Area arm status

long [MAX_AREAS_NGP]

sl_AreaAdditionalStatus

ALARM_OUTPUT_LINKS_MSG2 Structure that is used to link inputs to outputs.

Type Parameter Description long si_PanelID Panel ID the alarm panel is

attached to. long sb_PanelNumber Alarm panel number (65 - 81). BYTE sb_CtrlType What type of controller is this

(See IAccessControl Defines for available alarm panel types).

long nOutputLinkEntries Number of output entries ALARM_OUTPUT_LINKS* pOutputLinkEntries

Array of the structures that link the inputs to a particular output based on the index to this array (index 0 is for output 1 on this alarm panel, index 1 is for output 2 on this alarm panel, etc.).

Page 380: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 380

ALARM_OUTPUT_LINKS Structure that contains the input information for the inputs linked to outputs.

Type Parameter Description int si_NumOfInputs Number of inputs that are

linked to this particular output.

int [MAX_SCP_SYSTEM_INPUTS]

si_PanelID Array of Panel IDs for the linked inputs.

int [MAX_SCP_SYSTEM_INPUTS]

si_InputID Array of Input IDs for the linked inputs.

IO_FUNCTION_LIST2

Type Parameter Description long nPanelId Panel id long nId Local I/O list unique

identifier long nCommand See IV_CMD_... defines for

possible values long nExecuteType ULONG nFunctionCount Number of functions in the

list IO_FUNCTION pFunctions List of functions

IO_FUNCTION

Type Parameter Description long nType See LnlGIOFuncType

enumeration for possible values

long nArg1 long aArg2 long nArg3

Page 381: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 381

IAsset Functions The IAsset interface is used for asset control.

List of functions:

• Lnl_AddAsset • Lnl_DeleteAsset • Lnl_AddAssetGroup

IAsset Revision History Date Author Notes 03/27/2003 M. Serafin • Added the revision history.

Page 382: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 382

Lnl_AddAsset Purpose: Adds an Asset to the hardware.

Syntax: HRESULT Lnl_AddAsset ( ADD_ASSET *prs_Asset );

Input Parameters:

Parameter Description prs_Asset Structure containing the asset information.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 383: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 383

Lnl_DeleteAsset Purpose: Deletes an Asset from the hardware.

Syntax: HRESULT Lnl_DeleteAsset ( DEL_ASSET *prs_Asset );

Input Parameters:

Parameter Description prs_Asset Structure containing the asset information.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 384: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 384

Lnl_AddAssetGroup Purpose: Add an Asset Group to the hardware.

Syntax: HRESULT Lnl_AddAssetGroup ( ADD_ASSET_GROUP *prs_Asset );

Input Parameters:

Parameter Description prs_Asset Structure containing asset group

information.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 385: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 385

IAsset Structures ADD_ASSET

Type Parameter Description long si_PanelID Panel ID (can be set to

LNL_ALL_PANELS in which case a panel array is used).

long si_SegmentID Segment ID. BYTE [LNL_MAX_ASSET_SIZE]

sb_AssetScanID 16 byte scan ID array

DWORD [LNL_MAX_ASSET_OWNERS]

sl_AssetOwners list of asset owners (same employee multiple badges)

long [LNL_MAX_ASSET_ARGS]

sl_AssetArgs list of asset args (classes & types)

DEL_ASSET Type Parameter Description long si_PanelID Panel ID (can be set to

LNL_ALL_PANELS in which case a panel array is used).

long si_SegmentID Segment ID. BYTE [LNL_MAX_ASSET_SIZE]

sb_AssetScanID Asset Scan ID of the asset to delete.

ADD_ASSET_GROUP Type Parameter Description long si_PanelID Panel ID (can be set

to LNL_ALL_PANELS in which case a panel array is used).

long si_SegmentID Segment ID. long si_AssetGroupID Asset Group ID. long [LNL_MAX_ASSET_TYPES_PER_GROUP]

si_AssetTypes Asset types for this group.

Page 386: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 386

IAsset Defines LNL_ALL_PANELS = -1 MAX_PANELS_SERVER = 256 LNL_MAX_ASSET_SIZE = 32 LNL_MAX_ASSET_OWNERS = 8 LNL_MAX_ASSET_ARGS = 16 LNL_MAX_ASSET_TYPES_PER_GROUP = 64

Page 387: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012 387

IAsset Error Codes Name Value Description

Page 388: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012

IAssetManagement Functions The IAssetManagement interface is used for asset management configuration.

List of functions:

• Lnl_SetNumberAssetGroups • Lnl_SetNumberClassesPerGroup

Page 389: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012

Lnl_SetNumberAssetGroups

Purpose: Set the number of asset groups being used

Syntax: HRESULT Lnl_SetNumberAssetGroups( long numAssetGroups );

Input Parameters:

Parameter Description numAssetGroups Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 390: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. 6 August 2012

Lnl_SetNumberClassesPerGroup Set the number of classes per asset group.

Purpose:

Syntax: HRESULT Lnl_SetNumberClassesPerGroup( long numClassesPerGroup );

Input Parameters:

Parameter Description numClassesPerGroup Number of classes per asset group Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

D:\Perforce\Development\Documentation\OnGuard\Branches\Current\Source\OAAP\OpenDevice\OP_IDialup.docOP_IDialup.doc

Page 391: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 391

IRs232 Functions This interface is supported by Communication Transporter objects that communicate via serial communication. Many of the methods in this interface are wrappers around the Windows set of functions for dealing with serial ports, for more documentation on these functions refer to windows help. When using the IRs232 the initial setup of the RS-232 communication is performed inside of the InitCommunication method. The steps that are actually performed can vary from Device Translator to Device Translator but the following are steps that are typical. First a call is placed to Lnl_SetCommMode followed by Lnl_OpenConnection. Then a call to Lnl_GetCommState is called and then the changes that are needed are performed before calling Lnl_SetCommState to set the communication parameters. Then a call to Lnl_SetCheckQueueFlag is called usually passing in TRUE and then the timeouts are set by calling Lnl_SetCommTimeouts. Many of the methods of this interface are similar to Windows functions of the Communication API. The structures that are used by many of these methods are the same ones that the Windows communication functions use. Please refer to documentation on the Windows Communication API for further information.

List of functions

• Lnl_OpenConnection • Lnl_CloseConnection • Lnl_SetCommMode • Lnl_SetCommState • Lnl_SetCommTimeouts • Lnl_GetCommState • Lnl_GetCommTimeouts • Lnl_GetCommProperties • Lnl_SetCheckQueueFlag • Lnl_EscapeCommFunction • Lnl_WaitCommEvent • Lnl_SetCommMask • Lnl_GetCommMask • Lnl_SetCommBreak • Lnl_ClearCommBreak • Lnl_ClearCommError • Lnl_PurgeComm • Lnl_SetupComm • Lnl_GetCommModemStatus

IRs232 Revision History Date Author Notes

Page 392: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 392

03/27/2003 M. Serafin • Added the revision history.

Page 393: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 393

Lnl_OpenConnection Purpose: Opens a serial port.

Syntax: HRESULT Lnl_OpenConnection ( LPCTSTR DeviceName );

Input Parameters:

Parameter Description DeviceName Name of the communication device to open

(serial port name).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented E_COMMUNICATION_OPEN_FAILED E_COMMUNICATION_CONNECTION_ALREADY_OPEN

Page 394: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 394

Lnl_CloseConnection Purpose: Closes the serial port if it was open.

Syntax: HRESULT Lnl_CloseConnection ( );

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented E_COMMUNICATION_CLOSE_FAILED

Page 395: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 395

Lnl_SetCommMode Purpose: This methods sets up the Communication Transporter to perform reads and writes in a specific mode. The reads and writes can be configured to be performed asynchronously if desired by setting either the ReadMode to TRUE or the WriteMode to TRUE or both to TRUE. If the ReadMode is set to TRUE then a name must be supplied in the Read parameter. Same goes for the WriteMode with the Write parameter. These names are used to set the name of the events which are signaled when the corresponding read or write operation completes asynchrounously.

Syntax: HRESULT Lnl_SetCommMode ( BOOL ReadMode, BOOL WriteMode, LPCTSTR Read, LPCTSTR Write );

Input Parameters:

Parameter Description ReadMode Flag that indicates if the read operation

should be performed asynchronously. WriteMode Flag that indicates if the write operation

should be perfromed asynchronously. Read Name of read event to wait for. Write Name of write event to wait for.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 396: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 396

Lnl_SetCommState Purpose: This method configures a communications device according to the specifications in a device-control block (DCB structure). The function reinitializes all hardware and control settings, but it does not empty output or input queues.

Syntax: HRESULT Lnl_SetCommState ( DCB *Dcb );

Input Parameters:

Parameter Description Dcb A pointer to the DCB structure containing

the configuration information for the specified communications device.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 397: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 397

Lnl_SetCommTimeouts Purpose: This method sets the time-out parameters for all read and write operations on a specified communications device.

Syntax: HRESULT Lnl_SetCommTimeouts ( COMMTIMEOUTS *Commtimeouts );

Input Parameters:

Parameter Description Commtimeouts Pointer to a COMMTIMEOUTS structure

that contains the new time-out values.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 398: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 398

Lnl_GetCommState Purpose: This method fills in a device-control block (DCB structure) with the current control settings for a specified communications device.

Syntax: HRESULT Lnl_GetCommState ( DCB *Dcb );

Output Parameters:

Parameter Description Dcb Pointer to the DCB structure in which the

control settings information is returned.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 399: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 399

Lnl_GetCommTimeouts Purpose: This method retrieves the time-out parameters for all read and write operations on a specified communications device.

Syntax: HRESULT Lnl_GetCommTimeouts ( COMMTIMEOUTS *Commtimeouts );

Output Parameters:

Parameter Description Commtimeouts Pointer to a COMMTIMEOUTS structure

in which the time-out information is returned.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 400: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 400

Lnl_GetCommProperties Purpose: This method fills a buffer with information about the communications properties for a specified communications device.

Syntax: HRESULT Lnl_GetCommProperties ( COMMPROP *Commprop );

Output Parameters:

Parameter Description Commprop Pointer to a commun_5w4y.htm

COMMPROP structure in which the communications properties information is returned.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 401: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 401

Lnl_SetCheckQueueFlag Purpose: Sets a flag in the Communication Transporter that indicates if when reading whether or not to check the queue flag to see if there are bytes to actually read.

Syntax: HRESULT Lnl_SetCheckQueueFlag ( BOOL Flag );

Input Parameters:

Parameter Description Flag Flag which indicates whether to check the

queue flag.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 402: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 402

Lnl_EscapeCommFunction Purpose: This method directs a specified communications device to perform an extended function.

Syntax: HRESULT Lnl_EscapeCommFunction ( DWORD dwFunction );

Input Parameters:

Parameter Description dwFunction Specifies the code of the extended function

to perform.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 403: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 403

Lnl_WaitCommEvent Purpose: This method waits for an event to occur for a specified communications device. The set of events that are monitored by this function is contained in the event mask associated with the device handle.

Syntax: HRESULT Lnl_WaitCommEvent ( DWORD *lpEvtMask );

Input Parameters:

Parameter Description lpEvtMask Mask indicating the type of communication

event that occurred.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 404: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 404

Lnl_SetCommMask Purpose: This method specifies a set of events to be monitored for a communications device.

Syntax: HRESULT Lnl_SetCommMask ( DWORD dwEvtMask );

Input Parameters:

Parameter Description dwEvtMask Specifies the events to be enabled. A value

of zero disables all events. This parameter can be a combination of values.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 405: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 405

Lnl_GetCommMask Purpose: This method retrieves the value of the event mask for a specified communications device.

Syntax: HRESULT Lnl_GetCommMask ( DWORD *lpEvtMask );

Output Parameters:

Parameter Description lpEvtMask Pointer to the 32-bit variable to be filled

with a mask of events that are currently enabled.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 406: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 406

Lnl_SetCommBreak Purpose: This method suspends character transmission for a specified communications device and places the transmission line in a break state until the ClearCommBreak method is called.

Syntax: HRESULT Lnl_SetCommBreak ( );

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 407: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 407

Lnl_ClearCommBreak Purpose: The ClearCommBreak method restores character transmission for a specified communications device and places the transmission line in a nonbreak state.

Syntax: HRESULT Lnl_ClearCommBreak ( );

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 408: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 408

Lnl_ClearCommError Purpose: This method retrieves information about a communications error and reports the current status of a communications device. The function is called when a communications error occurs, and it clears the device's error flag to enable additional input and output (I/O) operations.

Syntax: HRESULT Lnl_ClearCommError ( DWORD *lpErrors, COMSTAT *lpStat );

Output Parameters:

Parameter Description lpErrors Pointer to a 32-bit variable to be filled with

a mask indicating the type of error. lpStat Pointer to a COMSTAT structure in which

the device's status information is returned.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 409: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 409

Lnl_PurgeComm Purpose: The PurgeComm method can discard all characters from the output or input buffer of a specified communications resource. It can also terminate pending read or write operations on the resource.

Syntax: HRESULT Lnl_PurgeComm ( DWORD dwFlags );

Input Parameters:

Parameter Description dwFlags Specifies the action to take.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 410: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 410

Lnl_SetupComm Purpose: This method initializes the communications parameters for a specified communications device.

Syntax: HRESULT Lnl_SetupComm ( DWORD dwInQueue, DWORD dwOutQueue );

Input Parameters:

Parameter Description dwInQueue Specifies the recommended size, in bytes,

of the device's internal input buffer. dwOutQueue Specifies the recommended size, in bytes,

of the device's internal output buffer.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 411: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 411

Lnl_GetCommModemStatus Purpose: This method retrieves modem control-register values.

Syntax: HRESULT Lnl_GetCommModemStatus ( DWORD *ModemStat );

Output Parameters:

Parameter Description ModemStat Pointer to a 32-bit variable that specifies

the current state of the modem control-register values.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 412: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 412

IRs232 Structures DCB Please refer to Microsoft’s documentation on this structure. COMMTIMEOUTS Please refer to Microsoft’s documentation on this structure. COMMPROP Please refer to Microsoft’s documentation on this structure. COMSTAT Please refer to Microsoft’s documentation on this structure.

Page 413: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 413

IRs232 Error Codes Name Description E_COMMUNICATION_OPEN_FAILED The opening of

the serial port failed.

E_COMMUNICATION_CONNECTION_ALREADY_OPEN Attempting to open the port and it is already open.

E_COMMUNICATION_CLOSE_FAILED The close of the port failed.

Page 414: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 414

ILan Functions This interface is supported by Communication Transporter objects that communicate via lan communication.

List of functions

• Lnl_OpenConnection • Lnl_CloseConnection • Lnl_ConnectionStatus • Lnl_ReConnect • Lnl_SetReadTries • Lnl_SetReadTimeout • Lnl_SetPort

ILan Revision History Date Author Notes 03/27/2003 M. Serafin • Added the revision history.

Page 415: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 415

Lnl_OpenConnection Purpose: Opens a serial port.

Syntax: HRESULT Lnl_OpenConnection ( BSTR DeviceAddress );

Input Parameters:

Parameter Description DeviceAddress IP Address to open up the connection to.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented E_COMMUNICATION_OPEN_FAILED

Page 416: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 416

Lnl_CloseConnection Purpose: Closes the serial port if it was open.

Syntax: HRESULT Lnl_CloseConnection ( );

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 417: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 417

Lnl_ConnectionStatus Purpose: Method used to determine the status of the connection.

Syntax: HRESULT Lnl_ConnectionStatus ( DWORD *Status );

Output Parameters:

Parameter Description Status The status of the connection

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 418: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 418

Lnl_ReConnect Purpose: Attempts to reconnect the connection

Syntax: HRESULT Lnl_ReConnect ( );

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 419: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 419

Lnl_SetReadTries Purpose: Syntax:

HRESULT Lnl_SetReadTries ( COMMTIMEOUTS *Commtimeouts );

Input Parameters:

Parameter Description tries

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 420: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 420

Lnl_SetReadTimeout Purpose: This method fills in a device-control block (DCB structure) with the current control settings for a specified communications device.

Syntax: HRESULT Lnl_SetReadTimeout ( long sec, long micro );

Output Parameters:

Parameter Description sec micro

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 421: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 421

Lnl_SetPort Purpose: Sets the port to use.

Syntax: HRESULT Lnl_SetPort ( int p );

Output Parameters:

Parameter Description p Port to use.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 422: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 422

ILan Error Codes Name Description E_COMMUNICATION_OPEN_FAILED The opening of

the lan connection failed.

E_COMMUNICATION_CLOSE_FAILED The close of the connection failed.

Page 423: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 423

ITransport Functions This is the main interface supported by all of the Communication Transporter objects. The main purpose of the Communication Transporter is for reading and writing to the hardware so the two main methods that they support are a Read and a Write method.

List of functions

• Lnl_Read • Lnl_Write • Lnl_GetReadResult • Lnl_GetWriteResult

ITransport Revision History Date Author Notes 03/27/2003 M. Serafin • Added the revision history.

Page 424: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 424

Lnl_Read Purpose: Reads bytes from the communication device.

Syntax: HRESULT Lnl_Read ( int BytesToRead, int *BytesRead, unsigned char *inBuffer );

Input Parameters:

Parameter Description BytesToRead Number of bytes to attempt to read.

Output Parameters:

Parameter Description BytesRead Number of bytes actually read. inBuffer Pointer to the sequence of bytes read.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 425: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 425

Lnl_Write Purpose: Writes bytes to the communication device.

Syntax: HRESULT Lnl_Write ( int BytesToWrite, int *BytesWritten, unsigned char *outBuffer );

Input Parameters:

Parameter Description BytesToWrite The number of bytes to write. outBuffer Pointer to the sequence of bytes to write.

Output Parameters:

Parameter Description BytesWritten The number of bytes actually written.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 426: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 426

Lnl_GetReadResult Purpose: This method is used when performing asynchronous reads, it checks to see if the read has completed and if it has, then it will return the number of bytes. Currently this method has not been used much.

Syntax: HRESULT Lnl_GetReadResult ( BOOL Method, int *NumBytes );

Input Parameters:

Parameter Description Method Specifies whether the function should wait

for the pending overlapped operation to be completed.

Output Parameters:

Parameter Description NumBytes Number of bytes read.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 427: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 427

Lnl_GetWriteResult Purpose: This method is used when performing asynchronous writes, it checks to see if the write method has completed and if it has, then the number of bytes written is returned. Currently this method has not been used much.

Syntax: HRESULT Lnl_GetWriteResult ( BOOL Method, int *NumBytes );

Input Parameters:

Parameter Description Method Specifies whether the function should wait

for the pending overlapped operation to be completed.

Output Parameters:

Parameter Description NumBytes Number of bytes written.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 428: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 428

ITransport Error Codes Name Value Description

Page 429: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 429

IComManager Functions The IComManager interface is used by Communication Transporter Manager objects that are used to manage the communication for Device Translators. A Communication Transporter Manager is only needed for those Device Translators that can share a common path of communication. One example of how this could be used is for Device Translators that can share modems for communication. When Device Translators are instantiated they are queried to see if they require a Communication Transporter Manager via the Lnl_RequireCTManager method of the ITranslate interface. Currently only two Communication Transporter Managers exist (Lenel Manager, Apollo Dialup Manager).

List of functions

• Lnl_FindOpenDialPort • Lnl_FindPort • Lnl_DecPortAccess • Lnl_IncPortAccess • Lnl_RequestAccess • Lnl_ReleaseAccess • Lnl_FindCallingDialupPort • Lnl_FindOpenDialupPort • Lnl_IncPortDialupAccess

IComManager Revision History Date Author Notes 03/27/2003 M. Serafin • Added the revision history.

Page 430: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 430

Lnl_FindOpenDialPort Purpose: This finds an available port if vb_Tapi is FALSE or it finds an open modem if vb_Tapi is TRUE. When looking for an open modem it tries the primary one first and if this one can not be found then it searches for the first available one.

Syntax: HRESULT Lnl_FindOpenDialPort ( BOOL vb_Tapi, BSTR primaryModem, IUnknown **pIUnknown );

Input Parameters:

Parameter Description vb_Tapi Determines if to look for a port or a modem

(0-Port, 1-Modem). primaryModem Name of the primary modem to try and

find first.

Output Parameters:

Parameter Description pIUnknown A pointer to the Communication

Transporter object interface.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 431: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 431

Lnl_FindPort Purpose: Find the port so that communication can be issued on it.

Syntax: HRESULT Lnl_FindPort ( int vi_Port, int vi_channelType, IUnknown **pIUnknown );

Input Parameters:

Parameter Description vi_Port Port ID. vi_channelType Type of communication, some

Communication Transport Managers can handle more than one type of communication (serial, IP, Modem). This varies from Communication Transport Manager to Communication Transport Manager.

Output Parameters:

Parameter Description pIUnknown A pointer to the Communication

Transporter object interface.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 432: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 432

Lnl_DecPortAccess Purpose: Decrements access to a particular Communication Transporter.

Syntax: HRESULT Lnl_DecPortAccess ( int vi_Port, BSTR lo_modem, int vi_ChannelType );

Input Parameters:

Parameter Description vi_Port Port ID. lo_modem Modem name. vi_ChannelType Type of communication, some

Communication Transport Managers can handle more than one type of communication (serial, IP, Modem). This varies from Communication Transport Manager to Communication Transport Manager.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 433: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 433

Lnl_IncPortAccess Purpose: Increments access to a new Communication Transporter and returns a pointer to this object.

Syntax: HRESULT Lnl_IncPortAccess ( int vi_Port, BSTR lo_modem, int vi_ChannelType, IUnknown **pIUnknown );

Input Parameters:

Parameter Description vi_Port Port ID. lo_modem Modem name. vi_ChannelType Type of communication, some

Communication Transport Managers can handle more than one type of communication (serial, IP, Modem). This varies from Communication Transport Manager to Communication Transport Manager.

Output Parameters:

Parameter Description pIUnknown A pointer to the Communication

Transporter object interface.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 434: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 434

Lnl_RequestAccess Purpose: Request access to the Communication Transporter Manager object. This synchronizes things between multiple Device Translators.

Syntax: HRESULT Lnl_RequestAccess ( );

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 435: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 435

Lnl_ReleaseAccess Purpose: Release access to the Communication Transporter Manager object so other Device Translators can have access to it.

Syntax: HRESULT Lnl_ReleaseAccess ( );

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 436: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 436

Lnl_FindCallingDialupPort Purpose: Loop through a list of ports trying to find a port with the panel ID that was passed into this function.

Syntax: HRESULT Lnl_FindCallingDialupPort ( int PanelID, IUnknown **pIUnknown );

Input Parameters:

Parameter Description PanelID Panel ID.

Output Parameters:

Parameter Description pIUnknown A pointer to the Communication

Transporter object interface.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 437: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 437

Lnl_FindOpenDialupPort Purpose: Searches the list of ports for an open dialup port and if one is found it is set in use with the panel id that is passed in.

Syntax: HRESULT Lnl_FindOpenDialupPort ( int PanelID, BSTR TapiName, IUnknown **pIUnknown );

Input Parameters:

Parameter Description PanelID Panel ID. TapiName Modem name.

Output Parameters:

Parameter Description pIUknown A pointer to the Communication

Transporter object interface.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 438: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 438

Lnl_IncPortDialupAccess Purpose: Increments access to a new Communication Transporter and returns a pointer to this object.

Syntax: HRESULT Lnl_IncPortDialupAccess ( BSTR TapiName, BOOL bDialupPort, IUnknown **pIUnknown );

Input Parameters:

Parameter Description TapiName Modem name. bDialupPort Indicates if the this is a dialup driver.

Output Parameters:

Parameter Description pIUnknown A pointer to the Communication

Transporter object interface.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 439: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 439

IComManager Error Codes Name Value Description

Page 440: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 440

IBiometricCfg Functions The IBiometricCfg interface is used for biometric configuration. List of Functions

• Lnl_AddBiometricTemplate • Lnl_AddBiometricDef

Page 441: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 441

Lnl_AddBiometricTemplate Purpose: Adds a biometric record. Syntax: HRESULT Lnl_AddBiometricTemplate( ADD_BIOMETRIC_TEMPLATE *pAddBio ); Input Parameters: Parameter Description pAddBio Biometric template to be added Return Values: Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 442: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 442

Lnl_AddBiometricDef

Purpose: Updates biometric configuration.

Syntax: HRESULT Lnl_AddBiometricDef( ADD_BIOMETRIC_DEF *pAddBioDef ); Input Parameters:

Parameter Description pAddBioDef The biometric Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 443: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 443

IBiometricCfg Structures

Page 444: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 444

ADD_BIOMETRIC_TEMPLATE Type Parameter Description long PanelID Panel ID long si_SegmentID Segment ID __int64 Card_Number cardholder id number

(15-digits) long BioType Identifies the type of

biometric ID System long Flags Default to 0 long MinScore 0 - use default; Else

scaled to be in range from 1 to 99

long TemplateSize Size of the biometric template

BYTE[LNL_BIOMETRIC_TEMPLATE_SIZE] BioTemplate Biometric template

Page 445: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 445

ADD_BIOMETRIC_DEF Type Parameter Description long si_PanelID Panel ID. long si_SegmentID Segment ID. BIOMETRIC_DEF biometricDef The biometric configuration.

Page 446: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 446

BIOMETRIC_DEF Type Parameter Description long NumBioRecords Number of biometric records to create. long BioType Type of biometric records to create. long Flags Report actual score and template if score

below this value. long MinScoreDflt Default minimum "accept" score. long MinScore Store required minimum score per user. long TemplateSize Size of the biometric template.

Page 447: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 447

IIntercom Functions The IIntercom interface contains intercom methods for placing and canceling calls on intercom stations.

List of functions

• Lnl_CancelIntercomCall • Lnl_PlaceIntercomCall

IIntercom Revision History Date Author Notes 03/27/2003 M. Serafin • Added the revision history.

Page 448: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 448

Lnl_CancelIntercomCall Purpose: Cancel a call on an intercom station.

Syntax: HRESULT Lnl_CancelIntercomCall ( long StationNum );

Input Parameters:

Parameter Description StationNum Station number that call is to be cancelled

on.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 449: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 449

Lnl_PlaceIntercomCall Purpose: Place a call between two intercom stations (Station1 will attempt a call to Station2).

Syntax: HRESULT Lnl_PlaceIntercomCall ( long Station1, long Station2, long Priority );

Input Parameters:

Parameter Description Station1 Station initiating the call. Station2 Station call is being placed to. Priority Priority of the intercom call (Currently

only high-priority calls are being placed and the value of 1 is being passed in).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 450: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 450

IIntercom Error Codes Name Value Description

Page 451: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 451

IIntercomStation Functions The IIntercomStation interface contains intercom methods dealing with the configuration of intercom stations. Implementing this interface will make the Communication Server call Lnl_SetIntercomStation for all the defined intercom stations when the Device Translator is loaded up.

List of functions

• Lnl_SetIntercomStation IIntercomStation Revision History Date Author Notes 03/25/2003 M. Serafin • Initial Version

Page 452: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 452

Lnl_SetIntercomStation Purpose: Sends a command to set or delete an intercom station. This method is useful for those Device Translators that need to know what intercom stations are defined in the system.

Syntax: HRESULT Lnl_SetIntercomStation ( long stationNum, long stationType, BOOL deleteStation );

Input Parameters:

Parameter Description stationNum Intercom Station number that is being

added, modified, or deleted. stationType Type of intercom station or node.

Normally this will be 0 but do support a couple of additional types. 0 – Intercom Station 1 – Input 2 – Output 3 – Door

deleteStation Indicates if the intercom station was deleted.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 453: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 453

Intercom Station Capabilities File Starting OnGuard 6.0.148 there is an option to customize and support Intercom station commands. This is supported via a Panel Capabilities XML file. The file indicates which commands will be available for an Intercom station in Alarm Monitoring. The file is loaded into OnGuard database in the PANELTYPE table and the PANEL_PROPERTIES field. When working with the GenericIntercomTranslator project, the XML file should be placed in the Generic Intercom panel entry (PANELTYPEID = 203). The XML Capabilities file is a set of elements with true / false values to indicate whether or not the command should be available from the Alarm Monitoring. In order to support the enabled commands, some methods from the IIntercom and IPBX interfaces should be implemented. An example for XML Capabilities file can be found below. In the example the Cancel Intercom call, Place Intercom Call, and Cancel Specific Call commands are enabled and therefore will be available from Alarm monitoring. Please note that if an element is not specified in the XML file its default value is ‘false’. <?xml version="1.0" encoding="utf-16"?> <Intercom> <CancelIntercomCall>true</CancelIntercomCall> <PlaceIntercomCall>true</PlaceIntercomCall> <CancelSpecificCall>true</CancelSpecificCall> <AnswerSpecificCall>false</AnswerSpecificCall> <SetBlockedState>false</SetBlockedState> <DivertSpecificCall>false</DivertSpecificCall> </Intercom> The elements in the XML file correspond to methods from the IIntercom and IPBX interfaces (see list below). The methods need to be implemented in the translator if the element value is set to true. <CancelIntercomCall> - Lnl_CancelIntercomCall from IIntercom interface. <PlaceIntercomCall> - Lnl_PlaceIntercomCall from IIntercom interface. <CancelSpecificCall> - Lnl_CancelSpecificCall from IPBX interface. <AnswerSpecificCall> - Lnl_AnswerSpecificCall from IBPX interface. <SetBlockedState> - Lnl_SetBlockedState from IBPX interface. <DivertSpecificCall> - Lnl_DivertSpecificCall from IBPX interface.

Page 454: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 454

Note: If the XML capabilities file is not used (the PANEL_PROPERTIES field has the ‘NULL’ value), the default commands that are available for the intercom station are ‘Place Call’ and ‘Cancel Call’.

Page 455: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 455

IIntercom Error Codes Name Value Description

Page 456: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 456

IPersonalSafety Functions Description of the IPersonalSafety interface.

List of functions

• Lnl_ModifyBusDevice • Lnl_SetTransmitter • Lnl_ConfigureBusDevice

IPersonalSafety Revision History Date Author Notes 03/27/2003 M. Serafin • Added the revision history.

Page 457: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 457

Lnl_ModifyBusDevice Purpose: Updates the device translator with changes to a bus device.

Syntax: HRESULT Lnl_ModifyBusDevice ( int device, BYTE type, BOOL addDevice );

Input Parameters:

Parameter Description device The ID of the device (this is based off the

device address). type The type of the Bus Device. addDevice Indicates if this device is being Added (or

modified), otherwise it is removed (0-Remove Device, 1-Add Device).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 458: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 458

Lnl_SetTransmitter Purpose: The method is used to add/modify/delete a transmitter from the Device Translator.

Syntax: HRESULT Lnl_SetTransmitter ( TRANSMITTER_DEF *pTransmitterDef );

Input Parameters:

Parameter Description pTransmitterDef Structure containing the transmitter

information.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 459: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 459

Lnl_ConfigureBusDevice Purpose: This method is used to program bus devices.

Syntax: HRESULT Lnl_ConfigureBusDevice ( BUS_DEVICE_CFG *pBusDeviceCfg );

Input Parameters:

Parameter Description pBusDeviceCfg Structure containing the configuration

information for the bus device.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 460: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 460

IPersonalSafety Structures TRANSMITTER_DEF

Type Parameter Description long PanelID Panel id this update is for. long TransmitterDBID ID of transmitter in database. long Type Type of transmitter (See

transmitter types listed in the IPersonalSafety Defines section).

long BaseID Base signal ID of transmitter BYTE AlwaysMask Whether to always mask this

transmitter (0-False, 1-True). long MaskTZ Timezone during which to mask

transmitter if not always mask BYTE DeleteFlag Whether the transmitter is being

deleted, (0-False, 1-True). BYTE TamperEnabled Whether tamper events can be

generated for this transmitter (0-False, 1-True).

BYTE SupervisionEnabled Whether supervision events can be generated for this transmitter (0-False, 1-True).

BYTE RestoralEnabled Whether restoral events can be generated for this transmitter (0-False, 1-True).

BUS_DEVICE_CFG Type Parameter Description long PanelID Panel ID long SiteID Site ID of the panel long BusDeviceID Bus ID of the device (00

indicates SLC-5). long Command Command (memory location). long Data Data.

Page 461: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 461

IPersonalSafety Defines Transmitter Types

Name Value Description TRANSMITTER_TYPE_UNKNOWN 0x0000 TRANSMITTER_TYPE_PORTABLE 0x1000 TRANSMITTER_TYPE_MCT_101_S 0x1001 TRANSMITTER_TYPE_MCT_102_S 0x1002 TRANSMITTER_TYPE_MCT_104_S 0x1003 TRANSMITTER_TYPE_MCT_201_S 0x1004 TRANSMITTER_TYPE_MCT_211_S 0x1005 TRANSMITTER_TYPE_MCT_IR_201_S 0x1006 TRANSMITTER_TYPE_WT_101_S 0x1007 TRANSMITTER_TYPE_WT_102_S 0x1008 TRANSMITTER_TYPE_WT_211_S 0x1009 TRANSMITTER_TYPE_WT_IR_201_S 0x100A TRANSMITTER_TYPE_WT_201_S 0x100B TRANSMITTER_TYPE_WT_104_S 0x100C Not currently

supported. TRANSMITTER_TYPE_FIXED 0x2000 TRANSMITTER_TYPE_MCD_1000_S 0x2001 Not currently

supported. TRANSMITTER_TYPE_MCPIR_2000_S 0x2002 TRANSMITTER_TYPE_MCPIR_3000_S 0x2003 TRANSMITTER_TYPE_MCT_100_S 0x2004 TRANSMITTER_TYPE_MCT_302_S 0x2005 TRANSMITTER_TYPE_WST_400_S 0x2006 Not currently

supported. TRANSMITTER_TYPE_WT_301_S 0x2007 TRANSMITTER_TYPE_SRN_2000_WS 0x2008 Not currently

supported. TRANSMITTER_TYPE_SPD_1000 0x2009 Not currently

supported. TRANSMITTER_TYPE_SPD_2000 0x200A TRANSMITTER_TYPE_SPD_3000 0x200B Not currently

supported. TRANSMITTER_TYPE_WT_100_S 0x200C Not currently

supported. TRANSMITTER_TYPE_MANDOWN 0x3000 TRANSMITTER_TYPE_MCT_101_MDS 0x3001 TRANSMITTER_TYPE_MDT_122_S 0x3002

Page 462: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 462

IPersonalSafety Error Codes Name Value Description

Page 463: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 463

IIntrusion Functions The IIntrusion interface is used for intrusion detection.

List of functions

• Lnl_ExecuteFunction • Lnl_SetZoneBypassMode • Lnl_SetZoneOutputMode • Lnl_SetAreaArmState • Lnl_SilenceAreaAlarms • Lnl_SetOnboardRelayMode • Lnl_SetOffboardRelayMode • Lnl_OpenDoor • Lnl_SetDoorMode • Lnl_GetIntrusionPanelStatus • Lnl_GetIntrusionZoneStatus • Lnl_GetIntrusionOnboardRelayStatus • Lnl_GetIntrusionOffboardRelayStatus • Lnl_GetInstrusionDoorStatus • Lnl_GetIntrusionAreaStatus

IIntrusion Revision History Date Author Notes 03/27/2003 M. Serafin • Added the revision history.

Page 464: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 464

Lnl_ExecuteFunction Purpose: Executes function by specifying the keypad number and function number. The Execute Custom Function is available for Intrusion panel integrations as of OnGuard 6.4.500 HF 2.5. The “Execute Custom Function” option is available from the intrusion panel context menu in Alarm Monitoring. In order to enable this option in the context menu, an additional element needs to be specified within the panel capabilities by updating the XML file and loading it to the database (see Intrusion Area Capabilities File section). The element name is <ExecuteFunction> and must be specified as “true” in order to load the Execute Custom Function menu item on the intrusion panel context menu in Alarm Monitoring. When selecting the Execute Custom Function menu item, a dialog will be displayed. The dialog allows the end user to enter a keypad and function number. The acceptable range of values for these numbers is as follows: Keypad number: 0 – 63 Function number: 0 – 255

Syntax: HRESULT Lnl_ExecuteFunction ( long keypadNumber, long functionNumber );

Input Parameters:

Parameter Description keypadNumber The keypad number in the system functionNumber The function number to be executed

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 465: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 465

Lnl_SetZoneBypassMode Purpose: Set the bypass mode of a zone in the intrusion panel.

Syntax: HRESULT Lnl_SetZoneBypassMode ( long zoneID, short bypassMode );

Input Parameters:

Parameter Description zoneID ID of zone in which bypass mode is to be

set. bypassMode The bypass mode the zone needs to be set

with (See LnlIntrusionSetBypassMode_t Enum for possible values).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 466: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 466

Lnl_SetZoneOutputMode Purpose: Set the output mode of a zone in the intrusion panel.

Syntax: HRESULT Lnl_SetZoneOutputMode ( long zoneID, short outputMode );

Input Parameters:

Parameter Description zoneID ID of zone in which output mode is to be

set. outputMode The output mode the zone needs to be set

with. Possible values are 0 and 1.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 467: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 467

Lnl_SetAreaArmState Purpose: Set the arming state of an area in the intrusion panel.

Syntax: HRESULT Lnl_SetAreaArmState ( long areaID, short armingState );

Input Parameters:

Parameter Description areaID ID of area in which arming state is to be

set. armingState The arming mode the area needs to be set

with (See LnlIntrusionSetAreaArmState_t Enum for possible values).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 468: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 468

Lnl_SilenceAreaAlarms Purpose: Set alarms to be silenced in an area in the intrusion panel.

Syntax: HRESULT Lnl_SilenceAreaAlarms ( long areaID );

Input Parameters:

Parameter Description areaID ID of area in which alarms are to be

silenced.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 469: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 469

Lnl_SetOnboardRelayMode Purpose: Set the relay mode of onboard relay that configured under the intrusion panel.

Syntax: HRESULT Lnl_SetOnboardRelayMode ( long relayID, short relayMode );

Input Parameters:

Parameter Description relayID ID of relay in which mode is to be set. relayMode The mode the relay need to be set with (See

LnlIntrusionSetRelayMode_t Enum for possible values).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 470: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 470

Lnl_SetOffboardRelayMode Purpose: Set the relay mode of offboard relay that configured under the intrusion panel.

Syntax: HRESULT Lnl_SetOffboardRelayMode ( long relayID, long relayMode );

Input Parameters:

Parameter Description relayID ID of relay in which mode is to be set. short relayMode The mode the relay needs to be set with

(See LnlIntrusionSetRelayMode_t Enum for possible values).

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 471: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 471

Lnl_OpenDoor Purpose: Open door that is configured under the intrusion panel.

Syntax: HRESULT Lnl_OpenDoor ( long doorID );

Input Parameters:

Parameter Description doorID ID of the door that needs to be opened.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 472: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 472

Lnl_SetDoorMode Purpose: Set the mode of a door that configured under the intrusion panel.

Syntax: HRESULT Lnl_SetDoorMode ( long doorID, short doorMode );

Input Parameters:

Parameter Description doorID ID of door in which mode is to be set. doorMode The mode the door needs to be set with

(See LnlIntrusionSetDoorMode_t Enum for possible values)

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 473: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 473

Lnl_GetIntrusionPanelStatus Purpose: Get the intrusion panel status.

Syntax: HRESULT Lnl_GetIntrusionPanelStatus ( BYTE *sb_ComStatus, BYTE *sb_AsyncStatus, long *vl_PanelStatus );

Output Parameters:

Parameter Description sb_ComStatus Should return the panel state

(PANEL_STATE_OFFLINE, PANEL_STATE_READY).

sb_AsynStatus If TRUE, Indicates status will be returned asynchronously later.

vl_PanelStatus Should return the panel status. See IIntrusion Defines.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 474: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 474

Lnl_GetIntrusionZoneStatus Purpose: Get the status of the intrusion panel’s zones.

Syntax: HRESULT Lnl_GetIntrusionZoneStatus ( BYTE *sb_AsyncStatus, long vl_NumZones, long vl_ZoneAlarmStatus[] );

Input Parameters:

Parameter Description vl_NumZones The number of zones in the panel.

Output Parameters:

Parameter Description sb_AsyncStatus if TRUE, Indicates status will be returned

asynchronously later. Array of the alarm status of the zones. See IIntrusion Defines.

vl_ZoneAlarmStatus Array of the other status of the zones. See IIntrusion Defines.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 475: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 475

Lnl_GetIntrusionOffboardRelayStatus Purpose: Get the status of the off board relays that configured under the intrusion panel.

Syntax: HRESULT Lnl_GetIntrusionOffboardRelayStatus ( BYTE *sb_AsyncStatus, long vl_NumOffBoardRelays, BYTE vl_OffBoardRelayStatus );

Input Parameters:

Parameter Description vl_NumOffBoardRelays Number of Off Board relays in the

intrusion panel configuration.

Output Parameters:

Parameter Description sb_AsyncStatus if TRUE, Indicates status will be returned

asynchronously later. vl_OffBoardRelayStatus Array with the status of the Off Board

relays. See IIntrusion Defines.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 476: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 476

Lnl_GetIntrusionOnboardRelayStatus Purpose: Get the status of the off board relays that configured under the intrusion panel.

Syntax: HRESULT Lnl_GetIntrusionOffboardRelayStatus ( BYTE *sb_AsyncStatus, long vl_NumOffBoardRelays, BYTE vl_OffBoardRelayStatus );

Input Parameters:

Parameter Description vl_NumOnBoardRelays Number of On Board relays in the intrusion

panel configuration.

Output Parameters:

Parameter Description sb_AsyncStatus if TRUE, Indicates status will be returned

asynchronously later. vl_OnBoardRelayStatus[] Array with the status of the On Board relays.

See IIntrusion Defines.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 477: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 477

Lnl_GetIntrusionDoorStatus Purpose: Get the status of the doors that configured under the intrusion panel.

Syntax: HRESULT Lnl_GetIntrusionDoorStatus ( BYTE *sb_AsyncStatus, long vl_NumDoors, long vl_DoorMode[], long vl_DoorOtherStatus[] );

Input Parameters:

Parameter Description vl_NumDoors The number of configured doors in the

intrusion panel configuration.

Output Parameters:

Parameter Description sb_AsyncStatus if TRUE, Indicates status will be returned

asynchronously later. vl_DoorMode[] Array with the mode of all doors. See

IIntrusion Defines. vl_DoorOtherStatus[] Array with the other status of all doors. See

IIntrusion Defines.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 478: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 478

Lnl_GetIntrusionAreaStatus Purpose: Get the status of the areas that configured under the intrusion panel. Syntax:

HRESULT Lnl_GetIntrusionAreaStatus ( BYTE *sb_AsyncStatus, long vl_NumAreas, long vl_AreaArmingStatus[], long vl_AreaAlarmStatus[], long vl_AreaOtherStatus[] );

Input Parameters:

Parameter Description vl_NumAreas The number of configured areas in the intrusion

panel configuration.

Output Parameters:

Parameter Description sb_AsyncStatus if TRUE, Indicates status will be returned

asynchronously later. vl_AreaArmingStatus[] Array with the arming status of all areas. See

IIntrusion Defines. vl_AreaAlarmStatus[] Array with the alarm status of all areas. See

IIntrusion Defines. vl_AreaOtherStatus[] Array with the other status of all areas. See

IIntrusion Defines.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 479: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 479

IIntrusion Enums LnlIntrusionSetBypassMode_t LnlIntrusionSetZoneUnbypass = 0 LnlIntrusionSetZoneBypass LnlIntrusionSetRelayMode_t LnlIntrusionSetRelayOff = 0 LnlIntrusionSetRelayOn LnlIntrusionSetRelayToggle LnlIntrusionSetDoorMode_t LnlIntrusionSetDoorLock= 0 LnlIntrusionSetDoorUnlock LnlIntrusionSetDoorSecure LnlIntrusionSetAreaArmState_t LnlIntrusionSetAreaArmStateDisarm = 0 LnlIntrusionSetAreaArmStatePerimeterArm LnlIntrusionSetAreaArmStateEntirePartitionArm LnlIntrusionSetAreaArmStateMasterArmDelay LnlIntrusionSetAreaArmStateMasterArmInstant LnlIntrusionSetAreaArmStatePerimeterArmDelay LnlIntrusionSetAreaArmStatePerimeterArmInstant LnlIntrusionSetAreaArmStatePartialArm LnlIntrusionSetAreaArmStateCancelReset

Page 480: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 480

IIntrusion Defines // bit mask values for intrusion panel status values INTRUSION_PANEL_BIT_EVENT_LOG_THRESHOLD_REACHED 0x01 INTRUSION_PANEL_BIT_EVENT_LOG_WRAPPED 0x02 INTRUSION_PANEL_BIT_POINT_BUS_FAILED 0x04 INTRUSION_PANEL_BIT_VALID_LOCAL_ACCESS 0x08 INTRUSION_PANEL_BIT_RF_RECEIVER_TROUBLE 0x10 INTRUSION_PANEL_BIT_FAILED_TO_CALL_RAM 0x20 INTRUSION_PANEL_BIT_USER_CODE_TAMPER 0x40 INTRUSION_PANEL_BIT_SDI_DEVICE_FAILURE 0x80 INTRUSION_PANEL_BIT_AC_FAILURE 0x100 INTRUSION_PANEL_BIT_BATTERY_MISSING 0x200 INTRUSION_PANEL_BIT_BATTERY_LOW 0x400 INTRUSION_PANEL_BIT_PARAM_CHECKSUM_FAILED 0x800 INTRUSION_PANEL_BIT_PHONE_LINE_FAILED 0x1000 INTRUSION_PANEL_BIT_EXTRA_RF_POINT 0x2000 INTRUSION_PANEL_BIT_REPORT_FAILURE 0x4000 INTRUSION_PANEL_BIT_CONTROL_FAULT 0x8000 INTRUSION_PANEL_BIT_MPX_BUS_FAULT 0x10000 INTRUSION_PANEL_BIT_RADIO_RX_FAULT 0x20000 INTRUSION_PANEL_BIT_AUX_POWER_FAULT 0x40000 INTRUSION_PANEL_BIT_OPTION_FAULT 0x80000 INTRUSION_PANEL_BIT_RECEIVER_COMM_HAS_FAILED 0x100000 // status of an intrusion zone INTRUSION_ZONE_POINT_NORMAL 0 INTRUSION_ZONE_POINT_OPEN 1 INTRUSION_ZONE_POINT_SHORT 2 INTRUSION_ZONE_POINT_MISSING 3 INTRUSION_ZONE_POINT_NOT_CONFIGURED 4 INTRUSION_ZONE_POINT_OPEN_CIRCUIT 5 INTRUSION_ZONE_POINT_LOW_RESISTANCE 6 INTRUSION_ZONE_POINT_HIGH_RESISTANCE 7 INTRUSION_ZONE_POINT_MASKED 8 // bit mask values for all other intrusion zone states INTRUSION_ZONE_BIT_BYPASSED 0x01 INTRUSION_ZONE_BIT_FORCED 0x02 INTRUSION_ZONE_BIT_NOT_ACKNOWLEGED 0x04 INTRUSION_ZONE_BIT_EXPLICIT_TROUBLE 0x08

Page 481: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 481

INTRUSION_ZONE_BIT_TAMPER 0x10 INTRUSION_ZONE_BIT_LOW_BATTERY 0x20 INTRUSION_ZONE_BIT_NO_SIGNAL_STRENGTH 0x40 INTRUSION_ZONE_BIT_UNTESTED 0x80 INTRUSION_ZONE_BIT_DAY_MONITOR_ALARM 0x100 INTRUSION_ZONE_BIT_OUTPUT_LATCHED 0x200 INTRUSION_ZONE_BIT_ALARM_UNRESTORED 0x400 INTRUSION_ZONE_BIT_TROUBLE_UNRESTORED 0x800 INTRUSION_ZONE_BIT_SUSPENDED 0x1000 INTRUSION_ZONE_BIT_RF 0x2000 INTRUSION_ZONE_BIT_SOAK_TEST 0x4000 // door mode (locked, unlocked, secured) for intrusion door INTRUSION_DOOR_MODE_LOCKED 1 INTRUSION_DOOR_MODE_UNLOCKED 2 INTRUSION_DOOR_MODE_SECURED 3 // bit mask values for all other intrusion door states INTRUSION_DOOR_BIT_LEARN_MODE 0x01 INTRUSION_DOOR_BIT_DIAGNOSTIC_MODE 0x02 INTRUSION_DOOR_BIT_NOT_INSTALLED 0x04 INTRUSION_DOOR_BIT_SDI_FAILURE 0x08 INTRUSION_DOOR_BIT_HELD 0x10 // arming state of an intrusion area INTRUSION_AREA_ARMING_DISARMED 0 INTRUSION_AREA_ARMING_MASTER_ARMED 1 INTRUSION_AREA_ARMING_PERIMETER_INSTANT_ARMED 2 INTRUSION_AREA_ARMING_PERIMITER_DELAY 3 INTRUSION_AREA_ARMING_AREA_ENTRY_DELAY 4 INTRUSION_AREA_ARMING_PERIMITER_ENTRY_DELAY 5 INTRUSION_AREA_ARMING_AREA_EXIT_DELAY 6 INTRUSION_AREA_ARMING_PERIMITER_EXIT_DELAY 7 INTRUSION_AREA_ARMING_MASTER_INSTANT_ARMED 8 INTRUSION_AREA_ARMING_PERIMITER_ARMED 9 INTRUSION_AREA_ARMING_NOT_IN_USE 10 INTRUSION_AREA_ARMING_ENTIRE_PARTITION_ARMED 11 INTRUSION_AREA_ARMING_SETTING 12 INTRUSION_AREA_ARMING_UNSETTING 13 INTRUSION_AREA_ARMING_SUSPEND 14 INTRUSION_AREA_ARMING_PART_SET 15 // alarm state of an intrusion area INTRUSION_AREA_ALARM_FIRE 0x01 INTRUSION_AREA_ALARM_NON_FIRE 0x02 INTRUSION_AREA_ALARM_FIRE_TROUBLE 0x04 INTRUSION_AREA_ALARM_FIRE_SUPERVISORY 0x08 INTRUSION_AREA_ALARM_NON_FIRE_TROUBLE 0x10

Page 482: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 482

INTRUSION_AREA_ALARM_NON_FIRE_SUPERVISORY 0x20 INTRUSION_AREA_ALARM_ALARM 0x40 // bitmask for all other intrusion area states INTRUSION_AREA_BIT_NOT_READY_FOR_ARMING 0x01 INTRUSION_AREA_BIT_HAS_BYPASSED_POINTS 0x02 INTRUSION_AREA_BIT_HAS_FORCED_POINTS 0x04 INTRUSION_AREA_BIT_SYSTEM 0x08 INTRUSION_AREA_BIT_PA_ALARM 0x10 INTRUSION_AREA_BIT_TAMPER 0x20 // bitmask values for intrusion relay states INTRUSION_RELAY_BIT_ACTIVE 0x01 INTRUSION_RELAY_BIT_PULSE 0x02 INTRUSION_RELAY_BIT_FORCED 0x04

Page 483: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 483

Intrusion Area Capabilities File Starting OnGuard 6.0.148 there is an option to customize and support Intrusion Areas commands. This is supported via a Panel Capabilities XML file. The file indicates which commands will be available for Intrusion Area in Alarm Monitoring. The file is loaded into OnGuard database in the PANELTYPE table and the PANEL_PROPERTIES field. When working with the GenericBurglaryTranslator project, the XML file should be placed in the Generic Burglary panel entry (PANELTYPEID = 205). The XML Capabilities file is a set of elements with true / false values to indicate whether or not the command should be available from the Alarm Monitoring. In order to support the enabled commands, the Lnl_SetAreaArmState method needs to be implemented. The method should examine the armingState parameter and act accordingly. An example for XML Capabilities file can be found below. In the example the Disarm, Perimeter Arm, and Entire Partition Arm commands are enabled and therefore will be available from Alarm monitoring. Please note that if an element is not specified in the XML file its default value is ‘false’. <?xml version="1.0" encoding="utf-16"?> <Intrusion> <Commands> <Area> <Disarm>true</Disarm> <PerimeterArm>true</PerimeterArm> <EntirePartitionArm>true</EntirePartitionArm> <ArmDelay>false</ArmDelay> <ArmInstant>false</ArmInstant> <PerimeterArmDelay>false</PerimeterArmDelay> <PerimeterArmInstant>false</PerimeterArmInstant> <SilenceAlarms>false</SilenceAlarms> <PartialArm>false</PartialArm> <CancelReset>false</CancelReset> </Area> </Commands> </Intrusion> The elements in the XML file represent the LnlIntrusionSetAreaArmState_t enum values (can be found under the ‘IIntrusion Enums’ section): <Disarm> - LnlIntrusionSetAreaArmStateDisarm <PerimeterArm> - LnlIntrusionSetAreaArmStatePerimeterArm

Page 484: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 484

<EntirePartitionArm> - LnlIntrusionSetAreaArmStateEntirePartitionArm <ArmDelay> - LnlIntrusionSetAreaArmStateMasterArmDelay <ArmInstant> - LnlIntrusionSetAreaArmStateMasterArmInstant <PerimeterArmDelay> - LnlIntrusionSetAreaArmStatePerimeterArmDelay <PerimeterArmInstant> - LnlIntrusionSetAreaArmStatePerimeterArmInstant <SilenceAlarms> - <PartialArm> - LnlIntrusionSetAreaArmStatePartialArm <CancelReset> - LnlIntrusionSetAreaArmStateCancelReset Note: If the XML capabilities file is not used (the PANEL_PROPERTIES field has the ‘NULL’ value), the default commands that are available for the intrusion area are ‘Disarm’, ‘Perimeter Arm’ and ‘Arm Entire Partition’.

Page 485: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 485

IElevatorDispatching Functions The IElevatorDispatching interface is used for integration between the security system and an elevator destination dispatching system.

Note: An elevator terminal is a keypad or touch screen device used to request access to a floor in a building.

List of functions:

• Lnl_SetPanelTerminals • Lnl_UpdateTerminal • Lnl_SetTerminalOperationalMode • Lnl_SetTerminalAllowedFloors • Lnl_SendTerminalCredentialData • Lnl_GetElevatorDispatchingPanelStatus • Lnl_GetElevatorKeypadTerminalStatus

IElevatorDispatching Revision History Date Author Notes 11/16/2007 R. Cortese • Added the revision history.

Page 486: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 486

Lnl_SetPanelTerminals Purpose: Sets the initial configuration of the elevator terminals when the driver is first loaded. This method is called once when the device translator is initially loaded. All other updates for the terminal are handled in Lnl_UpdateTerminal.

Syntax: HRESULT Lnl_SetPanelTerminals ( ELEVATOR_KEYPAD_TERMINALS *terminalsToManage );

Input Parameters:

Parameter Description terminalsToManage Structure containing configuration data for

a collection of elevator keypad terminals.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 487: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 487

Lnl_UpdateTerminal Purpose: Updates the existing configuration of an elevator terminal.

Syntax: HRESULT Lnl_UpdateTerminal ( ELEVATOR_TERMINAL_CONFIG * terminalConfiguration );

Input Parameters:

Parameter Description terminalConfiguration Structure containing elevator terminal

configuration data elements.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 488: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 488

Lnl_SetTerminalOperationalMode Purpose: Places the elevator terminal into a specific mode of operation.

Syntax: HRESULT Lnl_SetTerminalOperationalMode ( long terminalID, short operationalMode );

Input Parameters:

Parameter Description terminalID The ID of the elevator terminal that will be

placed into a specific operational mode. operationalMode The operational mode value to be applied

to the elevator terminal.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 489: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 489

Lnl_SetTerminalAllowedFloors Purpose: Configures an elevator terminal with a list of floors that is accessible to everyone (i.e. does not require security credentials to board the elevator.

Syntax: HRESULT Lnl_SetTerminalAllowedFloors ( long terminalID, ELEVATOR_FLOORLIST *allowedFloorsCfg );

Input Parameters:

Parameter Description terminalID The ID of the elevator terminal that will be

configured with the allowed floors list. allowedFloorsCfg Structure containing the list of elevator

floors to set as allowed floors.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 490: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 490

Lnl_SendTerminalCredentialData Purpose: Sends credential data to an elevator terminal indicating if access should be granted or denied.

Syntax: HRESULT Lnl_SendTerminalCredentialData ( long terminalID, ELV_DISPATCHING_CREDENTIAL_DATA *credentialData );

Input Parameters:

Parameter Description terminalID The ID of the elevator terminal involved

with an access attempt. credentialData Structure containing credential related data

members to assist the elevator system in determining whether or not access should be granted or denied.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 491: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 491

Lnl_GetElevatorDispatchingPanelStatus Purpose: Returns status information about the elevator system.

Notes: All parameters passed to this method or [out] parameters.

Syntax: HRESULT Lnl_GetElevatorDispatchingPanelStatus ( BYTE *sb_ComStatus, BYTE *sb_AsyncStatus, long *vl_PanelStatus );

Input Parameters:

Parameter Description sb_ComStatus Indicates if the elevator system is online or

offline. sb_AsyncStatus Indicates if status information is available

in the data returned from a call to this method (sb_AsyncStatus = FALSE) or if incremental status updates will be sent as they become available (sb_AsyncStatus = TRUE).

vl_PanelStatus Indicates whether the elevator system is a primary (1) or secondary type (2). A value of 0 indicates that this setting is not used.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 492: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 492

Lnl_GetElevatorKeypadTerminalStatus Purpose: Returns status information about the elevator terminals that belong to the elevator system.

Syntax: HRESULT Lnl_GetElevatorKeypadTerminalStatus ( BYTE *sb_AsyncStatus, long vl_NumTerminals, BOOL sb_ComStatus[], short operationalMode[], ELEVATOR_FLOORLIST allowedFloorsCfg[] );

Input Parameters:

Parameter Description sb_AsyncStatus Indicates if status information is available

in the data returned from a call to this method (sb_AsyncStatus = FALSE) or if incremental status updates will be sent as they become available (sb_AsyncStatus = TRUE).

vl_NumTerminals The number of elevator terminals that will return status information.

sb_ComStatus[] An array indicating the online/offline status for each elevator terminal.

operationalMode[] An array indicating the operational mode for each elevator terminal.

allowedFloorsCfg[] An array indicating the configuration of the allowed floors assigned to an elevator terminal.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 493: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 493

IElevatorDispatching Structures ELEVATOR_KEYPAD_TERMINALS

Type Parameter Description long numTerminals The number of elevator terminals

contained within the terminalArray member of this structure.

ELEVATOR_KEYPAD_TERMINAL terminalArray An array of elevator terminals containing specific data elements (See ELEVATOR_KEYPAD_TERMINAL)

ELEVATOR_KEYPAD_TERMINAL Type Parameter Description short terminalID The unique identifier of an

elevator terminal short operationalMode The operational mode in which

the elevator terminal is operating.

ELEVATOR_FLOORLIST allowedFloors Structure containing the list of allowed floors assigned to the elevator terminal.

ELEVATOR_TERMINAL_CONFIG This structure is used to configure an association between a reader in the access control system and an elevator terminal. This is then later used to send credential data to an elevator terminal when an access attempt occurs for the specified reader.

Type Parameter Description int sl_AccessPanelID The access panel ID that

contains the reader associated with the elevator terminal.

int sl_ReaderID The reader ID associated with the elevator terminal.

int sl_ElevatorControllerID The ID of the elevator dispatching device that contains the elevator terminal associated with the access control reader.

int sl_AccessEventDuration The amount of time allowed to elapse between the occurrence of an access control event and

Page 494: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 494

sending credential data to the elevator terminal. For example, when an access attempt occurs, if the difference between the time of the event and the current time exceeds this duration then credential data will not be sent to the elevator terminal.

BOOL sb_DeleteTerminal This is a configuration related data item that indicates the elevator terminal is no longer present in the system. This should normally be set to FALSE.

ELEVATOR_KEYPAD_ TERMINAL

terminalConfig Structure containing the configuration for an elevator terminal.

ELEVATOR_FLOORLIST Type Parameter Description long si_ElevatorFloorListID The unique identifier for elevator

floor list. long si_Timezone Not Currently Used. Could be used

to indicate the time at which access to the elevator floor list is allowed.

*BYTE[32] sb_FloorList A byte array containing a list of floors that are enabled. Floors 0 to 127 use bytes 0 – 15, Floors -128 to -1 use bytes 16 – 31 A 1 in a particular bit field means the floor is enabled. Floor numbers are in increasing order from right to left in the bit field. For example Byte 0 (floors 7 to 0) Byte 1 (floors 15 to 9) … Byte 16 (-121 to -128) Byte 17 (-113 to -120) …

Page 495: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 495

ELV_DISPATCHING_CREDENTIAL_DATA Type Parameter Description BOOL sb_IsCredentialValid A Boolean flag that indicates if the

credential was valid (TRUE) or invalid (FALSE)

__int64 sl_CardNumber The cardholder badge ID associated with the access event from the access control system.

BYTE sb_CredentialFlags A bitmap that can contain custom configurable bit flags that may apply to a cardholder.

*BYTE[32] sb_AuthorizedFloors A list of elevator floors that the cardholder is authorized to access.

BYTE sb_DefaultFloor The default floor assigned to the cardholder.

DWORD sl_Time The time the access event occurred in the access control system.

short ss_AccessPanelID The access panel ID that contains the reader associated with the elevator terminal.

short sb_ReaderID The access control reader ID involved with the access event.

Page 496: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 496

IElevatorDispatching Defines // Defines for the various operational modes for an elevator terminal. LNL_DEC_MODE_DEFAULT_FLOOR 1 LNL_DEC_MODE_AUTHORIZED_FLOORS 2 LNL_DEC_MODE_DESTINATION_FLOOR 3 LNL_DEC_MODE_DEFAULT_OR_DESTINATION_FLOOR 4 // Range of floors allowed for elevator dispatching BADGE_DEFAULT_FLOOR_MIN -128 BADGE_DEFAULT_FLOOR_MAX 127 // Configuration related definitions MAX_TERMINALS_PER_ELEVATOR_PANEL 256 ELEVATOR_DISPATCHING_MAX_ELEVATOR_FLOOR_BYTES 32 The above define is Used where denoted with *

Page 497: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 497

IElevatorDispatching2 Functions The IElevatorDispatching2 interface is an independent interface that can be used for complete elevator dispatching system integration. The interface cannot be used in conjunction with the IElevatorDispatching interface. The IElevatorDispatching is still supported and can be used. In the case where IElevatorDispatching2 interface is used, the IElevatorDispatching cannot be used.

Note: An elevator terminal is a keypad or touch screen device used to request access to a floor in a building.

List of functions:

• Lnl_SetTerminalInfo • Lnl_DeleteTerminal • Lnl_SendCredentialData • Lnl_SetInterFloorMatrix • Lnl_GetSystemStatus

IElevatorDispatching Revision History Date Author Notes 01/20/2012 Gidi Lissai • Added the revision history.

Page 498: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 498

Lnl_SetTerminalInfo Purpose: Adds a new or updates an existing elevator terminal in the system. See ELEVATOR_TERMINAL_INFO2 description for more information.

Syntax: HRESULT Lnl_SetTerminalInfo( ELEVATOR_TERMINAL_INFO2* info );

Parameters:

Parameter Description info [in] Pointer to an

ELEVATOR_TERMINAL_INFO2 structure that specifies the attributes of a terminal

Return Values:

Parameter Description HRESULT S_OK - on Success

E_INVALIDARG – info is NULL E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 499: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 499

Lnl_DeleteTerminal Purpose: Deletes an elevator terminal from the system.

Syntax:

HRESULT Lnl_DeleteTerminal( long id );

Parameters:

Parameter Description id [in] ID of a terminal to be deleted

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 500: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 500

Lnl_SendCredentialData Purpose: Sends credential data to an elevator terminal indicating if the access should be granted or denied.

Syntax: HRESULT Lnl_SendCredentialData( long terminalId, ELEVATOR_CREDENTIAL_INFO2* info );

Parameters:

Parameter Description terminalId [in] The ID of a terminal receiving the

credential data info [in] The pointer to a structure that specifies

credential information

Return Values:

Parameter Description HRESULT S_OK - on Success

E_INVALIDARG – info is NULL E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 501: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 501

Lnl_SetInterFloorMatrix Purpose: Updates the inter-floor matrix in the system. See ELEVATOR_INTER_FLOOR_MATRIX description for more information.

Syntax: HRESULT Lnl_SetInterFloorMatrix( ELEVATOR_INTER_FLOOR_MATRIX* matrix );

Parameters:

Parameter Description matrix [in] The pointer to a structure that specifies

inter-floor matrix information

Return Values:

Parameter Description HRESULT S_OK - on Success

E_INVALIDARG – info is NULL E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 502: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 502

Lnl_GetSystemStatus Purpose: Retreives the hardware status of the elevator controller and terminals.

Syntax: HRESULT Lnl_GetSystemStatus( DWORD* status, ELEVATOR_TERMINAL_STATUS* terminals, ULONG count );

Parameters:

Parameter Description status [out] The pointer to a variable that receives the controller status.

It must be a combination ELEVATOR_SYSTEM_STATUS_FLAGS enumeration values.

terminals [in/out] The pointer to an array of ELEVATOR_TERMINAL_STATUS structures. Each structure defines a terminal for which the status being requested. On the input each structure contains the terminal ID and all other members are set to zero. On the output the method should populate those structure members if ELEVATOR_SYSTEM_STATUS_ASYNC flag is not returned as a part of the controller status. ELEVATOR_TERMINAL_STATUS for more information.

count [in] Number of elements in terminals array.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_POINTER – status is NULL E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 503: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 503

IElevatorDispatching2 Structures ELEVATOR_TERMINAL_INFO2

Type Parameter Description long ControllerId Elevator controller (panel) ID long TerminalId Terminal ID DWORD Mask A set of

ELEVATOR_TERMINAL_INFO_FLAGS flags indicating which members below are valid

DWORD Features Features to be enabled/disabled on the terminal. See ELEVATOR_TERMINAL_FEATURES for possible values (see IElevetorDispatching2 Enums)

ELEVATOR_TERMINAL_MODE Mode Terminal operation mode (see IElevetorDispatching2 Enums)

long AcPanelId Panel ID of a reader associated with the terminal

long AcReaderId Reader ID of a reader associated with the terminal

DWORD EventDuration Access Control event duration (seconds) DWORD FloorCount Number of entries in the floor list [size_is(FloorCount)] ELEVATOR_FLOOR_ENTRY*

Floors The pointer to the floor list entries allowed for the terminal

ELEVATOR_CREDENTIAL_INFO2

Type Parameter Description __int64 CardNumber The badge ID associated

with the event DWORD EventTime The event time (in UTC) long PanelId Panel ID of a reader

associated the event long ReaderId Reader ID of a reader

associated the event BYTE Valid Indicates the access for the

credential to be granted based on the below information

DWORD Flags Currently only used for disability flag

Page 504: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 504

long DefaultFloor The default floor assigned to the credential

ELEVATOR_DOOR_TYPE DefaultDoor The default door assigned to the credential

DWORD FloorCount Number of entries in the floor list

[size_is(FloorCount)] ELEVATOR_FLOOR_ENTRY*

Floors The pointer to the floor list entries allowed for the credential

ELEVATOR_INTER_FLOOR_MATRIX Type Parameter Description BYTE Enabled Is the floor segmentation is enabled ULONG FloorCount Number of entries in 'Floors' array [size_is(FloorCount)] long*

Floors The array of floors organized into groups (set) to build the matrix having the format: 1,3,5,#,2,4,6,#,7,8,9 ..., where # is -99999 (LNL_INVALID_ELEVATOR_DISPATCHING_FLOOR)

ELEVATOR_FLOOR_ENTRY Type Parameter Description long FloorNo Floor number in the range:

[LNL_MIN_ELEVATOR_DISPATCHING_FLOORS , LNL_MAX_ELEVATOR_DISPATCHING_FLOORS ]

long TimezoneId OnGuard timezone ID ELEVATOR_DOOR_TYPE DoorType Door type (front or rear)

ELEVATOR_TERMINAL_STATUS Type Parameter Description long Id Terminal ID BYTE Online Online status ELEVATOR_TERMINAL_MODE Mode Terminal mode DWORD Flags Reserved for future use

Page 505: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 505

IElevatorDispatching2 Enums ELEVATOR_TERMINAL_MODE

ETM_UNDEFINED = 0 ETM_DEFAULT_FLOOR = 1 ETM_AUTHORIZED_FLOORS = 2 ETM_DESTINATION_FLOOR = 3 ETM_DEFAULT_OR_DESTINATION_FLOOR = 4

ELEVATOR_TERMINAL_FEATURES ETF_PINCODE = 0x0001 ETF_AUDITS = 0x0002 ELEVATOR_TERMINAL_INFO_FLAGS ETIF_MODE = 0x0001 ETIF_FEATURES = 0x0002 ETIF_READER = 0x0004 ETIF_EVENT_DURATION = 0x0008 ETIF_FLOOR_LIST = 0x0010 ETIF_ALL = 0xFFFF ELEVATOR_DOOR_TYPE EDT_UNDEFINED = 0 EDT_FRONT = 1 EDT_REAR = 2 ELEVATOR_SYSTEM_STATUS_FLAGS ELEVATOR_SYSTEM_STATUS_ONLINE= 0x0001, // Indicates the online state ELEVATOR_SYSTEM_STATUS_SECONDARY = 0x0002, // Indicates if the secondary connection is used ELEVATOR_SYSTEM_STATUS_ASYNC = 0x0004, // Indicates the terminal status will be reported asynchronously.

Page 506: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 506

IPBX Functions Interface for Device Translator which is specific to PBX applications.

List of functions

• Lnl_CancelSpecificCall • Lnl_AnswerSpecificCall • Lnl_SetBlockedState • Lnl_DivertSpecificCall

Page 507: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 507

Lnl_CancelSpecificCall

Purpose: Cancels a single call for a device Syntax: HRESULT Lnl_CancelSpecificCall( long deviceID, long callID ); Input Parameters:

Parameter Description deviceID Device ID callID Call ID Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 508: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 508

Lnl_AnswerSpecificCall Purpose: Requests a device to answer a call. Syntax: HRESULT Lnl_AnswerSpecificCall( long deviceID, long callID ); Input Parameters:

Parameter Description deviceID Device ID callID Call ID Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 509: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 509

Lnl_SetBlockedState

Purpose: Sets the blocked state for a device Syntax: HRESULT Lnl_SetBlockedState( long deviceID, BOOL bIsBlocked ); Input Parameters:

Parameter Description deviceID Device ID bIsBlocked TRUE to block the device; FALSE to unblock

it. Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 510: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 510

Lnl_DivertSpecificCall

Purpose: Requests a device to divert a call to another device. Syntax: HRESULT Lnl_DivertSpecificCall( long deviceID, long callID, long newDeviceID ); Input Parameters:

Parameter Description deviceID Device ID callID Call ID newDeviceID New device ID that the call needs to be

diverted to. Return Values:

Parameter Description HRESULT

S_OK - on Success E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 511: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 511

IVideo Functions The following Interface definition and associated functions comprise the IVideo interface. This interface allows developers to create components that can be seamlessly integrated into Lenel OnGuard. This Interface is one interface that is needed to create a Video Device Translator. The ITranslate, IComConfig, and IDistributeEvent are the other interfaces required to be a Lenel Video Translator. These Lenel Video Translators are used to seamlessly integrate various Digital Video Servers into the OnGuard product line. By implementing the functions in this interface, along with the other required interfaces, Lenel OnGuard will be able to Control, Play, and Archive video from a Digital Video Server.

Device Configuration

• Lnl_ResetServer • Lnl_SetCamera • Lnl_DeleteCamera • Lnl_GetCameraInfo • Lnl_SetMonitor • Lnl_DeleteMonitor • Lnl_GetMonitorInfo

Status Information

• Lnl_GetVideoDiskInfo • Lnl_SetVideoEventsThreshold • Lnl_GetNextVideoBlock

Event Handling

• Lnl_CreateEvent • Lnl_DeleteEvent • Lnl_DeleteAllEvents

Archive Server Handling

• Lnl_InitializeArchiver • Lnl_DownloadVideo • Lnl_DownloadVideoProgress • Lnl_CancelDownloadVideo

Camera Control

• Lnl_CameraToMonitor

Player Configuration

• Lnl_InitializePlayer • Lnl_CreatePlayerInstance • Lnl_ReleasePlayerInstance • Lnl_SetPlayerWindowPos • Lnl_GetPlayerWindowPos

Page 512: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 512

• Lnl_SetPlaybackSpeed • Lnl_GetPlaybackSpeed

Player Commands / Control

• Lnl_PlayLive • Lnl_PlaySegment • Lnl_PlayFile • Lnl_PlayStop • Lnl_PlayPause • Lnl_PlayResume • Lnl_PlayFastForward • Lnl_PlayRewind • Lnl_PlaySeek • Lnl_SetFont • Lnl_DisplayText • Lnl_SetMotionMaskCel • Lnl_DisplayMotionMask • Lnl_ExportVideo

Actual Playtime can be called after a call to PlayEvent, PlaySegment, and PlayFile to get the actual playback times

• Lnl_GetActualPlayTime

IVideo Revision History Date Author Notes 03/27/2003 M. Serafin • Added the revision history.

Page 513: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 513

Lnl_ResetServer Purpose: This function tells the Video Server to reset itself. The function should;

1. Stop recording on all channels. 2. Perform any required cleanup. 3. Call the IDistribute::Lnl_StartDatabaseThread function. This will force a full download

of the system, which will reconfigure the cameras and have them start recording.

Syntax: HRESULT Lnl_ResetServer();

Return Values:

Parameter Description

HRESULT S_OK - on success E_FAIL - on error E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video Server

Page 514: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 514

Lnl_SetCamera Purpose: The purpose of this function is to configure cameras on the Video Server. This function is called as a result of a user adding or modifying a camera in the Lenel OnGuard System Administration program.

Syntax: HRESULT Lnl_SetCamera( CAMERA_DATA cameraData );

Input Parameters:

Parameter Description

CAMERA_DATA cameraData

This structure contains information about the camera such as; its frame rate, color, hue, motion sensitivity etc.

Return Values:

Parameter Description

HRESULT S_OK - on success E_FAIL - on error E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video Server E_IVIDEO_NO_SUCH_CAMERA – if cameraData.Channel specifies a non-existent camera

Page 515: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 515

Lnl_DeleteCamera Purpose: The purpose of this function is to remove a camera from a Video Server. The function should at a minimum have the camera stop recording. The cameras channel is the only value that is filled in, in the structure. This function is called when a user deletes a camera from the Lenel OnGuard System Administration program.

Syntax: HRESULT Lnl_DeleteCamera( CAMERA_DATA cameraData );

Input Parameters:

Parameter Description

CAMERA_DATA cameraData

Contains the channel where the camera is to be removed.

Return Values:

Parameter Description

HRESULT S_OK - on success E_FAIL - on error E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video Server E_IVIDEO_NO_SUCH_CAMERA – if cameraData.Channel specifies a non-existent camera

Page 516: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 516

Lnl_GetCameraInfo Purpose: The purpose of this function is to return information about a camera. This information is typically the return value of what was passed in with the Lnl_SetCamera function. The function passes in the cameras channel that information is being requested for.

Syntax: HRESULT Lnl_GetCameraInfo( CAMERA_DATA* cameraData );

Input Parameters:

Parameter Description

CAMERA_DATA* cameraData

cameraData->Channel Contains the channel that information is being requested for. All other information in the structure is to be considered not defined.

Output Parameters:

Parameter Description

CAMERA_DATA* cameraData

The structure should be filled in with as much information about the requested camera as possible.

Return Values:

Parameter Description

HRESULT S_OK - on success E_FAIL - on error E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video Server E_IVIDEO_NO_SUCH_CAMERA – if cameraData->Channel specifies a non-existent camera

Page 517: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 517

Lnl_SetMonitor Purpose: The purpose of this function is to tell the Video Server that there is an analog based monitor attached to it. Once added, Cameras can be switched and displayed on the monitor. This is accomplished via the Alarm Monitoring program through the Lnl_CameraToMonitor function. This function is called when a user adds or modifies a monitor from the Lenel OnGuard System Administration program.

Syntax: Lnl_SetMonitor( MONITOR_DATA monitorData );

Input Parameters:

Parameter Description

MONITOR_DATA monitorData

Information regarding the monitor such as what hardware channel it is connected to.

Return Values:

Parameter Description

HRESULT S_OK - on success E_FAIL - on error E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video Server

Page 518: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 518

Lnl_DeleteMonitor Purpose: The purpose of this function is to remove a monitor from a Video Server. The monitors channel is the only value that is filled in, in the structure. This function is called when a user deletes a monitor from the Lenel OnGuard System Administration program.

Syntax: HRESULT Lnl_DeleteMonitor( MONITOR_DATA monitorData );

Input Parameters:

Parameter Description

MONITOR_DATA monitorData

Contains the channel where the monitor that is to be removed is located.

Return Values:

Parameter Description

HRESULT S_OK - on success E_FAIL - on error E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video Server

Page 519: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 519

Lnl_GetMonitorInfo Purpose: The purpose of this function is to get information about a particular monitor. The information is typically that passed in by the Lnl_SetMonitor function.

Syntax: HRESULT Lnl_GetMonitorInfo( MONITOR_DATA* monitorData );

Input Parameters:

Parameter Description

MONITOR_DATA* monitorData

Contains the monitorData->Channel that is the channel that contains the information that should be returned.

Output Parameters:

Parameter Description

MONITOR_DATA* monitorData

As much information about the monitor that is known should be returned in this structure for the requested channel.

Return Values:

Parameter Description

HRESULT S_OK - on success E_FAIL - on error E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video Server

Page 520: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 520

Lnl_GetVideoDiskInfo Purpose: The purpose of this function is to return the percentage of disk space used by Video Events. Video Events are created when the Lnl_CreateEvent.function is called. This function is called by Alarm Monitoring to find out the percentage of disk space used by events to display to the end user. The Archive Server also calls this function during archiving and purging.

Syntax: HRESULT Lnl_GetVideoDiskInfo( long* pEventPercentageUsed );

Output Parameters:

Parameter Description

Long* pEventPercentageUsed

The percentage of disk space currently used by video events.

Return Values:

Parameter Description

HRESULT S_OK - on success E_FAIL - on error E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video Server

Page 521: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 521

Lnl_SetVideoEventsThreshold Purpose: The purpose of this function is to set the threshold that the Video Server should watch when Video Events are created. This is the percentage of disk space that is allowed for Video Events. Once this threshold is reached, the Video Device Translator should call the IDistributeEvent:: Lnl_DistributeLnlMessage to inform Alarm Monitoring and the Archive Server that the Video Server is almost full. Every 1% change above this threshold should continue to call IDistributeEvent:: Lnl_DistributeLnlMessage signifying that the condition is getting worse. Various degrees of messages can be sent via the IDistributeEvent:: Lnl_DistributeLnlMessage call, such as Threshold Reached and Disk Full. The IDistributeEvent:: Lnl_DistributeLnlMessage and the possible messages are described fully in the IDistributeEvent section.

Syntax: HRESULT Lnl_SetVideoEventsThreshold( long eventThreshold );

Input Parameters:

Parameter Description

Long eventThreshold

The percentage of disk space that can be used by Video Events.

Return Values:

Parameter Description

HRESULT S_OK - on success E_FAIL - on error E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video Server

Page 522: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 522

Lnl_GetNextVideoBlock Purpose: The purpose of this function is to return the nearest video block available on the video server to the requested start time. The start time might be a time that occurred a long time ago thus transforming this function into a pseudo get oldest video function.

Syntax: HRESULT Lnl_GetNextVideoBlock( long cameraNumber, SYSTEMTIME startTime, SYSTEMTIME* pStartTime, SYSTEMTIME* pEndTime );

Input Parameters:

Parameter Description

Long cameraNumber

The Camera whose video block is to be returned..

SYSTEMTIME StartTime

The start time that the video block that is to be returned should be near. A video block that includes this start time is the main return of this function but if none exists then the next closest video block will be returned instead.

Output Parameters:

Parameter Description

long cameraNumber

The Camera whose video block is to be returned..

SYSTEMTIME* pStartTime

The start time of the video block that is nearest the requested start time.

SYSTEMTIME* pEndTime

The end time of the video block. This may even be the current time if the next video block is still being created on the video server.

Return Values:

Parameter Description

HRESULT S_OK - on success E_FAIL - on error E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERRO

Page 523: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 523

R - on error communicating with the Video Server

Page 524: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 524

Lnl_CreateEvent Purpose: The purpose of this function is to create a Video Event on the Video Server. A Video Event is a segment of video that is not to be deleted or overwritten. Once created, this video is guaranteed to be on the Video Server until it is either archived or purged off of the Video Server. This function is called by the Communication Server in response to a create video event request by the Linkage Server. These request are either automatically generated by an alarm that comes in that has a Device - Camera Link, or by a User manually generating a user defined Video Event. In either case all requests to create video events come from the Linkage Server, which must be running for this function to work. The requested start and end times for the Video Event might not be the actual start and end times that get created. This difference is due to the fact that some Video Servers can only create events on base frames. Since base frames only occur every so often the closest base frame before the start and after the end can be used.

Syntax: HRESULT Lnl_CreateEvent( long cameraNumber, SYSTEMTIME* pStartTime, SYSTEMTIME* pEndTime, long* pEventPercentageUsed )

Input Parameters:

Parameter Description

Long cameraNumber

The actual channel the camera is on that the Video Event should be created for.

SYSTEMTIME* pStartTime

The requested start time of the Video Event in the Video Servers Local Time.

SYSTEMTIME* pEndTime

The requested end time of the Video Event in the Video Server’s Local Time.

Output Parameters:

Parameter Description

SYSTEMTIME* pStartTime

The actual start time of the video event, which might be different than the requested start time. Time is in Video Servers Local Time.

SYSTEMTIME* pEndTime

The actual end time of the video event, which might be different than the requested end time. Time is in the Video Servers

Page 525: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 525

Local Time. Long* pEventPercentageUsed

The percentage of disk space currently used by video events

Return Values:

Parameter Description

HRESULT S_OK - on success E_FAIL - on error E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video Server E_IVIDEO_TIME_OUTOF_RANGE - on error, if the start or end time passed in are not in the range of recorded video that is on the Video Server.

Page 526: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 526

Lnl_DeleteEvent Purpose: The purpose of this function is to delete a video event that was previously created with the Lnl_CreateEvent function. The Archive Server calls this function after an event is archived, or when the end user has configured the system for purge only. Once deleted, the Video Server is free to use the space that was allocated by the event for new events or for additional space for continuous video. This function should only return E_FAIL if it was a general delete event failure, and not if the video event does not exist. If the function does return E_FAIL that signifies that the Archive Server should try it again.

Syntax: HRESULT Lnl_DeleteEvent( long cameraNumber, SYSTEMTIME startTime, SYSTEMTIME endTime, long* pEventPercentageUsed );

Input Parameters:

Parameter Description

Long cameraNumber

The actual channel the camera is on that the Video Event should be deleted for.

SYSTEMTIME startTime

The start time of the Video Event. This is the actual start time of the event as returned by the Lnl_CreateEvent call. The Time is in the Video Server’s Local Time.

SYSTEMTIME endTime

The end time of the Video Event. This is the actual end time of the event as returned by the Lnl_CreateEvent call. The Time is in the Video Server’s Local Time.

Output Parameters:

Parameter Description

Long* pEventPercentageUsed

The percentage of disk space currently used by video events

Return Values:

Parameter Description

HRESULT S_OK - on success E_FAIL - on error E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERRO

Page 527: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 527

R - on error communicating with the Video Server

Page 528: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 528

Lnl_DeleteAllEvents Purpose: The purpose of this function is to remove every video event that was created with the Lnl_CreateEvent function from the Video Server. This function is only called from within the Communication Servers User Interface. It will typically only be called to clean a new machine before deployment into an installation. Calling this function does not remove the events from the OnGuard database - that must be done manually.

Syntax: HRESULT Lnl_DeleteAllEvents();

Return Values:

Parameter Description

HRESULT S_OK - on success E_FAIL - on error E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video Server

Page 529: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 529

Lnl_InitializeArchiver Purpose: The purpose of this function is to allow the translator to initialize anything that is required for archiving. This function will be called after the IP address and Video Server ID are set with the IComConfig::Lnl_SetPrimaryIP and ITranslate::Lnl_SetPanelID functions. This function should not return success if a connection to the Video Server cannot be made. On Successful connection to the Video Server the function should call the ITranslate:: Lnl_SetPanelState with a parameter of ITranslate:: PANEL_STATE_READY. The function can check if it already has a connection to the Video Server by calling the ITranslate:: Lnl_GetPanelState and checking for a result of ITranslate:: PANEL_STATE_READY or ITranslate:: PANEL_STATE_OFFLINE incase this function is called more than once.

Syntax: HRESULT Lnl_ InitializeArchiver();

Return Values:

Parameter Description

HRESULT S_OK - on success E_FAIL - on error E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video Server

Page 530: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 530

Lnl_DownloadVideo Purpose: The purpose of this function is to request video from the Video Server. In response, the Archive Server will call this function to start archiving. This is one of three functions that are used to download video off the Video Server and into a file on a hard drive on the network. Once successfully downloaded, the OnGuard Database will be updated to note that the video clip is no longer available on the Video Server but can be retrieved and played back from the file located in the fileName parameter below. The Video Server should assume that it has write access to the location pointed to by the fileName variable and that the fileName will be in a UNC format (\\ServerName\DirectoryName\FileName.ext). You will notice that this function is independent of Video Events or Time Based (Continuous) Video. The reason for this is that the Archive Server will call this function for archiving Video Events given the Camera, Start and End Time which is identical for archiving continuous Video which requires a Camera, Start and End Times also. The implementation for archiving Continuous Video consists of calling this function every 5 minutes to request the previous 5 minutes of video for every camera that is setup to archive continuously. In the case of continuous archiving the Archive Server will try to archive all configured cameras of a Video Server simultaneously. If the Video Server cannot handle so many simultaneous requests for downloaded video it can return the error code E_IVIDEO_SYSTEMBUSY to let the Archive Server know that no additional request can be made until the current running requests are completed. This can be useful in not only taking some stress of the Video Server but also reducing the network bandwidth used for continuous archiving. NOTE: The only requirement that this function must meet is; it must be able to download 5 minutes of video in less than 5 minutes under normal conditions. If this function is unable to meet that requirement an Alarm will be sent to Alarm Monitoring notifying it that the Archive Server is unable to download video fast enough, and is falling behind.

Syntax: HRESULT Lnl_DownloadVideo( long cameraNumber, SYSTEMTIME* pStartTime, SYSTEMTIME* pEndTime, BSTR fileName, long* pStopHandle );

Input Parameters:

Parameter Description

Long cameraNumber

The camera (channel) that the video is to be downloaded for.

SYSTEMTIME* The requested start time for the

Page 531: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 531

pStartTime downloaded video in the Video Servers Local Time.

SYSTEMTIME* pEndTime

The requested end time for the downloaded video in the Video Servers Local Time.

BSTR fileName

The file name that the video server is to download the video to.

Output Parameters:

Parameter Description

SYSTEMTIME* pStartTime

The actual start time for the downloaded video in the Video Servers Local Time.

SYSTEMTIME* pEndTime

The actual end time for the downloaded video in the Video Servers Local Time.

long* pStopHandle

The stop handle that the user can use to cancel this download.

Return Values:

Parameter Description

HRESULT S_OK - on success E_FAIL - on error E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video Server. E_IVIDEO_TIME_OUTOF_RANGE - on error if the requested time to download is no longer available on the Video Server. E_IVIDEO_FILE_ACCESS_ERROR - on error creating the video file due to some type of file access problems. E_IVIDEO_SYSTEMBUSY - on the video server being too busy to process this request.

Page 532: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 532

Lnl_DownloadVideoProgress Purpose: The purpose of this function is to check the progress of a download video request. This function will be called repeatedly by the Archive Server to get the status of the download. It is up to this function to free any resources that were created when the Lnl_DownloadVideo function was called successfully. Typically on the call to this function that is about to return the final status of the download, this function should call the Lnl_CancelDownloadVideo to perform any need cleanup before returning. This is synonymous of the Archive Server calling Lnl_CancelDownloadVideo to stop a download and free up the resources, except that in this case the download is already completed and only the resources need to be freed.

Syntax: HRESULT Lnl_DownloadVideoProgress( long stopHandle, HRESULT* pStatus, hyper* pCurrentPos );

Input Parameters:

Parameter Description

Long stopHandle

This is the handle that was created by the Video Server on the Lnl_DownloadVideo request to allow the user to either cancel a download or query its status.

Output Parameters:

Parameter Description

HRESULT* pStatus

STILL_ACTIVE - If the Video is still being downloaded 1 - The Video finished downloading successfully. Any other value - Error during download

hyper* pCurrentPos

The current position of the downloaded video in seconds from the start time of the requested video.

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR

Page 533: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 533

- on error communicating with the Video. E_IVIDEO_FILE_ACCESS_ERROR - on error some type of file access problem has occurred.

Page 534: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 534

Lnl_CancelDownloadVideo Purpose: The purpose of this function is to cancel a video download request that was made via the Lnl_DownloadVideo function, and to free up any resources that were created. If the downloaded video has already been completed before this function is called the function needs only return S_OK. This is do to the fact that the Lnl_DownloadVideoProgress function would have already called this function to free the resources upon download completion.

Syntax: HRESULT Lnl_CancelDownloadVideo( long stopHandle );

Input Parameters:

Parameter Description

Long stopHandle

This is the handle that was created by the Video Server on the Lnl_DownloadVideo request to allow the user to either cancel a download or query its status.

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 535: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 535

Lnl_CameraToMonitor Purpose: The purpose of this function is to provide analog based switching between cameras connected to the Video Server and analog based monitors connected to the Video Server. The switching requests come from Alarm Monitoring. The cameras and the monitors must be physically connected to the same Video Server.

Syntax: HRESULT Lnl_CameraToMonitor( long cameraNumber, long monitorNumber );

Input Parameters:

Parameter Description

Long cameraNumber

The camera (channel) that is to be switched to the specified monitor. This does not affect digital playback but is only analog based switching.

Long monitorNumber

The monitor (channel) that the specified camera is to be switched to.

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 536: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 536

Lnl_InitializePlayer Purpose: The purpose of this function is to allow a Video Server to perform any needed initialization prior to video being requested for playback. This function will be called after the IP address and Video Server ID are set with the IComConfig::Lnl_SetPrimaryIP and ITranslate::Lnl_SetPanelID functions. This function should not return success if a connection to the Video Server cannot be made. On Successful connection to the Video Server the function should call the ITranslate:: Lnl_SetPanelState with a parameter of ITranslate:: PANEL_STATE_READY. The function can check if it already has a connection to the Video Server by calling the ITranslate:: Lnl_GetPanelState and checking for a result of ITranslate:: PANEL_STATE_READY or ITranslate:: PANEL_STATE_OFFLINE incase this function is called more than once.

Syntax: HRESULT Lnl_InitializePlayer();

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 537: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 537

Lnl_CreatePlayerInstance Purpose: The purpose of this function is to allow the Video Device Translator to create a Video Play Back instance. The Video Device Translator can initialize any variables that might be needed for play back here. When finished, the Video player will call the Lnl_ReleasePlayerInstance to give the Video Device Translator a chance to free these resources. The information passed in allows the Video Server to: Draw video in a specific window, Send video position and error information to a callback window via the win32 PostMessage function, and Create a Player Instance which the Video Player can use to make future video control requests.

Syntax: HRESULT Lnl_CreatePlayerInstance( HWND playbackWndHandle, HWND callbackWndHandle, long* playerInstance );

Input Parameters:

Parameter Description

HWND playbackWndHandle

The window handle of the window that video is to be played in.

HWND callbackWndHandle

The window to receive video position and error information during playback. Supported Messages: WM_LNL_VIDEOPOSCHANGED WPARAM = 0 - no error 1 - recoverable error 2 - unrecoverable error LPARAM = the position of the video in seconds from the start of the video clip.

Output Parameters:

Parameter Description

long* playerInstance

An instance handle which can be used to reference the playing video and make future video control requests such as stop, pause, rewind, etc.

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure

Page 538: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 538

E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 539: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 539

Lnl_ReleasePlayerInstance Purpose: The purpose of this function is to allow the Video Device Translator a chance to free up any resources associated with the player instance that was created with the Lnl_CreatePlayerInstance function. The Video Device Translator is guaranteed that no future request will be made with the instance handle once this function is called.

Syntax: HRESULT Lnl_ReleasePlayerInstance( long playerInstance );

Input Parameters:

Parameter Description

Long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance.

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 540: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 540

Lnl_SetPlayerWindowPos Purpose: The purpose of this function is to tell the Video Device Translator where it should position the video playback window within its parent window. The coordinates passed in are in client coordinates.

Syntax: HRESULT Lnl_SetPlayerWindowPos( long playerInstance, RECT newWindowPos );

Input Parameters:

Parameter Description

Long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

RECT newWindowPos

The new window position in client coordinates of the parent window.

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 541: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 541

Lnl_GetPlayerWindowPos Purpose: The purpose of this function is to retrieve the current client coordinates of the Video Play Back window in relation to its parent window.

Syntax: HRESULT Lnl_GetPlayerWindowPos( long playerInstance, RECT* windowPos );

Input Parameters:

Parameter Description

Long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

Output Parameters:

Parameter Description

RECT* windowPos

The current position of the video window in client coordinates of the parent window.

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 542: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 542

Lnl_SetPlaybackSpeed Purpose: The purpose of this function is to allow the Video Player to set the playback speed of the recorded video. Possible values of the playback speed are between -5 and 5 where a value of zero is normal playback speed. Note that this has nothing to do with Frames per Second - it is only the rate at which video is being played back (i.e. Very Slow or Very Fast).

Syntax: HRESULT Lnl_SetPlaybackSpeed( long playerInstance, long playSpeed );

Input Parameters:

Parameter Description

Long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

Long playSpeed

The speed to play the video at. This only makes sense for recorded video. Possible values are between -5 and 5 where 0 is normal play back speed..

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 543: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 543

Lnl_GetPlaybackSpeed Purpose: The purpose of this function is to return the play back speed of the currently playing video. This value should be between -5 and 5 where 0 is at normal play back speed. The return value is typically that which was set with the Lnl_SetPlaybackSpeed function.

Syntax: HRESULT Lnl_GetPlaybackSpeed( long playerInstance, long* playSpeed );

Input Parameters:

Parameter Description

Long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

Output Parameters:

Parameter Description

long* playSpeed

This value should be between -5 and 5 where 0 is at normal play back speed

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 544: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 544

Lnl_PlayLive Purpose: The purpose of this function is to tell the Video Device Translator to start playing Live Video in the Video Player window. The Video Player window was specified in the call to Lnl_CreatePlayerInstance.

Syntax: HRESULT Lnl_PlayLive( long playerInstance, long cameraNumber, long playSpeed );

Input Parameters:

Parameter Description

Long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

Long cameraNumber

The camera (channel) that Live Video is to be displayed for

long playSpeed The playback speed between -5 and 5 where 0 is the normal Live Viewing speed.

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 545: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 545

Lnl_PlaySegment Purpose: The purpose of this function is to tell the Video Device Translator to Play Recorded Video in the Video Player window. The Video player window was specified in the call to Lnl_CreatePlayerInstance.

Syntax: HRESULT Lnl_PlaySegment( long playerInstance, long cameraNumber, SYSTEMTIME startTime, SYSTEMTIME endTime, long playSpeed );

Input Parameters:

Parameter Description

Long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

Long cameraNumber

The camera (channel) that Recorded Video is to be displayed for

SYSTEMTIME startTime

The Start time to start playing video from in the Video Server’s Local Time

SYSTEMTIME endTime

The End time to stop playing video at in the Video Server’s Local Time

long playSpeed

The playback speed between -5 and 5, where 0 is the normal Live Viewing speed.

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video E_IVIDEO_TIME_OUTOF_RANGE - on error, if the start or end time passed in are not in the range of recorded video that is on the Video Server.

Page 546: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 546

Lnl_PlayFile Purpose: The purpose of this function is to play video from a file in the Video Player window. The Video Player window was specified in the call to Lnl_CreatePlayerInstance. Typically this file will be a file that was previously downloaded via the Lnl_DownloadVideo function from the Archive Server.

Syntax: HRESULT Lnl_PlayFile( long playerInstance, BSTR fileName, long playSpeed );

Input Parameters:

Parameter Description

long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

BSTR fileName

The name of the file to play. This will be in a UNC format such as (\\ServerName\DirectoryName\FileName.ext)

long playSpeed

The playback speed between -5 and 5, where 0 is the normal Live Viewing speed.

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video E_IVIDEO_FILE_ACCESS_ERROR - on error trying to play the video file due to file access problems

Page 547: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 547

Lnl_PlayStop Purpose: The purpose of this function is to stop the play back of video that is currently being played in the Video Play Back window. The Video Player window was specified in the call to Lnl_CreatePlayerInstance.

Syntax: HRESULT Lnl_PlayStop( long playerInstance );

Input Parameters:

Parameter Description

long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 548: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 548

Lnl_PlayPause Purpose: The purpose of this function is to pause the play back of video that is currently being played in the Video Play Back window. The Video Player window was specified in the call to Lnl_CreatePlayerInstance.

Syntax: HRESULT Lnl_PlayPause( long playerInstance );

Input Parameters:

Parameter Description

long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 549: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 549

Lnl_PlayResume Purpose: The purpose of this function is to resume the play back of video that is currently paused or stopped in the Video Play Back window. The Video Player window was specified in the call to Lnl_CreatePlayerInstance.

Syntax: HRESULT Lnl_PlayResume( long playerInstance );

Input Parameters:

Parameter Description

long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 550: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 550

Lnl_PlayFastForward Purpose: The purpose of this function is to Fast Forward the play back of video that is currently being played in the Video Play Back window. The Video Player window was specified in the call to Lnl_CreatePlayerInstance.

Syntax: HRESULT Lnl_PlayFastForward( long playerInstance );

Input Parameters:

Parameter Description

long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 551: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 551

Lnl_PlayRewind Purpose: The purpose of this function is to rewind the play back of video that is currently being played in the Video Play Back window. The Video Player window was specified in the call to Lnl_CreatePlayerInstance.

Syntax: HRESULT Lnl_PlayRewind( long playerInstance );

Input Parameters:

Parameter Description

long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 552: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 552

Lnl_PlaySeek Purpose: The purpose of this function is to seek to a specific spot in video that is currently being played in the Video Play Back window. The Video Player window was specified in the call to Lnl_CreatePlayerInstance.

Syntax: HRESULT Lnl_PlaySeek( long playerInstance, long secFromStart );

Input Parameters:

Parameter Description

Long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

Long secFromStart

The number of seconds to seek forward from the start of the video clip being played back.

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 553: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 553

Lnl_SetFont Purpose: The purpose of this function is to allow the user the ability to set the font and font color that is to be displayed in the Video Play Back window. This font is for the display of text such as camera name, time, play mode, etc.

Syntax: HRESULT Lnl_SetFont( long playerInstance, LOGFONT font, COLORREF fontColor );

Input Parameters:

Parameter Description

long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

LOGFONG font

The win32 LOGFONT structure which is used to define a font

COLORREF fontColor

The win32 color reference that is used to specify color information

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 554: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 554

Lnl_DisplayText Purpose: The purpose of this function is to tell the Video Translator that it should either enable or disable the display text in the Video Play Back window. The Video Player window was specified in the call to Lnl_CreatePlayerInstance. The display text is typically things such as: Date, Time, etc.

Syntax: HRESULT Lnl_DisplayText( long playerInstance, BOOL bDisplay );

Input Parameters:

Parameter Description

Long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

BOOL bDisplay

Specifies whether the player should display or hide the display text.

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 555: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 555

Lnl_SetMotionMaskCel Purpose: The purpose of this function is to tell the Video Translator that it should either enable or disable the motion sensitivity for a particular cell in a Video Windows viewable area. The Video Player window was specified in the call to Lnl_CreatePlayerInstance. The xCoord has a range of 0-31 and the yCoord has a range of 0-24. If the bMask parameter is true then that cell is not to be sensitive to motion and no motion alarms will occur if motion in that area occurs.

Syntax: HRESULT Lnl_SetMotionMaskCel ( long playerInstance, long xCoord, long yCoord, bool bMask );

Input Parameters:

Parameter Description

Long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

Long xCoord

Specifies the x coordinate of the cell that is being set to masked or unmasked.

Long yCoord

Specifies the y coordinate of the cell that is being set to masked or unmasked.

Bool bMask

Specifies whether this cell should be masked or unmasked.

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 556: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 556

Lnl_DisplayMotionMask Purpose: The purpose of this function is to tell the Video Translator that it should either enable or disable the display of the Motion Mask. The Video Player window was specified in the call to Lnl_CreatePlayerInstance. If enabled the Video Translator should draw a translucent grid over the video player window depicting the area that is masked and not sensitive to motion.

Syntax: HRESULT Lnl_DisplayMotionMask ( long playerInstance, BOOL bDisplay );

Input Parameters:

Parameter Description

Long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

BOOL bDisplay

Specifies whether the player should display or hide the motion mask.

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 557: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 557

Lnl_ExportVideo Purpose: The purpose of this function is to tell the Video Translator to export a segment of video in whatever format the video translator knows how to do. The Translator should bring up its own User Interface to question the user about the filename to export to and the format if multiple export formats are supported.

Syntax: HRESULT Lnl_ExportVideo( long playerInstance, long cameraNumber, SYSTEMTIME startTime, SYSTEMTIME endTime );

Input Parameters:

Parameter Description

long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

long cameraNumber

The camera whose video is to be exported

SYSTEMTIME startTime

The start time of the video clip that is to be exported

SYSTEMTIME endTime

The end time of the video clip that is to be exported

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 558: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 558

Lnl_GetActualPlayTime Purpose: The purpose of this function is to retrieve the actual play back time for the video currently being requested to play. This function is called after a call to Lnl_Play_Segment or Lnl_PlayFile to get the actual time the video is playing from.

Syntax: HRESULT Lnl_GetActualPlayTime( long playerInstance, SYSTEMTIME* StartTime, SYSTEMTIME* EndTime );

Input Parameters:

Parameter Description

long playerInstance

The player instance that was created with a call to Lnl_CreatePlayerInstance

Output Parameters:

Parameter Description

SYSTEMTIME* startTime

The actual start time of the video currently being played in the Video Server’s Local Time.

SYSTEMTIME* endTime

The actual end time of the video currently being played in the Video Server’s Local Time.

Return Values:

Parameter Description

HRESULT S_OK - on Success E_FAIL - on Failure E_NOTIMPL - if not implemented E_IVIDEO_COMMUNICATION_ERROR - on error communicating with the Video

Page 559: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 559

IVideo Structures

CAMERA_DATA

Type Parameter Description

Long ServerID The OnGuard Database ID of the Video Server that this camera is connected to. Lenel uses this internally.

Long CameraID The OnGuard Database ID of the Camera. Lenel uses this internally.

Long Channel The physical channel that the camera is connected to on the Video Server

wchar_t[128] Title The name of the camera Long Standard The camera’s video standard,

possible values are: PAL= 0 NTSC= 1 SECAM= 2 Default = NTSC

Long Bright The camera’s brightness setting. Range = 0 - 100 Default = 50

Long Contrast The camera’s contrast setting. Range = 0 - 100 Default = 25

Long Color The camera’s color setting Range = 0 - 100 Default = 25

Long Hue The camera’s hue setting. Range = -0 - 100 Default = 50

Long FrameRate The frame rate that the camera should record at. Range = 1 - 30 Frames per Second Default = 5

Long IntraFrameRate The rate between intra frames of the recorded video. Range = 5 - 50 Seconds Default = 25 seconds

Page 560: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 560

Long MotionBitRate Indicates the video bitrate (or motion compression), at which the channel is set to record when there is motion detected. Range = 0 - 5, where 0 is the most compressed (smaller image size) and 5 is the least compressed (larger image size) Default = 2

Long NonMotionBitRate Indicates the video bitrate (or motion compression), at which the channel is set to record when there is no motion detected. Range = 0 - 5, where 0 is the most compressed (smaller image size) and 5 is the least compressed (larger image size) Default = 0

Long InMotionLevel Indicates the level of sensitivity to which the motion detection is set. Range = 0 - 100, where 0 is the least sensitive and 100 is the most sensitive Default = 30

Long PreRoll The number of seconds to subtract from the start of a video event. Lenel uses this value internally.

Long PostRoll The number of seconds to add to the end of a video event. Lenel uses this value internally.

Long State Reserved for future use BYTE MotionDetection Signifies whether motion

detection should be enabled for this camera

Long MotionTimeZone The Lenel TimeZone that motion detection alarms should be transmitted to in Alarm Monitoring and logged in the Lenel OnGuard Database. Lenel uses this internally. If motion detection is turned on the Device translator should always report motion alarms to the

Page 561: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 561

Lenel Communication Server. BYTE[32][24] MotionMask This is a 32 x 24 grid that

contains the coordinates of the area of the video window that is not to be sensitive to motion. (a motion mask). A value of one indicates to mask the area for motion. A value of zero indicates that motion in that area should be detected. Since most video is typically recorded at 320x240 this motion mask grid will generally be in a 10x10 resolution. If recording rates differ the Video Translator will have to map the grid settings internally.

MONITOR_DATA

Type Parameter Description

Long ServerID The Video Server's database ID. Lenel uses this internally.

Long MonitorID The Monitors database ID. Lenel uses this internally.

Long Channel The physical channel that the analog monitor is connected to on the Video Server.

wchar_t[128] Title The name of the Monitor Long Brightness The brightness setting for the

monitor. Range = 0 - 100 Default = 50

Long Color The color setting for the monitor. Range = 0 - 100 Default = 25

long PlaySpeed Reserved for future use long DisplayTitle Signifies whether the monitor

name should be displayed long DisplayDate Signifies whether the date

should be displayed long DisplayTime Signifies whether the time

should be displayed

Page 562: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 562

long DisplayPlayStatus Signifies whether the playback state should be displayed

long DisplayBarGenerator Reserved for future use long State Reserved for future use

Page 563: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 563

IVideo Error Codes Name Description

E_FAIL General Failure. The operation will not be retried.

E_NOTIMPL The feature is not implemented. The operation will not be retried.

E_IVIDEO_COMMUNICATION_ERROR General Error for not being able to communicate with the Video Server. The operation will be retried after reconnection to Video Server.

E_IVIDEO_TIME_OUTOF_RANGE Error if the requested time is out of range, and the video is not available on the Video Server. The operation will not be retried.

E_IVIDEO_FILE_ACCESS_ERROR General File Access Error. The operation will be retried.

E_IUNKNOWN_ERROR Unknown error. The operation will be retried.

E_IVIDEO_SYSTEMBUSY Error indicating that the video server is too busy to process the request. The operation will be retried.

Page 564: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 564

IVideo Reference Interface Definition inc32\Interfaces\IVideo.idl Structure and define Definitions inc32\ lmsgtype.h

inc32\win32common.h Error Code Definitions inc32\Interfaces\InterfaceErrorCode

s.h Window Messages inc32\LnlWinMsg.h Video Device Translator Base Classes inc32\Interfaces\IVideo.h,

inc32\DeviceTranslator\DeviceTranslator.h,

Helper Classes / Functions inc32\util32\IPAddress.h inc32\util32\LnlDateTime.h inc32\util32\LocalMutex.h

Page 565: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 565

ICustomMenu Functions The ICustomMenu interface is used to add menu items to alarms and panel/device/sub-device context menus in Alarm Monitoring. List of functions

• Lnl_GetContextMenu • Lnl_SetAlarmInfo • Lnl_SetDeviceInfo

Page 566: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 566

Lnl_GetContextMenu Purpose: Get the menu items to be added to the context menu.

Syntax: HRESULT Lnl_GetContextMenu( BSTR *menuItems);

Output Parameters:

Parameter Description menuItems Contains the menu items to be added.

Menu items should be separated from one another by ‘;’.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 567: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 567

Lnl_SetAlarmInfo Purpose: Send information about the alarm that was right-clicked.

Syntax: HRESULT Lnl_SetAlarmInfo( BSTR alarmDescription, BSTR optionText, LNLMESSAGE lnlMessage);

Input Parameters:

Parameter Description alarmDescription Alarm description as was shown in Alarm

Monitoring. optionText The custom menu item that was clicked on

the alarm context menu. InlMessage More details about the alarm:

• ls_Event.ss_AccessPanelID - Panel ID • ls_Event.sb_DeviceID - Device ID • ls_Event.sb_InputDevID - Sub-device ID • ls_Event.sl_Time - Time of the alarm • ls_Event.sl_SerialNumber - Serial

number of the event • ls_Event.sb_EventID - Event ID • ls_Event.sb_EventType - Event type ID

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 568: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 568

Lnl_SetDeviceInfo Purpose: Send information about the panel/device/sub-device that was right-clicked.

Syntax: HRESULT Lnl_SetDeviceInfo( BSTR optionText, long AccessPanelID, long DeviceID, long InputDevID, BOOL status);

Input Parameters:

Parameter Description optionText The custom menu item that was clicked on

the panel/device/sub-device context menu. AccessPanelID Panel ID DeviceID Device ID. Equals 0 if not applicable. InputDevID Sub -device ID. Equals 0 if not applicable. status Status of the panel/device/sub-device.

0-offline; 1-online.

Return Values:

Parameter Description HRESULT S_OK - on Success

E_FAIL - on Failure E_NOTIMPL - Not Implemented

Page 569: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 569

Index ACCESS_LEVEL ........... 211, 265, 344, 361 ADD_ASSET .................................. 382, 385 ADD_ASSET_GROUP .................. 384, 385 Alarm Panel Types .................................. 281 ALARM_INPUT .................................... 184 ALARM_INPUT_MSG . 176, 177, 178, 182,

184 ALARM_INPUT_MSG2 ........................ 194 ALARM_INPUT2 .................................. 194 ALARM_OUTPUT 172, 173, 276, 277, 379 ALARM_OUTPUT_LINKS.. 275, 276, 379,

380 ALARM_OUTPUT_LINKS_MSG 237, 276,

358, 379 ALARM_OUTPUT_MSG ..... 167, 168, 169,

170, 172 ALARM_PANEL ........................... 224, 268 ALARMINPUT_STATUS ............. 173, 186 ALARMPANEL_STATUS ... 171, 173, 181,

186, 195 ALARMPANEL_STATUS2 .................. 195 ALARMZONE_MASK_STATUSRPT 180,

186 AREA_APB_CFGMSG ......... 216, 266, 267 AREA_APB_TABLE ..................... 266, 267 AREA_STATUSRPT ..... 233, 273, 356, 379 AREAAPB ...................................... 218, 267 BADGE .. 202, 246, 247, 249, 250, 313, 315,

317, 365 BADGE_EXT ................. 247, 250, 314, 317 BULKBADGE ................ 200, 246, 313, 365 BUS_DEVICE_CFG ...................... 459, 460 Cabinet Tamper ................................. 46, 280 CAMERA_DATA .......... 514, 515, 516, 559 CARD_DATA ........................ 254, 255, 363 CARD_FORMAT_CFG . 203, 254, 350, 362 CARD_REC_CFG .................. 226, 227, 269 CARDFMT_MAGNETIC .............. 251, 254 CARDFMT_WEIGAND ................ 253, 254 CMD_ACCESS_LEVEL ................ 219, 268 COMMPROP .................................. 400, 412 COMMTIMEOUTS ........ 397, 399, 412, 419 COMSTAT ..................................... 408, 412

DATA_ASSET ....... 136, 144, 146, 161, 163 DATA_CA .............................. 138, 146, 162 DATA_CMDREQ .................. 139, 146, 162 DATA_CMDRES ................... 140, 146, 163 DATA_CNA ........................... 137, 146, 162 DATA_FC............................... 139, 146, 162 DATA_INTERCOM............... 144, 146, 163 DATA_STATUS_CHG .. 137, 140, 146, 162 DATA_STATUSREQUEST .. 140, 146, 163 DATA_TRANSMITTER ...... 144, 145, 146,

163, 164 DATA_VIDEOEVENT .......... 144, 146, 163 DCB ................................ 396, 398, 412, 420 DEL_ASSET................................... 383, 385 Door Forced Open................................... 236 DWN_ACCESS_LEVEL ............... 212, 265 ELEVATOR_ACCLEVEL............. 214, 265 ELEVATOR_ACCLEVEL_PERTZ ..... 215,

266 ELEVATOR_FLOORLIST ............ 494, 504 ELEVATOR_HW_INFO 257, 263, 322, 372 ELEVATOR_KEYPAD_TERMINALS 486,

493 ELEVATOR_TERMINAL_CONFIG ... 487,

493, 503 ELV_DISPATCHING_CREDENTIAL_DA

TA ............................................... 495, 504 EVENTDATA ........................ 137, 145, 162 EXECUTE_IV_MSG ..................... 234, 273 GRANT_ONE_FREE_PASS . 240, 276, 313 HOLIDAY .............................. 271, 272, 364 HOLIDAYMSG .............. 230, 272, 354, 364 IAccessControl Defines . 255, 256, 276, 277,

379 IAccessControl Error Codes ................... 282 IAccessControl Functions ....................... 197 IAccessControl Structures ...... 246, 311, 362 IAsset Defines ......................................... 386 IAsset Error Codes .................................. 387 IAsset Functions...................................... 381 IAsset Structures ..................................... 385 IComConfig Error Codes .......................... 84 IComConfig Functions.............................. 65

Page 570: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 570

IComManager Error Codes ..................... 439 IComManager Functions ........................ 429 IDistributeEvent Error Codes ......... 148, 165 IDistributeEvent Functions ..... 102, 149, 160 IDistributeEvent Structures ..................... 134 IElevatorDispatching Defines ......... 496, 505 IElevatorDispatching Functions...... 485, 497 IElevatorDispatching Structures ..... 493, 503 IInput Error Codes .................................. 187 IInput Functions ...................................... 175 IInput Structures...................................... 184 IInput2 Error Codes ................................ 196 IInput2 Functions .................................... 188 IInput2 Structures.................................... 194 IIntercom Error Codes .................... 450, 455 IIntercom Functions ........................ 447, 451 ILan Error Codes..................................... 422 ILan Functions ........................................ 414 IOutput Error Codes ................................ 174 IOutput Functions ................................... 166 IOutput Structures ................................... 172 IPersonalSafety Defines .................. 460, 461 IPersonalSafety Error Codes ................... 462 IPersonalSafety Functions ...................... 456 IPersonalSafety Structures ...................... 460 IRs232 Error Codes................................. 413 IRs232 Functions .................................... 391 IRs232 Structures .................................... 412 ITranslate Error Codes .......... 48, 59, 63, 334 ITranslate Functions4, 49, 60, 283, 335, 463,

565 ITranslate Structures ................................. 46 ITransport Error Codes ........................... 428 ITransport Functions ............................... 423 IV_FUNCTION_LIST ............ 235, 274, 360 IV_LINK ................................. 274, 275, 277 IVideo Error Codes ................................. 563 IVideo Functions ..................................... 511 IVideo Reference .................................... 564 IVideo Structures .................................... 559 Lnl_ActivateElevatorOutput ........... 197, 239 Lnl_ActivateTimezone ........... 198, 238, 353 Lnl_AddAccessLevels ............ 197, 211, 344 Lnl_AddAsset ......................... 381, 382, 384 Lnl_AddAssetGroup ....................... 381, 384 Lnl_AddBadge ................................ 197, 202

Lnl_AddCommandAccessLevel .... 197, 219, 346, 348, 349

Lnl_AddDownloadAccessLevels .. 197, 212, 345

Lnl_AddElevatorAccessLevel ........ 197, 214 Lnl_AddElevatorAccessLevelPerTZ ..... 197,

215 Lnl_AddHolidays .................... 197, 230, 354 Lnl_AddTimezone .......... 197, 231, 351, 352 Lnl_BulkAddBadge ........................ 197, 200 Lnl_CameraToMonitor ........... 511, 517, 535 Lnl_CancelDownloadVideo ... 511, 532, 534 Lnl_CancelIntercomCall ......... 447, 448, 452 Lnl_ClearCommBreak .................... 391, 407 Lnl_ClearCommError ..................... 391, 408 Lnl_CloseCommunication .................... 4, 18 Lnl_CloseConnection ..... 391, 394, 414, 416 Lnl_ConfigureBusDevice ............... 456, 459 Lnl_ConnectCommunicationManager ... 4, 7,

49, 51, 60, 283, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 335, 337, 338, 339, 340, 341, 342, 567

Lnl_ConnectionStatus ..................... 414, 417 Lnl_ConnectToPanel ............................ 4, 28 Lnl_CreateCommunicationObject ... 4, 6, 49,

50, 60, 61, 283, 284, 566 Lnl_CreateEvent ..... 511, 520, 524, 526, 528 Lnl_CreatePlayerInstance ...... 511, 537, 539,

540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558

Lnl_DecPortAccess......................... 429, 432 Lnl_DeleteAccessLevel .................. 197, 213 Lnl_DeleteAllEvents............... 511, 528, 529 Lnl_DeleteAsset .............................. 381, 383 Lnl_DeleteBadge ............................ 197, 201 Lnl_DeleteCamera .......................... 511, 515 Lnl_DeleteCommandAccessLevel . 197, 220 Lnl_DeleteDownloadAccessLevel . 197, 221 Lnl_DeleteEvent ............................. 511, 526 Lnl_DeleteMonitor ......................... 511, 518 Lnl_DeleteReaderDefinition ........... 197, 222 Lnl_DeleteTimezone....................... 197, 232 Lnl_DistributeDisplayTextMessage ...... 102,

104, 113

Page 571: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 571

Lnl_DistributeLnlMessage 14, 19, 102, 105, 109, 127, 521

Lnl_DownloadFirmware ....................... 4, 27 Lnl_DownloadReaderFirmware ..... 198, 243 Lnl_DownloadVideo511, 530, 532, 534, 546 Lnl_DownloadVideoProgress . 511, 532, 534 Lnl_EnableText....... 512, 554, 555, 556, 557 Lnl_EscapeCommFunction............. 391, 402 Lnl_ExecuteFunction .............................. 464 Lnl_ExecuteIV ................................ 197, 234 Lnl_FindCallingDialupPort ............ 429, 436 Lnl_FindOpenDialPort ................... 429, 430 Lnl_FindOpenDialupPort ............... 429, 437 Lnl_FindPort ................................... 429, 431 Lnl_GetActualPlayTime ................. 512, 558 Lnl_GetAlarmInputStatus ............... 175, 181 Lnl_GetAlarmInputStatus2 ..................... 193 Lnl_GetAlarmMaskGroupStatus .... 175, 180 Lnl_GetAlarmOutputStatus ............ 166, 171 Lnl_GetAreaStatus .......... 197, 233, 356, 357 Lnl_GetBaudRate ....... 65, 71, 79, 81, 83, 85 Lnl_GetCameraInfo ........................ 511, 516 Lnl_GetCardExType ....................... 197, 229 Lnl_GetCommMask ....................... 391, 405 Lnl_GetCommModemStatus .......... 392, 411 Lnl_GetCommProperties ................ 391, 400 Lnl_GetCommState ........................ 391, 398 Lnl_GetCommTimeouts ................. 391, 399 Lnl_GetCommunicationType ............... 4, 31 Lnl_GetComPort ........................... 65, 67, 85 Lnl_GetComPort2 ......................... 65, 69, 85 Lnl_GetDST .......................................... 4, 34 Lnl_GetElevatorDispatchingPanelStatus 485 Lnl_GetElevatorKeypadTerminalStatus 485,

497 Lnl_GetIntrusionAreaStatus ................... 478 Lnl_GetIntrusionDoorStatus ................... 477 Lnl_GetIntrusionOffboardRelayStatus .. 475,

476 Lnl_GetIntrusionPanelStatus .................. 473 Lnl_GetIntrusionZoneStatus ................... 474 Lnl_GetMonitorInfo ....................... 511, 519 Lnl_GetPanelAddress ................... 65, 73, 85 Lnl_GetPanelEventSerialNumber......... 4, 17 Lnl_GetPanelID ........................................ 11 Lnl_GetPanelState ................ 4, 37, 529, 536

Lnl_GetPanelType ................................ 4, 40 Lnl_GetPanelTZInfo ................................... 4 Lnl_GetPlaybackSpeed ................... 512, 543 Lnl_GetPlayerWindowPos ............. 511, 541 Lnl_GetPrimaryIP ......................... 65, 75, 85 Lnl_GetReaderStatus ...................... 197, 207 Lnl_GetReadResult ......................... 423, 426 Lnl_GetSecondaryIP ........................... 65, 77 Lnl_GetSystemStatus ...................... 4, 19, 44 Lnl_GetUseTwoWireRS485 ........... 198, 242 Lnl_GetVersionInfo .............................. 5, 44 Lnl_GetVideoDiskInfo ........... 511, 520, 522 Lnl_GetWriteResult ........................ 423, 427 Lnl_GrantOneFreePass ................... 198, 240 Lnl_IncPortAccess .......................... 429, 433 Lnl_IncPortDialupAccess ............... 429, 438 Lnl_IncrementMonitorReq ............. 4, 12, 13 Lnl_InitCommunication ...... 4, 8, 52, 53, 568 Lnl_InitializePanel ............................ 4, 9, 21 Lnl_InitializePlayer......................... 511, 536 Lnl_IsDownloadFinished ...................... 4, 29 Lnl_IsPanelOnline ................................ 4, 43 Lnl_IssueColdStartCmd ........................ 4, 25 Lnl_IsTimezoneActive ................... 102, 116 Lnl_ManualOpenDoor .................... 197, 217 Lnl_ModifyBusDevice ................... 456, 457 Lnl_OpenConnection ...... 391, 393, 414, 415 Lnl_OpenDoor ........................................ 471 Lnl_PanelCommunicationType ...... 102, 115 Lnl_PlaceIntercomCall ................... 447, 449 Lnl_PlayFastForward ...................... 512, 550 Lnl_PlayFile ............................ 512, 546, 558 Lnl_PlayLive................................... 512, 544 Lnl_PlayPause................................. 512, 548 Lnl_PlayResume ............................. 512, 549 Lnl_PlayRewind ............................. 512, 551 Lnl_PlaySeek .................................. 512, 552 Lnl_PlaySegment ............................ 512, 545 Lnl_PlayStop................................... 512, 547 Lnl_PollPanelForEvents ................. 4, 14, 21 Lnl_PurgeComm ............................. 391, 409 Lnl_Read ......................................... 423, 424 Lnl_ReadClock ..................................... 4, 20 Lnl_ReaderDownload ..... 198, 244, 245, 347 Lnl_ReConnect ............................... 414, 418 Lnl_ReleaseAccess ......................... 429, 435

Page 572: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 572

Lnl_ReleasePlayerInstance ..... 511, 537, 539 Lnl_RequestAccess ......................... 429, 434 Lnl_RequireCTManager ... 4, 24, 49, 60, 429 Lnl_ResetAPBForAllCardholders .. 197, 208 Lnl_ResetCardholderUseLimits ..... 197, 225 Lnl_ResetPowerUpFlag ........................ 4, 26 Lnl_ResetServer .............................. 511, 513 Lnl_SendPanelNextDirectCmd............. 4, 21 Lnl_SendTerminalCredentialData .......... 485 Lnl_SetAlarmInputCfg ................... 175, 176 Lnl_SetAlarmInputCfg2 ......................... 189 Lnl_SetAlarmInputEntryDelay ....... 175, 182 Lnl_SetAlarmInputEntryDelay2 ............. 192 Lnl_SetAlarmInputMask ................ 175, 178 Lnl_SetAlarmInputMask2 ...................... 191 Lnl_SetAlarmInputTZ .................... 175, 177 Lnl_SetAlarmInputTZ2 .......................... 190 Lnl_SetAlarmInputTZ2 .......................... 190 Lnl_SetAlarmMaskGroupMaskLevel.... 175,

183 Lnl_SetAlarmOutputCfg................. 166, 168 Lnl_SetAlarmOutputLinkage ......... 166, 170 Lnl_SetAlarmOutputMode ............. 166, 169 Lnl_SetAlarmOutputTZ .................. 166, 167 Lnl_SetAreaAPB ............................ 197, 218 Lnl_SetAreaAPBTable ................... 197, 216 Lnl_SetAreaArmState ............................. 467 Lnl_SetBaudRate ........ 65, 70, 78, 80, 82, 85 Lnl_SetCamera ....................... 511, 514, 516 Lnl_SetCardExType ............... 197, 228, 229 Lnl_SetCardFormat................. 197, 203, 350 Lnl_SetCardholderConfiguration ... 197, 226 Lnl_SetCardRecCfg ........................ 197, 227 Lnl_SetCheckQueueFlag ................ 391, 401 Lnl_SetClock ........................................ 4, 22 Lnl_SetCommBreak ....................... 391, 406 Lnl_SetCommMask ........................ 391, 404 Lnl_SetCommMode ........................ 391, 395 Lnl_SetCommState ......................... 391, 396 Lnl_SetCommTimeouts .................. 391, 397 Lnl_SetCommunicationType .......... 4, 30, 31 Lnl_SetComPort ........................... 65, 66, 85 Lnl_SetComPort2 ......................... 65, 68, 85 Lnl_SetControllerAlarmDef ........... 197, 224 Lnl_SetControllerReaderDef .. 197, 210, 223 Lnl_SetDBEnabledFlag ........................ 4, 23

Lnl_SetDirectCmd ................................ 4, 38 Lnl_SetDoorMode .................................. 472 Lnl_SetDownloadableReader ......... 197, 199 Lnl_SetDownloadInProgressState ........ 4, 35 Lnl_SetDST .......................................... 4, 33 Lnl_SetEventCounter ................................ 16 Lnl_SetFont..................................... 512, 553 Lnl_SetFunctionList ............... 198, 235, 360 Lnl_SetInterPanelLinks .. 198, 237, 358, 359 Lnl_SetMonitor ....................... 511, 517, 519 Lnl_SetOffboardRelayMode ................... 470 Lnl_SetOnboardRelayMode ................... 469 Lnl_SetPanelAddress .................... 65, 72, 85 Lnl_SetPanelID ..................... 4, 10, 529, 536 Lnl_SetPanelName ............................... 4, 41 Lnl_SetPanelOffline ............................. 4, 42 Lnl_SetPanelPassword .... 5, 49, 60, 283, 335 Lnl_SetPanelState ................. 4, 36, 529, 536 Lnl_SetPanelTerminals ........... 485, 486, 498 Lnl_SetPanelType ................................. 4, 39 Lnl_SetPanelTZInfo ............................. 4, 32 Lnl_SetPlaybackSpeed ........... 512, 542, 543 Lnl_SetPlayerWindowPos .............. 511, 540 Lnl_SetPort ..................................... 414, 421 Lnl_SetPrimaryIP ......... 65, 74, 85, 529, 536 Lnl_SetReaderAlarmMask ............. 197, 209 Lnl_SetReaderDefinition ................ 197, 210 Lnl_SetReaderModeControl ........... 197, 204 Lnl_SetReaderOutputControl ......... 197, 205 Lnl_SetReaderTimezoneList .......... 197, 206 Lnl_SetReadTimeout ...................... 414, 420 Lnl_SetReadTries ................................... 419 Lnl_SetSecondaryIP ..................... 65, 76, 85 Lnl_SetTerminalAllowedFloors ............. 485 Lnl_SetTerminalOperationalMode 485, 488,

489, 490, 491, 492, 500, 501, 502 Lnl_SetTransmitter ......................... 456, 458 Lnl_SetupComm ............................. 391, 410 Lnl_SetUseTwoWireRS485 ........... 198, 241 Lnl_SetVideoEventsThreshold ....... 511, 521 Lnl_SetZoneBypassMode ....................... 465 Lnl_SetZoneGroupDef ................... 175, 179 Lnl_SetZoneOutputMode ....................... 466 Lnl_SetZoneToIVLinks .................. 198, 236 Lnl_SilenceAreaAlarms .......................... 468 Lnl_StartDatabaseThread ....... 102, 110, 513

Page 573: OpenDevice - Interfaces Guidecdn.lenel.com/oaap/OpenDevice-InterfacesGuide.pdf · 2013. 3. 15. · Increments the count of the number of monitors (clients) which are requesting events

Copyright 2012 Lenel Systems International, Inc. August 6, 2012 573

Lnl_UnsolicitedEventRequest .............. 4, 15 Lnl_UpdateTerminal ............... 485, 487, 499 Lnl_WaitCommEvent ..................... 391, 403 Lnl_Write ................................ 102, 423, 425 Lnl_WriteDownloadError ............... 102, 114 LNLDATE ...................... 247, 249, 316, 366 LNLMESSAGE . 16, 17, 105, 109, 127, 134,

145, 146, 147, 160, 162 MONITOR_DATA ......... 517, 518, 519, 561 Offline ....................... 43, 250, 278, 317, 367 Reader Keypad Modes ............................ 280 Reader Modes ......................................... 279 Reader Status Bits ........................... 256, 280 Reader Types .......................................... 277 READER_ALARM_MASK........... 209, 257 READER_DOWNLOAD ....................... 276 READER_DWNSPEC ................... 199, 246 READER_MODE ........................... 204, 255

READER_OUTPUT_CTRL........... 205, 255 READER_STATUS ....................... 207, 256 READER_TZCTRL ....................... 255, 256 READER_TZLIST ......................... 206, 256 READERDEF ......... 210, 223, 257, 317, 367 RESET_CARDHOLDER_USELIMITS 225,

269, 313 Status In .................................................. 511 SYSTEM_STATUS ............................ 19, 46 TIMEZONE .... 231, 238, 272, 351, 353, 363 Transmitter Types ................................... 461 TRANSMITTER_DEF ................... 458, 460 TZ_INTERVAL ...... 272, 273, 277, 363, 364 TZI ...................................................... 32, 46 ZONE_DEF ............................................ 185 ZONE_GROUP_CFGMSG ............ 179, 185 ZONE_IV_LINKAGE .................... 236, 275