Code:
package com.irex.sdk;
import java.io.PrintStream;
// Referenced classes of package com.irex.sdk:
// ErIpcServer, DisplayUpdate, Log, ErToolBar,
// ErPageBar, ErBusy, ErDisplayClient
public class SDKTest
{
public SDKTest()
{
}
public static void main(String args[])
{
System.out.println("start testing ipcserver");
ErIpcServer eripcserver = ErIpcServer.getInstanceByChannelId(10, null);
if(eripcserver == null)
return;
System.out.println("will start ipcserver");
eripcserver.startServer();
System.out.println("sleep 25 seconds");
try
{
Thread.currentThread();
Thread.sleep(10000L);
}
catch(InterruptedException interruptedexception)
{
interruptedexception.printStackTrace();
}
System.out.println("will stop ipcserver");
eripcserver.shutdownServer();
System.out.println("finish testing ipcserver");
System.out.println("starting test toolbar");
DisplayUpdate displayupdate = DisplayUpdate.getInstance();
if(displayupdate == null)
return;
System.out.println("sleep 10 seconds for prepare");
try
{
Thread.currentThread();
Thread.sleep(15000L);
}
catch(InterruptedException interruptedexception1)
{
interruptedexception1.printStackTrace();
}
Log.logString(" firstly, we test the Log utility");
ErToolBar ertoolbar = ErToolBar.getInstance();
if(ertoolbar == null)
return;
byte byte0 = 103;
ertoolbar.tbDisableUpdate(byte0);
ertoolbar.tbSelectIconSet(byte0);
ertoolbar.tbClearIconSet(byte0);
ertoolbar.appendPlatformIcon(byte0, 1, 6);
ertoolbar.tbSetStatePlatformIcon(byte0, 1, 1);
ertoolbar.appendPlatformIcon(byte0, 2, 6);
ertoolbar.appendPlatformIcon(byte0, 3, 6);
ertoolbar.appendPlatformIcon(byte0, 4, 6);
ertoolbar.tbEnableUpdate(byte0);
DisplayUpdate _tmp = displayupdate;
displayupdate.request_screen_refresh(4, 2);
try
{
Thread.currentThread();
Thread.sleep(10000L);
}
catch(InterruptedException interruptedexception2)
{
interruptedexception2.printStackTrace();
}
ertoolbar.tbRemovePlatformIcon(byte0, 1);
ertoolbar.tbRemovePlatformIcon(byte0, 2);
ertoolbar.tbRemovePlatformIcon(byte0, 3);
System.out.println("toolbar testing finished");
ertoolbar.close();
System.out.println("starting test pagebar");
ErPageBar erpagebar = ErPageBar.getInstance();
if(erpagebar == null)
return;
erpagebar.pbReset(byte0);
erpagebar.pbSetPageCount(byte0, 15);
erpagebar.pbSetCurrentPage(byte0, 11);
erpagebar.pbRedraw(byte0);
DisplayUpdate _tmp1 = displayupdate;
displayupdate.request_screen_refresh(4, 0);
try
{
Thread.currentThread();
Thread.sleep(10000L);
}
catch(InterruptedException interruptedexception3)
{
interruptedexception3.printStackTrace();
}
System.out.println("pagebar testing finished");
erpagebar.close();
System.out.println("starting test busy");
ErBusy erbusy = ErBusy.getInstance();
if(erbusy == null)
return;
erbusy.blink();
System.out.println("sleep 10 seconds");
try
{
Thread.currentThread();
Thread.sleep(10000L);
}
catch(InterruptedException interruptedexception4)
{
interruptedexception4.printStackTrace();
}
erbusy.off();
System.out.println("busy off, testing finished");
erbusy.close();
System.out.println("start testing display manager client");
ErDisplayClient erdisplayclient = ErDisplayClient.getInstance();
if(erdisplayclient == null)
return;
System.out.println("display all");
ErDisplayClient _tmp2 = erdisplayclient;
erdisplayclient.display(1, 0);
System.out.println("sleep 10 seconds");
try
{
Thread.currentThread();
Thread.sleep(10000L);
}
catch(InterruptedException interruptedexception5)
{
interruptedexception5.printStackTrace();
}
System.out.println("start erase to white");
erdisplayclient.eraseToWhite(2);
System.out.println("all testing is finishing!");
}
}