Interacting with the Device - Sync Module
sync.syncApps()
The sync.syncApps() function was created with coding ease in mind. Instead of interacting with individual parameters in the device through get() and set() function calls, the sync.syncApps() function allows you to sync entire objects between the Device Manager dB and the device.
function sync.syncApps([App Codes Out], [App Codes In]); | |
Description | Exchange object parameter values between the Device Manager db and the device. Parameter values can be sync’d out to the device, in from the device or in both directions with a single function call. |
Parameters |
See the Sync Application Codes table below for available codes and allowed sync directions. |
Returns |
ExitStatus - Contains information about the exit status. Properties:
|
Required Libraries | useLibrary("sync"); |
Example |
useLibrary("sync"); var ret = sync.syncApps(["WIFI"], []); var test = ret.some(function(e){return e.isError();}); log.info("errors? " + test); |
sync.isError()
function sync.isError(); | |
Description | Indicates the presence of an error code from a previous syncApps() call |
Parameters | None |
Returns | Returns true if an error faultCode is present, else false |
Required Libraries | useLibrary("sync"); |
Example |
useLibrary("sync"); var ret = sync.syncApps(["WIFI"], []); var test = ret.some(function(e){return e.isError();}); log.info("errors? " + test); |
Sync Application Codes
Application Name | Application Code | To Device | From Device |
Access Control | AccessControl | X | |
Access Control Status | AccessControlStatus | X | |
Bandwidth Monitoring | BM | X | |
Broadcom Set-Top Box Status | BRCMSTB | X | |
CAH Provisioning | CahProvisioning | X | |
Captive Portal | CAPO | X | |
Local GUI Click-Thru | ClickThrough | X | |
Control Panel Redirect Configuration | ControlPanel | X | |
LAN Host Identification | DeviceIdentification | ||
Device Information | DeviceInfo | X | |
Reboot Device | DeviceReboot | X | |
Device Statistics | DeviceStats | X | |
Docsis Statistics | DocsisStats | X | |
Entone Set-Top Box Status |
EntoneSTB | X | |
Factory Reset Device | FactoryResetDevice | X | |
Firewall Configuration | Firewall | X | |
Firmware Management | FirmwareManagement | X | |
Firmware Management Status | FirmwareManagementStatus | X | |
LAN Hosts | Hosts | X | |
Interface Stack Status | InterfaceStackStatus | X | |
IP Interface Status | IpInterfaceStatus | X | |
LAN Subnet Management | LAN2 | X | X |
Management Server | ManagementServer | X | |
Management Server Status | ManagementServerStatus | X | |
Local GUI Passwords | ManagementPassword | X | |
Marketing Captive Portal | MCAPO | X | |
Parameter Notification | NTFY | X | |
Port Forwards | PF | X | X |
PPP Credentials | PPP | X | |
Quality of Service | QoS | X | X |
RIP | RIP | X | |
Solicit Status | SolicitStatus | ||
Initiate Download Speed Test | InitDownloadSpeedTest | X | |
Download Speed Test Results | DownloadSpeedTestResults | X | |
Initiate Upload Speed Test | InitUploadSpeedTest | X | |
Upload Speed Test Results | UploadSpeedTestResults | X | |
Static Reservations | SR | X | |
Static Routing | StaticRoute | X | |
Static WAN | StaticWAN | X | |
STUN | STUN | X | |
Network Time | Time | X | |
Time Zones | TZ | X | |
Topology | TOPO | X | |
LAN Device Click-Thru | UDM | X | |
VoIP Device Configuration | VoIP | X | |
WAN Configuration (v2) | WAN2 | X | |
WAN Status | WANStatus | X | |
WiFi | WiFi | X | X |
ZTE Set-Top Box Status | ZTESetTop | X |