-
Notifications
You must be signed in to change notification settings - Fork 5
S2 SICS Client_128843981
nxi edited this page Apr 9, 2015
·
1 revision
Created by Tony Lam, last modified on Jul 15, 2010
This paper describe the design of the new SICS adaptor in GumTree, codename S2.
Architecture
Set privilege on the connection
Disconnect from a SICS server (connector can be reconnected later)
Dispose a connector (no more reconnection can be performed)
Send messages on a connected connector
Get SICS client
- Split into 4 tiers:
- I/O (used by any Java client) - org.gumtree.cs.sics.io
- CORE (work under OSGi runtime)- org.gumtree.cs.sics.core
- UI (SWT) - org.gumtree.sics.ui.swt
- workbench (GumTree workbench version) - org.gumtree.sics.ui.workbench
- Use bean convention if possible to support configuration over Spring
- Can be used in pure Java program
- Easily stop and replace channel
- Recover connection error (auto-reconnect)
- Two essential platform level services:
- Sics client and sics event bus
- Service orientated design, with available internal services:
- Connection Manager
- Model Provider
- Component Manager
- Persistence Manager
- Monitor Service
- Batch Buffer Manager
- Check SICS version for compatibility (GUMTREE-22)
- Cooperate with SICS state ID (for discrepancy checking)
- Better support for scripting
- Role support
- Manual / auto reconnection (GUMTREE-327)
- Report and propagate error immediately on failed motor drive
- Swapping component factory
- Customising component factory via Spring
- Remote service support
- ReST support
- Persist all transactions for record and replay
- Dashboard support
- Generative UI? (GUMTREE-47)
- Allow device controller swap in and out
- Use XViewer for sorting and filering (GUMTREE-14)
- Role filtering
ISicsConnector connector = new SicsConnector("test"); IConnectionContext context = ConnectionContext.createContext(HOST, PORT, "spy", PASSWORD); connector.setConnectionContext(context); connector.connect();
connector.setRights(SicsRole.SPY, PASSWORD);
connector.disconnect();
connector.dispose();
// Synchronous send (get user id) ISicsResponse[] responses = connector.syncRequest("user"); // Synchronous send (set user id) connector.syncRequest("user me"); // Asynchronous send (get user id) connector.asyncRequest("user", new SicsRequestCallback() { public void receiveReply(ISicsResponse response) { responseText[0] = response.getDataString(); setCallbackCompleted(true); } });
// From facade: ISicsClient sicsClient = SicsCore.getSicsClient() // Or directly from the service registry sicsClient = GTPlatform.getService(ISicsClient.class)
Document generated by Confluence on Apr 01, 2015 00:11
Home | Developer Guide | Copyright © 2013 ANSTO