-
Notifications
You must be signed in to change notification settings - Fork 2
Data sources
Data sources are an extension of the Data Request Format (DRF) format and not a formal component of the specification.
DPM accepts data sources with a left arrow appended to the request string. e.g., G:AMANDA@P,30000,TRUE<-LOGGERDURATION:3600000:MCR
The .start methods accept the data source string as a convenience for lists of devices with the same source. e.g., dpm.start('LOGGERDURATION:3600000:MCR')
Also, these strategies can be used together. Passing the data source to the start method will be effectively the default for any requests that don't specify a data source.
NOTE: When the DPM you are connected to goes down, the client will try to reconnect to another DPM quickly for seamless data. When requesting large data using a data logger data source, the new DPM will start the request anew if a DPM switch happens while receiving data. This switching will cause duplicate data. For now, watching dpm.desired_node for a change will let you know if this happens.
Provides an array of data and timestamps in us.
We plan to auto-detect when FTP is required rather than the user explicitly requesting it. This will require a change to the way standard data is returned. We will always return data in an array for consistency, and higher request rates will return more values per array.
LOGGER returns array data at a given rate between T1 and T2. The T1 and T2 times are in UTC ms. The returned data timestamps are in us.
LOGGER accepts a T1, T2, and Node name. The node name is optional. The DPM will do its best to find a node to satisfy your request.
LOGGERSINGLE returns a single data point within the window around the T1 time.
LOGGERSINGLE accepts T1, window, and node. The node name is optional.
The T1 time is in UTC ms.
The window duration is in ms.
LOGGERDURATION returns array data at a given rate between now - DURATION and now. Data timestamps are in us.
LOGGERDURATION accepts DURATION and node. The node name is optional.
The DURATION time is in ms.
SRFILE returns a single data point from the given file.
SRFILE accepts a valid SRFILE number.
Allows requests to be redirected to a specific node.
REDIR accepts a source and destination. The source may be a * to redirect all requests to the given destination node.