CanDriver
Extends:
src/drivers/motion/MotionDriverSimulator.js~EventEmitter → CanDriver
Driver for CAN bus (Controller Area Network)
Constructor Summary
Public Constructor | ||
public |
constructor(name: *, config: *) Creates instance of CanDriver |
Method Summary
Public Methods | ||
public |
send(id: *, buffer: *) Send buffer to specific ID |
Public Constructors
public constructor(name: *, config: *) source
Creates instance of CanDriver
Params:
Name | Type | Attribute | Description |
name | * | {String} - Unique name of a driver |
|
config | * | {Object} - Configuration presented as an associative array |
Public Methods
public send(id: *, buffer: *) source
Send buffer to specific ID
Params:
Name | Type | Attribute | Description |
id | * | ||
buffer | * |
Example:
canDriver.send(0x4324234, Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x00, 0x00]));