Expand description
A mock EPICS Archiver Appliance for tests, CI and demos.
It serves deterministic synthetic history for a fixed set of PVs (see
signals) with the real appliance’s wire format and quirks:
GET /retrieval/data/getData.json?pv=..&from=..&to=..— raw (with the sample beforefrom),optimized_N(raw when few samples, else[mean, std, min, max, count]bins at bin centres, filled),mean_N,min_N,max_N,std_N,variance_N,median_N,count_N,firstSample_N,lastSample_N,nth_N,ncountand the<op>Sample_Nno-fill variants;op(PV,N)andpp=forms too; bareNaNtokens forMOCK:NAN; 404 (HTML body) for unknown PVs; 400 for a bad time,to < fromor unbalanced parentheses.todefaults to now + 1h,fromtoto− 1 day. Summaries of strings and waveforms return raw data.GET /retrieval/bpl/getMatchingPVs?pv=<glob>|regex=<re>&limit=N— the appliance’s naive glob (*→.*,?→.), whole-name match, sorted; 404 with neither parameter.GET /retrieval/bpl/getMetadata?pv=..—DBRType,elementCount,units,precision, … as strings.GET /retrieval/bpl/getVersion—{"version": "Archiver Appliance Version <mock version>"}.GET /mgmt/bpl/getAllPVs?pv=<glob>[,<glob>]®ex=..&limit=N— unsorted.
Every endpoint is served on one port (like the single-container
appliance), so --archiver http://127.0.0.1:PORT works for the client.
Data begins signals::HISTORY_DAYS days before the server started
and grows with the clock; large responses are streamed (chunked).
Modules§
- signals
- The synthetic PVs: deterministic functions of time on a fixed sample grid.
Structs§
- Mock
Archiver - A running mock appliance. Serves on background threads until dropped.
Constants§
- DEFAULT_
PORT - The appliance’s retrieval port, the default for the binary.