Menu

SerialDriver Instanciation functions

Instanciation functions

Before using a SerialDriver implementation, an instance of the implementation must be created:

  • In C API, 2 methods are defined to create or destroy an instance
  • In Java API, native constructor of Java classes must be used

C source API extract

/**

 * Create a new serial driver instance
 * @return a pointer to created serial driver.<code>NULL</code> if driver failed to be created.
 */
WAVENIS_API void* driver_create();

/**

 * Destroy the serial driver instance. It will automatically close the current connection
 * @param driver The SerialDriver instance
 * @return <code>0</code> if succeed, a positive number otherwise
 */
WAVENIS_API int driver_destroy( const void* driver );

Related

Wiki: APIs

MongoDB Logo MongoDB