Class API
Spot Lib API.
Inheritance
Inherited Members
Namespace: SpotLib
Assembly: SpotLib.dll
Syntax
public class API : IApiEventProducer
Constructors
API(Int32)
Constructor to run the SpotLib library in HTTP Server mode.
Options in this mode:
- Run in Non-Admin mode and grant permissions to the URL manually:
- Configure Namespace Reservation: Add the next URL using a command termimal: CMD: netsh http add urlacl url=http://+:8080/api/spots/ user=DOMAIN\user Warning: The namespace (DOMAIN\user) in this example could be different. More info:
- https://msdn.microsoft.com/en-us/library/ms733768.aspx
- https://stackoverflow.com/questions/4019466/httplistener-access-denied
- (Not Recommended) Run in Admin mode, so that the application can create a Firewall exeption to allow incoming connections
Declaration
public API(int listenerPort = 8080)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | listenerPort | TCP port to use for accepting incoming connections. Connections on listenerPort should be allowed in Firewall to accept incoming TCP connections. Default port: 8080. |
API(String, Int32)
Constructor to run the SpotLib library in Telnet/TCP Client mode.
Declaration
public API(string serverAddress, int serverPort = 23)
Parameters
Type | Name | Description |
---|---|---|
System.String | serverAddress | Fill in the IP address of the SmartSpot to connect with. Be sure that the setting "Brain address" of this SmartSpot is set to: telnet://localhost. |
System.Int32 | serverPort | The default port is 23. Change this if a port has been specified by setting "Brain address". |
Properties
IsInit
Method to check if the API has been initialized.
Declaration
public bool IsInit { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
ChangeIpSettings(Int32, Boolean, String, String, String, String, String)
Set or Change IP settings
Declaration
public bool ChangeIpSettings(int spotId, bool useDHCP, string ip = "", string subnet = "", string gateway = "", string dnsPrimary = "", string dnsSecondary = "")
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | |
System.Boolean | useDHCP | |
System.String | ip | |
System.String | subnet | |
System.String | gateway | |
System.String | dnsPrimary | |
System.String | dnsSecondary |
Returns
Type | Description |
---|---|
System.Boolean |
ClearPresences(Int32)
This method clears the presences of the Spot and can be used in combination with method SetAntennaEnabledState(arg: changeDynamically=true). The library will use the SenseAndControl feature for this and updates/overwrites the default SenseAndControl scheme once (restart required). After the scheme has been set, no futher restars are required when using this method.
Declaration
public bool ClearPresences(int spotId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
DeInit()
Deinitialize the API.
Declaration
public void DeInit()
Finalize()
Destructor
Declaration
protected void Finalize()
GetAntennaMaxSWR(Int32, out UInt32)
Get the max antenna SWR value.
Declaration
public bool GetAntennaMaxSWR(int spotId, out uint maxSwr)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.UInt32 | maxSwr | Max antenna SWR value. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetAntennaPresencesEnabledState(Int32, out Boolean)
Use this method to check the enabled state of antenna presences.
Declaration
public bool GetAntennaPresencesEnabledState(int spotId, out bool state)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Boolean | state | State output |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetBluetoothEnabledState(Int32, out Boolean)
Get the current Bluetooth receiver enabled state.
Declaration
public bool GetBluetoothEnabledState(int spotId, out bool state)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Boolean | state | The new state. |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetBluetoothFilterThreshold(Int32, out Int32)
Get current minimal RSSI threshold filter for Bluetooth receiver.
Declaration
public bool GetBluetoothFilterThreshold(int spotId, out int threshold)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Int32 | threshold | Filter threshold value. |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetDHCPEnabledState(Int32, out Boolean)
Get the current state of DHCP.
Declaration
public bool GetDHCPEnabledState(int spotId, out bool state)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Boolean | state | Current DHCP state. |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetFilterHysteresis(Int32, TechnologyType, out UInt32)
Get the filter hysteresis per technology type.
Declaration
public bool GetFilterHysteresis(int spotId, TechnologyType type, out uint hysteresisdBm)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
TechnologyType | type | Technology Type |
System.UInt32 | hysteresisdBm | Hysteresis band in dBm x 10. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetFilterWindowSize(Int32, TechnologyType, out UInt32)
Get the filter window size per technology type.
Declaration
public bool GetFilterWindowSize(int spotId, TechnologyType type, out uint windowSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
TechnologyType | type | Technology Type |
System.UInt32 | windowSize | The filter window size. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetFirmwareUpdateEnabledState(Int32, out Boolean, out UInt32)
Get the current firmware update enabled state.
Declaration
public bool GetFirmwareUpdateEnabledState(int spotId, out bool state, out uint intervalSec)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Boolean | state | Firmware enabled state |
System.UInt32 | intervalSec | Firmware update server request interval[sec] |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetFirmwareVersion(Int32, out String)
Check the firmware version.
Declaration
public bool GetFirmwareVersion(int spotId, out string version)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.String | version | Firmware version. |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetGateway(Int32, out String)
Get the current gateway address.
Declaration
public bool GetGateway(int spotId, out string gateway)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.String | gateway | Current gateway address |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetHoldTime(Int32, out UInt32, out Boolean)
Get the hold time of a presence in seconds and the automatic hold time enabled state. When automatic hold time is enabled, it will automatically replace the static hold time for a dynamic one.
Declaration
public bool GetHoldTime(int spotId, out uint timeSec, out bool autoEnabledState)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.UInt32 | timeSec | The holdtime in seconds. |
System.Boolean | autoEnabledState | Automatic hold time enabled state. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetIpAddress(Int32, out String)
Get the current IP address.
Declaration
public bool GetIpAddress(int spotId, out string ipAddress)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.String | ipAddress | Current IP address |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetIpSubnet(Int32, out String)
Get the current IP subnet address.
Declaration
public bool GetIpSubnet(int spotId, out string subnet)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.String | subnet | Current subnet address |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetPresences(Int32, out Dictionary<Int32, Presence>)
Get presences.
Declaration
public bool GetPresences(int spotId, out Dictionary<int, Presence> presences)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Collections.Generic.Dictionary<System.Int32, Presence> | presences | Dictionary, key: hash, value: Presence object. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Remarks
It is possible that multiple presences of the same item are returned if the antenna presenses option is enabled. Presences could be reported per antenna, theoretically there could be [Number of antennas] presenses per item.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetPrimaryDNS(Int32, out String)
Get the current primary DNS address.
Declaration
public bool GetPrimaryDNS(int spotId, out string dnsAddress)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.String | dnsAddress | Current primary DNS |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetProximityLevel(Int32, TechnologyType, ProximityType, out Int32)
Get the proximity level per technology and proximity type.
Declaration
public bool GetProximityLevel(int spotId, TechnologyType ttype, ProximityType ptype, out int leveldBm)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
TechnologyType | ttype | Technology Type |
ProximityType | ptype | Proximity Type |
System.Int32 | leveldBm | Proximity level in dBm x 10. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetRawHitEventsEnabledState(Int32, out Boolean)
Get the current state of raw hit events.
Declaration
public bool GetRawHitEventsEnabledState(int spotId, out bool state)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Boolean | state | Current state. |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetRfidAntennaConnectedState(Int32, UInt32, out Boolean)
Get the connected state for a specific rfid antenna.
Declaration
public bool GetRfidAntennaConnectedState(int spotId, uint number, out bool state)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.UInt32 | number | Antenna number. |
System.Boolean | state |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API or the Antenna number doesn't exist. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetRfidAntennaDisableMask(Int32, out UInt32)
Get the disabled state of each antenna. This method is a low level alternative for GetRfidAntennaEnabledState
Declaration
public bool GetRfidAntennaDisableMask(int spotId, out uint mask)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.UInt32 | mask | Binary mask. See method SetAntennaDisableMask for explanation. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API or the Antenna number doesn't exist. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetRfidAntennaEnabledState(Int32, UInt32, out Boolean)
Get the enabled state of a specific RFID antenna.
Declaration
public bool GetRfidAntennaEnabledState(int spotId, uint number, out bool state)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.UInt32 | number | Rfid Antenna number. |
System.Boolean | state | The antenna enable state. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API or the Antenna number doesn't exist. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetRfidAntennaList(Int32, out List<Antenna>)
Get a list of RFID antennas.
Declaration
public bool GetRfidAntennaList(int spotId, out List<Antenna> antennas)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Collections.Generic.List<Antenna> | antennas | Used to output the antenna list. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetRfidChannel(Int32, out UInt32)
Get the Rfid channel.
Declaration
public bool GetRfidChannel(int spotId, out uint channel)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.UInt32 | channel |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetRfidCodeMode(Int32, out RfidCodeMode)
Get the current Rfid Code Mode.
Declaration
public bool GetRfidCodeMode(int spotId, out RfidCodeMode mode)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
RfidCodeMode | mode | Rfid Code Mode |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetRfidContinuesEnabledState(Int32, out Boolean)
Check the state of Rfid continues mode.
Declaration
public bool GetRfidContinuesEnabledState(int spotId, out bool state)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Boolean | state | The new state. |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetRfidEnabledState(Int32, out Boolean)
Get the current Rfid reader enabled state.
Declaration
public bool GetRfidEnabledState(int spotId, out bool state)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Boolean | state | The new state. |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetRfidFilterThreshold(Int32, out Int32)
Get current minimal RSSI threshold filter for Rfid reader.
Declaration
public bool GetRfidFilterThreshold(int spotId, out int threshold)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Int32 | threshold | Filter threshold value. |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetRfidInventoryEnabledState(Int32, out Boolean)
Get the current Rfid reader inventory state
Declaration
public bool GetRfidInventoryEnabledState(int spotId, out bool state)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Boolean | state | The new state. |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetRfidMaxQ(Int32, out UInt32)
Get the max. Q factor.
Declaration
public bool GetRfidMaxQ(int spotId, out uint qvalue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.UInt32 | qvalue | Max. Q setting. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
See Also
GetRfidMinQ(Int32, out UInt32)
Get the min. Q factor.
Declaration
public bool GetRfidMinQ(int spotId, out uint qvalue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.UInt32 | qvalue | Minimal Q setting. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
See Also
GetRfidPeriodMs(Int32, out UInt32)
Get the time that the Rfid reader will take to scan for presences per antenna before switching to the next one.
Declaration
public bool GetRfidPeriodMs(int spotId, out uint timeMs)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | |
System.UInt32 | timeMs |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetRfidPower(Int32, out UInt32)
Get the Rfid reader power.
Declaration
public bool GetRfidPower(int spotId, out uint power)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.UInt32 | power | Rfid power setting output. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetRfidRegion(Int32, out RfidRegionType)
This method can be used to get the Region of operation.
Declaration
public bool GetRfidRegion(int spotId, out RfidRegionType region)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
RfidRegionType | region | Region of operation. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetSecondaryDNS(Int32, out String)
Get the current secondary DNS address.
Declaration
public bool GetSecondaryDNS(int spotId, out string dnsAddress)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.String | dnsAddress | Current secondary DNS |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetSpotCount()
Get the total count of Spots (connected and disconnected).
Declaration
public int GetSpotCount()
Returns
Type | Description |
---|---|
System.Int32 | Total Spots |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
GetSpotIDs()
Get a list that contains all the Spot identifiers (connected, disconnected).
Declaration
public List<int> GetSpotIDs()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.Int32> | List |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
Init()
This method can be used to initialize the API.
Declaration
public void Init()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when the API is initialized. |
IsConnected(Int32)
Check if a specific Spot is connected.
Declaration
public bool IsConnected(int spotId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
SetAntennaMaxSWR(Int32, UInt32)
Set the max Antenna SWR value. Is used by the Spot to determine if an antenna is connected by comparing the SWR max with the SWR measurement of the antenna.
Declaration
public bool SetAntennaMaxSWR(int spotId, uint maxSwr)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.UInt32 | maxSwr | Max antenna SWR value. Allowed range: 0 - 4000 |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when argument out of range. |
System.InvalidOperationException | Thrown when API isn't initialized. |
SetAntennaPresencesEnabledState(Int32, Boolean)
Use this method to enable or disable antenna presences. Antenna presences are used to get presence information per antenna instead of presences on the global 'Spot' level. Typical applications:
- Micro zones, storage containers, lockers.
- Create sets/groups of antennas.
Declaration
public bool SetAntennaPresencesEnabledState(int spotId, bool newState)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Boolean | newState | New state. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Remarks
When Enabled, this setting will affect the data bandwidth significantly.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
SetBluetoothEnabledState(Int32, Boolean)
Enable or disable the Bluetooth receiver.
Declaration
public bool SetBluetoothEnabledState(int spotId, bool newState)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Boolean | newState | The new state. |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
SetBluetoothFilterThreshold(Int32, Int32)
Set minimal RSSI threshold filter for Bluetooth receiver.
Declaration
public bool SetBluetoothFilterThreshold(int spotId, int threshold)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Int32 | threshold | Filter threshold value. Allowed range: -300 >= threshold >= -900. |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when argument out of range. |
System.InvalidOperationException | Thrown when API isn't initialized. |
SetFilterHysteresis(Int32, TechnologyType, UInt32)
Set the filter hysteresis per technology type.
Declaration
public bool SetFilterHysteresis(int spotId, TechnologyType type, uint hysteresisdBm)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
TechnologyType | type | Technology Type |
System.UInt32 | hysteresisdBm | Hysteresis band in dBm x 10. Allowed range: 0-100. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when argument out of range. |
System.InvalidOperationException | Thrown when API isn't initialized. |
SetFilterWindowSize(Int32, TechnologyType, UInt32)
Set the filter window size per technology type.
Declaration
public bool SetFilterWindowSize(int spotId, TechnologyType type, uint windowSize)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
TechnologyType | type | Technology Type |
System.UInt32 | windowSize | Filter window. Allowed range: 1-100. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when argument out of range. |
System.InvalidOperationException | Thrown when API isn't initialized. |
SetFirmwareUpdateEnabledState(Int32, Boolean, UInt32)
Enable or disable firmware update.
Declaration
public bool SetFirmwareUpdateEnabledState(int spotId, bool newState, uint intervalSec = 900U)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Boolean | newState | Firmware update enabled state |
System.UInt32 | intervalSec | Firmware update server request interval[sec] |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when argument out of range. |
System.InvalidOperationException | Thrown when API isn't initialized. |
SetHoldTime(Int32, UInt32)
Set the hold time of a presence in seconds. To work properly, use the next formula: HoldTimeSec >= (connected Antennas + 1) * (RfidPeriodMs / 1000).
Declaration
public bool SetHoldTime(int spotId, uint timeSec)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.UInt32 | timeSec | Holdtime in seconds. Allowed range: 1 - 3600. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when argument out of range. |
System.InvalidOperationException | Thrown when API isn't initialized. |
SetHoldTimeAutomaticEnabledState(Int32, Boolean)
Enable or Disable automatic hold time for presences.
Declaration
public bool SetHoldTimeAutomaticEnabledState(int spotId, bool newState)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Boolean | newState | The new state. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
SetProximityLevel(Int32, TechnologyType, ProximityType, Int32)
Set the proximity level per technology and proximity type.
Declaration
public bool SetProximityLevel(int spotId, TechnologyType ttype, ProximityType ptype, int leveldBm)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
TechnologyType | ttype | Technology Type |
ProximityType | ptype | Proximity Type |
System.Int32 | leveldBm | Proximity level in dBm x 10. Allowed range: (-300) - (-800). |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when argument out of range. |
System.InvalidOperationException | Thrown when API isn't initialized. |
SetRawHitEventsEnabledState(Int32, Boolean)
Enable or disable raw hit events. These raw events are gathered at the lowest event level, before processing.
Declaration
public bool SetRawHitEventsEnabledState(int spotId, bool newState)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Boolean | newState | Enable or disable |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
SetRfidAntennaDisableMask(Int32, UInt32, Boolean)
Method can be used to enable or disable rfid antennas. This method is a low level alternative for SetRfidAntennaEnabledState
Declaration
public bool SetRfidAntennaDisableMask(int spotId, uint mask, bool changeDynamically = false)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.UInt32 | mask | Binary mask. Each bit represents the antenna state. Bit0 is the disabled state of antenna 1, bit1 = antenna2, etc... If the bit is set to 0: the antenna will be enabled, If 1: the antenna will be disabled. |
System.Boolean | changeDynamically | See method SetAntennaEnabledState for explanation. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API or the antenna number is out of range. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
SetRfidAntennaEnabledState(Int32, UInt32, Boolean, Boolean)
Enable or disable RFID antennas.
Declaration
public bool SetRfidAntennaEnabledState(int spotId, uint number, bool newState, bool changeDynamically = false)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.UInt32 | number | Antenna number. Allowed range: 1-25. |
System.Boolean | newState | New state. |
System.Boolean | changeDynamically | Should this setting be changed statically or dynamically? Static change: The setting will be saved in the config memory of the Spot. Should be used for: > Enabling/Disabling the antennas once and use this configuration. Advantage: > Setting will be remembered after a restart. Disadvantage: > After a change, a Spot restart is always required. Dynamic change: The settings are not persisted in the config memory of the Spot, but temporary overridden while in operational mode. The library will use the SenseAndControl feature for this and updates/overwrites the default SenseAndControl scheme once (restart required). After the scheme has been set, no futher restars are required when changing this setting. Should be used for: > Continuously selecting (pairs/groups/sets) of antennas for scanning purposes. Advantage: > Spot restart is not required (exept updating the SenseAndControl scheme once). Disadvantage: > Changes won't be remembered after a restart (except the SenseAndControl scheme). |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API or the antenna number is out of range. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when argument out of range. |
System.InvalidOperationException | Thrown when API isn't initialized. |
SetRfidChannel(Int32, UInt32)
Set the Rfid channel.
Declaration
public bool SetRfidChannel(int spotId, uint channel)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.UInt32 | channel | Channel number. Allowed range: 1-4. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when argument out of range. |
System.InvalidOperationException | Thrown when API isn't initialized. |
SetRfidCodeMode(Int32, RfidCodeMode)
Set Rfid Code Mode. This setting defines:
- The data for Item Code,
- If the Spot reads Tag TID Memory. See RfidCodeMode for more information.
Declaration
public bool SetRfidCodeMode(int spotId, RfidCodeMode mode)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
RfidCodeMode | mode | Rfid Code Mode |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
SetRfidContinuesEnabledState(Int32, Boolean)
Method to set the Rfid continues mode. In off mode, Rfid continues garantees you that the Rfid reader will stop between switching antennas. This prevents that presences are reported to the wrong/previous antenna during the inventory operation. Disadvantage:
Each switch operation takes some extra time (100-200ms) to stop, wait and start the Rfid reader.
Declaration
public bool SetRfidContinuesEnabledState(int spotId, bool newState)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Boolean | newState | The new state. |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
SetRfidEnabledState(Int32, Boolean)
Enable or disable the Rfid reader.
Declaration
public bool SetRfidEnabledState(int spotId, bool newState)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Boolean | newState | The new state. |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
SetRfidFilterThreshold(Int32, Int32)
Set minimal RSSI threshold filter for Rfid reader.
Declaration
public bool SetRfidFilterThreshold(int spotId, int threshold)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Int32 | threshold | Filter threshold value. Allowed range: -300 >= threshold >= -900. |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when argument out of range. |
System.InvalidOperationException | Thrown when API isn't initialized. |
SetRfidInventoryEnabledState(Int32, Boolean)
Enable or disable the Rfid inventory.
Declaration
public bool SetRfidInventoryEnabledState(int spotId, bool newState)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.Boolean | newState | The new state. |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Remarks
Rfid should be enabled, see SetRfidEnabledState
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
SetRfidMaxQ(Int32, UInt32)
Set the max. Q factor.
Declaration
public bool SetRfidMaxQ(int spotId, uint qvalue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.UInt32 | qvalue | New max. Q setting. Allowed range: 0-13 and equal than RfidMaxQ. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Remarks
The maximum Q factor determines the maximum number of timeslots that the Rfid reader uses during an inventory/scan. At default the maximum Q factor is 13.
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when argument out of range. |
System.InvalidOperationException | Thrown when API isn't initialized. |
See Also
SetRfidMinQ(Int32, UInt32)
Set the min. Q factor.
Declaration
public bool SetRfidMinQ(int spotId, uint qvalue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.UInt32 | qvalue | New minimal Q setting. Allowed range: 0-13 and equal/lower than RfidMaxQ. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Remarks
The minimum Q factor determines the number of timeslots that the Rfid reader will use at the start of an inventory/scan. At default the minimum Q factor is 0. The Rfid reader will autmatically increment the number of timeslots during the inventory/scan if necessary, but this incrementation can take some time. When the expected number of tags in front of the Rfid reader is high, it could be wise to increment the minimal Q factor. The time it takes to scan all the tags could be minimized significantly.
Formula to calculate the number of timeslots: timeslots = 2^Q (i.e: Q=3, 2^3 = 8)
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when argument out of range. |
System.InvalidOperationException | Thrown when API isn't initialized. |
See Also
SetRfidPeriodMs(Int32, UInt32)
Set the time that the Rfid reader will take to scan for presences per antenna, before switching to the next one.
Declaration
public bool SetRfidPeriodMs(int spotId, uint timeMs)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.UInt32 | timeMs | Time in ms. Allowed range: 50 - 3000ms. |
Returns
Type | Description |
---|---|
System.Boolean | True: Successful, False: Operation failed or Spot is not known by the API. |
Remarks
- If the period is less than ~120ms (in combination with RfidContinuesEnabledState = false), the Rfid reader reading performances (i.e. number of reads) could be affected.
- Changing this setting could have consequences for setting HoldTime (Formula: HoldTime >= (connected Antennas + 1) * (RfidPeriodMs / 1000)).
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when argument out of range. |
System.InvalidOperationException | Thrown when API isn't initialized. |
SetRfidPower(Int32, UInt32)
Set the Rfid reader power.
Declaration
public bool SetRfidPower(int spotId, uint power)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
System.UInt32 | power | Rfid power in dBm. Allowed range: 5 - 30 dbm. |
Returns
Type | Description |
---|---|
System.Boolean | False if the Spot is not known by the API. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown when argument out of range. |
System.InvalidOperationException | Thrown when API isn't initialized. |
SetRfidRegion(Int32, RfidRegionType)
This method can be used to set the Region of operation. Frequency, max power level and channel requirements could be different per Region.
Declaration
public bool SetRfidRegion(int spotId, RfidRegionType region)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | spotId | Spot ID |
RfidRegionType | region | Region of operation. |
Returns
Type | Description |
---|---|
System.Boolean |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when API isn't initialized. |
Events
Item
Item updated events.
Declaration
public event EventHandler Item
Event Type
Type | Description |
---|---|
System.EventHandler |
Remarks
Use ItemEvent in your event handler to retrieve the event data.
See Also
Presence
Presence events.
Declaration
public event EventHandler Presence
Event Type
Type | Description |
---|---|
System.EventHandler |
Remarks
Use PresenceEvent in your event handler to retrieve the event data.
See Also
RawHit
Raw Hit events.
Declaration
public event EventHandler RawHit
Event Type
Type | Description |
---|---|
System.EventHandler |
Remarks
- Use RawHitEvent in your event handler to retrieve the event data.
- To be able to receive hit events, use method SetRawHitEventsEnabledState to enable.
See Also
Spot
Spot online/offline events.
Declaration
public event EventHandler Spot
Event Type
Type | Description |
---|---|
System.EventHandler |
Remarks
Use SpotEvent in your event handler to retrieve the event data.