aboutsummaryrefslogtreecommitdiff
path: root/wmediumd/api.h
diff options
context:
space:
mode:
authorSeungjae Yoo <seungjaeyoo@google.com>2022-05-25 05:42:46 +0000
committerSeungjae Yoo <seungjaeyoo@google.com>2022-06-02 00:35:20 +0000
commit7a146b4de1c26d8f587de310572e356c670cc687 (patch)
tree4067b5d6ea1ab882a02806bfa0afa4e09d85ceef /wmediumd/api.h
parent542cd2bbd843c1a32dc2450e847e5280eb7d9699 (diff)
downloadwmediumd-7a146b4de1c26d8f587de310572e356c670cc687.tar.gz
Add set position API in wmediumd
With set position API in wmediumd, we can connect/disconnect wifi connection with distance between stations like real world. Type command "wmediumd_control set_position" to use it. Bug: 230432123 Test: Creating several cuttlefish instance with "launch_cvd", and change X/Y position of station with "wmediumd_control set_position". Then the result could be seen with "wmediumd_control list_stations" and the cuttlefish screen. Change-Id: I0036878bdcd2174a050ac987b015a410ce54e6c8
Diffstat (limited to 'wmediumd/api.h')
-rw-r--r--wmediumd/api.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/wmediumd/api.h b/wmediumd/api.h
index ba507e4..8fa8fe0 100644
--- a/wmediumd/api.h
+++ b/wmediumd/api.h
@@ -70,6 +70,11 @@ enum wmediumd_message {
WMEDIUMD_MSG_STOP_PCAP,
WMEDIUMD_MSG_STATIONS_LIST,
+
+ /*
+ * Set position of station.
+ */
+ WMEDIUMD_MSG_SET_POSITION,
};
struct wmediumd_message_header {
@@ -109,7 +114,7 @@ struct wmediumd_tx_start {
};
#pragma pack(push, 1)
- struct wmediumd_set_snr {
+struct wmediumd_set_snr {
/* MAC address of node 1 */
uint8_t node1_mac[6];
/* MAC address of node 2 */
@@ -143,6 +148,15 @@ struct wmediumd_station_infos {
uint32_t count;
struct wmediumd_station_info stations[0];
};
+
+struct wmediumd_set_position {
+ /* MAC address */
+ uint8_t mac[6];
+ /* X position of station */
+ double x;
+ /* Y position of station */
+ double y;
+};
#pragma pack(pop)
#endif /* _WMEDIUMD_API_H */