Skip to content

Latest commit

 

History

History
100 lines (77 loc) · 3.53 KB

api.md

File metadata and controls

100 lines (77 loc) · 3.53 KB

SmartViewClient

Blackmagic Design™ SmartView control protocol client parser

Kind: global class

smartViewClient.timeout : number

If no ACK is received for this many ms after sending a command, the connection is closed. Set to 0 for disabling timeout.

Kind: instance property of SmartViewClient
Default: 3000

smartViewClient.isConnected : boolean

Checks if there is a connection

Kind: instance property of SmartViewClient

smartViewClient.connect(ip, [connectListener])

Connects to a SmartView device

Kind: instance method of SmartViewClient

Param Type Description
ip string IP address or host name
[connectListener] function added as connect listener

smartViewClient.close()

Closes connection if connected

Kind: instance method of SmartViewClient

smartViewClient.set(header, props, [callback])

Sends a command to the device

Kind: instance method of SmartViewClient
Emits: change

Param Type Description
header string the block header, e.g. 'MONITOR A'
props object the properties to set
[callback] function called when the device acknowledges the command

smartViewClient.get(header) ⇒ object

Returns the current state

Kind: instance method of SmartViewClient
Returns: object - props - the properties which are currently set

Param Type Description
header string the block header, e.g. 'MONITOR A'

"connect"

Connection established

Kind: event emitted by SmartViewClient

"error" (error)

Error happened

Kind: event emitted by SmartViewClient

Param Type
error Error

"close"

Connection closed

Kind: event emitted by SmartViewClient

"change" (header)

A state object has been changed.

Kind: event emitted by SmartViewClient

Param Type Description
header string the block header, e.g. 'MONITOR A'