Difference between revisions of "Serialport"
Barrymavin (Talk | contribs) (→Properties) |
Barrymavin (Talk | contribs) (→Properties) |
||
Line 35: | Line 35: | ||
|valign="top"|RW | |valign="top"|RW | ||
|valign="top"|Numeric | |valign="top"|Numeric | ||
− | |valign="top"|The number of stopbits | + | |valign="top"|The number of stopbits. Valid values; 1, 2 or 3 (1.5 on windows) |
|- | |- | ||
Line 41: | Line 41: | ||
|valign="top"|RW | |valign="top"|RW | ||
|valign="top"|Numeric | |valign="top"|Numeric | ||
− | |valign="top"|The parity bits | + | |valign="top"|The parity bits. |
+ | 0 No parity bit it sent. This is the most common parity setting. Error detection is handled by the communication protocol.<br> | ||
+ | 2 The number of 1 bits in each character, including the parity bit, is always even.<br> | ||
+ | 3 The number of 1 bits in each character, including the parity bit, is always odd. It ensures that at least one state transition occurs in each character.<br> | ||
+ | 4 Space parity. The parity bit is sent in the space signal condition. It does not provide error detection information.<br> | ||
+ | 5 Mark parity. The parity bit is always set to the mark signal condition (logical 1). It does not provide error detection information. | ||
|- | |- |
Revision as of 08:33, 13 May 2024
Under development
Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.
Available in Lianja 9.7.
Properties
This class supports the following properties:
Property | Access (R/RW) | Value | Description |
---|---|---|---|
baudrate | RW | Numeric | The baudrate |
breakenabled | RW | Logical | The breakenabled state. |
databits | RW | Numeric | The number of databits. Valid values; 5, 6, 7 or 8 |
stopbits | RW | Numeric | The number of stopbits. Valid values; 1, 2 or 3 (1.5 on windows) |
parity | RW | Numeric | The parity bits.
0 No parity bit it sent. This is the most common parity setting. Error detection is handled by the communication protocol. |
flowcontrol | RW | Numeric | The flowcontrol. 0 No flow control. |
portname | RW | character | The portname e.g com3 |
dataterminalready | RW | Logical | The DTR state. |
requesttosend | RW | Logical | The RTS state |
Methods
This class supports the following methods:
Method | Args | Description |
---|---|---|
availablePorts | None | Returns a comma separated list of ports available |
readData | None | Reads data. Returns as a character string. |
writeData | Character | Writes the specified character string |
open | None | Open the serial port specified in portname |
Events
This class supports the the following events:
Event | Args | Description |
---|---|---|
dataavailable | None | Occurs when data is available |