messaging— Types of messages

BaseMessage

class pybpodapi.com.messaging.base_message.BaseMessage(content, host_timestamp=None)[source]

Represents a session message It may have been originated from the board of from pc

MESSAGE_TYPE_ALIAS = 'MESSAGE'
MESSAGE_COLOR = (200, 200, 200)
classmethod check_type(typestr)[source]

Returns True if the typestr represents the class

tolist()[source]
classmethod fromlist(row)[source]

Returns True if the typestr represents the class

EndTrial

class pybpodapi.com.messaging.end_trial.EndTrial(content, host_timestamp=None)[source]

Stderr message from the server process

See also

pybpodgui_plugin.com.messaging.board_message.BoardMessage

MESSAGE_TYPE_ALIAS = 'END-TRIAL'
MESSAGE_COLOR = (0, 100, 200)

EventOccurrence

class pybpodapi.com.messaging.event_occurrence.EventOccurrence(event_id, event_name, host_timestamp=None)[source]

Message from board that represents state change (an event)

Variables:
  • event_name (str) – name of the event
  • event_id (int) – index of the event
  • board_timestamp (float) – timestamp associated with this event (from bpod)
Parameters:
  • event_id
  • event_name
  • host_timestamp
MESSAGE_TYPE_ALIAS = 'EVENT'
event_name
event_id
tolist()[source]
classmethod fromlist(row)[source]

Returns True if the typestr represents the class

EventResume

class pybpodapi.com.messaging.event_resume.EventResume(event_id, event_name, host_timestamp=None)[source]

Message from board that represents state change (an event)

Variables:
  • event_name (str) – name of the event
  • event_id (int) – index of the event
  • board_timestamp (float) – timestamp associated with this event (from bpod)
Parameters:
  • event_id
  • event_name
  • host_timestamp
MESSAGE_TYPE_ALIAS = 'EVENT-SUMMARY'
classmethod check_type(typestr)[source]

Returns True if the typestr represents the class

event_name
event_id
tolist()[source]
classmethod fromlist(row)[source]

Returns True if the typestr represents the class

SessionInfo

class pybpodapi.com.messaging.session_info.SessionInfo(infoname, infovalue=None, start_time=None, end_time=None)[source]

Stderr message from the server process

See also

pybpodgui_plugin.com.messaging.board_message.BoardMessage

MESSAGE_TYPE_ALIAS = 'INFO'
MESSAGE_COLOR = (150, 150, 255)
tolist()[source]
classmethod fromlist(row)[source]

Returns True if the typestr represents the class

infoname
infovalue

SoftcodeOccurrence

class pybpodapi.com.messaging.softcode_occurrence.SoftcodeOccurrence(softcode, host_timestamp=None)[source]

Message from board that represents state change (an event)

Variables:
  • event_name (str) – name of the event
  • event_id (int) – index of the event
  • board_timestamp (float) – timestamp associated with this event (from bpod)
Parameters:
  • event_id
  • event_name
  • host_timestamp
MESSAGE_TYPE_ALIAS = 'SOFTCODE'
MESSAGE_COLOR = (40, 30, 30)
softcode

StateOccurrence

class pybpodapi.com.messaging.state_occurrence.StateOccurrence(state_name, host_timestamp, end_timestamp)[source]

Store timestamps for a specific state occurrence of the state machine

Variables:
  • name (str) – name of the state
  • timestamps (list(StateDuration)) – a list of timestamps (start and end) that corresponds to occurrences of this state
Parameters:

name (str) – name of the state

MESSAGE_TYPE_ALIAS = 'STATE'
MESSAGE_COLOR = (0, 100, 0)
tolist()[source]
classmethod fromlist(row)[source]

Returns True if the typestr represents the class

state_name

Trial

class pybpodapi.com.messaging.trial.Trial(sma=None)[source]
Variables:
MESSAGE_TYPE_ALIAS = 'TRIAL'
MESSAGE_COLOR = (0, 0, 255)
get_timestamps_by_event_name(event_name)[source]

Get timestamps by event name

Parameters:event_name – name of the event to get timestamps
Return type:list(float)
get_events_names()[source]

Get events names without repetitions

Return type:list(str)
get_all_timestamps_by_event()[source]

Create a dictionary whose keys are events names and values are corresponding timestamps

Example:

{
    'Tup': [429496.7295, 429496.7295],
    'Port3In': [429496.7295, 429496.7295],
    'Port2In': [429496.7295, 429496.7295],
    'Port2Out': [429496.7295, 429496.7295],
    'Port3Out': [429496.7295],
    'Port1Out': [429496.7295]
}
Return type:dict
export()[source]
pformat()[source]
classmethod fromlist(row)[source]

Returns True if the typestr represents the class

UntaggedMessage

class pybpodapi.com.messaging.untagged_message.UntaggedMessage(content, host_timestamp=None)[source]

Stderr message from the server process

See also

pybpodgui_plugin.com.messaging.board_message.BoardMessage

MESSAGE_TYPE_ALIAS = 'UNTAGGED'
MESSAGE_COLOR = (230, 230, 230)
classmethod check_type(typestr)[source]

Returns True if the typestr represents the class