[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Creating binary data
From: |
Holger Hans Peter Freyther |
Subject: |
Re: [Help-smalltalk] Creating binary data |
Date: |
Wed, 02 Jun 2010 16:33:41 +0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b1 Thunderbird/3.0.4 |
On 06/02/2010 02:59 PM, Paolo Bonzini wrote:
> On Wed, Jun 2, 2010 at 07:17, Holger Hans Peter Freyther
> <address@hidden> wrote:
>> Hi All,
>>
>> for the stuff I am planing to use GNU Smalltalk for I will need to
>> create binary structures. This means I need to write numbers and similar
>> as uint8,16,32,64, control the endian of these numbers and such. In
>> Pharo I have found the DataStream class is there something like this in
>> GNU Smalltalk? How would I solve my usecase in GNU Smalltalk?
>
> For native endianness you can create a CStruct subclass and remember
> to instantiate it with #gcNew instead of #new.
Thanks.
> The simplest thing to do is of course to use CStruct and do the
> endianness conversion yourself.
Is there a list of symbols I can use for my CStruct definition, honestly
I only looked at the CairoMatrix which is a fairly simple case...?
In my case I would like to read and create structure with bitfields like
the one below.
http://bb.osmocom.org/trac/browser/src/shared/libosmocore/include/osmocore/protocol/gsm_04_08.h
thanks
holger