## @package Message # Data structure to send messages to a Neobotix server # # ----------------------------------------------------------------------------------- # # Copyright (c) 2009 Neobotix (www.neobotix.de) # # This software is allowed to be used and modified only in association with a Neobotix # robot platform. It is allowed to include the software into applications and # to distribute it with a Neobotix robot platform. # # This software is provided WITHOUT ANY WARRANTY; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. See the Neobotix License (Version 1.0) for more details. # # You should have received a copy of the Neobotix License # along with this software; if not, write to the # Gesellschaft fuer Produktionssysteme, Neobotix, Nobelstrasse 12, 70569 Stuttgart, Germany # # ----------------------------------------------------------------------------------- from Neobotix.Bases.ByteArray import ByteArray class Message(ByteArray): """ Represents a message to communicate between client and server. """ def __new__(cls): return super(Message, cls).__new__(cls) def __init__(self): """ Constructor """ self.__hasReply = False self.__messageType = None ByteArray.__init__(self) def setHasReply(self, value): self.__hasReply = value def getHasReply(self): return self.__hasReply def setMessageType(self, type): self.__messageType = type def getMessageType(self): return self.__messageType