aboutsummaryrefslogtreecommitdiff
path: root/src/sub/property.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sub/property.rs')
-rw-r--r--src/sub/property.rs73
1 files changed, 73 insertions, 0 deletions
diff --git a/src/sub/property.rs b/src/sub/property.rs
new file mode 100644
index 0000000..6bacc4e
--- /dev/null
+++ b/src/sub/property.rs
@@ -0,0 +1,73 @@
+// struct NetToProperty {
+// _prop_id: i32,
+// _flags: i32,
+// _access: i32,
+// _string_value: String,
+// _bin_value: Vec<i32>,
+// }
+// impl NetToProperty {
+// fn parse_net_data() -> Self {
+// NetToProperty {
+// _prop_id: 0,
+// _flags: 0,
+// _access: 0,
+// _string_value: "".to_string(),
+// _bin_value: vec![]
+// }
+// }
+// }
+
+// To be honest, don't care enough to make this function.
+// It's not important enough as it stands currently.
+pub fn create_property_update_command() -> [u8; 147] { // Vec<u8>
+ // let mut property = Vec::with_capacity(2);
+ // property.push(0x01); // ?
+ // property.push(0x10); // Command type
+ //
+ // // Meaningful Data
+ // property.push(); // Property ID
+ // property.push(); // Flags
+ // property.push(); // Access
+ //
+ // // Insert data length as first byte.
+ // property.insert(0, property.len() as u8 + 1); // ^
+ //
+ // property // Return created array
+
+ [
+ 0x93, 0xFF, 0x10, 0x1B, 0x80, 0x01, 0x0C, 0x77, 0x6F,
+ 0x72, 0x6C, 0x64, 0x73, 0x33, 0x64, 0x2E, 0x63, 0x6F,
+ 0x6D, 0x1A, 0x80, 0x01, 0x12, 0x6D, 0x61, 0x69, 0x6C,
+ 0x2E, 0x77, 0x6F, 0x72, 0x6C, 0x64, 0x73, 0x2E, 0x6E,
+ 0x65, 0x74, 0x3A, 0x32, 0x35, 0x19, 0x80, 0x01, 0x28,
+ 0x68, 0x74, 0x74, 0x70, 0x3A, 0x2F, 0x2F, 0x77, 0x77,
+ 0x77, 0x2D, 0x64, 0x79, 0x6E, 0x61, 0x6D, 0x69, 0x63,
+ 0x2E, 0x75, 0x73, 0x2E, 0x77, 0x6F, 0x72, 0x6C, 0x64,
+ 0x73, 0x2E, 0x6E, 0x65, 0x74, 0x2F, 0x63, 0x67, 0x69,
+ 0x2D, 0x62, 0x69, 0x6E, 0x18, 0x80, 0x01, 0x1F, 0x68,
+ 0x74, 0x74, 0x70, 0x3A, 0x2F, 0x2F, 0x77, 0x77, 0x77,
+ 0x2D, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x2E, 0x75,
+ 0x73, 0x2E, 0x77, 0x6F, 0x72, 0x6C, 0x64, 0x73, 0x2E,
+ 0x6E, 0x65, 0x74, 0x0F, 0x80, 0x01, 0x01, 0x31, 0x03,
+ 0x80, 0x01, 0x02, 0x32, 0x34, 0x01, 0x80, 0x01, 0x0C,
+ 0x57, 0x4F, 0x52, 0x4C, 0x44, 0x53, 0x4D, 0x41, 0x53,
+ 0x54, 0x45, 0x52
+ ]: [u8; 147]
+}
+
+// src\sub\property.rs:20:1
+pub fn create_property_request_command() -> [u8; 61] {
+ [
+ 0x3D, 0x01, 0x06, 0x04, 0x01, 0x30, 0x01, 0x0C,
+ 0x57, 0x4F, 0x52, 0x4C, 0x44, 0x53, 0x4D, 0x41,
+ 0x53, 0x54, 0x45, 0x52, 0x03, 0x02, 0x32, 0x34,
+ 0x0F, 0x01, 0x31, 0x0A, 0x10,
+
+ // VAR_SERIAL
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+ 0x16, 0x01, 0x30, 0x05, 0x0B, 0x64, 0x69, 0x6D,
+ 0x65, 0x6E, 0x73, 0x69, 0x6F, 0x6E, 0x2D, 0x31
+ ]: [u8; 61]
+}