The following are schematic descriptions - for more complete descriptions, see
Create a Packet: value = dfscrep(proc_anchor, &ptr, size, type); Define ports: value = dfsdfpt(proc_anchor, port_count, port_tab); Receive an IP: value = dfsrecv(proc_anchor, &ptr, &port_tab[port_no], elem_no, &size, &type); Send an IP: value = dfssend(proc_anchor, &ptr, &port_tab[port_no], elem_no); Drop an IP: value = dfsdrop(proc_anchor, &ptr); Pop an IP off the stack: value = dfspop(proc_anchor, &ptr, &size, &type); Push an IP onto the stack: value = dfspush(proc_anchor, &ptr); Close a port element: value = dfsclos(proc_anchor, &port_tab[port_no], elem_no);
(Very schematic outline, showing just the most important functions)
Packet class: /** * A Packet may either contain an Object, when type is NORMAL, * or a String, when type is not NORMAL. The latter case * is used for things like open and close brackets (where the * String will be the name of a group. e.g. accounts) **/ Object getAttribute(String key); /* key accesses a specific attribute */ Object getContent(); /* returns null if type <> NORMAL */ Component class: /** * All verbs must extend this class, defining its two abstract methods: * openPorts, and execute. **/ Packet p = create(String s); drop(Packet p); // Note this change! longWaitStart(double interval); // in seconds longWaitEnd(); // 3 stack methods - as of JavaFBP-2.3 push (Packet p); Packet p = pop(); // return null if empty int stackSize(); InputPort class: Packet = receive(); void close(); OutputPort class: boolean send(Packet packet); void close();
(Very schematic outline)
Packet class: /** * A Packet may either contain an Object, when type is NORMAL, * or a String, when type is not NORMAL. The latter case * is used for things like open and close brackets (where the * String will be the name of a group. e.g. accounts) **/ Drop(Packet p); Object Attributes; /* returns a Dictionary */ Object Content; /* returns null if type not NORMAL */ Component class: /** * All verbs must extend this class, defining its three abstract methods: * OpenPorts, Introspect, and Execute. **/ Packet p = Create(String s); InputPort class: Packet = Receive(); void Close(); OutputPort class: void Send(Packet packet); void Close();