Members
clients :Array.<Client>
Array of all connected Client
objects.
Type:
- Array.<Client>
- Source:
LOGGING :Boolean
Variable to decide whether to console.log detailed messages
Type:
- Boolean
- Source:
serialPorts :Array.<SerialPort>
Array of all opened SerialPort
objects.
Type:
- Array.<SerialPort>
- Source:
serialPortsList :Array.<String>
Array of all opened serial port names in string.
Type:
- Array.<String>
- Source:
wss :ws
Web socket server. Initialized in start() function.
Type:
- ws
- Source:
Methods
logit(mess)
console.log log messages when LOGGING == true
Parameters:
Name | Type | Description |
---|---|---|
mess |
String | String to log when LOGGING == true |
- Source:
logit(mess)
console.log log messages when LOGGING == true
Parameters:
Name | Type | Description |
---|---|---|
mess |
String | String to log when LOGGING == true |
- Source:
logit(mess)
console.log log messages when LOGGING == true
Parameters:
Name | Type | Description |
---|---|---|
mess |
String | String to log when LOGGING == true |
- Source:
start(port)
Initialize web socket server at port 8081. Initialize web socket clients on connection by creating a Client
object and create a (@link SerialPort SerialPort} object after determining that it has not been opened already. Initialize web socket client message events.
Parameters:
Name | Type | Description |
---|---|---|
port |
Number | port number used to open web socket server. |
- Source:
stop()
Stops web socket server after closing all SerialPort
connections and Client
connections
- Source: