LineSetEvent |
Top Previous Next |
Message
LineSetEvent <linenumber>|<alias> on|off|both <eventtext>
Originator
Client
Response (main socket)
Info: EventCreated: Line linenumber on|off|both Error: EventRefused: Line reason for refusal SyntaxError: insufficient parameters to LineSetEvent SyntaxError: invalid parameters to LineSetEvent
Response (immediate socket)
Success Failure
Details
You can have separate events for on and off. It is not sensible to request both an 'on' and an 'off' event for a device such as a lever (you would get two events for each press), but could sometimes be useful (e.g. to determine the proportion of time spent on a certain perch).
If a grouped alias is used, multiple messages may be generated on the main socket, but only a single value will return on the immediate socket (Success if all line events were set correctly, and Failure if there was a problem with any one line). However, it is not recommended that you use grouped lines with this command.
Note that line events can be requested from input or output lines.
From WhiskerServer v2.9.04, if a pegged input generates an event, a Warning is also sent.
From WhiskerServer v2.11, hardware is supported that can only detect ON transitions, not OFF transitions (e.g. the Lafayette/ABET hardware); if you attempt to set an OFF event on such a line, an error is generated. If you attempt to set BOTH events, the ON event succeeds (and the overall command succeeds) but a warning is generated about the OFF event failing to be set.
Revision history
Implemented in WhiskerServer version 1 as RequestLineEvent. Renamed in WhiskerServer version 2.3.
See also
|