Package legume :: Package udp :: Module messages :: Class MessageValue
[frames] | no frames]

type MessageValue

object --+
         |
        MessageValue

Instance Methods
 
__init__(self, name, typename, value=None, max_length=None, message=None)
Create a new packet type.
 
setDefaultValue(self)
 
getMessageValues(self)
 
getValue(self)
 
setValue(self, value)
 
getFormatString(self)
Returns the string necessary for encoding this value using struct.
 
readFromByteBuffer(self, byteBuffer)
Class Variables
  VALID_TYPE_NAMES = ['int', 'string', 'float', 'bool', 'uchar',...
Properties
  value
Method Details

__init__(self, name, typename, value=None, max_length=None, message=None)
(Constructor)

 

Create a new packet type.

The name parameter must be a valid python class attribute identifier. Typename can be one of 'int', 'string', 'float' or 'bool'. Value must be of the specified type. max_length is only required for string values.

Overrides: object.__init__

Class Variable Details

VALID_TYPE_NAMES

Value:
['int',
 'string',
 'float',
 'bool',
 'uchar',
 'char',
 'short',
 'varstring']

Property Details

value

Get Method:
getValue(self)
Set Method:
setValue(self, value)