radiens_core.models.triggers
Trigger control domain models and enums.
Attributes
FlexTriggerChannel
module-attribute
TriggerChannel that also accepts a string name or int value.
String inputs use the short name without the T_ prefix, case-insensitively
(e.g. "din_0", "dout_5", "none").
Use with @validate_call::
@validate_call(config=ConfigDict(arbitrary_types_allowed=True))
def enable_trigger(self, *, channel: FlexTriggerChannel, ...) -> None:
ch = validated(channel, TriggerChannel)
...
Classes
ManualStimTriggerRequest
Bases: BaseModel
Request for manual stimulation trigger.
Attributes:
| Name | Type | Description |
|---|---|---|
trigger |
StimKeypressIndex
|
Keypress trigger (1-8). References StimKeypressIndex. |
trigger_on |
bool
|
Whether to turn the trigger on or off. |
ManualStimTriggerToggleRequest
Bases: BaseModel
Request to toggle manual stimulation trigger.
Attributes:
| Name | Type | Description |
|---|---|---|
trigger |
StimKeypressIndex
|
Keypress trigger (1-8). References StimKeypressIndex. |
SetTriggerStateRequest
Bases: BaseModel
Request to set trigger channel state.
Attributes:
| Name | Type | Description |
|---|---|---|
channel |
TriggerChannel
|
Trigger channel identifier. References TriggerChannel. |
enabled |
bool
|
Whether the channel should be enabled. |
port |
Port
|
Hardware port identifier. References Port. |
TriggerChannel
Bases: IntEnum
Trigger channel identifier. Values match proto allego.TriggerChannel.
TriggerState
Bases: BaseModel
Current trigger channel configuration.
Attributes:
| Name | Type | Description |
|---|---|---|
enabled_channels |
list[TriggerChannel]
|
List of currently enabled trigger channels. |
ports |
list[Port]
|
List of ports with enabled triggers. |