2004-05-30 11:09:46 +00:00
|
|
|
# $Id$
|
2004-05-24 07:49:50 +00:00
|
|
|
# Documentation for KX_NetworkMessageSensor
|
|
|
|
from SCA_ISensor import *
|
|
|
|
|
|
|
|
class KX_NetworkMessageSensor(SCA_ISensor):
|
|
|
|
"""
|
|
|
|
The Message Sensor logic brick.
|
|
|
|
|
|
|
|
Currently only loopback (local) networks are supported.
|
2009-04-20 15:06:46 +00:00
|
|
|
|
|
|
|
@ivar subject: The subject the sensor is looking for.
|
|
|
|
@type subject: string
|
|
|
|
@ivar frameMessageCount: The number of messages received since the last frame.
|
|
|
|
(Read-only)
|
|
|
|
@type framemessageCount: int
|
|
|
|
@ivar subjects: The list of message subjects received. (Read-only)
|
|
|
|
@type subjects: list of strings
|
|
|
|
@ivar bodies: The list of message bodies received. (Read-only)
|
|
|
|
@type bodies: list of strings
|
2004-05-24 07:49:50 +00:00
|
|
|
"""
|
2009-04-20 15:06:46 +00:00
|
|
|
|
|
|
|
|
2004-05-24 07:49:50 +00:00
|
|
|
def setSubjectFilterText(subject):
|
|
|
|
"""
|
2009-04-20 15:06:46 +00:00
|
|
|
DEPRECATED: Use the subject property instead.
|
2004-05-24 07:49:50 +00:00
|
|
|
Change the message subject text that this sensor is listening to.
|
|
|
|
|
|
|
|
@type subject: string
|
|
|
|
@param subject: the new message subject to listen for.
|
|
|
|
"""
|
|
|
|
|
|
|
|
def getFrameMessageCount():
|
|
|
|
"""
|
2009-04-20 15:06:46 +00:00
|
|
|
DEPRECATED: Use the frameMessageCount property instead.
|
2004-05-24 07:49:50 +00:00
|
|
|
Get the number of messages received since the last frame.
|
|
|
|
|
|
|
|
@rtype: integer
|
|
|
|
"""
|
|
|
|
def getBodies():
|
|
|
|
"""
|
2009-04-20 15:06:46 +00:00
|
|
|
DEPRECATED: Use the bodies property instead.
|
2004-05-24 07:49:50 +00:00
|
|
|
Gets the list of message bodies.
|
|
|
|
|
|
|
|
@rtype: list
|
|
|
|
"""
|
|
|
|
def getSubject():
|
|
|
|
"""
|
2009-04-20 15:06:46 +00:00
|
|
|
DEPRECATED: Use the subject property instead.
|
2004-05-24 07:49:50 +00:00
|
|
|
Gets the message subject this sensor is listening for from the Subject: field.
|
|
|
|
|
|
|
|
@rtype: string
|
|
|
|
"""
|
|
|
|
def getSubjects():
|
|
|
|
"""
|
2009-04-20 15:06:46 +00:00
|
|
|
DEPRECATED: Use the subjects property instead.
|
2004-05-24 07:49:50 +00:00
|
|
|
Gets the list of message subjects received.
|
|
|
|
|
2004-05-31 13:06:04 +00:00
|
|
|
@rtype: list
|
2004-05-24 07:49:50 +00:00
|
|
|
"""
|
|
|
|
|