package gammu
Library
Module
Module type
Parameter
Class
Class type
Informations on the phone.
type battery_charge = {
battery_type : battery_type;
(*Battery type.
*)battery_capacity : int;
(*Remaining battery capacity (in mAh).
*)battery_percent : int;
(*Remaining battery capacity in percent, -1 = unknown.
*)charge_state : charge_state;
(*Charge state.
*)battery_voltage : int;
(*Current battery voltage (in mV).
*)charge_voltage : int;
(*Voltage from charger (in mV).
*)charge_current : int;
(*Current from charger (in mA).
*)phone_current : int;
(*Phone current consumption (in mA).
*)battery_temperature : int;
(*Battery temperature (in degrees Celsius).
*)phone_temperature : int;
(*Phone temperature (in degrees Celsius).
*)
}
type phone_model = {
model : string;
(*Model as returned by phone
*)number : string;
(*Identification by Gammu
*)irda : string;
(*Model as used over IrDA
*)
}
Model identification, used for finding phone features.
type network = {
cid : string;
(*Cell ID (CID)
*)code : string;
(*GSM network code
*)state : network_state;
(*Status of network logging.
*)lac : string;
(*LAC (Local Area Code)
*)name : string;
(*Name of current netwrok as returned from phone (or empty)
*)gprs : gprs_state;
(*GRPS state
*)packet_cid : string;
(*Cell ID (CID) for packet network
*)packet_state : network_state;
(*Status of network logging for packet data.
*)packet_lac : string;
(*LAC (Local Area Code) for packet network
*)
}
Current network informations
and network_state =
| HomeNetwork
(*Home network for used SIM card.
*)| NoNetwork
(*No network available for used SIM card.
*)| RoamingNetwork
(*SIM card uses roaming.
*)| RegistrationDenied
(*Network registration denied
- card blocked or expired or disabled.
| Unknown_network
(*Unknown network status.
*)| RequestingNetwork
(*Network explicitely requested by user.
*)
Information about signal quality, all these should be -1 when unknown.
network_code_name code
returns the name the network designed by the code code
, of the form "[0-9]{3} [0-9]{2}".
country_code_name code
returns the name of the country designed by the code code
, of the form "[0-9]{3}" (the first 3 digits of the network code).
val battery_charge : t -> battery_charge
val hardware : t -> string
val imei : t -> string
val manufacture_month : t -> string
val manufacturer : t -> string
val model : t -> string
val model_info : t -> phone_model
val product_code : t -> string
val signal_quality : t -> signal_quality