예제 #1
0
파일: client.py 프로젝트: awood3/ioHub
 def sendMessages(self,msgArgList):
     """
     Same as the sendMessage method, but accepts a list of lists of message arguments, so you can have N messages
     created and sent at once.
     """
     msgEvents=[]
     for msg in msgArgList:
         msgEvents.append(MessageEvent.createAsList(*msg))
     self.sendToHub(('EXP_DEVICE','EVENT_TX',msgEvents))
     return True
예제 #2
0
파일: client.py 프로젝트: sckim/ioHub
 def sendMessages(self, msgArgList):
     """
     Same as the sendMessage method, but accepts a list of lists of message arguments, so you can have N messages
     created and sent at once.
     """
     msgEvents = []
     for msg in msgArgList:
         msgEvents.append(MessageEvent.createAsList(*msg))
     self.sendToHub(('EXP_DEVICE', 'EVENT_TX', msgEvents))
     return True
예제 #3
0
파일: client.py 프로젝트: awood3/ioHub
    def sendMessageEvent(self,text,prefix='',offset=0.0,usec_time=None):
        """
        Create and send a MessageEvent to the ioHub Server for storage with the rest of the event data.

        Args:
          text (str): The text message for the message event. Can be up to 128 chracters in length.
          prefix (str): A 1 - 3 character prefix for the message that can be used to sort or group messages by 'types'
          offset (float): The offset to apply to the time stamp of the message event. If you send the event before or after
          the time the event actually occurred, and you know what the offset value is, you can provide it here and it will
          be applied to the ioHub time stampe for the event.
          usec_time: Since (at least on Windows currently) if you use the ioHub timers, the timebase of the experiment process
          is identical to that of the ioHub server process, then you can specific the ioHub time for experiment events
          right in the experiment process itself.
        """
        self.sendToHub(('EXP_DEVICE','EVENT_TX',[MessageEvent.createAsList(text,prefix=prefix,msg_offset=offset,usec_time=usec_time),]))
        return True
예제 #4
0
파일: client.py 프로젝트: sckim/ioHub
    def sendMessageEvent(self, text, prefix='', offset=0.0, usec_time=None):
        """
        Create and send a MessageEvent to the ioHub Server for storage with the rest of the event data.

        Args:
          text (str): The text message for the message event. Can be up to 128 chracters in length.
          prefix (str): A 1 - 3 character prefix for the message that can be used to sort or group messages by 'types'
          offset (float): The offset to apply to the time stamp of the message event. If you send the event before or after
          the time the event actually occurred, and you know what the offset value is, you can provide it here and it will
          be applied to the ioHub time stampe for the event.
          usec_time: Since (at least on Windows currently) if you use the ioHub timers, the timebase of the experiment process
          is identical to that of the ioHub server process, then you can specific the ioHub time for experiment events
          right in the experiment process itself.
        """
        self.sendToHub(('EXP_DEVICE', 'EVENT_TX', [
            MessageEvent.createAsList(text,
                                      prefix=prefix,
                                      msg_offset=offset,
                                      usec_time=usec_time),
        ]))
        return True
예제 #5
0
파일: client.py 프로젝트: kastman/ioHub
 def sendMessageEvent(self,text,prefix='',offset=0.0):
     return self.sendToHub(('EXP_DEVICE','EVENT_TX',[MessageEvent.create(text=text,msg_offset=offset,msg_prefix=prefix)._asTuple()]))