messaging
— Types of messages¶
BaseMessage¶
EndTrial¶
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
¶
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'¶
-
event_name
¶
-
event_id
¶
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)¶
-
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: Parameters: name (str) – name of the state
-
MESSAGE_TYPE_ALIAS
= 'STATE'¶
-
MESSAGE_COLOR
= (0, 100, 0)¶
-
state_name
¶
-
Trial¶
-
class
pybpodapi.com.messaging.trial.
Trial
(sma=None)[source]¶ Variables: - trial_start_timestamp (float) – None
- sma (StateMachine) – sma
- states_occurrences (list(StateOccurrence)) – list of state occurrences
- events_occurrences (list(EventOccurrence)) – list of event occurrences
-
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_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