fipaos.parser.acl.bitefficient
Class ACLEncoder


public class ACLEncoder
implements ACLConstants

ACLEncoder implements an encoder for bit-efficient ACLMessages.

Author:
Heikki Helin, Mikko Laukkanen

Constructor Summary
ACLEncoder()
          Constructor for the encoder.
ACLEncoder(int sz)
          Constructor for the encoder.
ACLEncoder(int sz, EncoderCodetable ct)
          Constructor for the encoder.

Method Summary
 ByteArrayencode(ACL m)
          Encodes an ACL message.
 ByteArrayencode(ACL m, byte c)
          Encodes an ACL message.
 EncoderCodetablegetCodeTable()
          Returns the codetable associated with this encoder

Constructor Detail

ACLEncoder

public ACLEncoder()
Constructor for the encoder. Initialises the ACL encoder with no codetable coding scheme.

ACLEncoder

public ACLEncoder(int sz)
Constructor for the encoder. Initializes the ACL encoder with a codetable.
parameter sz the size for the codetable in bits (between 8 and 16)

ACLEncoder

public ACLEncoder(int sz, EncoderCodetable ct)
Constructor for the encoder. Initializes the ACL encoder with a codetable
parameter sz the size for the codetable in bits., ct the codetable to be used in encoding process. FIXME: remove sz parameter, and add getSize to EncoderCodetable!
Method Detail

encode

public ByteArray encode(ACL m)
Encodes an ACL message.
Parameters:
m - Message to encode

encode

public ByteArray encode(ACL m, byte c)
Encodes an ACL message.
Parameters:
m - Message to encode
c - Coding scheme (ACL_BITEFFICIENT_CODETABLE or ACL_BITEFFICIENT_NO_CODETABLE)

getCodeTable

public EncoderCodetable getCodeTable()
Returns the codetable associated with this encoder

Association Links

to Class fipaos.parser.acl.bitefficient.ACLPerformatives

as Conversion between communicative acts (legacy <-> bit-efficient)

to Class fipaos.parser.acl.util.ByteArray

buf Buffer to which the bit-efficient message is generated

to Class fipaos.parser.acl.bitefficient.BinDate

bd Bit-efficient date

to Class fipaos.parser.acl.bitefficient.BinNumber

bn Bit-efficient Number

to Class fipaos.parser.acl.bitefficient.EncoderCodetable

ct Codetable

to Class fipaos.parser.acl.bitefficient.ACLEncoder.ExprParser

ex Expression parser