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

Class MessageValue

object --+
         |
        MessageValue

Instance Methods
 
__init__(self, name, typename, value=None, max_length=None, message=None)
Create a new packet type.
 
set_default_value(self)
 
get_message_values(self)
 
get_value(self)
 
set_value(self, value)
 
get_format_string(self)
Returns the string necessary for encoding this value using struct.
 
read_from_byte_buffer(self, byteBuffer)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  VALID_TYPE_NAMES = ['int', 'string', 'float', 'bool', 'uchar',...
Properties
  value

Inherited from object: __class__

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:
get_value(self)
Set Method:
set_value(self, value)