NB3700 User Manual 3.8
16. Create your own web pages
17. Voice control functions
18. SNMP functions
19. CAN socket functions
20. Various network-related functions
21. Other system-related functions
The SDK API manual (which can be downloaded from the router) provides an overview
but also explains all functions in detail.
Please note that some functions require the corresponding services (e.g. E-Mail, SMS)
to be properly configured prior to utilizing them in the SDK.
Let’s now pay some attention to the very powerful API function
nb_status
. It can
be used to query the router’s status values in the same manner as they can be shown
with the CLI. It returns a structure of variables for a specific section (a list of available
sections can be obtained by running
cli status -h
).
By using the
dump
function you can figure out the content of the returned structure:
/* dump current location */
dump ( nb_status (
" location "
));
The script will then generate lines like maybe these:
struct(8): {
.LOCATION_STREET
= string[11]: "Bahnhofquai"
.LOCATION_CITY
= string[10]: "Zurich"
.LOCATION_COUNTRY_CODE = string[2]:
"ch"
.LOCATION_COUNTRY
= string[11]: "Switzerland"
.LOCATION_POSTCODE
= string[4]:
"8001"
.LOCATION_STATE
= string[6]:
"Zurich"
.LOCATION_LATITUDE
= string[9]:
"47.3778058"
.LOCATION_LONGITUDE
= string[8]:
"8.5412757"
}
In combination with the
nb_config_set
function, it is possible to start a re-configuration
of any parts of the system upon status changes. You may query possible sections and
parameters again with the CLI:
~ $ cli get -c wanlink.0
Showing configuration sections (matching ’wanlink.0’):
99
Summary of Contents for NB3700
Page 77: ...NB3700 User Manual 3 8 Figure 5 27 Inbound NAPT 77...
Page 80: ...NB3700 User Manual 3 8 Figure 5 29 OpenVPN Configuration 80...
Page 86: ...NB3700 User Manual 3 8 Figure 5 31 IPsec Administration 86...
Page 92: ...NB3700 User Manual 3 8 Figure 5 34 PPTP Tunnel Configuration 92...
Page 102: ...NB3700 User Manual 3 8 Figure 5 37 SDK Administration 102...
Page 104: ...NB3700 User Manual 3 8 Figure 5 38 SDK Jobs 104...
Page 109: ...NB3700 User Manual 3 8 Figure 5 39 DHCP Server 109...
Page 118: ...NB3700 User Manual 3 8 Figure 5 44 SMS Configuration 118...
Page 140: ...NB3700 User Manual 3 8 Figure 5 53 Regional settings 140...
Page 143: ...NB3700 User Manual 3 8 Figure 5 55 Remote Authentication 143...
Page 147: ...NB3700 User Manual 3 8 Figure 5 57 Automatic File Configuration 147...
Page 159: ...NB3700 User Manual 3 8 5 9 LOGOUT Please use this menu to log out from the Web Manager 159...