Updated Rules for adding new device types (markdown)

Uwe Seimet 2022-11-06 12:46:16 +01:00
parent f3c43aff68
commit 5072ab8ac1
1 changed files with 3 additions and 4 deletions

@ -3,14 +3,13 @@ Before adding a new device type check that none of the existing types is appropr
Steps for adding a new device type:
1. Add the device type to the PbDeviceType enum of the protobuf definition in `rascsi_interface.proto`.
2. Add code for creating the device type to the DeviceFactory class in `devices/device_factory.cpp`. The device instance and all device-specific properties have to be created by this class.
2. Add code for creating the device type to the DeviceFactory class in `devices/device_factory.cpp`.
3. Add the device type specific implementation in new .cpp/.h files located in the devices folder.
4. Ensure to initialize the device type with its device type properties.
4. Ensure to initialize the device type with its device type properties and supported SCSI commands in the Init() method.
5. Verify that _rasctl -s_ reports the correct device type properties.
6. Update the manpages.
Devices have to be subclasses of PrimaryDevice or ModeSenseDevice. Only devices backed by image files may be subclasses of the Disk class. Each device has its own SCSI command dispatcher for commands not executed by the superclass.
See the implementations of the Host Services (SCHS) and the SCSI Printer (SCLP) for device implementations with low complexity.
Devices have to be subclasses of PrimaryDevice or ModeSenseDevice. Only devices backed by image files may be subclasses of the StorageDevice class. See the implementations of the Host Services (SCHS) and the SCSI Printer (SCLP) for device implementations with low complexity.
## Clients