Lookup-related events

When a device discovery task is started by Begin Lookup, the SpringCard Companion Service broadcasts events to let the application that initiates the procedure to monitor its progress, until the timeout occurs or End Lookup is invoked. Other applications shall ignore this event.

Lookup Begin

This event fires when a device discovery task is started by Begin Lookup and copies its parameters.

Event specification

event : DeviceLookup.Begin

params : a DEVICE_LOOKUP_BEGIN object

DEVICE_LOOKUP_BEGIN object

Field name Type Status Description
Channel string always The channel specified in the Begin command (network or ble namely)
Timeout integer always The timeout (in seconds) specified in the Begin command

Example

{
	"jsonrpc": "2.0",
	"event": "DeviceLookup.Begin",
	"params":
	{
		"Channel": "network",
		"Timeout": 3
	}
}

Lookup End

This event fires when a device discovery task times out or is stop by End Lookup.

Event specification

event : DeviceLookup.End

params : a DEVICE_LOOKUP_END object

DEVICE_LOOKUP_END object

Field name Type Status Description
Channel string always The channel the Lookup task was running on
Count integer always The number of devices that the Lookup task has found

Example

{
	"jsonrpc": "2.0",
	"event": "DeviceLookup.End",
	"params":
	{
		"Channel": "network",
		"Count": 2
	}
}

Device found

This event fires every time a new device is found by the Lookup task.

Event specification

event : DeviceLookup.Found

params : a FOUND_DEVICE object

FOUND_DEVICE object

See FOUND_DEVICE in the REST API.

Example

{
	"jsonrpc": "2.0",
	"event": "DeviceLookup.Found",
	"params":
	{
		"TemporaryId": "4rIUNPyNqg9ltFALpWUKQ1",
		"Name": "SpringCard SpringPark",
		"SerialNumber": "74905007901",
		"Channel": "network",
		"PhysAddress": "74905007901",        
		"Mode": "coupler",
		"Location": "JDA's Office",        
		"Dhcp": true,
		"IpAddress": "192.168.16.225",
		"IpMask": "255.255.255.0",           
		"IpGateway": "192.168.16.20",
		"TcpServerPort": 3999
	}
}