|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--superwaba.ext.xplat.io.SerialPDB
This is the client-side class. It implements a pdbconduit-through-a-serial-port. Created by Guich from the SerialSocket class created by Rick Grehan. See examples/io/PDBConduit.
Field Summary | |
protected byte[] |
buf
temp buffer |
static byte |
DELETE
|
protected DataStream |
ds
DataStream object |
static byte |
GET_CATALOG
|
static byte |
GET_TXT
|
static byte |
PUT_CATALOG
|
static byte |
PUT_TXT
|
static byte |
SHUTDOWN
|
protected SerialPort |
sport
Serial port object |
Constructor Summary | |
SerialPDB(int baud,
int timeout)
Create and open the Serial connection |
Method Summary | |
void |
delete(String fileName)
Delete a catalog at the server. |
protected void |
flush()
|
boolean |
get(Catalog fillIn,
String name,
int startRecord,
int endRecord,
boolean onlyDirty,
boolean resetDirtyAttr)
Requests the server to send the specified catalog, placing the records in the given fillIn catalog. startRecord and endRecord can be -1 to bring the full Catalog. |
String[] |
get(String fileName)
Get a String array from the server from the specified text file. |
boolean |
isOpen()
Return true if we're connected |
boolean |
put(Catalog cat2send,
String name,
int startRecord,
int endRecord,
boolean onlyDirty,
boolean resetDirtyAttr)
Send the specified catalog to the server. |
boolean |
put(String fileName,
boolean deleteIfExists,
String[] strings)
Send the following String array to the server, placing it in the given txt filename. |
void |
shutdownServer()
Shutdown the server. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
toString,
wait,
wait |
Field Detail |
public static final byte PUT_CATALOG
public static final byte GET_CATALOG
public static final byte PUT_TXT
public static final byte GET_TXT
public static final byte DELETE
public static final byte SHUTDOWN
protected SerialPort sport
protected DataStream ds
protected byte[] buf
Constructor Detail |
public SerialPDB(int baud, int timeout)
Method Detail |
public boolean isOpen()
public boolean put(Catalog cat2send, String name, int startRecord, int endRecord, boolean onlyDirty, boolean resetDirtyAttr)
public boolean get(Catalog fillIn, String name, int startRecord, int endRecord, boolean onlyDirty, boolean resetDirtyAttr)
public boolean put(String fileName, boolean deleteIfExists, String[] strings)
public String[] get(String fileName)
public void delete(String fileName)
public void shutdownServer()
protected void flush()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |