forked from hbkworld/open-api-time-data-recorder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRecorderMeasure.m
20 lines (16 loc) · 915 Bytes
/
RecorderMeasure.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function RecorderMeasure(ip,DefaultTimeout)
% Bruel & Kjaer LAN-XI Open Application Programming Interface
% MATLAB Simple Recorder GUI Version 1.0 (September 15, 2021)
% By Matthew Houtteman and Gert Nyrup
% +1 800-332-2040
% Developed in MATLAB R2021a with LAN-XI Firmware 2.10.0.501
% Starts the streaming of samples to the destination. Streaming starts as
% soon as the command is received and processed, and data needs to be
% consumed by the client before buffers overflow. Sent to service modules
% first, then the command module. Note that after issuing the REST command
% it is necessary to wait for moduleState to be "RecorderRecording" before
% further commands are issued.
webwrite(strcat(strcat("http://",ip),"/rest/rec/measurements"),weboptions('RequestMethod','post','Timeout',DefaultTimeout));
WaitForModuleState(ip,DefaultTimeout,"RecorderRecording");
end