Android-cuttlefish cvd tool
|
#include <data_service.h>
Classes | |
struct | PDPContext |
Public Member Functions | |
DataService (int32_t service_id, ChannelMonitor *channel_monitor, ThreadLooper *thread_looper) | |
~DataService ()=default | |
DataService (const DataService &)=delete | |
DataService & | operator= (const DataService &)=delete |
void | HandleActivateDataCall (const Client &client, const std::string &command) |
void | HandleQueryDataCallList (const Client &client) |
void | HandlePDPContext (const Client &client, const std::string &command) |
void | HandleQueryPDPContextList (const Client &client) |
void | HandleEnterDataState (const Client &client, const std::string &command) |
void | HandleReadDynamicParam (const Client &client, const std::string &command) |
void | onUpdatePhysicalChannelconfigs (int modem_tech, int freq, int cellBandwidthDownlink) |
![]() | |
virtual | ~ModemService ()=default |
ModemService (const ModemService &)=delete | |
ModemService & | operator= (const ModemService &)=delete |
bool | HandleModemCommand (const Client &client, std::string command) |
void | CloseRemoteConnection (ClientId remote_client) |
Private Member Functions | |
std::vector< CommandHandler > | InitializeCommandHandlers () |
void | InitializeServiceState () |
void | sendOnePhysChanCfgUpdate (int status, int bandwidth, int rat, int freq, int id) |
void | updatePhysicalChannelconfigs (int modem_tech, int freq, int cellBandwidthDownlink, int count) |
Private Attributes | |
std::vector< PDPContext > | pdp_context_ |
Additional Inherited Members | |
![]() | |
static constexpr char | kCmeErrorOperationNotAllowed [] = "+CME ERROR: 3" |
static constexpr char | kCmeErrorOperationNotSupported [] = "+CME ERROR: 4" |
static constexpr char | kCmeErrorSimNotInserted [] = "+CME ERROR: 10" |
static constexpr char | kCmeErrorSimPinRequired [] = "+CME ERROR: 11" |
static constexpr char | kCmeErrorSimPukRequired [] = "+CME ERROR: 12" |
static constexpr char | kCmeErrorSimBusy [] = "+CME ERROR: 14" |
static constexpr char | kCmeErrorIncorrectPassword [] = "+CME ERROR: 16" |
static constexpr char | kCmeErrorMemoryFull [] = "+CME ERROR: 20" |
static constexpr char | kCmeErrorInvalidIndex [] = "+CME ERROR: 21" |
static constexpr char | kCmeErrorNotFound [] = "+CME ERROR: 22" |
static constexpr char | kCmeErrorInvalidCharactersInTextString [] |
static constexpr char | kCmeErrorNoNetworkService [] = "+CME ERROR: 30" |
static constexpr char | kCmeErrorNetworkNotAllowedEmergencyCallsOnly [] |
static constexpr char | kCmeErrorInCorrectParameters [] = "+CME ERROR: 50" |
static constexpr char | kCmeErrorNetworkNotAttachedDueToMTFunctionalRestrictions [] |
static constexpr char | kCmeErrorFixedDialNumberOnlyAllowed [] |
static constexpr char | kCmsErrorOperationNotAllowed [] = "+CMS ERROR: 302" |
static constexpr char | kCmsErrorOperationNotSupported [] = "+CMS ERROR: 303" |
static constexpr char | kCmsErrorInvalidPDUModeParam [] = "+CMS ERROR: 304" |
static constexpr char | kCmsErrorSCAddressUnknown [] = "+CMS ERROR: 304" |
static constexpr std::pair< int, int > | kRemotePortRange {6520, 6527} |
![]() | |
ModemService (int32_t service_id, std::vector< CommandHandler > command_handlers, ChannelMonitor *channel_monitor, ThreadLooper *thread_looper) | |
void | HandleCommandDefaultSupported (const Client &client) |
void | SendUnsolicitedCommand (std::string unsol_command) |
cuttlefish::SharedFD | ConnectToRemoteCvd (std::string port) |
void | SendCommandToRemote (ClientId remote_client, std::string response) |
![]() | |
static std::string | GetHostId () |
![]() | |
int32_t | service_id_ |
const std::vector< CommandHandler > | command_handlers_ |
ThreadLooper * | thread_looper_ |
ChannelMonitor * | channel_monitor_ |
cuttlefish::DataService::DataService | ( | int32_t | service_id, |
ChannelMonitor * | channel_monitor, | ||
ThreadLooper * | thread_looper | ||
) |
|
default |
|
delete |
void cuttlefish::DataService::HandleActivateDataCall | ( | const Client & | client, |
const std::string & | command | ||
) |
AT+CGACT The execution command is used to activate or deactivate the specified PDP context(s).
Command Possible response(s) +CGACT=[<state>[,<cid> OK [,<cid>[,...]]]] +CME ERROR: <err> +CGACT? [+CGACT: <cid>,<state>] [<CR><LF>+CGACT: <cid>,<state>[...]] <state>: integer type; indicates the state of PDP context activation. 0: deactivated 1: activated <cid>: (PDP Context Identifier) integer(1~15), specifies the PDP context ID.
see RIL_REQUEST_SETUP_DATA_CALL in RIL
void cuttlefish::DataService::HandleEnterDataState | ( | const Client & | client, |
const std::string & | command | ||
) |
AT+CGDATA The execution command causes the MT to perform whatever actions are necessary to establish communication between the TE and the network using one or more Packet Domain PDP types.
Command Possible response(s) +CGDATA[=<L2P>[,[,<cid> CONNECT [,...]]]] ERROR +CME ERROR: <err>
<L2P>: string type; indicates the layer 2 protocol to be used between the TE and MT NULL none, for PDP type OSP:IHOSS (Obsolete) value: PPP, PAD, X25, M-xxxx <cid>: see AT+CGACT
see RIL_REQUEST_SETUP_DATA_CALL in RIL
void cuttlefish::DataService::HandlePDPContext | ( | const Client & | client, |
const std::string & | command | ||
) |
AT+CGDCONT The set command specifies PDP context parameter values for a PDP context identified by the (local) context identification parameter, <cid>.
Command Possible response(s) +CGDCONT=[<cid>[,<PDP_type>[,<APN> OK [,<PDP_addr>[,<d_comp> [,<h_comp>] +CME ERROR: <err> ]]]]] +CGDCONT? +CGDCONT: <cid>,<pdp_type>,<APN>, <pdp_addr>,<d_comp>,<h_comp><CR><LF> [+CGDCONT: <cid>,<pdp_type>,<APN>, <pdp_addr>,<d_comp>,<h_comp><CR><LF>[...]] OK <cid>: see AT+CGACT <PDP_type>: string type; specifies the type of packet data protocol. Value: X.25, IP, IPV6, IPV4V6, OSPIH, PPP, Non-IP,Ethernet <APN>: string type; a logical name that is used to select the GGSN or the external packet data network.If the value is null or omitted, then the subscription value will be requested <PDP_addr>: string type; identifies the MT in the address space applicable to the PDP <d_comp>: integer type; controls PDP data compression <h_comp>: integer type; controls PDP header compression
see RIL_REQUEST_SETUP_DATA_CALL in RIL
void cuttlefish::DataService::HandleQueryDataCallList | ( | const Client & | client | ) |
see AT+CGACT
void cuttlefish::DataService::HandleQueryPDPContextList | ( | const Client & | client | ) |
see AT+CGDCONT above
void cuttlefish::DataService::HandleReadDynamicParam | ( | const Client & | client, |
const std::string & | command | ||
) |
AT+CGCONTRDP The execution command returns the relevant information for an active non secondary PDP context with the context identifier <cid>.
Command Possible response(s) +CGCONTRDP[=<cid>] [+CGCONTRDP: <cid>,<bearer_id>,<apn> [,<local_addr and subnet_mask>[,<gw_addr> [,<DNS_prim_addr>[<DNS_sec_addr>[...]]]]]] [<CR><LF>+CGCONTRDP: <cid>,<bearer_id>,<apn> [,<local_addr and subnet_mask>[,<gw_addr> [,<DNS_prim_addr>[<DNS_sec_addr>[...]]]]]]
<cid>: see AT+CGACT <bearer_id>: integer type; identifies the bearer, i.e. the EPS bearer and the NSAPI. <local_addr and subnet_mask>: string type; shows the IP address and subnet mask of the MT. <gw_addr>: string type; shows the Gateway Address of the MT. The string is given as dot-separated numeric (0-255) parameters. <DNS_prim_addr>: string type; shows the IP address of the primary DNS server. <DNS_sec_addr>: string type; shows the IP address of the secondary DNS server.
see RIL_REQUEST_SETUP_DATA_CALL in RIL
|
private |
|
private |
void cuttlefish::DataService::onUpdatePhysicalChannelconfigs | ( | int | modem_tech, |
int | freq, | ||
int | cellBandwidthDownlink | ||
) |
|
delete |
|
private |
|
private |
|
private |