Skip to content

Commit

Permalink
Adjusted scripts indentation (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
rebatoma committed Jul 18, 2022
1 parent 4ebce5a commit ad29cb2
Show file tree
Hide file tree
Showing 53 changed files with 2,492 additions and 2,497 deletions.
18 changes: 9 additions & 9 deletions at_scripts/cell_modem/cell_all_hexCmd_networkReg_basic.atl
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************
* Synopsis: cell_all_hexCmd_networkReg_basic.atl
* Topic: cell_modem
* Version: 1.0
* Author: hmeh, bkha
* Description:
* This script has the purpose to test the network registration
* using SENDHEX() macro.
* Synopsis: cell_all_hexCmd_networkReg_basic.atl
* Topic: cell_modem
* Version: 1.0
* Author: hmeh, bkha
* Description:
* This script has the purpose to test the network registration
* using SENDHEX() macro.
******************************************************************************
* Modules: All Products
* Tested on: LARA-R2
* Modules: All Products
* Tested on: LARA-R2
******************************************************************************/

// sending AT command in HEX
Expand Down
60 changes: 30 additions & 30 deletions at_scripts/cell_modem/cell_all_hfc_ctsrts_basic.atl
Original file line number Diff line number Diff line change
Expand Up @@ -13,52 +13,52 @@
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************
* Synopsis: cell_all_hfc_ctsrts_basic.atl
* Topic: cell_modem
* Version: 1.0
* Author: hmeh, bkha
* Description:
* This script has the purpose to test the flow control line status using
* CTS and RTS lines.
* bool GETCOMCTS(void): return the status of CTS line
* void SETCOMRTS(bool &in): sets the RTS with value = 'in'
* Synopsis: cell_all_hfc_ctsrts_basic.atl
* Topic: cell_modem
* Version: 1.0
* Author: hmeh, bkha
* Description:
* This script has the purpose to test the flow control line status using
* CTS and RTS lines.
* bool GETCOMCTS(void): return the status of CTS line
* void SETCOMRTS(bool &in): sets the RTS with value = 'in'
******************************************************************************
* Modules: All Products
* Tested on: SARA-R42
* Modules: All Products
* Tested on: SARA-R42
******************************************************************************/

void send_AT_command(string cmd, int ms_timeout, string exp_resp){
PAUSE(50);
string resp = SENDAT(cmd, ms_timeout, exp_resp);
ECHO("response = " + resp);
PAUSE(50);
string resp = SENDAT(cmd, ms_timeout, exp_resp);
ECHO("response = " + resp);
}

void update_status(){
ECHO("GET updated status");
ECHO("{DSR:" + GETCOMDSR()+"},{RI:" + GETCOMRI()+"},{DCD:" + GETCOMDCD()+"}");
ECHO("GET updated status");
ECHO("{DSR:" + GETCOMDSR()+"},{RI:" + GETCOMRI()+"},{DCD:" + GETCOMDCD()+"}");
}

void RTS_testing(){
ECHO("RTS TESTING START");
ECHO("RTS TESTING START");

ECHO("SET RTS TO FALSE");
SETCOMRTS(false);
ECHO("SET RTS TO FALSE");
SETCOMRTS(false);

PAUSE(3000);
send_AT_command("ATI9", 3000, "OK");
PAUSE(3000);
send_AT_command("ATI9", 3000, "OK");

update_status();
PAUSE(3000);
ECHO("SET RTS TO TRUE");
SETCOMRTS(true);
update_status();
PAUSE(3000);
ECHO("SET RTS TO TRUE");
SETCOMRTS(true);

update_status();
update_status();

ECHO("RTS TESTING END");
ECHO("RTS TESTING END");
}

void main(){
update_status();
RTS_testing();
update_status();
RTS_testing();
}
70 changes: 35 additions & 35 deletions at_scripts/cell_modem/cell_all_hfc_dsrdtr_basic.atl
Original file line number Diff line number Diff line change
Expand Up @@ -13,62 +13,62 @@
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************
* Synopsis: cell_all_hfc_dsrdtr_basic.atl
* Topic: cell_modem
* Version: 1.0
* Author: hmeh, bkha
* Synopsis: cell_all_hfc_dsrdtr_basic.atl
* Topic: cell_modem
* Version: 1.0
* Author: hmeh, bkha
* Description:
* This script has the purpose to test the flow control line status
* using DSR and DTR lines.
* bool GETCOMDSR(void): return the status of DSR line
* bool GETCOMRI(void): return the status of RI line
* bool GETCOMDCD(void): return the status of DCD line
* void SETCOMDTR(bool &in): sets the DTR with value = 'in'
* This script has the purpose to test the flow control line status
* using DSR and DTR lines.
* bool GETCOMDSR(void): return the status of DSR line
* bool GETCOMRI(void): return the status of RI line
* bool GETCOMDCD(void): return the status of DCD line
* void SETCOMDTR(bool &in): sets the DTR with value = 'in'
******************************************************************************
* Modules: All Products
* Tested on: SARA-R42
* Modules: All Products
* Tested on: SARA-R42
******************************************************************************/


void send_AT_command(string cmd, int ms_timeout, string exp_resp){
PAUSE(50);
string resp = SENDAT(cmd, ms_timeout, exp_resp);
ECHO("response = " + resp);
PAUSE(50);
string resp = SENDAT(cmd, ms_timeout, exp_resp);
ECHO("response = " + resp);
}

void update_status(){
ECHO("GET updated status");
ECHO("{DSR:" + GETCOMDSR()+"},{RI:" + GETCOMRI()+"},{DCD:" + GETCOMDCD()+"}");
ECHO("GET updated status");
ECHO("{DSR:" + GETCOMDSR()+"},{RI:" + GETCOMRI()+"},{DCD:" + GETCOMDCD()+"}");
}

void DTR_testing(){
ECHO("DTR TESTING START");
ECHO("DTR TESTING START");

send_AT_command("AT+UPSV=3", 1000, "OK");
send_AT_command("AT+UPSV=3", 1000, "OK");

send_AT_command("AT+UPSV?", 1000, "OK");
send_AT_command("AT+UPSV?", 1000, "OK");

ECHO("SET DTR TO FALSE");
SETCOMDTR(false);
PAUSE(100);
update_status();
ECHO("SET DTR TO FALSE");
SETCOMDTR(false);
PAUSE(100);
update_status();

send_AT_command("AT", 100, "OK");
send_AT_command("AT", 100, "OK");

update_status();
PAUSE(2000);
update_status();
PAUSE(2000);

ECHO("SET DTR TO TRUE");
SETCOMDTR(true);
ECHO("SET DTR TO TRUE");
SETCOMDTR(true);

update_status();
PAUSE(2000);
send_AT_command("AT+UPSV=0", 1000, "OK");
update_status();
PAUSE(2000);
send_AT_command("AT+UPSV=0", 1000, "OK");

ECHO("DTR TESTING END");
ECHO("DTR TESTING END");
}

void main(){
update_status();
DTR_testing();
update_status();
DTR_testing();
}
14 changes: 7 additions & 7 deletions at_scripts/cell_modem/cell_all_network_genericCommands_basic.atl
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************
* Synopsis: cell_all_network_genericCommands_basic.atl
* Topic: cell_modem
* Version: 1.0
* Author: bkha
* Synopsis: cell_all_network_genericCommands_basic.atl
* Topic: cell_modem
* Version: 1.0
* Author: bkha
* Description:
* This script has the purpose to test network related generic commands.
* This script has the purpose to test network related generic commands.
******************************************************************************
* Modules: All Products
* Tested on: LARA-R2
* Modules: All Products
* Tested on: LARA-R2
******************************************************************************/

AT+COPS?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************
* Synopsis: cell_all_network_registrationCommands_advance.atl
* Topic: cell_modem
* Version: 1.0
* Author: bkha
* Synopsis: cell_all_network_registrationCommands_advance.atl
* Topic: cell_modem
* Version: 1.0
* Author: bkha
* Description:
* This script has the purpose to test network related advance commands.
* This script has the purpose to test network related advance commands.
******************************************************************************
* Modules: All Products
* Tested on: LARA-R2
* Modules: All Products
* Tested on: LARA-R2
******************************************************************************/

ECHO("Comment lines from the script which are not applicable to the target module");
Expand Down
20 changes: 10 additions & 10 deletions at_scripts/cell_modem/cell_all_network_urc_advance.atl
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************
* Synopsis: cell_all_network_urc_advance.atl
* Topic: cell_modem
* Version: 1.0
* Author: bkha
* Synopsis: cell_all_network_urc_advance.atl
* Topic: cell_modem
* Version: 1.0
* Author: bkha
* Description:
* This script has the purpose to test the network registration with URC
* using AT scripting macros.
* This script has the purpose to test the network registration with URC
* using AT scripting macros.
******************************************************************************
* Modules: All Products
* Tested on: LARA-R2
* Modules: All Products
* Tested on: LARA-R2
******************************************************************************/


Expand All @@ -49,10 +49,10 @@ string resp1 = WAIT(command, 30000);

if(FIND(resp1, "+CREG: 1") != -1)
{
ECHO("Registered on network (HPLMN)");
ECHO("Registered on network (HPLMN)");
}
else
{
ECHO("Registration status to be checked (not HPLMN)");
ECHO("Registration status to be checked (not HPLMN)");
}

Loading

0 comments on commit ad29cb2

Please sign in to comment.