u8 modem_sms( u8 *ucBuffer ) { PYGMYCOMMAND pygmyCmd1, pygmyCmd2, pygmyCmdCMGF; //streamSetActionChars( MODEM_COM, "\r>" ); //cmdInitQueue( &globalModemQueue ); copyString( getNextSubString( ucBuffer, WHITESPACE ), globalModemSMS.PhoneNumber ); copyString( getNextSubString( NULL, NEWLINE ), globalModemSMS.Message ); //print( MODEM_DEBUG, "\rSending \"%s\"", globalModemSMS.Message ); // set SMS format //pygmyCmdCMGF.Name = (u8*)AT_CMGF; //pygmyCmdCMGF.PrintHandler = print_CMGF; //pygmyCmdCMGF.EventHandler = handler_ATCMGF; //pygmyCmdCMGF.Expire = 2; //pygmyCmdCMGF.Retry = 1; pygmyCmd1.Name = ">"; pygmyCmd1.Expire = 2; pygmyCmd1.Retry = 0; pygmyCmd1.EventHandler = handler_ATSMSPROMPT; pygmyCmd1.PrintHandler = print_CMGS; pygmyCmd2.Name = (u8*)AT_CMGS; pygmyCmd2.Expire = 2; pygmyCmd2.Retry = 1; pygmyCmd2.EventHandler = handler_ATCMGS; pygmyCmd2.PrintHandler = print_CMGSMessage; //cmdQueue( &globalModemQueue, &pygmyCmdCMGF ); cmdQueue( &globalModemQueue, &pygmyCmd1 ); cmdQueue( &globalModemQueue, &pygmyCmd2 ); return( TRUE ); }
u8 pftp_close( u8 *ucBuffer ) { PYGMYCOMMAND pygmyCmd; pygmyCmd.Name = "close"; pygmyCmd.PrintHandler = (void *)print_pftp_close; pygmyCmd.EventHandler = (void *)pftp_close_handler; pygmyCmd.Expire = 2; pygmyCmd.Retry = 1; cmdQueue( &globalModemQueue, &pygmyCmd ); }
u8 pftp_get( u8 *ucBuffer ) { PYGMYCOMMAND pygmyCmd; pygmyCmd.Name = "pftp"; pygmyCmd.PrintHandler = (void *)print_pftp_get; pygmyCmd.EventHandler = (void *)pftp_handler; pygmyCmd.Expire = 7; pygmyCmd.Retry = 3; cmdQueue( &globalModemQueue, &pygmyCmd ); }
void email_wait( void ) { PYGMYCOMMAND pygmyCmd; pygmyCmd.Name = (u8*)"wait"; pygmyCmd.PrintHandler = print_wait; pygmyCmd.EventHandler = email_get; pygmyCmd.Expire = 15; pygmyCmd.Retry = 0; // only a pause to allow prompt from smtp server cmdQueue( &globalModemQueue, &pygmyCmd ); }
void email_quit( void ) { PYGMYCOMMAND pygmyCmd; pygmyCmd.Name = (u8*)EMAIL_QUIT; pygmyCmd.PrintHandler = print_QUIT; pygmyCmd.EventHandler = email_get; pygmyCmd.Expire = 15; pygmyCmd.Retry = 3; cmdQueue( &globalModemQueue, &pygmyCmd ); }
void email_body( void ) { PYGMYCOMMAND pygmyCmd; pygmyCmd.Name = "email"; pygmyCmd.PrintHandler = print_EMAILBODY; pygmyCmd.EventHandler = email_get; pygmyCmd.Expire = 15; pygmyCmd.Retry = 0; cmdQueue( &globalModemQueue, &pygmyCmd ); }
void email_RCPT( void ) { PYGMYCOMMAND pygmyCmd; pygmyCmd.Name = (u8*)EMAIL_RCPT; pygmyCmd.PrintHandler = print_RCPT; pygmyCmd.EventHandler = email_get; pygmyCmd.Expire = 10; pygmyCmd.Retry = 1; cmdQueue( &globalModemQueue, &pygmyCmd ); }
u8 modem_detach( u8 *ucBuffer ) { PYGMYCOMMAND pygmyCmd; pygmyCmd.Name = (u8*)AT_SGACT; pygmyCmd.PrintHandler = print_SGACT0; pygmyCmd.EventHandler = handler_ATSGACT; pygmyCmd.Expire = 2; pygmyCmd.Retry = 4; cmdQueue( &globalModemQueue, &pygmyCmd ); return( FALSE ); }
u8 modem_time( u8 *ucBuffer ) { PYGMYCOMMAND pygmyCmd; pygmyCmd.Name = (u8*)AT_CCLK; pygmyCmd.PrintHandler = print_CCLK; pygmyCmd.EventHandler = handler_ATCCLK; pygmyCmd.Expire = 2; pygmyCmd.Retry = 2; cmdQueue( &globalModemQueue, &pygmyCmd ); return( TRUE ); }
u8 modem_carrier( u8 *ucBuffer ) { PYGMYCOMMAND pygmyCmd; pygmyCmd.Name = (u8*)AT_SERVINFO; pygmyCmd.PrintHandler = print_SERVINFO; pygmyCmd.EventHandler = handler_ATSERVINFO; pygmyCmd.Expire = 4; pygmyCmd.Retry = 2; cmdQueue( &globalModemQueue, &pygmyCmd ); return( TRUE ); }
u8 modem_http( u8 *ucBuffer ) { PYGMYCOMMAND pygmyCmd; pygmyCmd.Name = "GET"; pygmyCmd.PrintHandler = print_http; pygmyCmd.EventHandler = handler_ATGET; pygmyCmd.Expire = 15; pygmyCmd.Retry = 2; cmdQueue( &globalModemQueue, &pygmyCmd ); return( FALSE ); }
u8 modem_sd( u8 *ucBuffer ) { // Socket Dial, used to open internet connection PYGMYCOMMAND pygmyCmd; pygmyCmd.Name = (u8*)AT_SD; pygmyCmd.PrintHandler = print_SD; pygmyCmd.EventHandler = handler_ATSD; pygmyCmd.Expire = 60; pygmyCmd.Retry = 3; cmdQueue( &globalModemQueue, &pygmyCmd ); return( TRUE ); }
u8 modem_suspend( u8 *ucBuffer ) { PYGMYCOMMAND pygmyCmd; pygmyCmd.Name = (u8*)AT_ESCAPE; pygmyCmd.PrintHandler = print_ATESCAPE; pygmyCmd.EventHandler = handler_ATESCAPE; pygmyCmd.Expire = 1; pygmyCmd.Retry = 0; cmdQueue( &globalModemQueue, &pygmyCmd ); return( FALSE ); }
u8 modem_portal( u8 *ucBuffer ) { // Applies portal settings currently configured ( APN ) PYGMYCOMMAND pygmyCmd; pygmyCmd.Name = (u8*)AT_CGDCONT; pygmyCmd.PrintHandler = print_CGDCONT; pygmyCmd.EventHandler = handler_ATCGDCONT; pygmyCmd.Expire = 4; pygmyCmd.Retry = 1; cmdQueue( &globalModemQueue, &pygmyCmd ); return( TRUE ); }
CLWCommandQueue CLWCommandQueue::Create(CLWDevice device, CLWContext context) { cl_int status = CL_SUCCESS; cl_command_queue commandQueue = clCreateCommandQueue(context, device, CL_QUEUE_PROFILING_ENABLE, &status); ThrowIf(status != CL_SUCCESS, status, "clCreateCommandQueue failed"); CLWCommandQueue cmdQueue(commandQueue); clReleaseCommandQueue(commandQueue); return cmdQueue; }
u8 modem_close( u8 *ucBuffer ) { PYGMYCOMMAND pygmyCmd; u8 *ucParams[ 2 ], ucLen; ucLen = getAllSubStrings( ucBuffer, ucParams, 2, WHITESPACE|PUNCT ); if( isStringSameIgnoreCase( ucParams[ 0 ], "now" ) ){ cmdInitQueue( &globalModemQueue ); } else{ pygmyCmd.Name = (u8*)AT_SH; pygmyCmd.PrintHandler = print_SH; pygmyCmd.EventHandler = handler_ATSH; pygmyCmd.Expire = 2; pygmyCmd.Retry = 1; cmdQueue( &globalModemQueue, &pygmyCmd ); } // else return( TRUE ); }