manually constructing the type list of RPC functions

Mhamad Hmad mhh.it1986 at ...9...
Mon Apr 28 22:17:14 CEST 2014


Hi Norman,
thank you for quick replay , acctualy  I added  'Genode::' as prefix for
'Meta::' and 'Rpc_functions' respectively. and i got different error now
 *error: typedef name may not be a nested-name-specifier*

i will add the file here . i am sure that i miss some thing

#ifndef _INCLUDE__RPC_LWIP_SESSION_
#define _INCLUDE__RPC_LWIP_SESSION_

#include <session/session.h>
#include <base/rpc.h>

namespace rpclwipsession {

struct Session : Genode::Session
{
struct Buffer{ char buff[128];};
static const char *service_name() { return "RPCLWIP"; }

virtual void xx_lwip_tcpip_init()=0;
 virtual int xx_lwip_nic_init(signed, signed, signed, int, int)=0;
 virtual int xx_lwip_socket()=0;

virtual int xx_lwip_bind(int,xx_sockaddr ,int)=0;

virtual int xx_lwip_listen(int, int)=0;

virtual int xx_lwip_accept(int)=0;
 virtual Buffer xx_lwip_recv(int ,int)=0;
 virtual Buffer xx_lwip_read(int )=0;

virtual int xx_lwip_send(int,Buffer,int,int)=0;

virtual int xx_lwip_close(int)=0;

/*******************
 ** RPC interface **
 *******************/
 GENODE_RPC(Rpc_xx_lwip_tcpip_init, void,xx_lwip_tcpip_init);
GENODE_RPC(Rpc_xx_lwip_nic_init, int, xx_lwip_nic_init,signed, signed,
signed, int, int);
GENODE_RPC(Rpc_xx_lwip_socket, int, xx_lwip_socket);
GENODE_RPC(Rpc_xx_lwip_bind, int, xx_lwip_bind,int,xx_sockaddr ,int);
GENODE_RPC(Rpc_xx_lwip_listen, int, xx_lwip_listen,int,int);
GENODE_RPC(Rpc_xx_lwip_accept, int, xx_lwip_accept,int);
GENODE_RPC(Rpc_xx_lwip_read, Buffer, xx_lwip_read,int);
GENODE_RPC(Rpc_xx_lwip_recv,Buffer, xx_lwip_recv,int,int);
GENODE_RPC(Rpc_xx_lwip_close, int, xx_lwip_close,int);
GENODE_RPC(Rpc_xx_lwip_send,int, xx_lwip_send,int,Buffer,int,int);

/*GENODE_RPC_INTERFACE(Rpc_xx_lwip_tcpip_init,Rpc_xx_lwip_nic_init,Rpc_xx_lwip_socket,Rpc_xx_lwip_bind,Rpc_xx_lwip_listen,Rpc_xx_lwip_accept,Rpc_xx_lwip_recv,Rpc_xx_lwip_close,Rpc_xx_lwip_send);
*/
typedef Genode::Meta::Type_tuple<Rpc_xx_lwip_tcpip_init,
         Genode::Meta::Type_tuple<Rpc_xx_lwip_nic_init,
Genode::Meta::Type_tuple<Rpc_xx_lwip_socket,
         Genode::Meta::Type_tuple<Rpc_xx_lwip_bind,
Genode::Meta::Type_tuple<Rpc_xx_lwip_listen,
         Genode::Meta::Type_tuple<Rpc_xx_lwip_accept,
Genode::Meta::Type_tuple<Rpc_xx_lwip_read,
         Genode::Meta::Type_tuple<Rpc_xx_lwip_recv,
Genode::Meta::Type_tuple<Rpc_xx_lwip_close,
         Genode::Meta::Type_tuple<Rpc_xx_lwip_send,
                          Genode::Meta::Empty> > > > > > > > > >
         Genode::Rpc_functions;
};
}

#endif /* _INCLUDE__RPC_LWIP_SESSION_*/

thank you in advance,


2014-04-28 15:33 GMT+01:00 Norman Feske <norman.feske at ...1...>:

> Hello Mohammed,
>
> > I add that to my intrface session but i get the next error
> >
> > *error: ‘Meta’ does not name a type*
> > and another error
> >
> > *no type named ‘Rpc_functions’ in ‘struct myrpcsession::Session’*
> > I looked to the "cpu_session.h" and tried to do same but i think i miss
> > some thing .
>
> maybe, your interface is not declared within the 'Genode' namespace?
> Could you try to specify 'Genode::' as prefix for 'Meta::' and
> 'Rpc_functions' respectively?
>
> Cheers
> Norman
>
> --
> Dr.-Ing. Norman Feske
> Genode Labs
>
> http://www.genode-labs.com · http://genode.org
>
> Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
> Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
>
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.  Get
> unparalleled scalability from the best Selenium testing platform available.
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> Genode-main mailing list
> Genode-main at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
>



-- 
*Mohammad Hamad*

IDA, Institute of Computer and Network Engineering
Technical University of Braunschweig
Hans-Sommer-Str. 66
38106 Braunschweig - Germany
Mobile: (+49) 179 1613941
Email: mhh.it1986 at ...9...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genode.org/pipermail/users/attachments/20140428/a760de00/attachment.html>


More information about the users mailing list