1/* eslint-disable */ 2 3export const protobufPackage = 'rootcanal.configuration'; 4 5export enum ControllerPreset { 6 /** DEFAULT - Version 5.3, all features enabled, all quirks disabled. */ 7 DEFAULT = 'DEFAULT', 8 /** LAIRD_BL654 - Official PTS dongle, Laird BL654. */ 9 LAIRD_BL654 = 'LAIRD_BL654', 10 /** CSR_RCK_PTS_DONGLE - Official PTS dongle, CSR rck. */ 11 CSR_RCK_PTS_DONGLE = 'CSR_RCK_PTS_DONGLE', 12 UNRECOGNIZED = 'UNRECOGNIZED', 13} 14 15export interface ControllerFeatures { 16 leExtendedAdvertising: boolean; 17 lePeriodicAdvertising: boolean; 18 llPrivacy: boolean; 19 le2mPhy: boolean; 20 leCodedPhy: boolean; 21 /** 22 * Enable the support for both LL Connected Isochronous Stream Central 23 * and LL Connected Isochronous Stream Peripheral. 24 */ 25 leConnectedIsochronousStream: boolean; 26} 27 28export interface ControllerQuirks { 29 /** 30 * Randomly send ACL payloads before the Connection Complete event 31 * is sent to the Host stack. 32 */ 33 sendAclDataBeforeConnectionComplete: boolean; 34 /** Configure a default value for the LE random address. */ 35 hasDefaultRandomAddress: boolean; 36 /** Send an Hardware Error event if any command is called before HCI Reset. */ 37 hardwareErrorBeforeReset: boolean; 38} 39 40export interface VendorFeatures { 41 /** Enable the support for the CSR vendor command. */ 42 csr: boolean; 43 /** 44 * Enable the support for Android vendor commands. 45 * Note: not all required vendor commands are necessarily implemented 46 * in RootCanal, unimplemented commands will return a Command Status or 47 * Command Complete HCI event with the status Unsupported Opcode. 48 */ 49 android: boolean; 50} 51 52export interface Controller { 53 /** 54 * Configure the controller preset. Presets come with a pre-selection 55 * of features and quirks, but these can be overridden with the next fields. 56 */ 57 preset: ControllerPreset; 58 /** Configure support for controller features. */ 59 features:|ControllerFeatures|undefined; 60 /** 61 * Enable controller quirks. 62 * Quirks are behaviors observed in real controllers that are not valid 63 * according to the specification. 64 */ 65 quirks:|ControllerQuirks|undefined; 66 /** 67 * Enable strict mode (defaults to enabled). 68 * Activate assertion checks in RootCanal for missing RootCanal features 69 * or Host stack misbehavior. 70 */ 71 strict: boolean; 72 /** Configure support for vendor features. */ 73 vendor: VendorFeatures|undefined; 74} 75 76export interface TcpServer { 77 /** 78 * Configure the TCP port on which the controller with this defined 79 * configuration will be served. 80 */ 81 tcpPort: number; 82 /** Controller configuration for this port. */ 83 configuration: Controller|undefined; 84} 85 86export interface Configuration { 87 tcpServer: TcpServer[]; 88} 89