YodaRT is the JavaScript layer in YodaOS. It provides the main functionalities includes:
- Getting and handling NLP request
- Playing music and TTS
- Controling the volume
- Controling the network state
- Providing basic SDK for application development
And it is powered by ShadowNode, which provides the basic system API, you could visit API Documentation for details.
To run the unit tests on device, just try:
$ npm test
123 -_-_-_-_-_-_-_-_-_,------,
0 -_-_-_-_-_-_-_-_-_| /\_/\
0 -_-_-_-_-_-_-_-_-^|__( ^ .^)
-_-_-_-_-_-_-_-_- "" ""
Pass!
Ensure you have a connected YodaOS device via ADB v1.0.39.
Define your test.json
test.json
is the configuration in JSON for your testing jobs. An example is here:
{
"cloudgw": {
"deviceId": "your device id",
"deviceTypeId": "your device type id",
"key": "your rokid cloud key",
"secret": "your rokid cloud secret"
},
"wifi": {
"ssid": "your ssid of wifi",
"psk": "your psk of wifi"
}
}
And put this file under the ./test directory.
In development, code changes are in a very frequent fashion and it might be hard to maintain synchronization between local codes and device codes. Try following commands to cope with the situation with ease:
$ npm restart
Generate the API references:
$ npm run website
$ open website/docs/index.html
How to configure to a device:
$ ./tools/configure-network -s <ssid> -p <psk> -m <masterId>
Apache v2.0