Uart
Extends:
Driver enables uart communication with electronic boards
Constructor Summary
Public Constructor | ||
public |
constructor(name: *) |
Method Summary
Public Methods | ||
public |
send(buffer: *, callback: *, type: *) Send data to Uart |
Private Methods | ||
private |
_onPacketReceived(packet: Buffer, type: String) Method will be called only if protocol is not |
Public Constructors
public constructor(name: *) source
Params:
Name | Type | Attribute | Description |
name | * | {String} - Unique name of driver |
|
config.device | * | {String} - Linux dev which will be used for serial communication |
|
config.baudRate | * | {Number} - Bits per second |
|
config.protocol | * | {String} - Name of protocol that will be used under the hood, check
list of available protocols in |
Public Methods
public send(buffer: *, callback: *, type: *) source
Send data to Uart
Params:
Name | Type | Attribute | Description |
buffer | * | {Buffer} - Buffer of data which will be sent to uart |
|
callback | * | {Function} - Callback function which will be called after data is sent |
|
type | * | {Number} - Type of packet, will be ignored if protocol doesn't support |