TCRouter
TCRouter
Manage the tc router device
Kind: global class
new TCRouter(ip, port, timeout)
Manages socket api to TCRouter device
Param | Type | Description |
ip |
| IP Address of the TC Router |
port |
| TCP Port number of TC Router socket server |
timeout |
| Timeout in milliseconds for the tcp client |
tcRouter.getMutableInfo()
Request mutable status info from the router and return last known values of static values
Kind: instance method of TCRouter
Access: public
tcRouter.sendSMS(contacts, content)
Send an SMS message to the TC Router
Kind: instance method of TCRouter
Access: public
Param | Type | Description |
contacts |
| - |
content |
| message content |
tcRouter.checkForSmsRx() ⇒ Promise
Promise
Checks the TC router for an sms which has been received. Returns the contents of the sms. Should be acknowledged after receipt using the ackSmsRx function
Kind: instance method of TCRouter
Access: public
tcRouter.ackSmsRx() ⇒ Promise
Promise
Acknowledges the last received sms - TC Router then deletes this message from its history and is no longer accessible. Results of the message ack'd should be stored
Kind: instance method of TCRouter
Access: public
tcRouter.controlOutput(index, value)
Control outputs on the Router
Kind: instance method of TCRouter
Access: public
Param | Type | Description |
index |
| Index of the output on the router which should be controlled |
value |
| False: turn output off, True: turn output on |
tcRouter.controlDataConnection(state)
Control data connection if configured correctly on device web page
Kind: instance method of TCRouter
Access: public
Param | Type | Description |
state |
| turn connection on or off |
tcRouter.controlVPN(type, index, state)
Start or stop VPN connections
Kind: instance method of TCRouter
Access: public
Param | Type | Description |
type |
| 0:ipsec,1:openvpn |
index |
| Index/Number/ID of the desired vpn tunnel |
state |
| 0:turn off,1:turn on |
tcRouter.getAllInfo()
Build, send, update, and return all device 'info'
Kind: instance method of TCRouter
Access: public
Last updated