Project

General

Profile

Serial Scol plugin
Scol functions definition

Functions

int _openSIO (mmachine m)
 _openSIO : This function open a serial port
 
int _closeSIO (mmachine m)
 _closeSIO : This function destroy a serial object and close the connection
 
int _writeSIO (mmachine m)
 _writeSIO : This function send data on serial device
 

Detailed Description

Scol functions definition

Function Documentation

◆ _closeSIO()

int _closeSIO ( mmachine  m)

_closeSIO : This function destroy a serial object and close the connection

Prototype: fun [SerialIO] I

Parameters
SerialIO: the current serial device
Returns
I : 0 if success, NIL otherwise

Definition at line 172 of file plugin.cpp.

◆ _openSIO()

int _openSIO ( mmachine  m)

_openSIO : This function open a serial port

Prototype: fun [Chn S [I I I I] fun [SerialIO u0 S I] I u0] SerialIO

Parameters
Chn: scol channel
S: com port number, name for Windows or full path for linux
[II I I] : port parameters, baudRate, parity, byteSize and stopbit
fun[SerialIO u0 S I] I : callback function for receive data
-SerialIO : the serial object
-u0 : user parameter
-S : the received data
-I : the data size
u0: the callback user parameter
Returns
SerialIO : the new object if connected, nil otherwise

Definition at line 80 of file plugin.cpp.

◆ _writeSIO()

int _writeSIO ( mmachine  m)

_writeSIO : This function send data on serial device

Prototype: fun [SerialIO S] I

Parameters
SerialIO: the current Serial device
S: data to send
Returns
I : 0 if success, NIL otherwise

Definition at line 205 of file plugin.cpp.