Arduino  1.8.10
GSM3VoiceCallService クラス

#include <GSM3VoiceCallService.h>

公開メンバ関数

 GSM3VoiceCallService (bool synch=true)
 
GSM3_voiceCall_st getvoiceCallStatus ()
 
int ready ()
 
int voiceCall (const char *to, unsigned long timeout=30000)
 
int answerCall ()
 
int hangCall ()
 
int retrieveCallingNumber (char *buffer, int bufsize)
 

詳解

GSM3VoiceCallService.h40 行目に定義があります。

構築子と解体子

◆ GSM3VoiceCallService()

GSM3VoiceCallService::GSM3VoiceCallService ( bool  synch = true)

Service creation

引数
synchIf true, the service calls are synchronois

GSM3VoiceCallService.cpp48 行目に定義があります。

49 {
50  if(synch)
53 }
GSM3MobileVoiceProvider * theGSM3MobileVoiceProvider
#define GSM3VOICECALLSERVICE_SYNCH

関数詳解

◆ answerCall()

int GSM3VoiceCallService::answerCall ( )

Accept an incoming voice call

戻り値
In asynchronous mode returns 0 if last command is still executing, 1 success, >1 error In synchronous mode returns 1 if the call is answered, 0 if not.

GSM3VoiceCallService.cpp97 行目に定義があります。

98 {
100  return 0;
101 
102  return waitForAnswerIfNeeded(theGSM3MobileVoiceProvider->answerCall());
103 }
GSM3MobileVoiceProvider * theGSM3MobileVoiceProvider
virtual int answerCall()=0

◆ getvoiceCallStatus()

GSM3_voiceCall_st GSM3VoiceCallService::getvoiceCallStatus ( )

Voice call status

戻り値
Status of the voice call, as described in GSM3MobileVoiceProvider.h { IDLE_CALL, CALLING, RECEIVINGCALL, TALKING};

GSM3VoiceCallService.cpp55 行目に定義があります。

56 {
58  return IDLE_CALL;
59 
61 }
virtual GSM3_voiceCall_st getvoiceCallStatus()=0
GSM3MobileVoiceProvider * theGSM3MobileVoiceProvider

◆ hangCall()

int GSM3VoiceCallService::hangCall ( )

Hang a stablished call or an incoming ring

戻り値
In asynchronous mode returns 0 if last command is still executing, 1 success, >1 error In synchronous mode returns 1 if the call is answered, 0 if not.

GSM3VoiceCallService.cpp105 行目に定義があります。

106 {
108  return 0;
109 
110  return waitForAnswerIfNeeded(theGSM3MobileVoiceProvider->hangCall());
111 }
GSM3MobileVoiceProvider * theGSM3MobileVoiceProvider
virtual int hangCall()=0

◆ ready()

int GSM3VoiceCallService::ready ( )

Get last command status

戻り値
Returns 0 if last command is still executing, 1 success, >1 error

GSM3VoiceCallService.cpp63 行目に定義があります。

64 {
66  return 0;
67 
69 }
GSM3MobileVoiceProvider * theGSM3MobileVoiceProvider
virtual int ready()=0

◆ retrieveCallingNumber()

int GSM3VoiceCallService::retrieveCallingNumber ( char *  buffer,
int  bufsize 
)

Retrieve the calling number, put it in buffer

引数
bufferpointer to the buffer memory
bufsizesize of available memory area, at least should be 10 characters
戻り値
In asynchronous mode returns 0 if last command is still executing, 1 success, >1 error In synchronous mode returns 1 if the number is correcty taken 0 if not

GSM3VoiceCallService.cpp113 行目に定義があります。

114 {
116  return 0;
117 
118  return waitForAnswerIfNeeded(theGSM3MobileVoiceProvider->retrieveCallingNumber(buffer, bufsize));
119 }
char buffer[42]
GSM3MobileVoiceProvider * theGSM3MobileVoiceProvider
virtual int retrieveCallingNumber(char *buffer, int bufsize)=0

◆ voiceCall()

int GSM3VoiceCallService::voiceCall ( const char *  to,
unsigned long  timeout = 30000 
)

Place a voice call. If asynchronous, returns while ringing. If synchronous returns if the call is stablished or cancelled.

引数
toReceiver number. Country extension can be used or not. Char buffer should not be released or used until command is over
timeoutIn millisecods. Time ringing before closing the call. Only used in synchronous mode. If zero, ring undefinitely
戻り値
In asynchronous mode returns 0 if last command is still executing, 1 success, >1 error In synchronous mode returns 1 if the call is placed, 0 if not.

GSM3VoiceCallService.cpp71 行目に定義があります。

72 {
74  return 0;
75 
76  if(flags & GSM3VOICECALLSERVICE_SYNCH )
77  {
79  unsigned long m;
80  m=millis();
81  // Wait an answer for timeout
82  while(((millis()-m)< timeout )&&(getvoiceCallStatus()==CALLING))
83  delay(100);
84 
86  return 1;
87  else
88  return 0;
89  }
90  else
91  {
93  }
94 
95 }
unsigned long millis(void)
Definition: wiring.c:65
GSM3MobileVoiceProvider * theGSM3MobileVoiceProvider
void delay(unsigned long)
Definition: wiring.c:106
m
Definition: wiring.c:53
virtual int voiceCall(const char *number)=0
#define GSM3VOICECALLSERVICE_SYNCH
GSM3_voiceCall_st getvoiceCallStatus()

このクラス詳解は次のファイルから抽出されました: