Coronis SDK Wiki
Set of module for data processing of wireless device
Status: Abandoned
Brought to you by:
tchomaud
SerialDriver API offers one method to send serial frame using the low level serial protocol via the selected serial port.
The structure of the serial frame which have to be send is dependent from SerialDriver implementation. Only an interface is defined in the API to represent the Serial frame content.
It means that it's mandatory to use the defined serial frame structure for a given SerialDriver implementation, to exclude unpredictable behavior of SDK when input data are provided or operation results are analyzed.
C source API extract
/**
* Send a serial frame via the SerialDriver
* @param driver The SerialDriver instance
* @param frame The ISerialFrame to send
* @return sending_status of the send process
* OK_SERIALDRIVER_SUCCESS if sending succeed
* KO_SERIALFRAME_REQUIRED if frame is <code>empty</code>
* KO_SERIALDRIVER_NOT_OPEN if SerialDriver is not opened
* KO_SENDING_FAILURE if sending failed
* KO_SERIALDRIVER_ALREADY_IN_USE if SerialDriver is already in process
* KO_SERIALPORT_DISCONNECTED if SerialDriver disconnection is observed during the process
*/
WAVENIS_API int driver_send( const void* driver, const pISerialFrame frame);
Java source API extract
/**
* Send a SerialFrame via the SerialDriver
* @param frame The serial frame to send
* @return SendingStatus of the send process
* OK_SENDING_SUCCESS if sending succeed
* KO_SERIALFRAME_REQUIRED if frame is <code>null</code>
* KO_SERIALDRIVER_NOT_OPEN if SerialDriver is not opened
* KO_SENDING_FAILURE if sending failed
* @throws SerialDriverException if a process exception occurs during sending process
* SERIALDRIVER_ALREADY_IN_USE if SerialDriver is already in process
* SERIALPORT_DISCONNECTED if SerialDriver disconnection is observed during the process
*/
public SendingStatus send(
ISerialFrame frame) throws SerialDriverException;