41 #ifndef YOCTO_CELLULAR_H 42 #define YOCTO_CELLULAR_H 55 #ifndef _Y_CELLTYPE_ENUM 56 #define _Y_CELLTYPE_ENUM 67 #ifndef _Y_AIRPLANEMODE_ENUM 68 #define _Y_AIRPLANEMODE_ENUM 75 #ifndef _Y_ENABLEDATA_ENUM 76 #define _Y_ENABLEDATA_ENUM 85 #define Y_LINKQUALITY_INVALID (YAPI_INVALID_UINT) 86 #define Y_CELLOPERATOR_INVALID (YAPI_INVALID_STRING) 87 #define Y_CELLIDENTIFIER_INVALID (YAPI_INVALID_STRING) 88 #define Y_IMSI_INVALID (YAPI_INVALID_STRING) 89 #define Y_MESSAGE_INVALID (YAPI_INVALID_STRING) 90 #define Y_PIN_INVALID (YAPI_INVALID_STRING) 91 #define Y_LOCKEDOPERATOR_INVALID (YAPI_INVALID_STRING) 92 #define Y_APN_INVALID (YAPI_INVALID_STRING) 93 #define Y_APNSECRET_INVALID (YAPI_INVALID_STRING) 94 #define Y_PINGINTERVAL_INVALID (YAPI_INVALID_UINT) 95 #define Y_DATASENT_INVALID (YAPI_INVALID_UINT) 96 #define Y_DATARECEIVED_INVALID (YAPI_INVALID_UINT) 97 #define Y_COMMAND_INVALID (YAPI_INVALID_STRING) 111 #pragma option push -w-8022 131 YCellRecord(
int mcc,
int mnc,
int lac,
int cellId,
int dbm,
int tad,
const string &oper);
135 virtual string get_cellOperator(
void);
137 virtual int get_mobileCountryCode(
void);
139 virtual int get_mobileNetworkCode(
void);
141 virtual int get_locationAreaCode(
void);
143 virtual int get_cellId(
void);
145 virtual int get_signalStrength(
void);
147 virtual int get_timingAdvance(
void);
165 #pragma option push -w-8022 239 int get_linkQuality(
void);
242 {
return this->get_linkQuality(); }
251 string get_cellOperator(
void);
254 {
return this->get_cellOperator(); }
264 string get_cellIdentifier(
void);
267 {
return this->get_cellIdentifier(); }
280 {
return this->get_cellType(); }
293 string get_imsi(
void);
296 {
return this->get_imsi(); }
305 string get_message(
void);
308 {
return this->get_message(); }
321 string get_pin(
void);
324 {
return this->get_pin(); }
345 int set_pin(
const string& newval);
347 {
return this->set_pin(newval); }
360 string get_lockedOperator(
void);
363 {
return this->get_lockedOperator(); }
376 int set_lockedOperator(
const string& newval);
378 {
return this->set_lockedOperator(newval); }
391 {
return this->get_airplaneMode(); }
405 {
return this->set_airplaneMode(newval); }
419 {
return this->get_enableData(); }
438 {
return this->set_enableData(newval); }
448 string get_apn(
void);
451 {
return this->get_apn(); }
463 int set_apn(
const string& newval);
465 {
return this->set_apn(newval); }
477 string get_apnSecret(
void);
480 {
return this->get_apnSecret(); }
482 int set_apnSecret(
const string& newval);
484 {
return this->set_apnSecret(newval); }
493 int get_pingInterval(
void);
496 {
return this->get_pingInterval(); }
507 int set_pingInterval(
int newval);
509 {
return this->set_pingInterval(newval); }
518 int get_dataSent(
void);
521 {
return this->get_dataSent(); }
532 int set_dataSent(
int newval);
534 {
return this->set_dataSent(newval); }
543 int get_dataReceived(
void);
546 {
return this->get_dataReceived(); }
557 int set_dataReceived(
int newval);
559 {
return this->set_dataReceived(newval); }
561 string get_command(
void);
564 {
return this->get_command(); }
566 int set_command(
const string& newval);
568 {
return this->set_command(newval); }
597 static YCellular* FindCellular(
string func);
629 virtual int sendPUK(
string puk,
string newPin);
642 virtual int set_apnAuth(
string username,
string password);
651 virtual int clearDataCounters(
void);
664 virtual string _AT(
string cmd);
675 virtual vector<string> get_availableOperators(
void);
685 virtual vector<YCellRecord> quickCellSurvey(
void);
700 {
return this->nextCellular();}
int setApn(const string &newval)
Y_CELLTYPE_enum cellType(void)
int setPingInterval(int newval)
YCellular * yFirstCellular(void)
static YCellular * FirstCellular(void)
int setDataSent(int newval)
YCellularValueCallback _valueCallbackCellular
static const string APNSECRET_INVALID
Y_ENABLEDATA_enum enableData(void)
int setDataReceived(int newval)
string cellIdentifier(void)
int setApnSecret(const string &newval)
#define YAPI_INVALID_UINT
string lockedOperator(void)
string cellOperator(void)
static YCellular * FindCellular(string func)
virtual int _parseAttr(YJSONObject *json_val)
void(* YCellularValueCallback)(YCellular *func, const string &functionValue)
static const string LOCKEDOPERATOR_INVALID
static const string MESSAGE_INVALID
static const string APN_INVALID
Y_AIRPLANEMODE_enum airplaneMode(void)
int setCommand(const string &newval)
static const string CELLIDENTIFIER_INVALID
static YCellular * First(void)
static const string CELLOPERATOR_INVALID
virtual int registerValueCallback(YFunctionValueCallback callback)
Y_ENABLEDATA_enum _enableData
static const string COMMAND_INVALID
int setAirplaneMode(Y_AIRPLANEMODE_enum newval)
Y_CELLTYPE_enum _cellType
int setPin(const string &newval)
static YCellular * Find(string func)
int setEnableData(Y_ENABLEDATA_enum newval)
#define YOCTO_CLASS_EXPORT
static const string IMSI_INVALID
YCellular * yFindCellular(const string &func)
int setLockedOperator(const string &newval)
Y_AIRPLANEMODE_enum _airplaneMode
static const string PIN_INVALID
virtual int _invokeValueCallback(string value)