MCPcopy Create free account
hub / github.com/XpuOS/xsched / JsonToXQueueStatus

Method JsonToXQueueStatus

service/common/src/convert.cpp:26–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26void xsched::service::JsonToXQueueStatus(XQueueStatus &status, const Json::Value &json)
27{
28 status.handle = json.isMember("handle") ? (XQueueHandle) json["handle"] .asUInt64() : 0;
29 status.device = json.isMember("device") ? (XDevice) json["device"] .asUInt64() : 0;
30 status.level = json.isMember("level") ? (XPreemptLevel)json["level"] .asInt() : kPreemptLevelUnknown;
31 status.pid = json.isMember("pid") ? (PID) json["pid"] .asInt() : 0;
32 status.threshold = json.isMember("threshold") ? (int64_t) json["threshold"] .asInt64() : -1;
33 status.batch_size = json.isMember("batch_size") ? (int64_t) json["batch_size"].asInt64() : -1;
34 status.ready = json.isMember("ready") ? json["ready"] .asBool() : false;
35 status.suspended = json.isMember("suspended") ? json["suspended"].asBool() : false;
36}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected