ocpp/v2_0_1/datatype/apn
OCPP 2.0.1 Apn data type (schema APNType).
to_json/decoder map to/from its OCPP-J JSON object; new (when
present) builds a value from the required fields only.
Types
Collection of configuration data needed to make a data-connection over a cellular network.
NOTE: When asking a GSM modem to dial in, it is possible to specify which mobile operator should be used. This can be done with the mobile country code (MCC) in combination with a mobile network code (MNC). Example: If your preferred network is Vodafone Netherlands, the MCC=204 and the MNC=04 which means the key PreferredNetwork = 20404 Some modems allows to specify a preferred network, which means, if this network is not available, a different network is used. If you specify UseOnlyPreferredNetwork and this network is not available, the modem will not dial in.
| Field | Type | Req | Description |
|---|---|---|---|
apn | String | ✓ | The Access Point Name as an URL. (max 512 chars) |
apn_authentication | ApnAuthentication | ✓ | |
apn_password | String | — | APN Password. (max 20 chars) |
apn_user_name | String | — | APN username. (max 20 chars) |
custom_data | CustomData | — | |
preferred_network | String | — | Preferred network, written as MCC and MNC concatenated. See note. (max 6 chars) |
sim_pin | Int | — | SIM card pin code. |
use_only_preferred_network | Bool | — | Default: false. Use only the preferred Network, do not dial in when not available. See Note. |
Schema: APNType · APN · urn:x-oca:ocpp:uid:2:233134
pub type Apn {
Apn(
apn: String,
apn_authentication: apn_authentication.ApnAuthentication,
apn_password: option.Option(String),
apn_user_name: option.Option(String),
custom_data: option.Option(custom_data.CustomData),
preferred_network: option.Option(String),
sim_pin: option.Option(Int),
use_only_preferred_network: option.Option(Bool),
)
}
Constructors
-
Apn( apn: String, apn_authentication: apn_authentication.ApnAuthentication, apn_password: option.Option(String), apn_user_name: option.Option(String), custom_data: option.Option(custom_data.CustomData), preferred_network: option.Option(String), sim_pin: option.Option(Int), use_only_preferred_network: option.Option(Bool), )
Values
pub fn decoder() -> decode.Decoder(Apn)
Decode a Apn from its OCPP-J JSON object, enforcing schema constraints.
pub fn new(
apn apn: String,
apn_authentication apn_authentication: apn_authentication.ApnAuthentication,
) -> Apn
Construct a Apn from its required fields, with every optional field set to None.