This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
sdk:sdk [2018/08/14 09:20] – [Supervision] preisig | sdk:sdk [2024/01/11 09:08] – [SDK API Functions] dodenhoeft | ||
---|---|---|---|
Line 5: | Line 5: | ||
- A NetModule-specific Application Programming Interface (API), which ships with a comprehensive set of functions for accessing hardware interfaces (e.g. digital IO ports, GPS, external storage media, serial ports) but also for retrieving system status parameters, sending E-Mail or SMS messages or simply just to configure the router. | - A NetModule-specific Application Programming Interface (API), which ships with a comprehensive set of functions for accessing hardware interfaces (e.g. digital IO ports, GPS, external storage media, serial ports) but also for retrieving system status parameters, sending E-Mail or SMS messages or simply just to configure the router. | ||
- | Anyone, reasonably experienced in the C language, will find an environment that is easy to dig in. However, feel free to contact us via [[router@support.netmodule.com]] and we will happily support you in finding a programming solution to your specific problem. | + | Anyone, reasonably experienced in the C language, will find an environment that is easy to dig in. However, feel free to contact us via [[support@netmodule.com]] and we will happily support you in finding a programming solution to your specific problem. |
===== The Language ===== | ===== The Language ===== | ||
The arena scripting language offers a broad range of POSIX functions (like printf or open) and provides, together with tailor-made API functions, a simple platform for implementing any sort of applications to interconnect your favourite device or service with the router. | The arena scripting language offers a broad range of POSIX functions (like printf or open) and provides, together with tailor-made API functions, a simple platform for implementing any sort of applications to interconnect your favourite device or service with the router. | ||
Line 14: | Line 14: | ||
* otherwise we 'd have to send a short message . | * otherwise we 'd have to send a short message . | ||
*/ | */ | ||
- | for ( attempts = 0; attempts < 3; attempts ++) { | + | for ( attempts=0; attempts< |
- | if ( nb_serial_read (" serial0 ") == " Knock Knock !") { | + | if ( nb_serial_read (" |
- | nb_serial_write (" serial0 ", "Who 's there ?"); | + | nb_serial_write (" |
- | if ( nb_serial_read (" serial0 ") == " Santa ") { | + | if ( nb_serial_read (" |
printf (" Hurray !\n"); | printf (" Hurray !\n"); | ||
- | nb_dio_set (" out1 ", 1); | + | nb_dio_set (" |
} | } | ||
} | } | ||
} | } | ||
- | nb_sms_send (" +123456789 ", "No presents this year :(") | + | nb_sms_send (" |
</ | </ | ||
- | A set of example scripts can be downloaded directly from the router, you can find a list of them in the appendix. The [[ftp:// | + | A set of example scripts can be downloaded directly from the router, you can find a list of them in the appendix. The [[https:// |
of all available functions. | of all available functions. | ||
Line 55: | Line 55: | ||
- Encode functions (coming soon) | - Encode functions (coming soon) | ||
- Other system-related functions | - Other system-related functions | ||
- | The [[ftp:// | + | The [https:// |
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 us now pay some attention to the very powerful API function '' | 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 us now pay some attention to the very powerful API function '' | ||
Line 133: | Line 133: | ||
==== GPS ==== | ==== GPS ==== | ||
* [[sdk: | * [[sdk: | ||
+ | * [[sdk: | ||
==== Serial ==== | ==== Serial ==== | ||
* [[sdk: | * [[sdk: | ||
- | * [[sdk:: | + | * [[sdk:: |
+ | * [[sdk:: | ||
* [[sdk:: | * [[sdk:: | ||
* [[sdk:: | * [[sdk:: | ||
Line 150: | Line 152: | ||
* [[sdk:: | * [[sdk:: | ||
* [[sdk:: | * [[sdk:: | ||
+ | * [[sdk:: | ||
+ | ==== Web Services ==== | ||
+ | * [[sdk:: | ||
+ | * [[sdk:: | ||
+ | * [[sdk:: | ||
==== Wifi / WLAN ==== | ==== Wifi / WLAN ==== | ||
* [[sdk:: | * [[sdk:: | ||
+ | * [[sdk:: | ||
==== Various ==== | ==== Various ==== | ||
* [[sdk: | * [[sdk: | ||
Line 166: | Line 174: | ||
* [[sdk: | * [[sdk: | ||
* [[sdk: | * [[sdk: | ||
+ | * [[sdk: | ||
Line 182: | Line 191: | ||
|[[sdk: | |[[sdk: | ||
|[[sdk: | |[[sdk: | ||
+ | |[[sdk: | ||
|[[sdk: | |[[sdk: | ||
|[[sdk: | |[[sdk: |