70 likes | 199 Views
PIKA Technologies Inc. RPC Client/Server Application Sample October 2009. What is it?. Sample Application developed in C++ Can be used as a Client/Server framework Works on GP HMP 2.7 platforms (Windows). Overall Architecture Description. There are 3 main project in the rpcSample solution
E N D
PIKA Technologies Inc.RPC Client/Server Application Sample October 2009
What is it? Sample Application developed in C++ Can be used as a Client/Server framework Works on GP HMP 2.7 platforms (Windows)
Overall Architecture Description • There are 3 main project in the rpcSample solution • gpaoh • Contains the gpaoh.idl file. The Midl compiler creates stub code for the gpaohServer and gpaohClient applications can communicate which each other. • gpaohServer • The server responds to the clients request. It also contains an event queue mechanism to distribute events to each client. • gpaohClient • The client makes remote procedure calls to the server via the APIs defined in the gpaoh.idl file.
Getting Started • Install the PIKA GP HMP API on a PC ( 2.7.x or newer ) as described in the Getting Started Guide • Run gpconfig and configure the GP system • Download the rpcSample solution • If using SIP modify the following parameters • #define DEFAULT_FROM_FIELD "GP_SIP_USER"; // From field for outgoing calls • #define DEFAULT_TO_FIELD “sip@192.168.1.2"; // To field for outgoing calls , ie sip phone • #define DEFAULT_DISPLAY_FIELD "me"; // Display field for outgoing calls • Run gpaohServer • Run multiple instances of gpaohClient • Type “g” to retrieve group information • Type “m” to place an outgoing call based on the group information
Server Application thread Diagram PIKA Driver PKX_SYSTEM_XXX Main Thread PKX_GROUP_XXX PKX_CHANNEL_XXX Spawn Thread Event Thread PKX_SYSTEM_WaitOnEvent Incoming Event
Client Application thread Diagram RPC PIPE Open Main Thread OpenEventHandler PKCS_SYSTEM_XXX PKCS_GROUP_XXX PKCS_CHANNEL_XXX Spawn Thread Event Thread PKCS_SYSTEM_WaitOnEvent Incoming Event
Where can I find it? • The Source code is located under: • http://svn.pikatech.com/customercare/trunk/samples/rpcSample/