0% found this document useful (0 votes)
18 views20 pages

Senstar Symphony 8 Hardware Interface SDK Developer Guide en-US

The Senstar Symphony Hardware Interface SDK Developer Guide provides a comprehensive overview of integrating hardware systems with the Senstar Symphony Server using .NET interfaces. It includes details on system configuration, device status, alarms, and commands, along with various interfaces, classes, enumerations, and methods necessary for implementation. Additionally, it offers troubleshooting tips and legal information relevant to developers working with the SDK.

Uploaded by

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

Senstar Symphony 8 Hardware Interface SDK Developer Guide en-US

The Senstar Symphony Hardware Interface SDK Developer Guide provides a comprehensive overview of integrating hardware systems with the Senstar Symphony Server using .NET interfaces. It includes details on system configuration, device status, alarms, and commands, along with various interfaces, classes, enumerations, and methods necessary for implementation. Additionally, it offers troubleshooting tips and legal information relevant to developers working with the SDK.

Uploaded by

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

Senstar Symphony Hardware Interface SDK

8.x
Developer Guide
Contents

Contents

Introduction......................................................................................................................................3
Getting started.......................................................................................................................3
Sample.................................................................................................................................. 3

Interfaces.........................................................................................................................................4
IHardwareSystem.................................................................................................................. 4
IHardwareSystemFactory...................................................................................................... 5
IStatePersister....................................................................................................................... 6

Classes............................................................................................................................................7
HardwareSystemType........................................................................................................... 7
HardwareSystemConfiguration..............................................................................................7
HardwareSystemConfigurationField......................................................................................8
HardwareNode...................................................................................................................... 9
HardwareNodeType............................................................................................................ 10
LRangeDescription.............................................................................................................. 11
HardwareCommand............................................................................................................ 11
HardwareEventType............................................................................................................11
HardwareState.....................................................................................................................12
LocationDetails.................................................................................................................... 12
HardwareEventArgs............................................................................................................ 13
HardwareStateEventArgs.................................................................................................... 14
HardwareStatusEventArgs.................................................................................................. 14

Enumerations................................................................................................................................ 15
HardwareSystemStatus.......................................................................................................15
HardwareStateType.............................................................................................................15
HardwareEventTypeCategory............................................................................................. 15

Delegates...................................................................................................................................... 17
HardwareEventReceivedHandler........................................................................................ 17
HardwareStateChangedHandler......................................................................................... 17
HardwareStatusChangedHandler........................................................................................17

Basic system initialization flow..................................................................................................... 18

Trobleshooting...............................................................................................................................19

Legal information.......................................................................................................................... 20

Senstar Symphony Hardware Interface SDK Developer Guide 2


Introduction

Introduction
The Senstar Symphony Hardware Interface SDK is a collection of .NET interfaces that can integrate
hardware systems (for example, access control systems, I/O devices, and intrusion detection systems) with
the Senstar Symphony Server.
Using the Senstar Symphony Hardware Interface SDK to integrate a hardware system with the Senstar
Symphony Server enables the following functionality:
• System configuration
• Device status
• Alarms
• Commands

Getting started

1. Create a new .NET assembly DLL that includes an implementation of the IHardwareSystem and
IHardwareSystemFactory interfaces in Core.Interface.HardwareSystemFactory.dll.
2. Put the new Core.Interface.HardwareSystemFactory.dll in the Senstar Symphony Server
installation folder.
The Senstar Symphony Server automatically loads the DLL and the functionality is available on the
Integrations page in the Senstar Symphony Server configuration interface.

Related reference
Basic system initialization flow on page 18

Sample
The HardwareSystemSample project is a sample of a hardware system integration.
The sample project consists of an implementation of the IHardwareSystem interface. The sample project can
help you become familiar with the interface and you can use it as a template to for a new hardware system
project.

Senstar Symphony Hardware Interface SDK Developer Guide 3


Interfaces

Interfaces

IHardwareSystem
This interface defines the properties and methods that the Hardware System needs to implement to fully
integrate with the Senstar Symphony Server.

Namespace
Core.Interface.HardwarePack.System

Properties
Name Type Description
Id string • The unique identifier of the system
instance
• Set by the IHardwareSytemFactory from
Senstar Symphony Server

Type HardwareSystemType • The hardware system type

Status HardwareSystemStatus • The current status of the system

Nodes IEnumarable<HardwareNode> • Nodes tree that exists in the system


• Thread safety: best practice to
synchronize access to this property
between the hardware system and the
Senstar Symphony Server
• Write to nodes when the status is not
Connected and do not write to nodes when
the status is Connected

Events
Name Type Description
EventsReceived HardwareEventReceivedHandler • Notification that an event has occurred
(node and system level)

StateChanged HardwareStateChangedHandler • Notification that a state of a node has


changed

StatusChanged HardwareStatusChangedHandler • Notification that the status of the system


has changed

Senstar Symphony Hardware Interface SDK Developer Guide 4


Interfaces

Methods
Name Description Parameters Returns
Connect • The Senstar NA NA
Symphony Server
calls Connect after
creating the hardware
system instance

GetState • Returns the state of a string nodeId HardwareState


node
• The node ID to The state of the node
get the state requested
from

Send Command • Sends the command string nodeId NA


• The node
to send the
command to
string commandId

• The command
to send

Extension methods
Name Description Parameters Returns
GetAllNodes • Returns all nodes in NA IEnumerable<HardwareNode>
the system as a flat
list

GetUniqueNodeTypes • Returns all distinct NA IEnumerable<HardwareNodeType>


node types available
in the system

IHardwareSystemFactory
This interface defines the properties and methods that the Hardware System Factory needs to implement
to fully integrate with the Senstar Symphony Server.

Namespace
Core.Interface.HardwarePack.System

Properties
Name Type Description
Type HardwareSystemType • The hardware system type
that this factory creates

Senstar Symphony Hardware Interface SDK Developer Guide 5


Interfaces

Methods
Name Description Parameters Returns
Create • Creates a new string systemId NA
hardware system
• The unique ID that the Senstar
instance
Symphony Server allocates to the
system
• The IHardwareSystem on page
4.Id property for the created
system instance has this value
string settingsXml

• An XML string that holds the


configuration settings of the
system
• For more information
on configuration, see
HardwareSystemConfiguration on
page 7
IStatePersister Data

• An instance of IStatePersister
that can save data to and load
data from the Senstar Symphony
Database

IStatePersister
This interface defines the methods that a hardware system can use to persist data in the Senstar
Symphony Database. The data is saved even after the system is disposed, and can be loaded when the
system is initialized.

Namespace
Core.Interface.HardwarePack.Data

Methods
Name Description Parameters Returns
Load • Load the data that NA string
was saved in the
Senstar Symphony
Database

Save • Save data in Senstar string data NA


Symphony Database
• The data to be
• Data links to the saved in the Senstar
system ID. Symphony Database

Senstar Symphony Hardware Interface SDK Developer Guide 6


Classes

Classes

HardwareSystemType
This class represent the data of a system type that is used for enumerating system types and defining the
configuration fields. This class is a property of IHardwareSystem on page 4 and IHardwareSystemFactory
on page 5 interfaces.

Namespace
Core.Interface.HardwarePack.System

Properties
Name Type Description
Id string • The identifier of the hardware
system type

Name string • The name of the hardware


system type
• This name appears on the
Integrations page in the
Senstar Symphony Server
configuration interface

Configuration HardwareSystemConfiguration on • The configuration details used


page 7 to generate user interfaces for
editing the settings XML
• Set to null to use a basic text
box to edit settings XML

HardwareSystemConfiguration
This class defines the configuration details used to generate the user interfaces for editing the settings
XML of a hardware system.

Namespace
Core.Interface.HardwarePack.System

Properties
Name Type Description
TemplateXml string • A settings XML with no values
or with default values

Fields HardwareSystemConfigurationField • The definitions of the fields


on page 8[] that are included in the
configuration

Senstar Symphony Hardware Interface SDK Developer Guide 7


Classes

Name Type Description


Details string[] • An array of field IDs that are
concatenated to generate
summary details

HardwareSystemConfigurationField
This class defines the configuration fields used in HardwareSystemConfiguration on page 7.

Namespace
Core.Interface.HardwarePack.System

Properties
Name Type Description
Id string • The identifier for the field

Selector string • The selector to determine the


location of field's XML element
in the settingsXml
• See https://api.jquery.com/
category/selectors/

Type string • The field data type


• All optional data types are
const members of this class
• Includes:
• TypeString
• TypeNumber
• TypeBoolean
• TypePassword
• TypeIPAddress

DefaultValue string • The field default value

MinimumNumber int • The minimum number using


TypeNumber
• Null if not used

MaximumNumber int • The maximum number using


TypeNumber
• Null if not used

Label string • The displayed label of the field

Row int • The field’s row in the


configuration UI

Column int • The field’s column in the


configuration UI

Senstar Symphony Hardware Interface SDK Developer Guide 8


Classes

Name Type Description


IsRequired bool • Is the field required

HardwareNode
This class represents a hardware node in the system. A hardware node can represent a device, controller,
input/output point, sensor, etc. The hardware node can have events triggered on, report its status, and
send commands.

Namespace
Core.Interface.HardwarePack.Node

Properties
Name Type Description
Id string • The unique identifier of the
node
• Used in all node related
operations (for example, send
command, trigger event)

Name string • The display name of the node

Type HardwareNodeType on page 10 • The type of the node


• Defines the events/
commands/states it supports

Parent HardwareNode • The parent node in the nodes


tree

Children List<HardwareNode> • The list of child nodes in the


nodes tree

LocationRangeDescription LRangeDescription on page 11 • The location description of the


node
• Only for nodes that can
support location based events
• Null if not used

System IHardwareSystem • The system that the node is


part of

Senstar Symphony Hardware Interface SDK Developer Guide 9


Classes

Methods
Name Description Parameters Returns
AddChild • Adds a child node HardwareNode child none
• Updates Parent
property of the child
and Children property
of the current node

HardwareNodeType
This class represents a Hardware Node type. It defines the states/events/commands that the nodes from
this type supports.

Namespace
Core.Interface.HardwarePack.Node

Properties
Name Type Description
Id string • The unique identifier of the
Node Type

Name string • The display name of the type

AvailableEventTypes List<HardwareEventType on page • A list of the events that the


11> node type supports

AvailableCommands List<HardwareCommand on page • A list of the commands that


11> the node type supports

AvailableStates List<HardwareState on page 12> • A list of the states that the


node type supports

AccessGrantedEventTypes List<HardwareEventType on page • Only for Access Control type


11> of nodes
• A list of the events that the
node type supports that
represent Access Granted
events
• Null if not used

AccessDeniedEventTypes List<HardwareEventType on page • Only for Access Control type


11> of nodes
• A list of the events that the
node type supports that
represent Access Denied
events
• Null if not used

Senstar Symphony Hardware Interface SDK Developer Guide 10


Classes

LRangeDescription
This class defines properties and methods that the hardware system needs to implement to fully integrate
with the Senstar Symphony Server.

Namespace
Core.Interface.HardwarePack.Node

Properties
Name Type Description
Start uint • The start of the range

End uint • The end of the range

HardwareCommand
This class represents the hardware command data.

Namespace
Core.Interface.HardwarePack.Data

Properties
Name Type Description
Id string • The unique identifier of the
command
• Used when sending
commands)

Name string • The display name of the


command

RequiredStates IEnumarable<HardwareState on • If this collection is not empty,


page 12> the command is only available
when node state is one of
these states.
• If this collection is empty, the
command is always available
regardless of node state.

HardwareEventType
This class represents the hardware event type data.

Namespace
Core.Interface.HardwarePack.Data

Senstar Symphony Hardware Interface SDK Developer Guide 11


Classes

Properties
Name Type Description
Id string • A unique Identifier of the event

Name string • The display name of the event

Category HardwareEventTypeCategory on • The category of the event


page 15

HardwareState
This class represents the hardware state data.

Namespace
Core.Interface.HardwarePack.Data

Properties
Name Type Description
Id string • A unique Identifier of the state

Name string • The display name of the state

Type HardwareStateType on page 15 • The type of the state

AlarmLocationDetails IEnumerable<LocationDetails on • A collection of locations details


page 12> where there are alarms (recent
non active, or currently active)

LocationDetails
This class represents a location where there is currently an alarm (recently inactive or currently active).

Namespace
Core.Interface.HardwarePack.Data

Properties
Name Type
DistancFromStartPoint float? • Distance from the start of the
range
• Null if not available

Latitude float? • Absolute latitudinal position


• Null if not available

Senstar Symphony Hardware Interface SDK Developer Guide 12


Classes

Name Type
Longitude float? • Absolute longitudinal position
• Null if not available

Altitude float? • Absolute altitude


• Null if not available

IsActive bool • Is the alarm currently active

HardwareEventArgs
This class defines the arguments that are sent on a hardware system event when triggered.

Namespace
Core.Interface.HardwarePack.Event

Properties
Name Type Description
NodeId string • Node identifier the event is
triggered on

NodeName string • Node name the event is


triggered on

UserId long • The id of the user that


triggered the event
• Null if not used

UserDescription string • The description of the user


that triggered the event
• Null if not used

UserImageName string • The name of the user image


that triggered the event
• Null if not used

UserImageData byte[] • The user image that triggered


the event
• Null if not used

Location LocationDetails on page 12 • The location of the event


• Null if not used

SystemId string • The system identifier the event


is triggered from

UtcTime DateTime • The time (in UTC) when the


event occurs

Senstar Symphony Hardware Interface SDK Developer Guide 13


Classes

HardwareStateEventArgs
This class defines the arguments that are sent on a hardware system state change when a node state
changes.

Namespace
Core.Interface.HardwarePack.Event

Properties
Name Type Description
NodeId string • The identifier of the node for
which the state changes

NodeName string • The name of the node for


which the state changes

State HardwareState on page 12 • The new state of the node

SystemId string • The identifier of the hardware


system to which the node is a
part

UtcTime datetime • The time (in UTC) when the


state changes

HardwareStatusEventArgs
This class defines the arguments that are sent when the status of the hardware system changes.

Namespace
Core.Interface.HardwarePack.Event

Properties
Name Type Description
Status HardwareSystemStatus on page • The new status of the
15 hardware system

SystemId string • The hardware system identifier

UtcTime datetime • The time (in UTC) when the


status changes

Senstar Symphony Hardware Interface SDK Developer Guide 14


Enumerations

Enumerations

HardwareSystemStatus
This enumeration defines the possible statuses of the hardware system.

Namespace
Core.Interface.HardwarePack.System

Values
Name Description
Error • The hardware system is in an unrecoverable
error state
• The Senstar Symphony Server disposes and
recreates the system

Initialized • The hardware system is initialized and waiting


for a connection request

Connecting • The hardware system is in the process of


connecting

Connected • The hardware system is connected

HardwareStateType
This enumeration defines the possible state types of the hardware node.

Namespace
Core.Interface.HardwarePack.Data

Values
Name Description
Normal • The state is the normal state

Warning • The state is a warning state

Alert • The state is an alert state

HardwareEventTypeCategory
This enumeration defines properties and methods that a hardware system needs to implement to fully
integrate with the Senstar Symphony Server.

Senstar Symphony Hardware Interface SDK Developer Guide 15


Enumerations

Namespace
Core.Interface.HardwarePack.Data

Values
Name Description
Default • The default category

PIDS • The PIDS intrusion detection system category

AccessGranted • The access granted category


• Used for access control systems

AccessDenied • The access denied category


• Used for access control systems

Senstar Symphony Hardware Interface SDK Developer Guide 16


Delegates

Delegates

HardwareEventReceivedHandler
This delegate represents the method that handles an event received from a hardware system.

Namespace
Core.Interface.HardwarePack.Event

Parameters
Name Type Description
e HardwareEventArgs • An object that contains the
arguments of the event

HardwareStateChangedHandler
This delegate represents the method that handles a node state change event received from a hardware
system.

Namespace
Core.Interface.HardwarePack.Event

Parameters
Name Type Description
e HardwareStateEventArgs • An object that contains the
arguments of the node state
change event

HardwareStatusChangedHandler
This delegate represents the method that handles a system status event received from a hardware system.

Namespace
Core.Interface.HardwarePack.Event

Parameters
Name Type Description
e HardwareStatusEventArgs • An object that contains the
arguments of the system
status event

Senstar Symphony Hardware Interface SDK Developer Guide 17


Basic system initialization flow

Basic system initialization flow

Related tasks
Getting started on page 3

Senstar Symphony Hardware Interface SDK Developer Guide 18


Trobleshooting

Trobleshooting

Log files
The log files for the library can be found in the configured log folder. The file format for the log files is
is-yymmdd_n.txt.

Senstar Symphony Hardware Interface SDK Developer Guide 19


Legal information

Legal information
Copyright © 2021 Senstar Corporation and/or its Licensor(s). All rights reserved.
This material is for informational purposes only. Senstar makes no warranties, express, implied or
statutory, as to the information in this document.
Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights
under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval
system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or
otherwise), or for any purpose, without the express written permission of Senstar Corporation
Senstar may have patents, patent applications, trademarks, copyrights, or other intellectual property rights
covering subject matter in this document. Except as expressly provided in any written license agreement
from Senstar, the furnishing of this document does not give you any license to these patents, trademarks,
copyrights, or other intellectual property.
Senstar and the Senstar logo are registered trademarks of Senstar Corporation.
All other trademarks are the property of their respective owners.

Senstar Symphony Hardware Interface SDK Developer Guide 20

You might also like