Patent ID: 6295561
Filing Date: 2001-09-25
Classification: G06F

Abstract:
A system compiler template structures for enabling byte order and word alignment on a native machine to be translated as needed into the byte order and word alignment required in a communication media, comprising:an unpacked source buffer;a packed target buffer;a template buffer;a first swap structure for exchanging high and low bytes of word values;a second swap structure for reversing byte order of long values;a host order structure for returning a value TRUE if and only if the byte order of said communication media is different than the byte order on said native system;a pack swap structure for processing a packed structure `data` by performing byte order adjustments as specified by an associated unpacked `template` value;a pack send structure for structure packing followed by byte-order manipulation before a send operation and for copying said unpacked source buffer to said packed target buffer according to said template buffer, which is of a specified length;a pack receive buffer for unpacking after byte-order manipulation after a receive operation by copying said packed source buffer to said unpacked target buffer according to said template buffer, which is of a specified length; anda pack size structure for return the packed buffer size represented by the given template, of the specified length, which is equivalent to the number of non-zero bytes in the template.