Fields

This module implements the basic marshaling and unmarshaling for the Multimodal Middleware Protocol. The classes of this module should be used to convert from and to the network representation of all data types.

class MultimodalMiddlewareProtocol.Fields.ArrayField(nelements=0, type=None)
add(field)
copyLongVector(source)
createElements()
get(x)
getContents()
getNelem()
getPackedCode()
getSubCode()
read(r)
set(x, field)
setNelemAndType(nelem, type)
write(w)
class MultimodalMiddlewareProtocol.Fields.ByteField(b=None)
get()
read(r)
set(b)
write(w)
class MultimodalMiddlewareProtocol.Fields.CharField(c=None)
get()
read(r)
set(c)
write(w)
class MultimodalMiddlewareProtocol.Fields.DoubleCharField(d=None)
get()
read(r)
set(c)
write(w)
class MultimodalMiddlewareProtocol.Fields.Field

The Field class is the superclass for all other protocol fields. It implements the standard interface for serialization operations. It is very important to understand the role of the superclass, as all other fields have a very similar behaviour.

getCode()
Returns a single character code, identifying the type of this field. The field character code table is defined in Consts module.
read(r)

Reads the field contents from the specified Reader object. This method is responsible to use the correct method of the Reader object based on the field data type.

Parameters:
  • r (Reader) – stream to read the field from.
write(w)

Writes the field contents to the specified Writer object. This method is responsible to use the correct method of the Writer object based on the field data type.

Parameters:
  • w – stream to write the field to.
class MultimodalMiddlewareProtocol.Fields.IntegerField(i=None)
get()
read(r)
set(i)
write(w)
class MultimodalMiddlewareProtocol.Fields.LongField(l=None)
get()
read(r)
set(l)
write(w)
class MultimodalMiddlewareProtocol.Fields.LongStringField(s=None)
get()
read(r)
set(s)
write(w)
class MultimodalMiddlewareProtocol.Fields.ShortField(b=None)
get()
read(r)
set(b)
write(w)
class MultimodalMiddlewareProtocol.Fields.ShortStringField(s=None)
get()
read(r)
set(s)
write(w)
class MultimodalMiddlewareProtocol.Fields.UbyteField(b=None)
get()
read(r)
set(b)
write(w)
class MultimodalMiddlewareProtocol.Fields.WideStringField(b=None)
get()
read(r)
set(b)
write(w)

Previous topic

Consts

Next topic

Field Factory

This Page

Quick search