Jupiter Terminal install http api
Jupiter Terminal install http api
curl -s http://192.168.0.1/api/install/sqf | jsonfilter -q -e '@.cur_sqf_value' curl -s http://192.168.0.1/api/install/sqf | jq .cur_sqf_value
time curl -s http://192.168.0.1/api/install/sqf
{"cur_sqf_value":125,"max_sqf_value":126,"sqf_index":24}
real 0m 0.02s
user 0m 0.01s
sys 0m 0.00s
local socket = require("socket") local json = require("dkjson") local posix = require("posix") -- 标志变量,用于指示是否应退出循环 local should_exit = false -- 当接收到 SIGINT 或 SIGTERM 信号时调用的函数 local function handle_signal(signum) print(string.format("Received signal %d, preparing to exit...", signum)) should_exit = true end -- 注册信号处理函数 posix.signal(posix.SIGINT, handle_signal) -- Ctrl+C 触发 posix.signal(posix.SIGTERM, handle_signal) -- kill 命令触发 -- 获取当前时间,包含年月日时分秒及毫秒 local function get_current_time_with_milliseconds() local current_time_seconds = socket.gettime() local milliseconds = math.floor((current_time_seconds - math.floor(current_time_seconds)) * 1000) local formatted_time = os.date("!%Y-%m-%d %H:%M:%S", math.floor(current_time_seconds)) return string.format("%s.%03d", formatted_time, milliseconds) end -- 使用 posix.nanosleep 实现 usleep 功能 local function usleep(microseconds) local tv = { tv_sec = math.floor(microseconds / 1000000), tv_nsec = (microseconds % 1000000) * 1000 } posix.nanosleep(tv) end while not should_exit do -- 记录开始时间 local operation_start_time = socket.gettime() -- 执行curl命令 local handle = io.popen("curl -s http://192.168.0.1/api/install/sqf") local result = handle:read("*a") -- 读取命令输出 handle:close() -- 解析JSON字符串 local json_data, pos, err = json.decode(result, 1, nil) if not err then -- 记录结束时间并计算差值 local operation_end_time = socket.gettime() local elapsed_time_ms = (operation_end_time - operation_start_time) * 1000 -- 转换为毫秒 -- 获取当前时间用于CSV的第一列 local current_time_str = get_current_time_with_milliseconds() -- 确保 cur_sqf_value 是整数或浮点数 local cur_sqf_value = json_data.cur_sqf_value -- 将JSON数据转换为CSV格式,并添加时间和执行时间 local csv_output = string.format("%s,%.3f,%d", current_time_str, elapsed_time_ms, cur_sqf_value) print(csv_output) else -- 如果解析失败,打印错误信息 print("Error:", err) end -- 可选的延时,如果不需要延迟可以移除或注释掉下面的行 usleep(1000) -- 每次循环后等待1000微秒(即1毫秒) end print("Exiting gracefully...")
2025-03-07 02:09:00.231,31.610,122 2025-03-07 02:09:00.319,84.961,122 2025-03-07 02:09:00.386,64.382,122 2025-03-07 02:09:00.420,31.439,123 2025-03-07 02:09:00.453,30.701,123 2025-03-07 02:09:00.488,32.813,123 2025-03-07 02:09:00.525,33.875,123 2025-03-07 02:09:00.575,48.036,123 2025-03-07 02:09:00.687,109.327,123 2025-03-07 02:09:00.802,112.764,123 2025-03-07 02:09:00.847,41.119,123 2025-03-07 02:09:00.881,32.016,123 2025-03-07 02:09:00.916,33.039,124 2025-03-07 02:09:00.950,31.406,124 2025-03-07 02:09:00.984,31.935,124 2025-03-07 02:09:01.019,31.791,124 2025-03-07 02:09:01.052,30.910,123 2025-03-07 02:09:01.087,32.482,123 2025-03-07 02:09:01.216,123.053,123 2025-03-07 02:09:01.250,31.702,123 2025-03-07 02:09:01.300,48.144,123 2025-03-07 02:09:01.336,33.964,123 2025-03-07 02:09:01.370,30.676,123 2025-03-07 02:09:01.457,83.781,123 2025-03-07 02:09:01.509,49.001,123 2025-03-07 02:09:01.544,30.800,123 2025-03-07 02:09:01.578,31.024,123 2025-03-07 02:09:01.612,31.796,123 2025-03-07 02:09:01.646,30.952,122 2025-03-07 02:09:01.679,30.667,122 2025-03-07 02:09:01.714,32.393,122 2025-03-07 02:09:01.748,31.995,122 2025-03-07 02:09:01.781,30.792,122 2025-03-07 02:09:01.832,48.402,122 2025-03-07 02:09:01.926,91.242,122 2025-03-07 02:09:01.999,71.285,122 2025-03-07 02:09:02.089,87.072,122 2025-03-07 02:09:02.160,69.161,122 2025-03-07 02:09:02.194,31.218,122
# Hughes:SQF_Req 时间间隔(ms) 采样次数 Hughes:SQF_Req 100 3 # Hughes:SQF_Resp 序号 时间戳 SQF1 SQF2 SQF3 Hughes:SQF_Resp 394 1741313289 0 0 0
[2025-03-07 10:08:10.168]# SEND ASCII/51 to ALL CLIENTS >>> s 1 1 w 1 29.881 121.656 0 Hughes:SQF_Req 100 3 [2025-03-07 10:08:10.176]# RECV ASCII/37 from 192.168.0.1 :53625 <<< Hughes:SQF_Resp 394 1741313289 0 0 0 [2025-03-07 10:08:10.216]# RECV ASCII/37 from 192.168.0.1 :53625 <<< Hughes:SQF_Resp 394 1741313289 0 0 0 [2025-03-07 10:08:10.272]# RECV ASCII/39 from 192.168.0.1 :53625 <<< Hughes:SQF_Resp 395 1741313289 123 0 0 [2025-03-07 10:08:10.372]# RECV ASCII/41 from 192.168.0.1 :53625 <<< Hughes:SQF_Resp 396 1741313289 123 123 0 [2025-03-07 10:08:10.475]# RECV ASCII/43 from 192.168.0.1 :53625 <<< Hughes:SQF_Resp 397 1741313289 122 123 123 [2025-03-07 10:08:10.575]# RECV ASCII/43 from 192.168.0.1 :53625 <<< Hughes:SQF_Resp 398 1741313289 122 122 123 [2025-03-07 10:08:10.676]# RECV ASCII/43 from 192.168.0.1 :53625 <<< Hughes:SQF_Resp 399 1741313289 122 122 122 [2025-03-07 10:08:10.772]# RECV ASCII/43 from 192.168.0.1 :53625 <<< Hughes:SQF_Resp 400 1741313289 122 122 122 [2025-03-07 10:08:10.875]# RECV ASCII/43 from 192.168.0.1 :53625 <<< Hughes:SQF_Resp 401 1741313289 122 122 122 [2025-03-07 10:08:10.976]# RECV ASCII/43 from 192.168.0.1 :53625 <<< Hughes:SQF_Resp 402 1741313289 122 122 122 [2025-03-07 10:08:11.075]# RECV ASCII/43 from 192.168.0.1 :53625 <<< Hughes:SQF_Resp 403 1741313290 122 122 122 [2025-03-07 10:08:11.176]# RECV ASCII/43 from 192.168.0.1 :53625 <<< Hughes:SQF_Resp 404 1741313290 122 122 122
$ curl -s http://192.168.0.1/api/install/sqf | jsonfilter -q -e '@.cur_sqf_value'
$ curl -s http://192.168.0.1/api/install/sqf | jq .cur_sqf_value
$ curl -s http://192.168.0.1/api/install/sqf { "cur_sqf_value": 123, "max_sqf_value": 124, "sqf_index": 59 }
$ curl -s http://192.168.0.1/api/install/cur_tune_status
{
"amip_variant": 4,
"beam_id": 4,
"isBoardLinear": 1,
"outroute_freq": 12537500,
"outroute_index": 0,
"outroute_num": 1,
"outroute_pol": 2,
"outroute_rate": 51000000,
"satName": "Jup-APSTAR-5C-NMSID83-DIV",
"status": "locked",
"swapProgress": 0
}
$ curl -s http://192.168.0.1/api/install/pointing_parms
{
"antenna_tilt": -26.093386971660372,
"az": 136.61094667225743,
"beam_selected": 4,
"cableLoss_avr": 2.700000047683716,
"cableLoss_max": 3.4000000953674316,
"cableLoss_min": 2,
"downlink_pol": "Horizontal-Linear (HL)",
"el": 50.81852562488879,
"is_board_linear": 1,
"max_scaled_sqf": 255,
"min_scaled_sqf": 31,
"oduType_print": false,
"outroute_num": 1,
"sat_name": "Jup-APSTAR-5C",
"uplink_pol": "Left-Hand (LH)"
}
$ curl -s http://192.168.0.1/api/install/user_input/0
{
"ODU": [
{
"list": [
{
"power": 2,
"size": 74,
"type": 1
},
{
"power": 2,
"size": 120,
"type": 2
},
{
"power": 2,
"size": 180,
"type": 3
},
{
"power": 2,
"size": 240,
"type": 4
}
]
},
{
"list": [
{
"power": 2,
"size": 74,
"type": 1
},
{
"power": 2,
"size": 120,
"type": 2
},
{
"power": 2,
"size": 180,
"type": 3
},
{
"power": 2,
"size": 240,
"type": 4
}
]
},
{
"list": []
},
{
"list": []
}
],
"antennaLatitude": 29.8,
"antennaLongitude": 121.6,
"antennaSize": 74,
"input_dev_id": "",
"install_type": "latlong",
"modemBInstallDisplay": 1,
"satelliteIndex": 1,
"satellites": [
{
"name": "Jup-ASIASAT-7-NMSID83-DIV"
},
{
"name": "Jup-APSTAR-5C-NMSID83-DIV"
}
],
"stateInfoReadFlag": 1,
"termLatDegrees": 29,
"termLatHemisphere": 0,
"termLatMinutes": 48,
"termLonDegrees": 121,
"termLonHemisphere": 0,
"termLonMinutes": 36,
"wait[s]": 0
}
$ curl -s http://192.168.0.1/api/install/sbc_stateCode
{
"language_index": 0,
"severity": "no_error",
"state_code": "0.0.0"
}
$ curl -s http://192.168.0.1/api/install/sbc_internal_state
{
"state": 8
}
$ curl -s http://192.168.0.1/api/install/install_page
{
"page": "install done",
"state": 5
}
$ curl -s http://192.168.0.1/api/home/status/association
{
"assoc_statecode_index": 0,
"associated": true,
"association_state": "associated",
"association_state_code": "0.0.0",
"association_state_code_severity": "no_error",
"association_state_color": "good",
"association_time": 1741166356,
"cmm_timeouts": 0,
"fap_state_code": "0.0.0",
"fap_state_code_severity": "no_error",
"fap_statecode_index": 0,
"ipgw_id": "JUPGW104DITIGW0102",
"ka_timeouts": 0,
"rohc_profile": "RTP-V2 UDP-V2 TCP-V2 PBP ",
"walled_garden": false
}
$ curl -s http://192.168.0.1/api/install/get_odu_ref_voltage
{
"ref_voltage": "ON"
}
$ curl -s http://192.168.0.1/api/install/start_range
{
"ranging": true
}
$ curl -s http://192.168.0.1/api/system/terminal_info
{
"FactorySerNum": "CFAHBX742P",
"MotherBoardPN": "1506023-0118",
"active_cores": 4,
"bld_year": 2021,
"board_type": "HT2500",
"code": "Not Available",
"esn": 14708708,
"fallback": false,
"fallback_version": "7.4.0.32",
"memory_free_kb": 1448340,
"memory_total_kb": 1805032,
"nsp_display_name": "DIV",
"sai": 26071,
"san": "YF30TEST001",
"sdl_wifi_sw_version": "",
"state_code": "0.0.0",
"strapping_value": "0xd1",
"timestamp": "2025-03-05T09:42:07Z",
"uptime": "0.00:30:57",
"version": "7.4.0.43",
"wifi_module_sw_version": ""
}
$ curl -s http://192.168.0.1/api/install/terminal_type
{
"type": 0
}
$ curl -s http://192.168.0.1/api/install/antenna_size
{
"antennaSize": 74
}
$ curl -s http://192.168.0.1/api/home/status/aeroBeamSwitch
{
"beatRxLO": "10600.0000",
"beatTxLO": "12800.0000",
"inrtBW": "17.3540",
"inrtFreq": "1670.8330",
"mobilityInstall": 1,
"ortBW": "51.0000",
"ortFreq": "1937.5000",
"polarityRx": "H",
"polarityTx": "V",
"rxLock": "1",
"satLong": "138.00",
"txEnable": "1"
}
$ curl -s http://192.168.0.1/api/install/reg_state
{
"state": 3
}
$ curl -s http://192.168.0.1/api/install/reg_requests
{
"reg_requests_sent": 1
}
$ curl -s http://192.168.0.1/api/install/ranging
{
"good_bursts_num": 30,
"lastAvgEsNo": 4.7,
"power_adjust_num": 9,
"range_rate": "(O)QPSK 2048K 1/2"
}
$ curl -s http://192.168.0.1/api/install/nsp_links
[
{
"bus_cid_name": "SAN",
"bus_cid_val": "YF30TEST001",
"link_name": "",
"link_url": ""
},
{
"bus_cid_name": "SAN",
"bus_cid_val": "YF30TEST001",
"link_name": "",
"link_url": ""
}
]

========= End

浙公网安备 33010602011771号