NB3711 User Manual 4.0
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’):
111
Summary of Contents for NB3711
Page 90: ...NB3711 User Manual 4 0 Figure 5 27 Inbound NAPT 90...
Page 92: ...NB3711 User Manual 4 0 Figure 5 29 OpenVPN Configuration 92...
Page 96: ...NB3711 User Manual 4 0 Figure 5 30 OpenVPN Client Management 96...
Page 98: ...NB3711 User Manual 4 0 Figure 5 31 IPsec Administration 98...
Page 104: ...NB3711 User Manual 4 0 Figure 5 34 PPTP Tunnel Configuration 104...
Page 114: ...NB3711 User Manual 4 0 Figure 5 37 SDK Administration 114...
Page 117: ...NB3711 User Manual 4 0 Figure 5 38 SDK Jobs 117...
Page 121: ...NB3711 User Manual 4 0 Figure 5 39 DHCP Server 121...
Page 131: ...NB3711 User Manual 4 0 Figure 5 44 SMS Configuration 131...
Page 158: ...NB3711 User Manual 4 0 Figure 5 55 Remote Authentication 158...
Page 162: ...NB3711 User Manual 4 0 Figure 5 57 Automatic File Configuration 162...
Page 166: ...NB3711 User Manual 4 0 Figure 5 59 Log Viewer 166...
Page 167: ...NB3711 User Manual 4 0 Figure 5 60 Tech Support File 167...
Page 175: ...NB3711 User Manual 4 0 5 9 LOGOUT Please use this menu to log out from the Web Manager 175...
Page 213: ...NB3711 User Manual 4 0 Event Description Table A 3 SDK Examples 213...
Page 214: ......