bpod_core.bpod.structs#
Data structures used by the bpod module.
Classes#
- class bpod_core.bpod.structs.BpodMessage #
Bases:
StructBase class for all messages exchanged between ServiceHost and ServiceClient.
- class bpod_core.bpod.structs.EventInput #
Bases:
BpodMessageMessage for a single input event.
- class bpod_core.bpod.structs.EventOutput #
Bases:
BpodMessageMessage for a single output action.
- class bpod_core.bpod.structs.EventStateEnd #
Bases:
BpodMessageMessage marking the end of a state.
- class bpod_core.bpod.structs.EventStateStart #
Bases:
BpodMessageMessage marking the start of a state.
- class bpod_core.bpod.structs.EventTrialEnd #
Bases:
BpodMessageMessage marking the end of a trial.
Only published when the hardware exit packet is received: a trial aborted without one publishes neither
EventTrialEndnorEventTrialEndControl- its stream simply ends. SeeEventTrialStartfor the ordering semantics.
- class bpod_core.bpod.structs.EventTrialEndControl #
Bases:
BpodMessageMessage terminating a trial’s stream with timing-verification data.
Trails
EventTrialEndand carries the hardware’s independent end-of-trial microsecond count - the same clock pair compared by the reader’s timing-violation warning.
- class bpod_core.bpod.structs.EventTrialStart #
Bases:
BpodMessageMessage marking the start of a trial.
Trial streams are strictly sequential: all messages between an
EventTrialStartand the nextEventTrialEndbelong to the trial identified by these markers, and a clean trial’s stream is terminated by a trailingEventTrialEndControl.
- class bpod_core.bpod.structs.HardwareConfiguration #
Bases:
StructRepresents the Bpod’s on-board hardware configuration.
- class bpod_core.bpod.structs.HardwareState #
Bases:
StructRepresents the Bpod’s current hardware state.
- class bpod_core.bpod.structs.RawEvent #
Bases:
NamedTupleRaw event data from the Bpod device.
- class bpod_core.bpod.structs.RawSoftcode #
Bases:
NamedTupleRaw softcode data from the Bpod device.
- class bpod_core.bpod.structs.ReplyGeneric #
Bases:
BpodMessageEnvelope for a generic reply.
- class bpod_core.bpod.structs.ReplyWelcome #
Bases:
BpodMessageEnvelope for a handshake reply.
- version: VersionInfo#
Version information of the Bpod’s firmware and hardware.
- class bpod_core.bpod.structs.RequestBye #
Bases:
BpodMessageEnvelope for a disconnect notice.
- class bpod_core.bpod.structs.RequestCall #
Bases:
BpodMessageEnvelope for a method call request.
- class bpod_core.bpod.structs.RequestData #
Bases:
RequestCallEnvelope for a data request.
- class bpod_core.bpod.structs.RequestHello #
Bases:
BpodMessageEnvelope for a handshake request.
- class bpod_core.bpod.structs.StateMachineLookup #
Bases:
NamedTupleLookup data to decode the raw event stream during a state machine trial.
- class bpod_core.bpod.structs.TimeReferences #
Bases:
NamedTupleReference values for performance counters.
Attributes#
- bpod_core.bpod.structs.BpodEventType#
Vocabulary of the trial DataFrame’s
typecolumn.alias of
Literal[‘TrialStart’, ‘TrialEnd’, ‘TrialEndControl’, ‘StateStart’, ‘StateEnd’, ‘InputEvent’, ‘OutputAction’]
- bpod_core.bpod.structs.BpodReplyUnion: TypeAlias = bpod_core.bpod.structs.ReplyGeneric | bpod_core.bpod.structs.ReplyWelcome#
Tagged union of all concrete
BpodMessagesubclasses used for replies.
- bpod_core.bpod.structs.BpodRequestUnion: TypeAlias = bpod_core.bpod.structs.RequestHello | bpod_core.bpod.structs.RequestBye | bpod_core.bpod.structs.RequestCall | bpod_core.bpod.structs.RequestData#
Tagged union of all concrete
BpodMessagesubclasses used for requests.
- bpod_core.bpod.structs.BpodEventUnion: TypeAlias = bpod_core.bpod.structs.EventTrialStart | bpod_core.bpod.structs.EventStateStart | bpod_core.bpod.structs.EventStateEnd | bpod_core.bpod.structs.EventInput | bpod_core.bpod.structs.EventOutput | bpod_core.bpod.structs.EventTrialEnd | bpod_core.bpod.structs.EventTrialEndControl#
Tagged union of all concrete
BpodMessagesubclasses used for events.