ocpp/v2_1/datatype/apn

OCPP 2.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.

FieldTypeReqDescription
apnStringThe Access Point Name as an URL. (max 2000 chars)
apn_authenticationApnAuthentication
apn_passwordString(2.1) APN Password. (max 64 chars)
apn_user_nameStringAPN username. (max 50 chars)
custom_dataCustomData
preferred_networkStringPreferred network, written as MCC and MNC concatenated. See note. (max 6 chars)
sim_pinIntSIM card pin code.
use_only_preferred_networkBoolDefault: false. Use only the preferred Network, do not dial in when not available. See Note.

Schema: APNType

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

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.

pub fn to_json(value: Apn) -> json.Json

Encode a Apn to its OCPP-J JSON object.

Search Document