From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id BAA25331; Sun, 29 Aug 2004 01:00:51 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id BAA28209 for ; Sun, 29 Aug 2004 01:00:50 +0200 (MET DST) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.204]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i7SN0nuG021656 for ; Sun, 29 Aug 2004 01:00:50 +0200 Received: by mproxy.gmail.com with SMTP id 77so26722rnl for ; Sat, 28 Aug 2004 16:00:49 -0700 (PDT) Received: by 10.38.164.76 with SMTP id m76mr328731rne; Sat, 28 Aug 2004 16:00:49 -0700 (PDT) Received: by 10.38.78.73 with HTTP; Sat, 28 Aug 2004 16:00:49 -0700 (PDT) Message-ID: Date: Sun, 29 Aug 2004 01:00:49 +0200 From: henri dubois-ferriere Reply-To: henri dubois-ferriere To: Ocaml Subject: [Caml-list] reading bytes into c-defined structs Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 41310EA1.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; henridf:01 structs:01 structs:01 pointers:01 ocaml:01 ocaml:01 camlidl:01 bytes:02 bytes:02 henri:03 henri:03 types:03 app:04 defined:07 convert:12 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, I have a little ocaml app which needs to read/write packets from a serial device. The different packet types are originally defined as c structs and i would like to be able to read the incoming bytes and convert them into ocaml records with as much automation as possible. Is there any way to automate this process? CamlIDL will automate the process of translating the c structs into ml, which is a first step, but are there any tools which would allow me to then populate the ml record from an incoming set of bytes? Any tips/pointers appreciated! Henri ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners