Use this reference for an Eagle R508 delivered with STREAM. The application ID in the runtime manifest is eagle_r508_stream250, and the device contract ID is eagle-r508-stream250. Check the active identity, manifest and permissions before using these methods. STREAM application guide
| Task | Endpoint | Credentials and data |
|---|---|---|
| Discover the device app and available methods | GET http://DEVICE_IP:8080/api/v1/manifest |
Device management network, using the runtime manifest |
| Read or configure the device | POST http://DEVICE_IP:8081/rpc |
Named ULMUS client token, Authorization: Bearer … |
| Manage recordings and files | Delivered DAQ Web or RPC address | The receiving server's own permissions and client credentials |
| Receive capture data | QSFP28 100G UDP | A self-managed host receives data at the configured address and ports |
DEVICE_IP is the device's actual management address. Use JSON-RPC 2.0 with a named params object, or {} when there are no parameters. Match the reply id and check error before using result. Assign one owner for capture lifecycle and host writes. Common interfaces and authentication
| Method | Parameters | What to verify |
|---|---|---|
system.status |
{} |
Verify device_id, application identity, state and udp_running. |
clock.status |
{} |
Check locked: true when preparing a capture. |
stream.profile.list |
{} |
adc_rate_sps is the ADC sample rate. profiles gives each mode, output_rate_sps, rfdc_decimation and channel_masks. |
stream.profile.get |
{} |
Read target, ready_to_start and the current packetizer state. Use failure_stage and cleanup_failed to investigate failures. |
stream.profile.set |
All five fields below | Returns target and state: "configured_stopped". Read back the profile, mask, NCO, header mode, flow count and readiness with get. |
udp.configure |
{} |
Prepare UDP using the provisioned device network settings. Check the receiver address and ports. |
udp.start |
{} |
Start the ready profile. Verify system.status.udp_running and actual reception. |
udp.stop |
{} |
Stop the sender and keep the profile. Confirm udp_running: false before finalizing the receive files. |
| Field (all required) | Type and permitted values |
|---|---|
profile |
String. Choose BW8M_10MSPS, BW16M_20MSPS, IQ125MSPS or IQ250MSPS. |
channel_mask |
Integer. 15 selects ADC1–4, 240 selects ADC5–8 and 255 selects ADC1–8. At 250 MSPS, use 15 or 240. |
header_enabled |
Boolean. true selects V1 and false selects headerless IQ. |
center_frequency_hz |
Nonnegative integer in hertz for the common NCO, within the device's supported frequency range. |
flow_count |
Integer. V1 supports 1, 2, 4 or 8. Use 1 for headerless IQ. |
This request selects 8 MHz, 10 MSPS, all eight ADCs and one V1 flow. The example NCO is 500 MHz.
Management or receiving host. Use the device/DAQ endpoint above, your own token and the actual settings. JSON shows the request payload.
{
"jsonrpc": "2.0",
"id": 1,
"method": "stream.profile.set",
"params": {
"profile": "BW8M_10MSPS",
"channel_mask": 255,
"header_enabled": true,
"center_frequency_hz": 500000000,
"flow_count": 1
}
}
For a self-managed capture, use the following sequence.
system.status, clock.status and stream.profile.list. End the previous task through its owner. Before a profile change that affects a shared clock, stop the affected DAC outputs.stream.profile.set, check target.name and the other target fields in stream.profile.get, with ready_to_start: true.udp.configure, then udp.start. Confirm actual packets arrive. For multiple flows, use the configured base destination port and consecutive destination ports per the matching SDK or DAQ deployment.udp.stop, confirm the sender stopped, then finalize and verify the host files. If a mutation times out, read the actual state before deciding how to recover.For a group-wide retune, use stream.profile.set with the other settings retained. The runtime manifest may also expose shared adc.frequency.*, adc.attenuation.*, adc.nyquist.*, dac.frequency.set, dac.amplitude.set, mts.synchronize, sensor.sysmon, system.*, debug.xvc.* and stream.packetizer.* methods. Follow the active permissions and schemas. Apply the complete profile to keep the channel group, NCO, sample rate and header aligned.
Each UDP payload contains 8192 bytes. The IQ starts at offset 64 with V1, or offset 0 in headerless mode. Samples are signed little-endian I16 and Q16, interleaved by sample time and configured ADC order. Each time instant starts with I, Q for the first ADC in the selected group, then I, Q for each remaining ADC.
| V1 byte offsets | Fields | Check |
|---|---|---|
| 0–7 | Sync word, version, header length, station and packet type | Little-endian sync word 0x53594E43, version 1, header length field 1 for a 64-byte header, ADC IQ packet_type=1. |
| 8–19 | channel_mask, flags and frame_sequence |
Check the channel group. Merge flows before testing reception against the global sequence. |
| 20–43 | utc_second, sample_index, center_frequency_hz |
Little-endian 64-bit values. Frequency is the configured NCO. Check sync_status and qualified timing conditions before using UTC. |
| 44–47 | sample_rate_id, decimation_id |
Sample rate IDs 1, 2, 3 and 4 mean 10, 20, 125 and 250 MSPS. RFDC decimation is 40 or 20 according to the profile. |
| 48–63 | IQ block counts, length, adc_iq_format, status and reserved field |
V1 holds 8128 IQ bytes. Block and valid-block counts are 127, adc_iq_format=1, and the reserved CRC field is 0. |
V1 carries 508 samples per ADC for a four-channel capture and 254 for eight channels. In headerless mode the counts are 512 and 256. Use the recorded profile, channel order and sample rate for headerless files. V1 packet sequences check reception. Source sample continuity and absolute UTC accuracy require corresponding measurements. Channel groups and data rates
Use the matched STREAM DAQ service. Check server.status and device.status, then call acquisition.start with a new task_id. The object below is for the DAQ Web parameters field. The example selects 256 MiB segments. Check the actual manifest for its supported sizes.
Management or receiving host. Use the device/DAQ endpoint above, your own token and the actual settings. JSON shows the request payload.
{
"task_id": "stream_first",
"profile": "BW8M_10MSPS",
"adc_channels": [0, 1, 2, 3, 4, 5, 6, 7],
"center_frequency_hz": 500000000,
"packet_header_enabled": true,
"flow_count": 1,
"segment_size_mib": 256
}
DAQ uses zero-based adc_channels and packet_header_enabled. At 250 MSPS, choose [0,1,2,3] or [4,5,6,7]. To configure a stopped task, submit capture fields using stream.configure as defined in its manifest. Use acquisition.start and acquisition.stop for the DAQ-managed lifecycle. After closing the task, check its terminal state, valid bytes and task.json.
Save the code as stream250_query.py. Obtain an authorized client token from the device Web interface and save it in a file readable only by your account. Run python3 stream250_query.py DEVICE_IP TOKEN_FILE with the actual management address and token file path. The program queries system.status, stream.profile.list and stream.profile.get.
Management or receiving host. Use the device/DAQ endpoint above, your own token and the actual settings. JSON shows the request payload.
"""Query a delivery-matched R508 STREAM over device JSON-RPC."""
import http.client
import json
from pathlib import Path
import sys
import uuid
def call(host, token, method, params=None):
"""Return one matched result from the device management RPC endpoint."""
request_id = uuid.uuid4().hex
request = {"jsonrpc": "2.0", "id": request_id, "method": method,
"params": {} if params is None else params}
with_connection = http.client.HTTPConnection(host, 8081, timeout=10)
try:
with_connection.request("POST", "/rpc", json.dumps(request), {
"Content-Type": "application/json",
"Authorization": f"Bearer {token}",
})
response = with_connection.getresponse()
if response.status != 200:
raise RuntimeError(f"{method}: HTTP {response.status}")
reply = json.loads(response.read(1_048_576))
finally:
with_connection.close()
if (reply.get("jsonrpc"), reply.get("id")) != ("2.0", request_id):
raise RuntimeError(f"{method}: unmatched JSON-RPC response")
if "error" in reply or not isinstance(reply.get("result"), dict):
raise RuntimeError(f"{method}: response has no usable result")
return reply["result"]
def main():
"""Read device identity, supported profiles and current profile."""
if len(sys.argv) != 3:
raise SystemExit("usage: python3 stream250_query.py DEVICE_IP TOKEN_FILE")
host, token_path = sys.argv[1:]
token = Path(token_path).read_text(encoding="utf-8").strip()
system = call(host, token, "system.status")
if system.get("device_id") != "eagle-r508-stream250":
raise SystemExit("The active device contract is not STREAM")
catalog = call(host, token, "stream.profile.list")
current = call(host, token, "stream.profile.get")
print(json.dumps({"profiles": catalog["profiles"], "target": current["target"],
"ready_to_start": current["ready_to_start"]}, indent=2))
if __name__ == "__main__":
main()
Save the code as stream250_query.cpp. Build it with the libcurl and JsonCpp development packages and pkg-config. Supply the same management address and token file path as in the Python example.
Management or receiving host. Use the device/DAQ endpoint above, your own token and the actual settings. JSON shows the request payload.
g++ -std=c++17 -O2 stream250_query.cpp \
$(pkg-config --cflags --libs libcurl jsoncpp) -o stream250_query
./stream250_query DEVICE_IP TOKEN_FILE
Management or receiving host. Use the device/DAQ endpoint above, your own token and the actual settings. JSON shows the request payload.
/* Query the R508 STREAM device contract via libcurl and JsonCpp. */
#include <curl/curl.h>
#include <json/json.h>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <memory>
#include <sstream>
#include <stdexcept>
#include <string>
static size_t append_reply(char* data, size_t size, size_t count, void* state)
{
auto& body = *static_cast<std::string*>(state);
const size_t bytes = size * count;
if (bytes > 1048576 - body.size()) {
return 0;
}
body.append(data, bytes);
return bytes;
}
static Json::Value call(const std::string& host, const std::string& token,
const std::string& method, const Json::Value& params = Json::Value(Json::objectValue))
{
const std::string url = "http://" + host + ":8081/rpc";
Json::Value request(Json::objectValue);
request["jsonrpc"] = "2.0";
request["id"] = method; // One request at a time, with a matching response ID.
request["method"] = method;
request["params"] = params;
const std::string payload = Json::writeString(Json::StreamWriterBuilder{}, request);
const std::string authorization = "Authorization: Bearer " + token;
std::unique_ptr<CURL, decltype(&curl_easy_cleanup)> connection(curl_easy_init(), curl_easy_cleanup);
std::unique_ptr<curl_slist, decltype(&curl_slist_free_all)> headers(
curl_slist_append(nullptr, "Content-Type: application/json"), curl_slist_free_all);
if (!connection || !headers || !curl_slist_append(headers.get(), authorization.c_str())) {
throw std::runtime_error("Could not initialize HTTP request");
}
std::string body;
curl_easy_setopt(connection.get(), CURLOPT_URL, url.c_str());
curl_easy_setopt(connection.get(), CURLOPT_HTTPHEADER, headers.get());
curl_easy_setopt(connection.get(), CURLOPT_POSTFIELDS, payload.c_str());
curl_easy_setopt(connection.get(), CURLOPT_TIMEOUT, 10L);
curl_easy_setopt(connection.get(), CURLOPT_NOPROXY, "*");
curl_easy_setopt(connection.get(), CURLOPT_WRITEFUNCTION, append_reply);
curl_easy_setopt(connection.get(), CURLOPT_WRITEDATA, &body);
long http = 0;
if (curl_easy_perform(connection.get()) != CURLE_OK
|| curl_easy_getinfo(connection.get(), CURLINFO_RESPONSE_CODE, &http) != CURLE_OK
|| http != 200) {
throw std::runtime_error(method + ": HTTP request failed");
}
Json::Value reply;
std::istringstream stream(body);
Json::CharReaderBuilder reader;
reader["failIfExtra"] = true;
if (!Json::parseFromStream(reader, stream, &reply, nullptr) || !reply.isObject()
|| reply["jsonrpc"] != "2.0" || reply["id"] != request["id"]
|| reply.isMember("error") || !reply["result"].isObject()) {
throw std::runtime_error(method + ": response has no matched result");
}
return reply["result"];
}
int main(int argc, char** argv)
{
if (argc != 3) {
std::cerr << "usage: stream250_query DEVICE_IP TOKEN_FILE\n";
return 1;
}
try {
if (curl_global_init(CURL_GLOBAL_DEFAULT) != CURLE_OK) {
throw std::runtime_error("Could not initialize libcurl");
}
std::atexit(curl_global_cleanup);
std::ifstream token_file(argv[2]);
std::string token;
if (!(token_file >> token)) {
throw std::runtime_error("Cannot read the device token file");
}
if (call(argv[1], token, "system.status")["device_id"] != "eagle-r508-stream250") {
throw std::runtime_error("The active device contract is not STREAM");
}
const auto catalog = call(argv[1], token, "stream.profile.list");
const auto current = call(argv[1], token, "stream.profile.get");
Json::Value output(Json::objectValue);
output["profiles"] = catalog["profiles"];
output["target"] = current["target"];
output["ready_to_start"] = current["ready_to_start"];
std::cout << output << '\n';
} catch (const std::exception& error) {
std::cerr << error.what() << '\n';
return 1;
}
}