You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Submit one or more parameters of name "pv" to the epics2web/caget URL. The response is a JSON object of the form:
Success:
{data: [{name: <name>, value: <value>},...]}
Failure:
{error: <error-reason>}
Note: You can optionally provide a parameter named "n" (the value can be anything) and it will be treated like "caget -n", which results in enum type PVs returning the numeric value instead of the string label.
jlab.epics2web.ClientConnection(options)
Create a new ClientConnection. Input: options - see Options Output: ClientConnection
jlab.epics2web.ClientConnection.monitorPvs(pvs)
Monitor a set of PVs. Input: pvs - array of pv names
jlab.epics2web.ClientConnection.clearPvs(pvs)
Stop monitoring a set of PVs. Input: pvs - array of pv names
jlab.epics2web.ClientConnection.ping()
Ping the server.
jlab.epics2web.ClientConnection.open()
Open the websocket connection.
jlab.epics2web.ClientConnection.close()
Close the websocket connection.
jlab.epics2web.ClientConnection.addEventListener(name, function)
Add a callback function on a named event. Input: name - the event name; see Events Input: function - the function to call
jlab.epics2web.ClientConnection.onopen(function)
Convenience function for open event. If more than one callback is needed use ClientConnection.addEventListener instead. Input: function - the function to call
jlab.epics2web.ClientConnection.onclose(function)
Convenience function for close event. If more than one callback is needed use ClientConnection.addEventListener instead. Input: function - the function to call
jlab.epics2web.ClientConnection.onconnecting(function)
Convenience function for connecting event. If more than one callback is needed use ClientConnection.addEventListener instead. Input: function - the function to call
jlab.epics2web.ClientConnection.onclosing(function)
Convenience function for closing event. If more than one callback is needed use ClientConnection.addEventListener instead. Input: function - the function to call
jlab.epics2web.ClientConnection.onerror(function)
Convenience function for error event. If more than one callback is needed use ClientConnection.addEventListener instead. Input: function - the function to call
jlab.epics2web.ClientConnection.onupdate(function)
Convenience function for update event. If more than one callback is needed use ClientConnection.addEventListener instead. Input: function - the function to call
jlab.epics2web.ClientConnection.oninfo(function)
Convenience function for info event. If more than one callback is needed use ClientConnection.addEventListener instead. Input: function - the function to call
jlab.epics2web.ClientConnection.onpong(function)
Convenience function for pong event. If more than one callback is needed use ClientConnection.addEventListener instead. Input: function - the function to call
Events
open - This event is triggered after the socket is open
close - This event is triggered after the socket is closed
connecting - This event is triggered as the socket is connecting
closing - This event is triggered as the socket is closing
error - This event is triggered upon socket error
message - This event is triggered upon message (update/info/pong)
Param: event.type - One of 'update', 'info', 'pong'
Param: event.* - Contents based on type, see info, update, pong events
info - This event is triggered upon an info message
Param: event.detail.pv - PV name
Param: event.detail.connected - true if an EPICS monitor was created