Hi,
I have two kernel modules, one for sending and one for recieving, on two
different machines. The two interesting functions, after creating the
sockets and connecting to them, are basically:
static void recieve(void *arg)
{
int retval;
char packet[sizeof(float)];
retval = rt_dev_recv(sockfd, packet, sizeof(packet), 0);
*((hal_float_t *)hal_data->hfloat) = *((float *)packet);
}
static void send(void *arg, long period)
{
int retval;
char packet[] = "2.9";
retval = rt_dev_send(sockfd, packet, sizeof(packet), 0);
}
In recieve, hal_float_t is a volatile float.
First off, is it true that I can only send a char array? Or could I send
over a float directely?
If I now monitor the value of hal_data->hal_float, I get a strange value.
I know I'm doing something wrong here on programming level, probably in
casting. Any idea what that might be?
Thanks a bunch,
Evert
--
SMTP-server Noordelijke Hogeschool Leeuwarden.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
RTnet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rtnet-users