From 01ae91aa642cc9457875e64e67ed558d121d813b Mon Sep 17 00:00:00 2001
From: liuhaonan <31457034@qq.com>
Date: 星期三, 23 十一月 2022 16:08:02 +0800
Subject: [PATCH] changes
---
ximon-admin/src/main/java/com/sandu/ximon/admin/newnova/utils/Test.java | 376 ++++++++++++++++++++++++++--------------------------
1 files changed, 188 insertions(+), 188 deletions(-)
diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/newnova/utils/Test.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/newnova/utils/Test.java
index 4b89188..03c03f1 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/newnova/utils/Test.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/newnova/utils/Test.java
@@ -1,188 +1,188 @@
-package com.sandu.ximon.admin.newnova.utils;
-
-import com.sun.jna.Native;
-/*
-* 浣跨敤鍓嶉槄璇�:
-* 1 鍏充簬鍙兘鍙戠敓鐨勬悳绱笉鍒癟鍗$殑鍘熷洜锛�
-* 1.1. 鎵撳紑浜唀xpress锛屽鑷磚dp绔彛琚崰鐢紝璇峰叧闂璭xpress杞欢鍚庨噸璇�
-* 1.2. SDK鍜孴鍗′笉鍦ㄥ悓涓�涓眬鍩熺綉锛屽彲浠ュ皾璇曟寚瀹歩p鎼滅储锛屼娇鐢ㄦ柟娉曡锛歨ttps://docapi.vnnox.com/web/#/7?page_id=609
-
-* 2 鍏充簬浣跨敤sdk鍔ㄦ�佸簱鍙兘鍑虹幇鐨勯棶棰樺強瑙e喅鏂规硶锛�
-*
-* 2.1. 鍦╨inux涓嬪鏋滃嚭鐜發ib***.so file too short ,杩欑閿欒锛屾湁鍙兘鏄蒋杩炴帴澶辨晥锛屽彲浠ュ皾璇曞垹闄ゅ師鏈夋枃浠讹紝灏濊瘯 ln -s 閲嶆柊鐢熸垚杞繛鎺ャ�傛瘮濡傦細 ./libcurl.so: file too short锛岄鍏� rm libcurl.so锛岀劧鍚巐n -s libcurl.so.4.3.0 libcurl.so鍗冲彲銆�
-* 2.2. 閽堝java椤圭洰锛屼娇鐢↗NA鍔犺浇so搴撴椂锛岃浣跨敤缁濆璺緞銆傛瘮濡傦細
-* //winodws
-* ViplexCore instance = (ViplexCore) Native.loadLibrary("D:\\ViplexCore3.3.0.01_x64\\bin\\viplexcore.dll",ViplexCore.class);
-* //鎴栬�� linux
-* ViplexCore instance = (ViplexCore) Native.loadLibrary("home/user/desktop/ViplexCore_3.3.0.01_CentOS/bin/libviplexcore.so",ViplexCore.class);
-*
-* 2.3. 閽堝java椤圭洰锛屽鏋滆浣跨敤鐩稿璺緞锛岃灏唖dk鍔ㄦ�佸簱璺緞娣诲姞鍒癱lasspath鐜鍙橀噺锛屾湁涓嬮潰鍑犵鏂规硶锛堜篃鍙互鎼滅储鐩稿叧鏁欑▼娣诲姞锛夛紝渚嬪锛�
-* 2.3.1. 鍛戒护琛屼娇鐢細 javac -cp "C:\Users\HiWin10\Downloads\ViplexCore3.3.0.01_x64\bin" (璇﹁SDK demo/java/涓媟unDemo.sh鎴栬�卹unDemo.bat鏂囦欢)
-* 2.3.2. 瀵煎叆鐜鍙橀噺锛屽锛� export CLASSPATH=$CLASSPATH:home/user/ViplexCore3.3.0.01_x64/
-* 2.3.3. 閽堝springboot椤圭洰锛� java -Xbootclasspath/a:/home/nova/novasdk/
-* */
-public class Test {
- static Boolean g_bAPIReturn = false;
- static Boolean g_snConnectFlag = false;
- static int g_code = 0;
- static String g_sn = "BZSA07194A0049999597"; //BZSA07313J0350000997
-
- static void waitAPIReturn() throws InterruptedException
- {
- while (!g_bAPIReturn)
- {
- Thread.sleep(1000);
- }
- g_bAPIReturn = false;
- }
-
- static void testApi() throws InterruptedException
- {
- System.setProperty("jna.encoding", "UTF-8");
- ViplexCore instance = (ViplexCore) Native.loadLibrary("viplexcore",ViplexCore.class);
- //褰撻渶瑕侀泦鎴愬埌椤圭洰涓椂锛岃淇敼涓婇潰鍔犺浇搴撶殑浣嶇疆涓轰綘涓嬭浇鐨剆dk搴撶殑缁濆璺緞锛寃indows涓嬪锛�
- //ViplexCore instance = (ViplexCore) Native.loadLibrary("D:\\ViplexCore3.3.0.01_x64\\bin\\viplexcore.dll",ViplexCore.class);
-
- //褰撻渶瑕侀泦鎴愬埌椤圭洰涓椂锛岃淇敼姝ゅ鍔犺浇搴撶殑浣嶇疆涓轰綘涓嬭浇鐨剆dk搴撶殑缁濆璺緞锛宭inux涓嬪锛�
- //ViplexCore instance = (ViplexCore) Native.loadLibrary("home/user/desktop/ViplexCore_3.3.0.01_CentOS/bin/libviplexcore.so",ViplexCore.class);
- ViplexCore.CallBack callBack = new ViplexCore.CallBack() {
-
- @Override
- public void dataCallBack(int code, String data) {
- // TODO Auto-generated method stub
- g_code = code;
- String strCode = "\nViplexCore Demo code:" + code;
- String strData = "\nViplexCore Demo data:" + data;
- System.out.println(strCode);
- System.out.println(strData);
- g_bAPIReturn=true;
- }
-
- };
- ViplexCore.CallBack callBack2 = new ViplexCore.CallBack() {
-
- @Override
- public void dataCallBack(int code, String data) {
- // TODO Auto-generated method stub
- g_code = code;
- String strCode = "\nViplexCore Demo code:" + code;
- String strData = "\nViplexCore Demo data:" + data;
- System.out.println(strCode);
- System.out.println(strData);
-
- if(data.contains(g_sn))
- {
- g_snConnectFlag=true;
- }
- }
-
- };
-
- String rootDir = System.getProperty("user.dir") + "/temp";
- rootDir = rootDir.replaceAll( "\\\\","/");
- String createProgram = "{\"name\":\"Demo\",\"width\":500,\"height\":500,\"tplID\":1,\"winInfo\":{\"height\":100,\"width\":100,\"left\":0,\"top\":0,\"zindex\":0,\"index\":0}}";
- String editProgram = "{\"programID\":1,\"pageID\":1,\"pageInfo\":{\"name\":\"鑺傜洰\",\"widgetContainers\":[{\"audioGroup\":\"\",\"backgroundColor\":\"#00000000\",\"backgroundDrawable\":\"\",\"contents\":{\"widgetGroups\":[],\"widgets\":[{\"id\":1,\"enable\":true,\"repeatCount\":1,\"layout\":{\"y\":\"0\",\"height\":\"100%\",\"x\":\"0\",\"width\":\"100%\"},\"backgroundColor\":\"#00000000\",\"backgroundDrawable\":\"\",\"backgroundMusic\":\"\",\"zOrder\":0,\"displayRatio\":\"FULL\",\"outAnimation\":{\"type\":0,\"duration\":0},\"dataSource\":\"62ea7e60c493c1f860ae256eef8ec89c.png\",\"type\":\"PICTURE\",\"constraints\":[{\"cron\":[],\"endTime\":\"4017-12-30T23:59:59Z+8:00\",\"startTime\":\"1970-01-01T00:00:00Z+8:00\"}],\"border\":{\"borderThickness\":\"2px,3px,5%,6\",\"style\":0,\"backgroundColor\":\"#ff000000\",\"name\":\"border\",\"cornerRadius\":\"2%\",\"effects\":{\"headTailSpacing\":\"\",\"isHeadTail\":false,\"speedByPixelEnable\":true,\"speed\":0,\"animation\":\"CLOCK_WISE\"}},\"inAnimation\":{\"type\":0,\"duration\":1000},\"duration\":3605000,\"name\":\"test.png\",\"originalDataSource\":\"./test.png\",\"functionStorage\":\"\",\"isSupportSpecialEffects\":false}]},\"enable\":true,\"id\":1,\"itemsSource\":\"\",\"layout\":{\"height\":\"1.0\",\"width\":\"1.0\",\"x\":\"0.0\",\"y\":\"0.0\"},\"name\":\"widgetContainers1\",\"pickCount\":0,\"pickPolicy\":\"ORDER\",\"zOrder\":0}]}}";
- String genrateProgram = String.format(
- "{\"programID\":1,\"outPutPath\":\"%s/\",\"mediasPath\":[{\"oldPath\":\"test\",\"newPath\":\"test\"}]}",
- rootDir);
- String trasfromProgram = String.format(
- "{\"sn\": \"%s\",\"iconPath\": \"\",\"iconName\": \"\",\"sendProgramFilePaths\": {\"programPath\": \"%s/program1\",\"mediasPath\": {\"./test.png\": \"test.png\"}},\"programName\": \"program1\",\"deviceIdentifier\": \"Demo\",\"startPlayAfterTransferred\": true,\"insertPlay\": true}",
- g_sn,
- rootDir);
-
-
- Boolean bTestVideo = false;
- if (bTestVideo)
- {
- editProgram = "{\"programID\":1,\"pageID\":1,\"pageInfo\":{\"name\":\"Demo\",\"widgetContainers\":[{\"contents\":{\"widgets\":[{\"constraints\":[{\"cron\":[\"0 0 0 ? * 1,2,3,4,5,6,7\"],\"endTime\":\"4017-12-30T23:59:59Z 8:00\",\"startTime\":\"1970-01-01T00:00:00Z 8:00\"}],\"duration\":5000,\"dataSource\":\"219c7dd3260d6bf98ebf61b6da440ffd.avi\",\"type\":\"VIDEO\",\"name\":\"test.vai\",\"originalDataSource\":\"./test.avi\"}]},\"id\":1,\"name\":\"widgetContainers1\"}]}}";
-
- trasfromProgram = String.format(
- "{\"sn\":\"%s\",\"iconPath\": \"\",\"iconName\": \"\",\"sendProgramFilePaths\": {\"programPath\": \"%s/program1\",\"mediasPath\": {\"./test.avi\": \"test.avi\"}},\"programName\": \"program1\",\"deviceIdentifier\": \"Demo\",\"startPlayAfterTransferred\": true,\"insertPlay\": true}",
- g_sn,
- rootDir);
- }
-
-
-
-
-
-
-
- Boolean testText = false;
- if (testText) {
- editProgram = "{\"programID\":1,\"pageID\":1,\"pageInfo\":{\"name\":\"jiemu\",\"widgetContainers\":[{\"contents\":{\"widgets\":[{\"constraints\":[{\"cron\":[\"0 0 0 ? * 1,2,3,4,5,6,7\"],\"endTime\":\"4017-12-30T23:59:59Z+8:00\",\"startTime\":\"1970-01-01T00:00:00Z+8:00\"}],\"duration\":5000,\"metadata\":{\"content\":{\"autoPaging\":true,\"backgroundMusic\":{\"duration\":0,\"isTextSync\":false},\"displayStyle\":{\"scrollAttributes\":{\"effects\":{\"animation\":\"MARQUEE_LEFT\",\"speed\":3}},\"type\":\"SCROLL\"},\"paragraphs\":[{\"backgroundColor\":\"#00000000\",\"horizontalAlignment\":\"CENTER\",\"letterSpacing\":0,\"lineSpacing\":0,\"lines\":[{\"segs\":[{\"content\":\"绠�浣撶箒楂旀棩鏈獮頃滉淡鞏�.English123\"}]}],\"verticalAlignment\":\"CENTER\"}],\"textAttributes\":[{\"backgroundColor\":\"#ff000000\",\"attributes\":{\"font\":{\"family\":[\"Arial\"],\"isUnderline\":false,\"size\":20,\"style\":\"NORMAL\"},\"letterSpacing\":0,\"textColor\":\"#ffff0000\"}}]}},\"name\":\"text\",\"type\":\"ARCH_TEXT\"}]},\"id\":1,\"name\":\"widgetContainers1\"}]}}";
- trasfromProgram = String.format(
- "{\"sn\": \"%s\",\"iconPath\": \"\",\"iconName\": \"\",\"sendProgramFilePaths\": {\"programPath\": \"%s/program1\",\"mediasPath\": {}},\"programName\": \"program1\",\"deviceIdentifier\": \"Demo\",\"startPlayAfterTransferred\": true,\"insertPlay\": true}",
- g_sn,
- rootDir);
- }
-
- String companyInfo = "{\"company\":\"NovaStar\",\"phone\":\"029-68216000\",\"email\":\"hr@novastar.tech\"}";
- instance.nvSetDevLang("Java");
- System.out.println("nvInit(sdk 鍒濆鍖�):");
- System.out.println(instance.nvInit(rootDir,companyInfo));
-
- g_bAPIReturn = false;
- String publicNetInfo = "{\"publicModule\":true,\"encrypt\":true,\"certificatePath\":\"E:/cert\",\"port\":12345,\"httpserverUrl\":\"http://10.10.10.114:18081/file/\",\"httpserverLocalPath\":\"F:/file\"}";
- System.out.println("ViplexCore Demo nvInitPublicNetAsync(鍏綉鍒濆鍖�) begin... ");
- instance.nvInitPublicNetAsync(publicNetInfo,callBack,callBack);
- waitAPIReturn();
-
- while (!g_snConnectFlag)
- {
- instance.nvGetOnlineDevicesAsync(callBack2);
- Thread.sleep(2000);
- }
-
- System.out.println("ViplexCore Demo nvLoginAsync(鐧诲綍) begin... ");
- String loginParam = String.format("{\"sn\":\"%s\",\"username\":\"admin\",\"rememberPwd\":1,\"password\":\"123456\",\"loginType\":5}"
- , g_sn);
- instance.nvLoginAsync(loginParam, callBack);
- waitAPIReturn();
- if (g_code != 0) {
- System.out.println("ViplexCore Demo nvLoginAsync(鐧诲綍) 澶辫触锛�");
- return;
- }
- System.out.println("ViplexCore Demo nvCreateProgramAsync(鍒涘缓鑺傜洰) begin... ");
- instance.nvCreateProgramAsync(createProgram, callBack);
- waitAPIReturn();
-
-
- String requestDatapath = "{\"filePath\":\"./test.png\"}";
- System.out.println("ViplexCore Demo nvGetFileMD5Async(鑾峰彇MD5) begin... ");
- instance.nvGetFileMD5Async(requestDatapath, callBack);
- waitAPIReturn();
-
- System.out.println("ViplexCore Demo nvSetPageProgramAsync(缂栬緫鑺傜洰) begin... ");
- instance.nvSetPageProgramAsync(editProgram, callBack);
- waitAPIReturn();
-
- System.out.println("ViplexCore Demo nvMakeProgramAsync(鐢熸垚鑺傜洰) begin... ");
- instance.nvMakeProgramAsync(genrateProgram, callBack);
- waitAPIReturn();
-
- System.out.println("ViplexCore Demo nvStartTransferProgramAsync(鍙戦�佽妭鐩�) begin... ");
- instance.nvStartTransferProgramAsync(trasfromProgram, callBack);
- Thread.sleep(10000);
- g_bAPIReturn = false;
-
- System.out.println("ViplexCore Demo nvGetProgramInfoAsync(鑾峰彇鑺傜洰淇℃伅) begin... ");
- String requestDatasn = String.format("{\"sn\":\"%s\"}", g_sn);
- instance.nvGetProgramInfoAsync(requestDatasn, callBack);
- waitAPIReturn();
-
- System.out.println("ViplexCore Demo nvSetVolumeAsync(璁剧疆闊抽噺) begin... ");
- String setVolumeParam = String.format("{\"sn\":\"%s\",\"volumeInfo\":{\"ratio\":60.0}}", g_sn);
- instance.nvSetVolumeAsync(setVolumeParam, callBack);
- waitAPIReturn();
-
- System.out.println("ViplexCore Demo nvGetVolumeAsync(鑾峰彇闊抽噺) begin... ");
- String getVolumeParam = String.format("{\"sn\":\"%s\"}", g_sn);
- instance.nvGetVolumeAsync(getVolumeParam, callBack);
- waitAPIReturn();
- }
-
- public static void main(String[] args) throws InterruptedException{
- testApi();
- }
-}
+//package com.sandu.ximon.admin.newnova.utils;
+//
+//import com.sun.jna.Native;
+///*
+//* 浣跨敤鍓嶉槄璇�:
+//* 1 鍏充簬鍙兘鍙戠敓鐨勬悳绱笉鍒癟鍗$殑鍘熷洜锛�
+//* 1.1. 鎵撳紑浜唀xpress锛屽鑷磚dp绔彛琚崰鐢紝璇峰叧闂璭xpress杞欢鍚庨噸璇�
+//* 1.2. SDK鍜孴鍗′笉鍦ㄥ悓涓�涓眬鍩熺綉锛屽彲浠ュ皾璇曟寚瀹歩p鎼滅储锛屼娇鐢ㄦ柟娉曡锛歨ttps://docapi.vnnox.com/web/#/7?page_id=609
+//
+//* 2 鍏充簬浣跨敤sdk鍔ㄦ�佸簱鍙兘鍑虹幇鐨勯棶棰樺強瑙e喅鏂规硶锛�
+//*
+//* 2.1. 鍦╨inux涓嬪鏋滃嚭鐜發ib***.so file too short ,杩欑閿欒锛屾湁鍙兘鏄蒋杩炴帴澶辨晥锛屽彲浠ュ皾璇曞垹闄ゅ師鏈夋枃浠讹紝灏濊瘯 ln -s 閲嶆柊鐢熸垚杞繛鎺ャ�傛瘮濡傦細 ./libcurl.so: file too short锛岄鍏� rm libcurl.so锛岀劧鍚巐n -s libcurl.so.4.3.0 libcurl.so鍗冲彲銆�
+//* 2.2. 閽堝java椤圭洰锛屼娇鐢↗NA鍔犺浇so搴撴椂锛岃浣跨敤缁濆璺緞銆傛瘮濡傦細
+//* //winodws
+//* ViplexCore instance = (ViplexCore) Native.loadLibrary("D:\\ViplexCore3.3.0.01_x64\\bin\\viplexcore.dll",ViplexCore.class);
+//* //鎴栬�� linux
+//* ViplexCore instance = (ViplexCore) Native.loadLibrary("home/user/desktop/ViplexCore_3.3.0.01_CentOS/bin/libviplexcore.so",ViplexCore.class);
+//*
+//* 2.3. 閽堝java椤圭洰锛屽鏋滆浣跨敤鐩稿璺緞锛岃灏唖dk鍔ㄦ�佸簱璺緞娣诲姞鍒癱lasspath鐜鍙橀噺锛屾湁涓嬮潰鍑犵鏂规硶锛堜篃鍙互鎼滅储鐩稿叧鏁欑▼娣诲姞锛夛紝渚嬪锛�
+//* 2.3.1. 鍛戒护琛屼娇鐢細 javac -cp "C:\Users\HiWin10\Downloads\ViplexCore3.3.0.01_x64\bin" (璇﹁SDK demo/java/涓媟unDemo.sh鎴栬�卹unDemo.bat鏂囦欢)
+//* 2.3.2. 瀵煎叆鐜鍙橀噺锛屽锛� export CLASSPATH=$CLASSPATH:home/user/ViplexCore3.3.0.01_x64/
+//* 2.3.3. 閽堝springboot椤圭洰锛� java -Xbootclasspath/a:/home/nova/novasdk/
+//* */
+//public class Test {
+// static Boolean g_bAPIReturn = false;
+// static Boolean g_snConnectFlag = false;
+// static int g_code = 0;
+// static String g_sn = "BZSA07194A0049999597"; //BZSA07313J0350000997
+//
+// static void waitAPIReturn() throws InterruptedException
+// {
+// while (!g_bAPIReturn)
+// {
+// Thread.sleep(1000);
+// }
+// g_bAPIReturn = false;
+// }
+//
+// static void testApi() throws InterruptedException
+// {
+// System.setProperty("jna.encoding", "UTF-8");
+// ViplexCore instance = (ViplexCore) Native.loadLibrary("viplexcore",ViplexCore.class);
+// //褰撻渶瑕侀泦鎴愬埌椤圭洰涓椂锛岃淇敼涓婇潰鍔犺浇搴撶殑浣嶇疆涓轰綘涓嬭浇鐨剆dk搴撶殑缁濆璺緞锛寃indows涓嬪锛�
+// //ViplexCore instance = (ViplexCore) Native.loadLibrary("D:\\ViplexCore3.3.0.01_x64\\bin\\viplexcore.dll",ViplexCore.class);
+//
+// //褰撻渶瑕侀泦鎴愬埌椤圭洰涓椂锛岃淇敼姝ゅ鍔犺浇搴撶殑浣嶇疆涓轰綘涓嬭浇鐨剆dk搴撶殑缁濆璺緞锛宭inux涓嬪锛�
+// //ViplexCore instance = (ViplexCore) Native.loadLibrary("home/user/desktop/ViplexCore_3.3.0.01_CentOS/bin/libviplexcore.so",ViplexCore.class);
+// ViplexCore.CallBack callBack = new ViplexCore.CallBack() {
+//
+// @Override
+// public void dataCallBack(int code, String data) {
+// // TODO Auto-generated method stub
+// g_code = code;
+// String strCode = "\nViplexCore Demo code:" + code;
+// String strData = "\nViplexCore Demo data:" + data;
+// System.out.println(strCode);
+// System.out.println(strData);
+// g_bAPIReturn=true;
+// }
+//
+// };
+// ViplexCore.CallBack callBack2 = new ViplexCore.CallBack() {
+//
+// @Override
+// public void dataCallBack(int code, String data) {
+// // TODO Auto-generated method stub
+// g_code = code;
+// String strCode = "\nViplexCore Demo code:" + code;
+// String strData = "\nViplexCore Demo data:" + data;
+// System.out.println(strCode);
+// System.out.println(strData);
+//
+// if(data.contains(g_sn))
+// {
+// g_snConnectFlag=true;
+// }
+// }
+//
+// };
+//
+// String rootDir = System.getProperty("user.dir") + "/temp";
+// rootDir = rootDir.replaceAll( "\\\\","/");
+// String createProgram = "{\"name\":\"Demo\",\"width\":500,\"height\":500,\"tplID\":1,\"winInfo\":{\"height\":100,\"width\":100,\"left\":0,\"top\":0,\"zindex\":0,\"index\":0}}";
+// String editProgram = "{\"programID\":1,\"pageID\":1,\"pageInfo\":{\"name\":\"鑺傜洰\",\"widgetContainers\":[{\"audioGroup\":\"\",\"backgroundColor\":\"#00000000\",\"backgroundDrawable\":\"\",\"contents\":{\"widgetGroups\":[],\"widgets\":[{\"id\":1,\"enable\":true,\"repeatCount\":1,\"layout\":{\"y\":\"0\",\"height\":\"100%\",\"x\":\"0\",\"width\":\"100%\"},\"backgroundColor\":\"#00000000\",\"backgroundDrawable\":\"\",\"backgroundMusic\":\"\",\"zOrder\":0,\"displayRatio\":\"FULL\",\"outAnimation\":{\"type\":0,\"duration\":0},\"dataSource\":\"62ea7e60c493c1f860ae256eef8ec89c.png\",\"type\":\"PICTURE\",\"constraints\":[{\"cron\":[],\"endTime\":\"4017-12-30T23:59:59Z+8:00\",\"startTime\":\"1970-01-01T00:00:00Z+8:00\"}],\"border\":{\"borderThickness\":\"2px,3px,5%,6\",\"style\":0,\"backgroundColor\":\"#ff000000\",\"name\":\"border\",\"cornerRadius\":\"2%\",\"effects\":{\"headTailSpacing\":\"\",\"isHeadTail\":false,\"speedByPixelEnable\":true,\"speed\":0,\"animation\":\"CLOCK_WISE\"}},\"inAnimation\":{\"type\":0,\"duration\":1000},\"duration\":3605000,\"name\":\"test.png\",\"originalDataSource\":\"./test.png\",\"functionStorage\":\"\",\"isSupportSpecialEffects\":false}]},\"enable\":true,\"id\":1,\"itemsSource\":\"\",\"layout\":{\"height\":\"1.0\",\"width\":\"1.0\",\"x\":\"0.0\",\"y\":\"0.0\"},\"name\":\"widgetContainers1\",\"pickCount\":0,\"pickPolicy\":\"ORDER\",\"zOrder\":0}]}}";
+// String genrateProgram = String.format(
+// "{\"programID\":1,\"outPutPath\":\"%s/\",\"mediasPath\":[{\"oldPath\":\"test\",\"newPath\":\"test\"}]}",
+// rootDir);
+// String trasfromProgram = String.format(
+// "{\"sn\": \"%s\",\"iconPath\": \"\",\"iconName\": \"\",\"sendProgramFilePaths\": {\"programPath\": \"%s/program1\",\"mediasPath\": {\"./test.png\": \"test.png\"}},\"programName\": \"program1\",\"deviceIdentifier\": \"Demo\",\"startPlayAfterTransferred\": true,\"insertPlay\": true}",
+// g_sn,
+// rootDir);
+//
+//
+// Boolean bTestVideo = false;
+// if (bTestVideo)
+// {
+// editProgram = "{\"programID\":1,\"pageID\":1,\"pageInfo\":{\"name\":\"Demo\",\"widgetContainers\":[{\"contents\":{\"widgets\":[{\"constraints\":[{\"cron\":[\"0 0 0 ? * 1,2,3,4,5,6,7\"],\"endTime\":\"4017-12-30T23:59:59Z 8:00\",\"startTime\":\"1970-01-01T00:00:00Z 8:00\"}],\"duration\":5000,\"dataSource\":\"219c7dd3260d6bf98ebf61b6da440ffd.avi\",\"type\":\"VIDEO\",\"name\":\"test.vai\",\"originalDataSource\":\"./test.avi\"}]},\"id\":1,\"name\":\"widgetContainers1\"}]}}";
+//
+// trasfromProgram = String.format(
+// "{\"sn\":\"%s\",\"iconPath\": \"\",\"iconName\": \"\",\"sendProgramFilePaths\": {\"programPath\": \"%s/program1\",\"mediasPath\": {\"./test.avi\": \"test.avi\"}},\"programName\": \"program1\",\"deviceIdentifier\": \"Demo\",\"startPlayAfterTransferred\": true,\"insertPlay\": true}",
+// g_sn,
+// rootDir);
+// }
+//
+//
+//
+//
+//
+//
+//
+// Boolean testText = false;
+// if (testText) {
+// editProgram = "{\"programID\":1,\"pageID\":1,\"pageInfo\":{\"name\":\"jiemu\",\"widgetContainers\":[{\"contents\":{\"widgets\":[{\"constraints\":[{\"cron\":[\"0 0 0 ? * 1,2,3,4,5,6,7\"],\"endTime\":\"4017-12-30T23:59:59Z+8:00\",\"startTime\":\"1970-01-01T00:00:00Z+8:00\"}],\"duration\":5000,\"metadata\":{\"content\":{\"autoPaging\":true,\"backgroundMusic\":{\"duration\":0,\"isTextSync\":false},\"displayStyle\":{\"scrollAttributes\":{\"effects\":{\"animation\":\"MARQUEE_LEFT\",\"speed\":3}},\"type\":\"SCROLL\"},\"paragraphs\":[{\"backgroundColor\":\"#00000000\",\"horizontalAlignment\":\"CENTER\",\"letterSpacing\":0,\"lineSpacing\":0,\"lines\":[{\"segs\":[{\"content\":\"绠�浣撶箒楂旀棩鏈獮頃滉淡鞏�.English123\"}]}],\"verticalAlignment\":\"CENTER\"}],\"textAttributes\":[{\"backgroundColor\":\"#ff000000\",\"attributes\":{\"font\":{\"family\":[\"Arial\"],\"isUnderline\":false,\"size\":20,\"style\":\"NORMAL\"},\"letterSpacing\":0,\"textColor\":\"#ffff0000\"}}]}},\"name\":\"text\",\"type\":\"ARCH_TEXT\"}]},\"id\":1,\"name\":\"widgetContainers1\"}]}}";
+// trasfromProgram = String.format(
+// "{\"sn\": \"%s\",\"iconPath\": \"\",\"iconName\": \"\",\"sendProgramFilePaths\": {\"programPath\": \"%s/program1\",\"mediasPath\": {}},\"programName\": \"program1\",\"deviceIdentifier\": \"Demo\",\"startPlayAfterTransferred\": true,\"insertPlay\": true}",
+// g_sn,
+// rootDir);
+// }
+//
+// String companyInfo = "{\"company\":\"NovaStar\",\"phone\":\"029-68216000\",\"email\":\"hr@novastar.tech\"}";
+// instance.nvSetDevLang("Java");
+// System.out.println("nvInit(sdk 鍒濆鍖�):");
+// System.out.println(instance.nvInit(rootDir,companyInfo));
+//
+// g_bAPIReturn = false;
+// String publicNetInfo = "{\"publicModule\":true,\"encrypt\":true,\"certificatePath\":\"E:/cert\",\"port\":12345,\"httpserverUrl\":\"http://10.10.10.114:18081/file/\",\"httpserverLocalPath\":\"F:/file\"}";
+// System.out.println("ViplexCore Demo nvInitPublicNetAsync(鍏綉鍒濆鍖�) begin... ");
+// instance.nvInitPublicNetAsync(publicNetInfo,callBack,callBack);
+// waitAPIReturn();
+//
+// while (!g_snConnectFlag)
+// {
+// instance.nvGetOnlineDevicesAsync(callBack2);
+// Thread.sleep(2000);
+// }
+//
+// System.out.println("ViplexCore Demo nvLoginAsync(鐧诲綍) begin... ");
+// String loginParam = String.format("{\"sn\":\"%s\",\"username\":\"admin\",\"rememberPwd\":1,\"password\":\"123456\",\"loginType\":5}"
+// , g_sn);
+// instance.nvLoginAsync(loginParam, callBack);
+// waitAPIReturn();
+// if (g_code != 0) {
+// System.out.println("ViplexCore Demo nvLoginAsync(鐧诲綍) 澶辫触锛�");
+// return;
+// }
+// System.out.println("ViplexCore Demo nvCreateProgramAsync(鍒涘缓鑺傜洰) begin... ");
+// instance.nvCreateProgramAsync(createProgram, callBack);
+// waitAPIReturn();
+//
+//
+// String requestDatapath = "{\"filePath\":\"./test.png\"}";
+// System.out.println("ViplexCore Demo nvGetFileMD5Async(鑾峰彇MD5) begin... ");
+// instance.nvGetFileMD5Async(requestDatapath, callBack);
+// waitAPIReturn();
+//
+// System.out.println("ViplexCore Demo nvSetPageProgramAsync(缂栬緫鑺傜洰) begin... ");
+// instance.nvSetPageProgramAsync(editProgram, callBack);
+// waitAPIReturn();
+//
+// System.out.println("ViplexCore Demo nvMakeProgramAsync(鐢熸垚鑺傜洰) begin... ");
+// instance.nvMakeProgramAsync(genrateProgram, callBack);
+// waitAPIReturn();
+//
+// System.out.println("ViplexCore Demo nvStartTransferProgramAsync(鍙戦�佽妭鐩�) begin... ");
+// instance.nvStartTransferProgramAsync(trasfromProgram, callBack);
+// Thread.sleep(10000);
+// g_bAPIReturn = false;
+//
+// System.out.println("ViplexCore Demo nvGetProgramInfoAsync(鑾峰彇鑺傜洰淇℃伅) begin... ");
+// String requestDatasn = String.format("{\"sn\":\"%s\"}", g_sn);
+// instance.nvGetProgramInfoAsync(requestDatasn, callBack);
+// waitAPIReturn();
+//
+// System.out.println("ViplexCore Demo nvSetVolumeAsync(璁剧疆闊抽噺) begin... ");
+// String setVolumeParam = String.format("{\"sn\":\"%s\",\"volumeInfo\":{\"ratio\":60.0}}", g_sn);
+// instance.nvSetVolumeAsync(setVolumeParam, callBack);
+// waitAPIReturn();
+//
+// System.out.println("ViplexCore Demo nvGetVolumeAsync(鑾峰彇闊抽噺) begin... ");
+// String getVolumeParam = String.format("{\"sn\":\"%s\"}", g_sn);
+// instance.nvGetVolumeAsync(getVolumeParam, callBack);
+// waitAPIReturn();
+// }
+//
+// public static void main(String[] args) throws InterruptedException{
+// testApi();
+// }
+//}
--
Gitblit v1.9.3