EasyManua.ls Logo

NetModule NB2800 - E-Mail; E-Mail Settings

NetModule NB2800
239 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
NB2800
User Manual for NRSW version 4.5.0.100
Here is an example how one might adopt those functions:
/* check current city and enable the second WAN link */
location = nb_stat us (" locati on ");
if ( locat ion ) {
city = stru c t_get ( location , " LOCATION_CIT Y " ) ;
if ( city == " W onderland ") {
f o r ( led = 0; led < 5; led ++) {
nb_le d_set ( led , LED_BLINK_FA S T | LED_COL O R _RED );
}
} e l s e {
printf (" You ' ll never walk alone in % s ...\ n " , city ) ;
nb_confi g _ set (" wanlink .1. mode =1 ");
}
}
Running SDK
In the SDK, we are speaking of scripts and triggers which form jobs.
Any arena script can be uploaded to the router or imported by using dedicated user configuration
packages. You may also edit the script directly at the Web Manager or select one of our examples.
You will further have a testing section on the router which can be used to check your syntax or doing
test runs.
Once uploaded, you will have to specify a trigger, that is, telling the router when the script is to be
executed. This can be either time-based (e.g. each Monday) or triggered by one of the pre-defined
system events (e.g. wan-up) as described in Events chapter 5.7.7. With both, a script and a trigger,
you can finally set up an SDK job now. The test event usually serves as a good facility to check
whether your job is doing well. The admin section also offers facilities to troubleshoot any issues and
control running jobs.
The SDK host (sdkhost) corresponds to the daemon managing the scripts and their operations and
thus avoiding any harm to the system. In terms of resources, it will limit CPU and memory for running
scripts and also provide a pre-defined portion of the available space of the storage device. You may,
however, extend it by external USB storage or (depending on your model) extended flash storage.
Files written to /tmp will be hold in memory and will be cleared upon a restart of the script. As your
scripts operate in the sandbox, you will have no access to tools on the system (such as ifconfig).
130

Table of Contents

Other manuals for NetModule NB2800

Related product manuals