Cellular: Added getters for device and serial to EasyCellularConnection

pull/7795/head
Mirela Chirica 2018-08-15 09:32:47 +03:00
parent 273a052e89
commit 2c29852dba
2 changed files with 23 additions and 0 deletions

View File

@ -336,6 +336,16 @@ NetworkStack *EasyCellularConnection::get_stack()
} }
} }
CellularDevice *EasyCellularConnection::get_device()
{
return _cellularConnectionFSM->get_device();
}
UARTSerial *EasyCellularConnection::get_serial()
{
return &_cellularSerial;
}
} // namespace } // namespace
#endif // CELLULAR_DEVICE #endif // CELLULAR_DEVICE

View File

@ -135,6 +135,19 @@ public:
* @param plmn operator in numeric format. See more from 3GPP TS 27.007 chapter 7.3. * @param plmn operator in numeric format. See more from 3GPP TS 27.007 chapter 7.3.
*/ */
void set_plmn(const char *plmn); void set_plmn(const char *plmn);
/** Get the cellular device from the cellular state machine
*
* @return cellular device
*/
CellularDevice *get_device();
/** Get the UART serial file handle used by cellular subsystem
*
* @return address of cellular UART serial
*/
UARTSerial *get_serial();
protected: protected:
/** Provide access to the NetworkStack object /** Provide access to the NetworkStack object