OSDP.Net 5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
Loading...
Searching...
No Matches
OSDP.Net.ControlPanel Class Reference

The OSDP control panel used to communicate to Peripheral Devices (PDs) as an Access Control Unit (ACU). More...

Classes

class  NakReplyEventArgs
 A negative reply that has been received. More...
class  ConnectionStatusEventArgs
 A connection status has been changed. More...
class  LocalStatusReportReplyEventArgs
 The local status report reply has been received. More...
class  InputStatusReportReplyEventArgs
 The input status report reply has been received. More...
class  OutputStatusReportReplyEventArgs
 The output status report reply has been received. More...
class  ReaderStatusReportReplyEventArgs
 The reader status report reply has been received. More...
class  RawCardDataReplyEventArgs
 The raw card data reply has been received. More...
class  FormattedCardDataReplyEventArgs
 The formatted card data reply has been received. More...
class  ManufacturerSpecificReplyEventArgs
 The manufacture specific reply has been received. More...
class  ExtendedReadReplyEventArgs
 The extended read (transparent mode) reply has been received. More...
class  KeypadReplyEventArgs
 The keypad reply has been received. More...
class  FileTransferStatus
 Track the status of a file transfer to a PD. More...
class  FileTransferException
 An error has occurred during a file transfer operation. More...
class  RawReplyEventArgs
 A reply has been received. More...

Public Member Functions

 ControlPanel (ILogger< ControlPanel > logger)
 Initializes a new instance of the T:OSDP.Net.ControlPanel class.
 ControlPanel (ILoggerFactory loggerFactory=null)
 Initializes a new instance of the T:OSDP.Net.ControlPanel class.
Guid StartConnection (IOsdpConnection connection)
 Start polling on the defined connection.
Guid StartConnection (IOsdpConnection connection, TimeSpan pollInterval, bool isTracing)
 Start polling on the defined connection.
Guid StartConnection (IOsdpConnection connection, TimeSpan pollInterval)
 Start polling on the defined connection.
Guid StartConnection (IOsdpConnection connection, TimeSpan pollInterval, Action< TraceEntry > tracer)
 Start polling on the defined connection.
async Task StopConnection (Guid connectionId)
 Stop the bus for a specific connection.
async Task SendCustomCommand (Guid connectionId, byte address, CommandData command)
 Send a custom command for testing.
void EnqueueCustomCommand (Guid connectionId, byte address, CommandData command)
 Enqueue a custom command to be sent without waiting for a response.
async Task< DeviceIdentification > IdReport (Guid connectionId, byte address)
 Request to get an ID Report from the PD.
async Task< DeviceIdentification > IdReport (Guid connectionId, byte address, CancellationToken cancellationToken)
 Request to get an ID Report from the PD.
async Task< ExtendedDeviceIdentification > ExtendedIdReport (Guid connectionId, byte address, TimeSpan timeout, CancellationToken cancellationToken=default)
 Request to get an Extended ID Report from the PD.
async Task< DeviceCapabilities > DeviceCapabilities (Guid connectionId, byte address)
 Request to get the capabilities of the PD.
async Task< LocalStatus > LocalStatus (Guid connectionId, byte address)
 Request to get the local status of a PD.
async Task< InputStatus > InputStatus (Guid connectionId, byte address)
 Request to get the status of all the inputs of a PD.
async Task< OutputStatus > OutputStatus (Guid connectionId, byte address)
 Request to get the status of all the outputs of a PD.
async Task< byte[]> GetPIVData (Guid connectionId, byte address, GetPIVData getPIVData, TimeSpan timeout, CancellationToken cancellationToken=default)
 Request to get PIV data from PD.
async Task< ReaderStatus > ReaderStatus (Guid connectionId, byte address)
 Request to get the status of all the readers of a PD.
async Task< ReturnReplyData< ManufacturerSpecific > > ManufacturerSpecificCommand (Guid connectionId, byte address, Model.CommandData.ManufacturerSpecific manufacturerSpecific)
 Sends a manufacture specific command to a PD.
async Task< ReturnReplyData< ExtendedRead > > ExtendedWriteData (Guid connectionId, byte address, ExtendedWrite extendedWrite)
 Sends an extended write (transparent mode) command to a PD to facilitate communications with an ISO 7816-4 based credential through the PD's reader.
async Task< ReturnReplyData< ManufacturerSpecific > > ManufacturerSpecificCommand (Guid connectionId, byte address, Model.CommandData.ManufacturerSpecific manufacturerSpecific, ushort maximumFragmentSize, TimeSpan timeout, CancellationToken cancellationToken=default)
 Sends a manufacturer specific multi-part command to a PD.
async Task< ReturnReplyData< OutputStatus > > OutputControl (Guid connectionId, byte address, OutputControls outputControls)
 Send a command to alter the state of one or more outputs on a PD.
async Task< bool > ReaderLedControl (Guid connectionId, byte address, ReaderLedControls readerLedControls)
 Send a command to alter the LED color on a PD.
async Task< bool > ReaderBuzzerControl (Guid connectionId, byte address, ReaderBuzzerControl readerBuzzerControl)
 Send a command to control the buzzer on a PD.
async Task< bool > ReaderTextOutput (Guid connectionId, byte address, ReaderTextOutput readerTextOutput)
 Send a command that sends text to be shown on a PD.
async Task< Model.ReplyData.CommunicationConfiguration > CommunicationConfiguration (Guid connectionId, byte address, CommunicationConfiguration communicationConfiguration)
 Send a command that sets the communication configuration on a PD.
async Task< bool > EncryptionKeySet (Guid connectionId, byte address, EncryptionKeyConfiguration encryptionKeyConfiguration)
 Send a command that sets the encryption key configuration on a PD.
Task< Model.ReplyData.FileTransferStatus.StatusDetail > FileTransfer (Guid connectionId, byte address, byte fileType, byte[] fileData, ushort fragmentSize, Action< FileTransferStatus > callback, CancellationToken cancellationToken=default)
 Send a file to a PD.
async Task< BiometricReadResult > ScanAndSendBiometricData (Guid connectionId, byte address, BiometricReadData biometricReadData, TimeSpan timeout, CancellationToken cancellationToken=default)
 Send a request to the PD to read from a biometric scan and send back the data template.
async Task< BiometricMatchResult > ScanAndMatchBiometricTemplate (Guid connectionId, byte address, BiometricTemplateData biometricTemplateData, TimeSpan timeout, CancellationToken cancellationToken=default)
 Send a request to the PD to perform a biometric scan and match it to the provided template.
async Task< byte[]> AuthenticationChallenge (Guid connectionId, byte address, byte algorithm, byte key, byte[] challenge, ushort maximumFragmentSize, TimeSpan timeout, CancellationToken cancellationToken=default)
 Instruct the PD to perform a challenge/response sequence.
async Task< bool > ACUReceiveSize (Guid connectionId, byte address, ushort maximumReceiveSize)
 Inform the PD the maximum size that the ACU can receive.
async Task< bool > KeepReaderActive (Guid connectionId, byte address, ushort keepAliveTimeInMilliseconds)
 Instructs the PD to maintain communication with the credential for a specified time.
async Task< bool > AbortCurrentOperation (Guid connectionId, byte address)
 Instructs the PD to abort the current operation.
bool IsOnline (Guid connectionId, byte address)
 Is the PD online.
async Task Shutdown ()
 Shutdown the control panel and stop all communication to PDs.
void ResetDevice (Guid connectionId, int address)
 Reset communication sequence with the PD specified.
void AddDevice (Guid connectionId, byte address, bool useCrc, bool useSecureChannel, byte[] secureChannelKey=null)
 Add a PD to the control panel.
void RemoveDevice (Guid connectionId, byte address)
 Remove a PD from the control panel.
async Task< DiscoveryResult > DiscoverDevice (IEnumerable< IOsdpConnection > connections, DiscoveryOptions options=null)
 Attempts a device discovery on a given connection.

Events

EventHandler< RawReplyEventArgs > RawReplyReceived
 Occurs when any reply is received.
EventHandler< ConnectionStatusEventArgs > ConnectionStatusChanged
 Occurs when connection status changed.
EventHandler< NakReplyEventArgs > NakReplyReceived
 Occurs when a negative reply is received.
EventHandler< LocalStatusReportReplyEventArgs > LocalStatusReportReplyReceived
 Occurs when local status report reply is received.
EventHandler< InputStatusReportReplyEventArgs > InputStatusReportReplyReceived
 Occurs when input status report reply is received.
EventHandler< OutputStatusReportReplyEventArgs > OutputStatusReportReplyReceived
 Occurs when output status report reply is received.
EventHandler< ReaderStatusReportReplyEventArgs > ReaderStatusReportReplyReceived
 Occurs when reader status report reply is received.
EventHandler< RawCardDataReplyEventArgs > RawCardDataReplyReceived
 Occurs when raw card data reply is received.
EventHandler< FormattedCardDataReplyEventArgs > FormattedCardDataReplyReceived
 Occurs when formatted card data reply is received.
EventHandler< ManufacturerSpecificReplyEventArgs > ManufacturerSpecificReplyReceived
 Occurs when manufacturer specific reply is received.
EventHandler< ExtendedReadReplyEventArgs > ExtendedReadReplyReceived
 Occurs when an extended read reply (transparent mode) is received.
EventHandler< KeypadReplyEventArgs > KeypadReplyReceived
 Occurs when key pad data reply is received.

Detailed Description

The OSDP control panel used to communicate to Peripheral Devices (PDs) as an Access Control Unit (ACU).

If multiple connections are needed, add them to the control panel. Avoid creating multiple control panel objects.

Definition at line 27 of file ControlPanel.cs.

Constructor & Destructor Documentation

◆ ControlPanel() [1/2]

OSDP.Net.ControlPanel.ControlPanel ( ILogger< ControlPanel > logger)
inline

Initializes a new instance of the T:OSDP.Net.ControlPanel class.

Parameters
loggerThe logger definition used for logging.

Definition at line 45 of file ControlPanel.cs.

◆ ControlPanel() [2/2]

OSDP.Net.ControlPanel.ControlPanel ( ILoggerFactory loggerFactory = null)
inline

Initializes a new instance of the T:OSDP.Net.ControlPanel class.

Parameters
loggerFactoryThe logger factory used to create logging facilities.

Definition at line 49 of file ControlPanel.cs.

Member Function Documentation

◆ AbortCurrentOperation()

async Task< bool > OSDP.Net.ControlPanel.AbortCurrentOperation ( Guid connectionId,
byte address )
inline

Instructs the PD to abort the current operation.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
Returns
true if successful, false otherwise.

Definition at line 1067 of file ControlPanel.cs.

◆ ACUReceiveSize()

async Task< bool > OSDP.Net.ControlPanel.ACUReceiveSize ( Guid connectionId,
byte address,
ushort maximumReceiveSize )
inline

Inform the PD the maximum size that the ACU can receive.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
maximumReceiveSizeThe maximum size that the ACU can receive.
Returns
true if successful, false otherwise.

Definition at line 1038 of file ControlPanel.cs.

References ACUReceiveSize().

Referenced by ACUReceiveSize().

◆ AddDevice()

void OSDP.Net.ControlPanel.AddDevice ( Guid connectionId,
byte address,
bool useCrc,
bool useSecureChannel,
byte[] secureChannelKey = null )
inline

Add a PD to the control panel.

This will replace an existing PD that is configured at the same address.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
useCrcUse CRC for error checking.
useSecureChannelRequire the device to communicate with a secure channel.
secureChannelKeySet the secure channel key, default installation key is used if not specified.

Definition at line 1204 of file ControlPanel.cs.

Referenced by DiscoverDevice().

◆ AuthenticationChallenge()

async Task< byte[]> OSDP.Net.ControlPanel.AuthenticationChallenge ( Guid connectionId,
byte address,
byte algorithm,
byte key,
byte[] challenge,
ushort maximumFragmentSize,
TimeSpan timeout,
CancellationToken cancellationToken = default )
inline

Instruct the PD to perform a challenge/response sequence.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
algorithm
key
challenge
maximumFragmentSizeThe maximum size of the packet fragment.
timeoutA TimeSpan that represents time to wait until waiting for the other requests to complete and it's own request, a TimeSpan that represents -1 milliseconds to wait indefinitely, or a TimeSpan that represents 0 milliseconds to return immediately when there is a request being processed.
cancellationTokenThe CancellationToken token to observe.
Returns

Definition at line 955 of file ControlPanel.cs.

◆ CommunicationConfiguration()

async Task< Model.ReplyData.CommunicationConfiguration > OSDP.Net.ControlPanel.CommunicationConfiguration ( Guid connectionId,
byte address,
CommunicationConfiguration communicationConfiguration )
inline

Send a command that sets the communication configuration on a PD.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
communicationConfigurationData for the communication configuration on the PD.
Returns
Reply data of the actual communication configuration being set on the PD.

Definition at line 653 of file ControlPanel.cs.

References OSDP.Net.Model.CommandData.CommunicationConfiguration.Address, and CommunicationConfiguration().

Referenced by CommunicationConfiguration().

◆ DeviceCapabilities()

async Task< DeviceCapabilities > OSDP.Net.ControlPanel.DeviceCapabilities ( Guid connectionId,
byte address )
inline

Request to get the capabilities of the PD.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
Returns
Device capabilities reply to the data that was requested.

Definition at line 317 of file ControlPanel.cs.

Referenced by DiscoverDevice().

◆ DiscoverDevice()

async Task< DiscoveryResult > OSDP.Net.ControlPanel.DiscoverDevice ( IEnumerable< IOsdpConnection > connections,
DiscoveryOptions options = null )
inline

Attempts a device discovery on a given connection.

Parameters
connectionsEnumerable instance which returns a set of connections (e.g. each having a different baud rate) on which the method will attempt to find the device. This enumerable can be considered a factory that returns a different instance (and possibly instantiates it only when) when the discovery process invokes IEnumerator.MoveNext
optionsCan be passed in for additional options for the discovery
Returns
If successful, an instance of DiscoveryResult which identifies the device along with providing its capabilities. Otherwise, will return null.

Definition at line 1246 of file ControlPanel.cs.

References AddDevice(), OSDP.Net.ControlPanel.ConnectionStatusEventArgs.Address, OSDP.Net.PanelCommands.DeviceDiscover.DiscoveryResult.Address, OSDP.Net.PanelCommands.DeviceDiscover.DiscoveryResult.Connection, ConnectionStatusChanged, DeviceCapabilities(), IdReport(), OSDP.Net.ControlPanel.ConnectionStatusEventArgs.IsConnected, OSDP.Net.ControlPanel.ConnectionStatusEventArgs.IsSecureChannelEstablished, RemoveDevice(), StartConnection(), and StopConnection().

◆ EncryptionKeySet()

async Task< bool > OSDP.Net.ControlPanel.EncryptionKeySet ( Guid connectionId,
byte address,
EncryptionKeyConfiguration encryptionKeyConfiguration )
inline

Send a command that sets the encryption key configuration on a PD.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
encryptionKeyConfigurationData for the encryption key configuration on the PD.
Returns
true if successful, false otherwise.

Definition at line 677 of file ControlPanel.cs.

◆ EnqueueCustomCommand()

void OSDP.Net.ControlPanel.EnqueueCustomCommand ( Guid connectionId,
byte address,
CommandData command )
inline

Enqueue a custom command to be sent without waiting for a response.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
commandThe custom command to send.

Definition at line 198 of file ControlPanel.cs.

◆ ExtendedIdReport()

async Task< ExtendedDeviceIdentification > OSDP.Net.ControlPanel.ExtendedIdReport ( Guid connectionId,
byte address,
TimeSpan timeout,
CancellationToken cancellationToken = default )
inline

Request to get an Extended ID Report from the PD.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
timeoutA TimeSpan that represents time to wait for the response.
cancellationTokenThe CancellationToken token to observe.
Returns
Extended ID report reply data that was requested.

The PD must support capability function code 17 (ExtendedIdResponse) to use this method.

Definition at line 238 of file ControlPanel.cs.

◆ ExtendedWriteData()

async Task< ReturnReplyData< ExtendedRead > > OSDP.Net.ControlPanel.ExtendedWriteData ( Guid connectionId,
byte address,
ExtendedWrite extendedWrite )
inline

Sends an extended write (transparent mode) command to a PD to facilitate communications with an ISO 7816-4 based credential through the PD's reader.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
extendedWriteThe extended write command data.
Returns
Reply data that is returned after sending the command. There is the possibility of different replies can be returned from PD.

Definition at line 499 of file ControlPanel.cs.

References OSDP.Net.Messages.ExtendedRead, and OSDP.Net.Model.ReplyData.ExtendedRead.ParseData().

◆ FileTransfer()

Task< Model.ReplyData.FileTransferStatus.StatusDetail > OSDP.Net.ControlPanel.FileTransfer ( Guid connectionId,
byte address,
byte fileType,
byte[] fileData,
ushort fragmentSize,
Action< FileTransferStatus > callback,
CancellationToken cancellationToken = default )
inline

Send a file to a PD.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
fileTypeFile transfer type
fileDataThe complete file data being sent to the PD
fragmentSizeInitial size of the fragment sent with each packet
callbackTrack the status of the file transfer
cancellationTokenThe CancellationToken token to observe.
Exceptions
FileTransferExceptionFile transfer has failed because the PD has returned an error.
Returns
The final successful (=positive) status code from the PD.

Definition at line 697 of file ControlPanel.cs.

◆ GetPIVData()

async Task< byte[]> OSDP.Net.ControlPanel.GetPIVData ( Guid connectionId,
byte address,
GetPIVData getPIVData,
TimeSpan timeout,
CancellationToken cancellationToken = default )
inline

Request to get PIV data from PD.

Only one PIV request is processed at a time for each connection.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
getPIVDataDescribe the PIV data to retrieve.
timeoutA TimeSpan that represents time to wait until waiting for the other requests to complete and, its own request, a TimeSpan that represents -1 millisecond to wait indefinitely, or a TimeSpan that represents 0 milliseconds to return immediately when there is a request being processed.
cancellationTokenThe CancellationToken token to observe.
Returns
A response with the PIV data requested.

Definition at line 376 of file ControlPanel.cs.

References GetPIVData().

Referenced by GetPIVData().

◆ IdReport() [1/2]

async Task< DeviceIdentification > OSDP.Net.ControlPanel.IdReport ( Guid connectionId,
byte address )

Request to get an ID Report from the PD.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
Returns
ID report reply data that was requested.

Referenced by DiscoverDevice(), and IdReport().

◆ IdReport() [2/2]

async Task< DeviceIdentification > OSDP.Net.ControlPanel.IdReport ( Guid connectionId,
byte address,
CancellationToken cancellationToken )
inline

Request to get an ID Report from the PD.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
cancellationTokenThe CancellationToken token to observe.
Returns
ID report reply data that was requested.

Definition at line 220 of file ControlPanel.cs.

References IdReport(), and OSDP.Net.Model.ReplyData.DeviceIdentification.ParseData().

◆ InputStatus()

async Task< InputStatus > OSDP.Net.ControlPanel.InputStatus ( Guid connectionId,
byte address )
inline

Request to get the status of all the inputs of a PD.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
Returns
Device input status reply data that was requested.

Definition at line 345 of file ControlPanel.cs.

◆ IsOnline()

bool OSDP.Net.ControlPanel.IsOnline ( Guid connectionId,
byte address )
inline

Is the PD online.

Parameters
connectionIdIdentify the connection for communicating to the device
addressAddress assigned to the device
Returns
Returns true if the PD is online

Definition at line 1081 of file ControlPanel.cs.

◆ KeepReaderActive()

async Task< bool > OSDP.Net.ControlPanel.KeepReaderActive ( Guid connectionId,
byte address,
ushort keepAliveTimeInMilliseconds )
inline

Instructs the PD to maintain communication with the credential for a specified time.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
keepAliveTimeInMillisecondsThe length of time to maintain communication with credential.
Returns
true if successful, false otherwise.

Definition at line 1053 of file ControlPanel.cs.

References KeepReaderActive().

Referenced by KeepReaderActive().

◆ LocalStatus()

async Task< LocalStatus > OSDP.Net.ControlPanel.LocalStatus ( Guid connectionId,
byte address )
inline

Request to get the local status of a PD.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
Returns
Device local status reply data that was requested.

Definition at line 331 of file ControlPanel.cs.

◆ ManufacturerSpecificCommand() [1/2]

async Task< ReturnReplyData< ManufacturerSpecific > > OSDP.Net.ControlPanel.ManufacturerSpecificCommand ( Guid connectionId,
byte address,
Model.CommandData.ManufacturerSpecific manufacturerSpecific )
inline

Sends a manufacture specific command to a PD.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
manufacturerSpecificThe manufacturer specific data.
Returns
Reply data that is returned after sending the command. There is the possibility of different replies can be returned from PD.

Definition at line 476 of file ControlPanel.cs.

References OSDP.Net.Messages.ManufactureSpecific, and OSDP.Net.Model.CommandData.ManufacturerSpecific.ParseData().

◆ ManufacturerSpecificCommand() [2/2]

async Task< ReturnReplyData< ManufacturerSpecific > > OSDP.Net.ControlPanel.ManufacturerSpecificCommand ( Guid connectionId,
byte address,
Model.CommandData.ManufacturerSpecific manufacturerSpecific,
ushort maximumFragmentSize,
TimeSpan timeout,
CancellationToken cancellationToken = default )
inline

Sends a manufacturer specific multi-part command to a PD.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
manufacturerSpecificManufacturer specific command data with a command code as the first byte.
maximumFragmentSizeThe maximum size of the packet fragment.
timeoutA TimeSpan that represents time to wait until waiting for the other requests to complete and, its own request, a TimeSpan that represents -1 milliseconds to wait indefinitely, or a TimeSpan that represents 0 milliseconds to return immediately when there is a request being processed.
cancellationTokenThe CancellationToken token to observe.
Returns
The last reply data that is returned after sending all the command fragments. There is the possibility of different replies can be returned from PD.

Definition at line 523 of file ControlPanel.cs.

◆ OutputControl()

async Task< ReturnReplyData< OutputStatus > > OSDP.Net.ControlPanel.OutputControl ( Guid connectionId,
byte address,
OutputControls outputControls )
inline

Send a command to alter the state of one or more outputs on a PD.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
outputControlsData for one or more outputs to control.
Returns
Reply data that is returned after sending the command. There is the possibility of different replies can be returned from PD.

Definition at line 589 of file ControlPanel.cs.

References OSDP.Net.Messages.OutputStatusReport, and OSDP.Net.Model.ReplyData.OutputStatus.ParseData().

◆ OutputStatus()

async Task< OutputStatus > OSDP.Net.ControlPanel.OutputStatus ( Guid connectionId,
byte address )
inline

Request to get the status of all the outputs of a PD.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
Returns
Device output status reply data that was requested.

Definition at line 359 of file ControlPanel.cs.

References OSDP.Net.Model.ReplyData.OutputStatus.ParseData().

◆ ReaderBuzzerControl()

async Task< bool > OSDP.Net.ControlPanel.ReaderBuzzerControl ( Guid connectionId,
byte address,
ReaderBuzzerControl readerBuzzerControl )
inline

Send a command to control the buzzer on a PD.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
readerBuzzerControlData for the reader buzzer control on the PD.
Returns
true if successful, false otherwise.

Definition at line 624 of file ControlPanel.cs.

References ReaderBuzzerControl().

Referenced by ReaderBuzzerControl().

◆ ReaderLedControl()

async Task< bool > OSDP.Net.ControlPanel.ReaderLedControl ( Guid connectionId,
byte address,
ReaderLedControls readerLedControls )
inline

Send a command to alter the LED color on a PD.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
readerLedControlsData to change color on one or more reader LEDs.
Returns
true if successful, false otherwise.

Definition at line 610 of file ControlPanel.cs.

◆ ReaderStatus()

async Task< ReaderStatus > OSDP.Net.ControlPanel.ReaderStatus ( Guid connectionId,
byte address )
inline

Request to get the status of all the readers of a PD.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
Returns
Device reader status reply data that was requested.

Definition at line 463 of file ControlPanel.cs.

◆ ReaderTextOutput()

async Task< bool > OSDP.Net.ControlPanel.ReaderTextOutput ( Guid connectionId,
byte address,
ReaderTextOutput readerTextOutput )
inline

Send a command that sends text to be shown on a PD.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
readerTextOutputData for the reader text output on the PD.
Returns
true if successful, false otherwise.

Definition at line 639 of file ControlPanel.cs.

References ReaderTextOutput().

Referenced by ReaderTextOutput().

◆ RemoveDevice()

void OSDP.Net.ControlPanel.RemoveDevice ( Guid connectionId,
byte address )
inline

Remove a PD from the control panel.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.

Definition at line 1224 of file ControlPanel.cs.

Referenced by DiscoverDevice().

◆ ResetDevice()

void OSDP.Net.ControlPanel.ResetDevice ( Guid connectionId,
int address )
inline

Reset communication sequence with the PD specified.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.

Definition at line 1188 of file ControlPanel.cs.

◆ ScanAndMatchBiometricTemplate()

async Task< BiometricMatchResult > OSDP.Net.ControlPanel.ScanAndMatchBiometricTemplate ( Guid connectionId,
byte address,
BiometricTemplateData biometricTemplateData,
TimeSpan timeout,
CancellationToken cancellationToken = default )
inline

Send a request to the PD to perform a biometric scan and match it to the provided template.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
biometricTemplateDataCommand data to send a request to the PD to perform a biometric scan and match.
timeoutA TimeSpan that represents time to wait until waiting for the other requests to complete and it's own request, a TimeSpan that represents -1 milliseconds to wait indefinitely, or a TimeSpan that represents 0 milliseconds to return immediately when there is a request being processed.
cancellationTokenThe CancellationToken token to observe.
Returns
Results from matching the biometric scan.

Definition at line 889 of file ControlPanel.cs.

◆ ScanAndSendBiometricData()

async Task< BiometricReadResult > OSDP.Net.ControlPanel.ScanAndSendBiometricData ( Guid connectionId,
byte address,
BiometricReadData biometricReadData,
TimeSpan timeout,
CancellationToken cancellationToken = default )
inline

Send a request to the PD to read from a biometric scan and send back the data template.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
biometricReadDataCommand data to send a request to the PD to send template data from a biometric scan.
timeoutA TimeSpan that represents time to wait until waiting for the other requests to complete and it's own request, a TimeSpan that represents -1 milliseconds to wait indefinitely, or a TimeSpan that represents 0 milliseconds to return immediately when there is a request being processed.
cancellationTokenThe CancellationToken token to observe.
Returns
Results from matching the biometric scan.

Definition at line 825 of file ControlPanel.cs.

◆ SendCustomCommand()

async Task OSDP.Net.ControlPanel.SendCustomCommand ( Guid connectionId,
byte address,
CommandData command )
inline

Send a custom command for testing.

Parameters
connectionIdIdentify the connection for communicating to the device.
addressAddress assigned to the device.
commandThe custom command to send.

Definition at line 187 of file ControlPanel.cs.

◆ Shutdown()

async Task OSDP.Net.ControlPanel.Shutdown ( )
inline

Shutdown the control panel and stop all communication to PDs.

Definition at line 1148 of file ControlPanel.cs.

◆ StartConnection() [1/4]

Guid OSDP.Net.ControlPanel.StartConnection ( IOsdpConnection connection)

Start polling on the defined connection.

Parameters
connectionThis represents the type of connection used for communicating to PDs.
Returns
An identifier that represents the connection

Referenced by DiscoverDevice().

◆ StartConnection() [2/4]

Guid OSDP.Net.ControlPanel.StartConnection ( IOsdpConnection connection,
TimeSpan pollInterval )

Start polling on the defined connection.

Parameters
connectionThis represents the type of connection used for communicating to PDs.
pollIntervalThe interval at which the devices will be polled, zero indicates no polling
Returns
An identifier that represents the connection

◆ StartConnection() [3/4]

Guid OSDP.Net.ControlPanel.StartConnection ( IOsdpConnection connection,
TimeSpan pollInterval,
Action< TraceEntry > tracer )
inline

Start polling on the defined connection.

Parameters
connectionThis represents the type of connection used for communicating to PDs. The connection instance may only be started once, otherwise an InvalidOperationException is thrown.
pollIntervalThe interval at which the devices will be polled, zero indicates no polling
tracerDelegate that will receive detailed trace information
Returns
An identifier that represents the connection
Exceptions
InvalidOperationExceptionIf the connection is already started.

Definition at line 108 of file ControlPanel.cs.

◆ StartConnection() [4/4]

Guid OSDP.Net.ControlPanel.StartConnection ( IOsdpConnection connection,
TimeSpan pollInterval,
bool isTracing )

Start polling on the defined connection.

Parameters
connectionThis represents the type of connection used for communicating to PDs.
pollIntervalThe interval at which the devices will be polled, zero indicates no polling
isTracingWrite packet data to the {Bus ID}.osdpcap file
Returns
An identifier that represents the connection

◆ StopConnection()

async Task OSDP.Net.ControlPanel.StopConnection ( Guid connectionId)
inline

Stop the bus for a specific connection.

Parameters
connectionIdThe identifier that represents the connection.

Definition at line 151 of file ControlPanel.cs.

Referenced by DiscoverDevice().

Event Documentation

◆ ConnectionStatusChanged

EventHandler<ConnectionStatusEventArgs> OSDP.Net.ControlPanel.ConnectionStatusChanged

Occurs when connection status changed.

Definition at line 1577 of file ControlPanel.cs.

Referenced by DiscoverDevice().

◆ ExtendedReadReplyReceived

EventHandler<ExtendedReadReplyEventArgs> OSDP.Net.ControlPanel.ExtendedReadReplyReceived

Occurs when an extended read reply (transparent mode) is received.

Definition at line 1623 of file ControlPanel.cs.

◆ FormattedCardDataReplyReceived

EventHandler<FormattedCardDataReplyEventArgs> OSDP.Net.ControlPanel.FormattedCardDataReplyReceived

Occurs when formatted card data reply is received.

Definition at line 1613 of file ControlPanel.cs.

◆ InputStatusReportReplyReceived

EventHandler<InputStatusReportReplyEventArgs> OSDP.Net.ControlPanel.InputStatusReportReplyReceived

Occurs when input status report reply is received.

Definition at line 1592 of file ControlPanel.cs.

◆ KeypadReplyReceived

EventHandler<KeypadReplyEventArgs> OSDP.Net.ControlPanel.KeypadReplyReceived

Occurs when key pad data reply is received.

Definition at line 1628 of file ControlPanel.cs.

◆ LocalStatusReportReplyReceived

EventHandler<LocalStatusReportReplyEventArgs> OSDP.Net.ControlPanel.LocalStatusReportReplyReceived

Occurs when local status report reply is received.

Definition at line 1587 of file ControlPanel.cs.

◆ ManufacturerSpecificReplyReceived

EventHandler<ManufacturerSpecificReplyEventArgs> OSDP.Net.ControlPanel.ManufacturerSpecificReplyReceived

Occurs when manufacturer specific reply is received.

Definition at line 1618 of file ControlPanel.cs.

◆ NakReplyReceived

EventHandler<NakReplyEventArgs> OSDP.Net.ControlPanel.NakReplyReceived

Occurs when a negative reply is received.

Definition at line 1582 of file ControlPanel.cs.

◆ OutputStatusReportReplyReceived

EventHandler<OutputStatusReportReplyEventArgs> OSDP.Net.ControlPanel.OutputStatusReportReplyReceived

Occurs when output status report reply is received.

Definition at line 1597 of file ControlPanel.cs.

◆ RawCardDataReplyReceived

EventHandler<RawCardDataReplyEventArgs> OSDP.Net.ControlPanel.RawCardDataReplyReceived

Occurs when raw card data reply is received.

Definition at line 1607 of file ControlPanel.cs.

◆ RawReplyReceived

EventHandler<RawReplyEventArgs> OSDP.Net.ControlPanel.RawReplyReceived

Occurs when any reply is received.

Definition at line 1572 of file ControlPanel.cs.

◆ ReaderStatusReportReplyReceived

EventHandler<ReaderStatusReportReplyEventArgs> OSDP.Net.ControlPanel.ReaderStatusReportReplyReceived

Occurs when reader status report reply is received.

Definition at line 1602 of file ControlPanel.cs.


The documentation for this class was generated from the following file: