Creating Test Object.¶
To create an object of test class would be use by typing. "ControllerClass.controller(callFrom, callAdd, accCaller, callTo, destAdd, destNo, accDest)".Where:
- callFrom, mean where call is coming from or can also called caller.
- callPortName, mean port name of the caller device.
- accCaller, mean account login information about the caller, such as username, password and server of the caller. It's used for SIP handler.
- callTo, mean destination call.
- destPortName, mean port name of the destination device.
- destNo, mean number should caller calling in.
- accDest, mean account login information about the caller, such as username, password and server of the caller. It's used for SIP handler.
Making test function.¶
To start the test function. First we need to create test object and giving parameter they need then call FuncTest(). Inside this class, another function will call such as initCaller, initReceiver, waiting feedback etc.
You can find more information below.
initCaller and initReciever function.¶
This function use for initialize caller and receiver handler which use variable callFrom, callTo, accCaller and accDest to assign into the handler.
This function use only for calling GSM handler and start the program with parameter given by the controller such as port address for socket communication and also device address for the GSM.
callerGreating and receiverGreating function.¶
This function create an object for socket communication class to communicate between controller and handlers. greeting message between handlers and controller handled here.
Whenever this function called, its means that handler is ready to make a test. Then send a message "RECEIVE START" and "CALL START" to the handler, means the handler should start to proceed the test.
After controller send "RECEIVE START" and "CALL START" message, controller will be on the waiting mode with call this function. Controller will waiting approximately 50 seconds to get any test result message from the handlers.
This function use to send a "TERMINATE" message to handler after got all the result from handler. After got this message, handler will immediately shutting down.