42 lines
1.3 KiB
PHP
42 lines
1.3 KiB
PHP
<?php
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
//require_once(get_cfg_var('COMMON_PATH') . "/ditest-php/test_framework.php");
|
|
require_once("../../common/ditest-php/test_framework.php");
|
|
require_once("./config.php");
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
$test = new DiTest("Get dncm modem info", 1);
|
|
$test->goal("Get dncm:modem and verify properties");
|
|
|
|
$request = array(
|
|
'dinetrpc' => 1,
|
|
'device:uid' => $cfgDeviceUid,
|
|
'req' => 'dncm:modem',
|
|
'id' => 133723129,
|
|
'time' => time() * 1000
|
|
);
|
|
|
|
$reqrep = new RequestSocket($test, $cfgSMPZMQRequestURI);
|
|
$rep = $reqrep->send($request);
|
|
|
|
$test->equal(true, isset($rep['result'][0]));
|
|
|
|
// revision
|
|
$test->equal(true, isset($rep['result'][0]['revision']));
|
|
$test->info("revision: " . $rep['result'][0]['revision']);
|
|
|
|
// iccid
|
|
$test->equal(true, isset($rep['result'][0]['iccid']));
|
|
$test->info(" iccid: " . $rep['result'][0]['iccid']);
|
|
|
|
// imei
|
|
$test->equal(true, isset($rep['result'][0]['imei']));
|
|
$test->info(" imei: " . $rep['result'][0]['imei']);
|
|
|
|
// imsi
|
|
$test->equal(true, isset($rep['result'][0]['imsi']));
|
|
$test->info(" imsi: " . $rep['result'][0]['imsi']);
|
|
|
|
// connection
|
|
$test->equal(true, isset($rep['result'][0]['connection']));
|
|
$test->info("connection: " . $rep['result'][0]['connection']);
|