Showing preview only (2,584K chars total). Download the full file or copy to clipboard to get everything.
Repository: ewilken/hap-rs
Branch: main
Commit: acf45bdb00e2
Files: 431
Total size: 2.4 MB
Directory structure:
gitextract_ilaxg926/
├── .github/
│ └── workflows/
│ └── ci.yml
├── .gitignore
├── Cargo.toml
├── LICENSE-APACHE
├── LICENSE-MIT
├── README.md
├── codegen/
│ ├── Cargo.toml
│ ├── gen/
│ │ ├── README.md
│ │ └── system.json
│ └── src/
│ └── main.rs
├── examples/
│ ├── adding_accessories_dynamically.rs
│ ├── air_purifier.rs
│ ├── air_quality_sensor.rs
│ ├── async_callbacks.rs
│ ├── bridged_accessories.rs
│ ├── callbacks.rs
│ ├── carbon_dioxide_sensor.rs
│ ├── carbon_monoxide_sensor.rs
│ ├── contact_sensor.rs
│ ├── cooler.rs
│ ├── custom_characteristics_services_accessories.rs
│ ├── custom_multi_sensor.rs
│ ├── dehumidifier.rs
│ ├── door.rs
│ ├── fan.rs
│ ├── fan_v2.rs
│ ├── faucet.rs
│ ├── garage_door_opener.rs
│ ├── heater.rs
│ ├── humidifier.rs
│ ├── humidity_sensor.rs
│ ├── irrigation_system.rs
│ ├── leak_sensor.rs
│ ├── light_sensor.rs
│ ├── lightbulb.rs
│ ├── lock.rs
│ ├── motion_sensor.rs
│ ├── occupancy_sensor.rs
│ ├── outlet.rs
│ ├── security_system.rs
│ ├── setting_values_after_server_start.rs
│ ├── shower_head.rs
│ ├── smart_speaker.rs
│ ├── smoke_sensor.rs
│ ├── stateful_programmable_switch.rs
│ ├── stateless_programmable_switch.rs
│ ├── storing_arbitrary_bytes.rs
│ ├── switch.rs
│ ├── television.rs
│ ├── temperature_sensor.rs
│ ├── thermostat.rs
│ ├── wi_fi_router.rs
│ ├── wi_fi_satellite.rs
│ ├── window.rs
│ └── window_covering.rs
├── rls.toml
├── rustfmt.toml
└── src/
├── accessory/
│ ├── category.rs
│ ├── defined/
│ │ ├── bridge.rs
│ │ ├── faucet.rs
│ │ ├── heater_cooler.rs
│ │ ├── irrigation_system.rs
│ │ ├── lightbulb.rs
│ │ ├── lock.rs
│ │ ├── mod.rs
│ │ ├── shower_head.rs
│ │ └── television.rs
│ ├── generated/
│ │ ├── air_purifier.rs
│ │ ├── air_quality_sensor.rs
│ │ ├── carbon_dioxide_sensor.rs
│ │ ├── carbon_monoxide_sensor.rs
│ │ ├── contact_sensor.rs
│ │ ├── door.rs
│ │ ├── fan.rs
│ │ ├── fan_v2.rs
│ │ ├── garage_door_opener.rs
│ │ ├── humidifier_dehumidifier.rs
│ │ ├── humidity_sensor.rs
│ │ ├── leak_sensor.rs
│ │ ├── light_sensor.rs
│ │ ├── mod.rs
│ │ ├── motion_sensor.rs
│ │ ├── occupancy_sensor.rs
│ │ ├── outlet.rs
│ │ ├── security_system.rs
│ │ ├── smart_speaker.rs
│ │ ├── smoke_sensor.rs
│ │ ├── stateful_programmable_switch.rs
│ │ ├── stateless_programmable_switch.rs
│ │ ├── switch.rs
│ │ ├── temperature_sensor.rs
│ │ ├── thermostat.rs
│ │ ├── wi_fi_router.rs
│ │ ├── wi_fi_satellite.rs
│ │ ├── window.rs
│ │ └── window_covering.rs
│ └── mod.rs
├── characteristic/
│ ├── generated/
│ │ ├── access_code_control_point.rs
│ │ ├── access_code_supported_configuration.rs
│ │ ├── access_control_level.rs
│ │ ├── accessory_flags.rs
│ │ ├── accessory_identifier.rs
│ │ ├── active.rs
│ │ ├── active_identifier.rs
│ │ ├── activity_interval.rs
│ │ ├── administrator_only_access.rs
│ │ ├── air_particulate_density.rs
│ │ ├── air_particulate_size.rs
│ │ ├── airplay_enable.rs
│ │ ├── application_matching_identifier.rs
│ │ ├── asset_update_readiness.rs
│ │ ├── audio_feedback.rs
│ │ ├── battery_level.rs
│ │ ├── brightness.rs
│ │ ├── button_event.rs
│ │ ├── camera_operating_mode_indicator.rs
│ │ ├── carbon_dioxide_detected.rs
│ │ ├── carbon_dioxide_level.rs
│ │ ├── carbon_dioxide_peak_level.rs
│ │ ├── carbon_monoxide_detected.rs
│ │ ├── carbon_monoxide_level.rs
│ │ ├── carbon_monoxide_peak_level.rs
│ │ ├── cca_energy_detect_threshold.rs
│ │ ├── cca_signal_detect_threshold.rs
│ │ ├── characteristic_value_active_transition_count.rs
│ │ ├── characteristic_value_transition_control.rs
│ │ ├── charging_state.rs
│ │ ├── closed_captions.rs
│ │ ├── cloud_relay_control_point.rs
│ │ ├── cloud_relay_current_state.rs
│ │ ├── cloud_relay_enable_status.rs
│ │ ├── color_temperature.rs
│ │ ├── configuration_state.rs
│ │ ├── configured_name.rs
│ │ ├── contact_sensor_state.rs
│ │ ├── cooling_threshold_temperature.rs
│ │ ├── current_air_purifier_state.rs
│ │ ├── current_air_quality.rs
│ │ ├── current_door_state.rs
│ │ ├── current_fan_state.rs
│ │ ├── current_heater_cooler_state.rs
│ │ ├── current_heating_cooling_state.rs
│ │ ├── current_horizontal_tilt_angle.rs
│ │ ├── current_humidifier_dehumidifier_state.rs
│ │ ├── current_light_level.rs
│ │ ├── current_media_state.rs
│ │ ├── current_position.rs
│ │ ├── current_relative_humidity.rs
│ │ ├── current_slat_state.rs
│ │ ├── current_temperature.rs
│ │ ├── current_tilt_angle.rs
│ │ ├── current_transport.rs
│ │ ├── current_vertical_tilt_angle.rs
│ │ ├── current_visibility_state.rs
│ │ ├── current_water_level.rs
│ │ ├── data_stream_hap_transport.rs
│ │ ├── data_stream_hap_transport_interrupt.rs
│ │ ├── digital_zoom.rs
│ │ ├── display_order.rs
│ │ ├── event_retransmission_maximum.rs
│ │ ├── event_snapshots_active.rs
│ │ ├── event_transmission_counters.rs
│ │ ├── filter_change_indication.rs
│ │ ├── filter_life_level.rs
│ │ ├── filter_reset_change_indication.rs
│ │ ├── firmware_revision.rs
│ │ ├── firmware_update_readiness.rs
│ │ ├── firmware_update_status.rs
│ │ ├── hardware_finish.rs
│ │ ├── hardware_revision.rs
│ │ ├── heart_beat.rs
│ │ ├── heating_threshold_temperature.rs
│ │ ├── hold_position.rs
│ │ ├── homekit_camera_active.rs
│ │ ├── hue.rs
│ │ ├── identifier.rs
│ │ ├── identify.rs
│ │ ├── image_mirroring.rs
│ │ ├── image_rotation.rs
│ │ ├── in_use.rs
│ │ ├── input_device_type.rs
│ │ ├── input_source_type.rs
│ │ ├── is_configured.rs
│ │ ├── label_index.rs
│ │ ├── label_namespace.rs
│ │ ├── leak_detected.rs
│ │ ├── list_pairings.rs
│ │ ├── lock_control_point.rs
│ │ ├── lock_current_state.rs
│ │ ├── lock_last_known_action.rs
│ │ ├── lock_management_auto_security_timeout.rs
│ │ ├── lock_physical_controls.rs
│ │ ├── lock_target_state.rs
│ │ ├── logs.rs
│ │ ├── mac_retransmission_maximum.rs
│ │ ├── mac_transmission_counters.rs
│ │ ├── managed_network_enable.rs
│ │ ├── manually_disabled.rs
│ │ ├── manufacturer.rs
│ │ ├── maximum_transmit_power.rs
│ │ ├── mod.rs
│ │ ├── model.rs
│ │ ├── motion_detected.rs
│ │ ├── multifunction_button.rs
│ │ ├── mute.rs
│ │ ├── name.rs
│ │ ├── network_access_violation_control.rs
│ │ ├── network_client_control.rs
│ │ ├── network_client_status_control.rs
│ │ ├── nfc_access_control_point.rs
│ │ ├── nfc_access_supported_configuration.rs
│ │ ├── night_vision.rs
│ │ ├── nitrogen_dioxide_density.rs
│ │ ├── obstruction_detected.rs
│ │ ├── occupancy_detected.rs
│ │ ├── operating_state_response.rs
│ │ ├── optical_zoom.rs
│ │ ├── outlet_in_use.rs
│ │ ├── ozone_density.rs
│ │ ├── pair_setup.rs
│ │ ├── pair_verify.rs
│ │ ├── pairing_features.rs
│ │ ├── password_setting.rs
│ │ ├── periodic_snapshots_active.rs
│ │ ├── picture_mode.rs
│ │ ├── ping.rs
│ │ ├── pm10_density.rs
│ │ ├── pm2_5_density.rs
│ │ ├── position_state.rs
│ │ ├── power_mode_selection.rs
│ │ ├── power_state.rs
│ │ ├── product_data.rs
│ │ ├── program_mode.rs
│ │ ├── programmable_switch_event.rs
│ │ ├── programmable_switch_output_state.rs
│ │ ├── received_signal_strength_indication.rs
│ │ ├── receiver_sensitivity.rs
│ │ ├── recording_audio_active.rs
│ │ ├── relative_humidity_dehumidifier_threshold.rs
│ │ ├── relative_humidity_humidifier_threshold.rs
│ │ ├── remaining_duration.rs
│ │ ├── remote_key.rs
│ │ ├── rotation_direction.rs
│ │ ├── rotation_speed.rs
│ │ ├── router_status.rs
│ │ ├── saturation.rs
│ │ ├── security_system_alarm_type.rs
│ │ ├── security_system_current_state.rs
│ │ ├── security_system_target_state.rs
│ │ ├── selected_audio_stream_configuration.rs
│ │ ├── selected_camera_recording_configuration.rs
│ │ ├── selected_diagnostics_modes.rs
│ │ ├── selected_stream_configuration.rs
│ │ ├── serial_number.rs
│ │ ├── service_signature.rs
│ │ ├── set_duration.rs
│ │ ├── setup_data_stream_transport.rs
│ │ ├── setup_endpoint.rs
│ │ ├── setup_transfer_transport.rs
│ │ ├── signal_to_noise_ratio.rs
│ │ ├── siri_enable.rs
│ │ ├── siri_endpoint_session_status.rs
│ │ ├── siri_engine_version.rs
│ │ ├── siri_input_type.rs
│ │ ├── siri_light_on_use.rs
│ │ ├── siri_listening.rs
│ │ ├── siri_touch_to_use.rs
│ │ ├── slat_type.rs
│ │ ├── sleep_discovery_mode.rs
│ │ ├── sleep_interval.rs
│ │ ├── smoke_detected.rs
│ │ ├── software_revision.rs
│ │ ├── staged_firmware_version.rs
│ │ ├── status_active.rs
│ │ ├── status_fault.rs
│ │ ├── status_jammed.rs
│ │ ├── status_low_battery.rs
│ │ ├── status_tampered.rs
│ │ ├── streaming_status.rs
│ │ ├── sulphur_dioxide_density.rs
│ │ ├── supported_asset_types.rs
│ │ ├── supported_audio_recording_configuration.rs
│ │ ├── supported_audio_stream_configuration.rs
│ │ ├── supported_camera_recording_configuration.rs
│ │ ├── supported_characteristic_value_transition_configuration.rs
│ │ ├── supported_data_stream_transport_configuration.rs
│ │ ├── supported_diagnostics_modes.rs
│ │ ├── supported_diagnostics_snapshot.rs
│ │ ├── supported_firmware_update_configuration.rs
│ │ ├── supported_router_configuration.rs
│ │ ├── supported_rtp_configuration.rs
│ │ ├── supported_target_configuration.rs
│ │ ├── supported_transfer_transport_configuration.rs
│ │ ├── supported_video_recording_configuration.rs
│ │ ├── supported_video_stream_configuration.rs
│ │ ├── swing_mode.rs
│ │ ├── target_air_purifier_state.rs
│ │ ├── target_door_state.rs
│ │ ├── target_fan_state.rs
│ │ ├── target_heater_cooler_state.rs
│ │ ├── target_heating_cooling_state.rs
│ │ ├── target_horizontal_tilt_angle.rs
│ │ ├── target_humidifier_dehumidifier_state.rs
│ │ ├── target_list_configuration.rs
│ │ ├── target_media_state.rs
│ │ ├── target_position.rs
│ │ ├── target_relative_humidity.rs
│ │ ├── target_temperature.rs
│ │ ├── target_tilt_angle.rs
│ │ ├── target_vertical_tilt_angle.rs
│ │ ├── target_visibility_state.rs
│ │ ├── temperature_display_units.rs
│ │ ├── third_party_camera_active.rs
│ │ ├── thread_control_point.rs
│ │ ├── thread_node_capabilities.rs
│ │ ├── thread_openthread_version.rs
│ │ ├── thread_status.rs
│ │ ├── transmit_power.rs
│ │ ├── valve_type.rs
│ │ ├── version.rs
│ │ ├── video_analysis_active.rs
│ │ ├── volatile_organic_compound_density.rs
│ │ ├── volume.rs
│ │ ├── volume_control_type.rs
│ │ ├── volume_selector.rs
│ │ ├── wake_configuration.rs
│ │ ├── wan_configuration_list.rs
│ │ ├── wan_status_list.rs
│ │ ├── wi_fi_capabilities.rs
│ │ ├── wi_fi_configuration_control.rs
│ │ └── wi_fi_satellite_status.rs
│ └── mod.rs
├── config.rs
├── error.rs
├── event.rs
├── hap_type.rs
├── lib.rs
├── pairing.rs
├── pin.rs
├── pointer.rs
├── server/
│ ├── ip.rs
│ └── mod.rs
├── service/
│ ├── generated/
│ │ ├── access_code.rs
│ │ ├── access_control.rs
│ │ ├── accessory_information.rs
│ │ ├── accessory_metrics.rs
│ │ ├── accessory_runtime_information.rs
│ │ ├── air_purifier.rs
│ │ ├── air_quality_sensor.rs
│ │ ├── asset_update.rs
│ │ ├── assistant.rs
│ │ ├── audio_stream_management.rs
│ │ ├── battery.rs
│ │ ├── camera_operating_mode.rs
│ │ ├── camera_recording_management.rs
│ │ ├── camera_stream_management.rs
│ │ ├── carbon_dioxide_sensor.rs
│ │ ├── carbon_monoxide_sensor.rs
│ │ ├── cloud_relay.rs
│ │ ├── contact_sensor.rs
│ │ ├── data_stream_transport_management.rs
│ │ ├── diagnostics.rs
│ │ ├── door.rs
│ │ ├── doorbell.rs
│ │ ├── fan.rs
│ │ ├── fan_v2.rs
│ │ ├── faucet.rs
│ │ ├── filter_maintenance.rs
│ │ ├── garage_door_opener.rs
│ │ ├── heater_cooler.rs
│ │ ├── humidifier_dehumidifier.rs
│ │ ├── humidity_sensor.rs
│ │ ├── input_source.rs
│ │ ├── irrigation_system.rs
│ │ ├── label.rs
│ │ ├── leak_sensor.rs
│ │ ├── light_sensor.rs
│ │ ├── lightbulb.rs
│ │ ├── lock_management.rs
│ │ ├── lock_mechanism.rs
│ │ ├── microphone.rs
│ │ ├── mod.rs
│ │ ├── motion_sensor.rs
│ │ ├── nfc_access_service.rs
│ │ ├── occupancy_sensor.rs
│ │ ├── outlet.rs
│ │ ├── pairing.rs
│ │ ├── power_management.rs
│ │ ├── protocol_information.rs
│ │ ├── security_system.rs
│ │ ├── siri.rs
│ │ ├── siri_endpoint.rs
│ │ ├── slats.rs
│ │ ├── smart_speaker.rs
│ │ ├── smoke_sensor.rs
│ │ ├── speaker.rs
│ │ ├── stateful_programmable_switch.rs
│ │ ├── stateless_programmable_switch.rs
│ │ ├── switch.rs
│ │ ├── target_control.rs
│ │ ├── target_control_management.rs
│ │ ├── television.rs
│ │ ├── temperature_sensor.rs
│ │ ├── thermostat.rs
│ │ ├── thread_transport.rs
│ │ ├── transfer_transport_management.rs
│ │ ├── valve.rs
│ │ ├── wi_fi_router.rs
│ │ ├── wi_fi_satellite.rs
│ │ ├── wi_fi_transport.rs
│ │ ├── window.rs
│ │ └── window_covering.rs
│ └── mod.rs
├── storage/
│ ├── accessory_database.rs
│ ├── file_storage.rs
│ ├── mod.rs
│ └── storage.rs
├── tlv.rs
└── transport/
├── bonjour.rs
├── http/
│ ├── handler/
│ │ ├── accessories.rs
│ │ ├── characteristics.rs
│ │ ├── identify.rs
│ │ ├── mod.rs
│ │ ├── pair_setup.rs
│ │ ├── pair_verify.rs
│ │ └── pairings.rs
│ ├── mod.rs
│ └── server.rs
├── mdns.rs
├── mod.rs
└── tcp.rs
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/ci.yml
================================================
name: CI
on:
pull_request:
push:
branches:
- main
env:
RUST_BACKTRACE: 1
jobs:
style:
name: Check style
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt
- name: cargo fmt --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
test:
name: Test ${{ matrix.rust }} on ${{ matrix.os }}
needs: [style]
strategy:
matrix:
rust:
- stable
- beta
- nightly
os:
- ubuntu-latest
- windows-latest
- macOS-latest
include:
- rust: stable
features: ''
- rust: beta
features: ''
- rust: nightly
features: ''
benches: true
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Rust (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Build only
if: matrix.build-only
uses: actions-rs/cargo@v1
with:
command: build
args: ${{ matrix.features }}
- name: Test
if: matrix.build-only != true
uses: actions-rs/cargo@v1
with:
command: test
args: ${{ matrix.features }}
- name: Test all benches
if: matrix.benches && matrix.build-only != true
uses: actions-rs/cargo@v1
with:
command: test
args: --benches ${{ matrix.features }}
doc:
name: Build docs
needs: [style, test]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: cargo rustdoc -- -D rustdoc::broken_intra_doc_links
uses: actions-rs/cargo@v1
with:
command: rustdoc
args: -- -D rustdoc::broken_intra_doc_links
================================================
FILE: .gitignore
================================================
Cargo.lock
target
data
.DS_Store
================================================
FILE: Cargo.toml
================================================
[package]
name = "hap"
version = "0.1.0-pre.15"
authors = ["Elias Wilken <elias@wlkn.io>"]
edition = "2021"
description = "Rust implementation of the Apple HomeKit Accessory Protocol (HAP)"
documentation = "https://docs.rs/hap"
readme = "README.md"
repository = "https://github.com/ewilken/hap-rs"
license = "MIT/Apache-2.0"
keywords = ["apple", "homekit"]
exclude = [
".github",
".gitignore",
"examples",
"LICENSE-APACHE",
"LICENSE-MIT",
"README.md",
"rls.toml",
"rustfmt.toml",
]
[dependencies]
aead = "0.4"
async-trait = "0.1"
byteorder = "1.3"
bytes = "1.0"
chacha20poly1305 = "0.8"
ed25519-dalek = { version = "1.0", features = ["std", "serde"] }
erased-serde = "0.3"
macaddr = { version = "1.0.1", features = ["serde"] }
futures = "0.3"
get_if_addrs = "0.5"
hkdf = "0.11"
hyper = { version = "0.14", features = ["server", "http1"] }
libmdns = "0.6"
log = "0.4"
num = "0.2"
rand = "0.7"
serde = { version = "1.0", features = ["rc", "derive"] }
serde_json = "1.0"
sha2 = "0.9"
signature = "1.1"
srp = "0.5"
thiserror = "1.0"
tokio = "1.8"
url = "2.1"
uuid = { version = "0.8", features = ["v4", "serde"] }
x25519-dalek = "0.6"
[build-dependencies]
handlebars = "2.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
uuid = { version = "0.8", features = ["v4", "serde"] }
[dev-dependencies]
env_logger = "0.8"
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1.8", features = ["rt-multi-thread", "time", "macros"] }
[workspace]
members = ["codegen"]
================================================
FILE: LICENSE-APACHE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: LICENSE-MIT
================================================
Copyright (c) 2021 Elias Wilken
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
================================================
FILE: README.md
================================================
# HAP (HomeKit Accessory Protocol)
[](https://github.com/ewilken/hap-rs/actions?query=workflow%3ACI)
[](https://crates.io/crates/hap)
[](https://docs.rs/hap)
[](https://github.com/ewilken/hap-rs)
Rust implementation of the Apple HomeKit Accessory Protocol (HAP).
This crate supports all HomeKit services and characteristics currently implemented by Apple (on stable macOS versions) and provides the ability to create custom characteristics, services and accessories.
The HomeKit Accessory Protocol supports transports over IP and Bluetooth LE. Currently only the transport over IP is implemented in this crate. Accessories are exposed by the implemented HAP Accessory HTTP server and announced via built-in mDNS.
## HomeKit Data Model
The HAP defines HomeKit enabled devices as virtual `accessories` that are composed of `services` that are composed of `characteristics`.
Characteristics hold values of various data types as well as optional metadata like max/min values or units. Services group characteristics and represent features of the accessory. Every accessory consists of at least one `accessory information service` and any number of additional services. For example a custom ceiling fan accessory may consist of an `accessory information service`, a `fan service` and a `lightbulb service`.
```
Ceiling Fan Accessory
|
|-- Accessory Information Service
| |-- Identify Characteristic
| |-- Manufacturer Characteristic
| |-- Model Characteristic
| |-- Name Characteristic
| |-- Serial Characteristic
|
|-- Fan Service
| |-- Power State Characteristic
| |-- Rotation Direction Characteristic
| |-- Rotation Speed Characteristic
|
|-- Lightbulb Service
| |-- Power State Characteristic
| |-- Brightness Characteristic
| |-- Hue Characteristic
| |-- Saturation Characteristic
```
This crate provides a pre-built accessory for every service predefined by Apple in the HomeKit Accessory Simulator as well as others like Television. Custom characteristics and services can be created, assembled and used alongside the predefined ones.
For a full list of the predefined characteristics, services and accessories, see the [docs](https://docs.rs/hap/) or [Apple's official specification](https://developer.apple.com/homekit/).
## Usage Examples
### Creating a simple lightbulb accessory and starting the IP server
```rust
use tokio;
use hap::{
accessory::{lightbulb::LightbulbAccessory, AccessoryCategory, AccessoryInformation},
server::{IpServer, Server},
storage::{FileStorage, Storage},
Config,
MacAddress,
Pin,
Result,
};
#[tokio::main]
async fn main() -> Result<()> {
let lightbulb = LightbulbAccessory::new(1, AccessoryInformation {
name: "Acme Lightbulb".into(),
..Default::default()
})?;
let mut storage = FileStorage::current_dir().await?;
let config = match storage.load_config().await {
Ok(mut config) => {
config.redetermine_local_ip();
storage.save_config(&config).await?;
config
},
Err(_) => {
let config = Config {
pin: Pin::new([1, 1, 1, 2, 2, 3, 3, 3])?,
name: "Acme Lightbulb".into(),
device_id: MacAddress::new([10, 20, 30, 40, 50, 60]),
category: AccessoryCategory::Lightbulb,
..Default::default()
};
storage.save_config(&config).await?;
config
},
};
let server = IpServer::new(config, storage).await?;
server.add_accessory(lightbulb).await?;
let handle = server.run_handle();
std::env::set_var("RUST_LOG", "hap=debug");
env_logger::init();
handle.await
}
```
### Setting sync callbacks to react to remote value reads and updates
```rust
use hap::characteristic::CharacteristicCallbacks;
lightbulb.lightbulb.power_state.on_read(Some(|| {
println!("power_state characteristic read");
Ok(None)
}));
lightbulb.lightbulb.power_state.on_update(Some(|current_val: &bool, new_val: &bool| {
println!("power_state characteristic updated from {} to {}", current_val, new_val);
Ok(())
}));
```
### Setting async callbacks to react to remote value reads and updates
```rust
use hap::characteristic::AsyncCharacteristicCallbacks;
lightbulb.lightbulb.power_state.on_read_async(Some(|| {
async {
println!("power_state characteristic read (async)");
Ok(None)
}
.boxed()
}));
lightbulb.lightbulb.power_state.on_update_async(Some(|current_val: bool, new_val: bool| {
async move {
println!("power_state characteristic updated from {} to {} (async)", current_val, new_val);
Ok(())
}
.boxed()
}));
```
### Setting a characteristic value directly
```rust
use hap::{
characteristic::HapCharacteristic,
serde_json::Value,
};
lightbulb.lightbulb.power_state.set_value(Value::Bool(true)).await.unwrap();
```
### Interacting with accessories added to the server
`Server::add_accessory` returns a pointer to the accessory that can be used like this:
```rust
async {
let accessory_ptr = server.add_accessory(accessory).await.unwrap();
}
```
Accessories behind the pointer are represented by the `HapAccessory` trait. The `HapAccessory::get_service` and `HapAccessory::get_mut_service` methods provide access to the services of the accessory, represented by the `HapService` trait. The `HapService::get_characteristic` and `HapService::get_mut_characteristic` methods provide access to the characteristics of the service, represented by the `HapCharacteristic` trait. All services and characteristics are identified by their `HapType`.
Accessing and changing the `power_state` characteristic of the `lightbulb` service of a `lightbulb` accessory would look like this:
```rust
use hap::{HapType, serde_json::Value};
async {
let mut lightbulb_accessory = lightbulb_ptr.lock().await;
let lightbulb_service = lightbulb_accessory.get_mut_service(HapType::Lightbulb).unwrap();
let power_state_characteristic = lightbulb_service.get_mut_characteristic(HapType::PowerState).unwrap();
power_state_characteristic.set_value(Value::Bool(true)).await.unwrap();
}
```
A full working example can be found [here](https://github.com/ewilken/hap-rs/blob/master/examples/setting_values_after_server_start.rs).
### (Re-)Determining the IP to bind on
IP and port to serve on are set via the `host` and `port` fields of the `Config` struct. On config creation, if not explicitly set, the port defaults to `32000` and the IP is set to that of the first non-loopback network interface detected on the host. After config creation however, that IP isn't implicitly re-evaluated. To do so, an implementor has to explicitly call the `redetermine_local_ip()` method of the `Config` struct.
An example of doing that on every program restart while reloading a saved config:
```rust
let config = match storage.load_config().await {
Ok(mut config) => {
config.redetermine_local_ip(); // on config reload, the IP has to be explicitly redetermined
let mut storage = FileStorage::current_dir().await?;
config
},
Err(_) => {
let config = Config {
pin: Pin::new([1, 1, 1, 2, 2, 3, 3, 3])?,
name: "Acme Outlet".into(),
device_id: MacAddress::new([10, 20, 30, 40, 50, 60]),
category: AccessoryCategory::Outlet,
..Default::default() // on config creation, the IP can be implicitly determined
};
let mut storage = FileStorage::current_dir().await?;
config
},
};
```
## Development
Codegen is handled by the `codegen` crate in the workspace. Generated files are checked in. To run the code generation, do:
cargo run --package hap-codegen
cargo +nightly fmt
## License
HAP is licensed under either of
- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
================================================
FILE: codegen/Cargo.toml
================================================
[package]
name = "hap-codegen"
version = "0.1.0-pre.15"
authors = ["Elias Wilken <elias@wlkn.io>"]
edition = "2021"
description = "Rust implementation of the Apple HomeKit Accessory Protocol (HAP)"
documentation = "https://docs.rs/hap"
readme = "README.md"
repository = "https://github.com/ewilken/hap-rs"
license = "MIT/Apache-2.0"
keywords = ["apple", "homekit"]
publish = false
[dependencies]
handlebars = "2.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
uuid = { version = "0.8", features = ["v4", "serde"] }
================================================
FILE: codegen/gen/README.md
================================================
### Getting system definitions
cp /System/Library/PrivateFrameworks/HomeKitDaemon.framework/Resources/plain-metadata.config system.json
# remove `LegacyCloud` & `LegacyIDS` entries
plutil -convert json system.json
================================================
FILE: codegen/gen/system.json
================================================
{
"Version": 880,
"PlistDictionary": {
"HomeKit": {
"Notification": {
"CoalesceNotifications": {
"tilt.current": ["slats"],
"brightness": ["lightbulb"],
"horizontal-tilt.current": ["window-covering"],
"saturation": ["lightbulb"],
"position.current": ["window-covering"],
"vertical-tilt.current": ["window-covering"],
"color-temperature": ["lightbulb"],
"hue": ["lightbulb"],
"temperature.current": ["sensor.temperature"]
},
"NotificationAutoEnabled": {
"display-order": ["television"],
"position.target": ["door", "window"],
"operating-state-response": ["doorbell"],
"active": ["access-code"],
"lock-mechanism.current-state": ["garage-door-opener", "lock-mechanism"],
"security-system-state.current": ["security-system"],
"is-configured": ["valve"],
"input-event": ["doorbell"],
"heart-beat": ["accessory-runtime-information"],
"position.hold": ["door", "window"],
"configured-name": ["input-source", "television", "smart-speaker"],
"lock-mechanism.target-state": ["garage-door-opener", "lock-mechanism"],
"position.current": ["door", "window"],
"position.state": ["door", "window"],
"door-state.current": ["garage-door-opener"],
"security-system-state.target": ["security-system"],
"door-state.target": ["garage-door-opener"]
},
"BulletinBoardEnabled": {
"position.hold": ["door", "window"],
"lock-mechanism.current-state": ["garage-door-opener", "lock-mechanism"],
"position.state": ["door", "window"],
"input-event": ["doorbell"],
"security-system-state.current": ["security-system"],
"door-state.current": ["garage-door-opener"],
"position.current": ["door", "window"]
}
},
"WakeOnOperationsFilter": { "active": { "television": { "Operations": ["Write"], "Values": [1] } } },
"Categories": {
"faucet": { "Identifier": 29, "DefaultDescription": "Faucet", "UUID": "43CE6F7E-F7E8-44B4-80CE-5786F6E6CD47" },
"television-set-top-box": {
"Identifier": 35,
"DefaultDescription": "Television Set Top Box",
"UUID": "FB953A08-6CDD-44E0-B011-CFAC559A3CFB"
},
"other": { "Identifier": 1, "DefaultDescription": "Other", "UUID": "0FBA259B-05AC-46F2-875F-204ABB6D9FE7" },
"air-heater": {
"Identifier": 20,
"DefaultDescription": "Air Heater",
"UUID": "BF7036FD-93CF-49B5-954F-CD2B760D11DA"
},
"window": { "Identifier": 13, "DefaultDescription": "Window", "UUID": "1C501511-408E-4C1E-816B-3FC011FFD5B1" },
"audio-receiver": {
"Identifier": 34,
"DefaultDescription": "Audio Receiver",
"UUID": "BE15659C-3CE6-4FD0-B152-BCDB488446C6"
},
"air-purifier": {
"Identifier": 19,
"DefaultDescription": "Air Purifier",
"UUID": "5510B997-D711-4636-870F-82BB61092B15"
},
"television": {
"Identifier": 31,
"DefaultDescription": "Television",
"UUID": "830C0952-7CD8-44FB-B0C0-DA4EDB0F32A9"
},
"outlet": { "Identifier": 7, "DefaultDescription": "Outlet", "UUID": "730F40D4-6D0E-4903-B09E-520A08AFB78C" },
"garage-door-opener": {
"Identifier": 4,
"DefaultDescription": "Garage Door Opener",
"UUID": "604B6E52-2C87-4596-B4C9-D15077C0C07F"
},
"apple-tv": {
"Identifier": 24,
"DefaultDescription": "Apple TV",
"UUID": "F6D2A2AC-3A6E-4E6F-8196-678ABE909D8E"
},
"airport": {
"Identifier": 27,
"DefaultDescription": "AirPort",
"UUID": "8BFB739C-1E09-4F7B-ABB8-DD7BADD0E8A9"
},
"lightbulb": {
"Identifier": 5,
"DefaultDescription": "Lightbulb",
"UUID": "57D56F4D-3302-41F7-AB34-5365AA180E81"
},
"air-humidifier": {
"Identifier": 22,
"DefaultDescription": "Air Humidifier",
"UUID": "3FEB9075-C9AF-4629-ADBC-A853259C645A"
},
"window-covering": {
"Identifier": 14,
"DefaultDescription": "Window Covering",
"UUID": "2FB9EE1F-1C21-4D0B-9383-9B65F64DBF0E"
},
"shower-head": {
"Identifier": 30,
"DefaultDescription": "Shower Head",
"UUID": "39D2A5B4-F9A6-43F6-90E7-0019F0C0E99F"
},
"video-doorbell": {
"Identifier": 18,
"DefaultDescription": "Video Doorbell",
"UUID": "957A52E0-BE03-490C-8305-7B20C1CC17BA"
},
"air-conditioner": {
"Identifier": 21,
"DefaultDescription": "Air Conditioner",
"UUID": "18DDD63A-27F9-4341-B59B-759D3D114586"
},
"fan": { "Identifier": 3, "DefaultDescription": "Fan", "UUID": "151CB559-0DF9-40AA-8A67-12AF06C4449D" },
"sprinkler": {
"Identifier": 28,
"DefaultDescription": "Sprinkler",
"UUID": "94D3FBD5-0A74-4EE4-BE1A-C97E82ADFA33"
},
"speaker": {
"Identifier": 26,
"DefaultDescription": "Speaker",
"UUID": "C0F5EDC5-4003-464A-9E5D-0DB36677BC35"
},
"bridge": { "Identifier": 2, "DefaultDescription": "Bridge", "UUID": "61102194-9993-48BF-A1EF-6C7DC50F0C01" },
"television-streaming-stick": {
"Identifier": 36,
"DefaultDescription": "Television Streaming Stick",
"UUID": "B0C866C4-3E25-4F6A-8476-A8A3B579A86E"
},
"door": { "Identifier": 12, "DefaultDescription": "Door", "UUID": "DD4DE411-8F01-44EE-866A-1F96144DC1B6" },
"door-lock": {
"Identifier": 6,
"DefaultDescription": "Door Lock",
"UUID": "C25D5FCE-52EC-4599-A815-1192C5F08C7F"
},
"thermostat": {
"Identifier": 9,
"DefaultDescription": "Thermostat",
"UUID": "79668DCF-89FB-450D-94B5-AEE70B7B09F1"
},
"switch": { "Identifier": 8, "DefaultDescription": "Switch", "UUID": "2F4C3164-8DE4-4A4F-93BA-DD1D5068DF0B" },
"sensor": { "Identifier": 10, "DefaultDescription": "Sensor", "UUID": "772AFB8E-8D2F-455E-90E5-9852E6C4DD31" },
"air-dehumidifier": {
"Identifier": 23,
"DefaultDescription": "Air Dehumidifier",
"UUID": "1E15B639-DC98-41D4-A394-2E4A1D54AA3A"
},
"ip-camera": {
"Identifier": 17,
"DefaultDescription": "IP Camera",
"UUID": "C9EE63DB-2FF7-4514-826A-2FC2F0D4C9F0"
},
"programmable-switch": {
"Identifier": 15,
"DefaultDescription": "Programmable Switch",
"UUID": "3F9B944B-B8DF-4570-BAF5-CD31A8B321A7"
},
"target-controller": {
"Identifier": 32,
"DefaultDescription": "Target Controller",
"UUID": "770ADB51-8848-491A-BFA3-C34EA096CC92"
},
"wifi-router": {
"Identifier": 33,
"DefaultDescription": "Wi-Fi Router",
"UUID": "337635B4-552A-48AD-A38D-DD2D5E826C9A"
},
"range-extender": {
"Identifier": 16,
"DefaultDescription": "Range Extender",
"UUID": "8E33483E-2102-4BFE-9295-0A187D114188"
},
"security-system": {
"Identifier": 11,
"DefaultDescription": "Security System",
"UUID": "14D8FE28-2998-49E3-AC95-E3969BE2957C"
}
},
"AllowableSecuringWrites": {
"security-system-state.target": [0, 1, 2],
"lock-mechanism.target-state": [1],
"position.target": [0],
"door-state.target": [1]
},
"RequiresDeviceUnlock": {
"position.hold": ["door", "window"],
"lock-mechanism.current-state": ["garage-door-opener", "lock-mechanism"],
"position.state": ["door", "window"],
"position.target": ["door", "window"],
"lock-mechanism.target-state": ["garage-door-opener", "lock-mechanism"],
"door-state.current": ["garage-door-opener"],
"door-state.target": ["garage-door-opener"],
"position.current": ["door", "window"],
"security-system-state.current": ["security-system"],
"security-system-state.target": ["security-system"]
},
"Blacklist": {
"Characteristics": [
"accessory.identifier",
"cloud-relay.control-point",
"cloud-relay.current-state",
"cloud-relay.enabled",
"list-pairings",
"pair-setup",
"pair-verify",
"pairing-features",
"service-signature"
],
"Services": ["cloud-relay", "pairing", "protocol-information"]
},
"BlacklistFromApplications": {
"Characteristics": [
"access-code-control-point",
"access-code-supported-configuration",
"accessory-flags",
"app-matching-identifier",
"characteristic-value-active-transition-count",
"characteristic-value-transition-control",
"configuration-state",
"display-order",
"hardware-finish",
"identifier",
"managed-network-enable",
"network-access-violation-control",
"network-client-control",
"network-client-status-control",
"nfc-access-control-point",
"nfc-access-supported-configuration",
"operating-state-response",
"password-setting",
"privilege",
"product-data",
"router-status",
"selected-audio-stream-configuration",
"service-signature",
"setup-data-stream-transport",
"supported-characteristic-value-transition-configuration",
"supported-data-stream-transport-configuration",
"supported-router-configuration",
"thread-control-point",
"wake-configuration",
"wan-configuration-list",
"wan-status-list",
"wifi-satellite-status"
],
"Services": [
"access-code",
"access-control",
"assistant",
"audio-stream-management",
"camera-operating-mode",
"camera-recording-management",
"camera-rtp-stream-management",
"data-stream-transport-management",
"nfc-access",
"power-management",
"siri",
"siri-endpoint",
"smart-speaker",
"target-control",
"target-control-management",
"wifi-router",
"wifi-satellite"
]
}
},
"HAP": {
"Base UUID": "-0000-1000-8000-0026BB765291",
"Characteristics": {
"siri-input-type": {
"ShortUUID": "00000132",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Siri Input Type",
"Properties": 2,
"MaxValue": 1
},
"access-code-control-point": {
"DefaultDescription": "Access Code Control Point",
"Format": "tlv8",
"ShortUUID": "00000262",
"LocalizationKey": "",
"Properties": 6
},
"wan-status-list": {
"DefaultDescription": "WAN Status List",
"Format": "tlv8",
"ShortUUID": "00000212",
"LocalizationKey": "",
"Properties": 3
},
"multifunction-button": {
"ShortUUID": "0000026B",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Multifunction Button",
"Properties": 3,
"MaxValue": 1
},
"in-use": {
"ShortUUID": "000000D2",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "In Use",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1
},
"wifi-configuration-control": {
"DefaultDescription": "Wi-Fi Configuration Control",
"Format": "tlv8",
"ShortUUID": "0000022D",
"LocalizationKey": "",
"Properties": 167
},
"rotation.speed": {
"ShortUUID": "00000029",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Rotation Speed",
"Properties": 7,
"StepValue": 1,
"MaxValue": 100
},
"supported-target-configuration": {
"DefaultDescription": "Supported Target Configuration",
"Format": "tlv8",
"ShortUUID": "00000123",
"LocalizationKey": "",
"Properties": 2
},
"wake-configuration": {
"DefaultDescription": "Wake Configuration",
"Format": "tlv8",
"ShortUUID": "00000222",
"LocalizationKey": "",
"Properties": 2
},
"rssi": {
"DefaultDescription": "Received Signal Strength Indication",
"Format": "int",
"ShortUUID": "0000023F",
"LocalizationKey": "",
"Properties": 2
},
"setup-data-stream-transport": {
"DefaultDescription": "Setup Data Stream Transport",
"Format": "tlv8",
"ShortUUID": "00000131",
"LocalizationKey": "",
"Properties": 6
},
"slat.type": {
"ShortUUID": "000000C0",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Slat Type",
"Properties": 2,
"StepValue": 1,
"MaxValue": 1
},
"temperature.units": {
"ShortUUID": "00000036",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Temperature Display Units",
"Properties": 7,
"StepValue": 1,
"MaxValue": 1
},
"air-purifier.state.target": {
"ShortUUID": "000000A8",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Target Air Purifier State",
"Properties": 7,
"StepValue": 1,
"MaxValue": 1
},
"density.voc": {
"ShortUUID": "000000C8",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Volatile Organic Compound Density",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1000,
"Units": "micrograms/m^3"
},
"volume": {
"ShortUUID": "00000119",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Volume",
"Properties": 7,
"StepValue": 1,
"MaxValue": 100,
"Units": "percentage"
},
"hue": {
"ShortUUID": "00000013",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Hue",
"Properties": 7,
"StepValue": 1,
"MaxValue": 360,
"Units": "arcdegrees"
},
"logs": {
"DefaultDescription": "Logs",
"Format": "tlv8",
"ShortUUID": "0000001F",
"LocalizationKey": "",
"Properties": 3
},
"characteristic-value-active-transition-count": {
"DefaultDescription": "Characteristic Value Active Transition Count",
"Format": "uint8",
"ShortUUID": "0000024B",
"LocalizationKey": "",
"Properties": 3
},
"firmware-update-readiness": {
"DefaultDescription": "Firmware Update Readiness",
"Format": "tlv8",
"ShortUUID": "00000234",
"LocalizationKey": "",
"Properties": 3
},
"cloud-relay.enabled": {
"DefaultDescription": "Cloud Relay Enable Status",
"Format": "bool",
"ShortUUID": "0000005B",
"LocalizationKey": "",
"Properties": 7
},
"selected-camera-recording-configuration": {
"DefaultDescription": "Selected Camera Recording Configuration",
"Format": "tlv8",
"ShortUUID": "00000209",
"LocalizationKey": "",
"Properties": 7
},
"mac-transmission-counters": {
"DefaultDescription": "MAC Transmission Counters",
"Format": "data",
"ShortUUID": "00000248",
"LocalizationKey": "",
"Properties": 2
},
"characteristic-value-transition-control": {
"DefaultDescription": "Characteristic Value Transition Control",
"Format": "tlv8",
"ShortUUID": "00000143",
"LocalizationKey": "",
"Properties": 6
},
"filter.change-indication": {
"ShortUUID": "000000AC",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Filter Change indication",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1
},
"position.current": {
"ShortUUID": "0000006D",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Current Position",
"Properties": 3,
"StepValue": 1,
"MaxValue": 100,
"Units": "percentage"
},
"staged-firmware-version": {
"DefaultDescription": "Staged Firmware Version",
"Format": "string",
"ShortUUID": "00000249",
"LocalizationKey": "",
"Properties": 3
},
"smoke-detected": {
"ShortUUID": "00000076",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Smoke Detected",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1
},
"output-state": {
"ShortUUID": "00000074",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Programmable Switch Output State",
"Properties": 7,
"StepValue": 1,
"MaxValue": 1
},
"remaining-duration": {
"ShortUUID": "000000D4",
"MinValue": 0,
"Format": "uint32",
"LocalizationKey": "",
"DefaultDescription": "Remaining Duration",
"Properties": 3,
"StepValue": 1,
"MaxValue": 3600,
"Units": "seconds"
},
"manually-disabled": {
"DefaultDescription": "Manually disabled",
"Format": "bool",
"ShortUUID": "00000227",
"LocalizationKey": "",
"Properties": 3
},
"horizontal-tilt.current": {
"ShortUUID": "0000006C",
"MinValue": -90,
"Format": "int",
"LocalizationKey": "",
"DefaultDescription": "Current Horizontal Tilt Angle",
"Properties": 3,
"StepValue": 1,
"MaxValue": 90,
"Units": "arcdegrees"
},
"nfc-access-supported-configuration": {
"DefaultDescription": "NFC Access Supported Configuration",
"Format": "tlv8",
"ShortUUID": "00000265",
"LocalizationKey": "",
"Properties": 2
},
"ping": {
"DefaultDescription": "Ping",
"Format": "data",
"ShortUUID": "0000023C",
"LocalizationKey": "",
"Properties": 2
},
"digital-zoom": {
"StepValue": 0.10000000000000001,
"DefaultDescription": "Digital Zoom",
"Format": "float",
"ShortUUID": "0000011D",
"LocalizationKey": "",
"Properties": 7
},
"swing-mode": {
"ShortUUID": "000000B6",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Swing Mode",
"Properties": 7,
"StepValue": 1,
"MaxValue": 1
},
"access-code-supported-configuration": {
"DefaultDescription": "Access Code Supported Configuration",
"Format": "tlv8",
"ShortUUID": "00000261",
"LocalizationKey": "",
"Properties": 2
},
"security-system-state.target": {
"ShortUUID": "00000067",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Security System Target State",
"Properties": 7,
"StepValue": 1,
"MaxValue": 3
},
"fan.state.current": {
"ShortUUID": "000000AF",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Current Fan State",
"Properties": 3,
"StepValue": 1,
"MaxValue": 2
},
"rotation.direction": {
"ShortUUID": "00000028",
"MinValue": 0,
"Format": "int",
"LocalizationKey": "",
"DefaultDescription": "Rotation Direction",
"Properties": 7,
"StepValue": 1,
"MaxValue": 1
},
"sleep-discovery-mode": {
"ShortUUID": "000000E8",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Sleep Discovery Mode",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1
},
"volume-control-type": {
"ShortUUID": "000000E9",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Volume Control Type",
"Properties": 3,
"StepValue": 1,
"MaxValue": 3
},
"input-source-type": {
"ShortUUID": "000000DB",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Input Source Type",
"Properties": 3,
"StepValue": 1,
"MaxValue": 10
},
"charging-state": {
"ShortUUID": "0000008F",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Charging State",
"Properties": 3,
"StepValue": 1,
"MaxValue": 2
},
"hardware-finish": {
"DefaultDescription": "Hardware Finish",
"Format": "tlv8",
"ShortUUID": "0000026C",
"LocalizationKey": "",
"Properties": 2
},
"relative-humidity.target": {
"ShortUUID": "00000034",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Target Relative Humidity",
"Properties": 7,
"StepValue": 1,
"MaxValue": 100,
"Units": "percentage"
},
"relative-humidity.dehumidifier-threshold": {
"ShortUUID": "000000C9",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Relative Humidity Dehumidifier Threshold",
"Properties": 7,
"StepValue": 1,
"MaxValue": 100,
"Units": "percentage"
},
"color-temperature": {
"ShortUUID": "000000CE",
"MinValue": 140,
"Format": "int",
"LocalizationKey": "",
"DefaultDescription": "Color Temperature",
"Properties": 7,
"StepValue": 1,
"MaxValue": 500
},
"pair-setup": {
"DefaultDescription": "Pair Setup",
"Format": "tlv8",
"ShortUUID": "0000004C",
"LocalizationKey": "",
"Properties": 6
},
"supported-router-configuration": {
"DefaultDescription": "Supported Router Configuration",
"Format": "tlv8",
"ShortUUID": "00000210",
"LocalizationKey": "",
"Properties": 2
},
"carbon-dioxide.detected": {
"ShortUUID": "00000092",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Carbon dioxide Detected",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1
},
"light-level.current": {
"ShortUUID": "0000006B",
"MinValue": 0.0001,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Current Light Level",
"Properties": 3,
"MaxValue": 100000,
"Units": "lux"
},
"software.revision": {
"DefaultDescription": "Software Revision",
"Format": "string",
"ShortUUID": "00000054",
"LocalizationKey": "",
"Properties": 2
},
"event-transmission-counters": {
"DefaultDescription": "Event Transmission Counters",
"Format": "uint32",
"ShortUUID": "0000023E",
"LocalizationKey": "",
"Properties": 2
},
"is-configured": {
"ShortUUID": "000000D6",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Is Configured",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1
},
"wan-configuration-list": {
"DefaultDescription": "WAN Configuration List",
"Format": "tlv8",
"ShortUUID": "00000211",
"LocalizationKey": "",
"Properties": 3
},
"security-system-state.current": {
"ShortUUID": "00000066",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Security System Current State",
"Properties": 3,
"StepValue": 1,
"MaxValue": 4
},
"homekit-camera-active": {
"DefaultDescription": "HomeKit Camera Active",
"Format": "bool",
"ShortUUID": "0000021B",
"LocalizationKey": "",
"Properties": 39
},
"optical-zoom": {
"StepValue": 0.10000000000000001,
"DefaultDescription": "Optical Zoom",
"Format": "float",
"ShortUUID": "0000011C",
"LocalizationKey": "",
"Properties": 7
},
"mute": {
"DefaultDescription": "Mute",
"Format": "bool",
"ShortUUID": "0000011A",
"LocalizationKey": "",
"Properties": 7
},
"event-snapshots-active": {
"DefaultDescription": "Event Snapshots Active",
"Format": "bool",
"ShortUUID": "00000223",
"LocalizationKey": "",
"Properties": 39
},
"service-signature": {
"DefaultDescription": "Service Signature",
"Format": "tlv8",
"ShortUUID": "000000A5",
"LocalizationKey": "",
"Properties": 6
},
"temperature.current": {
"ShortUUID": "00000011",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Current Temperature",
"Properties": 3,
"StepValue": 0.10000000000000001,
"MaxValue": 100,
"Units": "celsius"
},
"cloud-relay.control-point": {
"DefaultDescription": "Cloud Relay Control Point",
"Format": "tlv8",
"ShortUUID": "0000005E",
"LocalizationKey": "",
"Properties": 7
},
"supported-firmware-update-configuration": {
"DefaultDescription": "Supported Firmware Update Configuration",
"Format": "tlv8",
"ShortUUID": "00000233",
"LocalizationKey": "",
"Properties": 2
},
"name": {
"DefaultDescription": "Name",
"MaxLength": 64,
"Format": "string",
"ShortUUID": "00000023",
"LocalizationKey": "",
"Properties": 2
},
"receiver-sensitivity": {
"DefaultDescription": "Receiver Sensitivity",
"Format": "int",
"ShortUUID": "00000244",
"LocalizationKey": "",
"Properties": 2
},
"active-identifier": {
"DefaultDescription": "Active Identifier",
"MinValue": 0,
"Format": "uint32",
"ShortUUID": "000000E7",
"LocalizationKey": "",
"Properties": 7
},
"density.so2": {
"ShortUUID": "000000C5",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Sulphur dioxide Density",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1000,
"Units": "micrograms/m^3"
},
"relative-humidity.current": {
"ShortUUID": "00000010",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Current Relative Humidity",
"Properties": 3,
"StepValue": 1,
"MaxValue": 100,
"Units": "percentage"
},
"obstruction-detected": {
"DefaultDescription": "Obstruction Detected",
"Format": "bool",
"ShortUUID": "00000024",
"LocalizationKey": "",
"Properties": 3
},
"operating-state-response": {
"DefaultDescription": "Operating State Response",
"Format": "tlv8",
"ShortUUID": "00000232",
"LocalizationKey": "",
"Properties": 3
},
"supported-diagnostics-snapshot": {
"DefaultDescription": "Supported Diagnostics Snapshot",
"Format": "tlv8",
"ShortUUID": "00000238",
"LocalizationKey": "",
"Properties": 2
},
"on": {
"DefaultDescription": "Power State",
"Format": "bool",
"ShortUUID": "00000025",
"LocalizationKey": "",
"Properties": 7
},
"supported-audio-recording-configuration": {
"DefaultDescription": "Supported Audio Recording Configuration",
"Format": "tlv8",
"ShortUUID": "00000207",
"LocalizationKey": "",
"Properties": 3
},
"active": {
"ShortUUID": "000000B0",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Active",
"Properties": 7,
"StepValue": 1,
"MaxValue": 1
},
"heating-cooling.current": {
"ShortUUID": "0000000F",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Current Heating Cooling State",
"Properties": 3,
"StepValue": 1,
"MaxValue": 2
},
"accessory-flags": {
"DefaultDescription": "Accessory Flags",
"Format": "uint32",
"ShortUUID": "000000A6",
"LocalizationKey": "",
"Properties": 3
},
"motion-detected": {
"DefaultDescription": "Motion Detected",
"Format": "bool",
"ShortUUID": "00000022",
"LocalizationKey": "",
"Properties": 3
},
"camera-operating-mode-indicator": {
"DefaultDescription": "Camera Operating Mode Indicator",
"Format": "bool",
"ShortUUID": "0000021D",
"LocalizationKey": "",
"Properties": 39
},
"periodic-snapshots-active": {
"DefaultDescription": "Periodic Snapshots Active",
"Format": "bool",
"ShortUUID": "00000225",
"LocalizationKey": "",
"Properties": 39
},
"service-label-index": {
"ShortUUID": "000000CB",
"MinValue": 1,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Label Index",
"Properties": 2,
"StepValue": 1,
"MaxValue": 255
},
"lock-mechanism.target-state": {
"ShortUUID": "0000001E",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Lock Target State",
"Properties": 23,
"StepValue": 1,
"MaxValue": 1
},
"accessory.identifier": {
"DefaultDescription": "Accessory Identifier",
"Format": "string",
"ShortUUID": "00000057",
"LocalizationKey": "",
"Properties": 2
},
"app-matching-identifier": {
"DefaultDescription": "Application Matching Identifier",
"Format": "tlv8",
"ShortUUID": "000000A4",
"LocalizationKey": "",
"Properties": 2
},
"list-pairings": {
"DefaultDescription": "List Pairings",
"Format": "tlv8",
"ShortUUID": "00000050",
"LocalizationKey": "",
"Properties": 6
},
"siri-listening": {
"ShortUUID": "00000256",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Siri Listening",
"Properties": 7,
"MaxValue": 1
},
"product-data": {
"DefaultDescription": "Product Data",
"Format": "data",
"ShortUUID": "00000220",
"LocalizationKey": "",
"Properties": 2
},
"water-level": {
"ShortUUID": "000000B5",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Current Water Level",
"Properties": 3,
"StepValue": 1,
"MaxValue": 100,
"Units": "percentage"
},
"wifi-satellite-status": {
"ShortUUID": "0000021E",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Wi-Fi Satellite Status",
"Properties": 3,
"MaxValue": 2
},
"model": {
"DefaultDescription": "Model",
"MaxLength": 64,
"Format": "string",
"ShortUUID": "00000021",
"LocalizationKey": "",
"Properties": 2
},
"heater-cooler.state.target": {
"ShortUUID": "000000B2",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Target Heater-Cooler State",
"Properties": 7,
"StepValue": 1,
"MaxValue": 2
},
"media-state.target": {
"ShortUUID": "00000137",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Target Media State",
"Properties": 7,
"StepValue": 1,
"MaxValue": 2
},
"router-status": {
"ShortUUID": "0000020E",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Router Status",
"Properties": 3,
"MaxValue": 1
},
"power-mode-selection": {
"ShortUUID": "000000DF",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Power Mode Selection",
"Properties": 4,
"StepValue": 1,
"MaxValue": 1
},
"battery-level": {
"ShortUUID": "00000068",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Battery Level",
"Properties": 3,
"StepValue": 1,
"MaxValue": 100,
"Units": "percentage"
},
"firmware-update-status": {
"DefaultDescription": "Firmware Update Status",
"Format": "tlv8",
"ShortUUID": "00000235",
"LocalizationKey": "",
"Properties": 3
},
"setup-stream-endpoint": {
"DefaultDescription": "Setup Endpoint",
"Format": "tlv8",
"ShortUUID": "00000118",
"LocalizationKey": "",
"Properties": 6
},
"input-device-type": {
"ShortUUID": "000000DC",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Input Device Type",
"Properties": 3,
"StepValue": 1,
"MaxValue": 6
},
"carbon-dioxide.level": {
"ShortUUID": "00000093",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Carbon dioxide Level",
"Properties": 3,
"StepValue": 1,
"MaxValue": 100000,
"Units": "ppm"
},
"streaming-status": {
"DefaultDescription": "Streaming Status",
"Format": "tlv8",
"ShortUUID": "00000120",
"LocalizationKey": "",
"Properties": 3
},
"lock-mechanism.last-known-action": {
"ShortUUID": "0000001C",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Lock Last Known Action",
"Properties": 3,
"StepValue": 1,
"MaxValue": 8
},
"density.pm2_5": {
"ShortUUID": "000000C6",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "PM2.5 Density",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1000,
"Units": "micrograms/m^3"
},
"air-purifier.state.current": {
"ShortUUID": "000000A9",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Current Air Purifier State",
"Properties": 3,
"StepValue": 1,
"MaxValue": 2
},
"video-analysis-active": {
"DefaultDescription": "Video Analysis Active",
"Format": "uint8",
"ShortUUID": "00000229",
"LocalizationKey": "",
"Properties": 7
},
"slat.state.current": {
"ShortUUID": "000000AA",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Current Slat State",
"Properties": 3,
"StepValue": 1,
"MaxValue": 3
},
"asset-update-readiness": {
"DefaultDescription": "Asset Update Readiness",
"Format": "uint32",
"ShortUUID": "00000269",
"LocalizationKey": "",
"Properties": 3
},
"button-event": {
"DefaultDescription": "Button Event",
"Format": "tlv8",
"ShortUUID": "00000126",
"LocalizationKey": "",
"Properties": 3
},
"carbon-monoxide.peak-level": {
"ShortUUID": "00000091",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Carbon monoxide Peak Level",
"Properties": 3,
"StepValue": 1,
"MaxValue": 100,
"Units": "ppm"
},
"air-particulate.density": {
"ShortUUID": "00000064",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Air Particulate Density",
"Properties": 3,
"MaxValue": 1000,
"Units": "micrograms/m^3"
},
"supported-characteristic-value-transition-configuration": {
"DefaultDescription": "Supported Characteristic Value Transition Configuration",
"Format": "tlv8",
"ShortUUID": "00000144",
"LocalizationKey": "",
"Properties": 2
},
"selected-stream-configuration": {
"DefaultDescription": "Selected Stream Configuration",
"Format": "tlv8",
"ShortUUID": "00000117",
"LocalizationKey": "",
"Properties": 6
},
"humidifier-dehumidifier.state.target": {
"ShortUUID": "000000B4",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Target Humidifier-Dehumidifier State",
"Properties": 7,
"StepValue": 1,
"MaxValue": 2
},
"airplay-enable": {
"ShortUUID": "0000025B",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "AirPlay Enable",
"Properties": 7,
"MaxValue": 1
},
"heart-beat": {
"DefaultDescription": "Heart Beat",
"Format": "uint32",
"ShortUUID": "0000024A",
"LocalizationKey": "",
"Properties": 3
},
"sleep-interval": {
"ShortUUID": "0000023A",
"MinValue": 0,
"Format": "uint32",
"LocalizationKey": "",
"DefaultDescription": "Sleep Interval",
"StepValue": 1,
"Properties": 3
},
"pair-verify": {
"DefaultDescription": "Pair Verify",
"Format": "tlv8",
"ShortUUID": "0000004E",
"LocalizationKey": "",
"Properties": 6
},
"supported-video-stream-configuration": {
"DefaultDescription": "Supported Video Stream Configuration",
"Format": "tlv8",
"ShortUUID": "00000114",
"LocalizationKey": "",
"Properties": 2
},
"tilt.current": {
"ShortUUID": "000000C1",
"MinValue": -90,
"Format": "int",
"LocalizationKey": "",
"DefaultDescription": "Current Tilt Angle",
"Properties": 3,
"StepValue": 1,
"MaxValue": 90,
"Units": "arcdegrees"
},
"supported-audio-stream-configuration": {
"DefaultDescription": "Supported Audio Stream Configuration",
"Format": "tlv8",
"ShortUUID": "00000115",
"LocalizationKey": "",
"Properties": 2
},
"lock-management.control-point": {
"DefaultDescription": "Lock Control Point",
"Format": "tlv8",
"ShortUUID": "00000019",
"LocalizationKey": "",
"Properties": 4
},
"hardware.revision": {
"DefaultDescription": "Hardware Revision",
"Format": "string",
"ShortUUID": "00000053",
"LocalizationKey": "",
"Properties": 2
},
"transmit-power": {
"DefaultDescription": "Transmit Power",
"Format": "int",
"ShortUUID": "00000242",
"LocalizationKey": "",
"Properties": 2
},
"density.ozone": {
"ShortUUID": "000000C3",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Ozone Density",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1000,
"Units": "micrograms/m^3"
},
"brightness": {
"ShortUUID": "00000008",
"MinValue": 0,
"Format": "int",
"LocalizationKey": "",
"DefaultDescription": "Brightness",
"Properties": 7,
"StepValue": 1,
"MaxValue": 100,
"Units": "percentage"
},
"humidifier-dehumidifier.state.current": {
"ShortUUID": "000000B3",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Current Humidifier-Dehumidifier State",
"Properties": 3,
"StepValue": 1,
"MaxValue": 3
},
"carbon-monoxide.detected": {
"ShortUUID": "00000069",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Carbon monoxide Detected",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1
},
"network-access-violation-control": {
"DefaultDescription": "Network Access Violation Control",
"Format": "tlv8",
"ShortUUID": "0000021F",
"LocalizationKey": "",
"Properties": 167
},
"data-stream-hap-transport": {
"DefaultDescription": "Data Stream HAP Transport",
"Format": "tlv8",
"ShortUUID": "00000138",
"LocalizationKey": "",
"Properties": 6
},
"door-state.current": {
"ShortUUID": "0000000E",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Current Door State",
"Properties": 3,
"StepValue": 1,
"MaxValue": 4
},
"pairing-features": {
"DefaultDescription": "Pairing Features",
"Format": "uint8",
"ShortUUID": "0000004F",
"LocalizationKey": "",
"Properties": 6
},
"cca-energy-detect-threshold": {
"DefaultDescription": "CCA Energy Detect Threshold",
"Format": "int",
"ShortUUID": "00000246",
"LocalizationKey": "",
"Properties": 2
},
"filter.life-level": {
"ShortUUID": "000000AB",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Filter Life Level",
"Properties": 3,
"StepValue": 1,
"MaxValue": 100
},
"selected-audio-stream-configuration": {
"DefaultDescription": "Selected Audio Stream Configuration",
"Format": "tlv8",
"ShortUUID": "00000128",
"LocalizationKey": "",
"Properties": 6
},
"density.pm10": {
"ShortUUID": "000000C7",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "PM10 Density",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1000,
"Units": "micrograms/m^3"
},
"volume-selector": {
"ShortUUID": "000000EA",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Volume Selector",
"Properties": 4,
"StepValue": 1,
"MaxValue": 1
},
"version": {
"DefaultDescription": "Version",
"MaxLength": 64,
"Format": "string",
"ShortUUID": "00000037",
"LocalizationKey": "",
"Properties": 3
},
"administrator-only-access": {
"DefaultDescription": "Administrator Only Access",
"Format": "bool",
"ShortUUID": "00000001",
"LocalizationKey": "",
"Properties": 7
},
"configuration-state": {
"DefaultDescription": "Configuration State",
"Format": "uint16",
"ShortUUID": "00000263",
"LocalizationKey": "",
"Properties": 3
},
"setup-transfer-transport": {
"DefaultDescription": "Setup Transfer Transport",
"Format": "tlv8",
"ShortUUID": "00000201",
"LocalizationKey": "",
"Properties": 132
},
"thread-control-point": {
"DefaultDescription": "Thread Control Point",
"Format": "tlv8",
"ShortUUID": "00000704",
"LocalizationKey": "",
"Properties": 4
},
"identifier": {
"DefaultDescription": "Identifier",
"MinValue": 0,
"Format": "uint32",
"ShortUUID": "000000E6",
"LocalizationKey": "",
"Properties": 2
},
"firmware.revision": {
"DefaultDescription": "Firmware Revision",
"Format": "string",
"ShortUUID": "00000052",
"LocalizationKey": "",
"Properties": 2
},
"carbon-dioxide.peak-level": {
"ShortUUID": "00000094",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Carbon dioxide Peak Level",
"Properties": 3,
"StepValue": 1,
"MaxValue": 100000,
"Units": "ppm"
},
"carbon-monoxide.level": {
"ShortUUID": "00000090",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Carbon monoxide Level",
"Properties": 3,
"StepValue": 1,
"MaxValue": 100,
"Units": "ppm"
},
"target-list": {
"DefaultDescription": "Target List Configuration",
"Format": "tlv8",
"ShortUUID": "00000124",
"LocalizationKey": "",
"Properties": 134
},
"network-client-status-control": {
"DefaultDescription": "Network Client Status Control",
"Format": "tlv8",
"ShortUUID": "0000020D",
"LocalizationKey": "",
"Properties": 134
},
"valve-type": {
"ShortUUID": "000000D5",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Valve Type",
"Properties": 3,
"StepValue": 1,
"MaxValue": 3
},
"mac-retransmission-maximum": {
"DefaultDescription": "MAC Retransmission Maximum",
"Format": "uint8",
"ShortUUID": "00000247",
"LocalizationKey": "",
"Properties": 2
},
"configured-name": {
"DefaultDescription": "Configured Name",
"Format": "string",
"ShortUUID": "000000E3",
"LocalizationKey": "",
"Properties": 3
},
"network-client-control": {
"DefaultDescription": "Network Client Control",
"Format": "tlv8",
"ShortUUID": "0000020C",
"LocalizationKey": "",
"Properties": 167
},
"heating-cooling.target": {
"ShortUUID": "00000033",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Target Heating Cooling State",
"Properties": 7,
"StepValue": 1,
"MaxValue": 3
},
"lock-physical-controls": {
"ShortUUID": "000000A7",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Lock Physical Controls",
"Properties": 7,
"StepValue": 1,
"MaxValue": 1
},
"third-party-camera-active": {
"DefaultDescription": "Third Party Camera Active",
"Format": "bool",
"ShortUUID": "0000021C",
"LocalizationKey": "",
"Properties": 3
},
"filter.reset-indication": {
"ShortUUID": "000000AD",
"MinValue": 1,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Filter Reset Change Indication",
"Properties": 4,
"StepValue": 1,
"MaxValue": 1
},
"air-quality": {
"ShortUUID": "00000095",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Current Air Quality",
"Properties": 3,
"StepValue": 1,
"MaxValue": 5
},
"density.no2": {
"ShortUUID": "000000C4",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Nitrogen dioxide Density",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1000,
"Units": "micrograms/m^3"
},
"supported-data-stream-transport-configuration": {
"DefaultDescription": "Supported Data Stream Transport Configuration",
"Format": "tlv8",
"ShortUUID": "00000130",
"LocalizationKey": "",
"Properties": 2
},
"position.target": {
"ShortUUID": "0000007C",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Target Position",
"Properties": 7,
"StepValue": 1,
"MaxValue": 100,
"Units": "percentage"
},
"image-rotation": {
"ShortUUID": "0000011E",
"MinValue": 0,
"Format": "int",
"LocalizationKey": "",
"DefaultDescription": "Image Rotation",
"Properties": 7,
"StepValue": 1,
"MaxValue": 360,
"Units": "arcdegrees"
},
"cloud-relay.current-state": {
"ShortUUID": "0000005C",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Cloud Relay Current State",
"Properties": 3,
"StepValue": 1,
"MaxValue": 5
},
"status-jammed": {
"ShortUUID": "00000078",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Status Jammed",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1
},
"vertical-tilt.target": {
"ShortUUID": "0000007D",
"MinValue": -90,
"Format": "int",
"LocalizationKey": "",
"DefaultDescription": "Target Vertical Tilt Angle",
"Properties": 7,
"StepValue": 1,
"MaxValue": 90,
"Units": "arcdegrees"
},
"picture-mode": {
"ShortUUID": "000000E2",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Picture Mode",
"Properties": 7,
"StepValue": 1,
"MaxValue": 13
},
"input-event": {
"ShortUUID": "00000073",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Programmable Switch Event",
"Properties": 3,
"StepValue": 1,
"MaxValue": 2
},
"selected-diagnostics-modes": {
"DefaultDescription": "Selected Diagnostics Modes",
"Format": "uint32",
"ShortUUID": "0000024D",
"LocalizationKey": "",
"Properties": 6
},
"identify": {
"DefaultDescription": "Identify",
"Format": "bool",
"ShortUUID": "00000014",
"LocalizationKey": "",
"Properties": 4
},
"outlet-in-use": {
"DefaultDescription": "Outlet In Use",
"Format": "bool",
"ShortUUID": "00000026",
"LocalizationKey": "",
"Properties": 3
},
"service-label-namespace": {
"ShortUUID": "000000CD",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Label Namespace",
"Properties": 2,
"StepValue": 1,
"MaxValue": 4
},
"leak-detected": {
"ShortUUID": "00000070",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Leak Detected",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1
},
"lock-mechanism.current-state": {
"ShortUUID": "0000001D",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Lock Current State",
"Properties": 3,
"StepValue": 1,
"MaxValue": 3
},
"media-state.current": {
"ShortUUID": "000000E0",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Current Media State",
"Properties": 3,
"StepValue": 1,
"MaxValue": 5
},
"display-order": {
"DefaultDescription": "Display Order",
"Format": "tlv8",
"ShortUUID": "00000136",
"LocalizationKey": "",
"Properties": 3
},
"contact-state": {
"ShortUUID": "0000006A",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Contact Sensor State",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1
},
"data-stream-hap-transport-interrupt": {
"DefaultDescription": "Data Stream HAP Transport Interrupt",
"Format": "tlv8",
"ShortUUID": "00000139",
"LocalizationKey": "",
"Properties": 3
},
"siri-enable": {
"ShortUUID": "00000255",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Siri Enable",
"Properties": 7,
"MaxValue": 1
},
"horizontal-tilt.target": {
"ShortUUID": "0000007B",
"MinValue": -90,
"Format": "int",
"LocalizationKey": "",
"DefaultDescription": "Target Horizontal Tilt Angle",
"Properties": 7,
"StepValue": 1,
"MaxValue": 90,
"Units": "arcdegrees"
},
"supported-transfer-transport-configuration": {
"DefaultDescription": "Supported Transfer Transport Configuration",
"Format": "tlv8",
"ShortUUID": "00000202",
"LocalizationKey": "",
"Properties": 2
},
"relative-humidity.humidifier-threshold": {
"ShortUUID": "000000CA",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Relative Humidity Humidifier Threshold",
"Properties": 7,
"StepValue": 1,
"MaxValue": 100,
"Units": "percentage"
},
"position.state": {
"ShortUUID": "00000072",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Position State",
"Properties": 3,
"StepValue": 1,
"MaxValue": 2
},
"status-fault": {
"ShortUUID": "00000077",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Status Fault",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1
},
"password-setting": {
"DefaultDescription": "Password Setting",
"Format": "tlv8",
"ShortUUID": "000000E4",
"LocalizationKey": "",
"Properties": 7
},
"security-system.alarm-type": {
"ShortUUID": "0000008E",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Security System Alarm Type",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1
},
"event-retransmission-maximum": {
"DefaultDescription": "Event Retransmission Maximum",
"Format": "uint8",
"ShortUUID": "0000023D",
"LocalizationKey": "",
"Properties": 2
},
"cca-signal-detect-threshold": {
"DefaultDescription": "CCA Signal Detect Threshold",
"Format": "int",
"ShortUUID": "00000245",
"LocalizationKey": "",
"Properties": 2
},
"supported-diagnostics-modes": {
"DefaultDescription": "Supported Diagnostics Modes",
"Format": "uint32",
"ShortUUID": "0000024C",
"LocalizationKey": "",
"Properties": 2
},
"temperature.cooling-threshold": {
"ShortUUID": "0000000D",
"MinValue": 10,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Cooling Threshold Temperature",
"Properties": 7,
"StepValue": 0.10000000000000001,
"MaxValue": 35,
"Units": "celsius"
},
"snr": {
"DefaultDescription": "Signal-to-noise Ratio",
"Format": "int",
"ShortUUID": "00000241",
"LocalizationKey": "",
"Properties": 2
},
"thread-openthread-version": {
"DefaultDescription": "Thread OpenThread Version",
"Format": "string",
"ShortUUID": "00000706",
"LocalizationKey": "",
"Properties": 2
},
"privilege": {
"ShortUUID": "000000E5",
"MinValue": 0,
"Format": "uint16",
"LocalizationKey": "",
"DefaultDescription": "Access Control Level",
"Properties": 7,
"StepValue": 1,
"MaxValue": 2
},
"siri-endpoint-session-status": {
"DefaultDescription": "Siri Endpoint Session Status",
"Format": "tlv8",
"ShortUUID": "00000254",
"LocalizationKey": "",
"Properties": 3
},
"nfc-access-control-point": {
"DefaultDescription": "NFC Access Control Point",
"Format": "tlv8",
"ShortUUID": "00000264",
"LocalizationKey": "",
"Properties": 6
},
"siri-touch-to-use": {
"ShortUUID": "00000257",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Siri Touch To Use",
"Properties": 7,
"MaxValue": 1
},
"transmit-power-maximum": {
"DefaultDescription": "Maximum Transmit Power",
"Format": "int",
"ShortUUID": "00000243",
"LocalizationKey": "",
"Properties": 2
},
"serial-number": {
"ShortUUID": "00000030",
"Format": "string",
"LocalizationKey": "",
"DefaultDescription": "Serial Number",
"MaxLength": 64,
"Properties": 2,
"MinLength": 1
},
"visibility-state.target": {
"ShortUUID": "00000134",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Target Visibility State",
"Properties": 7,
"StepValue": 1,
"MaxValue": 1
},
"visibility-state.current": {
"ShortUUID": "00000135",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Current Visibility State",
"Properties": 3,
"StepValue": 1,
"MaxValue": 3
},
"vertical-tilt.current": {
"ShortUUID": "0000006E",
"MinValue": -90,
"Format": "int",
"LocalizationKey": "",
"DefaultDescription": "Current Vertical Tilt Angle",
"Properties": 3,
"StepValue": 1,
"MaxValue": 90,
"Units": "arcdegrees"
},
"door-state.target": {
"ShortUUID": "00000032",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Target Door State",
"Properties": 23,
"StepValue": 1,
"MaxValue": 1
},
"supported-rtp-configuration": {
"DefaultDescription": "Supported RTP Configuration",
"Format": "tlv8",
"ShortUUID": "00000116",
"LocalizationKey": "",
"Properties": 2
},
"heater-cooler.state.current": {
"ShortUUID": "000000B1",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Current Heater-Cooler State",
"Properties": 3,
"StepValue": 1,
"MaxValue": 3
},
"fan.state.target": {
"ShortUUID": "000000BF",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Target Fan State",
"Properties": 7,
"StepValue": 1,
"MaxValue": 1
},
"status-tampered": {
"ShortUUID": "0000007A",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Status Tampered",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1
},
"temperature.target": {
"ShortUUID": "00000035",
"MinValue": 10,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Target Temperature",
"Properties": 7,
"StepValue": 0.10000000000000001,
"MaxValue": 38,
"Units": "celsius"
},
"thread-status": {
"ShortUUID": "00000703",
"MinValue": 0,
"Format": "uint16",
"LocalizationKey": "",
"DefaultDescription": "Thread Status",
"Properties": 3,
"StepValue": 1,
"MaxValue": 6
},
"tilt.target": {
"ShortUUID": "000000C2",
"MinValue": -90,
"Format": "int",
"LocalizationKey": "",
"DefaultDescription": "Target Tilt Angle",
"Properties": 7,
"StepValue": 1,
"MaxValue": 90,
"Units": "arcdegrees"
},
"status-lo-batt": {
"ShortUUID": "00000079",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Status Low Battery",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1
},
"managed-network-enable": {
"ShortUUID": "00000215",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Managed Network Enable",
"Properties": 39,
"MaxValue": 1
},
"air-particulate.size": {
"ShortUUID": "00000065",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Air Particulate Size",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1
},
"saturation": {
"ShortUUID": "0000002F",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Saturation",
"Properties": 7,
"StepValue": 1,
"MaxValue": 100,
"Units": "percentage"
},
"siri-light-on-use": {
"ShortUUID": "00000258",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Siri Light On Use",
"Properties": 7,
"MaxValue": 1
},
"status-active": {
"DefaultDescription": "Status Active",
"Format": "bool",
"ShortUUID": "00000075",
"LocalizationKey": "",
"Properties": 3
},
"supported-camera-recording-configuration": {
"DefaultDescription": "Supported Camera Recording Configuration",
"Format": "tlv8",
"ShortUUID": "00000205",
"LocalizationKey": "",
"Properties": 3
},
"activity-interval": {
"ShortUUID": "0000023B",
"MinValue": 0,
"Format": "uint32",
"LocalizationKey": "",
"DefaultDescription": "Activity Interval",
"StepValue": 1,
"Properties": 3
},
"set-duration": {
"ShortUUID": "000000D3",
"MinValue": 0,
"Format": "uint32",
"LocalizationKey": "",
"DefaultDescription": "Set Duration",
"Properties": 7,
"StepValue": 1,
"MaxValue": 3600,
"Units": "seconds"
},
"wifi-capabilities": {
"DefaultDescription": "Wi-Fi Capabilities",
"Format": "uint32",
"ShortUUID": "0000022C",
"LocalizationKey": "",
"Properties": 2
},
"occupancy-detected": {
"ShortUUID": "00000071",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Occupancy Detected",
"Properties": 3,
"StepValue": 1,
"MaxValue": 1
},
"audio-feedback": {
"DefaultDescription": "Audio Feedback",
"Format": "bool",
"ShortUUID": "00000005",
"LocalizationKey": "",
"Properties": 7
},
"supported-video-recording-configuration": {
"DefaultDescription": "Supported Video Recording Configuration",
"Format": "tlv8",
"ShortUUID": "00000206",
"LocalizationKey": "",
"Properties": 3
},
"current-transport": {
"DefaultDescription": "Current Transport",
"Format": "bool",
"ShortUUID": "0000022B",
"LocalizationKey": "",
"Properties": 2
},
"manufacturer": {
"DefaultDescription": "Manufacturer",
"MaxLength": 64,
"Format": "string",
"ShortUUID": "00000020",
"LocalizationKey": "",
"Properties": 2
},
"thread-node-capabilities": {
"ShortUUID": "00000702",
"MinValue": 0,
"Format": "uint16",
"LocalizationKey": "",
"DefaultDescription": "Thread Node Capabilities",
"Properties": 2,
"StepValue": 1,
"MaxValue": 31
},
"night-vision": {
"DefaultDescription": "Night Vision",
"Format": "bool",
"ShortUUID": "0000011B",
"LocalizationKey": "",
"Properties": 39
},
"closed-captions": {
"ShortUUID": "000000DD",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Closed Captions",
"Properties": 7,
"StepValue": 1,
"MaxValue": 1
},
"lock-management.auto-secure-timeout": {
"Properties": 7,
"DefaultDescription": "Lock Management Auto Security Timeout",
"Format": "uint32",
"ShortUUID": "0000001A",
"Units": "seconds",
"LocalizationKey": ""
},
"recording-audio-active": {
"DefaultDescription": "recording audio active",
"Format": "uint8",
"ShortUUID": "00000226",
"LocalizationKey": "",
"Properties": 39
},
"program-mode": {
"ShortUUID": "000000D1",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Program Mode",
"Properties": 3,
"StepValue": 1,
"MaxValue": 2
},
"image-mirroring": {
"DefaultDescription": "Image Mirroring",
"Format": "bool",
"ShortUUID": "0000011F",
"LocalizationKey": "",
"Properties": 7
},
"siri-engine-revision": {
"DefaultDescription": "Siri Engine Version",
"Format": "string",
"ShortUUID": "0000025A",
"LocalizationKey": "",
"Properties": 2
},
"position.hold": {
"DefaultDescription": "Hold Position",
"Format": "bool",
"ShortUUID": "0000006F",
"LocalizationKey": "",
"Properties": 4
},
"remote-key": {
"ShortUUID": "000000E1",
"MinValue": 0,
"Format": "uint8",
"LocalizationKey": "",
"DefaultDescription": "Remote Key",
"Properties": 4,
"StepValue": 1,
"MaxValue": 16
},
"supported-asset-types": {
"DefaultDescription": "Supported Asset Types",
"Format": "uint32",
"ShortUUID": "00000268",
"LocalizationKey": "",
"Properties": 2
},
"temperature.heating-threshold": {
"ShortUUID": "00000012",
"MinValue": 0,
"Format": "float",
"LocalizationKey": "",
"DefaultDescription": "Heating Threshold Temperature",
"Properties": 7,
"StepValue": 0.10000000000000001,
"MaxValue": 25,
"Units": "celsius"
}
},
"Properties": {
"hidden": { "LocalizationKey": "", "DefaultDescription": "Hidden", "Position": 6 },
"notify": { "LocalizationKey": "", "DefaultDescription": "Notify", "Position": 0 },
"write": { "LocalizationKey": "", "DefaultDescription": "Write", "Position": 2 },
"timedWrite": { "LocalizationKey": "", "DefaultDescription": "Timed Write Required", "Position": 5 },
"aa": { "LocalizationKey": "", "DefaultDescription": "Additional Authorization Needed", "Position": 4 },
"read": { "LocalizationKey": "", "DefaultDescription": "Read", "Position": 1 },
"adminOnly": { "LocalizationKey": "", "DefaultDescription": "Admin Only", "Position": 8 },
"broadcast": { "LocalizationKey": "", "DefaultDescription": "Broadcast State Changes", "Position": 3 },
"writeResponse": { "LocalizationKey": "", "DefaultDescription": "Write Response Needed", "Position": 7 }
},
"Units": {
"lux": { "DefaultDescription": "Lux", "LocalizationKey": "" },
"micrograms/m^3": { "DefaultDescription": "Micrograms Per Cubic Meter", "LocalizationKey": "" },
"celsius": { "DefaultDescription": "Celsius", "LocalizationKey": "" },
"seconds": { "DefaultDescription": "Seconds", "LocalizationKey": "" },
"fahrenheit": { "DefaultDescription": "Fahrenheit", "LocalizationKey": "" },
"ppm": { "DefaultDescription": "Parts Per Million", "LocalizationKey": "" },
"percentage": { "DefaultDescription": "Percentage", "LocalizationKey": "" },
"arcdegrees": { "DefaultDescription": "ArcDegrees", "LocalizationKey": "" }
},
"SupportsAuthorizationData": {
"door-state.target": ["garage-door-opener"],
"lock-mechanism.target-state": ["garage-door-opener", "lock-mechanism"]
},
"Services": {
"assistant": {
"Characteristics": { "Required": ["active", "identifier", "name"] },
"LocalizationKey": "",
"ShortUUID": "0000026A",
"DefaultDescription": "Assistant"
},
"stateful-programmable-switch": {
"Characteristics": { "Required": ["input-event", "output-state"], "Optional": ["name"] },
"LocalizationKey": "",
"ShortUUID": "00000088",
"DefaultDescription": "Stateful Programmable Switch"
},
"camera-operating-mode": {
"Characteristics": {
"Required": ["event-snapshots-active", "homekit-camera-active"],
"Optional": [
"camera-operating-mode-indicator",
"manually-disabled",
"night-vision",
"periodic-snapshots-active",
"third-party-camera-active"
]
},
"LocalizationKey": "",
"ShortUUID": "0000021A",
"DefaultDescription": "Camera Operating Mode"
},
"humidifier-dehumidifier": {
"Characteristics": {
"Required": [
"active",
"humidifier-dehumidifier.state.current",
"humidifier-dehumidifier.state.target",
"relative-humidity.current"
],
"Optional": [
"lock-physical-controls",
"name",
"relative-humidity.dehumidifier-threshold",
"relative-humidity.humidifier-threshold",
"rotation.speed",
"swing-mode",
"water-level"
]
},
"LocalizationKey": "",
"ShortUUID": "000000BD",
"DefaultDescription": "Humidifier-Dehumidifier"
},
"stateless-programmable-switch": {
"Characteristics": { "Required": ["input-event"], "Optional": ["name", "service-label-index"] },
"LocalizationKey": "",
"ShortUUID": "00000089",
"DefaultDescription": "Stateless Programmable Switch"
},
"nfc-access": {
"Characteristics": {
"Required": ["configuration-state", "nfc-access-control-point", "nfc-access-supported-configuration"]
},
"LocalizationKey": "",
"ShortUUID": "00000266",
"DefaultDescription": "NFC Access Service"
},
"sensor.motion": {
"Characteristics": {
"Required": ["motion-detected"],
"Optional": ["name", "status-active", "status-fault", "status-lo-batt", "status-tampered"]
},
"LocalizationKey": "",
"ShortUUID": "00000085",
"DefaultDescription": "Motion Sensor"
},
"speaker": {
"Characteristics": {
"Required": ["mute"],
"Optional": ["active", "volume", "volume-control-type", "volume-selector"]
},
"LocalizationKey": "",
"ShortUUID": "00000113",
"DefaultDescription": "Speaker"
},
"metrics": {
"Characteristics": { "Required": ["active"] },
"LocalizationKey": "",
"ShortUUID": "00000270",
"DefaultDescription": "Accessory Metrics"
},
"input-source": {
"Characteristics": {
"Required": ["configured-name", "input-source-type", "is-configured", "name", "visibility-state.current"],
"Optional": ["identifier", "input-device-type", "visibility-state.target"]
},
"LocalizationKey": "",
"ShortUUID": "000000D9",
"DefaultDescription": "Input Source"
},
"accessory-runtime-information": {
"Characteristics": {
"Required": ["ping"],
"Optional": ["activity-interval", "heart-beat", "sleep-interval"]
},
"LocalizationKey": "",
"ShortUUID": "00000239",
"DefaultDescription": "Accessory Runtime Information"
},
"sensor.light": {
"Characteristics": {
"Required": ["light-level.current"],
"Optional": ["name", "status-active", "status-fault", "status-lo-batt", "status-tampered"]
},
"LocalizationKey": "",
"ShortUUID": "00000084",
"DefaultDescription": "Light Sensor"
},
"fan": {
"DefaultDescription": "Fan",
"Characteristics": { "Required": ["on"], "Optional": ["name", "rotation.direction", "rotation.speed"] },
"ShortUUID": "00000040",
"LocalizationKey": "",
"BTLE_ShortUUID": "FECB"
},
"filter-maintenance": {
"Characteristics": {
"Required": ["filter.change-indication"],
"Optional": ["filter.life-level", "filter.reset-indication", "name"]
},
"LocalizationKey": "",
"ShortUUID": "000000BA",
"DefaultDescription": "Filter Maintenance"
},
"sensor.carbon-dioxide": {
"Characteristics": {
"Required": ["carbon-dioxide.detected"],
"Optional": [
"carbon-dioxide.level",
"carbon-dioxide.peak-level",
"name",
"status-active",
"status-fault",
"status-lo-batt",
"status-tampered"
]
},
"LocalizationKey": "",
"ShortUUID": "00000097",
"DefaultDescription": "Carbon dioxide Sensor"
},
"valve": {
"Characteristics": {
"Required": ["active", "in-use", "valve-type"],
"Optional": [
"is-configured",
"name",
"remaining-duration",
"service-label-index",
"set-duration",
"status-fault"
]
},
"LocalizationKey": "",
"ShortUUID": "000000D0",
"DefaultDescription": "Valve"
},
"thread-transport": {
"Characteristics": {
"Required": ["current-transport", "thread-control-point", "thread-node-capabilities", "thread-status"],
"Optional": [
"cca-energy-detect-threshold",
"cca-signal-detect-threshold",
"event-retransmission-maximum",
"event-transmission-counters",
"mac-retransmission-maximum",
"mac-transmission-counters",
"receiver-sensitivity",
"rssi",
"snr",
"thread-openthread-version",
"transmit-power",
"transmit-power-maximum"
]
},
"LocalizationKey": "",
"ShortUUID": "00000701",
"DefaultDescription": "Thread Transport"
},
"air-purifier": {
"Characteristics": {
"Required": ["active", "air-purifier.state.current", "air-purifier.state.target"],
"Optional": ["lock-physical-controls", "name", "rotation.speed", "swing-mode"]
},
"LocalizationKey": "",
"ShortUUID": "000000BB",
"DefaultDescription": "Air Purifier"
},
"irrigation-system": {
"Characteristics": {
"Required": ["active", "program-mode", "in-use"],
"Optional": ["remaining-duration", "name", "status-fault"]
},
"LocalizationKey": "",
"ShortUUID": "000000CF",
"DefaultDescription": "Irrigation-System"
},
"wifi-router": {
"Characteristics": {
"Required": [
"configured-name",
"managed-network-enable",
"network-access-violation-control",
"network-client-control",
"network-client-status-control",
"router-status",
"supported-router-configuration",
"wan-configuration-list",
"wan-status-list"
]
},
"LocalizationKey": "",
"ShortUUID": "0000020A",
"DefaultDescription": "Wi-Fi Router"
},
"garage-door-opener": {
"DefaultDescription": "Garage Door Opener",
"Characteristics": {
"Required": ["door-state.current", "door-state.target", "obstruction-detected"],
"Optional": ["lock-mechanism.current-state", "lock-mechanism.target-state", "name"]
},
"ShortUUID": "00000041",
"LocalizationKey": "",
"BTLE_ShortUUID": "FECE"
},
"cloud-relay": {
"Characteristics": {
"Required": ["cloud-relay.control-point", "cloud-relay.current-state", "cloud-relay.enabled"]
},
"LocalizationKey": "",
"ShortUUID": "0000005A",
"DefaultDescription": "Cloud Relay"
},
"diagnostics": {
"Characteristics": {
"Required": ["supported-diagnostics-snapshot"],
"Optional": ["selected-diagnostics-modes", "supported-diagnostics-modes"]
},
"LocalizationKey": "",
"ShortUUID": "00000237",
"DefaultDescription": "Diagnostics"
},
"target-control": {
"Characteristics": { "Required": ["active", "active-identifier", "button-event"], "Optional": ["name"] },
"LocalizationKey": "",
"ShortUUID": "00000125",
"DefaultDescription": "Target Control"
},
"sensor.leak": {
"Characteristics": {
"Required": ["leak-detected"],
"Optional": ["name", "status-active", "status-fault", "status-lo-batt", "status-tampered"]
},
"LocalizationKey": "",
"ShortUUID": "00000083",
"DefaultDescription": "Leak Sensor"
},
"asset-update": {
"Characteristics": { "Required": ["asset-update-readiness", "supported-asset-types"] },
"LocalizationKey": "",
"ShortUUID": "00000267",
"DefaultDescription": "Asset Update"
},
"sensor.temperature": {
"Characteristics": {
"Required": ["temperature.current"],
"Optional": ["name", "status-active", "status-fault", "status-lo-batt", "status-tampered"]
},
"LocalizationKey": "",
"ShortUUID": "0000008A",
"DefaultDescription": "Temperature Sensor"
},
"sensor.carbon-monoxide": {
"Characteristics": {
"Required": ["carbon-monoxide.detected"],
"Optional": [
"carbon-monoxide.level",
"carbon-monoxide.peak-level",
"name",
"status-active",
"status-fault",
"status-lo-batt",
"status-tampered"
]
},
"LocalizationKey": "",
"ShortUUID": "0000007F",
"DefaultDescription": "Carbon monoxide Sensor"
},
"data-stream-transport-management": {
"Characteristics": {
"Required": ["setup-data-stream-transport", "supported-data-stream-transport-configuration", "version"]
},
"LocalizationKey": "",
"ShortUUID": "00000129",
"DefaultDescription": "Data Stream Transport Management"
},
"sensor.contact": {
"AllowAssociatedService": 1,
"Characteristics": {
"Required": ["contact-state"],
"Optional": ["name", "status-active", "status-fault", "status-lo-batt", "status-tampered"]
},
"LocalizationKey": "",
"ShortUUID": "00000080",
"DefaultDescription": "Contact Sensor"
},
"doorbell": {
"Characteristics": {
"Required": ["input-event"],
"Optional": ["brightness", "mute", "name", "operating-state-response", "volume"]
},
"LocalizationKey": "",
"ShortUUID": "00000121",
"DefaultDescription": "Doorbell"
},
"protocol-information": {
"Characteristics": { "Required": ["version"] },
"LocalizationKey": "",
"ShortUUID": "000000A2",
"DefaultDescription": "Protocol Information"
},
"window": {
"Characteristics": {
"Required": ["position.current", "position.state", "position.target"],
"Optional": ["name", "obstruction-detected", "position.hold"]
},
"LocalizationKey": "",
"ShortUUID": "0000008B",
"DefaultDescription": "Window"
},
"wifi-satellite": {
"Characteristics": { "Required": ["wifi-satellite-status"] },
"LocalizationKey": "",
"ShortUUID": "0000020F",
"DefaultDescription": "Wi-Fi Satellite"
},
"pairing": {
"DefaultDescription": "Pairing",
"Characteristics": { "Required": ["list-pairings", "pair-setup", "pair-verify", "pairing-features"] },
"ShortUUID": "00000055",
"LocalizationKey": "",
"BTLE_ShortUUID": "FED4"
},
"sensor.smoke": {
"Characteristics": {
"Required": ["smoke-detected"],
"Optional": ["name", "status-active", "status-fault", "status-lo-batt", "status-tampered"]
},
"LocalizationKey": "",
"ShortUUID": "00000087",
"DefaultDescription": "Smoke Sensor"
},
"slats": {
"Characteristics": {
"Required": ["slat.state.current", "slat.type"],
"Optional": ["name", "swing-mode", "tilt.current", "tilt.target"]
},
"LocalizationKey": "",
"ShortUUID": "000000B9",
"DefaultDescription": "Slats"
},
"battery": {
"Characteristics": {
"Required": ["status-lo-batt"],
"Optional": ["battery-level", "charging-state", "name"]
},
"LocalizationKey": "",
"ShortUUID": "00000096",
"DefaultDescription": "Battery"
},
"thermostat": {
"DefaultDescription": "Thermostat",
"Characteristics": {
"Required": [
"heating-cooling.current",
"heating-cooling.target",
"temperature.current",
"temperature.target",
"temperature.units"
],
"Optional": [
"name",
"relative-humidity.current",
"relative-humidity.target",
"temperature.cooling-threshold",
"temperature.heating-threshold"
]
},
"ShortUUID": "0000004A",
"LocalizationKey": "",
"BTLE_ShortUUID": "FED1"
},
"lock-mechanism": {
"DefaultDescription": "Lock Mechanism",
"Characteristics": {
"Required": ["lock-mechanism.current-state", "lock-mechanism.target-state"],
"Optional": ["name"]
},
"ShortUUID": "00000045",
"LocalizationKey": "",
"BTLE_ShortUUID": "FED0"
},
"microphone": {
"Characteristics": { "Required": ["mute"], "Optional": ["volume"] },
"LocalizationKey": "",
"ShortUUID": "00000112",
"DefaultDescription": "Microphone"
},
"target-control-management": {
"Characteristics": { "Required": ["supported-target-configuration", "target-list"] },
"LocalizationKey": "",
"ShortUUID": "00000122",
"DefaultDescription": "Target Control Management"
},
"lock-management": {
"DefaultDescription": "Lock Management",
"Characteristics": {
"Required": ["lock-management.control-point", "version"],
"Optional": [
"administrator-only-access",
"audio-feedback",
"door-state.current",
"lock-management.auto-secure-timeout",
"lock-mechanism.last-known-action",
"logs",
"motion-detected"
]
},
"ShortUUID": "00000044",
"LocalizationKey": "",
"BTLE_ShortUUID": "FECF"
},
"sensor.occupancy": {
"Characteristics": {
"Required": ["occupancy-detected"],
"Optional": ["name", "status-active", "status-fault", "status-lo-batt", "status-tampered"]
},
"LocalizationKey": "",
"ShortUUID": "00000086",
"DefaultDescription": "Occupancy Sensor"
},
"siri-endpoint": {
"Characteristics": {
"Required": ["siri-endpoint-session-status", "version"],
"Optional": ["active-identifier", "manually-disabled"]
},
"LocalizationKey": "",
"ShortUUID": "00000253",
"DefaultDescription": "Siri Endpoint"
},
"siri": {
"Characteristics": {
"Required": ["siri-input-type"],
"Optional": [
"multifunction-button",
"siri-enable",
"siri-engine-revision",
"siri-light-on-use",
"siri-listening",
"siri-touch-to-use"
]
},
"LocalizationKey": "",
"ShortUUID": "00000133",
"DefaultDescription": "Siri"
},
"audio-stream-management": {
"Characteristics": {
"Required": ["supported-audio-stream-configuration", "selected-audio-stream-configuration"]
},
"LocalizationKey": "",
"ShortUUID": "00000127",
"DefaultDescription": "Audio Stream Management"
},
"smart-speaker": {
"Characteristics": {
"Required": ["media-state.current", "media-state.target"],
"Optional": ["airplay-enable", "configured-name", "mute", "name", "volume"]
},
"LocalizationKey": "",
"ShortUUID": "00000228",
"DefaultDescription": "Speaker"
},
"faucet": {
"Characteristics": { "Required": ["active"], "Optional": ["name", "status-fault"] },
"LocalizationKey": "",
"ShortUUID": "000000D7",
"DefaultDescription": "Faucet"
},
"door": {
"Characteristics": {
"Required": ["position.current", "position.state", "position.target"],
"Optional": ["name", "obstruction-detected", "position.hold"]
},
"LocalizationKey": "",
"ShortUUID": "00000081",
"DefaultDescription": "Door"
},
"security-system": {
"Characteristics": {
"Required": ["security-system-state.current", "security-system-state.target"],
"Optional": ["name", "security-system.alarm-type", "status-fault", "status-tampered"]
},
"LocalizationKey": "",
"ShortUUID": "0000007E",
"DefaultDescription": "Security System"
},
"camera-rtp-stream-management": {
"Characteristics": {
"Required": [
"selected-stream-configuration",
"setup-stream-endpoint",
"streaming-status",
"supported-audio-stream-configuration",
"supported-rtp-configuration",
"supported-video-stream-configuration"
],
"Optional": ["active"]
},
"LocalizationKey": "",
"ShortUUID": "00000110",
"DefaultDescription": "Camera Stream Management"
},
"sensor.air-quality": {
"Characteristics": {
"Required": ["air-quality"],
"Optional": [
"density.no2",
"density.ozone",
"density.pm10",
"density.pm2_5",
"density.so2",
"density.voc",
"name",
"status-active",
"status-fault",
"status-lo-batt",
"status-tampered"
]
},
"LocalizationKey": "",
"ShortUUID": "0000008D",
"DefaultDescription": "Air Quality Sensor"
},
"television": {
"Characteristics": {
"Required": ["active", "active-identifier", "configured-name", "remote-key", "sleep-discovery-mode"],
"Optional": [
"brightness",
"closed-captions",
"display-order",
"media-state.current",
"media-state.target",
"name",
"picture-mode",
"power-mode-selection"
]
},
"LocalizationKey": "",
"ShortUUID": "000000D8",
"DefaultDescription": "Television"
},
"transfer-transport-management": {
"Characteristics": { "Required": ["supported-transfer-transport-configuration", "setup-transfer-transport"] },
"LocalizationKey": "",
"ShortUUID": "00000203",
"DefaultDescription": "Transfer Transport Management"
},
"heater-cooler": {
"Characteristics": {
"Required": ["active", "heater-cooler.state.current", "heater-cooler.state.target", "temperature.current"],
"Optional": [
"lock-physical-controls",
"name",
"rotation.speed",
"swing-mode",
"temperature.cooling-threshold",
"temperature.heating-threshold",
"temperature.units"
]
},
"LocalizationKey": "",
"ShortUUID": "000000BC",
"DefaultDescription": "Heater-Cooler"
},
"accessory-information": {
"DefaultDescription": "Accessory Information Service",
"Characteristics": {
"Required": ["identify", "manufacturer", "model", "name", "serial-number"],
"Optional": [
"accessory-flags",
"app-matching-identifier",
"configured-name",
"firmware.revision",
"hardware-finish",
"hardware.revision",
"product-data",
"software.revision"
]
},
"ShortUUID": "0000003E",
"LocalizationKey": "",
"BTLE_ShortUUID": "FED3"
},
"outlet": {
"BTLE_ShortUUID": "FECC",
"Characteristics": { "Required": ["on"], "Optional": ["name", "outlet-in-use"] },
"AllowAssociatedService": 1,
"ShortUUID": "00000047",
"LocalizationKey": "",
"DefaultDescription": "Outlet"
},
"sensor.humidity": {
"Characteristics": {
"Required": ["relative-humidity.current"],
"Optional": ["name", "status-active", "status-fault", "status-lo-batt", "status-tampered"]
},
"LocalizationKey": "",
"ShortUUID": "00000082",
"DefaultDescription": "Humidity Sensor"
},
"fanv2": {
"Characteristics": {
"Required": ["active"],
"Optional": [
"fan.state.current",
"fan.state.target",
"lock-physical-controls",
"name",
"rotation.direction",
"rotation.speed",
"swing-mode"
]
},
"LocalizationKey": "",
"ShortUUID": "000000B7",
"DefaultDescription": "Fan"
},
"access-code": {
"Characteristics": {
"Required": ["access-code-control-point", "access-code-supported-configuration", "configuration-state"]
},
"LocalizationKey": "",
"ShortUUID": "00000260",
"DefaultDescription": "Access Code"
},
"lightbulb": {
"DefaultDescription": "Lightbulb",
"Characteristics": {
"Required": ["on"],
"Optional": [
"brightness",
"characteristic-value-active-transition-count",
"characteristic-value-transition-control",
"color-temperature",
"hue",
"name",
"saturation",
"supported-characteristic-value-transition-configuration"
]
},
"ShortUUID": "00000043",
"LocalizationKey": "",
"BTLE_ShortUUID": "FED2"
},
"service-label": {
"Characteristics": { "Required": ["service-label-namespace"] },
"LocalizationKey": "",
"ShortUUID": "000000CC",
"DefaultDescription": "Label"
},
"camera-recording-management": {
"Characteristics": {
"Required": [
"active",
"supported-camera-recording-configuration",
"supported-video-recording-configuration",
"supported-audio-recording-configuration",
"selected-camera-recording-configuration"
],
"Optional": ["recording-audio-active"]
},
"LocalizationKey": "",
"ShortUUID": "00000204",
"DefaultDescription": "Camera Recording Management"
},
"switch": {
"BTLE_ShortUUID": "FECD",
"Characteristics": { "Required": ["on"], "Optional": ["name"] },
"AllowAssociatedService": 1,
"ShortUUID": "00000049",
"LocalizationKey": "",
"DefaultDescription": "Switch"
},
"access-control": {
"Characteristics": { "Required": ["privilege"], "Optional": ["password-setting"] },
"LocalizationKey": "",
"ShortUUID": "000000DA",
"DefaultDescription": "Access Control"
},
"power-management": {
"Characteristics": { "Required": ["wake-configuration"], "Optional": [] },
"LocalizationKey": "",
"ShortUUID": "00000221",
"DefaultDescription": "Power Management"
},
"wifi-transport": {
"Characteristics": {
"Required": ["current-transport", "wifi-capabilities"],
"Optional": ["wifi-configuration-control"]
},
"LocalizationKey": "",
"ShortUUID": "0000022A",
"DefaultDescription": "Wi-Fi Transport"
},
"window-covering": {
"Characteristics": {
"Required": ["position.current", "position.state", "position.target"],
"Optional": [
"horizontal-tilt.current",
"horizontal-tilt.target",
"name",
"obstruction-detected",
"position.hold",
"vertical-tilt.current",
"vertical-tilt.target"
]
},
"LocalizationKey": "",
"ShortUUID": "0000008C",
"DefaultDescription": "Window Covering"
}
}
},
"Version": 880,
"SchemaVersion": 1,
"Assistant": {
"Characteristics": {
"CONTROL_LOCK": { "Format": "int", "ReadWrite": "lock-physical-controls" },
"HEATING_COOLING_MODE": {
"Read": "heating-cooling.current",
"Values": { "COOL": 2, "AUTO": 3, "HEAT": 1, "OFF": 0 },
"Format": "string",
"Write": "heating-cooling.target"
},
"OUTLET_IN_USE": { "Format": "bool", "Read": "outlet-in-use" },
"HEATING_THRESHOLD": {
"Format": "float",
"SupportsLocalization": 1,
"ReadWrite": "temperature.heating-threshold"
},
"CARBON_MONOXIDE_PEAK_LEVEL": { "Format": "float", "Read": "carbon-monoxide.peak-level" },
"COOLING_THRESHOLD": {
"Format": "float",
"SupportsLocalization": 1,
"ReadWrite": "temperature.cooling-threshold"
},
"HEATER_COOLER_MODE": {
"OutValues": { "3": "COOLING", "1": "IDLE", "2": "HEATING", "0": "INACTIVE" },
"Read": "heater-cooler.state.current",
"Format": "string",
"Values": { "AUTO": 0, "HEAT_AUTO": 1, "COOL_AUTO": 2 },
"Write": "heater-cooler.state.target"
},
"PROGRAM_MODE": { "Format": "int", "Read": "program-mode" },
"FILTER_CHANGE": {
"Values": { "CHANGE": 1, "NO_CHANGE": 0 },
"Format": "string",
"Read": "filter.change-indication"
},
"AIR_PARTICULATE_DENSITY": { "Format": "float", "Read": "air-particulate.density" },
"TILT": { "Write": "tilt.target", "Format": "int", "Read": "tilt.current" },
"DURATION": { "Format": "int", "ReadWrite": "set-duration" },
"SATURATION": { "Format": "float", "ReadWrite": "saturation" },
"CARBON_DIOXIDE_DETECTED": {
"Values": { "ABNORMAL": 1, "NORMAL": 0 },
"Format": "string",
"Read": "carbon-dioxide.detected"
},
"AMBIENT_LIGHT_LEVEL": { "Format": "float", "Read": "light-level.current" },
"CARBON_DIOXIDE_LEVEL": { "Format": "float", "Read": "carbon-dioxide.level" },
"CARBON_MONOXIDE_DETECTED": { "Format": "bool", "Read": "carbon-monoxide.detected" },
"IN_USE": { "Format": "int", "Read": "in-use" },
"IDENTIFY": { "Write": "identify", "Format": "bool" },
"ROTATION_SPEED": { "Format": "float", "ReadWrite": "rotation.speed" },
"HUMIDIFIER_THRESHOLD": { "Format": "float", "ReadWrite": "relative-humidity.humidifier-threshold" },
"NITROGEN_DIOXIDE_DENSITY": { "Format": "float", "Read": "density.no2" },
"REMAINING_DURATION": { "Format": "int", "Read": "remaining-duration" },
"CONTACT_DETECTED": { "Values": { "0": "0", "1": "1" }, "Format": "int", "Read": "contact-state" },
"HUMIDIFIER_DEHUMIDIFIER_MODE": {
"OutValues": { "3": "DEHUMIDIFYING", "1": "IDLE", "2": "HUMIDIFYING", "0": "INACTIVE" },
"Read": "humidifier-dehumidifier.state.current",
"Format": "string",
"Values": { "AUTO": 0, "HUMIDIFY_AUTO": 1, "DEHUMIDIFY_AUTO": 2 },
"Write": "humidifier-dehumidifier.state.target"
},
"SLAT_OPERATING_MODE": {
"OutValues": { "3": "JAMMED", "1": "FIXED", "2": "SWINGING", "0": "INACTIVE" },
"Read": "slat.state.current",
"Format": "string",
"Values": { "AUTO": 1, "MANUAL": 0 }
},
"BRIGHTNESS": { "Format": "int", "ReadWrite": "brightness" },
"FAN_OPERATING_MODE": {
"OutValues": { "0": "INACTIVE", "1": "IDLE", "2": "BLOWING" },
"Read": "fan.state.current",
"Format": "string",
"Values": { "AUTO": 1, "MANUAL": 0 },
"Write": "fan.state.target"
},
"CARBON_DIOXIDE_PEAK_LEVEL": { "Format": "float", "Read": "carbon-dioxide.peak-level" },
"ROTATION_DIRECTION": {
"Values": { "COUNTERCLOCKWISE": 1, "CLOCKWISE": 0 },
"Format": "string",
"ReadWrite": "rotation.direction"
},
"AIR_PURIFIER_OPERATING_MODE": {
"OutValues": { "0": "INACTIVE", "1": "IDLE", "2": "PURIFYING_AIR" },
"Read": "air-purifier.state.current",
"Format": "string",
"Values": { "AUTO": 1, "MANUAL": 0 },
"Write": "air-purifier.state.target"
},
"OCCUPANCY_DETECTED": {
"Values": { "OCCUPANCY_DETECTED": 1, "OCCUPANCY_NOT_DETECTED": 0 },
"Format": "string",
"Read": "occupancy-detected"
},
"DEHUMIDIFIER_THRESHOLD": { "Format": "float", "ReadWrite": "relative-humidity.dehumidifier-threshold" },
"SMOKE_DETECTED": { "Format": "bool", "Read": "smoke-detected" },
"TEMPERATURE": {
"Read": "temperature.current",
"SupportsLocalization": 1,
"Format": "float",
"Write": "temperature.target"
},
"POSITION": { "Write": "position.target", "Format": "int", "Read": "position.current" },
"RAISE": {
"OutValues": { "3": 3, "1": 0, "4": 4, "2": 2, "0": 1 },
"Read": "door-state.current",
"Format": "int",
"Values": { "0": 1, "1": 0 },
"Write": "door-state.target"
},
"LOCK": {
"Read": "lock-mechanism.current-state",
"Values": { "0": 0, "1": 1 },
"Format": "int",
"Write": "lock-mechanism.target-state"
},
"LOW_BATTERY": {
"Values": { "BATTERY_NORMAL": 0, "BATTERY_LOW": 1 },
"Format": "string",
"Read": "status-lo-batt"
},
"HUMIDITY": { "Write": "relative-humidity.target", "Format": "float", "Read": "relative-humidity.current" },
"HUE": { "Format": "float", "ReadWrite": "hue" },
"MOTION_DETECTED": { "Format": "bool", "Read": "motion-detected" },
"SECURITY_SYSTEM_STATE": {
"Read": "security-system-state.current",
"Values": { "DISARM": 3, "ALARM_TRIGGERED": 4, "NIGHT_ARM": 2, "AWAY_ARM": 1, "STAY_ARM": 0 },
"Format": "string",
"Write": "security-system-state.target"
},
"PARTICULATE_MATTER_2_5_DENSITY": { "Format": "float", "Read": "density.pm2_5" },
"FILTER_LIFE": { "Format": "float", "ReadWrite": "filter.life-level" },
"VOLATILE_ORGANIC_COMPOUND_DENSITY": { "Format": "float", "Read": "density.voc" },
"CHARGING_STATE": {
"Values": { "NOT_CHARGEABLE": 2, "CHARGING": 1, "NOT_CHARGING": 0 },
"Format": "string",
"Read": "charging-state"
},
"CARBON_MONOXIDE_LEVEL": { "Format": "float", "Read": "carbon-monoxide.level" },
"PARTICULATE_MATTER_10_DENSITY": { "Format": "float", "Read": "density.pm10" },
"LEAK_DETECTED": {
"Values": { "LEAK_NOT_DETECTED": 0, "LEAK_DETECTED": 1 },
"Format": "string",
"Read": "leak-detected"
},
"OZONE_DENSITY": { "Format": "float", "Read": "density.ozone" },
"AIR_QUALITY_RATING": {
"Values": { "GOOD": 2, "POOR": 5, "INFERIOR": 4, "EXCELLENT": 1, "FAIR": 3, "UNKNOWN": 0 },
"Format": "string",
"Read": "air-quality"
},
"OBSTRUCTION_DETECTED": { "Format": "bool", "Read": "obstruction-detected" },
"SWING_MODE": { "Format": "bool", "ReadWrite": "swing-mode" },
"POWER": { "Format": "bool", "ReadWrite": "on" },
"BATTERY_LEVEL": { "Format": "int", "Read": "battery-level" },
"SULPHUR_DIOXIDE_DENSITY": { "Format": "float", "Read": "density.so2" },
"WATER_LEVEL": { "Format": "float", "Read": "water-level" }
},
"Services": {
"LEAK_SENSOR": "sensor.leak",
"TELEVISION": "television",
"AIR_QUALITY_SENSOR": "sensor.air-quality",
"HEATER_COOLER": "heater-cooler",
"LIGHTBULB": "lightbulb",
"HUMIDIFIER_DEHUMIDIFIER": "humidifier-dehumidifier",
"HUMIDITY_SENSOR": "sensor.humidity",
"LIGHT_SENSOR": "sensor.light",
"CARBON_DIOXIDE_SENSOR": "sensor.carbon-dioxide",
"OUTLET": "outlet",
"FAUCET": "faucet",
"GARAGE_DOOR_OPENER": "garage-door-opener",
"SHADES": "window-covering",
"AIR_PURIFIER": "air-purifier",
"SLAT": "slats",
"SWITCH": "switch",
"IRRIGATION_SYSTEM": "irrigation-system",
"CARBON_MONOXIDE_SENSOR": "sensor.carbon-monoxide",
"DOOR_LOCK": "lock-mechanism",
"SECURITY_SYSTEM": "security-system",
"MOTORIZED_WINDOW": "window",
"TEMPERATURE_SENSOR": "sensor.temperature",
"BATTERY_SERVICE": "battery",
"CONTACT_SENSOR": "sensor.contact",
"FILTER_MAINTENANCE": "filter-maintenance",
"VALVE": "valve",
"MOTION_SENSOR": "sensor.motion",
"VENTILATION_FAN": "fan",
"OCCUPANCY_SENSOR": "sensor.occupancy",
"SMOKE_SENSOR": "sensor.smoke",
"THERMOSTAT": "thermostat",
"MOTORIZED_DOOR": "door"
},
"Units": {
"PERCENT": "percentage",
"CELSIUS": "celsius",
"FAHRENHEIT": "fahrenheit",
"ARC_DEGREES": "arcdegrees",
"LUX": "lux",
"SECONDS": "seconds"
}
}
},
"SchemaVersion": 1
}
================================================
FILE: codegen/src/main.rs
================================================
use handlebars::{Context, Handlebars, Helper, Output, RenderContext, RenderError, Renderable};
use serde::{Deserialize, Serialize};
use serde_json::{json, Value};
use std::{
collections::HashMap,
fs::{self, File},
io::Write,
};
#[derive(Debug, Clone, Serialize, Deserialize)]
struct SystemMetadata {
#[serde(rename = "Version")]
pub version: usize,
#[serde(rename = "SchemaVersion")]
pub schema_version: usize,
#[serde(rename = "PlistDictionary")]
pub plist_dictionary: SystemPlistDictionary,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
struct SystemPlistDictionary {
#[serde(rename = "Version")]
pub version: usize,
#[serde(rename = "SchemaVersion")]
pub schema_version: usize,
#[serde(rename = "HomeKit")]
pub homekit: HomeKit,
#[serde(rename = "HAP")]
pub hap: Hap,
#[serde(rename = "Assistant")]
pub assistant: Assistant,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
struct HomeKit {
#[serde(rename = "Categories")]
pub categories: HashMap<String, HomeKitCategory>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
struct HomeKitCategory {
#[serde(rename = "DefaultDescription")]
pub name: String,
#[serde(rename = "Identifier")]
pub number: u8,
#[serde(rename = "UUID")]
pub uuid: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
struct Hap {
#[serde(rename = "Base UUID")]
pub base_uuid: String,
#[serde(rename = "Characteristics")]
pub characteristics: HashMap<String, HapCharacteristic>,
#[serde(rename = "Services")]
pub services: HashMap<String, HapService>,
#[serde(rename = "Properties")]
pub properties: HashMap<String, HapProperty>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
struct HapCharacteristic {
#[serde(rename = "ShortUUID")]
pub short_uuid: String,
#[serde(rename = "DefaultDescription")]
pub name: String,
#[serde(rename = "Format")]
pub format: String,
#[serde(rename = "MinValue")]
pub min_value: Option<Value>,
#[serde(rename = "MaxValue")]
pub max_value: Option<Value>,
#[serde(rename = "StepValue")]
pub step_value: Option<Value>,
#[serde(rename = "MaxLength")]
pub max_length: Option<Value>,
#[serde(rename = "Units")]
pub units: Option<String>,
#[serde(rename = "Properties")]
pub properties: usize,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
struct HapService {
#[serde(rename = "ShortUUID")]
pub short_uuid: String,
#[serde(rename = "DefaultDescription")]
pub name: String,
#[serde(rename = "Characteristics")]
pub characteristics: HapServiceCharacteristicRelation,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
struct HapServiceCharacteristicRelation {
#[serde(rename = "Required")]
pub required_characteristics: Vec<String>,
#[serde(rename = "Optional")]
pub optional_characteristics: Option<Vec<String>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
struct HapProperty {
#[serde(rename = "DefaultDescription")]
pub name: String,
#[serde(rename = "Position")]
pub number: u8,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
struct Assistant {
#[serde(rename = "Characteristics")]
pub characteristics: HashMap<String, AssistantCharacteristic>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
struct AssistantCharacteristic {
#[serde(rename = "Format")]
pub format: String,
#[serde(rename = "Read")]
pub read: Option<String>,
#[serde(rename = "Write")]
pub write: Option<String>,
#[serde(rename = "ReadWrite")]
pub read_write: Option<String>,
#[serde(rename = "Values")]
pub values: Option<HashMap<String, Value>>,
#[serde(rename = "OutValues")]
pub out_values: Option<HashMap<String, Value>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
struct RenderMetadata {
pub categories: HashMap<String, HomeKitCategory>,
pub sorted_categories: Vec<HomeKitCategory>,
pub characteristics: HashMap<String, HapCharacteristic>,
pub sorted_characteristics: Vec<HapCharacteristic>,
pub services: HashMap<String, HapService>,
pub sorted_services: Vec<HapService>,
pub properties: HashMap<String, HapProperty>,
pub assistant_characteristics: HashMap<String, AssistantCharacteristic>,
pub characteristic_in_values: HashMap<String, HashMap<String, Value>>,
pub characteristic_out_values: HashMap<String, HashMap<String, Value>>,
}
impl From<SystemMetadata> for RenderMetadata {
fn from(v: SystemMetadata) -> Self {
let mut m = v.plist_dictionary;
// rename mislabeled services
let mut accessory_information_service = m.hap.services.get_mut("accessory-information").unwrap();
accessory_information_service.name = "Accessory Information".to_string();
let mut fan_v2_service = m.hap.services.get_mut("fanv2").unwrap();
fan_v2_service.name = "Fan v2".to_string();
let mut smart_speaker_service = m.hap.services.get_mut("smart-speaker").unwrap();
smart_speaker_service.name = "Smart Speaker".to_string();
let mut sorted_categories = m.homekit.categories.iter().map(|(_, v)| v.clone()).collect::<Vec<_>>();
sorted_categories.sort_by(|a, b| a.number.partial_cmp(&b.number).unwrap());
let mut sorted_characteristics = m.hap.characteristics.iter().map(|(_, v)| v.clone()).collect::<Vec<_>>();
sorted_characteristics.sort_by(|a, b| a.name.cmp(&b.name));
let mut sorted_services = m.hap.services.iter().map(|(_, v)| v.clone()).collect::<Vec<_>>();
sorted_services.sort_by(|a, b| a.name.cmp(&b.name));
let mut characteristic_in_values = HashMap::new();
let mut characteristic_out_values = HashMap::new();
for (_, characteristic) in m.assistant.characteristics.clone() {
if let (Some(ref read_name), Some(ref values), &None) =
(&characteristic.read, &characteristic.values, &characteristic.out_values)
{
characteristic_in_values.insert(read_name.clone(), values.clone());
}
if let (Some(ref read_write_name), Some(ref values), &None) = (
&characteristic.read_write,
&characteristic.values,
&characteristic.out_values,
) {
characteristic_in_values.insert(read_write_name.clone(), values.clone());
}
if let (Some(read_name), Some(out_values)) = (characteristic.read, characteristic.out_values) {
characteristic_out_values.insert(read_name, out_values);
}
if let (Some(write_name), Some(values)) = (characteristic.write, characteristic.values) {
characteristic_in_values.insert(write_name, values);
}
}
Self {
categories: m.homekit.categories,
sorted_categories,
characteristics: m.hap.characteristics,
sorted_characteristics,
services: m.hap.services,
sorted_services,
properties: m.hap.properties,
assistant_characteristics: m.assistant.characteristics,
characteristic_in_values,
characteristic_out_values,
}
}
}
fn if_eq_helper<'reg, 'rc>(
h: &Helper<'reg, 'rc>,
r: &'reg Handlebars,
c: &Context,
rc: &mut RenderContext<'reg>,
out: &mut dyn Output,
) -> Result<(), RenderError> {
let first = h.param(0).unwrap().value();
let second = h.param(1).unwrap().value();
let tmpl = if first == second { h.template() } else { h.inverse() };
match tmpl {
Some(ref t) => t.render(r, c, rc, out),
None => Ok(()),
}
}
fn trim_helper(
h: &Helper,
_: &Handlebars,
_: &Context,
_: &mut RenderContext,
out: &mut dyn Output,
) -> Result<(), RenderError> {
let param = h.param(0).unwrap().value();
if let Some(s) = param.as_str() {
let trim = s.replace(" ", "").replace(".", "_");
out.write(&trim)?;
}
Ok(())
}
fn file_name_helper(
h: &Helper,
_: &Handlebars,
_: &Context,
_: &mut RenderContext,
out: &mut dyn Output,
) -> Result<(), RenderError> {
let param = h.param(0).unwrap().value();
if let Some(s) = param.as_str() {
let name = s.replace(" ", "_").replace(".", "_").to_lowercase();
out.write(&name)?;
}
Ok(())
}
fn type_helper(
h: &Helper,
_: &Handlebars,
_: &Context,
_: &mut RenderContext,
out: &mut dyn Output,
) -> Result<(), RenderError> {
let param = h.param(0).unwrap().value();
if let Some(s) = param.as_str() {
match s {
"bool" => {
out.write("bool")?;
},
"uint8" => {
out.write("u8")?;
},
"uint16" => {
out.write("u16")?;
},
"uint32" => {
out.write("u32")?;
},
"uint64" => {
out.write("u64")?;
},
"int" => {
out.write("i32")?;
},
"int32" => {
out.write("i32")?;
},
"float" => {
out.write("f32")?;
},
"string" => {
out.write("String")?;
},
"tlv8" => {
out.write("Vec<u8>")?;
},
"data" => {
out.write("Vec<u8>")?;
},
_ => {
return Err(RenderError::new("Unknown Characteristic format"));
},
}
}
Ok(())
}
fn format_helper(
h: &Helper,
_: &Handlebars,
_: &Context,
_: &mut RenderContext,
out: &mut dyn Output,
) -> Result<(), RenderError> {
let param = h.param(0).unwrap().value();
if let Some(s) = param.as_str() {
match s {
"bool" => {
out.write("Format::Bool")?;
},
"uint8" => {
out.write("Format::UInt8")?;
},
"uint16" => {
out.write("Format::UInt16")?;
},
"uint32" => {
out.write("Format::UInt32")?;
},
"uint64" => {
out.write("Format::UInt64")?;
},
"int" => {
out.write("Format::Int32")?;
},
"int32" => {
out.write("Format::Int32")?;
},
"float" => {
out.write("Format::Float")?;
},
"string" => {
out.write("Format::String")?;
},
"tlv8" => {
out.write("Format::Tlv8")?;
},
"data" => {
out.write("Format::Data")?;
},
_ => {
return Err(RenderError::new("Unknown Characteristic format"));
},
}
}
Ok(())
}
fn unit_helper(
h: &Helper,
_: &Handlebars,
_: &Context,
_: &mut RenderContext,
out: &mut dyn Output,
) -> Result<(), RenderError> {
let param = h.param(0).unwrap().value();
if let Some(s) = param.as_str() {
match s {
"celsius" => {
out.write("Unit::Celsius")?;
},
"fahrenheit" => {
out.write("Unit::Celsius")?;
},
"percentage" => {
out.write("Unit::Percentage")?;
},
"arcdegrees" => {
out.write("Unit::ArcDegrees")?;
},
"lux" => {
out.write("Unit::Lux")?;
},
"seconds" => {
out.write("Unit::Seconds")?;
},
"ppm" => {
out.write("Unit::PartsPerMillion")?;
},
"micrograms/m^3" => {
out.write("Unit::MicrogramsPerCubicMeter")?;
},
_ => {
return Err(RenderError::new("Unknown Characteristic unit"));
},
}
}
Ok(())
}
fn category_helper(
h: &Helper,
_: &Handlebars,
_: &Context,
_: &mut RenderContext,
out: &mut dyn Output,
) -> Result<(), RenderError> {
let param = h.param(0).unwrap().value().as_str().unwrap();
match param.to_lowercase().as_str() {
"air quality sensor"
| "carbon dioxide sensor"
| "carbon monoxide sensor"
| "contact sensor"
| "humidity sensor"
| "leak sensor"
| "light sensor"
| "motion sensor"
| "occupancy sensor"
| "smoke sensor"
| "temperature sensor" => {
out.write("AccessoryCategory::Sensor")?;
},
"doorbell" => {
out.write("AccessoryCategory::VideoDoorbell")?;
},
"fan v2" => {
out.write("AccessoryCategory::Fan")?;
},
"heater-cooler" => {
out.write("AccessoryCategory::AirHeater /* or AccessoryCategory::AirConditioner */")?;
},
"humidifier-dehumidifier" => {
out.write("AccessoryCategory::AirHumidifier /* or AccessoryCategory::AirDehumidifier */")?;
},
"irrigation-system" => {
out.write("AccessoryCategory::Sprinkler")?;
},
"smart speaker" => {
out.write("AccessoryCategory::Speaker")?;
},
"stateful programmable switch" | "stateless programmable switch" => {
out.write("AccessoryCategory::ProgrammableSwitch")?;
},
"wi-fi satellite" => {
out.write("AccessoryCategory::WiFiRouter")?;
},
_ => {
let param = param.replace("-", " ");
let name = param
.to_lowercase()
.split(" ")
.into_iter()
.map(|word| {
let mut c = word.chars().collect::<Vec<char>>();
c[0] = c[0].to_uppercase().nth(0).unwrap();
c.into_iter().collect::<String>()
})
.collect::<String>();
let name = name.replace(" ", "").replace(".", "_");
out.write(&format!("AccessoryCategory::{}", name))?;
},
}
Ok(())
}
fn uuid_helper(
h: &Helper,
_: &Handlebars,
_: &Context,
_: &mut RenderContext,
out: &mut dyn Output,
) -> Result<(), RenderError> {
let param = h.param(0).unwrap().value();
if let Some(s) = param.as_str() {
out.write(&shorten_uuid(&s))?;
}
Ok(())
}
fn in_values_helper(
h: &Helper,
_: &Handlebars,
_: &Context,
_: &mut RenderContext,
out: &mut dyn Output,
) -> Result<(), RenderError> {
let param = h.param(0).unwrap().value().as_object().unwrap();
let mut values = param
.into_iter()
.map(|(key, val)| (key.clone(), val.clone().to_string().replace("\"", "")))
.collect::<Vec<(String, String)>>();
values.sort_by(|a, b| a.1.cmp(&b.1));
let mut output = String::from("vec![\n");
for (key, val) in values {
output.push_str(&format!("\t\t\t\t{}, // {}\n", val, key));
}
output.push_str("\t\t\t]");
out.write(&output)?;
Ok(())
}
fn out_values_helper(
h: &Helper,
_: &Handlebars,
_: &Context,
_: &mut RenderContext,
out: &mut dyn Output,
) -> Result<(), RenderError> {
let param = h.param(0).unwrap().value().as_object().unwrap();
let mut values = param
.into_iter()
.map(|(key, val)| (val.clone().to_string().replace("\"", ""), key.clone()))
.collect::<Vec<(String, String)>>();
values.sort_by(|a, b| a.1.cmp(&b.1));
let mut output = String::from("vec![\n");
for (key, val) in values {
output.push_str(&format!("\t\t\t\t{}, // {}\n", val, key));
}
output.push_str("\t\t\t]");
out.write(&output)?;
Ok(())
}
fn in_values_enum_helper(
h: &Helper,
_: &Handlebars,
_: &Context,
_: &mut RenderContext,
out: &mut dyn Output,
) -> Result<(), RenderError> {
let param = h.param(0).unwrap().value().as_object().unwrap();
let mut values = param
.into_iter()
.map(|(key, val)| (key.clone(), val.clone().to_string().replace("\"", "")))
.collect::<Vec<(String, String)>>();
values.sort_by(|a, b| a.1.cmp(&b.1));
let mut output = String::from("\npub enum Value {\n");
for (key, val) in values {
let key = key
.to_lowercase()
.split("_")
.into_iter()
.map(|word| {
let mut c = word.chars().collect::<Vec<char>>();
if c.len() == 1 && c[0].is_numeric() {
format!("Num{}", c[0])
} else {
c[0] = c[0].to_uppercase().nth(0).unwrap();
c.into_iter().collect::<String>()
}
})
.collect::<String>();
output.push_str(&format!("\t{} = {},\n", key, val));
}
output.push_str("}\n");
out.write(&output)?;
Ok(())
}
fn out_values_enum_helper(
h: &Helper,
_: &Handlebars,
_: &Context,
_: &mut RenderContext,
out: &mut dyn Output,
) -> Result<(), RenderError> {
let param = h.param(0).unwrap().value().as_object().unwrap();
let mut values = param
.into_iter()
.map(|(key, val)| (val.clone().to_string().replace("\"", ""), key.clone()))
.collect::<Vec<(String, String)>>();
values.sort_by(|a, b| a.1.cmp(&b.1));
let mut output = String::from("\npub enum Value {\n");
for (key, val) in values {
let key = key
.to_lowercase()
.split("_")
.into_iter()
.map(|word| {
let mut c = word.chars().collect::<Vec<char>>();
if c.len() == 1 && c[0].is_numeric() {
format!("Num{}", c[0])
} else {
c[0] = c[0].to_uppercase().nth(0).unwrap();
c.into_iter().collect::<String>()
}
})
.collect::<String>();
output.push_str(&format!("\t{} = {},\n", key, val));
}
output.push_str("}\n");
out.write(&output)?;
Ok(())
}
fn perms_helper(
h: &Helper,
_: &Handlebars,
_: &Context,
_: &mut RenderContext,
out: &mut dyn Output,
) -> Result<(), RenderError> {
let perms = vec![
(1 << 0, "\n\t\t\t\tPerm::Events,".to_string()),
(1 << 1, "\n\t\t\t\tPerm::PairedRead,".to_string()),
(1 << 2, "\n\t\t\t\tPerm::PairedWrite,".to_string()),
// Relevant for Bluetooth.
// (1 << 3, "\n\t\t\t\tPerm::Broadcast,".to_string()),
// aa set by homed just signals that aa may be supported. Setting up aa will always require a custom made app
// though. (1 << 4, "\n\t\t\t\tPerm::AdditionalAuthorization,".to_string()),
(1 << 5, "\n\t\t\t\tPerm::TimedWrite,".to_string()),
(1 << 6, "\n\t\t\t\tPerm::Hidden,".to_string()),
(1 << 7, "\n\t\t\t\tPerm::WriteResponse,".to_string()),
];
let properties_bitmap = h.param(0).unwrap().value().as_u64().unwrap();
for (bitmap, name) in perms {
// if it stays the same, the bit is set
if (bitmap | properties_bitmap) == properties_bitmap {
out.write(&name)?;
}
}
Ok(())
}
fn float_helper(
h: &Helper,
_: &Handlebars,
_: &Context,
_: &mut RenderContext,
out: &mut dyn Output,
) -> Result<(), RenderError> {
let format = h.param(0).unwrap().value().as_str().unwrap();
if format == "float" {
out.write(" as f32")?;
}
Ok(())
}
fn array_length_helper(
h: &Helper,
_: &Handlebars,
_: &Context,
_: &mut RenderContext,
out: &mut dyn Output,
) -> Result<(), RenderError> {
let array = h.param(0).unwrap().value().as_array().unwrap();
out.write(&format!("{}", array.len()))?;
Ok(())
}
fn shorten_uuid(id: &str) -> String { id.trim_start_matches('0').to_owned() }
fn snake_case_helper(
h: &Helper,
_: &Handlebars,
_: &Context,
_: &mut RenderContext,
out: &mut dyn Output,
) -> Result<(), RenderError> {
let param = h.param(0).unwrap().value().as_str().unwrap();
let name = param
.replace(" ", "_")
.replace(".", "_")
.replace("-", "_")
.to_lowercase();
out.write(&name)?;
Ok(())
}
fn pascal_case_helper(
h: &Helper,
_: &Handlebars,
_: &Context,
_: &mut RenderContext,
out: &mut dyn Output,
) -> Result<(), RenderError> {
let param = h.param(0).unwrap().value().as_str().unwrap().to_owned();
let param = param.replace("-", " ");
let name = param
.to_lowercase()
.split(" ")
.into_iter()
.map(|word| {
let mut c = word.chars().collect::<Vec<char>>();
c[0] = c[0].to_uppercase().nth(0).unwrap();
c.into_iter().collect::<String>()
})
.collect::<String>();
let name = name.replace(" ", "").replace(".", "_");
out.write(&name)?;
Ok(())
}
static CATEGORIES: &'static str = "// this file is auto-generated by hap-codegen\n
use serde::{Deserialize, Serialize};
/// HAP accessory category.
#[derive(Debug, Copy, Clone, Serialize, Deserialize, PartialEq)]
pub enum AccessoryCategory {
{{#each sorted_categories as |c|}}\
\t{{pascal_case c.DefaultDescription}} = {{c.Identifier}},
{{/each}}\
}
";
static HAP_TYPE: &'static str = "// this file is auto-generated by hap-codegen\n
use serde::{
de::{self, Deserialize, Deserializer},
ser::{Serialize, Serializer},
};
use std::str::FromStr;
use uuid::Uuid;
use crate::Error;
/// HAP service and characteristic type representation.
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum HapType {
Unknown,
Custom(Uuid),
{{#each sorted_characteristics as |c|}}\
\t{{pascal_case c.DefaultDescription}},
{{/each}}\
{{#each sorted_services as |s|}}\
\t{{pascal_case s.DefaultDescription}},
{{/each}}\
}
impl ToString for HapType {
fn to_string(&self) -> String {
match self {
HapType::Unknown => \"unknown\".into(),
HapType::Custom(uuid) => uuid.to_hyphenated().to_string(),
{{#each sorted_characteristics as |c|}}\
\t\t\tHapType::{{pascal_case c.DefaultDescription}} => \"{{uuid c.ShortUUID}}\".into(),
{{/each}}\
{{#each sorted_services as |s|}}\
\t\t\tHapType::{{pascal_case s.DefaultDescription}} => \"{{uuid s.ShortUUID}}\".into(),
{{/each}}\
\t\t}
}
}
impl FromStr for HapType {
type Err = Error;
fn from_str(s: &str) -> Result<Self, Self::Err> {
if let Ok(uuid) = Uuid::parse_str(s) {
return Ok(HapType::Custom(uuid));
}
match s {
\"unknown\" => Ok(HapType::Unknown),
{{#each sorted_characteristics as |c|}}\
\t\t\t\"{{uuid c.ShortUUID}}\" => Ok(HapType::{{pascal_case c.DefaultDescription}}),
{{/each}}\
{{#each sorted_services as |s|}}\
\t\t\t\"{{uuid s.ShortUUID}}\" => Ok(HapType::{{pascal_case s.DefaultDescription}}),
{{/each}}\
\t\t\t_ => Err(Error::InvalidHapTypeString(s.to_string())),
\t\t}
}
}
impl Default for HapType {
fn default() -> HapType { HapType::Unknown }
}
impl<'de> Deserialize<'de> for HapType {
fn deserialize<D>(deserializer: D) -> Result<HapType, D::Error>
where
D: Deserializer<'de>,
{
let s = String::deserialize(deserializer)?;
let hap_type = HapType::from_str(&s).map_err(de::Error::custom)?;
Ok(hap_type)
}
}
impl Serialize for HapType {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
serializer.serialize_str(&self.to_string())
}
}
";
static CHARACTERISTIC: &'static str = "// this file is auto-generated by hap-codegen\n
use async_trait::async_trait;
use serde::Serialize;
use serde_json::json;
use crate::{
characteristic::{
AsyncCharacteristicCallbacks,
Characteristic,
CharacteristicCallbacks,
Format,
HapCharacteristic,
HapCharacteristicSetup,
HapType,
OnReadFn,
OnReadFuture,
OnUpdateFn,
OnUpdateFuture,
Perm,
Unit,
},
pointer,
Result,
};
// TODO - re-check MaximumDataLength
/// {{characteristic.DefaultDescription}} characteristic.
#[derive(Debug, Default, Serialize)]
pub struct {{pascal_case characteristic.DefaultDescription}}Characteristic(Characteristic<{{type characteristic.Format}}>);
{{#if in_values includeZero=true}}{{in_values_enum in_values}}{{/if}}{{#if out_values includeZero=true}}{{out_values_enum out_values}}{{/if}}
impl {{pascal_case characteristic.DefaultDescription}}Characteristic {
/// Creates a new {{characteristic.DefaultDescription}} characteristic.
pub fn new(id: u64, accessory_id: u64) -> Self {
#[allow(unused_mut)]
let mut c = Self(Characteristic::<{{type characteristic.Format}}> {
id,
accessory_id,
hap_type: HapType::{{pascal_case characteristic.DefaultDescription}},
format: {{format characteristic.Format}},
perms: vec![{{perms characteristic.Properties}}
],\
{{#if characteristic.Units}}\n\t\t\tunit: Some({{unit characteristic.Units}}),{{/if}}\
{{#if characteristic.MaxValue includeZero=true}}\n\t\t\tmax_value: Some({{characteristic.MaxValue}}{{float characteristic.Format}}),{{/if}}\
{{#if characteristic.MinValue includeZero=true}}\n\t\t\tmin_value: Some({{characteristic.MinValue}}{{float characteristic.Format}}),{{/if}}\
{{#if characteristic.StepValue includeZero=true}}\n\t\t\tstep_value: Some({{characteristic.StepValue}}{{float characteristic.Format}}),{{/if}}\
{{#if characteristic.MaxLength includeZero=true}}\n\t\t\tmax_len: Some({{characteristic.MaxLength}}{{float characteristic.Format}}),{{/if}}\
{{#if in_values includeZero=true}}\n\t\t\tvalid_values: Some({{in_values in_values}}),{{/if}}{{#if out_values includeZero=true}}\n\t\t\tvalid_values: Some({{out_values out_values}}),{{/if}}
..Default::default()
});
if let Some(ref min_value) = &c.0.min_value {
c.0.value = min_value.clone();
} else if let Some(ref valid_values) = &c.0.valid_values {
if valid_values.len() > 0 {
c.0.value = valid_values[0].clone();
}
}
c
}
}
#[async_trait]
impl HapCharacteristic for {{pascal_case characteristic.DefaultDescription}}Characteristic {
fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, id) }
fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(&mut self.0, hap_type) }
fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
fn set_format(&mut self, format: Format) { HapCharacteristic::set_format(&mut self.0, format) }
fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms(&mut self.0, perms) }
fn get_description(&self) -> Option<String> { HapCharacteristic::get_description(&self.0) }
fn set_description(&mut self, description: Option<String>) {
HapCharacteristic::set_description(&mut self.0, description)
}
fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::get_event_notifications(&self.0) }
fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
HapCharacteristic::set_event_notifications(&mut self.0, event_notifications)
}
async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacteristic::get_value(&mut self.0).await }
async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
HapCharacteristic::set_value(&mut self.0, value).await
}
fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit(&mut self.0, unit) }
fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic::get_max_value(&self.0).map(|v| json!(v)) }
fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Result<()> {
HapCharacteristic::set_max_value(&mut self.0, max_value)
}
fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic::get_min_value(&self.0).map(|v| json!(v)) }
fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Result<()> {
HapCharacteristic::set_min_value(&mut self.0, min_value)
}
fn get_step_value(&self) -> Option<serde_json::Value> {
HapCharacteristic::get_step_value(&self.0).map(|v| json!(v))
}
fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> Result<()> {
HapCharacteristic::set_step_value(&mut self.0, step_value)
}
fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&self.0) }
fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set_max_len(&mut self.0, max_len) }
fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_data_len(&self.0) }
fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
HapCharacteristic::set_max_data_len(&mut self.0, max_data_len)
}
fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharacteristic::get_valid_values(&self.0) }
fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Value>>) -> Result<()> {
HapCharacteristic::set_valid_values(&mut self.0, valid_values)
}
fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
HapCharacteristic::get_valid_values_range(&self.0)
}
fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_json::Value; 2]>) -> Result<()> {
HapCharacteristic::set_valid_values_range(&mut self.0, valid_values_range)
}
fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mut self.0, ttl) }
fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mut self.0, pid) }
}
impl HapCharacteristicSetup for {{pascal_case characteristic.DefaultDescription}}Characteristic {
fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmitter>) {
HapCharacteristicSetup::set_event_emitter(&mut self.0, event_emitter)
}
}
impl CharacteristicCallbacks<{{type characteristic.Format}}> for {{pascal_case characteristic.DefaultDescription}}Characteristic {
fn on_read(&mut self, f: Option<impl OnReadFn<{{type characteristic.Format}}>>) { CharacteristicCallbacks::on_read(&mut self.0, f) }
fn on_update(&mut self, f: Option<impl OnUpdateFn<{{type characteristic.Format}}>>) { CharacteristicCallbacks::on_update(&mut self.0, f) }
}
impl AsyncCharacteristicCallbacks<{{type characteristic.Format}}> for {{pascal_case characteristic.DefaultDescription}}Characteristic {
fn on_read_async(&mut self, f: Option<impl OnReadFuture<{{type characteristic.Format}}>>) {
AsyncCharacteristicCallbacks::on_read_async(&mut self.0, f)
}
fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<{{type characteristic.Format}}>>) {
AsyncCharacteristicCallbacks::on_update_async(&mut self.0, f)
}
}
";
static CHARACTERISTIC_MOD: &'static str = "// this file is auto-generated by hap-codegen
{{#each characteristics as |c|}}\n/// {{c.name}} characteristic definition.\npub mod {{c.file_name}};{{/each}}
";
static SERVICE: &'static str = "// this file is auto-generated by hap-codegen\n
use serde::ser::{Serialize, SerializeStruct, Serializer};
use crate::{
service::HapService,
characteristic::{
HapCharacteristic,
{{#each required_characteristics as |r|}}\
\t\t{{snake_case r.DefaultDescription}}::{{pascal_case r.DefaultDescription}}Characteristic,
{{/each}}\
{{#each optional_characteristics as |r|}}\
\t\t{{snake_case r.DefaultDescription}}::{{pascal_case r.DefaultDescription}}Characteristic,
{{/each}}\
\t},
HapType,
};
/// {{service.DefaultDescription}} service.
#[derive(Debug, Default)]
pub struct {{pascal_case service.DefaultDescription}}Service {
/// Instance ID of the {{service.DefaultDescription}} service.
id: u64,
/// [`HapType`](HapType) of the {{service.DefaultDescription}} service.
hap_type: HapType,
/// When set to true, this service is not visible to user.
hidden: bool,
/// When set to true, this is the primary service on the accessory.
primary: bool,
/// An array of numbers containing the instance IDs of the services that this service links to.
linked_services: Vec<u64>,
{{#each required_characteristics as |r|}}\
\t/// {{r.DefaultDescription}} characteristic (required).
\tpub {{snake_case r.DefaultDescription}}: {{pascal_case r.DefaultDescription}}Characteristic,
{{/each}}\
\n{{#each optional_characteristics as |o|}}\
\t/// {{o.DefaultDescription}} characteristic (optional).
\tpub {{snake_case o.DefaultDescription}}: Option<{{pascal_case o.DefaultDescription}}Characteristic>,
{{/each}}\
}
impl {{pascal_case service.DefaultDescription}}Service {
/// Creates a new {{service.DefaultDescription}} service.
pub fn new(id: u64, accessory_id: u64) -> Self {
Self {
id,
hap_type: HapType::{{pascal_case service.DefaultDescription}},
{{#each required_characteristics as |r|}}\
\t\t\t{{snake_case r.DefaultDescription}}: {{pascal_case r.DefaultDescription}}Characteristic::new(id + 1 + {{@index}}, accessory_id),
{{/each}}\
{{#each optional_characteristics as |o|}}\
\t\t\t{{snake_case o.DefaultDescription}}: Some({{pascal_case o.DefaultDescription}}Characteristic::new(id + 1 + {{@index}} + {{array_length ../required_characteristics}}, accessory_id)),
{{/each}}\
\t\t\t..Default::default()
}
}
}
impl HapService for {{pascal_case service.DefaultDescription}}Service {
fn get_id(&self) -> u64 {
self.id
}
fn set_id(&mut self, id: u64) {
self.id = id;
}
fn get_type(&self) -> HapType {
self.hap_type
}
fn set_type(&mut self, hap_type: HapType) {
self.hap_type = hap_type;
}
fn get_hidden(&self) -> bool {
self.hidden
}
fn set_hidden(&mut self, hidden: bool) {
self.hidden = hidden;
}
fn get_primary(&self) -> bool {
self.primary
}
fn set_primary(&mut self, primary: bool) {
self.primary = primary;
}
fn get_linked_services(&self) -> Vec<u64> {
self.linked_services.clone()
}
fn set_linked_services(&mut self, linked_services: Vec<u64>) {
self.linked_services = linked_services;
}
fn get_characteristic(&self, hap_type: HapType) -> Option<&dyn HapCharacteristic> {
for characteristic in self.get_characteristics() {
if characteristic.get_type() == hap_type {
return Some(characteristic);
}
}
None
}
fn get_mut_characteristic(&mut self, hap_type: HapType) -> Option<&mut dyn HapCharacteristic> {
for characteristic in self.get_mut_characteristics() {
if characteristic.get_type() == hap_type {
return Some(characteristic);
}
}
None
}
fn get_characteristics(&self) -> Vec<&dyn HapCharacteristic> {
#[allow(unused_mut)]
let mut characteristics: Vec<&dyn HapCharacteristic> = vec![
{{#each required_characteristics as |r|}}\
\t\t\t&self.{{snake_case r.DefaultDescription}},
{{/each}}\
\t\t];
{{#each optional_characteristics as |r|}}\
\t\tif let Some(c) = &self.{{snake_case r.DefaultDescription}} {
\t\t characteristics.push(c);
\t\t}
{{/each}}\
\t\tcharacteristics
}
fn get_mut_characteristics(&mut self) -> Vec<&mut dyn HapCharacteristic> {
#[allow(unused_mut)]
let mut characteristics: Vec<&mut dyn HapCharacteristic> = vec![
{{#each required_characteristics as |r|}}\
\t\t\t&mut self.{{snake_case r.DefaultDescription}},
{{/each}}\
\t\t];
{{#each optional_characteristics as |r|}}\
\t\tif let Some(c) = &mut self.{{snake_case r.DefaultDescription}} {
\t\t characteristics.push(c);
\t\t}
{{/each}}\
\t\tcharacteristics
}
}
impl Serialize for {{pascal_case service.DefaultDescription}}Service {
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
let mut state = serializer.serialize_struct(\"HapService\", 5)?;
state.serialize_field(\"iid\", &self.get_id())?;
state.serialize_field(\"type\", &self.get_type())?;
state.serialize_field(\"hidden\", &self.get_hidden())?;
state.serialize_field(\"primary\", &self.get_primary())?;
state.serialize_field(\"characteristics\", &self.get_characteristics())?;
// linked services left out for now
state.end()
}
}
";
static SERVICE_MOD: &'static str = "// this file is auto-generated by hap-codegen
{{#each services as |s|}}\n/// {{s.name}} service definition.\npub mod {{s.file_name}};{{/each}}
";
static ACCESSORY: &'static str = "// this file is auto-generated by hap-codegen\n
use serde::ser::{Serialize, SerializeStruct, Serializer};
use crate::{
\taccessory::{AccessoryInformation, HapAccessory},
\tservice::{HapService, accessory_information::AccessoryInformationService, {{snake_case service.DefaultDescription}}::{{pascal_case service.DefaultDescription}}Service},
\tHapType,
\tResult,
};
/// {{service.DefaultDescription}} accessory.
#[derive(Debug, Default)]
pub struct {{pascal_case service.DefaultDescription}}Accessory {
/// ID of the {{service.DefaultDescription}} accessory.
id: u64,
/// Accessory Information service.
pub accessory_information: AccessoryInformationService,
/// {{service.DefaultDescription}} service.
pub {{snake_case service.DefaultDescription}}: {{pascal_case service.DefaultDescription}}Service,
}
impl {{pascal_case service.DefaultDescription}}Accessory {
/// Creates a new {{service.DefaultDescription}} accessory.
pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
let accessory_information = information.to_service(1, id)?;
let {{snake_case service.DefaultDescription}}_id = accessory_information.get_characteristics().len() as u64;
let mut {{snake_case service.DefaultDescription}} = {{pascal_case service.DefaultDescription}}Service::new(1 + {{snake_case service.DefaultDescription}}_id + 1, id);
{{snake_case service.DefaultDescription}}.set_primary(true);
Ok(Self {
id,
accessory_information,
{{snake_case service.DefaultDescription}},
})
}
}
impl HapAccessory for {{pascal_case service.DefaultDescription}}Accessory {
fn get_id(&self) -> u64 {
self.id
}
fn set_id(&mut self, id: u64) {
self.id = id;
}
fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
for service in self.get_services() {
if service.get_type() == hap_type {
return Some(service);
}
}
None
}
fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapService> {
for service in self.get_mut_services() {
if service.get_type() == hap_type {
return Some(service);
}
}
None
}
fn get_services(&self) -> Vec<&dyn HapService> {
vec![
&self.accessory_information,
&self.{{snake_case service.DefaultDescription}},
]
}
fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
vec![
&mut self.accessory_information,
&mut self.{{snake_case service.DefaultDescription}},
]
}
}
impl Serialize for {{pascal_case service.DefaultDescription}}Accessory {
fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error> {
let mut state = serializer.serialize_struct(\"HapAccessory\", 2)?;
state.serialize_field(\"aid\", &self.get_id())?;
state.serialize_field(\"services\", &self.get_services())?;
state.end()
}
}
";
static ACCESSORY_MOD: &'static str = "// this file is auto-generated by hap-codegen
{{#each accessories as |a|}}\n/// {{a.name}} accessory definition.\npub mod {{a.file_name}};{{/each}}
";
static EXAMPLE: &'static str = "\
use tokio;
use hap::{
accessory::{AccessoryCategory, AccessoryInformation, {{snake_case service.DefaultDescription}}::{{pascal_case service.DefaultDescription}}Accessory},
server::{IpServer, Server},
storage::{FileStorage, Storage},
Config,
MacAddress,
Pin,
Result,
};
#[tokio::main]
async fn main() -> Result<()> {
let {{snake_case service.DefaultDescription}} = {{pascal_case service.DefaultDescription}}Accessory::new(1, AccessoryInformation {
name: \"Acme {{service.DefaultDescription}}\".into(),
..Default::default()
})?;
let mut storage = FileStorage::current_dir().await?;
let config = match storage.load_config().await {
Ok(mut config) => {
config.redetermine_local_ip();
storage.save_config(&config).await?;
config
},
Err(_) => {
let config = Config {
pin: Pin::new([1, 1, 1, 2, 2, 3, 3, 3])?,
name: \"Acme {{service.DefaultDescription}}\".into(),
device_id: MacAddress::from([10, 20, 30, 40, 50, 60]),
category: {{category service.DefaultDescription}},
..Default::default()
};
storage.save_config(&config).await?;
config
},
};
let server = IpServer::new(config, storage).await?;
server.add_accessory({{snake_case service.DefaultDescription}}).await?;
let handle = server.run_handle();
std::env::set_var(\"RUST_LOG\", \"hap=debug\");
env_logger::init();
handle.await
}
";
/// Services for which accessories need some level of manual adjustment and therefore we don't want to auto-generate an
/// accesory for.
const NON_IDIOMATIC_SERVICES: &'static [&'static str] = &[
"access code",
"accessory information",
"accessory metrics",
"access control",
"accessory runtime information",
"asset update",
"assistant",
"audio stream management",
"battery",
"camera operating mode",
"camera recording management",
"camera stream management",
"cloud relay",
"data stream transport management",
"diagnostics",
"doorbell",
"faucet",
"filter maintenance",
"heater-cooler",
"input source",
"irrigation-system",
"label",
"lightbulb",
"lock management",
"lock mechanism",
"microphone",
"nfc access service",
"pairing",
"power management",
"protocol information",
"siri",
"siri endpoint",
"slats",
"speaker",
"target control management",
"target control",
"television",
"thread transport",
"transfer transport management",
"valve",
"wi-fi transport",
];
/// Services for which we can auto-generate an accessory, but want to skip the example generation because the example
/// needs some level of manual adjustment.
const SKIP_EXAMPLE_GENERATION: &'static [&'static str] = &["humidifier-dehumidifier"];
/// Example file names that are generated or edited manually and therefore shouldn't be overridden by codegen.
const MANUALLY_GENERATED_EXAMPLES: &'static [&'static str] = &[
"adding_accessories_dynamically.rs",
"async_callbacks.rs",
"bridged_accessories.rs",
"callbacks.rs",
"cooler.rs",
"custom_characteristics_services_accessories.rs",
"custom_multi_sensor.rs",
"dehumidifier.rs",
"faucet.rs",
"heater.rs",
"humidifier.rs",
"irrigation_system.rs",
"lightbulb.rs",
"lock.rs",
"setting_values_after_server_start.rs",
"shower_head.rs",
"storing_arbitrary_bytes.rs",
"sprinkler.rs",
"television.rs",
];
// TODO - manual overrides for valve type & media state values
fn main() {
let metadata_file = File::open("codegen/gen/system.json").unwrap();
let metadata: SystemMetadata = serde_json::from_reader(&metadata_file).unwrap();
let metadata = RenderMetadata::from(metadata);
let mut handlebars = Handlebars::new();
handlebars.register_helper("if_eq", Box::new(if_eq_helper));
handlebars.register_helper("trim", Box::new(trim_helper));
handlebars.register_helper("file_name", Box::new(file_name_helper));
handlebars.register_helper("format", Box::new(format_helper));
handlebars.register_helper("type", Box::new(type_helper));
handlebars.register_helper("unit", Box::new(unit_helper));
handlebars.register_helper("category", Box::new(category_helper));
handlebars.register_helper("uuid", Box::new(uuid_helper));
handlebars.register_helper("in_values", Box::new(in_values_helper));
handlebars.register_helper("out_values", Box::new(out_values_helper));
handlebars.register_helper("in_values_enum", Box::new(in_values_enum_helper));
handlebars.register_helper("out_values_enum", Box::new(out_values_enum_helper));
handlebars.register_helper("perms", Box::new(perms_helper));
handlebars.register_helper("float", Box::new(float_helper));
handlebars.register_helper("array_length", Box::new(array_length_helper));
handlebars.register_helper("snake_case", Box::new(snake_case_helper));
handlebars.register_helper("pascal_case", Box::new(pascal_case_helper));
handlebars.register_template_string("categories", CATEGORIES).unwrap();
handlebars.register_template_string("hap_type", HAP_TYPE).unwrap(); // PascalCase camelCase
handlebars
.register_template_string("characteristic", CHARACTERISTIC)
.unwrap();
handlebars
.register_template_string("characteristic_mod", CHARACTERISTIC_MOD)
.unwrap();
handlebars.register_template_string("service", SERVICE).unwrap();
handlebars.register_template_string("service_mod", SERVICE_MOD).unwrap();
handlebars.register_template_string("accessory", ACCESSORY).unwrap();
handlebars
.register_template_string("accessory_mod", ACCESSORY_MOD)
.unwrap();
handlebars.register_template_string("example", EXAMPLE).unwrap();
let categories = handlebars.render("categories", &metadata).unwrap();
let categories_path = "src/accessory/category.rs".to_owned();
let mut categories_file = File::create(&categories_path).unwrap();
categories_file.write_all(categories.as_bytes()).unwrap();
let hap_type = handlebars.render("hap_type", &metadata).unwrap();
let hap_type_path = "src/hap_type.rs".to_owned();
let mut hap_type_file = File::create(&hap_type_path).unwrap();
hap_type_file.write_all(hap_type.as_bytes()).unwrap();
let characteristic_base_path = "src/characteristic/generated/";
if std::path::Path::new(&characteristic_base_path).exists() {
fs::remove_dir_all(&characteristic_base_path).unwrap();
}
fs::create_dir_all(&characteristic_base_path).unwrap();
let mut characteristic_names = vec![];
for (c_name, c) in &metadata.characteristics {
let in_values = metadata.characteristic_in_values.get(c_name);
let out_values = metadata.characteristic_out_values.get(c_name);
let characteristic = handlebars
.render(
"characteristic",
&json!({ "characteristic": c, "in_values": in_values, "out_values": out_values }),
)
.unwrap();
let characteristic_file_name = c
.name
.replace(" ", "_")
.replace(".", "_")
.replace("-", "_")
.to_lowercase();
let mut characteristic_path = String::from(characteristic_base_path);
characteristic_path.push_str(&characteristic_file_name);
characteristic_path.push_str(".rs");
let mut characteristic_file = File::create(&characteristic_path).unwrap();
characteristic_file.write_all(characteristic.as_bytes()).unwrap();
characteristic_names.push(json!({ "name": c.name, "file_name": characteristic_file_name }));
}
characteristic_names.sort_by(|a, b| {
a.get("file_name")
.unwrap()
.as_str()
.unwrap()
.cmp(&b.get("file_name").unwrap().as_str().unwrap())
});
let characteristic_mod = handlebars
.render(
"characteristic_mod",
&json!({ "characteristics": characteristic_names }),
)
.unwrap();
let mut characteristic_mod_file = File::create(&format!("{}mod.rs", characteristic_base_path)).unwrap();
characteristic_mod_file
.write_all(characteristic_mod.as_bytes())
.unwrap();
let service_base_path = "src/service/generated/";
let accessory_base_path = "src/accessory/generated/";
if std::path::Path::new(&service_base_path).exists() {
fs::remove_dir_all(&service_base_path).unwrap();
}
if std::path::Path::new(&accessory_base_path).exists() {
fs::remove_dir_all(&accessory_base_path).unwrap();
}
for entry in fs::read_dir("examples").unwrap() {
let entry = entry.unwrap();
if entry.file_type().unwrap().is_file()
&& !MANUALLY_GENERATED_EXAMPLES.contains(&entry.file_name().to_str().unwrap())
{
fs::remove_file(entry.path()).unwrap();
}
}
fs::create_dir_all(&service_base_path).unwrap();
fs::create_dir_all(&accessory_base_path).unwrap();
let mut service_names = vec![];
let mut accessory_names = vec![];
for s in &metadata.sorted_services {
let mut required_characteristics = Vec::new();
let mut optional_characteristics = Vec::new();
for c in &s.characteristics.required_characteristics {
required_characteristics.push(metadata.characteristics.get(c).unwrap().clone());
}
if let Some(o_cs) = &s.characteristics.optional_characteristics {
for c in o_cs {
optional_characteristics.push(metadata.characteristics.get(c).unwrap().clone());
}
}
let service = handlebars
.render(
"service",
&json!({
"service": s,
"required_characteristics": &required_characteristics,
"optional_characteristics": &optional_characteristics,
}),
)
.unwrap();
let service_file_name = s
.name
.replace(" ", "_")
.replace(".", "_")
.replace("-", "_")
.to_lowercase();
let mut service_path = String::from(service_base_path);
service_path.push_str(&service_file_name);
service_path.push_str(".rs");
let mut service_file = File::create(&service_path).unwrap();
service_file.write_all(service.as_bytes()).unwrap();
service_names.push(json!({ "name": s.name.clone(), "file_name": service_file_name.clone() }));
if !NON_IDIOMATIC_SERVICES.contains(&s.name.to_lowercase().as_str()) {
let accessory = handlebars
.render(
"accessory",
&json!({"service": s, "characteristics": &metadata.characteristics}),
)
.unwrap();
let mut accessory_path = String::from(accessory_base_path);
accessory_path.push_str(&service_file_name);
accessory_path.push_str(".rs");
let mut accessory_file = File::create(&accessory_path).unwrap();
accessory_file.write_all(accessory.as_bytes()).unwrap();
if !SKIP_EXAMPLE_GENERATION.contains(&s.name.to_lowercase().as_str()) {
let example = handlebars.render("example", &json!({ "service": s })).unwrap();
let mut example_path = String::from("examples/");
example_path.push_str(&service_file_name);
example_path.push_str(".rs");
let mut example_file = File::create(&example_path).unwrap();
example_file.write_all(example.as_bytes()).unwrap();
}
accessory_names.push(json!({ "name": s.name.clone(), "file_name": service_file_name }));
}
}
let service_mod = handlebars
.render("service_mod", &json!({ "services": service_names }))
.unwrap();
let mut service_mod_file = File::create(&format!("{}mod.rs", service_base_path)).unwrap();
service_mod_file.write_all(service_mod.as_bytes()).unwrap();
let accessory_mod = handlebars
.render("accessory_mod", &json!({ "accessories": accessory_names }))
.unwrap();
let mut accessory_mod_file = File::create(&format!("{}mod.rs", accessory_base_path)).unwrap();
accessory_mod_file.write_all(accessory_mod.as_bytes()).unwrap();
}
================================================
FILE: examples/adding_accessories_dynamically.rs
================================================
use tokio;
use hap::{
accessory::{bridge::BridgeAccessory, lightbulb::LightbulbAccessory, AccessoryCategory, AccessoryInformation},
server::{IpServer, Server},
storage::{FileStorage, Storage},
Config,
MacAddress,
Pin,
Result,
};
#[tokio::main]
async fn main() -> Result<()> {
let bridge = BridgeAccessory::new(1, AccessoryInformation {
name: "Acme Bridge".into(),
..Default::default()
})?;
let lightbulb = LightbulbAccessory::new(2, AccessoryInformation {
name: "Acme Lightbulb".into(),
..Default::default()
})?;
let mut storage = FileStorage::current_dir().await?;
let config = match storage.load_config().await {
Ok(mut config) => {
config.redetermine_local_ip();
storage.save_config(&config).await?;
config
},
Err(_) => {
let config = Config {
pin: Pin::new([1, 1, 1, 2, 2, 3, 3, 3])?,
name: "Acme Bridge".into(),
device_id: MacAddress::from([10, 20, 30, 40, 50, 60]),
category: AccessoryCategory::Bridge,
..Default::default()
};
storage.save_config(&config).await?;
config
},
};
let server = IpServer::new(config, storage).await?;
server.add_accessory(bridge).await?;
server.add_accessory(lightbulb).await?;
let handle = server.run_handle();
let stream_of_new_accessories = async {
tokio::time::sleep(std::time::Duration::from_secs(60)).await;
for i in 0..20 {
let lightbulb = LightbulbAccessory::new(i + 3, AccessoryInformation {
name: format!("Another Lightbulb {}", i + 1),
..Default::default()
})?;
server.add_accessory(lightbulb).await?;
tokio::time::sleep(std::time::Duration::from_secs(2)).await;
}
Ok(())
};
std::env::set_var("RUST_LOG", "hap=debug");
env_logger::init();
futures::try_join!(handle, stream_of_new_accessories)?;
Ok(())
}
================================================
FILE: examples/air_purifier.rs
================================================
use tokio;
use hap::{
accessory::{air_purifier::AirPurifierAccessory, AccessoryCategory, AccessoryInformation},
server::{IpServer, Server},
storage::{FileStorage, Storage},
Config,
MacAddress,
Pin,
Result,
};
#[tokio::main]
async fn main() -> Result<()> {
let air_purifier = AirPurifierAccessory::new(1, AccessoryInformation {
name: "Acme Air Purifier".into(),
..Default::default()
})?;
let mut storage = FileStorage::current_dir().await?;
let config = match storage.load_config().await {
Ok(mut config) => {
config.redetermine_local_ip();
storage.save_config(&config).await?;
config
},
Err(_) => {
let config = Config {
pin: Pin::new([1, 1, 1, 2, 2, 3, 3, 3])?,
name: "Acme Air Purifier".into(),
device_id: MacAddress::from([10, 20, 30, 40, 50, 60]),
category: AccessoryCategory::AirPurifier,
..Default::default()
};
storage.save_config(&config).await?;
config
},
};
let server = IpServer::new(config, storage).await?;
server.add_accessory(air_purifier).await?;
let handle = server.run_handle();
std::env::set_var("RUST_LOG", "hap=debug");
env_logger::init();
handle.await
}
================================================
FILE: examples/air_quality_sensor.rs
================================================
use tokio;
use hap::{
accessory::{air_quality_sensor::AirQualitySensorAccessory, AccessoryCategory, AccessoryInformation},
server::{IpServer, Server},
storage::{FileStorage, Storage},
Config,
MacAddress,
Pin,
Result,
};
#[tokio::main]
async fn main() -> Result<()> {
let air_quality_sensor = AirQualitySensorAccessory::new(1, AccessoryInformation {
name: "Acme Air Quality Sensor".into(),
..Default::default()
})?;
let mut storage = FileStorage::current_dir().await?;
let config = match storage.load_config().await {
Ok(mut config) => {
config.redetermine_local_ip();
storage.save_config(&config).await?;
config
},
Err(_) => {
let config = Config {
pin: Pin::new([1, 1, 1, 2, 2, 3, 3, 3])?,
name: "Acme Air Quality Sensor".into(),
device_id: MacAddress::from([10, 20, 30, 40, 50, 60]),
category: AccessoryCategory::Sensor,
..Default::default()
};
storage.save_config(&config).await?;
config
},
};
let server = IpServer::new(config, storage).await?;
server.add_accessory(air_quality_sensor).await?;
let handle = server.run_handle();
std::env::set_var("RUST_LOG", "hap=debug");
env_logger::init();
handle.await
}
================================================
FILE: examples/async_callbacks.rs
================================================
use tokio;
use hap::{
accessory::{lightbulb::LightbulbAccessory, AccessoryCategory, AccessoryInformation},
characteristic::AsyncCharacteristicCallbacks,
futures::future::FutureExt,
server::{IpServer, Server},
storage::{FileStorage, Storage},
Config,
MacAddress,
Pin,
Result,
};
#[tokio::main]
async fn main() -> Result<()> {
let mut lightbulb = LightbulbAccessory::new(1, AccessoryInformation {
name: "Acme Lightbulb".into(),
..Default::default()
})?;
lightbulb.lightbulb.power_state.on_read_async(Some(|| {
async {
println!("power_state characteristic read");
Ok(None)
}
.boxed()
}));
lightbulb
.lightbulb
.power_state
.on_update_async(Some(|current_val: bool, new_val: bool| {
async move {
println!("power_state characteristic updated from {} to {}", current_val, new_val);
Ok(())
}
.boxed()
}));
let mut storage = FileStorage::current_dir().await?;
let config = match storage.load_config().await {
Ok(mut config) => {
config.redetermine_local_ip();
storage.save_config(&config).await?;
config
},
Err(_) => {
let config = Config {
pin: Pin::new([1, 1, 1, 2, 2, 3, 3, 3])?,
name: "Acme Lightbulb".into(),
device_id: MacAddress::from([10, 20, 30, 40, 50, 60]),
category: AccessoryCategory::Lightbulb,
..Default::default()
};
storage.save_config(&config).await?;
config
},
};
let server = IpServer::new(config, storage).await?;
server.add_accessory(lightbulb).await?;
let handle = server.run_handle();
std::env::set_var("RUST_LOG", "hap=debug");
env_logger::init();
handle.await
}
================================================
FILE: examples/bridged_accessories.rs
================================================
use tokio;
use hap::{
accessory::{bridge::BridgeAccessory, lightbulb::LightbulbAccessory, AccessoryCategory, AccessoryInformation},
characteristic::CharacteristicCallbacks,
server::{IpServer, Server},
storage::{FileStorage, Storage},
Config,
MacAddress,
Pin,
Result,
};
#[tokio::main]
async fn main() -> Result<()> {
let bridge = BridgeAccessory::new(1, AccessoryInformation {
name: "Acme Bridge".into(),
..Default::default()
})?;
let mut lightbulb_1 = LightbulbAccessory::new(2, AccessoryInformation {
name: "Lightbulb 1".into(),
..Default::default()
})?;
let mut lightbulb_2 = LightbulbAccessory::new(3, AccessoryInformation {
name: "Lightbulb 2".into(),
..Default::default()
})?;
let mut lightbulb_3 = LightbulbAccessory::new(4, AccessoryInformation {
name: "Lightbulb 3".into(),
..Default::default()
})?;
lightbulb_1
.lightbulb
.power_state
.on_update(Some(|current_val: &bool, new_val: &bool| {
println!(
"Lightbulb 1: power_state characteristic updated from {} to {}",
current_val, new_val
);
Ok(())
}));
lightbulb_2
.lightbulb
.power_state
.on_update(Some(|current_val: &bool, new_val: &bool| {
println!(
"Lightbulb 2: power_state
gitextract_ilaxg926/
├── .github/
│ └── workflows/
│ └── ci.yml
├── .gitignore
├── Cargo.toml
├── LICENSE-APACHE
├── LICENSE-MIT
├── README.md
├── codegen/
│ ├── Cargo.toml
│ ├── gen/
│ │ ├── README.md
│ │ └── system.json
│ └── src/
│ └── main.rs
├── examples/
│ ├── adding_accessories_dynamically.rs
│ ├── air_purifier.rs
│ ├── air_quality_sensor.rs
│ ├── async_callbacks.rs
│ ├── bridged_accessories.rs
│ ├── callbacks.rs
│ ├── carbon_dioxide_sensor.rs
│ ├── carbon_monoxide_sensor.rs
│ ├── contact_sensor.rs
│ ├── cooler.rs
│ ├── custom_characteristics_services_accessories.rs
│ ├── custom_multi_sensor.rs
│ ├── dehumidifier.rs
│ ├── door.rs
│ ├── fan.rs
│ ├── fan_v2.rs
│ ├── faucet.rs
│ ├── garage_door_opener.rs
│ ├── heater.rs
│ ├── humidifier.rs
│ ├── humidity_sensor.rs
│ ├── irrigation_system.rs
│ ├── leak_sensor.rs
│ ├── light_sensor.rs
│ ├── lightbulb.rs
│ ├── lock.rs
│ ├── motion_sensor.rs
│ ├── occupancy_sensor.rs
│ ├── outlet.rs
│ ├── security_system.rs
│ ├── setting_values_after_server_start.rs
│ ├── shower_head.rs
│ ├── smart_speaker.rs
│ ├── smoke_sensor.rs
│ ├── stateful_programmable_switch.rs
│ ├── stateless_programmable_switch.rs
│ ├── storing_arbitrary_bytes.rs
│ ├── switch.rs
│ ├── television.rs
│ ├── temperature_sensor.rs
│ ├── thermostat.rs
│ ├── wi_fi_router.rs
│ ├── wi_fi_satellite.rs
│ ├── window.rs
│ └── window_covering.rs
├── rls.toml
├── rustfmt.toml
└── src/
├── accessory/
│ ├── category.rs
│ ├── defined/
│ │ ├── bridge.rs
│ │ ├── faucet.rs
│ │ ├── heater_cooler.rs
│ │ ├── irrigation_system.rs
│ │ ├── lightbulb.rs
│ │ ├── lock.rs
│ │ ├── mod.rs
│ │ ├── shower_head.rs
│ │ └── television.rs
│ ├── generated/
│ │ ├── air_purifier.rs
│ │ ├── air_quality_sensor.rs
│ │ ├── carbon_dioxide_sensor.rs
│ │ ├── carbon_monoxide_sensor.rs
│ │ ├── contact_sensor.rs
│ │ ├── door.rs
│ │ ├── fan.rs
│ │ ├── fan_v2.rs
│ │ ├── garage_door_opener.rs
│ │ ├── humidifier_dehumidifier.rs
│ │ ├── humidity_sensor.rs
│ │ ├── leak_sensor.rs
│ │ ├── light_sensor.rs
│ │ ├── mod.rs
│ │ ├── motion_sensor.rs
│ │ ├── occupancy_sensor.rs
│ │ ├── outlet.rs
│ │ ├── security_system.rs
│ │ ├── smart_speaker.rs
│ │ ├── smoke_sensor.rs
│ │ ├── stateful_programmable_switch.rs
│ │ ├── stateless_programmable_switch.rs
│ │ ├── switch.rs
│ │ ├── temperature_sensor.rs
│ │ ├── thermostat.rs
│ │ ├── wi_fi_router.rs
│ │ ├── wi_fi_satellite.rs
│ │ ├── window.rs
│ │ └── window_covering.rs
│ └── mod.rs
├── characteristic/
│ ├── generated/
│ │ ├── access_code_control_point.rs
│ │ ├── access_code_supported_configuration.rs
│ │ ├── access_control_level.rs
│ │ ├── accessory_flags.rs
│ │ ├── accessory_identifier.rs
│ │ ├── active.rs
│ │ ├── active_identifier.rs
│ │ ├── activity_interval.rs
│ │ ├── administrator_only_access.rs
│ │ ├── air_particulate_density.rs
│ │ ├── air_particulate_size.rs
│ │ ├── airplay_enable.rs
│ │ ├── application_matching_identifier.rs
│ │ ├── asset_update_readiness.rs
│ │ ├── audio_feedback.rs
│ │ ├── battery_level.rs
│ │ ├── brightness.rs
│ │ ├── button_event.rs
│ │ ├── camera_operating_mode_indicator.rs
│ │ ├── carbon_dioxide_detected.rs
│ │ ├── carbon_dioxide_level.rs
│ │ ├── carbon_dioxide_peak_level.rs
│ │ ├── carbon_monoxide_detected.rs
│ │ ├── carbon_monoxide_level.rs
│ │ ├── carbon_monoxide_peak_level.rs
│ │ ├── cca_energy_detect_threshold.rs
│ │ ├── cca_signal_detect_threshold.rs
│ │ ├── characteristic_value_active_transition_count.rs
│ │ ├── characteristic_value_transition_control.rs
│ │ ├── charging_state.rs
│ │ ├── closed_captions.rs
│ │ ├── cloud_relay_control_point.rs
│ │ ├── cloud_relay_current_state.rs
│ │ ├── cloud_relay_enable_status.rs
│ │ ├── color_temperature.rs
│ │ ├── configuration_state.rs
│ │ ├── configured_name.rs
│ │ ├── contact_sensor_state.rs
│ │ ├── cooling_threshold_temperature.rs
│ │ ├── current_air_purifier_state.rs
│ │ ├── current_air_quality.rs
│ │ ├── current_door_state.rs
│ │ ├── current_fan_state.rs
│ │ ├── current_heater_cooler_state.rs
│ │ ├── current_heating_cooling_state.rs
│ │ ├── current_horizontal_tilt_angle.rs
│ │ ├── current_humidifier_dehumidifier_state.rs
│ │ ├── current_light_level.rs
│ │ ├── current_media_state.rs
│ │ ├── current_position.rs
│ │ ├── current_relative_humidity.rs
│ │ ├── current_slat_state.rs
│ │ ├── current_temperature.rs
│ │ ├── current_tilt_angle.rs
│ │ ├── current_transport.rs
│ │ ├── current_vertical_tilt_angle.rs
│ │ ├── current_visibility_state.rs
│ │ ├── current_water_level.rs
│ │ ├── data_stream_hap_transport.rs
│ │ ├── data_stream_hap_transport_interrupt.rs
│ │ ├── digital_zoom.rs
│ │ ├── display_order.rs
│ │ ├── event_retransmission_maximum.rs
│ │ ├── event_snapshots_active.rs
│ │ ├── event_transmission_counters.rs
│ │ ├── filter_change_indication.rs
│ │ ├── filter_life_level.rs
│ │ ├── filter_reset_change_indication.rs
│ │ ├── firmware_revision.rs
│ │ ├── firmware_update_readiness.rs
│ │ ├── firmware_update_status.rs
│ │ ├── hardware_finish.rs
│ │ ├── hardware_revision.rs
│ │ ├── heart_beat.rs
│ │ ├── heating_threshold_temperature.rs
│ │ ├── hold_position.rs
│ │ ├── homekit_camera_active.rs
│ │ ├── hue.rs
│ │ ├── identifier.rs
│ │ ├── identify.rs
│ │ ├── image_mirroring.rs
│ │ ├── image_rotation.rs
│ │ ├── in_use.rs
│ │ ├── input_device_type.rs
│ │ ├── input_source_type.rs
│ │ ├── is_configured.rs
│ │ ├── label_index.rs
│ │ ├── label_namespace.rs
│ │ ├── leak_detected.rs
│ │ ├── list_pairings.rs
│ │ ├── lock_control_point.rs
│ │ ├── lock_current_state.rs
│ │ ├── lock_last_known_action.rs
│ │ ├── lock_management_auto_security_timeout.rs
│ │ ├── lock_physical_controls.rs
│ │ ├── lock_target_state.rs
│ │ ├── logs.rs
│ │ ├── mac_retransmission_maximum.rs
│ │ ├── mac_transmission_counters.rs
│ │ ├── managed_network_enable.rs
│ │ ├── manually_disabled.rs
│ │ ├── manufacturer.rs
│ │ ├── maximum_transmit_power.rs
│ │ ├── mod.rs
│ │ ├── model.rs
│ │ ├── motion_detected.rs
│ │ ├── multifunction_button.rs
│ │ ├── mute.rs
│ │ ├── name.rs
│ │ ├── network_access_violation_control.rs
│ │ ├── network_client_control.rs
│ │ ├── network_client_status_control.rs
│ │ ├── nfc_access_control_point.rs
│ │ ├── nfc_access_supported_configuration.rs
│ │ ├── night_vision.rs
│ │ ├── nitrogen_dioxide_density.rs
│ │ ├── obstruction_detected.rs
│ │ ├── occupancy_detected.rs
│ │ ├── operating_state_response.rs
│ │ ├── optical_zoom.rs
│ │ ├── outlet_in_use.rs
│ │ ├── ozone_density.rs
│ │ ├── pair_setup.rs
│ │ ├── pair_verify.rs
│ │ ├── pairing_features.rs
│ │ ├── password_setting.rs
│ │ ├── periodic_snapshots_active.rs
│ │ ├── picture_mode.rs
│ │ ├── ping.rs
│ │ ├── pm10_density.rs
│ │ ├── pm2_5_density.rs
│ │ ├── position_state.rs
│ │ ├── power_mode_selection.rs
│ │ ├── power_state.rs
│ │ ├── product_data.rs
│ │ ├── program_mode.rs
│ │ ├── programmable_switch_event.rs
│ │ ├── programmable_switch_output_state.rs
│ │ ├── received_signal_strength_indication.rs
│ │ ├── receiver_sensitivity.rs
│ │ ├── recording_audio_active.rs
│ │ ├── relative_humidity_dehumidifier_threshold.rs
│ │ ├── relative_humidity_humidifier_threshold.rs
│ │ ├── remaining_duration.rs
│ │ ├── remote_key.rs
│ │ ├── rotation_direction.rs
│ │ ├── rotation_speed.rs
│ │ ├── router_status.rs
│ │ ├── saturation.rs
│ │ ├── security_system_alarm_type.rs
│ │ ├── security_system_current_state.rs
│ │ ├── security_system_target_state.rs
│ │ ├── selected_audio_stream_configuration.rs
│ │ ├── selected_camera_recording_configuration.rs
│ │ ├── selected_diagnostics_modes.rs
│ │ ├── selected_stream_configuration.rs
│ │ ├── serial_number.rs
│ │ ├── service_signature.rs
│ │ ├── set_duration.rs
│ │ ├── setup_data_stream_transport.rs
│ │ ├── setup_endpoint.rs
│ │ ├── setup_transfer_transport.rs
│ │ ├── signal_to_noise_ratio.rs
│ │ ├── siri_enable.rs
│ │ ├── siri_endpoint_session_status.rs
│ │ ├── siri_engine_version.rs
│ │ ├── siri_input_type.rs
│ │ ├── siri_light_on_use.rs
│ │ ├── siri_listening.rs
│ │ ├── siri_touch_to_use.rs
│ │ ├── slat_type.rs
│ │ ├── sleep_discovery_mode.rs
│ │ ├── sleep_interval.rs
│ │ ├── smoke_detected.rs
│ │ ├── software_revision.rs
│ │ ├── staged_firmware_version.rs
│ │ ├── status_active.rs
│ │ ├── status_fault.rs
│ │ ├── status_jammed.rs
│ │ ├── status_low_battery.rs
│ │ ├── status_tampered.rs
│ │ ├── streaming_status.rs
│ │ ├── sulphur_dioxide_density.rs
│ │ ├── supported_asset_types.rs
│ │ ├── supported_audio_recording_configuration.rs
│ │ ├── supported_audio_stream_configuration.rs
│ │ ├── supported_camera_recording_configuration.rs
│ │ ├── supported_characteristic_value_transition_configuration.rs
│ │ ├── supported_data_stream_transport_configuration.rs
│ │ ├── supported_diagnostics_modes.rs
│ │ ├── supported_diagnostics_snapshot.rs
│ │ ├── supported_firmware_update_configuration.rs
│ │ ├── supported_router_configuration.rs
│ │ ├── supported_rtp_configuration.rs
│ │ ├── supported_target_configuration.rs
│ │ ├── supported_transfer_transport_configuration.rs
│ │ ├── supported_video_recording_configuration.rs
│ │ ├── supported_video_stream_configuration.rs
│ │ ├── swing_mode.rs
│ │ ├── target_air_purifier_state.rs
│ │ ├── target_door_state.rs
│ │ ├── target_fan_state.rs
│ │ ├── target_heater_cooler_state.rs
│ │ ├── target_heating_cooling_state.rs
│ │ ├── target_horizontal_tilt_angle.rs
│ │ ├── target_humidifier_dehumidifier_state.rs
│ │ ├── target_list_configuration.rs
│ │ ├── target_media_state.rs
│ │ ├── target_position.rs
│ │ ├── target_relative_humidity.rs
│ │ ├── target_temperature.rs
│ │ ├── target_tilt_angle.rs
│ │ ├── target_vertical_tilt_angle.rs
│ │ ├── target_visibility_state.rs
│ │ ├── temperature_display_units.rs
│ │ ├── third_party_camera_active.rs
│ │ ├── thread_control_point.rs
│ │ ├── thread_node_capabilities.rs
│ │ ├── thread_openthread_version.rs
│ │ ├── thread_status.rs
│ │ ├── transmit_power.rs
│ │ ├── valve_type.rs
│ │ ├── version.rs
│ │ ├── video_analysis_active.rs
│ │ ├── volatile_organic_compound_density.rs
│ │ ├── volume.rs
│ │ ├── volume_control_type.rs
│ │ ├── volume_selector.rs
│ │ ├── wake_configuration.rs
│ │ ├── wan_configuration_list.rs
│ │ ├── wan_status_list.rs
│ │ ├── wi_fi_capabilities.rs
│ │ ├── wi_fi_configuration_control.rs
│ │ └── wi_fi_satellite_status.rs
│ └── mod.rs
├── config.rs
├── error.rs
├── event.rs
├── hap_type.rs
├── lib.rs
├── pairing.rs
├── pin.rs
├── pointer.rs
├── server/
│ ├── ip.rs
│ └── mod.rs
├── service/
│ ├── generated/
│ │ ├── access_code.rs
│ │ ├── access_control.rs
│ │ ├── accessory_information.rs
│ │ ├── accessory_metrics.rs
│ │ ├── accessory_runtime_information.rs
│ │ ├── air_purifier.rs
│ │ ├── air_quality_sensor.rs
│ │ ├── asset_update.rs
│ │ ├── assistant.rs
│ │ ├── audio_stream_management.rs
│ │ ├── battery.rs
│ │ ├── camera_operating_mode.rs
│ │ ├── camera_recording_management.rs
│ │ ├── camera_stream_management.rs
│ │ ├── carbon_dioxide_sensor.rs
│ │ ├── carbon_monoxide_sensor.rs
│ │ ├── cloud_relay.rs
│ │ ├── contact_sensor.rs
│ │ ├── data_stream_transport_management.rs
│ │ ├── diagnostics.rs
│ │ ├── door.rs
│ │ ├── doorbell.rs
│ │ ├── fan.rs
│ │ ├── fan_v2.rs
│ │ ├── faucet.rs
│ │ ├── filter_maintenance.rs
│ │ ├── garage_door_opener.rs
│ │ ├── heater_cooler.rs
│ │ ├── humidifier_dehumidifier.rs
│ │ ├── humidity_sensor.rs
│ │ ├── input_source.rs
│ │ ├── irrigation_system.rs
│ │ ├── label.rs
│ │ ├── leak_sensor.rs
│ │ ├── light_sensor.rs
│ │ ├── lightbulb.rs
│ │ ├── lock_management.rs
│ │ ├── lock_mechanism.rs
│ │ ├── microphone.rs
│ │ ├── mod.rs
│ │ ├── motion_sensor.rs
│ │ ├── nfc_access_service.rs
│ │ ├── occupancy_sensor.rs
│ │ ├── outlet.rs
│ │ ├── pairing.rs
│ │ ├── power_management.rs
│ │ ├── protocol_information.rs
│ │ ├── security_system.rs
│ │ ├── siri.rs
│ │ ├── siri_endpoint.rs
│ │ ├── slats.rs
│ │ ├── smart_speaker.rs
│ │ ├── smoke_sensor.rs
│ │ ├── speaker.rs
│ │ ├── stateful_programmable_switch.rs
│ │ ├── stateless_programmable_switch.rs
│ │ ├── switch.rs
│ │ ├── target_control.rs
│ │ ├── target_control_management.rs
│ │ ├── television.rs
│ │ ├── temperature_sensor.rs
│ │ ├── thermostat.rs
│ │ ├── thread_transport.rs
│ │ ├── transfer_transport_management.rs
│ │ ├── valve.rs
│ │ ├── wi_fi_router.rs
│ │ ├── wi_fi_satellite.rs
│ │ ├── wi_fi_transport.rs
│ │ ├── window.rs
│ │ └── window_covering.rs
│ └── mod.rs
├── storage/
│ ├── accessory_database.rs
│ ├── file_storage.rs
│ ├── mod.rs
│ └── storage.rs
├── tlv.rs
└── transport/
├── bonjour.rs
├── http/
│ ├── handler/
│ │ ├── accessories.rs
│ │ ├── characteristics.rs
│ │ ├── identify.rs
│ │ ├── mod.rs
│ │ ├── pair_setup.rs
│ │ ├── pair_verify.rs
│ │ └── pairings.rs
│ ├── mod.rs
│ └── server.rs
├── mdns.rs
├── mod.rs
└── tcp.rs
Showing preview only (1,223K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (11604 symbols across 415 files)
FILE: codegen/src/main.rs
type SystemMetadata (line 11) | struct SystemMetadata {
type SystemPlistDictionary (line 21) | struct SystemPlistDictionary {
type HomeKit (line 35) | struct HomeKit {
type HomeKitCategory (line 41) | struct HomeKitCategory {
type Hap (line 51) | struct Hap {
type HapCharacteristic (line 63) | struct HapCharacteristic {
type HapService (line 85) | struct HapService {
type HapServiceCharacteristicRelation (line 95) | struct HapServiceCharacteristicRelation {
type HapProperty (line 103) | struct HapProperty {
type Assistant (line 111) | struct Assistant {
type AssistantCharacteristic (line 117) | struct AssistantCharacteristic {
type RenderMetadata (line 133) | struct RenderMetadata {
method from (line 147) | fn from(v: SystemMetadata) -> Self {
function if_eq_helper (line 209) | fn if_eq_helper<'reg, 'rc>(
function trim_helper (line 225) | fn trim_helper(
function file_name_helper (line 240) | fn file_name_helper(
function type_helper (line 255) | fn type_helper(
function format_helper (line 306) | fn format_helper(
function unit_helper (line 357) | fn unit_helper(
function category_helper (line 400) | fn category_helper(
function uuid_helper (line 467) | fn uuid_helper(
function in_values_helper (line 481) | fn in_values_helper(
function out_values_helper (line 505) | fn out_values_helper(
function in_values_enum_helper (line 529) | fn in_values_enum_helper(
function out_values_enum_helper (line 569) | fn out_values_enum_helper(
function perms_helper (line 609) | fn perms_helper(
function float_helper (line 641) | fn float_helper(
function array_length_helper (line 655) | fn array_length_helper(
function shorten_uuid (line 667) | fn shorten_uuid(id: &str) -> String { id.trim_start_matches('0').to_owne...
function snake_case_helper (line 669) | fn snake_case_helper(
function pascal_case_helper (line 686) | fn pascal_case_helper(
constant NON_IDIOMATIC_SERVICES (line 1300) | const NON_IDIOMATIC_SERVICES: &'static [&'static str] = &[
constant SKIP_EXAMPLE_GENERATION (line 1346) | const SKIP_EXAMPLE_GENERATION: &'static [&'static str] = &["humidifier-d...
constant MANUALLY_GENERATED_EXAMPLES (line 1349) | const MANUALLY_GENERATED_EXAMPLES: &'static [&'static str] = &[
function main (line 1373) | fn main() {
FILE: examples/adding_accessories_dynamically.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/air_purifier.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/air_quality_sensor.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/async_callbacks.rs
function main (line 16) | async fn main() -> Result<()> {
FILE: examples/bridged_accessories.rs
function main (line 15) | async fn main() -> Result<()> {
FILE: examples/callbacks.rs
function main (line 15) | async fn main() -> Result<()> {
FILE: examples/carbon_dioxide_sensor.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/carbon_monoxide_sensor.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/contact_sensor.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/cooler.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/custom_characteristics_services_accessories.rs
type FooService (line 25) | pub struct FooService {
method serialize (line 90) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Resu...
method get_id (line 44) | fn get_id(&self) -> u64 { self.id }
method set_id (line 46) | fn set_id(&mut self, id: u64) { self.id = id; }
method get_type (line 48) | fn get_type(&self) -> HapType { self.hap_type }
method set_type (line 50) | fn set_type(&mut self, hap_type: HapType) { self.hap_type = hap_type; }
method get_hidden (line 52) | fn get_hidden(&self) -> bool { self.hidden }
method set_hidden (line 54) | fn set_hidden(&mut self, hidden: bool) { self.hidden = hidden; }
method get_primary (line 56) | fn get_primary(&self) -> bool { self.primary }
method set_primary (line 58) | fn set_primary(&mut self, primary: bool) { self.primary = primary; }
method get_linked_services (line 60) | fn get_linked_services(&self) -> Vec<u64> { self.linked_services.clone() }
method set_linked_services (line 62) | fn set_linked_services(&mut self, linked_services: Vec<u64>) { self.link...
method get_characteristic (line 64) | fn get_characteristic(&self, hap_type: HapType) -> Option<&dyn HapCharac...
method get_mut_characteristic (line 73) | fn get_mut_characteristic(&mut self, hap_type: HapType) -> Option<&mut d...
method get_characteristics (line 82) | fn get_characteristics(&self) -> Vec<&dyn HapCharacteristic> { vec![&sel...
method get_mut_characteristics (line 84) | fn get_mut_characteristics(&mut self) -> Vec<&mut dyn HapCharacteristic> {
type FooAccessory (line 106) | pub struct FooAccessory {
method get_id (line 117) | fn get_id(&self) -> u64 { self.id }
method set_id (line 119) | fn set_id(&mut self, id: u64) { self.id = id; }
method get_service (line 121) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 130) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 139) | fn get_services(&self) -> Vec<&dyn HapService> { vec![&self.accessory_in...
method get_mut_services (line 141) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> { vec![&mut s...
method serialize (line 145) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
function main (line 154) | async fn main() -> Result<()> {
FILE: examples/custom_multi_sensor.rs
type MultiSensorAccessory (line 26) | pub struct MultiSensorAccessory {
method get_id (line 39) | fn get_id(&self) -> u64 { self.id }
method set_id (line 41) | fn set_id(&mut self, id: u64) { self.id = id; }
method get_service (line 43) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 52) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 61) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 69) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 79) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
function main (line 88) | async fn main() -> Result<()> {
FILE: examples/dehumidifier.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/door.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/fan.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/fan_v2.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/faucet.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/garage_door_opener.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/heater.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/humidifier.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/humidity_sensor.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/irrigation_system.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/leak_sensor.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/light_sensor.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/lightbulb.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/lock.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/motion_sensor.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/occupancy_sensor.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/outlet.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/security_system.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/setting_values_after_server_start.rs
function main (line 16) | async fn main() -> Result<()> {
FILE: examples/shower_head.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/smart_speaker.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/smoke_sensor.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/stateful_programmable_switch.rs
function main (line 18) | async fn main() -> Result<()> {
FILE: examples/stateless_programmable_switch.rs
function main (line 18) | async fn main() -> Result<()> {
FILE: examples/storing_arbitrary_bytes.rs
type LightbulbState (line 18) | struct LightbulbState {
function main (line 23) | async fn main() -> Result<()> {
FILE: examples/switch.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/television.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/temperature_sensor.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/thermostat.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/wi_fi_router.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/wi_fi_satellite.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/window.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: examples/window_covering.rs
function main (line 14) | async fn main() -> Result<()> {
FILE: src/accessory/category.rs
type AccessoryCategory (line 7) | pub enum AccessoryCategory {
FILE: src/accessory/defined/bridge.rs
type BridgeAccessory (line 12) | pub struct BridgeAccessory {
method new (line 22) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 33) | fn get_id(&self) -> u64 { self.id }
method set_id (line 35) | fn set_id(&mut self, id: u64) { self.id = id; }
method get_service (line 37) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 46) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 55) | fn get_services(&self) -> Vec<&dyn HapService> { vec![&self.accessory_in...
method get_mut_services (line 57) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> { vec![&mut s...
method serialize (line 61) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/defined/faucet.rs
type FaucetAccessory (line 14) | pub struct FaucetAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 43) | fn get_id(&self) -> u64 { self.id }
method set_id (line 45) | fn set_id(&mut self, id: u64) { self.id = id; }
method get_service (line 47) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 56) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 65) | fn get_services(&self) -> Vec<&dyn HapService> { vec![&self.accessory_in...
method get_mut_services (line 67) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 73) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/defined/heater_cooler.rs
type HeaterCoolerAccessory (line 12) | pub struct HeaterCoolerAccessory {
method new (line 24) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 39) | fn get_id(&self) -> u64 { self.id }
method set_id (line 41) | fn set_id(&mut self, id: u64) { self.id = id; }
method get_service (line 43) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 52) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 61) | fn get_services(&self) -> Vec<&dyn HapService> { vec![&self.accessory_in...
method get_mut_services (line 63) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 69) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/defined/irrigation_system.rs
type IrrigationSystemAccessory (line 14) | pub struct IrrigationSystemAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 44) | fn get_id(&self) -> u64 { self.id }
method set_id (line 46) | fn set_id(&mut self, id: u64) { self.id = id; }
method get_service (line 48) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 57) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 66) | fn get_services(&self) -> Vec<&dyn HapService> { vec![&self.accessory_in...
method get_mut_services (line 68) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 74) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/defined/lightbulb.rs
type LightbulbAccessory (line 14) | pub struct LightbulbAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 46) | fn get_id(&self) -> u64 { self.id }
method set_id (line 48) | fn set_id(&mut self, id: u64) { self.id = id; }
method get_service (line 50) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 59) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 68) | fn get_services(&self) -> Vec<&dyn HapService> { vec![&self.accessory_in...
method get_mut_services (line 70) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 76) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/defined/lock.rs
type LockAccessory (line 17) | pub struct LockAccessory {
method new (line 31) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 55) | fn get_id(&self) -> u64 { self.id }
method set_id (line 57) | fn set_id(&mut self, id: u64) { self.id = id; }
method get_service (line 59) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 68) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 77) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 81) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 91) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/defined/shower_head.rs
type ShowerHeadAccessory (line 14) | pub struct ShowerHeadAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 43) | fn get_id(&self) -> u64 { self.id }
method set_id (line 45) | fn set_id(&mut self, id: u64) { self.id = id; }
method get_service (line 47) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 56) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 65) | fn get_services(&self) -> Vec<&dyn HapService> { vec![&self.accessory_in...
method get_mut_services (line 67) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 73) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/defined/television.rs
type TelevisionAccessory (line 17) | pub struct TelevisionAccessory {
method new (line 31) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 54) | fn get_id(&self) -> u64 { self.id }
method set_id (line 56) | fn set_id(&mut self, id: u64) { self.id = id; }
method get_service (line 58) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 67) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 76) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 80) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 86) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/air_purifier.rs
type AirPurifierAccessory (line 14) | pub struct AirPurifierAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/air_quality_sensor.rs
type AirQualitySensorAccessory (line 14) | pub struct AirQualitySensorAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/carbon_dioxide_sensor.rs
type CarbonDioxideSensorAccessory (line 14) | pub struct CarbonDioxideSensorAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/carbon_monoxide_sensor.rs
type CarbonMonoxideSensorAccessory (line 14) | pub struct CarbonMonoxideSensorAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/contact_sensor.rs
type ContactSensorAccessory (line 14) | pub struct ContactSensorAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/door.rs
type DoorAccessory (line 14) | pub struct DoorAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/fan.rs
type FanAccessory (line 14) | pub struct FanAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/fan_v2.rs
type FanV2Accessory (line 14) | pub struct FanV2Accessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/garage_door_opener.rs
type GarageDoorOpenerAccessory (line 14) | pub struct GarageDoorOpenerAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/humidifier_dehumidifier.rs
type HumidifierDehumidifierAccessory (line 14) | pub struct HumidifierDehumidifierAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/humidity_sensor.rs
type HumiditySensorAccessory (line 14) | pub struct HumiditySensorAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/leak_sensor.rs
type LeakSensorAccessory (line 14) | pub struct LeakSensorAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/light_sensor.rs
type LightSensorAccessory (line 14) | pub struct LightSensorAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/motion_sensor.rs
type MotionSensorAccessory (line 14) | pub struct MotionSensorAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/occupancy_sensor.rs
type OccupancySensorAccessory (line 14) | pub struct OccupancySensorAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/outlet.rs
type OutletAccessory (line 14) | pub struct OutletAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/security_system.rs
type SecuritySystemAccessory (line 14) | pub struct SecuritySystemAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/smart_speaker.rs
type SmartSpeakerAccessory (line 14) | pub struct SmartSpeakerAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/smoke_sensor.rs
type SmokeSensorAccessory (line 14) | pub struct SmokeSensorAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/stateful_programmable_switch.rs
type StatefulProgrammableSwitchAccessory (line 14) | pub struct StatefulProgrammableSwitchAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/stateless_programmable_switch.rs
type StatelessProgrammableSwitchAccessory (line 14) | pub struct StatelessProgrammableSwitchAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/switch.rs
type SwitchAccessory (line 14) | pub struct SwitchAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/temperature_sensor.rs
type TemperatureSensorAccessory (line 14) | pub struct TemperatureSensorAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/thermostat.rs
type ThermostatAccessory (line 14) | pub struct ThermostatAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/wi_fi_router.rs
type WiFiRouterAccessory (line 14) | pub struct WiFiRouterAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/wi_fi_satellite.rs
type WiFiSatelliteAccessory (line 14) | pub struct WiFiSatelliteAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/window.rs
type WindowAccessory (line 14) | pub struct WindowAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/generated/window_covering.rs
type WindowCoveringAccessory (line 14) | pub struct WindowCoveringAccessory {
method new (line 26) | pub fn new(id: u64, information: AccessoryInformation) -> Result<Self> {
method get_id (line 41) | fn get_id(&self) -> u64 {
method set_id (line 45) | fn set_id(&mut self, id: u64) {
method get_service (line 49) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService> {
method get_mut_service (line 58) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn HapS...
method get_services (line 67) | fn get_services(&self) -> Vec<&dyn HapService> {
method get_mut_services (line 74) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService> {
method serialize (line 83) | fn serialize<S: Serializer>(&self, serializer: S) -> std::result::Result...
FILE: src/accessory/mod.rs
type HapAccessory (line 29) | pub trait HapAccessory: HapAccessorySetup + erased_serde::Serialize + Se...
method get_id (line 31) | fn get_id(&self) -> u64;
method set_id (line 33) | fn set_id(&mut self, id: u64);
method get_service (line 35) | fn get_service(&self, hap_type: HapType) -> Option<&dyn HapService>;
method get_mut_service (line 37) | fn get_mut_service(&mut self, hap_type: HapType) -> Option<&mut dyn Ha...
method get_services (line 39) | fn get_services(&self) -> Vec<&dyn HapService>;
method get_mut_services (line 41) | fn get_mut_services(&mut self) -> Vec<&mut dyn HapService>;
type HapAccessorySetup (line 48) | pub trait HapAccessorySetup {
method set_event_emitter_on_characteristics (line 50) | fn set_event_emitter_on_characteristics(&mut self, event_emitter: Opti...
method set_event_emitter_on_characteristics (line 57) | fn set_event_emitter_on_characteristics(&mut self, event_emitter: Opti...
type AccessoryInformation (line 86) | pub struct AccessoryInformation {
method to_service (line 138) | pub fn to_service(self, id: u64, accessory_id: u64) -> Result<Accessor...
method default (line 216) | fn default() -> Self {
FILE: src/characteristic/generated/access_code_control_point.rs
type AccessCodeControlPointCharacteristic (line 30) | pub struct AccessCodeControlPointCharacteristic(Characteristic<Vec<u8>>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 160) | fn on_read(&mut self, f: Option<impl OnReadFn<Vec<u8>>>) { Characteris...
method on_update (line 162) | fn on_update(&mut self, f: Option<impl OnUpdateFn<Vec<u8>>>) { Charact...
method on_read_async (line 166) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<Vec<u8>>>) {
method on_update_async (line 170) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<Vec<u8>>>) {
method get_id (line 62) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 64) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 66) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 68) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 70) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 72) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 74) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 76) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 78) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 80) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 84) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 86) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 90) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 92) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 96) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 98) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 100) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 102) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 106) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 108) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 112) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 116) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 120) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 122) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 124) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 126) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 130) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 132) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 136) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 140) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 144) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 146) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 148) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 150) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 154) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/access_code_supported_configuration.rs
type AccessCodeSupportedConfigurationCharacteristic (line 30) | pub struct AccessCodeSupportedConfigurationCharacteristic(Characteristic...
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 159) | fn on_read(&mut self, f: Option<impl OnReadFn<Vec<u8>>>) { Characteris...
method on_update (line 161) | fn on_update(&mut self, f: Option<impl OnUpdateFn<Vec<u8>>>) { Charact...
method on_read_async (line 165) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<Vec<u8>>>) {
method on_update_async (line 169) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<Vec<u8>>>) {
method get_id (line 61) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 63) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 65) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 67) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 69) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 71) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 73) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 75) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 77) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 79) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 83) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 85) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 89) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 91) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 95) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 97) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 99) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 101) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 105) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 107) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 111) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 115) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 119) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 121) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 123) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 125) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 129) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 131) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 135) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 139) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 143) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 145) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 147) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 149) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 153) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/access_control_level.rs
type AccessControlLevelCharacteristic (line 30) | pub struct AccessControlLevelCharacteristic(Characteristic<u16>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 164) | fn on_read(&mut self, f: Option<impl OnReadFn<u16>>) { CharacteristicC...
method on_update (line 166) | fn on_update(&mut self, f: Option<impl OnUpdateFn<u16>>) { Characteris...
method on_read_async (line 170) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<u16>>) {
method on_update_async (line 174) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<u16>>) {
method get_id (line 66) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 68) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 70) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 72) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 74) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 76) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 78) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 80) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 82) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 84) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 88) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 90) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 94) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 96) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 100) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 102) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 104) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 106) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 110) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 112) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 116) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 120) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 124) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 126) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 128) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 130) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 134) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 136) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 140) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 144) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 148) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 150) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 152) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 154) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 158) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/accessory_flags.rs
type AccessoryFlagsCharacteristic (line 30) | pub struct AccessoryFlagsCharacteristic(Characteristic<u32>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 160) | fn on_read(&mut self, f: Option<impl OnReadFn<u32>>) { CharacteristicC...
method on_update (line 162) | fn on_update(&mut self, f: Option<impl OnUpdateFn<u32>>) { Characteris...
method on_read_async (line 166) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<u32>>) {
method on_update_async (line 170) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<u32>>) {
method get_id (line 62) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 64) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 66) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 68) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 70) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 72) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 74) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 76) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 78) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 80) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 84) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 86) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 90) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 92) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 96) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 98) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 100) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 102) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 106) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 108) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 112) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 116) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 120) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 122) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 124) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 126) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 130) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 132) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 136) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 140) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 144) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 146) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 148) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 150) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 154) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/accessory_identifier.rs
type AccessoryIdentifierCharacteristic (line 30) | pub struct AccessoryIdentifierCharacteristic(Characteristic<String>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 159) | fn on_read(&mut self, f: Option<impl OnReadFn<String>>) { Characterist...
method on_update (line 161) | fn on_update(&mut self, f: Option<impl OnUpdateFn<String>>) { Characte...
method on_read_async (line 165) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<String>>) {
method on_update_async (line 169) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<String>>) {
method get_id (line 61) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 63) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 65) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 67) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 69) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 71) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 73) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 75) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 77) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 79) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 83) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 85) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 89) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 91) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 95) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 97) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 99) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 101) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 105) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 107) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 111) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 115) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 119) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 121) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 123) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 125) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 129) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 131) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 135) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 139) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 143) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 145) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 147) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 149) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 153) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/active.rs
type ActiveCharacteristic (line 30) | pub struct ActiveCharacteristic(Characteristic<u8>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 164) | fn on_read(&mut self, f: Option<impl OnReadFn<u8>>) { CharacteristicCa...
method on_update (line 166) | fn on_update(&mut self, f: Option<impl OnUpdateFn<u8>>) { Characterist...
method on_read_async (line 170) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<u8>>) {
method on_update_async (line 174) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<u8>>) {
method get_id (line 66) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 68) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 70) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 72) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 74) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 76) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 78) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 80) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 82) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 84) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 88) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 90) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 94) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 96) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 100) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 102) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 104) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 106) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 110) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 112) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 116) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 120) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 124) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 126) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 128) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 130) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 134) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 136) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 140) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 144) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 148) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 150) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 152) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 154) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 158) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/active_identifier.rs
type ActiveIdentifierCharacteristic (line 30) | pub struct ActiveIdentifierCharacteristic(Characteristic<u32>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 162) | fn on_read(&mut self, f: Option<impl OnReadFn<u32>>) { CharacteristicC...
method on_update (line 164) | fn on_update(&mut self, f: Option<impl OnUpdateFn<u32>>) { Characteris...
method on_read_async (line 168) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<u32>>) {
method on_update_async (line 172) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<u32>>) {
method get_id (line 64) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 66) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 68) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 70) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 72) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 74) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 76) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 78) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 80) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 82) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 86) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 88) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 92) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 94) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 98) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 100) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 102) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 104) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 108) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 110) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 114) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 118) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 122) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 124) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 126) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 128) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 132) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 134) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 138) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 142) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 146) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 148) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 150) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 152) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 156) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/activity_interval.rs
type ActivityIntervalCharacteristic (line 30) | pub struct ActivityIntervalCharacteristic(Characteristic<u32>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 162) | fn on_read(&mut self, f: Option<impl OnReadFn<u32>>) { CharacteristicC...
method on_update (line 164) | fn on_update(&mut self, f: Option<impl OnUpdateFn<u32>>) { Characteris...
method on_read_async (line 168) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<u32>>) {
method on_update_async (line 172) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<u32>>) {
method get_id (line 64) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 66) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 68) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 70) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 72) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 74) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 76) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 78) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 80) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 82) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 86) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 88) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 92) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 94) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 98) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 100) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 102) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 104) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 108) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 110) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 114) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 118) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 122) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 124) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 126) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 128) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 132) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 134) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 138) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 142) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 146) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 148) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 150) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 152) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 156) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/administrator_only_access.rs
type AdministratorOnlyAccessCharacteristic (line 30) | pub struct AdministratorOnlyAccessCharacteristic(Characteristic<bool>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 161) | fn on_read(&mut self, f: Option<impl OnReadFn<bool>>) { Characteristic...
method on_update (line 163) | fn on_update(&mut self, f: Option<impl OnUpdateFn<bool>>) { Characteri...
method on_read_async (line 167) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<bool>>) {
method on_update_async (line 171) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<bool>>) {
method get_id (line 63) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 65) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 67) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 69) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 71) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 73) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 75) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 77) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 79) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 81) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 85) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 87) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 91) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 93) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 97) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 99) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 101) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 103) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 107) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 109) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 113) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 117) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 121) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 123) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 125) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 127) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 131) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 133) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 137) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 141) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 145) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 147) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 149) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 151) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 155) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/air_particulate_density.rs
type AirParticulateDensityCharacteristic (line 30) | pub struct AirParticulateDensityCharacteristic(Characteristic<f32>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 163) | fn on_read(&mut self, f: Option<impl OnReadFn<f32>>) { CharacteristicC...
method on_update (line 165) | fn on_update(&mut self, f: Option<impl OnUpdateFn<f32>>) { Characteris...
method on_read_async (line 169) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<f32>>) {
method on_update_async (line 173) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<f32>>) {
method get_id (line 65) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 67) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 69) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 71) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 73) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 75) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 77) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 79) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 81) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 83) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 87) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 89) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 93) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 95) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 99) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 101) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 103) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 105) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 109) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 111) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 115) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 119) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 123) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 125) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 127) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 129) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 133) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 135) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 139) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 143) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 147) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 149) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 151) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 153) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 157) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/air_particulate_size.rs
type AirParticulateSizeCharacteristic (line 30) | pub struct AirParticulateSizeCharacteristic(Characteristic<u8>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 163) | fn on_read(&mut self, f: Option<impl OnReadFn<u8>>) { CharacteristicCa...
method on_update (line 165) | fn on_update(&mut self, f: Option<impl OnUpdateFn<u8>>) { Characterist...
method on_read_async (line 169) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<u8>>) {
method on_update_async (line 173) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<u8>>) {
method get_id (line 65) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 67) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 69) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 71) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 73) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 75) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 77) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 79) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 81) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 83) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 87) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 89) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 93) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 95) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 99) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 101) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 103) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 105) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 109) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 111) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 115) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 119) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 123) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 125) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 127) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 129) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 133) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 135) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 139) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 143) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 147) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 149) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 151) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 153) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 157) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/airplay_enable.rs
type AirplayEnableCharacteristic (line 30) | pub struct AirplayEnableCharacteristic(Characteristic<u8>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 163) | fn on_read(&mut self, f: Option<impl OnReadFn<u8>>) { CharacteristicCa...
method on_update (line 165) | fn on_update(&mut self, f: Option<impl OnUpdateFn<u8>>) { Characterist...
method on_read_async (line 169) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<u8>>) {
method on_update_async (line 173) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<u8>>) {
method get_id (line 65) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 67) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 69) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 71) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 73) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 75) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 77) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 79) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 81) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 83) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 87) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 89) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 93) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 95) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 99) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 101) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 103) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 105) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 109) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 111) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 115) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 119) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 123) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 125) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 127) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 129) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 133) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 135) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 139) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 143) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 147) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 149) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 151) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 153) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 157) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/application_matching_identifier.rs
type ApplicationMatchingIdentifierCharacteristic (line 30) | pub struct ApplicationMatchingIdentifierCharacteristic(Characteristic<Ve...
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 159) | fn on_read(&mut self, f: Option<impl OnReadFn<Vec<u8>>>) { Characteris...
method on_update (line 161) | fn on_update(&mut self, f: Option<impl OnUpdateFn<Vec<u8>>>) { Charact...
method on_read_async (line 165) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<Vec<u8>>>) {
method on_update_async (line 169) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<Vec<u8>>>) {
method get_id (line 61) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 63) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 65) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 67) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 69) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 71) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 73) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 75) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 77) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 79) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 83) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 85) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 89) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 91) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 95) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 97) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 99) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 101) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 105) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 107) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 111) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 115) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 119) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 121) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 123) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 125) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 129) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 131) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 135) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 139) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 143) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 145) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 147) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 149) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 153) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/asset_update_readiness.rs
type AssetUpdateReadinessCharacteristic (line 30) | pub struct AssetUpdateReadinessCharacteristic(Characteristic<u32>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 160) | fn on_read(&mut self, f: Option<impl OnReadFn<u32>>) { CharacteristicC...
method on_update (line 162) | fn on_update(&mut self, f: Option<impl OnUpdateFn<u32>>) { Characteris...
method on_read_async (line 166) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<u32>>) {
method on_update_async (line 170) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<u32>>) {
method get_id (line 62) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 64) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 66) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 68) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 70) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 72) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 74) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 76) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 78) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 80) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 84) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 86) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 90) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 92) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 96) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 98) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 100) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 102) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 106) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 108) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 112) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 116) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 120) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 122) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 124) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 126) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 130) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 132) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 136) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 140) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 144) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 146) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 148) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 150) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 154) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/audio_feedback.rs
type AudioFeedbackCharacteristic (line 30) | pub struct AudioFeedbackCharacteristic(Characteristic<bool>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 161) | fn on_read(&mut self, f: Option<impl OnReadFn<bool>>) { Characteristic...
method on_update (line 163) | fn on_update(&mut self, f: Option<impl OnUpdateFn<bool>>) { Characteri...
method on_read_async (line 167) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<bool>>) {
method on_update_async (line 171) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<bool>>) {
method get_id (line 63) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 65) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 67) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 69) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 71) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 73) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 75) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 77) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 79) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 81) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 85) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 87) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 91) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 93) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 97) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 99) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 101) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 103) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 107) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 109) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 113) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 117) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 121) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 123) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 125) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 127) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 131) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 133) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 137) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 141) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 145) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 147) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 149) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 151) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 155) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/battery_level.rs
type BatteryLevelCharacteristic (line 30) | pub struct BatteryLevelCharacteristic(Characteristic<u8>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 164) | fn on_read(&mut self, f: Option<impl OnReadFn<u8>>) { CharacteristicCa...
method on_update (line 166) | fn on_update(&mut self, f: Option<impl OnUpdateFn<u8>>) { Characterist...
method on_read_async (line 170) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<u8>>) {
method on_update_async (line 174) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<u8>>) {
method get_id (line 66) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 68) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 70) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 72) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 74) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 76) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 78) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 80) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 82) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 84) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 88) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 90) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 94) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 96) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 100) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 102) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 104) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 106) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 110) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 112) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 116) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 120) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 124) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 126) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 128) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 130) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 134) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 136) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 140) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 144) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 148) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 150) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 152) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 154) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 158) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/brightness.rs
type BrightnessCharacteristic (line 30) | pub struct BrightnessCharacteristic(Characteristic<i32>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 165) | fn on_read(&mut self, f: Option<impl OnReadFn<i32>>) { CharacteristicC...
method on_update (line 167) | fn on_update(&mut self, f: Option<impl OnUpdateFn<i32>>) { Characteris...
method on_read_async (line 171) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<i32>>) {
method on_update_async (line 175) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<i32>>) {
method get_id (line 67) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 69) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 71) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 73) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 75) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 77) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 79) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 81) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 83) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 85) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 89) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 91) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 95) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 97) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 101) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 103) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 105) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 107) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 111) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 113) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 117) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 121) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 125) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 127) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 129) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 131) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 135) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 137) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 141) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 145) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 149) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 151) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 153) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 155) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 159) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/button_event.rs
type ButtonEventCharacteristic (line 30) | pub struct ButtonEventCharacteristic(Characteristic<Vec<u8>>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 160) | fn on_read(&mut self, f: Option<impl OnReadFn<Vec<u8>>>) { Characteris...
method on_update (line 162) | fn on_update(&mut self, f: Option<impl OnUpdateFn<Vec<u8>>>) { Charact...
method on_read_async (line 166) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<Vec<u8>>>) {
method on_update_async (line 170) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<Vec<u8>>>) {
method get_id (line 62) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 64) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 66) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 68) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 70) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 72) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 74) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 76) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 78) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 80) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 84) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 86) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 90) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 92) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 96) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 98) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 100) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 102) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 106) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 108) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 112) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 116) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 120) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 122) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 124) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 126) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 130) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 132) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 136) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 140) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 144) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 146) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 148) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 150) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 154) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/camera_operating_mode_indicator.rs
type CameraOperatingModeIndicatorCharacteristic (line 30) | pub struct CameraOperatingModeIndicatorCharacteristic(Characteristic<boo...
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 162) | fn on_read(&mut self, f: Option<impl OnReadFn<bool>>) { Characteristic...
method on_update (line 164) | fn on_update(&mut self, f: Option<impl OnUpdateFn<bool>>) { Characteri...
method on_read_async (line 168) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<bool>>) {
method on_update_async (line 172) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<bool>>) {
method get_id (line 64) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 66) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 68) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 70) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 72) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 74) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 76) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 78) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 80) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 82) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 86) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 88) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 92) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 94) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 98) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 100) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 102) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 104) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 108) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 110) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 114) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 118) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 122) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 124) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 126) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 128) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 132) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 134) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 138) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 142) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 146) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 148) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 150) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 152) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 156) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/carbon_dioxide_detected.rs
type CarbonDioxideDetectedCharacteristic (line 30) | pub struct CarbonDioxideDetectedCharacteristic(Characteristic<u8>);
method new (line 39) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 172) | fn on_read(&mut self, f: Option<impl OnReadFn<u8>>) { CharacteristicCa...
method on_update (line 174) | fn on_update(&mut self, f: Option<impl OnUpdateFn<u8>>) { Characterist...
method on_read_async (line 178) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<u8>>) {
method on_update_async (line 182) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<u8>>) {
type Value (line 32) | pub enum Value {
method get_id (line 74) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 76) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 78) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 80) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 82) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 84) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 86) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 88) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 90) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 92) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 96) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 98) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 102) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 104) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 108) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 110) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 112) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 114) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 118) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 120) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 124) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 128) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 132) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 134) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 136) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 138) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 142) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 144) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 148) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 152) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 156) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 158) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 160) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 162) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 166) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/carbon_dioxide_level.rs
type CarbonDioxideLevelCharacteristic (line 30) | pub struct CarbonDioxideLevelCharacteristic(Characteristic<f32>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 164) | fn on_read(&mut self, f: Option<impl OnReadFn<f32>>) { CharacteristicC...
method on_update (line 166) | fn on_update(&mut self, f: Option<impl OnUpdateFn<f32>>) { Characteris...
method on_read_async (line 170) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<f32>>) {
method on_update_async (line 174) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<f32>>) {
method get_id (line 66) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 68) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 70) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 72) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 74) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 76) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 78) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 80) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 82) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 84) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 88) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 90) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 94) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 96) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 100) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 102) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 104) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 106) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 110) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 112) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 116) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 120) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 124) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 126) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 128) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 130) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 134) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 136) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 140) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 144) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 148) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 150) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 152) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 154) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 158) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/carbon_dioxide_peak_level.rs
type CarbonDioxidePeakLevelCharacteristic (line 30) | pub struct CarbonDioxidePeakLevelCharacteristic(Characteristic<f32>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 164) | fn on_read(&mut self, f: Option<impl OnReadFn<f32>>) { CharacteristicC...
method on_update (line 166) | fn on_update(&mut self, f: Option<impl OnUpdateFn<f32>>) { Characteris...
method on_read_async (line 170) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<f32>>) {
method on_update_async (line 174) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<f32>>) {
method get_id (line 66) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 68) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 70) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 72) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 74) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 76) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 78) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 80) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 82) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 84) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 88) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 90) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 94) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 96) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 100) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 102) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 104) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 106) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 110) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 112) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 116) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 120) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 124) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 126) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 128) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 130) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 134) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 136) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 140) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 144) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 148) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 150) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 152) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 154) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 158) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/carbon_monoxide_detected.rs
type CarbonMonoxideDetectedCharacteristic (line 30) | pub struct CarbonMonoxideDetectedCharacteristic(Characteristic<u8>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 163) | fn on_read(&mut self, f: Option<impl OnReadFn<u8>>) { CharacteristicCa...
method on_update (line 165) | fn on_update(&mut self, f: Option<impl OnUpdateFn<u8>>) { Characterist...
method on_read_async (line 169) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<u8>>) {
method on_update_async (line 173) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<u8>>) {
method get_id (line 65) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 67) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 69) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 71) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 73) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 75) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 77) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 79) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 81) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 83) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 87) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 89) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 93) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 95) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 99) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 101) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 103) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 105) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 109) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 111) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 115) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 119) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 123) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 125) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 127) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 129) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 133) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 135) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 139) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 143) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 147) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 149) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 151) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 153) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 157) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/carbon_monoxide_level.rs
type CarbonMonoxideLevelCharacteristic (line 30) | pub struct CarbonMonoxideLevelCharacteristic(Characteristic<f32>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 164) | fn on_read(&mut self, f: Option<impl OnReadFn<f32>>) { CharacteristicC...
method on_update (line 166) | fn on_update(&mut self, f: Option<impl OnUpdateFn<f32>>) { Characteris...
method on_read_async (line 170) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<f32>>) {
method on_update_async (line 174) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<f32>>) {
method get_id (line 66) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 68) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 70) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 72) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 74) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 76) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 78) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 80) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 82) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 84) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 88) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 90) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 94) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 96) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 100) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 102) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 104) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 106) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 110) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 112) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 116) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 120) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 124) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 126) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 128) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 130) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 134) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 136) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 140) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 144) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 148) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 150) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 152) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 154) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 158) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/carbon_monoxide_peak_level.rs
type CarbonMonoxidePeakLevelCharacteristic (line 30) | pub struct CarbonMonoxidePeakLevelCharacteristic(Characteristic<f32>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 164) | fn on_read(&mut self, f: Option<impl OnReadFn<f32>>) { CharacteristicC...
method on_update (line 166) | fn on_update(&mut self, f: Option<impl OnUpdateFn<f32>>) { Characteris...
method on_read_async (line 170) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<f32>>) {
method on_update_async (line 174) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<f32>>) {
method get_id (line 66) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 68) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 70) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 72) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 74) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 76) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 78) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 80) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 82) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 84) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 88) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 90) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 94) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 96) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 100) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 102) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 104) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 106) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 110) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 112) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 116) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 120) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 124) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 126) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 128) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 130) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 134) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 136) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 140) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 144) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 148) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 150) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 152) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 154) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 158) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/cca_energy_detect_threshold.rs
type CcaEnergyDetectThresholdCharacteristic (line 30) | pub struct CcaEnergyDetectThresholdCharacteristic(Characteristic<i32>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 159) | fn on_read(&mut self, f: Option<impl OnReadFn<i32>>) { CharacteristicC...
method on_update (line 161) | fn on_update(&mut self, f: Option<impl OnUpdateFn<i32>>) { Characteris...
method on_read_async (line 165) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<i32>>) {
method on_update_async (line 169) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<i32>>) {
method get_id (line 61) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 63) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 65) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 67) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 69) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 71) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 73) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 75) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 77) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 79) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 83) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 85) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 89) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 91) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 95) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 97) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 99) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 101) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 105) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 107) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 111) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 115) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 119) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 121) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 123) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 125) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 129) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 131) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 135) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 139) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 143) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 145) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 147) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 149) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 153) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/cca_signal_detect_threshold.rs
type CcaSignalDetectThresholdCharacteristic (line 30) | pub struct CcaSignalDetectThresholdCharacteristic(Characteristic<i32>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 159) | fn on_read(&mut self, f: Option<impl OnReadFn<i32>>) { CharacteristicC...
method on_update (line 161) | fn on_update(&mut self, f: Option<impl OnUpdateFn<i32>>) { Characteris...
method on_read_async (line 165) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<i32>>) {
method on_update_async (line 169) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<i32>>) {
method get_id (line 61) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 63) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 65) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 67) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 69) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 71) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 73) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 75) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 77) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 79) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 83) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 85) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 89) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 91) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 95) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 97) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 99) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 101) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 105) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 107) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 111) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 115) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 119) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 121) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 123) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 125) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 129) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 131) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 135) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 139) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 143) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 145) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 147) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 149) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 153) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/characteristic_value_active_transition_count.rs
type CharacteristicValueActiveTransitionCountCharacteristic (line 30) | pub struct CharacteristicValueActiveTransitionCountCharacteristic(Charac...
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 160) | fn on_read(&mut self, f: Option<impl OnReadFn<u8>>) { CharacteristicCa...
method on_update (line 162) | fn on_update(&mut self, f: Option<impl OnUpdateFn<u8>>) { Characterist...
method on_read_async (line 166) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<u8>>) {
method on_update_async (line 170) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<u8>>) {
method get_id (line 62) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 64) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 66) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 68) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 70) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 72) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 74) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 76) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 78) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 80) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 84) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 86) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 90) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 92) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 96) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 98) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 100) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 102) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 106) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 108) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 112) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 116) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 120) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 122) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 124) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 126) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 130) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 132) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 136) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 140) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 144) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 146) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 148) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 150) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 154) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/characteristic_value_transition_control.rs
type CharacteristicValueTransitionControlCharacteristic (line 30) | pub struct CharacteristicValueTransitionControlCharacteristic(Characteri...
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 160) | fn on_read(&mut self, f: Option<impl OnReadFn<Vec<u8>>>) { Characteris...
method on_update (line 162) | fn on_update(&mut self, f: Option<impl OnUpdateFn<Vec<u8>>>) { Charact...
method on_read_async (line 166) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<Vec<u8>>>) {
method on_update_async (line 170) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<Vec<u8>>>) {
method get_id (line 62) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 64) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 66) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 68) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 70) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 72) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 74) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 76) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 78) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 80) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 84) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 86) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 90) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 92) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 96) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 98) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 100) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 102) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 106) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 108) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 112) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 116) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 120) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 122) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 124) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 126) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 130) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 132) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 136) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 140) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 144) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 146) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 148) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 150) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 154) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/charging_state.rs
type ChargingStateCharacteristic (line 30) | pub struct ChargingStateCharacteristic(Characteristic<u8>);
method new (line 40) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 174) | fn on_read(&mut self, f: Option<impl OnReadFn<u8>>) { CharacteristicCa...
method on_update (line 176) | fn on_update(&mut self, f: Option<impl OnUpdateFn<u8>>) { Characterist...
method on_read_async (line 180) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<u8>>) {
method on_update_async (line 184) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<u8>>) {
type Value (line 32) | pub enum Value {
method get_id (line 76) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 78) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 80) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 82) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 84) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 86) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 88) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 90) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 92) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 94) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 98) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 100) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 104) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 106) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 110) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 112) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 114) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 116) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 120) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 122) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 126) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 130) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 134) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 136) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 138) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 140) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 144) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 146) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 150) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 154) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 158) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 160) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 162) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 164) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 168) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/closed_captions.rs
type ClosedCaptionsCharacteristic (line 30) | pub struct ClosedCaptionsCharacteristic(Characteristic<u8>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 164) | fn on_read(&mut self, f: Option<impl OnReadFn<u8>>) { CharacteristicCa...
method on_update (line 166) | fn on_update(&mut self, f: Option<impl OnUpdateFn<u8>>) { Characterist...
method on_read_async (line 170) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<u8>>) {
method on_update_async (line 174) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<u8>>) {
method get_id (line 66) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 68) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 70) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 72) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 74) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 76) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 78) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 80) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 82) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 84) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 88) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 90) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 94) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 96) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 100) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 102) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 104) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 106) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 110) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 112) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 116) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 120) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 124) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 126) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 128) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 130) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 134) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 136) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 140) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 144) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 148) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 150) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 152) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 154) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 158) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/cloud_relay_control_point.rs
type CloudRelayControlPointCharacteristic (line 30) | pub struct CloudRelayControlPointCharacteristic(Characteristic<Vec<u8>>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 161) | fn on_read(&mut self, f: Option<impl OnReadFn<Vec<u8>>>) { Characteris...
method on_update (line 163) | fn on_update(&mut self, f: Option<impl OnUpdateFn<Vec<u8>>>) { Charact...
method on_read_async (line 167) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<Vec<u8>>>) {
method on_update_async (line 171) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<Vec<u8>>>) {
method get_id (line 63) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 65) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 67) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 69) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 71) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 73) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 75) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 77) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 79) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 81) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 85) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 87) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 91) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 93) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 97) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 99) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 101) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 103) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 107) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 109) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 113) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 117) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 121) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 123) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 125) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 127) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 131) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 133) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 137) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 141) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 145) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 147) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 149) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 151) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 155) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/cloud_relay_current_state.rs
type CloudRelayCurrentStateCharacteristic (line 30) | pub struct CloudRelayCurrentStateCharacteristic(Characteristic<u8>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 163) | fn on_read(&mut self, f: Option<impl OnReadFn<u8>>) { CharacteristicCa...
method on_update (line 165) | fn on_update(&mut self, f: Option<impl OnUpdateFn<u8>>) { Characterist...
method on_read_async (line 169) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<u8>>) {
method on_update_async (line 173) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<u8>>) {
method get_id (line 65) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 67) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 69) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 71) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 73) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 75) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 77) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 79) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 81) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 83) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 87) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 89) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 93) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 95) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 99) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 101) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 103) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 105) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 109) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 111) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 115) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 119) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 123) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 125) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 127) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 129) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 133) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 135) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 139) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 143) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 147) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 149) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 151) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 153) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 157) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/cloud_relay_enable_status.rs
type CloudRelayEnableStatusCharacteristic (line 30) | pub struct CloudRelayEnableStatusCharacteristic(Characteristic<bool>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 161) | fn on_read(&mut self, f: Option<impl OnReadFn<bool>>) { Characteristic...
method on_update (line 163) | fn on_update(&mut self, f: Option<impl OnUpdateFn<bool>>) { Characteri...
method on_read_async (line 167) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<bool>>) {
method on_update_async (line 171) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<bool>>) {
method get_id (line 63) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 65) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 67) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 69) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 71) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 73) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 75) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 77) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 79) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 81) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 85) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 87) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 91) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 93) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 97) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 99) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 101) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 103) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 107) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 109) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 113) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 117) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 121) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 123) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 125) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 127) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 131) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 133) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 137) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 141) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 145) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 147) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 149) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 151) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 155) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/color_temperature.rs
type ColorTemperatureCharacteristic (line 30) | pub struct ColorTemperatureCharacteristic(Characteristic<i32>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 164) | fn on_read(&mut self, f: Option<impl OnReadFn<i32>>) { CharacteristicC...
method on_update (line 166) | fn on_update(&mut self, f: Option<impl OnUpdateFn<i32>>) { Characteris...
method on_read_async (line 170) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<i32>>) {
method on_update_async (line 174) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<i32>>) {
method get_id (line 66) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 68) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 70) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 72) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 74) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 76) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 78) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 80) | fn set_perms(&mut self, perms: Vec<Perm>) { HapCharacteristic::set_perms...
method get_description (line 82) | fn get_description(&self) -> Option<String> { HapCharacteristic::get_des...
method set_description (line 84) | fn set_description(&mut self, description: Option<String>) {
method get_event_notifications (line 88) | fn get_event_notifications(&self) -> Option<bool> { HapCharacteristic::g...
method set_event_notifications (line 90) | fn set_event_notifications(&mut self, event_notifications: Option<bool>) {
method get_value (line 94) | async fn get_value(&mut self) -> Result<serde_json::Value> { HapCharacte...
method set_value (line 96) | async fn set_value(&mut self, value: serde_json::Value) -> Result<()> {
method get_unit (line 100) | fn get_unit(&self) -> Option<Unit> { HapCharacteristic::get_unit(&self.0) }
method set_unit (line 102) | fn set_unit(&mut self, unit: Option<Unit>) { HapCharacteristic::set_unit...
method get_max_value (line 104) | fn get_max_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_max_value (line 106) | fn set_max_value(&mut self, max_value: Option<serde_json::Value>) -> Res...
method get_min_value (line 110) | fn get_min_value(&self) -> Option<serde_json::Value> { HapCharacteristic...
method set_min_value (line 112) | fn set_min_value(&mut self, min_value: Option<serde_json::Value>) -> Res...
method get_step_value (line 116) | fn get_step_value(&self) -> Option<serde_json::Value> {
method set_step_value (line 120) | fn set_step_value(&mut self, step_value: Option<serde_json::Value>) -> R...
method get_max_len (line 124) | fn get_max_len(&self) -> Option<u16> { HapCharacteristic::get_max_len(&s...
method set_max_len (line 126) | fn set_max_len(&mut self, max_len: Option<u16>) { HapCharacteristic::set...
method get_max_data_len (line 128) | fn get_max_data_len(&self) -> Option<u32> { HapCharacteristic::get_max_d...
method set_max_data_len (line 130) | fn set_max_data_len(&mut self, max_data_len: Option<u32>) {
method get_valid_values (line 134) | fn get_valid_values(&self) -> Option<Vec<serde_json::Value>> { HapCharac...
method set_valid_values (line 136) | fn set_valid_values(&mut self, valid_values: Option<Vec<serde_json::Valu...
method get_valid_values_range (line 140) | fn get_valid_values_range(&self) -> Option<[serde_json::Value; 2]> {
method set_valid_values_range (line 144) | fn set_valid_values_range(&mut self, valid_values_range: Option<[serde_j...
method get_ttl (line 148) | fn get_ttl(&self) -> Option<u64> { HapCharacteristic::get_ttl(&self.0) }
method set_ttl (line 150) | fn set_ttl(&mut self, ttl: Option<u64>) { HapCharacteristic::set_ttl(&mu...
method get_pid (line 152) | fn get_pid(&self) -> Option<u64> { HapCharacteristic::get_pid(&self.0) }
method set_pid (line 154) | fn set_pid(&mut self, pid: Option<u64>) { HapCharacteristic::set_pid(&mu...
method set_event_emitter (line 158) | fn set_event_emitter(&mut self, event_emitter: Option<pointer::EventEmit...
FILE: src/characteristic/generated/configuration_state.rs
type ConfigurationStateCharacteristic (line 30) | pub struct ConfigurationStateCharacteristic(Characteristic<u16>);
method new (line 34) | pub fn new(id: u64, accessory_id: u64) -> Self {
method on_read (line 160) | fn on_read(&mut self, f: Option<impl OnReadFn<u16>>) { CharacteristicC...
method on_update (line 162) | fn on_update(&mut self, f: Option<impl OnUpdateFn<u16>>) { Characteris...
method on_read_async (line 166) | fn on_read_async(&mut self, f: Option<impl OnReadFuture<u16>>) {
method on_update_async (line 170) | fn on_update_async(&mut self, f: Option<impl OnUpdateFuture<u16>>) {
method get_id (line 62) | fn get_id(&self) -> u64 { HapCharacteristic::get_id(&self.0) }
method set_id (line 64) | fn set_id(&mut self, id: u64) { HapCharacteristic::set_id(&mut self.0, i...
method get_type (line 66) | fn get_type(&self) -> HapType { HapCharacteristic::get_type(&self.0) }
method set_type (line 68) | fn set_type(&mut self, hap_type: HapType) { HapCharacteristic::set_type(...
method get_format (line 70) | fn get_format(&self) -> Format { HapCharacteristic::get_format(&self.0) }
method set_format (line 72) | fn set_format(&mut self, format: Format) { HapCharacteristic::set_format...
method get_perms (line 74) | fn get_perms(&self) -> Vec<Perm> { HapCharacteristic::get_perms(&self.0) }
method set_perms (line 76) | fn set_pe
Condensed preview — 431 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,629K chars).
[
{
"path": ".github/workflows/ci.yml",
"chars": 2348,
"preview": "name: CI\n\non:\n pull_request:\n push:\n branches:\n - main\n\nenv:\n RUST_BACKTRACE: 1\n\njobs:\n style:\n name: Che"
},
{
"path": ".gitignore",
"chars": 33,
"preview": "Cargo.lock\ntarget\ndata\n.DS_Store\n"
},
{
"path": "Cargo.toml",
"chars": 1533,
"preview": "[package]\nname = \"hap\"\nversion = \"0.1.0-pre.15\"\nauthors = [\"Elias Wilken <elias@wlkn.io>\"]\nedition = \"2021\"\ndescription "
},
{
"path": "LICENSE-APACHE",
"chars": 10847,
"preview": " Apache License\n Version 2.0, January 2004\n http"
},
{
"path": "LICENSE-MIT",
"chars": 1056,
"preview": "Copyright (c) 2021 Elias Wilken\n\nPermission is hereby granted, free of charge, to any\nperson obtaining a copy of this so"
},
{
"path": "README.md",
"chars": 8305,
"preview": "# HAP (HomeKit Accessory Protocol)\n\n[](https://github.com"
},
{
"path": "codegen/Cargo.toml",
"chars": 541,
"preview": "[package]\nname = \"hap-codegen\"\nversion = \"0.1.0-pre.15\"\nauthors = [\"Elias Wilken <elias@wlkn.io>\"]\nedition = \"2021\"\ndesc"
},
{
"path": "codegen/gen/README.md",
"chars": 227,
"preview": "### Getting system definitions\n\n cp /System/Library/PrivateFrameworks/HomeKitDaemon.framework/Resources/plain-metadat"
},
{
"path": "codegen/gen/system.json",
"chars": 111513,
"preview": "{\n \"Version\": 880,\n \"PlistDictionary\": {\n \"HomeKit\": {\n \"Notification\": {\n \"CoalesceNotifications\": {\n "
},
{
"path": "codegen/src/main.rs",
"chars": 53442,
"preview": "use handlebars::{Context, Handlebars, Helper, Output, RenderContext, RenderError, Renderable};\nuse serde::{Deserialize, "
},
{
"path": "examples/adding_accessories_dynamically.rs",
"chars": 2099,
"preview": "use tokio;\n\nuse hap::{\n accessory::{bridge::BridgeAccessory, lightbulb::LightbulbAccessory, AccessoryCategory, Access"
},
{
"path": "examples/air_purifier.rs",
"chars": 1368,
"preview": "use tokio;\n\nuse hap::{\n accessory::{air_purifier::AirPurifierAccessory, AccessoryCategory, AccessoryInformation},\n "
},
{
"path": "examples/air_quality_sensor.rs",
"chars": 1403,
"preview": "use tokio;\n\nuse hap::{\n accessory::{air_quality_sensor::AirQualitySensorAccessory, AccessoryCategory, AccessoryInform"
},
{
"path": "examples/async_callbacks.rs",
"chars": 1941,
"preview": "use tokio;\n\nuse hap::{\n accessory::{lightbulb::LightbulbAccessory, AccessoryCategory, AccessoryInformation},\n char"
},
{
"path": "examples/bridged_accessories.rs",
"chars": 2906,
"preview": "use tokio;\n\nuse hap::{\n accessory::{bridge::BridgeAccessory, lightbulb::LightbulbAccessory, AccessoryCategory, Access"
},
{
"path": "examples/callbacks.rs",
"chars": 1775,
"preview": "use tokio;\n\nuse hap::{\n accessory::{lightbulb::LightbulbAccessory, AccessoryCategory, AccessoryInformation},\n char"
},
{
"path": "examples/carbon_dioxide_sensor.rs",
"chars": 1424,
"preview": "use tokio;\n\nuse hap::{\n accessory::{carbon_dioxide_sensor::CarbonDioxideSensorAccessory, AccessoryCategory, Accessory"
},
{
"path": "examples/carbon_monoxide_sensor.rs",
"chars": 1431,
"preview": "use tokio;\n\nuse hap::{\n accessory::{carbon_monoxide_sensor::CarbonMonoxideSensorAccessory, AccessoryCategory, Accesso"
},
{
"path": "examples/contact_sensor.rs",
"chars": 1377,
"preview": "use tokio;\n\nuse hap::{\n accessory::{contact_sensor::ContactSensorAccessory, AccessoryCategory, AccessoryInformation},"
},
{
"path": "examples/cooler.rs",
"chars": 1350,
"preview": "use tokio;\n\nuse hap::{\n accessory::{heater_cooler::HeaterCoolerAccessory, AccessoryCategory, AccessoryInformation},\n "
},
{
"path": "examples/custom_characteristics_services_accessories.rs",
"chars": 7697,
"preview": "use serde::{\n ser::{SerializeStruct, Serializer},\n Serialize,\n};\nuse tokio;\nuse uuid::Uuid;\n\nuse hap::{\n access"
},
{
"path": "examples/custom_multi_sensor.rs",
"chars": 3887,
"preview": "use serde::{\n ser::{SerializeStruct, Serializer},\n Serialize,\n};\nuse tokio;\n\nuse hap::{\n accessory::{AccessoryC"
},
{
"path": "examples/dehumidifier.rs",
"chars": 1405,
"preview": "use tokio;\n\nuse hap::{\n accessory::{humidifier_dehumidifier::HumidifierDehumidifierAccessory, AccessoryCategory, Acce"
},
{
"path": "examples/door.rs",
"chars": 1307,
"preview": "use tokio;\n\nuse hap::{\n accessory::{door::DoorAccessory, AccessoryCategory, AccessoryInformation},\n server::{IpSer"
},
{
"path": "examples/fan.rs",
"chars": 1299,
"preview": "use tokio;\n\nuse hap::{\n accessory::{fan::FanAccessory, AccessoryCategory, AccessoryInformation},\n server::{IpServe"
},
{
"path": "examples/fan_v2.rs",
"chars": 1318,
"preview": "use tokio;\n\nuse hap::{\n accessory::{fan_v2::FanV2Accessory, AccessoryCategory, AccessoryInformation},\n server::{Ip"
},
{
"path": "examples/faucet.rs",
"chars": 1323,
"preview": "use tokio;\n\nuse hap::{\n accessory::{faucet::FaucetAccessory, AccessoryCategory, AccessoryInformation},\n server::{I"
},
{
"path": "examples/garage_door_opener.rs",
"chars": 1413,
"preview": "use tokio;\n\nuse hap::{\n accessory::{garage_door_opener::GarageDoorOpenerAccessory, AccessoryCategory, AccessoryInform"
},
{
"path": "examples/heater.rs",
"chars": 1345,
"preview": "use tokio;\n\nuse hap::{\n accessory::{heater_cooler::HeaterCoolerAccessory, AccessoryCategory, AccessoryInformation},\n "
},
{
"path": "examples/humidifier.rs",
"chars": 1410,
"preview": "use tokio;\n\nuse hap::{\n accessory::{humidifier_dehumidifier::HumidifierDehumidifierAccessory, AccessoryCategory, Acce"
},
{
"path": "examples/humidity_sensor.rs",
"chars": 1384,
"preview": "use tokio;\n\nuse hap::{\n accessory::{humidity_sensor::HumiditySensorAccessory, AccessoryCategory, AccessoryInformation"
},
{
"path": "examples/irrigation_system.rs",
"chars": 1401,
"preview": "use tokio;\n\nuse hap::{\n accessory::{irrigation_system::IrrigationSystemAccessory, AccessoryCategory, AccessoryInforma"
},
{
"path": "examples/leak_sensor.rs",
"chars": 1356,
"preview": "use tokio;\n\nuse hap::{\n accessory::{leak_sensor::LeakSensorAccessory, AccessoryCategory, AccessoryInformation},\n s"
},
{
"path": "examples/light_sensor.rs",
"chars": 1363,
"preview": "use tokio;\n\nuse hap::{\n accessory::{light_sensor::LightSensorAccessory, AccessoryCategory, AccessoryInformation},\n "
},
{
"path": "examples/lightbulb.rs",
"chars": 1347,
"preview": "use tokio;\n\nuse hap::{\n accessory::{lightbulb::LightbulbAccessory, AccessoryCategory, AccessoryInformation},\n serv"
},
{
"path": "examples/lock.rs",
"chars": 1311,
"preview": "use tokio;\n\nuse hap::{\n accessory::{lock::LockAccessory, AccessoryCategory, AccessoryInformation},\n server::{IpSer"
},
{
"path": "examples/motion_sensor.rs",
"chars": 1370,
"preview": "use tokio;\n\nuse hap::{\n accessory::{motion_sensor::MotionSensorAccessory, AccessoryCategory, AccessoryInformation},\n "
},
{
"path": "examples/occupancy_sensor.rs",
"chars": 1391,
"preview": "use tokio;\n\nuse hap::{\n accessory::{occupancy_sensor::OccupancySensorAccessory, AccessoryCategory, AccessoryInformati"
},
{
"path": "examples/outlet.rs",
"chars": 1323,
"preview": "use tokio;\n\nuse hap::{\n accessory::{outlet::OutletAccessory, AccessoryCategory, AccessoryInformation},\n server::{I"
},
{
"path": "examples/security_system.rs",
"chars": 1392,
"preview": "use tokio;\n\nuse hap::{\n accessory::{security_system::SecuritySystemAccessory, AccessoryCategory, AccessoryInformation"
},
{
"path": "examples/setting_values_after_server_start.rs",
"chars": 2346,
"preview": "use tokio;\n\nuse hap::{\n accessory::{motion_sensor::MotionSensorAccessory, AccessoryCategory, AccessoryInformation},\n "
},
{
"path": "examples/shower_head.rs",
"chars": 1360,
"preview": "use tokio;\n\nuse hap::{\n accessory::{shower_head::ShowerHeadAccessory, AccessoryCategory, AccessoryInformation},\n s"
},
{
"path": "examples/smart_speaker.rs",
"chars": 1371,
"preview": "use tokio;\n\nuse hap::{\n accessory::{smart_speaker::SmartSpeakerAccessory, AccessoryCategory, AccessoryInformation},\n "
},
{
"path": "examples/smoke_sensor.rs",
"chars": 1363,
"preview": "use tokio;\n\nuse hap::{\n accessory::{smoke_sensor::SmokeSensorAccessory, AccessoryCategory, AccessoryInformation},\n "
},
{
"path": "examples/stateful_programmable_switch.rs",
"chars": 1516,
"preview": "use tokio;\n\nuse hap::{\n accessory::{\n stateful_programmable_switch::StatefulProgrammableSwitchAccessory,\n "
},
{
"path": "examples/stateless_programmable_switch.rs",
"chars": 1523,
"preview": "use tokio;\n\nuse hap::{\n accessory::{\n stateless_programmable_switch::StatelessProgrammableSwitchAccessory,\n "
},
{
"path": "examples/storing_arbitrary_bytes.rs",
"chars": 3541,
"preview": "use serde::{Deserialize, Serialize};\nuse std::sync::Arc;\nuse tokio::sync::Mutex;\n\nuse hap::{\n accessory::{lightbulb::"
},
{
"path": "examples/switch.rs",
"chars": 1323,
"preview": "use tokio;\n\nuse hap::{\n accessory::{switch::SwitchAccessory, AccessoryCategory, AccessoryInformation},\n server::{I"
},
{
"path": "examples/television.rs",
"chars": 1355,
"preview": "use tokio;\n\nuse hap::{\n accessory::{television::TelevisionAccessory, AccessoryCategory, AccessoryInformation},\n se"
},
{
"path": "examples/temperature_sensor.rs",
"chars": 1405,
"preview": "use tokio;\n\nuse hap::{\n accessory::{temperature_sensor::TemperatureSensorAccessory, AccessoryCategory, AccessoryInfor"
},
{
"path": "examples/thermostat.rs",
"chars": 1355,
"preview": "use tokio;\n\nuse hap::{\n accessory::{thermostat::ThermostatAccessory, AccessoryCategory, AccessoryInformation},\n se"
},
{
"path": "examples/wi_fi_router.rs",
"chars": 1365,
"preview": "use tokio;\n\nuse hap::{\n accessory::{wi_fi_router::WiFiRouterAccessory, AccessoryCategory, AccessoryInformation},\n "
},
{
"path": "examples/wi_fi_satellite.rs",
"chars": 1386,
"preview": "use tokio;\n\nuse hap::{\n accessory::{wi_fi_satellite::WiFiSatelliteAccessory, AccessoryCategory, AccessoryInformation}"
},
{
"path": "examples/window.rs",
"chars": 1323,
"preview": "use tokio;\n\nuse hap::{\n accessory::{window::WindowAccessory, AccessoryCategory, AccessoryInformation},\n server::{I"
},
{
"path": "examples/window_covering.rs",
"chars": 1392,
"preview": "use tokio;\n\nuse hap::{\n accessory::{window_covering::WindowCoveringAccessory, AccessoryCategory, AccessoryInformation"
},
{
"path": "rls.toml",
"chars": 21,
"preview": "build_on_save = true\n"
},
{
"path": "rustfmt.toml",
"chars": 632,
"preview": "edition = \"2018\"\nunstable_features = true\nversion = \"Two\"\n\ncomment_width = 120\nfn_single_line = true\nformat_code_in_doc_"
},
{
"path": "src/accessory/category.rs",
"chars": 845,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::{Deserialize, Serialize};\n\n/// HAP accessory category.\n#[deriv"
},
{
"path": "src/accessory/defined/bridge.rs",
"chars": 1961,
"preview": "use serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n accessory::{AccessoryInformation, HapAccesso"
},
{
"path": "src/accessory/defined/faucet.rs",
"chars": 2415,
"preview": "use futures::executor;\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n accessory::{Accessory"
},
{
"path": "src/accessory/defined/heater_cooler.rs",
"chars": 2420,
"preview": "use serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n accessory::{AccessoryInformation, HapAccesso"
},
{
"path": "src/accessory/defined/irrigation_system.rs",
"chars": 2600,
"preview": "use futures::executor;\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n accessory::{Accessory"
},
{
"path": "src/accessory/defined/lightbulb.rs",
"chars": 2729,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n "
},
{
"path": "src/accessory/defined/lock.rs",
"chars": 3034,
"preview": "use serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n accessory::{AccessoryInformation, HapAccesso"
},
{
"path": "src/accessory/defined/mod.rs",
"chars": 448,
"preview": "/// Bridge accessory definition.\npub mod bridge;\n/// Faucet accessory definition.\npub mod faucet;\n/// Heater-Cooler acce"
},
{
"path": "src/accessory/defined/shower_head.rs",
"chars": 2451,
"preview": "use futures::executor;\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n accessory::{Accessory"
},
{
"path": "src/accessory/defined/television.rs",
"chars": 2836,
"preview": "use serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n accessory::{AccessoryInformation, HapAccesso"
},
{
"path": "src/accessory/generated/air_purifier.rs",
"chars": 2541,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/air_quality_sensor.rs",
"chars": 2654,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/carbon_dioxide_sensor.rs",
"chars": 2714,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/carbon_monoxide_sensor.rs",
"chars": 2734,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/contact_sensor.rs",
"chars": 2581,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/door.rs",
"chars": 2388,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/fan.rs",
"chars": 2368,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/fan_v2.rs",
"chars": 2421,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/garage_door_opener.rs",
"chars": 2654,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/humidifier_dehumidifier.rs",
"chars": 2761,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/humidity_sensor.rs",
"chars": 2601,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/leak_sensor.rs",
"chars": 2521,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/light_sensor.rs",
"chars": 2541,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/mod.rs",
"chars": 1869,
"preview": "// this file is auto-generated by hap-codegen\n\n/// Air Purifier accessory definition.\npub mod air_purifier;\n/// Air Qual"
},
{
"path": "src/accessory/generated/motion_sensor.rs",
"chars": 2561,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/occupancy_sensor.rs",
"chars": 2621,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/outlet.rs",
"chars": 2428,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/security_system.rs",
"chars": 2601,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/smart_speaker.rs",
"chars": 2561,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/smoke_sensor.rs",
"chars": 2541,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/stateful_programmable_switch.rs",
"chars": 2854,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/stateless_programmable_switch.rs",
"chars": 2874,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/switch.rs",
"chars": 2428,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/temperature_sensor.rs",
"chars": 2661,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/thermostat.rs",
"chars": 2508,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/wi_fi_router.rs",
"chars": 2534,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/wi_fi_satellite.rs",
"chars": 2594,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/window.rs",
"chars": 2428,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/generated/window_covering.rs",
"chars": 2601,
"preview": "// this file is auto-generated by hap-codegen\n\nuse serde::ser::{Serialize, SerializeStruct, Serializer};\n\nuse crate::{\n\t"
},
{
"path": "src/accessory/mod.rs",
"chars": 10001,
"preview": "use erased_serde::serialize_trait_object;\nuse futures::executor;\n\nuse crate::{\n characteristic::{\n accessory_f"
},
{
"path": "src/characteristic/generated/access_code_control_point.rs",
"chars": 6440,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/access_code_supported_configuration.rs",
"chars": 6507,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/access_control_level.rs",
"chars": 6460,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/accessory_flags.rs",
"chars": 6329,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/accessory_identifier.rs",
"chars": 6380,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/active.rs",
"chars": 6339,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/active_identifier.rs",
"chars": 6393,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/activity_interval.rs",
"chars": 6394,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/administrator_only_access.rs",
"chars": 6441,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/air_particulate_density.rs",
"chars": 6502,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/air_particulate_size.rs",
"chars": 6428,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/airplay_enable.rs",
"chars": 6380,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/application_matching_identifier.rs",
"chars": 6478,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/asset_update_readiness.rs",
"chars": 6385,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/audio_feedback.rs",
"chars": 6349,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/battery_level.rs",
"chars": 6407,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/brightness.rs",
"chars": 6418,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/button_event.rs",
"chars": 6332,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/camera_operating_mode_indicator.rs",
"chars": 6510,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/carbon_dioxide_detected.rs",
"chars": 6574,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/carbon_dioxide_level.rs",
"chars": 6500,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/carbon_dioxide_peak_level.rs",
"chars": 6538,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/carbon_monoxide_detected.rs",
"chars": 6464,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/carbon_monoxide_level.rs",
"chars": 6506,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/carbon_monoxide_peak_level.rs",
"chars": 6544,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/cca_energy_detect_threshold.rs",
"chars": 6404,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/cca_signal_detect_threshold.rs",
"chars": 6404,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/characteristic_value_active_transition_count.rs",
"chars": 6560,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/characteristic_value_transition_control.rs",
"chars": 6566,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/charging_state.rs",
"chars": 6556,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/closed_captions.rs",
"chars": 6413,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/cloud_relay_control_point.rs",
"chars": 6458,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/cloud_relay_current_state.rs",
"chars": 6466,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/cloud_relay_enable_status.rs",
"chars": 6434,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/color_temperature.rs",
"chars": 6443,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/configuration_state.rs",
"chars": 6365,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/configured_name.rs",
"chars": 6353,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/contact_sensor_state.rs",
"chars": 6529,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/cooling_threshold_temperature.rs",
"chars": 6595,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_air_purifier_state.rs",
"chars": 6633,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_air_quality.rs",
"chars": 6654,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_door_state.rs",
"chars": 6580,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_fan_state.rs",
"chars": 6548,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_heater_cooler_state.rs",
"chars": 6663,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_heating_cooling_state.rs",
"chars": 6659,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_horizontal_tilt_angle.rs",
"chars": 6546,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_humidifier_dehumidifier_state.rs",
"chars": 6773,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_light_level.rs",
"chars": 6453,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_media_state.rs",
"chars": 6419,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_position.rs",
"chars": 6434,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_relative_humidity.rs",
"chars": 6537,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_slat_state.rs",
"chars": 6591,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_temperature.rs",
"chars": 6489,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_tilt_angle.rs",
"chars": 6454,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_transport.rs",
"chars": 6335,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_vertical_tilt_angle.rs",
"chars": 6528,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_visibility_state.rs",
"chars": 6464,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/current_water_level.rs",
"chars": 6483,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/data_stream_hap_transport.rs",
"chars": 6440,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/data_stream_hap_transport_interrupt.rs",
"chars": 6518,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/digital_zoom.rs",
"chars": 6357,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/display_order.rs",
"chars": 6341,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/event_retransmission_maximum.rs",
"chars": 6412,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/event_snapshots_active.rs",
"chars": 6436,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/event_transmission_counters.rs",
"chars": 6412,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/filter_change_indication.rs",
"chars": 6584,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/filter_life_level.rs",
"chars": 6432,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/filter_reset_change_indication.rs",
"chars": 6494,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/firmware_revision.rs",
"chars": 6353,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/firmware_update_readiness.rs",
"chars": 6442,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/firmware_update_status.rs",
"chars": 6415,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/hardware_finish.rs",
"chars": 6341,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/hardware_revision.rs",
"chars": 6353,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/heart_beat.rs",
"chars": 6284,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/heating_threshold_temperature.rs",
"chars": 6594,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/hold_position.rs",
"chars": 6300,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/homekit_camera_active.rs",
"chars": 6427,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/hue.rs",
"chars": 6376,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/identifier.rs",
"chars": 6296,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/identify.rs",
"chars": 6262,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/image_mirroring.rs",
"chars": 6358,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/image_rotation.rs",
"chars": 6447,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/in_use.rs",
"chars": 6309,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/input_device_type.rs",
"chars": 6401,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/input_source_type.rs",
"chars": 6402,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/is_configured.rs",
"chars": 6372,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/label_index.rs",
"chars": 6338,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/label_namespace.rs",
"chars": 6372,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/leak_detected.rs",
"chars": 6520,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/list_pairings.rs",
"chars": 6346,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/lock_control_point.rs",
"chars": 6362,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/lock_current_state.rs",
"chars": 6511,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/lock_last_known_action.rs",
"chars": 6439,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/lock_management_auto_security_timeout.rs",
"chars": 6559,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/lock_physical_controls.rs",
"chars": 6469,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/lock_target_state.rs",
"chars": 6525,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/logs.rs",
"chars": 6267,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/mac_retransmission_maximum.rs",
"chars": 6394,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/mac_transmission_counters.rs",
"chars": 6424,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/managed_network_enable.rs",
"chars": 6467,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/manually_disabled.rs",
"chars": 6353,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/manufacturer.rs",
"chars": 6337,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
},
{
"path": "src/characteristic/generated/maximum_transmit_power.rs",
"chars": 6366,
"preview": "// this file is auto-generated by hap-codegen\n\nuse async_trait::async_trait;\nuse serde::Serialize;\nuse serde_json::json;"
}
]
// ... and 231 more files (download for full content)
About this extraction
This page contains the full source code of the ewilken/hap-rs GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 431 files (2.4 MB), approximately 646.4k tokens, and a symbol index with 11604 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.