Buttplug sex toy control library

chore: Continue cleaning up config field names to 1:1 match to rust names

Remove -'s, just use _'s, less serde renaming in code!

+82 -88
+31 -31
crates/buttplug_server_device_config/build-config/buttplug-device-config-v4.json
··· 1 1 { 2 2 "version": { 3 3 "major": 4, 4 - "minor": 65 4 + "minor": 67 5 5 }, 6 6 "protocols": { 7 7 "activejoy": { ··· 42 42 "communication": [ 43 43 { 44 44 "btle": { 45 - "advertised-services": [ 45 + "advertised_services": [ 46 46 "00001320-0000-1000-8000-00805f9b34fb" 47 47 ], 48 48 "names": [ ··· 8746 8746 "communication": [ 8747 8747 { 8748 8748 "serial": { 8749 - "baud-rate": 19200, 8750 - "data-bits": 8, 8749 + "baud_rate": 19200, 8750 + "data_bits": 8, 8751 8751 "parity": "N", 8752 8752 "port": "default", 8753 - "stop-bits": 1 8753 + "stop_bits": 1 8754 8754 } 8755 8755 } 8756 8756 ], ··· 9726 9726 "communication": [ 9727 9727 { 9728 9728 "btle": { 9729 - "advertised-services": [ 9729 + "advertised_services": [ 9730 9730 "6e400001-b5a3-f393-e0a9-e50e24dcca9e", 9731 9731 "50300001-0024-4bd4-bbd5-a6920e4c5653", 9732 9732 "57300001-0023-4bd4-bbd5-a6920e4c5653", ··· 9763 9763 "4f430001-0023-4bd4-bbd5-a6920e4c5653", 9764 9764 "455a0001-0023-4bd4-bbd5-a6920e4c5653" 9765 9765 ], 9766 - "manufacturer-data": [ 9766 + "manufacturer_data": [ 9767 9767 { 9768 9768 "company": 620, 9769 9769 "data": [ ··· 10798 10798 "lovense-connect-service": { 10799 10799 "communication": [ 10800 10800 { 10801 - "lovense-connect-service": { 10801 + "lovense_connect_service": { 10802 10802 "exists": true 10803 10803 } 10804 10804 } ··· 13772 13772 "communication": [ 13773 13773 { 13774 13774 "serial": { 13775 - "baud-rate": 115200, 13776 - "data-bits": 8, 13775 + "baud_rate": 115200, 13776 + "data_bits": 8, 13777 13777 "parity": "N", 13778 13778 "port": "default", 13779 - "stop-bits": 1 13779 + "stop_bits": 1 13780 13780 } 13781 13781 } 13782 13782 ], ··· 13933 13933 "hid": { 13934 13934 "pairs": [ 13935 13935 { 13936 - "product-id": 8199, 13937 - "vendor-id": 1406 13936 + "product_id": 8199, 13937 + "vendor_id": 1406 13938 13938 }, 13939 13939 { 13940 - "product-id": 8198, 13941 - "vendor-id": 1406 13940 + "product_id": 8198, 13941 + "vendor_id": 1406 13942 13942 }, 13943 13943 { 13944 - "product-id": 8201, 13945 - "vendor-id": 1406 13944 + "product_id": 8201, 13945 + "vendor_id": 1406 13946 13946 } 13947 13947 ] 13948 13948 } ··· 13982 13982 }, 13983 13983 { 13984 13984 "serial": { 13985 - "baud-rate": 19200, 13986 - "data-bits": 8, 13985 + "baud_rate": 19200, 13986 + "data_bits": 8, 13987 13987 "parity": "N", 13988 13988 "port": "default", 13989 - "stop-bits": 1 13989 + "stop_bits": 1 13990 13990 } 13991 13991 } 13992 13992 ], ··· 14342 14342 "hid": { 14343 14343 "pairs": [ 14344 14344 { 14345 - "product-id": 1, 14346 - "vendor-id": 8020 14345 + "product_id": 1, 14346 + "vendor_id": 8020 14347 14347 } 14348 14348 ] 14349 14349 } ··· 14377 14377 "usb": { 14378 14378 "pairs": [ 14379 14379 { 14380 - "product-id": 1615, 14381 - "vendor-id": 2889 14380 + "product_id": 1615, 14381 + "vendor_id": 2889 14382 14382 } 14383 14383 ] 14384 14384 } ··· 14496 14496 "communication": [ 14497 14497 { 14498 14498 "btle": { 14499 - "manufacturer-data": [ 14499 + "manufacturer_data": [ 14500 14500 { 14501 14501 "company": 93, 14502 14502 "data": [ ··· 17066 17066 "communication": [ 17067 17067 { 17068 17068 "btle": { 17069 - "manufacturer-data": [ 17069 + "manufacturer_data": [ 17070 17070 { 17071 17071 "company": 39, 17072 17072 "data": [ ··· 18241 18241 "communication": [ 18242 18242 { 18243 18243 "serial": { 18244 - "baud-rate": 115200, 18245 - "data-bits": 8, 18244 + "baud_rate": 115200, 18245 + "data_bits": 8, 18246 18246 "parity": "N", 18247 18247 "port": "default", 18248 - "stop-bits": 1 18248 + "stop_bits": 1 18249 18249 } 18250 18250 } 18251 18251 ], ··· 18764 18764 "hid": { 18765 18765 "pairs": [ 18766 18766 { 18767 - "product-id": 22352, 18768 - "vendor-id": 1155 18767 + "product_id": 22352, 18768 + "vendor_id": 1155 18769 18769 } 18770 18770 ] 18771 18771 }
+14 -14
crates/buttplug_server_device_config/device-config-v4/buttplug-device-config-schema-v4.json
··· 28 28 }, 29 29 "minItems": 1 30 30 }, 31 - "manufacturer-data": { 31 + "manufacturer_data": { 32 32 "type": "array", 33 33 "items": { 34 34 "type": "object", ··· 36 36 "company": { 37 37 "type": "integer" 38 38 }, 39 - "expected-length": { 39 + "expected_length": { 40 40 "type": "integer" 41 41 }, 42 42 "data": { ··· 51 51 ] 52 52 } 53 53 }, 54 - "advertised-services": { 54 + "advertised_services": { 55 55 "type": "array", 56 56 "items": { 57 57 "$ref": "#/components/uuid" ··· 92 92 "port": { 93 93 "type": "string" 94 94 }, 95 - "baud-rate": { 95 + "baud_rate": { 96 96 "type": "integer" 97 97 }, 98 - "data-bits": { 98 + "data_bits": { 99 99 "type": "integer" 100 100 }, 101 101 "parity": { 102 102 "type": "string" 103 103 }, 104 - "stop-bits": { 104 + "stop_bits": { 105 105 "type": "integer" 106 106 } 107 107 }, 108 108 "required": [ 109 109 "port", 110 - "baud-rate", 111 - "data-bits", 110 + "baud_rate", 111 + "data_bits", 112 112 "parity", 113 - "stop-bits" 113 + "stop_bits" 114 114 ], 115 115 "additionalProperties": false 116 116 }, ··· 138 138 "items": { 139 139 "type": "object", 140 140 "properties": { 141 - "vendor-id": { 141 + "vendor_id": { 142 142 "type": "integer", 143 143 "minimum": 0, 144 144 "maximum": 65535 145 145 }, 146 - "product-id": { 146 + "product_id": { 147 147 "type": "integer", 148 148 "minimum": 0, 149 149 "maximum": 65535 150 150 } 151 151 }, 152 152 "required": [ 153 - "vendor-id", 154 - "product-id" 153 + "vendor_id", 154 + "product_id" 155 155 ], 156 156 "additionalProperties": false 157 157 }, ··· 453 453 "xinput": { 454 454 "$ref": "#/components/xinput-definition" 455 455 }, 456 - "lovense-connect-service": { 456 + "lovense_connect_service": { 457 457 "$ref": "#/components/lovense-connect-service-definition" 458 458 } 459 459 }
+1 -1
crates/buttplug_server_device_config/device-config-v4/protocols/adrienlastic.yml
··· 21 21 - btle: 22 22 names: 23 23 - Placeholder to avoid conflict with bad attempt to clone a Lovense Lush 24 - advertised-services: 24 + advertised_services: 25 25 - 00001320-0000-1000-8000-00805f9b34fb 26 26 services: 27 27 6e400001-b5a3-f393-e0a9-e50e24dcca9e:
+3 -3
crates/buttplug_server_device_config/device-config-v4/protocols/kizuna.yml
··· 11 11 communication: 12 12 - serial: 13 13 port: default 14 - baud-rate: 19200 15 - data-bits: 8 14 + baud_rate: 19200 15 + data_bits: 8 16 16 parity: 'N' 17 - stop-bits: 1 17 + stop_bits: 1
+1 -1
crates/buttplug_server_device_config/device-config-v4/protocols/lovense-connect-service.yml
··· 382 382 - Read 383 383 id: 665925e2-e895-443f-953a-cae3f371c138 384 384 communication: 385 - - lovense-connect-service: 385 + - lovense_connect_service: 386 386 exists: true
+2 -2
crates/buttplug_server_device_config/device-config-v4/protocols/lovense.yml
··· 485 485 names: 486 486 - LVS-* 487 487 - LOVE-* 488 - manufacturer-data: 488 + manufacturer_data: 489 489 - company: 620 490 490 data: 491 491 - 255 492 492 - 33 493 - advertised-services: 493 + advertised_services: 494 494 - 6e400001-b5a3-f393-e0a9-e50e24dcca9e 495 495 - 50300001-0024-4bd4-bbd5-a6920e4c5653 496 496 - 57300001-0023-4bd4-bbd5-a6920e4c5653
+3 -3
crates/buttplug_server_device_config/device-config-v4/protocols/nextlevelracing.yml
··· 61 61 communication: 62 62 - serial: 63 63 port: default 64 - baud-rate: 115200 65 - data-bits: 8 64 + baud_rate: 115200 65 + data_bits: 8 66 66 parity: 'N' 67 - stop-bits: 1 67 + stop_bits: 1
+6 -6
crates/buttplug_server_device_config/device-config-v4/protocols/nintendo-joycon.yml
··· 11 11 communication: 12 12 - hid: 13 13 pairs: 14 - - vendor-id: 1406 15 - product-id: 8199 16 - - vendor-id: 1406 17 - product-id: 8198 18 - - vendor-id: 1406 19 - product-id: 8201 14 + - vendor_id: 1406 15 + product_id: 8199 16 + - vendor_id: 1406 17 + product_id: 8198 18 + - vendor_id: 1406 19 + product_id: 8201
+3 -3
crates/buttplug_server_device_config/device-config-v4/protocols/nobra.yml
··· 17 17 tx: 0000abf1-0000-1000-8000-00805f9b34fb 18 18 - serial: 19 19 port: default 20 - baud-rate: 19200 21 - data-bits: 8 20 + baud_rate: 19200 21 + data_bits: 8 22 22 parity: 'N' 23 - stop-bits: 1 23 + stop_bits: 1
+2 -2
crates/buttplug_server_device_config/device-config-v4/protocols/realtouch.yml
··· 14 14 communication: 15 15 - hid: 16 16 pairs: 17 - - vendor-id: 8020 18 - product-id: 1 17 + - vendor_id: 8020 18 + product_id: 1
+2 -2
crates/buttplug_server_device_config/device-config-v4/protocols/rez-trancevibrator.yml
··· 11 11 communication: 12 12 - usb: 13 13 pairs: 14 - - vendor-id: 2889 15 - product-id: 1615 14 + - vendor_id: 2889 15 + product_id: 1615
+1 -1
crates/buttplug_server_device_config/device-config-v4/protocols/satisfyer.yml
··· 1038 1038 - btle: 1039 1039 names: 1040 1040 - SF * 1041 - manufacturer-data: 1041 + manufacturer_data: 1042 1042 - company: 93 1043 1043 data: 1044 1044 - 0
+1 -1
crates/buttplug_server_device_config/device-config-v4/protocols/svakom-iker.yml
··· 18 18 - btle: 19 19 names: 20 20 - Iker 21 - manufacturer-data: 21 + manufacturer_data: 22 22 - company: 39 23 23 data: 24 24 - 83
+3 -3
crates/buttplug_server_device_config/device-config-v4/protocols/tcode-v03.yml
··· 17 17 communication: 18 18 - serial: 19 19 port: default 20 - baud-rate: 115200 21 - data-bits: 8 20 + baud_rate: 115200 21 + data_bits: 8 22 22 parity: 'N' 23 - stop-bits: 1 23 + stop_bits: 1
+2 -2
crates/buttplug_server_device_config/device-config-v4/protocols/vorze-cyclone-x.yml
··· 11 11 communication: 12 12 - hid: 13 13 pairs: 14 - - vendor-id: 1155 15 - product-id: 22352 14 + - vendor_id: 1155 15 + product_id: 22352
+1 -1
crates/buttplug_server_device_config/device-config-v4/version.yaml
··· 1 1 version: 2 2 major: 4 3 - minor: 65 3 + minor: 67
-1
crates/buttplug_server_device_config/src/device_config_file/feature.rs
··· 430 430 #[derive(Serialize, Deserialize, Debug, Clone, Default, CopyGetters)] 431 431 pub struct BaseFeatureSettings { 432 432 #[serde( 433 - rename = "alt-protocol-index", 434 433 skip_serializing_if = "Option::is_none", 435 434 default 436 435 )]
+3 -8
crates/buttplug_server_device_config/src/specifier.rs
··· 87 87 /// Set of expected advertised names for this device. 88 88 names: HashSet<String>, 89 89 /// Array of possible manufacturer data values. 90 - #[serde(default, rename = "manufacturer-data")] 90 + #[serde(default)] 91 91 manufacturer_data: Vec<BluetoothLEManufacturerData>, 92 92 /// Set of expected advertised services for this device. 93 - #[serde(default, rename = "advertised-services")] 93 + #[serde(default)] 94 94 advertised_services: HashSet<Uuid>, 95 95 /// Services we expect the device may have. More services may be listed in a specifier than any 96 96 /// one device may have, but we expect at least one to be matched by a device in order to consider ··· 254 254 Serialize, Deserialize, Debug, PartialEq, Eq, Clone, Copy, Getters, Setters, MutGetters, 255 255 )] 256 256 pub struct VIDPIDPair { 257 - #[serde(rename = "vendor-id")] 258 257 vendor_id: u16, 259 - #[serde(rename = "product-id")] 260 258 product_id: u16, 261 259 } 262 260 ··· 299 297 #[derive(Serialize, Deserialize, Debug, Clone, Default, Getters, Setters, MutGetters)] 300 298 #[getset(get = "pub", set = "pub", get_mut = "pub(crate)")] 301 299 pub struct SerialSpecifier { 302 - #[serde(rename = "baud-rate")] 303 300 baud_rate: u32, 304 - #[serde(rename = "data-bits")] 305 301 data_bits: u8, 306 - #[serde(rename = "stop-bits")] 307 302 stop_bits: u8, 308 303 parity: char, 309 304 port: String, ··· 382 377 Serial(SerialSpecifier), 383 378 #[serde(rename = "xinput")] 384 379 XInput(XInputSpecifier), 385 - #[serde(rename = "lovense-connect-service")] 380 + #[serde(rename = "lovense_connect_service")] 386 381 LovenseConnectService(LovenseConnectServiceSpecifier), 387 382 #[serde(rename = "websocket")] 388 383 Websocket(WebsocketSpecifier),
+3 -3
crates/buttplug_server_device_config/tests/test_configs/user_tcode_protocol.json
··· 9 9 "communication": [ 10 10 { 11 11 "serial": { 12 - "baud-rate": 115200, 13 - "data-bits": 8, 12 + "baud_rate": 115200, 13 + "data_bits": 8, 14 14 "parity": "N", 15 15 "port": "COM1", 16 - "stop-bits": 1 16 + "stop_bits": 1 17 17 } 18 18 }, 19 19 {