Robot Eksperimentarium 2006: Øvelser

From ImageWiki

(Difference between revisions)
Jump to: navigation, search
(→Øvelse 5: Kommunikation)
(→Øvelse 4: Lokalisering)
 
(3 intermediate revisions not shown)
Line 186: Line 186:
-
+
'''Hint 4:''' (fra Gert)
-
'''Denne opgave er stadig under udvikling!'''
+
 +
Line 225: Line 226:
== Udleveret kode ==
== Udleveret kode ==
 +
 +
 +
inline void send_float(TCPSocket *socket, float f)
 +
{
 +
    socket->send((char*)(&(f)), sizeof(float));
 +
}
 +
inline float get_float(TCPSocket *socket)
 +
{
 +
    char buffer[sizeof(float)];
 +
    socket->recv(buffer, sizeof(float));
 +
    return *((float*)buffer);
 +
}
== Praktiske kommentarer ==
== Praktiske kommentarer ==
-
seperat
+
separat

Latest revision as of 12:23, 3 October 2006

Personal tools