26.08.2013 Views

JiST – Java in Simulation Time - Evernote

JiST – Java in Simulation Time - Evernote

JiST – Java in Simulation Time - Evernote

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

jist api<br />

• JistAPI class is the <strong>JiST</strong> kernel system call <strong>in</strong>terface<br />

• permits standard <strong>Java</strong> compilation and execution<br />

<strong>JiST</strong> <strong>–</strong> <strong>Java</strong> <strong>in</strong> <strong>Simulation</strong> <strong>Time</strong><br />

// used <strong>in</strong> hello example<br />

<strong>in</strong>terface Entity - tag object as entity<br />

long get<strong>Time</strong>() - return simulation time<br />

void sleep(long ticks) - advance simulation time<br />

// others, to be <strong>in</strong>troduced shortly<br />

<strong>in</strong>terface <strong>Time</strong>less - tag object as timeless<br />

<strong>in</strong>terface Proxiable - tag object as proxiable<br />

Entity proxy(target, <strong>in</strong>tface) - create proxy entity<br />

class Cont<strong>in</strong>uation ext. Error <strong>–</strong> tag method as block<strong>in</strong>g<br />

void run(type,name,args,...) - run program or script<br />

void runAt(Runnable r) - schedule procedure<br />

void endAt(long time) - end simulation<br />

Channel createChannel() - sim. time CSP Channel<br />

void <strong>in</strong>stallRewrite(rewriter) <strong>–</strong> <strong>in</strong>stall transformation<br />

EntityRef THIS - this entity reference<br />

EntityRef ref(Entity e) - get entity reference<br />

// ... and few more<br />

*<br />

10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!