/* Returns: current owner of the port. */ char *getserialowner(); /* Checks whether the port is owned. * * Returns: * boolean true if the port is owned by some application, false if the port is not owned. */ boolean iscurrentlyowned(); /* Parameters: * appname - Name of application making this call. * This name will become the owner of the port. Useful when resolving ownership contention. * timeout - time in milliseconds to block waiting for port open. * Returns: * boolean true if the port is succesfully opened, false if the port is not opened. */ boolean openserial(String appname, int timeout); /* Closes the serial port. The application must call close when it is done with the port. */ void closeserial(); /* This is the only way to receive data from the communications port. * Parameters: * threshold - This is the maximum number of bytes read * timeout - time in milliseconds to block waiting for data * *data - the bytes read * Returns: * the number of bytes read. * * The read behaviour of getsserial depends on combination of the threshold and timeout values. * If either threshold or timeout are 0 then the other parameter is the only value used * If threshold is 0 then after timeout ms getsserial returns * If timeout is 0 then after threshold bytes are read getsserial returns * If both threshold and timeout are 0 return when any data is available */ int getsserial(int threshold, int timeout, char *data); /* Outputs data to the serial port * Paramters: * data - the data to write * Returns: * The number of bytes written to the serial port. */ int putsserial(char *data)