ublox_cellular/command/control/
mod.rs

1//! ### 15 - V24 control and V25ter
2//! These commands, unless specifically stated, do not implement set syntax using "=", read ("?"), or test ("=?").
3//! If such commands are used, the "+CME ERROR: unknown" or "+CME ERROR: 100" error result code is provided
4//! (depending on the +CMEE AT command setting).
5// pub mod responses;
6pub mod types;
7
8use atat::atat_derive::AtatCmd;
9use types::*;
10
11use super::NoResponse;
12
13/// 15.2 Circuit 109 behavior &C
14///
15/// Controls how the state of RS232 circuit 109 - Data Carrier Detect (DCD) -
16/// relates to the detection of received line signal from the remote end.
17///
18/// **NOTES:**
19/// - **LARA-R211 / SARA-U201-04A / SARA-U201-04B / SARA-U201-04X /
20///   SARA-G450-01C / SARA-G340-02S / SARA-G340-02X / SARA-G350-02A /
21///   SARA-G350-02S / SARA-G350-02X** - On the AUX UART interface the command is
22///   not effective.
23#[derive(Clone, AtatCmd)]
24#[at_cmd("&C", NoResponse, value_sep = false)]
25pub struct SetCircuit109Behaviour {
26    #[at_arg(position = 0)]
27    pub value: Circuit109Behaviour,
28}
29
30/// 15.3 Circuit 108/2 behavior &D
31///
32/// Controls how the state of RS232 circuit 108/2 - Data Terminal Ready (DTR) -
33/// relates to changes from ON to OFF condition during on-line data state.
34#[derive(Clone, AtatCmd)]
35#[at_cmd("&D", NoResponse, value_sep = false)]
36pub struct SetCircuit108Behaviour {
37    #[at_arg(position = 0)]
38    pub value: Circuit108Behaviour,
39}
40/// 15.5 Flow control &K
41///
42/// Controls the flow control mechanism. The following settings are allowed:
43/// - No flow control
44/// - HW flow control also referred with RTS / CTS flow control
45/// - SW flow control also referred with XON / XOFF flow control
46#[derive(Clone, AtatCmd)]
47#[at_cmd("&K", NoResponse, value_sep = false)]
48pub struct SetFlowControl {
49    #[at_arg(position = 0)]
50    pub value: FlowControl,
51}
52
53/// 15.8 Set flow control \Q
54///
55/// Controls the operation of the local flow control between DTE and DCE. It is
56/// used when the data are sent or received. When the software flow control
57/// (XON/XOFF) is used, the DC1 (XON, 0x11) and DC3 (XOFF, 0x13) characters are
58/// reserved and therefore filtered (e.g. in SMS text mode these two characters
59/// can not be input). Since the DTE-DCE communication relies on the correct
60/// reception of DC1/DC3 characters, the UART power saving should be disabled on
61/// the module when SW flow control is used. If the UART power saving is active,
62/// the DC1/DC3 characters could be used to wake up the module's UART, and
63/// therefore lost. In case a DC3 character (XOFF) is correctly received by
64/// module's UART and some data is waiting to be transmitted, the module is
65/// forced to stay awake until a subsequent DC1 character (XON) is received.
66#[derive(Clone, AtatCmd)]
67#[at_cmd("\\Q", NoResponse, value_sep = false)]
68pub struct SetSoftwareFlowControl {
69    #[at_arg(position = 0)]
70    pub value: SoftwareFlowControl,
71}
72
73/// 15.9 UART data rate configuration +IPR
74///
75/// Specifies the data rate at which the DCE accepts commands on the UART
76/// interface. The full range of data rates depends on HW or other criteria.
77#[derive(Clone, AtatCmd)]
78#[at_cmd("+IPR", NoResponse)]
79pub struct SetDataRate {
80    #[at_arg(position = 0)]
81    pub rate: BaudRate,
82}
83
84/// 15.25 Set to factory defined configuration &F
85///
86/// Resets the current profile to factory-programmed setting. Other NVM
87/// settings, not included in the profiles, are not affected. In case of
88/// success, the response is issued using the configuration of the result codes
89/// format (Q, V, S3, S4 AT commands) loaded from the factory-programmed
90/// profile. The other DCE settings are applied after the response has been
91/// sent.
92#[derive(Clone, AtatCmd)]
93#[at_cmd("&F", NoResponse)]
94pub struct FactoryResetConfig;