-
Notifications
You must be signed in to change notification settings - Fork 3k
Docs: netsocket group doxygen fixes #8541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
6cdda58
5837e37
e31337d
3929f56
4f2645b
de261a4
5241c3b
85b9b23
446ab5d
25b1625
b165fc0
ae75dfc
2bab24f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,105 +18,102 @@ | |
|
||
#include "netsocket/NetworkInterface.h" | ||
|
||
/** CellularBase class | ||
* | ||
* Common interface that is shared between Cellular interfaces | ||
/** Common interface that is shared between Cellular interfaces | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing . There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is Cellular definitely a proper noun in this context? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, it isn't. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not capitalize cellular. |
||
* @addtogroup netsocket | ||
*/ | ||
class CellularBase: public NetworkInterface { | ||
|
||
public: | ||
|
||
/** Get the default Cellular interface. | ||
* | ||
* This is provided as a weak method so applications can override. | ||
* Default behaviour is to get the target's default interface, if | ||
* any. | ||
* | ||
* @return pointer to interface, if any | ||
* @return pointer to interface, if any. | ||
*/ | ||
|
||
static CellularBase *get_default_instance(); | ||
|
||
/** Set the Cellular network credentials | ||
/** Set the Cellular network credentials. | ||
* | ||
* Please check documentation of connect() for default behaviour of APN settings. | ||
* | ||
* @param apn Access point name | ||
* @param uname optionally, Username | ||
* @param pwd optionally, password | ||
* @param apn Access point name. | ||
* @param uname Username (optional). | ||
* @param pwd Password (optional). | ||
*/ | ||
virtual void set_credentials(const char *apn, const char *uname = 0, | ||
const char *pwd = 0) = 0; | ||
|
||
/** Set the pin code for SIM card | ||
/** Set the pin code for SIM card. | ||
* | ||
* @param sim_pin PIN for the SIM card | ||
* @param sim_pin PIN for the SIM card. | ||
*/ | ||
virtual void set_sim_pin(const char *sim_pin) = 0; | ||
|
||
/** Start the interface | ||
/** Attempt to connect to a Cellular network with a pin and credentials. | ||
* | ||
* Attempts to connect to a Cellular network. | ||
* | ||
* @param sim_pin PIN for the SIM card | ||
* @param apn optionally, access point name | ||
* @param uname optionally, Username | ||
* @param pwd optionally, password | ||
* @return NSAPI_ERROR_OK on success, or negative error code on failure | ||
* @param sim_pin PIN for the SIM card. | ||
* @param apn Access point name (optional). | ||
* @param uname Username (optional). | ||
* @param pwd Password (optional). | ||
* @return NSAPI_ERROR_OK on success, or negative error code on failure. | ||
*/ | ||
virtual nsapi_error_t connect(const char *sim_pin, const char *apn = 0, | ||
const char *uname = 0, | ||
const char *pwd = 0) = 0; | ||
|
||
/** Start the interface | ||
/** Attempt to connect to a Cellular network. | ||
* | ||
* Attempts to connect to a Cellular network. | ||
* If the SIM requires a PIN, and it is not set/invalid, NSAPI_ERROR_AUTH_ERROR is returned. | ||
* If the SIM requires a PIN, and it is invalid or is not set, NSAPI_ERROR_AUTH_ERROR is returned. | ||
* | ||
* @return NSAPI_ERROR_OK on success, or negative error code on failure | ||
* @return NSAPI_ERROR_OK on success, or negative error code on failure. | ||
*/ | ||
virtual nsapi_error_t connect() = 0; | ||
|
||
/** Stop the interface | ||
/** Stop the interface. | ||
* | ||
* @return 0 on success, or error code on failure | ||
* @return NSAPI_ERROR_OK on success, or error code on failure. | ||
*/ | ||
virtual nsapi_error_t disconnect() = 0; | ||
|
||
/** Check if the connection is currently established or not | ||
/** Check if the connection is currently established or not. | ||
* | ||
* @return true/false If the cellular module have successfully acquired a carrier and is | ||
* connected to an external packet data network using PPP, isConnected() | ||
* API returns true and false otherwise. | ||
* @return True if the cellular module have successfully acquired a carrier and is | ||
* connected to an external packet data network using PPP, false otherwise. | ||
*/ | ||
virtual bool is_connected() = 0; | ||
|
||
/** Get the local IP address | ||
/** Get the local IP address. | ||
* | ||
* @return Null-terminated representation of the local IP address | ||
* or null if no IP address has been received | ||
* or null if no IP address has been received. | ||
*/ | ||
virtual const char *get_ip_address() = 0; | ||
|
||
/** Get the local network mask | ||
/** Get the local network mask. | ||
* | ||
* @return Null-terminated representation of the local network mask | ||
* or null if no network mask has been received | ||
* or null if no network mask has been received. | ||
*/ | ||
virtual const char *get_netmask() = 0; | ||
|
||
/** Get the local gateways | ||
/** Get the local gateways. | ||
* | ||
* @return Null-terminated representation of the local gateway | ||
* or null if no network mask has been received | ||
* or null if no network mask has been received. | ||
*/ | ||
virtual const char *get_gateway() = 0; | ||
|
||
/** @copydoc NetworkInterface::cellularBase | ||
*/ | ||
virtual CellularBase *cellularBase() | ||
{ | ||
return this; | ||
} | ||
|
||
#if !defined(DOXYGEN_ONLY) | ||
|
||
protected: | ||
/** Get the target's default Cellular interface. | ||
* | ||
|
@@ -127,6 +124,8 @@ class CellularBase: public NetworkInterface { | |
* @return pointer to interface, if any | ||
*/ | ||
static CellularBase *get_target_default_instance(); | ||
|
||
#endif //!defined(DOXYGEN_ONLY) | ||
}; | ||
|
||
#endif //CELLULAR_BASE_H | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is even this explicit command necessary? The Doxygen config got automatic inheritance turned on recently, IIRC.