Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of CNManager by
Diff: CNData.h
- Revision:
- 0:86284a262735
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CNData.h	Tue Jan 12 09:08:15 2016 +0000
@@ -0,0 +1,44 @@
+#pragma once 
+
+#include "CNManager.h"
+#include "CNReg.h"
+
+//!Data Status
+typedef enum{
+    DATA_NO_CHANGES,           //!< No changes
+    DATA_IS_CONNECTED,         //!< Data channel is connected
+    DATA_IS_DISCONNECTED,      //!< Data channel is disconnected
+} DataConnStatus;
+
+/** Data Init.
+  This function has to be called prior to dataTick
+ */
+void cnDataInit();
+
+/** Loop data module
+  \param lib  pointer to CN library
+  \param regStatus for registration status
+  \param dataStatus [output] data status
+  \return CNResp
+ */
+CNResp cnDataLoop(CNLib* const lib, RegStatus regStatus, DataConnStatus* const dataStatus);
+
+/** Register (Attach) the MT to the GPRS service.
+ This function can be called at any time.
+   \param enabled if true data connection is requested, if false not.
+ */
+void cnDataEnable(bool enabled);
+
+/** Reset
+ */
+void cnDataReset();
+
+/** Set parameters for the GPRS service.
+If Apn parameters are not set, the internal APN info database will be used.
+ \param apn the of the network provider e.g.
+ \param apn the of the network provider e.g. "internet" or "apn.provider.com"
+ \param username is the user name text string for the authentication phase
+ \param password is the password text string for the authentication phase
+ \param auth is the authentication mode (CHAP,PAP,NONE or DETECT)
+ */
+void cnDataSetupApn(const char* apn, const char* username, const char* password);
    