-
-
Notifications
You must be signed in to change notification settings - Fork 89
Implement SCSI printer device (SCLP) #664
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
See https://www.staff.uni-mainz.de/tacke/scsi/SCSI2-11.html) for information on the SCSI-2 printer device.
Steps a client has to take:
- The client sends RESERVE UNIT in order to get exclusive access to the printer device. rascsi shall remember this reservation based on the initiator ID of the client. Implementing RESERVE/RELEASE UNIT is mandatory for printer devices,
- The client sends the data to be printed with the PRINT command. rascsi shall save these data to a temporary file, which will later be printed. Clients may send these data in chunks, i.e. there can be several PRINT command before the data to be printed are complete. New data are just added to the temporary file. This is consistent with how WRITE for block devices works, where data for a sequence of blocks can be sent as a complete sequence, or be split into smaller WRITE requests.
- The client triggers printing by sending SYNCHRONIZE BUFFER. Without an explicit trigger the printer device would not know when the data are complete. This is a conceptual difference to parallel port printers, which are character devices. This is also the reason why maybe only printing of files can be supported: A well-defined end of data marker is required.
- The client sends RELEASE UNIT.
Notes:
- SEND DIAGNOSTIC is mandatory for printer devices, but currently does not return any data.
- Printing can be cancelled before SYNCHRONIZE buffer was sent with STOP PRINT.
- The maxium transfer size per PRINT command is limited to 4096 bytes, see Get rid of hard-coded/static transfer buffer size #669 for details.
- "lp -oraw" as default command ensures that the data are sent to the printer unchanged.
- The print command to be used can be specified as parameter when attaching the SCLP device, e.g. "cmd=lp ...".
- The timeout in seconds a reservation is valid without receiving new printer commands is configurable with the "timeout=numeric_value" property. Default is 30s.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request