Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Using the interprocessor gateway

The examples shown below are from GWTestApp and GWTestServer, which are in the platform\cs\src\sample\a1gw directory in the AMSS software.

The applications invoke a remote object on DSP, Arm9, Scorpion, and Sim.

Two service declarations are needed to create instances of components hosted in a remote domain, in the client-side CIF and the server-side CIF.

Client-side CIF

Service { 
   serviceid = AEECLSID_REMOTEGWTEST_DSP,
   serverid  = AEECLSID_DSPOpener,
   iid = AEEIID_IGWTest,
   servedclassid = AEECLSID_GWTEST_SERVICE 
}

Class { 
   classid = AEECLSID_GWTESTAPP_DSP
  newfunc = GWTestApp_CreateInstance
}

Program {
   programname = "GWTestApp_DSP",
   mainid = AEECLSID_GWTESTAPP_DSP,
   priority = 13,
   stacksize = 8192,
   maxservices = 512,
   maxmemory = 0x200000,
   flags = MIF_PROGRAMFLAG_INPROC,
   args = string.format("0x%x",  AEECLSID_GWTESTAPP_DSP),
   privs = { 0x0 } 
}

The serverid is the ID of the gateway opener.

Server-side CIF

Class {
  classid = AEECLSID_GWTEST,
  newfunc = GWTest_New
}

Service { 
   serviceid = AEECLSID_GWTEST_SERVICE,
   serverid  = 0,
   iid = AEEIID_IGWTest,
   servedclassid = AEECLSID_GWTEST
}